UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

62 lines (61 loc) 1.28 kB
import { GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as Zt, GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as hi, } from "../common/constants.js"; export default class Jt { constructor( t = 0, i = [], s = [], h = [], e = null, l = null, r = { enabled: !1 }, a = { enabled: !1, refresh_rate_limit: void 0 }, n = { enabled: !0, capacity: Zt, refill_rate: hi, endpoint_overrides: {} }, o = { enabled: !1, max_placements: 0 }, ) { (this.ml = t), (this.Rl = i), (this.Cl = s), (this.El = h), (this.wl = e), (this.fl = l), (this.dl = r), (this.De = a), (this.bl = n), (this.banners = o), (this.ml = t), (this.Rl = i), (this.Cl = s), (this.El = h), (this.wl = e), (this.fl = l), (this.dl = r), (this.De = a), (this.bl = n), (this.banners = o); } bt() { return { s: "5.8.1", l: this.ml, e: this.Rl, a: this.Cl, p: this.El, m: this.wl, v: this.fl, c: this.dl, f: this.De, grl: this.bl, b: this.banners, }; } static En(t) { let i = t.l; return ( "5.8.1" !== t.s && (i = 0), new Jt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b) ); } }