UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

56 lines (55 loc) 1.23 kB
import cr from "./filter.js"; import { isArray as z } from "../../util/code-utils.js"; export default class is { constructor(t) { (this.filters = t), (this.filters = t); } Bc(t) { let r = !0; for (let e = 0; e < this.filters.length; e++) { const o = this.filters[e]; let s = !1; for (let r = 0; r < o.length; r++) if (o[r].Bc(t)) { s = !0; break; } if (!s) { r = !1; break; } } return r; } static fromJson(t) { if (null == t || !z(t)) return null; const r = []; for (let e = 0; e < t.length; e++) { const o = [], s = t[e]; for (let t = 0; t < s.length; t++) o.push(cr.fromJson(s[t])); r.push(o); } return new is(r); } dt() { const t = []; for (let r = 0; r < this.filters.length; r++) { const e = this.filters[r], o = []; for (let t = 0; t < e.length; t++) o.push(e[t].dt()); t.push(o); } return t; } static Vo(t) { const r = []; for (let e = 0; e < t.length; e++) { const o = [], s = t[e]; for (let t = 0; t < s.length; t++) o.push(cr.Vo(s[t])); r.push(o); } return new is(r); } }