@sesamy/sesamy-js 1.18.2 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/sesamy-js.cjs +5 -5
- package/dist/sesamy-js.iife.js +5 -5
- package/dist/sesamy-js.mjs +842 -834
- package/package.json +2 -2
package/dist/sesamy-js.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
var El = Object.defineProperty;
|
|
2
2
|
var Ol = (e, t, r) => t in e ? El(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, re = function(e) {
|
|
3
|
+
var oe = (e, t, r) => Ol(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ne = function(e) {
|
|
6
5
|
try {
|
|
7
6
|
return !!e();
|
|
8
7
|
} catch {
|
|
9
8
|
return !0;
|
|
10
9
|
}
|
|
11
|
-
}, _l =
|
|
10
|
+
}, _l = ne, za = !_l(function() {
|
|
12
11
|
var e = (function() {
|
|
13
12
|
}).bind();
|
|
14
13
|
return typeof e != "function" || e.hasOwnProperty("prototype");
|
|
@@ -18,7 +17,7 @@ var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18
17
|
};
|
|
19
18
|
}, fc = K, Cl = fc({}.toString), jl = fc("".slice), Ha = function(e) {
|
|
20
19
|
return jl(Cl(e), 8, -1);
|
|
21
|
-
}, Al = K, Ll =
|
|
20
|
+
}, Al = K, Ll = ne, xl = Ha, dn = Object, Ul = Al("".split), dc = Ll(function() {
|
|
22
21
|
return !dn("z").propertyIsEnumerable(0);
|
|
23
22
|
}) ? function(e) {
|
|
24
23
|
return xl(e) === "String" ? Ul(e, "") : dn(e);
|
|
@@ -27,25 +26,25 @@ var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
27
26
|
}, Nl = Ba, Dl = TypeError, Yr = function(e) {
|
|
28
27
|
if (Nl(e)) throw new Dl("Can't call method on " + e);
|
|
29
28
|
return e;
|
|
30
|
-
}, Ml = dc, Fl = Yr,
|
|
29
|
+
}, Ml = dc, Fl = Yr, nr = function(e) {
|
|
31
30
|
return Ml(Fl(e));
|
|
32
|
-
},
|
|
31
|
+
}, Lt = function(e) {
|
|
33
32
|
return e && e.Math === Math && e;
|
|
34
|
-
},
|
|
33
|
+
}, Q = (
|
|
35
34
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
Lt(typeof globalThis == "object" && globalThis) || Lt(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
36
|
+
Lt(typeof self == "object" && self) || Lt(typeof lr == "object" && lr) || Lt(typeof lr == "object" && lr) || // eslint-disable-next-line no-new-func -- fallback
|
|
38
37
|
/* @__PURE__ */ function() {
|
|
39
38
|
return this;
|
|
40
39
|
}() || Function("return this")()
|
|
41
|
-
), hc = { exports: {} }, zl = !1, Li =
|
|
40
|
+
), hc = { exports: {} }, zl = !1, Li = Q, Hl = Object.defineProperty, Ka = function(e, t) {
|
|
42
41
|
try {
|
|
43
42
|
Hl(Li, e, { value: t, configurable: !0, writable: !0 });
|
|
44
43
|
} catch {
|
|
45
44
|
Li[e] = t;
|
|
46
45
|
}
|
|
47
46
|
return t;
|
|
48
|
-
}, Bl =
|
|
47
|
+
}, Bl = Q, Kl = Ka, xi = "__core-js_shared__", Ui = hc.exports = Bl[xi] || Kl(xi, {});
|
|
49
48
|
(Ui.versions || (Ui.versions = [])).push({
|
|
50
49
|
version: "3.37.1",
|
|
51
50
|
mode: "global",
|
|
@@ -57,53 +56,53 @@ var Ga = hc.exports, Ni = Ga, vc = function(e, t) {
|
|
|
57
56
|
return Ni[e] || (Ni[e] = t || {});
|
|
58
57
|
}, Gl = Yr, Wl = Object, Jr = function(e) {
|
|
59
58
|
return Wl(Gl(e));
|
|
60
|
-
}, Vl = K, Zl = Jr, Yl = Vl({}.hasOwnProperty),
|
|
59
|
+
}, Vl = K, Zl = Jr, Yl = Vl({}.hasOwnProperty), we = Object.hasOwn || function(t, r) {
|
|
61
60
|
return Yl(Zl(t), r);
|
|
62
61
|
}, Jl = K, Xl = 0, ql = Math.random(), Ql = Jl(1 .toString), pc = function(e) {
|
|
63
62
|
return "Symbol(" + (e === void 0 ? "" : e) + ")_" + Ql(++Xl + ql, 36);
|
|
64
|
-
}, ef = typeof navigator < "u" && String(navigator.userAgent) || "", mc =
|
|
65
|
-
zi && (
|
|
66
|
-
!Nr && hn && (
|
|
67
|
-
var tf = Nr, Hi = tf, rf =
|
|
63
|
+
}, ef = typeof navigator < "u" && String(navigator.userAgent) || "", mc = Q, hn = ef, Di = mc.process, Mi = mc.Deno, Fi = Di && Di.versions || Mi && Mi.version, zi = Fi && Fi.v8, me, Nr;
|
|
64
|
+
zi && (me = zi.split("."), Nr = me[0] > 0 && me[0] < 4 ? 1 : +(me[0] + me[1]));
|
|
65
|
+
!Nr && hn && (me = hn.match(/Edge\/(\d+)/), (!me || me[1] >= 74) && (me = hn.match(/Chrome\/(\d+)/), me && (Nr = +me[1])));
|
|
66
|
+
var tf = Nr, Hi = tf, rf = ne, nf = Q, af = nf.String, gc = !!Object.getOwnPropertySymbols && !rf(function() {
|
|
68
67
|
var e = Symbol("symbol detection");
|
|
69
68
|
return !af(e) || !(Object(e) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
70
69
|
!Symbol.sham && Hi && Hi < 41;
|
|
71
|
-
}), of = gc, yc = of && !Symbol.sham && typeof Symbol.iterator == "symbol", sf =
|
|
72
|
-
return Bi(vn, e) || (vn[e] = lf && Bi(
|
|
73
|
-
}, pn = typeof document == "object" && document.all,
|
|
70
|
+
}), of = gc, yc = of && !Symbol.sham && typeof Symbol.iterator == "symbol", sf = Q, cf = vc, Bi = we, uf = pc, lf = gc, ff = yc, vt = sf.Symbol, vn = cf("wks"), df = ff ? vt.for || vt : vt && vt.withoutSetter || uf, de = function(e) {
|
|
71
|
+
return Bi(vn, e) || (vn[e] = lf && Bi(vt, e) ? vt[e] : df("Symbol." + e)), vn[e];
|
|
72
|
+
}, pn = typeof document == "object" && document.all, Y = typeof pn > "u" && pn !== void 0 ? function(e) {
|
|
74
73
|
return typeof e == "function" || e === pn;
|
|
75
74
|
} : function(e) {
|
|
76
75
|
return typeof e == "function";
|
|
77
|
-
}, hf =
|
|
76
|
+
}, hf = Y, Ce = function(e) {
|
|
78
77
|
return typeof e == "object" ? e !== null : hf(e);
|
|
79
|
-
}, vf =
|
|
78
|
+
}, vf = Ce, pf = String, mf = TypeError, ze = function(e) {
|
|
80
79
|
if (vf(e)) return e;
|
|
81
80
|
throw new mf(pf(e) + " is not an object");
|
|
82
|
-
}, wc = {}, gf =
|
|
81
|
+
}, wc = {}, gf = ne, J = !gf(function() {
|
|
83
82
|
return Object.defineProperty({}, 1, { get: function() {
|
|
84
83
|
return 7;
|
|
85
84
|
} })[1] !== 7;
|
|
86
|
-
}), yf =
|
|
85
|
+
}), yf = J, wf = ne, bc = yf && wf(function() {
|
|
87
86
|
return Object.defineProperty(function() {
|
|
88
87
|
}, "prototype", {
|
|
89
88
|
value: 42,
|
|
90
89
|
writable: !1
|
|
91
90
|
}).prototype !== 42;
|
|
92
|
-
}),
|
|
91
|
+
}), ke = {}, bf = Q, Ki = Ce, da = bf.document, Sf = Ki(da) && Ki(da.createElement), Wa = function(e) {
|
|
93
92
|
return Sf ? da.createElement(e) : {};
|
|
94
|
-
}, If =
|
|
93
|
+
}, If = J, $f = ne, kf = Wa, Sc = !If && !$f(function() {
|
|
95
94
|
return Object.defineProperty(kf("div"), "a", {
|
|
96
95
|
get: function() {
|
|
97
96
|
return 7;
|
|
98
97
|
}
|
|
99
98
|
}).a !== 7;
|
|
100
|
-
}), Pf = za, fr = Function.prototype.call,
|
|
99
|
+
}), Pf = za, fr = Function.prototype.call, Pe = Pf ? fr.bind(fr) : function() {
|
|
101
100
|
return fr.apply(fr, arguments);
|
|
102
|
-
}, mn =
|
|
101
|
+
}, mn = Q, Tf = Y, Ef = function(e) {
|
|
103
102
|
return Tf(e) ? e : void 0;
|
|
104
|
-
},
|
|
103
|
+
}, Ot = function(e, t) {
|
|
105
104
|
return arguments.length < 2 ? Ef(mn[e]) : mn[e] && mn[e][t];
|
|
106
|
-
}, Of = K, Ic = Of({}.isPrototypeOf), _f =
|
|
105
|
+
}, Of = K, Ic = Of({}.isPrototypeOf), _f = Ot, Rf = Y, Cf = Ic, jf = yc, Af = Object, $c = jf ? function(e) {
|
|
107
106
|
return typeof e == "symbol";
|
|
108
107
|
} : function(e) {
|
|
109
108
|
var t = _f("Symbol");
|
|
@@ -114,17 +113,17 @@ var tf = Nr, Hi = tf, rf = re, nf = q, af = nf.String, gc = !!Object.getOwnPrope
|
|
|
114
113
|
} catch {
|
|
115
114
|
return "Object";
|
|
116
115
|
}
|
|
117
|
-
}, xf =
|
|
116
|
+
}, xf = Y, Uf = kc, Nf = TypeError, Xr = function(e) {
|
|
118
117
|
if (xf(e)) return e;
|
|
119
118
|
throw new Nf(Uf(e) + " is not a function");
|
|
120
119
|
}, Df = Xr, Mf = Ba, Va = function(e, t) {
|
|
121
120
|
var r = e[t];
|
|
122
121
|
return Mf(r) ? void 0 : Df(r);
|
|
123
|
-
}, gn =
|
|
122
|
+
}, gn = Pe, yn = Y, wn = Ce, Ff = TypeError, zf = function(e, t) {
|
|
124
123
|
var r, n;
|
|
125
124
|
if (t === "string" && yn(r = e.toString) && !wn(n = gn(r, e)) || yn(r = e.valueOf) && !wn(n = gn(r, e)) || t !== "string" && yn(r = e.toString) && !wn(n = gn(r, e))) return n;
|
|
126
125
|
throw new Ff("Can't convert object to primitive value");
|
|
127
|
-
}, Hf =
|
|
126
|
+
}, Hf = Pe, Gi = Ce, Wi = $c, Bf = Va, Kf = zf, Gf = de, Wf = TypeError, Vf = Gf("toPrimitive"), Zf = function(e, t) {
|
|
128
127
|
if (!Gi(e) || Wi(e)) return e;
|
|
129
128
|
var r = Bf(e, Vf), n;
|
|
130
129
|
if (r) {
|
|
@@ -135,8 +134,8 @@ var tf = Nr, Hi = tf, rf = re, nf = q, af = nf.String, gc = !!Object.getOwnPrope
|
|
|
135
134
|
}, Yf = Zf, Jf = $c, Pc = function(e) {
|
|
136
135
|
var t = Yf(e, "string");
|
|
137
136
|
return Jf(t) ? t : t + "";
|
|
138
|
-
}, Xf =
|
|
139
|
-
|
|
137
|
+
}, Xf = J, qf = Sc, Qf = bc, dr = ze, Vi = Pc, ed = TypeError, bn = Object.defineProperty, td = Object.getOwnPropertyDescriptor, Sn = "enumerable", In = "configurable", $n = "writable";
|
|
138
|
+
ke.f = Xf ? Qf ? function(t, r, n) {
|
|
140
139
|
if (dr(t), r = Vi(r), dr(n), typeof t == "function" && r === "prototype" && "value" in n && $n in n && !n[$n]) {
|
|
141
140
|
var a = td(t, r);
|
|
142
141
|
a && a[$n] && (t[r] = n.value, n = {
|
|
@@ -168,7 +167,7 @@ var rd = Math.ceil, nd = Math.floor, ad = Math.trunc || function(t) {
|
|
|
168
167
|
return t > 0 ? fd(t, 9007199254740991) : 0;
|
|
169
168
|
}, hd = dd, Tc = function(e) {
|
|
170
169
|
return hd(e.length);
|
|
171
|
-
}, vd =
|
|
170
|
+
}, vd = nr, pd = ud, md = Tc, Zi = function(e) {
|
|
172
171
|
return function(t, r, n) {
|
|
173
172
|
var a = vd(t), i = md(a);
|
|
174
173
|
if (i === 0) return !e && -1;
|
|
@@ -187,7 +186,7 @@ var rd = Math.ceil, nd = Math.floor, ad = Math.trunc || function(t) {
|
|
|
187
186
|
// `Array.prototype.indexOf` method
|
|
188
187
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
189
188
|
indexOf: Zi(!1)
|
|
190
|
-
}, Ya = {}, yd = K, kn =
|
|
189
|
+
}, Ya = {}, yd = K, kn = we, wd = nr, bd = gd.indexOf, Sd = Ya, Yi = yd([].push), Ec = function(e, t) {
|
|
191
190
|
var r = wd(e), n = 0, a = [], i;
|
|
192
191
|
for (i in r) !kn(Sd, i) && kn(r, i) && Yi(a, i);
|
|
193
192
|
for (; t.length > n; ) kn(r, i = t[n++]) && (~bd(a, i) || Yi(a, i));
|
|
@@ -202,15 +201,15 @@ var rd = Math.ceil, nd = Math.floor, ad = Math.trunc || function(t) {
|
|
|
202
201
|
"valueOf"
|
|
203
202
|
], Id = Ec, $d = Ja, Oc = Object.keys || function(t) {
|
|
204
203
|
return Id(t, $d);
|
|
205
|
-
}, kd =
|
|
204
|
+
}, kd = J, Pd = bc, Td = ke, Ed = ze, Od = nr, _d = Oc;
|
|
206
205
|
wc.f = kd && !Pd ? Object.defineProperties : function(t, r) {
|
|
207
206
|
Ed(t);
|
|
208
207
|
for (var n = Od(r), a = _d(r), i = a.length, o = 0, c; i > o; ) Td.f(t, c = a[o++], n[c]);
|
|
209
208
|
return t;
|
|
210
209
|
};
|
|
211
|
-
var Rd =
|
|
210
|
+
var Rd = Ot, Cd = Rd("document", "documentElement"), jd = vc, Ad = pc, Ji = jd("keys"), Xa = function(e) {
|
|
212
211
|
return Ji[e] || (Ji[e] = Ad(e));
|
|
213
|
-
}, Ld =
|
|
212
|
+
}, Ld = ze, xd = wc, Xi = Ja, Ud = Ya, Nd = Cd, Dd = Wa, Md = Xa, qi = ">", Qi = "<", ha = "prototype", va = "script", _c = Md("IE_PROTO"), Pn = function() {
|
|
214
213
|
}, Rc = function(e) {
|
|
215
214
|
return Qi + va + qi + e + Qi + "/" + va + qi;
|
|
216
215
|
}, eo = function(e) {
|
|
@@ -233,58 +232,58 @@ Ud[_c] = !0;
|
|
|
233
232
|
var qa = Object.create || function(t, r) {
|
|
234
233
|
var n;
|
|
235
234
|
return t !== null ? (Pn[ha] = Ld(t), n = new Pn(), Pn[ha] = null, n[_c] = t) : n = Cr(), r === void 0 ? n : xd.f(n, r);
|
|
236
|
-
}, zd =
|
|
235
|
+
}, zd = de, Hd = qa, Bd = ke.f, pa = zd("unscopables"), ma = Array.prototype;
|
|
237
236
|
ma[pa] === void 0 && Bd(ma, pa, {
|
|
238
237
|
configurable: !0,
|
|
239
238
|
value: Hd(null)
|
|
240
239
|
});
|
|
241
240
|
var Kd = function(e) {
|
|
242
241
|
ma[pa][e] = !0;
|
|
243
|
-
},
|
|
242
|
+
}, ar = {}, Gd = Q, Wd = Y, to = Gd.WeakMap, Vd = Wd(to) && /native code/.test(String(to)), ir = function(e, t) {
|
|
244
243
|
return {
|
|
245
244
|
enumerable: !(e & 1),
|
|
246
245
|
configurable: !(e & 2),
|
|
247
246
|
writable: !(e & 4),
|
|
248
247
|
value: t
|
|
249
248
|
};
|
|
250
|
-
}, Zd =
|
|
249
|
+
}, Zd = J, Yd = ke, Jd = ir, qr = Zd ? function(e, t, r) {
|
|
251
250
|
return Yd.f(e, t, Jd(1, r));
|
|
252
251
|
} : function(e, t, r) {
|
|
253
252
|
return e[t] = r, e;
|
|
254
|
-
}, Xd = Vd, Cc =
|
|
255
|
-
return Mr(e) ?
|
|
253
|
+
}, Xd = Vd, Cc = Q, qd = Ce, Qd = qr, Tn = we, En = Ga, eh = Xa, th = Ya, ro = "Object already initialized", ga = Cc.TypeError, rh = Cc.WeakMap, Dr, tr, Mr, nh = function(e) {
|
|
254
|
+
return Mr(e) ? tr(e) : Dr(e, {});
|
|
256
255
|
}, ah = function(e) {
|
|
257
256
|
return function(t) {
|
|
258
257
|
var r;
|
|
259
|
-
if (!qd(t) || (r =
|
|
258
|
+
if (!qd(t) || (r = tr(t)).type !== e)
|
|
260
259
|
throw new ga("Incompatible receiver, " + e + " required");
|
|
261
260
|
return r;
|
|
262
261
|
};
|
|
263
262
|
};
|
|
264
263
|
if (Xd || En.state) {
|
|
265
|
-
var
|
|
266
|
-
|
|
267
|
-
if (
|
|
268
|
-
return t.facade = e,
|
|
269
|
-
},
|
|
270
|
-
return
|
|
264
|
+
var be = En.state || (En.state = new rh());
|
|
265
|
+
be.get = be.get, be.has = be.has, be.set = be.set, Dr = function(e, t) {
|
|
266
|
+
if (be.has(e)) throw new ga(ro);
|
|
267
|
+
return t.facade = e, be.set(e, t), t;
|
|
268
|
+
}, tr = function(e) {
|
|
269
|
+
return be.get(e) || {};
|
|
271
270
|
}, Mr = function(e) {
|
|
272
|
-
return
|
|
271
|
+
return be.has(e);
|
|
273
272
|
};
|
|
274
273
|
} else {
|
|
275
|
-
var
|
|
276
|
-
th[
|
|
277
|
-
if (Tn(e,
|
|
278
|
-
return t.facade = e, Qd(e,
|
|
279
|
-
},
|
|
280
|
-
return Tn(e,
|
|
274
|
+
var ot = eh("state");
|
|
275
|
+
th[ot] = !0, Dr = function(e, t) {
|
|
276
|
+
if (Tn(e, ot)) throw new ga(ro);
|
|
277
|
+
return t.facade = e, Qd(e, ot, t), t;
|
|
278
|
+
}, tr = function(e) {
|
|
279
|
+
return Tn(e, ot) ? e[ot] : {};
|
|
281
280
|
}, Mr = function(e) {
|
|
282
|
-
return Tn(e,
|
|
281
|
+
return Tn(e, ot);
|
|
283
282
|
};
|
|
284
283
|
}
|
|
285
|
-
var
|
|
284
|
+
var or = {
|
|
286
285
|
set: Dr,
|
|
287
|
-
get:
|
|
286
|
+
get: tr,
|
|
288
287
|
has: Mr,
|
|
289
288
|
enforce: nh,
|
|
290
289
|
getterFor: ah
|
|
@@ -293,7 +292,7 @@ ei.f = ih ? function(t) {
|
|
|
293
292
|
var r = Ac(this, t);
|
|
294
293
|
return !!r && r.enumerable;
|
|
295
294
|
} : jc;
|
|
296
|
-
var oh =
|
|
295
|
+
var oh = J, sh = Pe, ch = ei, uh = ir, lh = nr, fh = Pc, dh = we, hh = Sc, no = Object.getOwnPropertyDescriptor;
|
|
297
296
|
Qa.f = oh ? no : function(t, r) {
|
|
298
297
|
if (t = lh(t), r = fh(r), hh) try {
|
|
299
298
|
return no(t, r);
|
|
@@ -301,16 +300,16 @@ Qa.f = oh ? no : function(t, r) {
|
|
|
301
300
|
}
|
|
302
301
|
if (dh(t, r)) return uh(!sh(ch.f, t, r), t[r]);
|
|
303
302
|
};
|
|
304
|
-
var Lc = { exports: {} }, ya =
|
|
303
|
+
var Lc = { exports: {} }, ya = J, vh = we, xc = Function.prototype, ph = ya && Object.getOwnPropertyDescriptor, ti = vh(xc, "name"), mh = ti && (function() {
|
|
305
304
|
}).name === "something", gh = ti && (!ya || ya && ph(xc, "name").configurable), Uc = {
|
|
306
305
|
EXISTS: ti,
|
|
307
306
|
PROPER: mh,
|
|
308
307
|
CONFIGURABLE: gh
|
|
309
|
-
}, yh = K, wh =
|
|
308
|
+
}, yh = K, wh = Y, wa = Ga, bh = yh(Function.toString);
|
|
310
309
|
wh(wa.inspectSource) || (wa.inspectSource = function(e) {
|
|
311
310
|
return bh(e);
|
|
312
311
|
});
|
|
313
|
-
var Nc = wa.inspectSource, ri = K, Sh =
|
|
312
|
+
var Nc = wa.inspectSource, ri = K, Sh = ne, Ih = Y, vr = we, ba = J, $h = Uc.CONFIGURABLE, kh = Nc, Dc = or, Ph = Dc.enforce, Th = Dc.get, ao = String, jr = Object.defineProperty, Eh = ri("".slice), Oh = ri("".replace), _h = ri([].join), Rh = ba && !Sh(function() {
|
|
314
313
|
return jr(function() {
|
|
315
314
|
}, "length", { value: 8 }).length !== 8;
|
|
316
315
|
}), Ch = String(String).split("String"), jh = Lc.exports = function(e, t, r) {
|
|
@@ -325,7 +324,7 @@ var Nc = wa.inspectSource, ri = K, Sh = re, Ih = Z, vr = ye, ba = Y, $h = Uc.CON
|
|
|
325
324
|
Function.prototype.toString = jh(function() {
|
|
326
325
|
return Ih(this) && Th(this).source || kh(this);
|
|
327
326
|
}, "toString");
|
|
328
|
-
var Mc = Lc.exports, Ah =
|
|
327
|
+
var Mc = Lc.exports, Ah = Y, Lh = ke, xh = Mc, Uh = Ka, He = function(e, t, r, n) {
|
|
329
328
|
n || (n = {});
|
|
330
329
|
var a = n.enumerable, i = n.name !== void 0 ? n.name : t;
|
|
331
330
|
if (Ah(r) && xh(r, i, n), n.global)
|
|
@@ -349,20 +348,20 @@ Fc.f = Object.getOwnPropertyNames || function(t) {
|
|
|
349
348
|
};
|
|
350
349
|
var ni = {};
|
|
351
350
|
ni.f = Object.getOwnPropertySymbols;
|
|
352
|
-
var Fh =
|
|
351
|
+
var Fh = Ot, zh = K, Hh = Fc, Bh = ni, Kh = ze, Gh = zh([].concat), Wh = Fh("Reflect", "ownKeys") || function(t) {
|
|
353
352
|
var r = Hh.f(Kh(t)), n = Bh.f;
|
|
354
353
|
return n ? Gh(r, n(t)) : r;
|
|
355
|
-
}, io =
|
|
354
|
+
}, io = we, Vh = Wh, Zh = Qa, Yh = ke, Jh = function(e, t, r) {
|
|
356
355
|
for (var n = Vh(t), a = Yh.f, i = Zh.f, o = 0; o < n.length; o++) {
|
|
357
356
|
var c = n[o];
|
|
358
357
|
!io(e, c) && !(r && io(r, c)) && a(e, c, i(t, c));
|
|
359
358
|
}
|
|
360
|
-
}, Xh =
|
|
359
|
+
}, Xh = ne, qh = Y, Qh = /#|\.prototype\./, sr = function(e, t) {
|
|
361
360
|
var r = tv[ev(e)];
|
|
362
361
|
return r === nv ? !0 : r === rv ? !1 : qh(t) ? Xh(t) : !!t;
|
|
363
|
-
}, ev =
|
|
362
|
+
}, ev = sr.normalize = function(e) {
|
|
364
363
|
return String(e).replace(Qh, ".").toLowerCase();
|
|
365
|
-
}, tv =
|
|
364
|
+
}, tv = sr.data = {}, rv = sr.NATIVE = "N", nv = sr.POLYFILL = "P", av = sr, pr = Q, iv = Qa.f, ov = qr, sv = He, cv = Ka, uv = Jh, lv = av, _t = function(e, t) {
|
|
366
365
|
var r = e.target, n = e.global, a = e.stat, i, o, c, l, f, u;
|
|
367
366
|
if (n ? o = pr : a ? o = pr[r] || cv(r, {}) : o = pr[r] && pr[r].prototype, o) for (c in t) {
|
|
368
367
|
if (f = t[c], e.dontCallGetSet ? (u = iv(o, c), l = u && u.value) : l = o[c], i = lv(n ? c : r + (a ? "." : "#") + c, e.forced), !i && l !== void 0) {
|
|
@@ -371,31 +370,31 @@ var Fh = Tt, zh = K, Hh = Fc, Bh = ni, Kh = Me, Gh = zh([].concat), Wh = Fh("Ref
|
|
|
371
370
|
}
|
|
372
371
|
(e.sham || l && l.sham) && ov(f, "sham", !0), sv(o, c, f, e);
|
|
373
372
|
}
|
|
374
|
-
}, fv =
|
|
373
|
+
}, fv = ne, dv = !fv(function() {
|
|
375
374
|
function e() {
|
|
376
375
|
}
|
|
377
376
|
return e.prototype.constructor = null, Object.getPrototypeOf(new e()) !== e.prototype;
|
|
378
|
-
}), hv =
|
|
377
|
+
}), hv = we, vv = Y, pv = Jr, mv = Xa, gv = dv, oo = mv("IE_PROTO"), Sa = Object, yv = Sa.prototype, zc = gv ? Sa.getPrototypeOf : function(e) {
|
|
379
378
|
var t = pv(e);
|
|
380
379
|
if (hv(t, oo)) return t[oo];
|
|
381
380
|
var r = t.constructor;
|
|
382
381
|
return vv(r) && t instanceof r ? r.prototype : t instanceof Sa ? yv : null;
|
|
383
|
-
}, wv =
|
|
384
|
-
[].keys && (_n = [].keys(), "next" in _n ? (On = so(so(_n)), On !== Object.prototype && (
|
|
385
|
-
var kv = !Sv(
|
|
382
|
+
}, wv = ne, bv = Y, Sv = Ce, so = zc, Iv = He, $v = de, Ia = $v("iterator"), Hc = !1, tt, On, _n;
|
|
383
|
+
[].keys && (_n = [].keys(), "next" in _n ? (On = so(so(_n)), On !== Object.prototype && (tt = On)) : Hc = !0);
|
|
384
|
+
var kv = !Sv(tt) || wv(function() {
|
|
386
385
|
var e = {};
|
|
387
|
-
return
|
|
386
|
+
return tt[Ia].call(e) !== e;
|
|
388
387
|
});
|
|
389
|
-
kv && (
|
|
390
|
-
bv(
|
|
388
|
+
kv && (tt = {});
|
|
389
|
+
bv(tt[Ia]) || Iv(tt, Ia, function() {
|
|
391
390
|
return this;
|
|
392
391
|
});
|
|
393
392
|
var Bc = {
|
|
394
|
-
IteratorPrototype:
|
|
393
|
+
IteratorPrototype: tt,
|
|
395
394
|
BUGGY_SAFARI_ITERATORS: Hc
|
|
396
|
-
}, Pv =
|
|
395
|
+
}, Pv = ke.f, Tv = we, Ev = de, co = Ev("toStringTag"), cr = function(e, t, r) {
|
|
397
396
|
e && !r && (e = e.prototype), e && !Tv(e, co) && Pv(e, co, { configurable: !0, value: t });
|
|
398
|
-
}, Ov = Bc.IteratorPrototype, _v = qa, Rv =
|
|
397
|
+
}, Ov = Bc.IteratorPrototype, _v = qa, Rv = ir, Cv = cr, jv = ar, Av = function() {
|
|
399
398
|
return this;
|
|
400
399
|
}, Kc = function(e, t, r, n) {
|
|
401
400
|
var a = t + " Iterator";
|
|
@@ -405,12 +404,12 @@ var Bc = {
|
|
|
405
404
|
return Lv(xv(Object.getOwnPropertyDescriptor(e, t)[r]));
|
|
406
405
|
} catch {
|
|
407
406
|
}
|
|
408
|
-
}, Nv =
|
|
407
|
+
}, Nv = Ce, Dv = function(e) {
|
|
409
408
|
return Nv(e) || e === null;
|
|
410
409
|
}, Mv = Dv, Fv = String, zv = TypeError, Hv = function(e) {
|
|
411
410
|
if (Mv(e)) return e;
|
|
412
411
|
throw new zv("Can't set " + Fv(e) + " as a prototype");
|
|
413
|
-
}, Bv = Uv, Kv =
|
|
412
|
+
}, Bv = Uv, Kv = Ce, Gv = Yr, Wv = Hv, Vv = Object.setPrototypeOf || ("__proto__" in {} ? function() {
|
|
414
413
|
var e = !1, t = {}, r;
|
|
415
414
|
try {
|
|
416
415
|
r = Bv(Object.prototype, "__proto__", "set"), r(t, []), e = t instanceof Array;
|
|
@@ -419,7 +418,7 @@ var Bc = {
|
|
|
419
418
|
return function(a, i) {
|
|
420
419
|
return Gv(a), Wv(i), Kv(a) && (e ? r(a, i) : a.__proto__ = i), a;
|
|
421
420
|
};
|
|
422
|
-
}() : void 0), Zv =
|
|
421
|
+
}() : void 0), Zv = _t, Yv = Pe, Gc = Uc, Jv = Y, Xv = Kc, uo = zc, lo = Vv, qv = cr, Qv = qr, Rn = He, ep = de, tp = ar, Wc = Bc, rp = Gc.PROPER, np = Gc.CONFIGURABLE, fo = Wc.IteratorPrototype, mr = Wc.BUGGY_SAFARI_ITERATORS, xt = ep("iterator"), ho = "keys", Ut = "values", vo = "entries", ap = function() {
|
|
423
422
|
return this;
|
|
424
423
|
}, Vc = function(e, t, r, n, a, i, o) {
|
|
425
424
|
Xv(r, t, n);
|
|
@@ -431,7 +430,7 @@ var Bc = {
|
|
|
431
430
|
return function() {
|
|
432
431
|
return new r(this, $);
|
|
433
432
|
};
|
|
434
|
-
case
|
|
433
|
+
case Ut:
|
|
435
434
|
return function() {
|
|
436
435
|
return new r(this, $);
|
|
437
436
|
};
|
|
@@ -443,21 +442,21 @@ var Bc = {
|
|
|
443
442
|
return function() {
|
|
444
443
|
return new r(this);
|
|
445
444
|
};
|
|
446
|
-
}, l = t + " Iterator", f = !1, u = e.prototype, s = u[
|
|
447
|
-
if (h && (m = uo(h.call(new e())), m !== Object.prototype && m.next && (uo(m) !== fo && (lo ? lo(m, fo) : Jv(m[
|
|
445
|
+
}, l = t + " Iterator", f = !1, u = e.prototype, s = u[xt] || u["@@iterator"] || a && u[a], d = !mr && s || c(a), h = t === "Array" && u.entries || s, m, S, g;
|
|
446
|
+
if (h && (m = uo(h.call(new e())), m !== Object.prototype && m.next && (uo(m) !== fo && (lo ? lo(m, fo) : Jv(m[xt]) || Rn(m, xt, ap)), qv(m, l, !0))), rp && a === Ut && s && s.name !== Ut && (np ? Qv(u, "name", Ut) : (f = !0, d = function() {
|
|
448
447
|
return Yv(s, this);
|
|
449
448
|
})), a)
|
|
450
449
|
if (S = {
|
|
451
|
-
values: c(
|
|
450
|
+
values: c(Ut),
|
|
452
451
|
keys: i ? d : c(ho),
|
|
453
452
|
entries: c(vo)
|
|
454
453
|
}, o) for (g in S)
|
|
455
454
|
(mr || f || !(g in u)) && Rn(u, g, S[g]);
|
|
456
455
|
else Zv({ target: t, proto: !0, forced: mr || f }, S);
|
|
457
|
-
return u[
|
|
456
|
+
return u[xt] !== d && Rn(u, xt, d, { name: a }), tp[t] = d, S;
|
|
458
457
|
}, ai = function(e, t) {
|
|
459
458
|
return { value: e, done: t };
|
|
460
|
-
}, ip =
|
|
459
|
+
}, ip = nr, ii = Kd, po = ar, Zc = or, op = ke.f, sp = Vc, gr = ai, cp = J, Yc = "Array Iterator", up = Zc.set, lp = Zc.getterFor(Yc), fp = sp(Array, "Array", function(e, t) {
|
|
461
460
|
up(this, {
|
|
462
461
|
type: Yc,
|
|
463
462
|
target: ip(e),
|
|
@@ -486,18 +485,18 @@ if (cp && mo.name !== "values") try {
|
|
|
486
485
|
op(mo, "name", { value: "values" });
|
|
487
486
|
} catch {
|
|
488
487
|
}
|
|
489
|
-
var go =
|
|
488
|
+
var go = Q, dp = J, hp = Object.getOwnPropertyDescriptor, vp = function(e) {
|
|
490
489
|
if (!dp) return go[e];
|
|
491
490
|
var t = hp(go, e);
|
|
492
491
|
return t && t.value;
|
|
493
|
-
}, pp =
|
|
492
|
+
}, pp = ne, mp = de, gp = J, yo = zl, yp = mp("iterator"), Qr = !pp(function() {
|
|
494
493
|
var e = new URL("b?a=1&b=2&c=3", "http://a"), t = e.searchParams, r = new URLSearchParams("a=1&a=2&b=3"), n = "";
|
|
495
494
|
return e.pathname = "c%20d", t.forEach(function(a, i) {
|
|
496
495
|
t.delete("b"), n += i + a;
|
|
497
496
|
}), r.delete("a", 2), r.delete("b", void 0), yo && (!e.toJSON || !r.has("a", 1) || r.has("a", 2) || !r.has("a", void 0) || r.has("b")) || !t.size && (yo || !gp) || !t.sort || e.href !== "http://a/c%20d?a=1&c=3" || t.get("c") !== "3" || String(new URLSearchParams("?a=1")) !== "a=1" || !t[yp] || new URL("https://a@b").username !== "a" || new URLSearchParams(new URLSearchParams("a=b")).get("a") !== "b" || new URL("http://тест").host !== "xn--e1aybc" || new URL("http://a#б").hash !== "#%D0%B1" || n !== "a1c3" || new URL("http://x", void 0).host !== "x";
|
|
498
|
-
}), wo = Mc, wp =
|
|
497
|
+
}), wo = Mc, wp = ke, oi = function(e, t, r) {
|
|
499
498
|
return r.get && wo(r.get, t, { getter: !0 }), r.set && wo(r.set, t, { setter: !0 }), wp.f(e, t, r);
|
|
500
|
-
}, bp =
|
|
499
|
+
}, bp = He, Sp = function(e, t, r) {
|
|
501
500
|
for (var n in t) bp(e, n, t[n], r);
|
|
502
501
|
return e;
|
|
503
502
|
}, Ip = Ic, $p = TypeError, Jc = function(e, t) {
|
|
@@ -509,9 +508,9 @@ var go = q, dp = Y, hp = Object.getOwnPropertyDescriptor, vp = function(e) {
|
|
|
509
508
|
return Ep(e), t === void 0 ? e : Op ? _p(e, t) : function() {
|
|
510
509
|
return e.apply(t, arguments);
|
|
511
510
|
};
|
|
512
|
-
}, Rp =
|
|
511
|
+
}, Rp = de, Cp = Rp("toStringTag"), Xc = {};
|
|
513
512
|
Xc[Cp] = "z";
|
|
514
|
-
var jp = String(Xc) === "[object z]", Ap = jp, Lp =
|
|
513
|
+
var jp = String(Xc) === "[object z]", Ap = jp, Lp = Y, Ar = Ha, xp = de, Up = xp("toStringTag"), Np = Object, Dp = Ar(/* @__PURE__ */ function() {
|
|
515
514
|
return arguments;
|
|
516
515
|
}()) === "Arguments", Mp = function(e, t) {
|
|
517
516
|
try {
|
|
@@ -521,16 +520,16 @@ var jp = String(Xc) === "[object z]", Ap = jp, Lp = Z, Ar = Ha, xp = fe, Up = xp
|
|
|
521
520
|
}, en = Ap ? Ar : function(e) {
|
|
522
521
|
var t, r, n;
|
|
523
522
|
return e === void 0 ? "Undefined" : e === null ? "Null" : typeof (r = Mp(t = Np(e), Up)) == "string" ? r : Dp ? Ar(t) : (n = Ar(t)) === "Object" && Lp(t.callee) ? "Arguments" : n;
|
|
524
|
-
}, Fp = en, zp = String,
|
|
523
|
+
}, Fp = en, zp = String, Be = function(e) {
|
|
525
524
|
if (Fp(e) === "Symbol") throw new TypeError("Cannot convert a Symbol value to a string");
|
|
526
525
|
return zp(e);
|
|
527
|
-
}, Hp = en, So = Va, Bp = Ba, Kp =
|
|
526
|
+
}, Hp = en, So = Va, Bp = Ba, Kp = ar, Gp = de, Wp = Gp("iterator"), ci = function(e) {
|
|
528
527
|
if (!Bp(e)) return So(e, Wp) || So(e, "@@iterator") || Kp[Hp(e)];
|
|
529
|
-
}, Vp =
|
|
528
|
+
}, Vp = Pe, Zp = Xr, Yp = ze, Jp = kc, Xp = ci, qp = TypeError, qc = function(e, t) {
|
|
530
529
|
var r = arguments.length < 2 ? Xp(e) : t;
|
|
531
530
|
if (Zp(r)) return Yp(Vp(r, e));
|
|
532
531
|
throw new qp(Jp(e) + " is not iterable");
|
|
533
|
-
}, Qp = TypeError,
|
|
532
|
+
}, Qp = TypeError, Rt = function(e, t) {
|
|
534
533
|
if (e < t) throw new Qp("Not enough arguments");
|
|
535
534
|
return e;
|
|
536
535
|
}, em = K, Qc = em([].slice), Io = Qc, tm = Math.floor, $a = function(e, t) {
|
|
@@ -545,7 +544,7 @@ var jp = String(Xc) === "[object z]", Ap = jp, Lp = Z, Ar = Ha, xp = fe, Up = xp
|
|
|
545
544
|
for (var o = tm(r / 2), c = $a(Io(e, 0, o), t), l = $a(Io(e, o), t), f = c.length, u = l.length, s = 0, d = 0; s < f || d < u; )
|
|
546
545
|
e[s + d] = s < f && d < u ? t(c[s], l[d]) <= 0 ? c[s++] : l[d++] : s < f ? c[s++] : l[d++];
|
|
547
546
|
return e;
|
|
548
|
-
}, rm = $a, ka =
|
|
547
|
+
}, rm = $a, ka = _t, tn = Q, ui = vp, yr = Pe, $e = K, Vt = J, eu = Qr, tu = He, nm = oi, am = Sp, im = cr, om = Kc, li = or, ru = Jc, Cn = Y, sm = we, cm = si, um = en, lm = ze, nu = Ce, q = Be, fm = qa, $o = ir, ko = qc, dm = ci, wr = ai, st = Rt, hm = de, vm = rm, pm = hm("iterator"), Ct = "URLSearchParams", au = Ct + "Iterator", iu = li.set, le = li.getterFor(Ct), mm = li.getterFor(au), Po = ui("fetch"), Fr = ui("Request"), Zt = ui("Headers"), jn = Fr && Fr.prototype, To = Zt && Zt.prototype, gm = tn.RegExp, ym = tn.TypeError, ou = tn.decodeURIComponent, wm = tn.encodeURIComponent, bm = $e("".charAt), Eo = $e([].join), Je = $e([].push), Pa = $e("".replace), Sm = $e([].shift), Oo = $e([].splice), _o = $e("".split), Im = $e("".slice), $m = /\+/g, Ro = Array(4), km = function(e) {
|
|
549
548
|
return Ro[e - 1] || (Ro[e - 1] = gm("((?:%[\\da-f]{2}){" + e + "})", "gi"));
|
|
550
549
|
}, Pm = function(e) {
|
|
551
550
|
try {
|
|
@@ -576,11 +575,11 @@ var jp = String(Xc) === "[object z]", Ap = jp, Lp = Z, Ar = Ha, xp = fe, Up = xp
|
|
|
576
575
|
}, An = om(function(t, r) {
|
|
577
576
|
iu(this, {
|
|
578
577
|
type: au,
|
|
579
|
-
target:
|
|
578
|
+
target: le(t).entries,
|
|
580
579
|
index: 0,
|
|
581
580
|
kind: r
|
|
582
581
|
});
|
|
583
|
-
},
|
|
582
|
+
}, Ct, function() {
|
|
584
583
|
var t = mm(this), r = t.target, n = t.index++;
|
|
585
584
|
if (!r || n >= r.length)
|
|
586
585
|
return t.target = void 0, wr(void 0, !0);
|
|
@@ -593,10 +592,10 @@ var jp = String(Xc) === "[object z]", Ap = jp, Lp = Z, Ar = Ha, xp = fe, Up = xp
|
|
|
593
592
|
}
|
|
594
593
|
return wr([a.key, a.value], !1);
|
|
595
594
|
}, !0), su = function(e) {
|
|
596
|
-
this.entries = [], this.url = null, e !== void 0 && (nu(e) ? this.parseObject(e) : this.parseQuery(typeof e == "string" ? bm(e, 0) === "?" ? Im(e, 1) : e :
|
|
595
|
+
this.entries = [], this.url = null, e !== void 0 && (nu(e) ? this.parseObject(e) : this.parseQuery(typeof e == "string" ? bm(e, 0) === "?" ? Im(e, 1) : e : q(e)));
|
|
597
596
|
};
|
|
598
597
|
su.prototype = {
|
|
599
|
-
type:
|
|
598
|
+
type: Ct,
|
|
600
599
|
bindURL: function(e) {
|
|
601
600
|
this.url = e, this.update();
|
|
602
601
|
},
|
|
@@ -605,21 +604,21 @@ su.prototype = {
|
|
|
605
604
|
if (r)
|
|
606
605
|
for (n = ko(e, r), a = n.next; !(i = yr(a, n)).done; ) {
|
|
607
606
|
if (o = ko(lm(i.value)), c = o.next, (l = yr(c, o)).done || (f = yr(c, o)).done || !yr(c, o).done) throw new ym("Expected sequence with length 2");
|
|
608
|
-
|
|
607
|
+
Je(t, { key: q(l.value), value: q(f.value) });
|
|
609
608
|
}
|
|
610
|
-
else for (var u in e) sm(e, u) &&
|
|
609
|
+
else for (var u in e) sm(e, u) && Je(t, { key: u, value: q(e[u]) });
|
|
611
610
|
},
|
|
612
611
|
parseQuery: function(e) {
|
|
613
612
|
if (e)
|
|
614
613
|
for (var t = this.entries, r = _o(e, "&"), n = 0, a, i; n < r.length; )
|
|
615
|
-
a = r[n++], a.length && (i = _o(a, "="),
|
|
614
|
+
a = r[n++], a.length && (i = _o(a, "="), Je(t, {
|
|
616
615
|
key: Co(Sm(i)),
|
|
617
616
|
value: Co(Eo(i, "="))
|
|
618
617
|
}));
|
|
619
618
|
},
|
|
620
619
|
serialize: function() {
|
|
621
620
|
for (var e = this.entries, t = [], r = 0, n; r < e.length; )
|
|
622
|
-
n = e[r++],
|
|
621
|
+
n = e[r++], Je(t, jo(n.key) + "=" + jo(n.value));
|
|
623
622
|
return Eo(t, "&");
|
|
624
623
|
},
|
|
625
624
|
update: function() {
|
|
@@ -630,50 +629,50 @@ su.prototype = {
|
|
|
630
629
|
}
|
|
631
630
|
};
|
|
632
631
|
var rn = function() {
|
|
633
|
-
ru(this,
|
|
632
|
+
ru(this, St);
|
|
634
633
|
var t = arguments.length > 0 ? arguments[0] : void 0, r = iu(this, new su(t));
|
|
635
|
-
|
|
636
|
-
},
|
|
637
|
-
am(
|
|
634
|
+
Vt || (this.size = r.entries.length);
|
|
635
|
+
}, St = rn.prototype;
|
|
636
|
+
am(St, {
|
|
638
637
|
// `URLSearchParams.prototype.append` method
|
|
639
638
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
640
639
|
append: function(t, r) {
|
|
641
|
-
var n =
|
|
642
|
-
|
|
640
|
+
var n = le(this);
|
|
641
|
+
st(arguments.length, 2), Je(n.entries, { key: q(t), value: q(r) }), Vt || this.length++, n.updateURL();
|
|
643
642
|
},
|
|
644
643
|
// `URLSearchParams.prototype.delete` method
|
|
645
644
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
646
645
|
delete: function(e) {
|
|
647
|
-
for (var t =
|
|
646
|
+
for (var t = le(this), r = st(arguments.length, 1), n = t.entries, a = q(e), i = r < 2 ? void 0 : arguments[1], o = i === void 0 ? i : q(i), c = 0; c < n.length; ) {
|
|
648
647
|
var l = n[c];
|
|
649
648
|
if (l.key === a && (o === void 0 || l.value === o)) {
|
|
650
649
|
if (Oo(n, c, 1), o !== void 0) break;
|
|
651
650
|
} else c++;
|
|
652
651
|
}
|
|
653
|
-
|
|
652
|
+
Vt || (this.size = n.length), t.updateURL();
|
|
654
653
|
},
|
|
655
654
|
// `URLSearchParams.prototype.get` method
|
|
656
655
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
|
|
657
656
|
get: function(t) {
|
|
658
|
-
var r =
|
|
659
|
-
|
|
660
|
-
for (var n =
|
|
657
|
+
var r = le(this).entries;
|
|
658
|
+
st(arguments.length, 1);
|
|
659
|
+
for (var n = q(t), a = 0; a < r.length; a++)
|
|
661
660
|
if (r[a].key === n) return r[a].value;
|
|
662
661
|
return null;
|
|
663
662
|
},
|
|
664
663
|
// `URLSearchParams.prototype.getAll` method
|
|
665
664
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
|
|
666
665
|
getAll: function(t) {
|
|
667
|
-
var r =
|
|
668
|
-
|
|
669
|
-
for (var n =
|
|
670
|
-
r[i].key === n &&
|
|
666
|
+
var r = le(this).entries;
|
|
667
|
+
st(arguments.length, 1);
|
|
668
|
+
for (var n = q(t), a = [], i = 0; i < r.length; i++)
|
|
669
|
+
r[i].key === n && Je(a, r[i].value);
|
|
671
670
|
return a;
|
|
672
671
|
},
|
|
673
672
|
// `URLSearchParams.prototype.has` method
|
|
674
673
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
|
|
675
674
|
has: function(t) {
|
|
676
|
-
for (var r =
|
|
675
|
+
for (var r = le(this).entries, n = st(arguments.length, 1), a = q(t), i = n < 2 ? void 0 : arguments[1], o = i === void 0 ? i : q(i), c = 0; c < r.length; ) {
|
|
677
676
|
var l = r[c++];
|
|
678
677
|
if (l.key === a && (o === void 0 || l.value === o)) return !0;
|
|
679
678
|
}
|
|
@@ -682,23 +681,23 @@ am(wt, {
|
|
|
682
681
|
// `URLSearchParams.prototype.set` method
|
|
683
682
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
|
|
684
683
|
set: function(t, r) {
|
|
685
|
-
var n =
|
|
686
|
-
|
|
687
|
-
for (var a = n.entries, i = !1, o =
|
|
684
|
+
var n = le(this);
|
|
685
|
+
st(arguments.length, 1);
|
|
686
|
+
for (var a = n.entries, i = !1, o = q(t), c = q(r), l = 0, f; l < a.length; l++)
|
|
688
687
|
f = a[l], f.key === o && (i ? Oo(a, l--, 1) : (i = !0, f.value = c));
|
|
689
|
-
i ||
|
|
688
|
+
i || Je(a, { key: o, value: c }), Vt || (this.size = a.length), n.updateURL();
|
|
690
689
|
},
|
|
691
690
|
// `URLSearchParams.prototype.sort` method
|
|
692
691
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
693
692
|
sort: function() {
|
|
694
|
-
var t =
|
|
693
|
+
var t = le(this);
|
|
695
694
|
vm(t.entries, function(r, n) {
|
|
696
695
|
return r.key > n.key ? 1 : -1;
|
|
697
696
|
}), t.updateURL();
|
|
698
697
|
},
|
|
699
698
|
// `URLSearchParams.prototype.forEach` method
|
|
700
699
|
forEach: function(t) {
|
|
701
|
-
for (var r =
|
|
700
|
+
for (var r = le(this).entries, n = cm(t, arguments.length > 1 ? arguments[1] : void 0), a = 0, i; a < r.length; )
|
|
702
701
|
i = r[a++], n(i.value, i.key, this);
|
|
703
702
|
},
|
|
704
703
|
// `URLSearchParams.prototype.keys` method
|
|
@@ -714,28 +713,28 @@ am(wt, {
|
|
|
714
713
|
return new An(this, "entries");
|
|
715
714
|
}
|
|
716
715
|
}, { enumerable: !0 });
|
|
717
|
-
tu(
|
|
718
|
-
tu(
|
|
719
|
-
return
|
|
716
|
+
tu(St, pm, St.entries, { name: "entries" });
|
|
717
|
+
tu(St, "toString", function() {
|
|
718
|
+
return le(this).serialize();
|
|
720
719
|
}, { enumerable: !0 });
|
|
721
|
-
|
|
720
|
+
Vt && nm(St, "size", {
|
|
722
721
|
get: function() {
|
|
723
|
-
return
|
|
722
|
+
return le(this).entries.length;
|
|
724
723
|
},
|
|
725
724
|
configurable: !0,
|
|
726
725
|
enumerable: !0
|
|
727
726
|
});
|
|
728
|
-
im(rn,
|
|
727
|
+
im(rn, Ct);
|
|
729
728
|
ka({ global: !0, constructor: !0, forced: !eu }, {
|
|
730
729
|
URLSearchParams: rn
|
|
731
730
|
});
|
|
732
|
-
if (!eu && Cn(
|
|
733
|
-
var _m =
|
|
731
|
+
if (!eu && Cn(Zt)) {
|
|
732
|
+
var _m = $e(To.has), Rm = $e(To.set), Ao = function(e) {
|
|
734
733
|
if (nu(e)) {
|
|
735
734
|
var t = e.body, r;
|
|
736
|
-
if (um(t) ===
|
|
737
|
-
return r = e.headers ? new
|
|
738
|
-
body: $o(0,
|
|
735
|
+
if (um(t) === Ct)
|
|
736
|
+
return r = e.headers ? new Zt(e.headers) : new Zt(), _m(r, "content-type") || Rm(r, "content-type", "application/x-www-form-urlencoded;charset=UTF-8"), fm(e, {
|
|
737
|
+
body: $o(0, q(t)),
|
|
739
738
|
headers: $o(0, r)
|
|
740
739
|
});
|
|
741
740
|
}
|
|
@@ -756,8 +755,8 @@ if (!eu && Cn(Vt)) {
|
|
|
756
755
|
}
|
|
757
756
|
var Cm = {
|
|
758
757
|
URLSearchParams: rn,
|
|
759
|
-
getState:
|
|
760
|
-
}, jm =
|
|
758
|
+
getState: le
|
|
759
|
+
}, jm = He, nn = K, Lo = Be, Am = Rt, cu = URLSearchParams, an = cu.prototype, Lm = nn(an.append), xo = nn(an.delete), xm = nn(an.forEach), Um = nn([].push), fi = new cu("a=1&a=2&b=3");
|
|
761
760
|
fi.delete("a", 1);
|
|
762
761
|
fi.delete("b", void 0);
|
|
763
762
|
fi + "" != "a=2" && jm(an, "delete", function(e) {
|
|
@@ -772,7 +771,7 @@ fi + "" != "a=2" && jm(an, "delete", function(e) {
|
|
|
772
771
|
for (; c < f; )
|
|
773
772
|
u = n[c++], u.key === a && u.value === i || Lm(this, u.key, u.value);
|
|
774
773
|
}, { enumerable: !0, unsafe: !0 });
|
|
775
|
-
var Nm =
|
|
774
|
+
var Nm = He, uu = K, Dm = Be, Mm = Rt, lu = URLSearchParams, di = lu.prototype, Fm = uu(di.getAll), zm = uu(di.has), Uo = new lu("a=1");
|
|
776
775
|
(Uo.has("a", 2) || !Uo.has("a", void 0)) && Nm(di, "has", function(t) {
|
|
777
776
|
var r = arguments.length, n = r < 2 ? void 0 : arguments[1];
|
|
778
777
|
if (r && n === void 0) return zm(this, t);
|
|
@@ -782,7 +781,7 @@ var Nm = Fe, uu = K, Dm = ze, Mm = Ot, lu = URLSearchParams, di = lu.prototype,
|
|
|
782
781
|
if (a[o++] === i) return !0;
|
|
783
782
|
return !1;
|
|
784
783
|
}, { enumerable: !0, unsafe: !0 });
|
|
785
|
-
var Hm =
|
|
784
|
+
var Hm = J, Bm = K, Km = oi, Ta = URLSearchParams.prototype, Gm = Bm(Ta.forEach);
|
|
786
785
|
Hm && !("size" in Ta) && Km(Ta, "size", {
|
|
787
786
|
get: function() {
|
|
788
787
|
var t = 0;
|
|
@@ -793,9 +792,9 @@ Hm && !("size" in Ta) && Km(Ta, "size", {
|
|
|
793
792
|
configurable: !0,
|
|
794
793
|
enumerable: !0
|
|
795
794
|
});
|
|
796
|
-
var Wm =
|
|
795
|
+
var Wm = Q, fu = Wm, Vm = fu;
|
|
797
796
|
Vm.URLSearchParams;
|
|
798
|
-
var hi = K, Zm = Za, Ym =
|
|
797
|
+
var hi = K, Zm = Za, Ym = Be, Jm = Yr, Xm = hi("".charAt), No = hi("".charCodeAt), qm = hi("".slice), Do = function(e) {
|
|
799
798
|
return function(t, r) {
|
|
800
799
|
var n = Ym(Jm(t)), a = Zm(r), i = n.length, o, c;
|
|
801
800
|
return a < 0 || a >= i ? e ? "" : void 0 : (o = No(n, a), o < 55296 || o > 56319 || a + 1 === i || (c = No(n, a + 1)) < 56320 || c > 57343 ? e ? Xm(n, a) : o : e ? qm(n, a, a + 2) : (o - 55296 << 10) + (c - 56320) + 65536);
|
|
@@ -807,7 +806,7 @@ var hi = K, Zm = Za, Ym = ze, Jm = Yr, Xm = hi("".charAt), No = hi("".charCodeAt
|
|
|
807
806
|
// `String.prototype.at` method
|
|
808
807
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
809
808
|
charAt: Do(!0)
|
|
810
|
-
}, Qm = du.charAt, eg =
|
|
809
|
+
}, Qm = du.charAt, eg = Be, hu = or, tg = Vc, Mo = ai, vu = "String Iterator", rg = hu.set, ng = hu.getterFor(vu);
|
|
811
810
|
tg(String, "String", function(e) {
|
|
812
811
|
rg(this, {
|
|
813
812
|
type: vu,
|
|
@@ -818,8 +817,8 @@ tg(String, "String", function(e) {
|
|
|
818
817
|
var t = ng(this), r = t.string, n = t.index, a;
|
|
819
818
|
return n >= r.length ? Mo(void 0, !0) : (a = Qm(r, n), t.index += a.length, Mo(a, !1));
|
|
820
819
|
});
|
|
821
|
-
var Fo =
|
|
822
|
-
if (Fo &&
|
|
820
|
+
var Fo = J, ag = K, ig = Pe, og = ne, xn = Oc, sg = ni, cg = ei, ug = Jr, lg = dc, ct = Object.assign, zo = Object.defineProperty, fg = ag([].concat), dg = !ct || og(function() {
|
|
821
|
+
if (Fo && ct({ b: 1 }, ct(zo({}, "a", {
|
|
823
822
|
enumerable: !0,
|
|
824
823
|
get: function() {
|
|
825
824
|
zo(this, "b", {
|
|
@@ -831,13 +830,13 @@ var Fo = Y, ag = K, ig = ke, og = re, xn = Oc, sg = ni, cg = ei, ug = Jr, lg = d
|
|
|
831
830
|
var e = {}, t = {}, r = Symbol("assign detection"), n = "abcdefghijklmnopqrst";
|
|
832
831
|
return e[r] = 7, n.split("").forEach(function(a) {
|
|
833
832
|
t[a] = a;
|
|
834
|
-
}),
|
|
833
|
+
}), ct({}, e)[r] !== 7 || xn(ct({}, t)).join("") !== n;
|
|
835
834
|
}) ? function(t, r) {
|
|
836
835
|
for (var n = ug(t), a = arguments.length, i = 1, o = sg.f, c = cg.f; a > i; )
|
|
837
836
|
for (var l = lg(arguments[i++]), f = o ? fg(xn(l), o(l)) : xn(l), u = f.length, s = 0, d; u > s; )
|
|
838
837
|
d = f[s++], (!Fo || ig(c, l, d)) && (n[d] = l[d]);
|
|
839
838
|
return n;
|
|
840
|
-
} :
|
|
839
|
+
} : ct, hg = Pe, Ho = ze, vg = Va, pg = function(e, t, r) {
|
|
841
840
|
var n, a;
|
|
842
841
|
Ho(e);
|
|
843
842
|
try {
|
|
@@ -852,16 +851,16 @@ var Fo = Y, ag = K, ig = ke, og = re, xn = Oc, sg = ni, cg = ei, ug = Jr, lg = d
|
|
|
852
851
|
if (t === "throw") throw r;
|
|
853
852
|
if (a) throw n;
|
|
854
853
|
return Ho(n), r;
|
|
855
|
-
}, mg =
|
|
854
|
+
}, mg = ze, gg = pg, yg = function(e, t, r, n) {
|
|
856
855
|
try {
|
|
857
856
|
return n ? t(mg(r)[0], r[1]) : t(r);
|
|
858
857
|
} catch (a) {
|
|
859
858
|
gg(e, "throw", a);
|
|
860
859
|
}
|
|
861
|
-
}, wg =
|
|
860
|
+
}, wg = de, bg = ar, Sg = wg("iterator"), Ig = Array.prototype, $g = function(e) {
|
|
862
861
|
return e !== void 0 && (bg.Array === e || Ig[Sg] === e);
|
|
863
|
-
}, kg = K, Pg =
|
|
864
|
-
}, gu = Eg("Reflect", "construct"), vi = /^\s*(?:class|function)\b/, _g = kg(vi.exec), Rg = !vi.test(mu),
|
|
862
|
+
}, kg = K, Pg = ne, pu = Y, Tg = en, Eg = Ot, Og = Nc, mu = function() {
|
|
863
|
+
}, gu = Eg("Reflect", "construct"), vi = /^\s*(?:class|function)\b/, _g = kg(vi.exec), Rg = !vi.test(mu), Nt = function(t) {
|
|
865
864
|
if (!pu(t)) return !1;
|
|
866
865
|
try {
|
|
867
866
|
return gu(mu, [], t), !0;
|
|
@@ -885,12 +884,12 @@ var Fo = Y, ag = K, ig = ke, og = re, xn = Oc, sg = ni, cg = ei, ug = Jr, lg = d
|
|
|
885
884
|
yu.sham = !0;
|
|
886
885
|
var Cg = !gu || Pg(function() {
|
|
887
886
|
var e;
|
|
888
|
-
return
|
|
887
|
+
return Nt(Nt.call) || !Nt(Object) || !Nt(function() {
|
|
889
888
|
e = !0;
|
|
890
889
|
}) || e;
|
|
891
|
-
}) ? yu :
|
|
890
|
+
}) ? yu : Nt, jg = J, Ag = ke, Lg = ir, xg = function(e, t, r) {
|
|
892
891
|
jg ? Ag.f(e, t, Lg(0, r)) : e[t] = r;
|
|
893
|
-
}, Ug = si, Ng =
|
|
892
|
+
}, Ug = si, Ng = Pe, Dg = Jr, Mg = yg, Fg = $g, zg = Cg, Hg = Tc, Bo = xg, Bg = qc, Kg = ci, Ko = Array, Gg = function(t) {
|
|
894
893
|
var r = Dg(t), n = zg(this), a = arguments.length, i = a > 1 ? arguments[1] : void 0, o = i !== void 0;
|
|
895
894
|
o && (i = Ug(i, a > 2 ? arguments[2] : void 0));
|
|
896
895
|
var c = Kg(r), l = 0, f, u, s, d, h, m;
|
|
@@ -901,48 +900,48 @@ var Cg = !gu || Pg(function() {
|
|
|
901
900
|
for (f = Hg(r), u = n ? new this(f) : Ko(f); f > l; l++)
|
|
902
901
|
m = o ? i(r[l], l) : r[l], Bo(u, l, m);
|
|
903
902
|
return u.length = l, u;
|
|
904
|
-
},
|
|
903
|
+
}, it = K, Un = 2147483647, Yt = 36, wu = 1, Ea = 26, Wg = 38, Vg = 700, Zg = 72, Yg = 128, Jg = "-", Xg = /[^\0-\u007E]/, bu = /[.\u3002\uFF0E\uFF61]/g, Go = "Overflow: input needs wider integers to process", Nn = Yt - wu, Wo = RangeError, qg = it(bu.exec), pt = Math.floor, Dn = String.fromCharCode, Vo = it("".charCodeAt), Su = it([].join), Ne = it([].push), Qg = it("".replace), ey = it("".split), ty = it("".toLowerCase), ry = function(e) {
|
|
905
904
|
for (var t = [], r = 0, n = e.length; r < n; ) {
|
|
906
905
|
var a = Vo(e, r++);
|
|
907
906
|
if (a >= 55296 && a <= 56319 && r < n) {
|
|
908
907
|
var i = Vo(e, r++);
|
|
909
|
-
(i & 64512) === 56320 ?
|
|
908
|
+
(i & 64512) === 56320 ? Ne(t, ((a & 1023) << 10) + (i & 1023) + 65536) : (Ne(t, a), r--);
|
|
910
909
|
} else
|
|
911
|
-
|
|
910
|
+
Ne(t, a);
|
|
912
911
|
}
|
|
913
912
|
return t;
|
|
914
913
|
}, Zo = function(e) {
|
|
915
914
|
return e + 22 + 75 * (e < 26);
|
|
916
915
|
}, ny = function(e, t, r) {
|
|
917
916
|
var n = 0;
|
|
918
|
-
for (e = r ?
|
|
919
|
-
e =
|
|
920
|
-
return
|
|
917
|
+
for (e = r ? pt(e / Vg) : e >> 1, e += pt(e / t); e > Nn * Ea >> 1; )
|
|
918
|
+
e = pt(e / Nn), n += Yt;
|
|
919
|
+
return pt(n + (Nn + 1) * e / (e + Wg));
|
|
921
920
|
}, ay = function(e) {
|
|
922
921
|
var t = [];
|
|
923
922
|
e = ry(e);
|
|
924
923
|
var r = e.length, n = Yg, a = 0, i = Zg, o, c;
|
|
925
924
|
for (o = 0; o < e.length; o++)
|
|
926
|
-
c = e[o], c < 128 &&
|
|
925
|
+
c = e[o], c < 128 && Ne(t, Dn(c));
|
|
927
926
|
var l = t.length, f = l;
|
|
928
|
-
for (l &&
|
|
927
|
+
for (l && Ne(t, Jg); f < r; ) {
|
|
929
928
|
var u = Un;
|
|
930
929
|
for (o = 0; o < e.length; o++)
|
|
931
930
|
c = e[o], c >= n && c < u && (u = c);
|
|
932
931
|
var s = f + 1;
|
|
933
|
-
if (u - n >
|
|
932
|
+
if (u - n > pt((Un - a) / s))
|
|
934
933
|
throw new Wo(Go);
|
|
935
934
|
for (a += (u - n) * s, n = u, o = 0; o < e.length; o++) {
|
|
936
935
|
if (c = e[o], c < n && ++a > Un)
|
|
937
936
|
throw new Wo(Go);
|
|
938
937
|
if (c === n) {
|
|
939
|
-
for (var d = a, h =
|
|
938
|
+
for (var d = a, h = Yt; ; ) {
|
|
940
939
|
var m = h <= i ? wu : h >= i + Ea ? Ea : h - i;
|
|
941
940
|
if (d < m) break;
|
|
942
|
-
var S = d - m, g =
|
|
943
|
-
|
|
941
|
+
var S = d - m, g = Yt - m;
|
|
942
|
+
Ne(t, Dn(Zo(m + S % g))), d = pt(S / g), h += Yt;
|
|
944
943
|
}
|
|
945
|
-
|
|
944
|
+
Ne(t, Dn(Zo(d))), i = ny(a, s, f === l), a = 0, f++;
|
|
946
945
|
}
|
|
947
946
|
}
|
|
948
947
|
a++, n++;
|
|
@@ -951,20 +950,20 @@ var Cg = !gu || Pg(function() {
|
|
|
951
950
|
}, iy = function(e) {
|
|
952
951
|
var t = [], r = ey(Qg(ty(e), bu, "."), "."), n, a;
|
|
953
952
|
for (n = 0; n < r.length; n++)
|
|
954
|
-
a = r[n],
|
|
953
|
+
a = r[n], Ne(t, qg(Xg, a) ? "xn--" + ay(a) : a);
|
|
955
954
|
return Su(t, ".");
|
|
956
|
-
}, oy =
|
|
955
|
+
}, oy = _t, pi = J, sy = Qr, mi = Q, Yo = si, he = K, zr = He, se = oi, cy = Jc, Oa = we, gi = dg, ut = Gg, ve = Qc, uy = du.codeAt, ly = iy, Ee = Be, fy = cr, dy = Rt, Iu = Cm, $u = or, hy = $u.set, Hr = $u.getterFor("URL"), vy = Iu.URLSearchParams, py = Iu.getState, Dt = mi.URL, _a = mi.TypeError, Br = mi.parseInt, my = Math.floor, Jo = Math.pow, fe = he("".charAt), ge = he(/./.exec), Bt = he([].join), gy = he(1 .toString), yy = he([].pop), dt = he([].push), Mn = he("".replace), wy = he([].shift), by = he("".split), Jt = he("".slice), Kr = he("".toLowerCase), Sy = he([].unshift), Iy = "Invalid authority", Fn = "Invalid scheme", Ge = "Invalid host", Xo = "Invalid port", ku = /[a-z]/i, $y = /[\d+-.a-z]/i, Ra = /\d/, ky = /^0x/i, Py = /^[0-7]+$/, Ty = /^\d+$/, Pu = /^[\da-f]+$/i, Ey = /[\0\t\n\r #%/:<>?@[\\\]^|]/, Oy = /[\0\t\n\r #/:<>?@[\\\]^|]/, _y = /^[\u0000-\u0020]+/, Ry = /(^|[^\u0000-\u0020])[\u0000-\u0020]+$/, Cy = /[\t\n\r]/g, ce, jy = function(e) {
|
|
957
956
|
var t = by(e, "."), r, n, a, i, o, c, l;
|
|
958
957
|
if (t.length && t[t.length - 1] === "" && t.length--, r = t.length, r > 4) return e;
|
|
959
958
|
for (n = [], a = 0; a < r; a++) {
|
|
960
959
|
if (i = t[a], i === "") return e;
|
|
961
|
-
if (o = 10, i.length > 1 &&
|
|
960
|
+
if (o = 10, i.length > 1 && fe(i, 0) === "0" && (o = ge(ky, i) ? 16 : 8, i = Jt(i, o === 8 ? 1 : 2)), i === "")
|
|
962
961
|
c = 0;
|
|
963
962
|
else {
|
|
964
|
-
if (!
|
|
963
|
+
if (!ge(o === 10 ? Ty : o === 8 ? Py : Pu, i)) return e;
|
|
965
964
|
c = Br(i, o);
|
|
966
965
|
}
|
|
967
|
-
|
|
966
|
+
dt(n, c);
|
|
968
967
|
}
|
|
969
968
|
for (a = 0; a < r; a++)
|
|
970
969
|
if (c = n[a], a === r - 1) {
|
|
@@ -975,10 +974,10 @@ var Cg = !gu || Pg(function() {
|
|
|
975
974
|
return l;
|
|
976
975
|
}, Ay = function(e) {
|
|
977
976
|
var t = [0, 0, 0, 0, 0, 0, 0, 0], r = 0, n = null, a = 0, i, o, c, l, f, u, s, d = function() {
|
|
978
|
-
return
|
|
977
|
+
return fe(e, a);
|
|
979
978
|
};
|
|
980
979
|
if (d() === ":") {
|
|
981
|
-
if (
|
|
980
|
+
if (fe(e, 1) !== ":") return;
|
|
982
981
|
a += 2, r++, n = r;
|
|
983
982
|
}
|
|
984
983
|
for (; d(); ) {
|
|
@@ -988,7 +987,7 @@ var Cg = !gu || Pg(function() {
|
|
|
988
987
|
a++, r++, n = r;
|
|
989
988
|
continue;
|
|
990
989
|
}
|
|
991
|
-
for (i = o = 0; o < 4 &&
|
|
990
|
+
for (i = o = 0; o < 4 && ge(Pu, d()); )
|
|
992
991
|
i = i * 16 + Br(d(), 16), a++, o++;
|
|
993
992
|
if (d() === ".") {
|
|
994
993
|
if (o === 0 || (a -= o, r > 6)) return;
|
|
@@ -996,8 +995,8 @@ var Cg = !gu || Pg(function() {
|
|
|
996
995
|
if (l = null, c > 0)
|
|
997
996
|
if (d() === "." && c < 4) a++;
|
|
998
997
|
else return;
|
|
999
|
-
if (!
|
|
1000
|
-
for (;
|
|
998
|
+
if (!ge(Ra, d())) return;
|
|
999
|
+
for (; ge(Ra, d()); ) {
|
|
1001
1000
|
if (f = Br(d(), 10), l === null) l = f;
|
|
1002
1001
|
else {
|
|
1003
1002
|
if (l === 0) return;
|
|
@@ -1024,12 +1023,12 @@ var Cg = !gu || Pg(function() {
|
|
|
1024
1023
|
for (var t = null, r = 1, n = null, a = 0, i = 0; i < 8; i++)
|
|
1025
1024
|
e[i] !== 0 ? (a > r && (t = n, r = a), n = null, a = 0) : (n === null && (n = i), ++a);
|
|
1026
1025
|
return a > r && (t = n, r = a), t;
|
|
1027
|
-
},
|
|
1026
|
+
}, Mt = function(e) {
|
|
1028
1027
|
var t, r, n, a;
|
|
1029
1028
|
if (typeof e == "number") {
|
|
1030
1029
|
for (t = [], r = 0; r < 4; r++)
|
|
1031
1030
|
Sy(t, e % 256), e = my(e / 256);
|
|
1032
|
-
return
|
|
1031
|
+
return Bt(t, ".");
|
|
1033
1032
|
} else if (typeof e == "object") {
|
|
1034
1033
|
for (t = "", n = Ly(e), r = 0; r < 8; r++)
|
|
1035
1034
|
a && e[r] === 0 || (a && (a = !1), n === r ? (t += r ? ":" : "::", a = !0) : (t += gy(e[r], 16), r < 7 && (t += ":")));
|
|
@@ -1058,7 +1057,7 @@ var Cg = !gu || Pg(function() {
|
|
|
1058
1057
|
"]": 1,
|
|
1059
1058
|
"^": 1,
|
|
1060
1059
|
"|": 1
|
|
1061
|
-
}),
|
|
1060
|
+
}), Ae = function(e, t) {
|
|
1062
1061
|
var r = uy(e, 0);
|
|
1063
1062
|
return r > 32 && r < 127 && !Oa(t, e) ? e : encodeURIComponent(e);
|
|
1064
1063
|
}, br = {
|
|
@@ -1068,18 +1067,18 @@ var Cg = !gu || Pg(function() {
|
|
|
1068
1067
|
https: 443,
|
|
1069
1068
|
ws: 80,
|
|
1070
1069
|
wss: 443
|
|
1071
|
-
},
|
|
1070
|
+
}, Kt = function(e, t) {
|
|
1072
1071
|
var r;
|
|
1073
|
-
return e.length === 2 &&
|
|
1072
|
+
return e.length === 2 && ge(ku, fe(e, 0)) && ((r = fe(e, 1)) === ":" || !t && r === "|");
|
|
1074
1073
|
}, qo = function(e) {
|
|
1075
1074
|
var t;
|
|
1076
|
-
return e.length > 1 &&
|
|
1075
|
+
return e.length > 1 && Kt(Jt(e, 0, 2)) && (e.length === 2 || (t = fe(e, 2)) === "/" || t === "\\" || t === "?" || t === "#");
|
|
1077
1076
|
}, xy = function(e) {
|
|
1078
1077
|
return e === "." || Kr(e) === "%2e";
|
|
1079
1078
|
}, Uy = function(e) {
|
|
1080
1079
|
return e = Kr(e), e === ".." || e === "%2e." || e === ".%2e" || e === "%2e%2e";
|
|
1081
|
-
}, Hn = {}, Qo = {}, Bn = {}, es = {}, ts = {}, Kn = {}, rs = {}, ns = {}, Sr = {}, Ir = {}, Gn = {}, Wn = {}, Vn = {}, Zn = {}, as = {}, Yn = {},
|
|
1082
|
-
var n =
|
|
1080
|
+
}, Hn = {}, Qo = {}, Bn = {}, es = {}, ts = {}, Kn = {}, rs = {}, ns = {}, Sr = {}, Ir = {}, Gn = {}, Wn = {}, Vn = {}, Zn = {}, as = {}, Yn = {}, lt = {}, Se = {}, is = {}, We = {}, Te = {}, yi = function(e, t, r) {
|
|
1081
|
+
var n = Ee(e), a, i, o;
|
|
1083
1082
|
if (t) {
|
|
1084
1083
|
if (i = this.parse(n), i) throw new _a(i);
|
|
1085
1084
|
this.searchParams = null;
|
|
@@ -1094,10 +1093,10 @@ yi.prototype = {
|
|
|
1094
1093
|
// eslint-disable-next-line max-statements -- TODO
|
|
1095
1094
|
parse: function(e, t, r) {
|
|
1096
1095
|
var n = this, a = t || Hn, i = 0, o = "", c = !1, l = !1, f = !1, u, s, d, h;
|
|
1097
|
-
for (e =
|
|
1096
|
+
for (e = Ee(e), t || (n.scheme = "", n.username = "", n.password = "", n.host = null, n.port = null, n.path = [], n.query = null, n.fragment = null, n.cannotBeABaseURL = !1, e = Mn(e, _y, ""), e = Mn(e, Ry, "$1")), e = Mn(e, Cy, ""), u = ut(e); i <= u.length; ) {
|
|
1098
1097
|
switch (s = u[i], a) {
|
|
1099
1098
|
case Hn:
|
|
1100
|
-
if (s &&
|
|
1099
|
+
if (s && ge(ku, s))
|
|
1101
1100
|
o += Kr(s), a = Qo;
|
|
1102
1101
|
else {
|
|
1103
1102
|
if (t)
|
|
@@ -1107,7 +1106,7 @@ yi.prototype = {
|
|
|
1107
1106
|
}
|
|
1108
1107
|
break;
|
|
1109
1108
|
case Qo:
|
|
1110
|
-
if (s && (
|
|
1109
|
+
if (s && (ge($y, s) || s === "+" || s === "-" || s === "."))
|
|
1111
1110
|
o += Kr(s);
|
|
1112
1111
|
else if (s === ":") {
|
|
1113
1112
|
if (t && (n.isSpecial() !== Oa(br, o) || o === "file" && (n.includesCredentials() || n.port !== null) || n.scheme === "file" && !n.host)) return;
|
|
@@ -1115,7 +1114,7 @@ yi.prototype = {
|
|
|
1115
1114
|
n.isSpecial() && br[n.scheme] === n.port && (n.port = null);
|
|
1116
1115
|
return;
|
|
1117
1116
|
}
|
|
1118
|
-
o = "", n.scheme === "file" ? a = Zn : n.isSpecial() && r && r.scheme === n.scheme ? a = es : n.isSpecial() ? a = ns : u[i + 1] === "/" ? (a = ts, i++) : (n.cannotBeABaseURL = !0,
|
|
1117
|
+
o = "", n.scheme === "file" ? a = Zn : n.isSpecial() && r && r.scheme === n.scheme ? a = es : n.isSpecial() ? a = ns : u[i + 1] === "/" ? (a = ts, i++) : (n.cannotBeABaseURL = !0, dt(n.path, ""), a = is);
|
|
1119
1118
|
} else {
|
|
1120
1119
|
if (t)
|
|
1121
1120
|
return Fn;
|
|
@@ -1126,7 +1125,7 @@ yi.prototype = {
|
|
|
1126
1125
|
case Bn:
|
|
1127
1126
|
if (!r || r.cannotBeABaseURL && s !== "#") return Fn;
|
|
1128
1127
|
if (r.cannotBeABaseURL && s === "#") {
|
|
1129
|
-
n.scheme = r.scheme, n.path =
|
|
1128
|
+
n.scheme = r.scheme, n.path = ve(r.path), n.query = r.query, n.fragment = "", n.cannotBeABaseURL = !0, a = Te;
|
|
1130
1129
|
break;
|
|
1131
1130
|
}
|
|
1132
1131
|
a = r.scheme === "file" ? Zn : Kn;
|
|
@@ -1144,20 +1143,20 @@ yi.prototype = {
|
|
|
1144
1143
|
a = Ir;
|
|
1145
1144
|
break;
|
|
1146
1145
|
} else {
|
|
1147
|
-
a =
|
|
1146
|
+
a = Se;
|
|
1148
1147
|
continue;
|
|
1149
1148
|
}
|
|
1150
1149
|
case Kn:
|
|
1151
|
-
if (n.scheme = r.scheme, s ===
|
|
1152
|
-
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path =
|
|
1150
|
+
if (n.scheme = r.scheme, s === ce)
|
|
1151
|
+
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path = ve(r.path), n.query = r.query;
|
|
1153
1152
|
else if (s === "/" || s === "\\" && n.isSpecial())
|
|
1154
1153
|
a = rs;
|
|
1155
1154
|
else if (s === "?")
|
|
1156
|
-
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path =
|
|
1155
|
+
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path = ve(r.path), n.query = "", a = We;
|
|
1157
1156
|
else if (s === "#")
|
|
1158
|
-
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path =
|
|
1157
|
+
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path = ve(r.path), n.query = r.query, n.fragment = "", a = Te;
|
|
1159
1158
|
else {
|
|
1160
|
-
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path =
|
|
1159
|
+
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, n.path = ve(r.path), n.path.length--, a = Se;
|
|
1161
1160
|
continue;
|
|
1162
1161
|
}
|
|
1163
1162
|
break;
|
|
@@ -1167,12 +1166,12 @@ yi.prototype = {
|
|
|
1167
1166
|
else if (s === "/")
|
|
1168
1167
|
a = Ir;
|
|
1169
1168
|
else {
|
|
1170
|
-
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, a =
|
|
1169
|
+
n.username = r.username, n.password = r.password, n.host = r.host, n.port = r.port, a = Se;
|
|
1171
1170
|
continue;
|
|
1172
1171
|
}
|
|
1173
1172
|
break;
|
|
1174
1173
|
case ns:
|
|
1175
|
-
if (a = Sr, s !== "/" ||
|
|
1174
|
+
if (a = Sr, s !== "/" || fe(o, i + 1) !== "/") continue;
|
|
1176
1175
|
i++;
|
|
1177
1176
|
break;
|
|
1178
1177
|
case Sr:
|
|
@@ -1183,20 +1182,20 @@ yi.prototype = {
|
|
|
1183
1182
|
break;
|
|
1184
1183
|
case Ir:
|
|
1185
1184
|
if (s === "@") {
|
|
1186
|
-
c && (o = "%40" + o), c = !0, d =
|
|
1185
|
+
c && (o = "%40" + o), c = !0, d = ut(o);
|
|
1187
1186
|
for (var m = 0; m < d.length; m++) {
|
|
1188
1187
|
var S = d[m];
|
|
1189
1188
|
if (S === ":" && !f) {
|
|
1190
1189
|
f = !0;
|
|
1191
1190
|
continue;
|
|
1192
1191
|
}
|
|
1193
|
-
var g =
|
|
1192
|
+
var g = Ae(S, zn);
|
|
1194
1193
|
f ? n.password += g : n.username += g;
|
|
1195
1194
|
}
|
|
1196
1195
|
o = "";
|
|
1197
|
-
} else if (s ===
|
|
1196
|
+
} else if (s === ce || s === "/" || s === "?" || s === "#" || s === "\\" && n.isSpecial()) {
|
|
1198
1197
|
if (c && o === "") return Iy;
|
|
1199
|
-
i -=
|
|
1198
|
+
i -= ut(o).length + 1, o = "", a = Gn;
|
|
1200
1199
|
} else o += s;
|
|
1201
1200
|
break;
|
|
1202
1201
|
case Gn:
|
|
@@ -1205,29 +1204,29 @@ yi.prototype = {
|
|
|
1205
1204
|
a = Yn;
|
|
1206
1205
|
continue;
|
|
1207
1206
|
} else if (s === ":" && !l) {
|
|
1208
|
-
if (o === "") return
|
|
1207
|
+
if (o === "") return Ge;
|
|
1209
1208
|
if (h = n.parseHost(o), h) return h;
|
|
1210
1209
|
if (o = "", a = Vn, t === Wn) return;
|
|
1211
|
-
} else if (s ===
|
|
1212
|
-
if (n.isSpecial() && o === "") return
|
|
1210
|
+
} else if (s === ce || s === "/" || s === "?" || s === "#" || s === "\\" && n.isSpecial()) {
|
|
1211
|
+
if (n.isSpecial() && o === "") return Ge;
|
|
1213
1212
|
if (t && o === "" && (n.includesCredentials() || n.port !== null)) return;
|
|
1214
1213
|
if (h = n.parseHost(o), h) return h;
|
|
1215
|
-
if (o = "", a =
|
|
1214
|
+
if (o = "", a = lt, t) return;
|
|
1216
1215
|
continue;
|
|
1217
1216
|
} else
|
|
1218
1217
|
s === "[" ? l = !0 : s === "]" && (l = !1), o += s;
|
|
1219
1218
|
break;
|
|
1220
1219
|
case Vn:
|
|
1221
|
-
if (
|
|
1220
|
+
if (ge(Ra, s))
|
|
1222
1221
|
o += s;
|
|
1223
|
-
else if (s ===
|
|
1222
|
+
else if (s === ce || s === "/" || s === "?" || s === "#" || s === "\\" && n.isSpecial() || t) {
|
|
1224
1223
|
if (o !== "") {
|
|
1225
1224
|
var $ = Br(o, 10);
|
|
1226
1225
|
if ($ > 65535) return Xo;
|
|
1227
1226
|
n.port = n.isSpecial() && $ === br[n.scheme] ? null : $, o = "";
|
|
1228
1227
|
}
|
|
1229
1228
|
if (t) return;
|
|
1230
|
-
a =
|
|
1229
|
+
a = lt;
|
|
1231
1230
|
continue;
|
|
1232
1231
|
} else return Xo;
|
|
1233
1232
|
break;
|
|
@@ -1235,21 +1234,21 @@ yi.prototype = {
|
|
|
1235
1234
|
if (n.scheme = "file", s === "/" || s === "\\") a = as;
|
|
1236
1235
|
else if (r && r.scheme === "file")
|
|
1237
1236
|
switch (s) {
|
|
1238
|
-
case
|
|
1239
|
-
n.host = r.host, n.path =
|
|
1237
|
+
case ce:
|
|
1238
|
+
n.host = r.host, n.path = ve(r.path), n.query = r.query;
|
|
1240
1239
|
break;
|
|
1241
1240
|
case "?":
|
|
1242
|
-
n.host = r.host, n.path =
|
|
1241
|
+
n.host = r.host, n.path = ve(r.path), n.query = "", a = We;
|
|
1243
1242
|
break;
|
|
1244
1243
|
case "#":
|
|
1245
|
-
n.host = r.host, n.path =
|
|
1244
|
+
n.host = r.host, n.path = ve(r.path), n.query = r.query, n.fragment = "", a = Te;
|
|
1246
1245
|
break;
|
|
1247
1246
|
default:
|
|
1248
|
-
qo(
|
|
1247
|
+
qo(Bt(ve(u, i), "")) || (n.host = r.host, n.path = ve(r.path), n.shortenPath()), a = Se;
|
|
1249
1248
|
continue;
|
|
1250
1249
|
}
|
|
1251
1250
|
else {
|
|
1252
|
-
a =
|
|
1251
|
+
a = Se;
|
|
1253
1252
|
continue;
|
|
1254
1253
|
}
|
|
1255
1254
|
break;
|
|
@@ -1258,50 +1257,50 @@ yi.prototype = {
|
|
|
1258
1257
|
a = Yn;
|
|
1259
1258
|
break;
|
|
1260
1259
|
}
|
|
1261
|
-
r && r.scheme === "file" && !qo(
|
|
1260
|
+
r && r.scheme === "file" && !qo(Bt(ve(u, i), "")) && (Kt(r.path[0], !0) ? dt(n.path, r.path[0]) : n.host = r.host), a = Se;
|
|
1262
1261
|
continue;
|
|
1263
1262
|
case Yn:
|
|
1264
|
-
if (s ===
|
|
1265
|
-
if (!t &&
|
|
1266
|
-
a =
|
|
1263
|
+
if (s === ce || s === "/" || s === "\\" || s === "?" || s === "#") {
|
|
1264
|
+
if (!t && Kt(o))
|
|
1265
|
+
a = Se;
|
|
1267
1266
|
else if (o === "") {
|
|
1268
1267
|
if (n.host = "", t) return;
|
|
1269
|
-
a =
|
|
1268
|
+
a = lt;
|
|
1270
1269
|
} else {
|
|
1271
1270
|
if (h = n.parseHost(o), h) return h;
|
|
1272
1271
|
if (n.host === "localhost" && (n.host = ""), t) return;
|
|
1273
|
-
o = "", a =
|
|
1272
|
+
o = "", a = lt;
|
|
1274
1273
|
}
|
|
1275
1274
|
continue;
|
|
1276
1275
|
} else o += s;
|
|
1277
1276
|
break;
|
|
1278
|
-
case
|
|
1277
|
+
case lt:
|
|
1279
1278
|
if (n.isSpecial()) {
|
|
1280
|
-
if (a =
|
|
1279
|
+
if (a = Se, s !== "/" && s !== "\\") continue;
|
|
1281
1280
|
} else if (!t && s === "?")
|
|
1282
|
-
n.query = "", a =
|
|
1281
|
+
n.query = "", a = We;
|
|
1283
1282
|
else if (!t && s === "#")
|
|
1284
|
-
n.fragment = "", a =
|
|
1285
|
-
else if (s !==
|
|
1283
|
+
n.fragment = "", a = Te;
|
|
1284
|
+
else if (s !== ce && (a = Se, s !== "/"))
|
|
1286
1285
|
continue;
|
|
1287
1286
|
break;
|
|
1288
|
-
case
|
|
1289
|
-
if (s ===
|
|
1290
|
-
if (Uy(o) ? (n.shortenPath(), s !== "/" && !(s === "\\" && n.isSpecial()) &&
|
|
1287
|
+
case Se:
|
|
1288
|
+
if (s === ce || s === "/" || s === "\\" && n.isSpecial() || !t && (s === "?" || s === "#")) {
|
|
1289
|
+
if (Uy(o) ? (n.shortenPath(), s !== "/" && !(s === "\\" && n.isSpecial()) && dt(n.path, "")) : xy(o) ? s !== "/" && !(s === "\\" && n.isSpecial()) && dt(n.path, "") : (n.scheme === "file" && !n.path.length && Kt(o) && (n.host && (n.host = ""), o = fe(o, 0) + ":"), dt(n.path, o)), o = "", n.scheme === "file" && (s === ce || s === "?" || s === "#"))
|
|
1291
1290
|
for (; n.path.length > 1 && n.path[0] === ""; )
|
|
1292
1291
|
wy(n.path);
|
|
1293
|
-
s === "?" ? (n.query = "", a =
|
|
1292
|
+
s === "?" ? (n.query = "", a = We) : s === "#" && (n.fragment = "", a = Te);
|
|
1294
1293
|
} else
|
|
1295
|
-
o +=
|
|
1294
|
+
o += Ae(s, Eu);
|
|
1296
1295
|
break;
|
|
1297
1296
|
case is:
|
|
1298
|
-
s === "?" ? (n.query = "", a =
|
|
1297
|
+
s === "?" ? (n.query = "", a = We) : s === "#" ? (n.fragment = "", a = Te) : s !== ce && (n.path[0] += Ae(s, Lr));
|
|
1299
1298
|
break;
|
|
1300
|
-
case
|
|
1301
|
-
!t && s === "#" ? (n.fragment = "", a =
|
|
1299
|
+
case We:
|
|
1300
|
+
!t && s === "#" ? (n.fragment = "", a = Te) : s !== ce && (s === "'" && n.isSpecial() ? n.query += "%27" : s === "#" ? n.query += "%23" : n.query += Ae(s, Lr));
|
|
1302
1301
|
break;
|
|
1303
|
-
case
|
|
1304
|
-
s !==
|
|
1302
|
+
case Te:
|
|
1303
|
+
s !== ce && (n.fragment += Ae(s, Tu));
|
|
1305
1304
|
break;
|
|
1306
1305
|
}
|
|
1307
1306
|
i++;
|
|
@@ -1310,16 +1309,16 @@ yi.prototype = {
|
|
|
1310
1309
|
// https://url.spec.whatwg.org/#host-parsing
|
|
1311
1310
|
parseHost: function(e) {
|
|
1312
1311
|
var t, r, n;
|
|
1313
|
-
if (
|
|
1314
|
-
if (
|
|
1312
|
+
if (fe(e, 0) === "[") {
|
|
1313
|
+
if (fe(e, e.length - 1) !== "]" || (t = Ay(Jt(e, 1, -1)), !t)) return Ge;
|
|
1315
1314
|
this.host = t;
|
|
1316
1315
|
} else if (this.isSpecial()) {
|
|
1317
|
-
if (e = ly(e),
|
|
1316
|
+
if (e = ly(e), ge(Ey, e) || (t = jy(e), t === null)) return Ge;
|
|
1318
1317
|
this.host = t;
|
|
1319
1318
|
} else {
|
|
1320
|
-
if (
|
|
1321
|
-
for (t = "", r =
|
|
1322
|
-
t +=
|
|
1319
|
+
if (ge(Oy, e)) return Ge;
|
|
1320
|
+
for (t = "", r = ut(e), n = 0; n < r.length; n++)
|
|
1321
|
+
t += Ae(r[n], Lr);
|
|
1323
1322
|
this.host = t;
|
|
1324
1323
|
}
|
|
1325
1324
|
},
|
|
@@ -1338,12 +1337,12 @@ yi.prototype = {
|
|
|
1338
1337
|
// https://url.spec.whatwg.org/#shorten-a-urls-path
|
|
1339
1338
|
shortenPath: function() {
|
|
1340
1339
|
var e = this.path, t = e.length;
|
|
1341
|
-
t && (this.scheme !== "file" || t !== 1 || !
|
|
1340
|
+
t && (this.scheme !== "file" || t !== 1 || !Kt(e[0], !0)) && e.length--;
|
|
1342
1341
|
},
|
|
1343
1342
|
// https://url.spec.whatwg.org/#concept-url-serializer
|
|
1344
1343
|
serialize: function() {
|
|
1345
1344
|
var e = this, t = e.scheme, r = e.username, n = e.password, a = e.host, i = e.port, o = e.path, c = e.query, l = e.fragment, f = t + ":";
|
|
1346
|
-
return a !== null ? (f += "//", e.includesCredentials() && (f += r + (n ? ":" + n : "") + "@"), f +=
|
|
1345
|
+
return a !== null ? (f += "//", e.includesCredentials() && (f += r + (n ? ":" + n : "") + "@"), f += Mt(a), i !== null && (f += ":" + i)) : t === "file" && (f += "//"), f += e.cannotBeABaseURL ? o[0] : o.length ? "/" + Bt(o, "/") : "", c !== null && (f += "?" + c), l !== null && (f += "#" + l), f;
|
|
1347
1346
|
},
|
|
1348
1347
|
// https://url.spec.whatwg.org/#dom-url-href
|
|
1349
1348
|
setHref: function(e) {
|
|
@@ -1355,29 +1354,29 @@ yi.prototype = {
|
|
|
1355
1354
|
getOrigin: function() {
|
|
1356
1355
|
var e = this.scheme, t = this.port;
|
|
1357
1356
|
if (e === "blob") try {
|
|
1358
|
-
return new
|
|
1357
|
+
return new It(e.path[0]).origin;
|
|
1359
1358
|
} catch {
|
|
1360
1359
|
return "null";
|
|
1361
1360
|
}
|
|
1362
|
-
return e === "file" || !this.isSpecial() ? "null" : e + "://" +
|
|
1361
|
+
return e === "file" || !this.isSpecial() ? "null" : e + "://" + Mt(this.host) + (t !== null ? ":" + t : "");
|
|
1363
1362
|
},
|
|
1364
1363
|
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
1365
1364
|
getProtocol: function() {
|
|
1366
1365
|
return this.scheme + ":";
|
|
1367
1366
|
},
|
|
1368
1367
|
setProtocol: function(e) {
|
|
1369
|
-
this.parse(
|
|
1368
|
+
this.parse(Ee(e) + ":", Hn);
|
|
1370
1369
|
},
|
|
1371
1370
|
// https://url.spec.whatwg.org/#dom-url-username
|
|
1372
1371
|
getUsername: function() {
|
|
1373
1372
|
return this.username;
|
|
1374
1373
|
},
|
|
1375
1374
|
setUsername: function(e) {
|
|
1376
|
-
var t =
|
|
1375
|
+
var t = ut(Ee(e));
|
|
1377
1376
|
if (!this.cannotHaveUsernamePasswordPort()) {
|
|
1378
1377
|
this.username = "";
|
|
1379
1378
|
for (var r = 0; r < t.length; r++)
|
|
1380
|
-
this.username +=
|
|
1379
|
+
this.username += Ae(t[r], zn);
|
|
1381
1380
|
}
|
|
1382
1381
|
},
|
|
1383
1382
|
// https://url.spec.whatwg.org/#dom-url-password
|
|
@@ -1385,17 +1384,17 @@ yi.prototype = {
|
|
|
1385
1384
|
return this.password;
|
|
1386
1385
|
},
|
|
1387
1386
|
setPassword: function(e) {
|
|
1388
|
-
var t =
|
|
1387
|
+
var t = ut(Ee(e));
|
|
1389
1388
|
if (!this.cannotHaveUsernamePasswordPort()) {
|
|
1390
1389
|
this.password = "";
|
|
1391
1390
|
for (var r = 0; r < t.length; r++)
|
|
1392
|
-
this.password +=
|
|
1391
|
+
this.password += Ae(t[r], zn);
|
|
1393
1392
|
}
|
|
1394
1393
|
},
|
|
1395
1394
|
// https://url.spec.whatwg.org/#dom-url-host
|
|
1396
1395
|
getHost: function() {
|
|
1397
1396
|
var e = this.host, t = this.port;
|
|
1398
|
-
return e === null ? "" : t === null ?
|
|
1397
|
+
return e === null ? "" : t === null ? Mt(e) : Mt(e) + ":" + t;
|
|
1399
1398
|
},
|
|
1400
1399
|
setHost: function(e) {
|
|
1401
1400
|
this.cannotBeABaseURL || this.parse(e, Gn);
|
|
@@ -1403,7 +1402,7 @@ yi.prototype = {
|
|
|
1403
1402
|
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
1404
1403
|
getHostname: function() {
|
|
1405
1404
|
var e = this.host;
|
|
1406
|
-
return e === null ? "" :
|
|
1405
|
+
return e === null ? "" : Mt(e);
|
|
1407
1406
|
},
|
|
1408
1407
|
setHostname: function(e) {
|
|
1409
1408
|
this.cannotBeABaseURL || this.parse(e, Wn);
|
|
@@ -1411,18 +1410,18 @@ yi.prototype = {
|
|
|
1411
1410
|
// https://url.spec.whatwg.org/#dom-url-port
|
|
1412
1411
|
getPort: function() {
|
|
1413
1412
|
var e = this.port;
|
|
1414
|
-
return e === null ? "" :
|
|
1413
|
+
return e === null ? "" : Ee(e);
|
|
1415
1414
|
},
|
|
1416
1415
|
setPort: function(e) {
|
|
1417
|
-
this.cannotHaveUsernamePasswordPort() || (e =
|
|
1416
|
+
this.cannotHaveUsernamePasswordPort() || (e = Ee(e), e === "" ? this.port = null : this.parse(e, Vn));
|
|
1418
1417
|
},
|
|
1419
1418
|
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
1420
1419
|
getPathname: function() {
|
|
1421
1420
|
var e = this.path;
|
|
1422
|
-
return this.cannotBeABaseURL ? e[0] : e.length ? "/" +
|
|
1421
|
+
return this.cannotBeABaseURL ? e[0] : e.length ? "/" + Bt(e, "/") : "";
|
|
1423
1422
|
},
|
|
1424
1423
|
setPathname: function(e) {
|
|
1425
|
-
this.cannotBeABaseURL || (this.path = [], this.parse(e,
|
|
1424
|
+
this.cannotBeABaseURL || (this.path = [], this.parse(e, lt));
|
|
1426
1425
|
},
|
|
1427
1426
|
// https://url.spec.whatwg.org/#dom-url-search
|
|
1428
1427
|
getSearch: function() {
|
|
@@ -1430,7 +1429,7 @@ yi.prototype = {
|
|
|
1430
1429
|
return e ? "?" + e : "";
|
|
1431
1430
|
},
|
|
1432
1431
|
setSearch: function(e) {
|
|
1433
|
-
e =
|
|
1432
|
+
e = Ee(e), e === "" ? this.query = null : (fe(e, 0) === "?" && (e = Jt(e, 1)), this.query = "", this.parse(e, We)), this.searchParams.update();
|
|
1434
1433
|
},
|
|
1435
1434
|
// https://url.spec.whatwg.org/#dom-url-searchparams
|
|
1436
1435
|
getSearchParams: function() {
|
|
@@ -1442,20 +1441,20 @@ yi.prototype = {
|
|
|
1442
1441
|
return e ? "#" + e : "";
|
|
1443
1442
|
},
|
|
1444
1443
|
setHash: function(e) {
|
|
1445
|
-
if (e =
|
|
1444
|
+
if (e = Ee(e), e === "") {
|
|
1446
1445
|
this.fragment = null;
|
|
1447
1446
|
return;
|
|
1448
1447
|
}
|
|
1449
|
-
|
|
1448
|
+
fe(e, 0) === "#" && (e = Jt(e, 1)), this.fragment = "", this.parse(e, Te);
|
|
1450
1449
|
},
|
|
1451
1450
|
update: function() {
|
|
1452
1451
|
this.query = this.searchParams.serialize() || null;
|
|
1453
1452
|
}
|
|
1454
1453
|
};
|
|
1455
|
-
var
|
|
1456
|
-
var r = cy(this,
|
|
1454
|
+
var It = function(t) {
|
|
1455
|
+
var r = cy(this, X), n = dy(arguments.length, 1) > 1 ? arguments[1] : void 0, a = hy(r, new yi(t, !1, n));
|
|
1457
1456
|
pi || (r.href = a.serialize(), r.origin = a.getOrigin(), r.protocol = a.getProtocol(), r.username = a.getUsername(), r.password = a.getPassword(), r.host = a.getHost(), r.hostname = a.getHostname(), r.port = a.getPort(), r.pathname = a.getPathname(), r.search = a.getSearch(), r.searchParams = a.getSearchParams(), r.hash = a.getHash());
|
|
1458
|
-
},
|
|
1457
|
+
}, X = It.prototype, ue = function(e, t) {
|
|
1459
1458
|
return {
|
|
1460
1459
|
get: function() {
|
|
1461
1460
|
return Hr(this)[e]();
|
|
@@ -1467,22 +1466,22 @@ var bt = function(t) {
|
|
|
1467
1466
|
enumerable: !0
|
|
1468
1467
|
};
|
|
1469
1468
|
};
|
|
1470
|
-
pi && (
|
|
1471
|
-
zr(
|
|
1469
|
+
pi && (se(X, "href", ue("serialize", "setHref")), se(X, "origin", ue("getOrigin")), se(X, "protocol", ue("getProtocol", "setProtocol")), se(X, "username", ue("getUsername", "setUsername")), se(X, "password", ue("getPassword", "setPassword")), se(X, "host", ue("getHost", "setHost")), se(X, "hostname", ue("getHostname", "setHostname")), se(X, "port", ue("getPort", "setPort")), se(X, "pathname", ue("getPathname", "setPathname")), se(X, "search", ue("getSearch", "setSearch")), se(X, "searchParams", ue("getSearchParams")), se(X, "hash", ue("getHash", "setHash")));
|
|
1470
|
+
zr(X, "toJSON", function() {
|
|
1472
1471
|
return Hr(this).serialize();
|
|
1473
1472
|
}, { enumerable: !0 });
|
|
1474
|
-
zr(
|
|
1473
|
+
zr(X, "toString", function() {
|
|
1475
1474
|
return Hr(this).serialize();
|
|
1476
1475
|
}, { enumerable: !0 });
|
|
1477
|
-
if (
|
|
1478
|
-
var os =
|
|
1479
|
-
os && zr(
|
|
1476
|
+
if (Dt) {
|
|
1477
|
+
var os = Dt.createObjectURL, ss = Dt.revokeObjectURL;
|
|
1478
|
+
os && zr(It, "createObjectURL", Yo(os, Dt)), ss && zr(It, "revokeObjectURL", Yo(ss, Dt));
|
|
1480
1479
|
}
|
|
1481
|
-
fy(
|
|
1480
|
+
fy(It, "URL");
|
|
1482
1481
|
oy({ global: !0, constructor: !0, forced: !sy, sham: !pi }, {
|
|
1483
|
-
URL:
|
|
1482
|
+
URL: It
|
|
1484
1483
|
});
|
|
1485
|
-
var Ny =
|
|
1484
|
+
var Ny = _t, Dy = Ot, Ou = ne, My = Rt, cs = Be, Fy = Qr, wi = Dy("URL"), zy = Fy && Ou(function() {
|
|
1486
1485
|
wi.canParse();
|
|
1487
1486
|
}), Hy = Ou(function() {
|
|
1488
1487
|
return wi.canParse.length !== 1;
|
|
@@ -1497,7 +1496,7 @@ Ny({ target: "URL", stat: !0, forced: !zy || Hy }, {
|
|
|
1497
1496
|
}
|
|
1498
1497
|
}
|
|
1499
1498
|
});
|
|
1500
|
-
var By =
|
|
1499
|
+
var By = _t, Ky = Ot, Gy = Rt, us = Be, Wy = Qr, Vy = Ky("URL");
|
|
1501
1500
|
By({ target: "URL", stat: !0, forced: !Wy }, {
|
|
1502
1501
|
parse: function(t) {
|
|
1503
1502
|
var r = Gy(arguments.length, 1), n = us(t), a = r < 2 || arguments[1] === void 0 ? void 0 : us(arguments[1]);
|
|
@@ -1508,7 +1507,7 @@ By({ target: "URL", stat: !0, forced: !Wy }, {
|
|
|
1508
1507
|
}
|
|
1509
1508
|
}
|
|
1510
1509
|
});
|
|
1511
|
-
var Zy =
|
|
1510
|
+
var Zy = _t, Yy = Pe;
|
|
1512
1511
|
Zy({ target: "URL", proto: !0, enumerable: !0 }, {
|
|
1513
1512
|
toJSON: function() {
|
|
1514
1513
|
return Yy(URL.prototype.toString, this);
|
|
@@ -1548,7 +1547,7 @@ var Xy = {
|
|
|
1548
1547
|
TextTrackCueList: 0,
|
|
1549
1548
|
TextTrackList: 0,
|
|
1550
1549
|
TouchList: 0
|
|
1551
|
-
}, qy = Wa, Jn = qy("span").classList, ls = Jn && Jn.constructor && Jn.constructor.prototype, Qy = ls === Object.prototype ? void 0 : ls, fs =
|
|
1550
|
+
}, qy = Wa, Jn = qy("span").classList, ls = Jn && Jn.constructor && Jn.constructor.prototype, Qy = ls === Object.prototype ? void 0 : ls, fs = Q, _u = Xy, ew = Qy, Gt = fp, ds = qr, tw = cr, rw = de, Xn = rw("iterator"), qn = Gt.values, Ru = function(e, t) {
|
|
1552
1551
|
if (e) {
|
|
1553
1552
|
if (e[Xn] !== qn) try {
|
|
1554
1553
|
ds(e, Xn, qn);
|
|
@@ -1556,11 +1555,11 @@ var Xy = {
|
|
|
1556
1555
|
e[Xn] = qn;
|
|
1557
1556
|
}
|
|
1558
1557
|
if (tw(e, t, !0), _u[t]) {
|
|
1559
|
-
for (var r in
|
|
1560
|
-
if (e[r] !==
|
|
1561
|
-
ds(e, r,
|
|
1558
|
+
for (var r in Gt)
|
|
1559
|
+
if (e[r] !== Gt[r]) try {
|
|
1560
|
+
ds(e, r, Gt[r]);
|
|
1562
1561
|
} catch {
|
|
1563
|
-
e[r] =
|
|
1562
|
+
e[r] = Gt[r];
|
|
1564
1563
|
}
|
|
1565
1564
|
}
|
|
1566
1565
|
}
|
|
@@ -1568,7 +1567,7 @@ var Xy = {
|
|
|
1568
1567
|
for (var Qn in _u)
|
|
1569
1568
|
Ru(fs[Qn] && fs[Qn].prototype, Qn);
|
|
1570
1569
|
Ru(ew, "DOMTokenList");
|
|
1571
|
-
function
|
|
1570
|
+
function Fe(e, t) {
|
|
1572
1571
|
const r = new CustomEvent(e, {
|
|
1573
1572
|
detail: t,
|
|
1574
1573
|
bubbles: !0,
|
|
@@ -1576,7 +1575,7 @@ function De(e, t) {
|
|
|
1576
1575
|
});
|
|
1577
1576
|
dispatchEvent(r);
|
|
1578
1577
|
}
|
|
1579
|
-
function
|
|
1578
|
+
function Ie(e, t) {
|
|
1580
1579
|
var r = {};
|
|
1581
1580
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
1582
1581
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
@@ -1585,14 +1584,14 @@ function Se(e, t) {
|
|
|
1585
1584
|
}
|
|
1586
1585
|
return r;
|
|
1587
1586
|
}
|
|
1588
|
-
var
|
|
1587
|
+
var Ze = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1589
1588
|
function bi(e) {
|
|
1590
1589
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1591
1590
|
}
|
|
1592
1591
|
function Si(e, t) {
|
|
1593
1592
|
return e(t = { exports: {} }, t.exports), t.exports;
|
|
1594
1593
|
}
|
|
1595
|
-
var
|
|
1594
|
+
var Ve = Si(function(e, t) {
|
|
1596
1595
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
1597
1596
|
var r = function() {
|
|
1598
1597
|
function n() {
|
|
@@ -1622,32 +1621,32 @@ var Ge = Si(function(e, t) {
|
|
|
1622
1621
|
return r.getInstance();
|
|
1623
1622
|
};
|
|
1624
1623
|
});
|
|
1625
|
-
bi(
|
|
1624
|
+
bi(Ve);
|
|
1626
1625
|
var nw = bi(Si(function(e, t) {
|
|
1627
|
-
var r =
|
|
1626
|
+
var r = Ze && Ze.__awaiter || function(u, s, d, h) {
|
|
1628
1627
|
return new (d || (d = Promise))(function(m, S) {
|
|
1629
1628
|
function g(b) {
|
|
1630
1629
|
try {
|
|
1631
|
-
|
|
1630
|
+
P(h.next(b));
|
|
1632
1631
|
} catch (v) {
|
|
1633
1632
|
S(v);
|
|
1634
1633
|
}
|
|
1635
1634
|
}
|
|
1636
1635
|
function $(b) {
|
|
1637
1636
|
try {
|
|
1638
|
-
|
|
1637
|
+
P(h.throw(b));
|
|
1639
1638
|
} catch (v) {
|
|
1640
1639
|
S(v);
|
|
1641
1640
|
}
|
|
1642
1641
|
}
|
|
1643
|
-
function
|
|
1642
|
+
function P(b) {
|
|
1644
1643
|
b.done ? m(b.value) : new d(function(v) {
|
|
1645
1644
|
v(b.value);
|
|
1646
1645
|
}).then(g, $);
|
|
1647
1646
|
}
|
|
1648
|
-
|
|
1647
|
+
P((h = h.apply(u, s || [])).next());
|
|
1649
1648
|
});
|
|
1650
|
-
}, n =
|
|
1649
|
+
}, n = Ze && Ze.__generator || function(u, s) {
|
|
1651
1650
|
var d, h, m, S, g = { label: 0, sent: function() {
|
|
1652
1651
|
if (1 & m[0]) throw m[1];
|
|
1653
1652
|
return m[1];
|
|
@@ -1655,7 +1654,7 @@ var nw = bi(Si(function(e, t) {
|
|
|
1655
1654
|
return S = { next: $(0), throw: $(1), return: $(2) }, typeof Symbol == "function" && (S[Symbol.iterator] = function() {
|
|
1656
1655
|
return this;
|
|
1657
1656
|
}), S;
|
|
1658
|
-
function $(
|
|
1657
|
+
function $(P) {
|
|
1659
1658
|
return function(b) {
|
|
1660
1659
|
return function(v) {
|
|
1661
1660
|
if (d) throw new TypeError("Generator is already executing.");
|
|
@@ -1702,10 +1701,10 @@ var nw = bi(Si(function(e, t) {
|
|
|
1702
1701
|
}
|
|
1703
1702
|
if (5 & v[0]) throw v[1];
|
|
1704
1703
|
return { value: v[0] ? v[1] : void 0, done: !0 };
|
|
1705
|
-
}([
|
|
1704
|
+
}([P, b]);
|
|
1706
1705
|
};
|
|
1707
1706
|
}
|
|
1708
|
-
}, a =
|
|
1707
|
+
}, a = Ze;
|
|
1709
1708
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
1710
1709
|
var i = "browser-tabs-lock-key", o = { key: function(u) {
|
|
1711
1710
|
return r(a, void 0, void 0, function() {
|
|
@@ -1764,7 +1763,7 @@ var nw = bi(Si(function(e, t) {
|
|
|
1764
1763
|
}
|
|
1765
1764
|
return u.prototype.acquireLock = function(s, d) {
|
|
1766
1765
|
return d === void 0 && (d = 5e3), r(this, void 0, void 0, function() {
|
|
1767
|
-
var h, m, S, g, $,
|
|
1766
|
+
var h, m, S, g, $, P, b;
|
|
1768
1767
|
return n(this, function(v) {
|
|
1769
1768
|
switch (v.label) {
|
|
1770
1769
|
case 0:
|
|
@@ -1776,7 +1775,7 @@ var nw = bi(Si(function(e, t) {
|
|
|
1776
1775
|
case 3:
|
|
1777
1776
|
return v.sent(), g.setItemSync(S, JSON.stringify({ id: this.id, iat: h, timeoutKey: $, timeAcquired: Date.now(), timeRefreshed: Date.now() })), [4, c(30)];
|
|
1778
1777
|
case 4:
|
|
1779
|
-
return v.sent(), (
|
|
1778
|
+
return v.sent(), (P = g.getItemSync(S)) !== null && (b = JSON.parse(P)).id === this.id && b.iat === h ? (this.acquiredIatSet.add(h), this.refreshLockWhileAcquired(S, h), [2, !0]) : [3, 7];
|
|
1780
1779
|
case 5:
|
|
1781
1780
|
return u.lockCorrector(this.storageHandler === void 0 ? o : this.storageHandler), [4, this.waitForSomethingToChange(m)];
|
|
1782
1781
|
case 6:
|
|
@@ -1795,12 +1794,12 @@ var nw = bi(Si(function(e, t) {
|
|
|
1795
1794
|
return setTimeout(function() {
|
|
1796
1795
|
return r(h, void 0, void 0, function() {
|
|
1797
1796
|
var S, g, $;
|
|
1798
|
-
return n(this, function(
|
|
1799
|
-
switch (
|
|
1797
|
+
return n(this, function(P) {
|
|
1798
|
+
switch (P.label) {
|
|
1800
1799
|
case 0:
|
|
1801
|
-
return [4,
|
|
1800
|
+
return [4, Ve.default().lock(d)];
|
|
1802
1801
|
case 1:
|
|
1803
|
-
return
|
|
1802
|
+
return P.sent(), this.acquiredIatSet.has(d) ? (S = this.storageHandler === void 0 ? o : this.storageHandler, (g = S.getItemSync(s)) === null ? (Ve.default().unlock(d), [2]) : (($ = JSON.parse(g)).timeRefreshed = Date.now(), S.setItemSync(s, JSON.stringify($)), Ve.default().unlock(d), this.refreshLockWhileAcquired(s, d), [2])) : (Ve.default().unlock(d), [2]);
|
|
1804
1803
|
}
|
|
1805
1804
|
});
|
|
1806
1805
|
});
|
|
@@ -1815,14 +1814,14 @@ var nw = bi(Si(function(e, t) {
|
|
|
1815
1814
|
return [4, new Promise(function(h) {
|
|
1816
1815
|
var m = !1, S = Date.now(), g = !1;
|
|
1817
1816
|
function $() {
|
|
1818
|
-
if (g || (window.removeEventListener("storage", $), u.removeFromWaiting($), clearTimeout(
|
|
1817
|
+
if (g || (window.removeEventListener("storage", $), u.removeFromWaiting($), clearTimeout(P), g = !0), !m) {
|
|
1819
1818
|
m = !0;
|
|
1820
1819
|
var b = 50 - (Date.now() - S);
|
|
1821
1820
|
b > 0 ? setTimeout(h, b) : h(null);
|
|
1822
1821
|
}
|
|
1823
1822
|
}
|
|
1824
1823
|
window.addEventListener("storage", $), u.addToWaiting($);
|
|
1825
|
-
var
|
|
1824
|
+
var P = setTimeout($, Math.max(0, s - Date.now()));
|
|
1826
1825
|
})];
|
|
1827
1826
|
case 1:
|
|
1828
1827
|
return d.sent(), [2];
|
|
@@ -1856,9 +1855,9 @@ var nw = bi(Si(function(e, t) {
|
|
|
1856
1855
|
return n(this, function(g) {
|
|
1857
1856
|
switch (g.label) {
|
|
1858
1857
|
case 0:
|
|
1859
|
-
return d = this.storageHandler === void 0 ? o : this.storageHandler, h = i + "-" + s, (m = d.getItemSync(h)) === null ? [2] : (S = JSON.parse(m)).id !== this.id ? [3, 2] : [4,
|
|
1858
|
+
return d = this.storageHandler === void 0 ? o : this.storageHandler, h = i + "-" + s, (m = d.getItemSync(h)) === null ? [2] : (S = JSON.parse(m)).id !== this.id ? [3, 2] : [4, Ve.default().lock(S.iat)];
|
|
1860
1859
|
case 1:
|
|
1861
|
-
g.sent(), this.acquiredIatSet.delete(S.iat), d.removeItemSync(h),
|
|
1860
|
+
g.sent(), this.acquiredIatSet.delete(S.iat), d.removeItemSync(h), Ve.default().unlock(S.iat), u.notifyWaiters(), g.label = 2;
|
|
1862
1861
|
case 2:
|
|
1863
1862
|
return [2];
|
|
1864
1863
|
}
|
|
@@ -1870,8 +1869,8 @@ var nw = bi(Si(function(e, t) {
|
|
|
1870
1869
|
if (g === null) break;
|
|
1871
1870
|
m.push(g), S++;
|
|
1872
1871
|
}
|
|
1873
|
-
for (var $ = !1,
|
|
1874
|
-
var b = m[
|
|
1872
|
+
for (var $ = !1, P = 0; P < m.length; P++) {
|
|
1873
|
+
var b = m[P];
|
|
1875
1874
|
if (b.includes(i)) {
|
|
1876
1875
|
var v = h.getItemSync(b);
|
|
1877
1876
|
if (v !== null) {
|
|
@@ -1886,18 +1885,18 @@ var nw = bi(Si(function(e, t) {
|
|
|
1886
1885
|
t.default = f;
|
|
1887
1886
|
}));
|
|
1888
1887
|
const aw = { timeoutInSeconds: 60 }, Cu = { name: "auth0-spa-js", version: "2.1.3" }, ju = () => Date.now();
|
|
1889
|
-
let
|
|
1888
|
+
let ae = class Ca extends Error {
|
|
1890
1889
|
constructor(t, r) {
|
|
1891
1890
|
super(r), this.error = t, this.error_description = r, Object.setPrototypeOf(this, Ca.prototype);
|
|
1892
1891
|
}
|
|
1893
1892
|
static fromPayload({ error: t, error_description: r }) {
|
|
1894
1893
|
return new Ca(t, r);
|
|
1895
1894
|
}
|
|
1896
|
-
}, iw = class Au extends
|
|
1895
|
+
}, iw = class Au extends ae {
|
|
1897
1896
|
constructor(t, r, n, a = null) {
|
|
1898
1897
|
super(t, r), this.state = n, this.appState = a, Object.setPrototypeOf(this, Au.prototype);
|
|
1899
1898
|
}
|
|
1900
|
-
}, ja = class Lu extends
|
|
1899
|
+
}, ja = class Lu extends ae {
|
|
1901
1900
|
constructor() {
|
|
1902
1901
|
super("timeout", "Timeout"), Object.setPrototypeOf(this, Lu.prototype);
|
|
1903
1902
|
}
|
|
@@ -1905,15 +1904,15 @@ let ne = class Ca extends Error {
|
|
|
1905
1904
|
constructor(t) {
|
|
1906
1905
|
super(), this.popup = t, Object.setPrototypeOf(this, xu.prototype);
|
|
1907
1906
|
}
|
|
1908
|
-
}, sw = class Uu extends
|
|
1907
|
+
}, sw = class Uu extends ae {
|
|
1909
1908
|
constructor(t) {
|
|
1910
1909
|
super("cancelled", "Popup closed"), this.popup = t, Object.setPrototypeOf(this, Uu.prototype);
|
|
1911
1910
|
}
|
|
1912
|
-
}, cw = class Nu extends
|
|
1911
|
+
}, cw = class Nu extends ae {
|
|
1913
1912
|
constructor(t, r, n) {
|
|
1914
1913
|
super(t, r), this.mfa_token = n, Object.setPrototypeOf(this, Nu.prototype);
|
|
1915
1914
|
}
|
|
1916
|
-
}, Du = class Mu extends
|
|
1915
|
+
}, Du = class Mu extends ae {
|
|
1917
1916
|
constructor(t, r) {
|
|
1918
1917
|
super("missing_refresh_token", `Missing Refresh Token (audience: '${hs(t, ["default"])}', scope: '${hs(r)}')`), this.audience = t, this.scope = r, Object.setPrototypeOf(this, Mu.prototype);
|
|
1919
1918
|
}
|
|
@@ -1926,7 +1925,7 @@ const xr = () => window.crypto, ea = () => {
|
|
|
1926
1925
|
let t = "";
|
|
1927
1926
|
return Array.from(xr().getRandomValues(new Uint8Array(43))).forEach((r) => t += e[r % e.length]), t;
|
|
1928
1927
|
}, vs = (e) => btoa(e), Aa = (e) => {
|
|
1929
|
-
var { clientId: t } = e, r =
|
|
1928
|
+
var { clientId: t } = e, r = Ie(e, ["clientId"]);
|
|
1930
1929
|
return new URLSearchParams(((n) => Object.keys(n).filter((a) => n[a] !== void 0).reduce((a, i) => Object.assign(Object.assign({}, a), { [i]: n[i] }), {}))(Object.assign({ client_id: t }, r))).toString();
|
|
1931
1930
|
}, ps = (e) => ((t) => decodeURIComponent(atob(t).split("").map((r) => "%" + ("00" + r.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g, "/").replace(/-/g, "+")), uw = async (e, t) => {
|
|
1932
1931
|
const r = await fetch(e, t);
|
|
@@ -1951,21 +1950,21 @@ const xr = () => window.crypto, ea = () => {
|
|
|
1951
1950
|
var c, l;
|
|
1952
1951
|
}, dw = async (e, t, r, n, a, i, o = 1e4) => a ? fw(e, t, r, n, o, a, i) : lw(e, n, o);
|
|
1953
1952
|
async function hw(e, t) {
|
|
1954
|
-
var { baseUrl: r, timeout: n, audience: a, scope: i, auth0Client: o, useFormData: c } = e, l =
|
|
1953
|
+
var { baseUrl: r, timeout: n, audience: a, scope: i, auth0Client: o, useFormData: c } = e, l = Ie(e, ["baseUrl", "timeout", "audience", "scope", "auth0Client", "useFormData"]);
|
|
1955
1954
|
const f = c ? Aa(l) : JSON.stringify(l);
|
|
1956
1955
|
return await async function(u, s, d, h, m, S, g) {
|
|
1957
|
-
let $,
|
|
1956
|
+
let $, P = null;
|
|
1958
1957
|
for (let C = 0; C < 3; C++) try {
|
|
1959
|
-
$ = await dw(u, d, h, m, S, g, s),
|
|
1958
|
+
$ = await dw(u, d, h, m, S, g, s), P = null;
|
|
1960
1959
|
break;
|
|
1961
|
-
} catch (
|
|
1962
|
-
|
|
1960
|
+
} catch (M) {
|
|
1961
|
+
P = M;
|
|
1963
1962
|
}
|
|
1964
|
-
if (
|
|
1965
|
-
const b = $.json, { error: v, error_description: I } = b, O =
|
|
1963
|
+
if (P) throw P;
|
|
1964
|
+
const b = $.json, { error: v, error_description: I } = b, O = Ie(b, ["error", "error_description"]), { ok: _ } = $;
|
|
1966
1965
|
if (!_) {
|
|
1967
1966
|
const C = I || `HTTP error. Unable to fetch ${u}`;
|
|
1968
|
-
throw v === "mfa_required" ? new cw(v, C, O.mfa_token) : v === "missing_refresh_token" ? new Du(d, h) : new
|
|
1967
|
+
throw v === "mfa_required" ? new cw(v, C, O.mfa_token) : v === "missing_refresh_token" ? new Du(d, h) : new ae(v || "request_error", C);
|
|
1969
1968
|
}
|
|
1970
1969
|
return O;
|
|
1971
1970
|
}(`${r}/oauth/token`, n, a || "default", i, { method: "POST", body: f, headers: { "Content-Type": c ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(o || Cu)) } }, t, c);
|
|
@@ -1974,7 +1973,7 @@ const $r = (...e) => {
|
|
|
1974
1973
|
return (t = e.filter(Boolean).join(" ").trim().split(/\s+/), Array.from(new Set(t))).join(" ");
|
|
1975
1974
|
var t;
|
|
1976
1975
|
};
|
|
1977
|
-
let
|
|
1976
|
+
let Xe = class La {
|
|
1978
1977
|
constructor(t, r = "@@auth0spajs@@", n) {
|
|
1979
1978
|
this.prefix = r, this.suffix = n, this.clientId = t.clientId, this.scope = t.scope, this.audience = t.audience;
|
|
1980
1979
|
}
|
|
@@ -2053,7 +2052,7 @@ let Ye = class La {
|
|
|
2053
2052
|
}
|
|
2054
2053
|
async set(t) {
|
|
2055
2054
|
var r;
|
|
2056
|
-
const n = new
|
|
2055
|
+
const n = new Xe({ clientId: t.client_id, scope: t.scope, audience: t.audience }), a = await this.wrapCacheEntry(t);
|
|
2057
2056
|
await this.cache.set(n.toKey(), a), await ((r = this.keyManifest) === null || r === void 0 ? void 0 : r.add(n.toKey()));
|
|
2058
2057
|
}
|
|
2059
2058
|
async clear(t) {
|
|
@@ -2072,12 +2071,12 @@ let Ye = class La {
|
|
|
2072
2071
|
return this.keyManifest ? (t = await this.keyManifest.get()) === null || t === void 0 ? void 0 : t.keys : this.cache.allKeys ? this.cache.allKeys() : void 0;
|
|
2073
2072
|
}
|
|
2074
2073
|
getIdTokenCacheKey(t) {
|
|
2075
|
-
return new
|
|
2074
|
+
return new Xe({ clientId: t }, "@@auth0spajs@@", "@@user@@").toKey();
|
|
2076
2075
|
}
|
|
2077
2076
|
matchExistingCacheKey(t, r) {
|
|
2078
2077
|
return r.filter((n) => {
|
|
2079
2078
|
var a;
|
|
2080
|
-
const i =
|
|
2079
|
+
const i = Xe.fromKey(n), o = new Set(i.scope && i.scope.split(" ")), c = ((a = t.scope) === null || a === void 0 ? void 0 : a.split(" ")) || [], l = i.scope && c.reduce((f, u) => f && o.has(u), !0);
|
|
2081
2080
|
return i.prefix === "@@auth0spajs@@" && i.clientId === t.clientId && i.audience === t.audience && l;
|
|
2082
2081
|
})[0];
|
|
2083
2082
|
}
|
|
@@ -2095,7 +2094,7 @@ let Ye = class La {
|
|
|
2095
2094
|
this.storage.remove(this.storageKey, { cookieDomain: this.cookieDomain });
|
|
2096
2095
|
}
|
|
2097
2096
|
};
|
|
2098
|
-
const
|
|
2097
|
+
const Ft = (e) => typeof e == "number", gw = ["iss", "aud", "exp", "nbf", "iat", "jti", "azp", "nonce", "auth_time", "at_hash", "c_hash", "acr", "amr", "sub_jwk", "cnf", "sip_from_tag", "sip_date", "sip_callid", "sip_cseq_num", "sip_via_branch", "orig", "dest", "mky", "events", "toe", "txn", "rph", "sid", "vot", "vtm"], yw = (e) => {
|
|
2099
2098
|
if (!e.id_token) throw new Error("ID token is required but missing");
|
|
2100
2099
|
const t = ((i) => {
|
|
2101
2100
|
const o = i.split("."), [c, l, f] = o;
|
|
@@ -2121,16 +2120,16 @@ const Mt = (e) => typeof e == "number", gw = ["iss", "aud", "exp", "nbf", "iat",
|
|
|
2121
2120
|
if (!t.claims.nonce) throw new Error("Nonce (nonce) claim must be a string present in the ID token");
|
|
2122
2121
|
if (t.claims.nonce !== e.nonce) throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`);
|
|
2123
2122
|
}
|
|
2124
|
-
if (e.max_age && !
|
|
2125
|
-
if (t.claims.exp == null || !
|
|
2126
|
-
if (!
|
|
2123
|
+
if (e.max_age && !Ft(t.claims.auth_time)) throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");
|
|
2124
|
+
if (t.claims.exp == null || !Ft(t.claims.exp)) throw new Error("Expiration Time (exp) claim must be a number present in the ID token");
|
|
2125
|
+
if (!Ft(t.claims.iat)) throw new Error("Issued At (iat) claim must be a number present in the ID token");
|
|
2127
2126
|
const r = e.leeway || 60, n = new Date(e.now || Date.now()), a = /* @__PURE__ */ new Date(0);
|
|
2128
2127
|
if (a.setUTCSeconds(t.claims.exp + r), n > a) throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);
|
|
2129
|
-
if (t.claims.nbf != null &&
|
|
2128
|
+
if (t.claims.nbf != null && Ft(t.claims.nbf)) {
|
|
2130
2129
|
const i = /* @__PURE__ */ new Date(0);
|
|
2131
2130
|
if (i.setUTCSeconds(t.claims.nbf - r), n < i) throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${i}`);
|
|
2132
2131
|
}
|
|
2133
|
-
if (t.claims.auth_time != null &&
|
|
2132
|
+
if (t.claims.auth_time != null && Ft(t.claims.auth_time)) {
|
|
2134
2133
|
const i = /* @__PURE__ */ new Date(0);
|
|
2135
2134
|
if (i.setUTCSeconds(parseInt(t.claims.auth_time) + e.max_age + r), n > i) throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`);
|
|
2136
2135
|
}
|
|
@@ -2148,8 +2147,8 @@ const Mt = (e) => typeof e == "number", gw = ["iss", "aud", "exp", "nbf", "iat",
|
|
|
2148
2147
|
}
|
|
2149
2148
|
return t;
|
|
2150
2149
|
};
|
|
2151
|
-
var
|
|
2152
|
-
var r =
|
|
2150
|
+
var qe = Si(function(e, t) {
|
|
2151
|
+
var r = Ze && Ze.__assign || function() {
|
|
2153
2152
|
return r = Object.assign || function(l) {
|
|
2154
2153
|
for (var f, u = 1, s = arguments.length; u < s; u++) for (var d in f = arguments[u]) Object.prototype.hasOwnProperty.call(f, d) && (l[d] = f[d]);
|
|
2155
2154
|
return l;
|
|
@@ -2192,9 +2191,9 @@ var Je = Si(function(e, t) {
|
|
|
2192
2191
|
c(l, "", r(r({}, f), { expires: -1 }));
|
|
2193
2192
|
};
|
|
2194
2193
|
});
|
|
2195
|
-
bi(
|
|
2196
|
-
var ww =
|
|
2197
|
-
const
|
|
2194
|
+
bi(qe), qe.encode, qe.parse, qe.getAll;
|
|
2195
|
+
var ww = qe.get, zu = qe.set, Hu = qe.remove;
|
|
2196
|
+
const ht = { get(e) {
|
|
2198
2197
|
const t = ww(e);
|
|
2199
2198
|
if (t !== void 0) return JSON.parse(t);
|
|
2200
2199
|
}, save(e, t, r) {
|
|
@@ -2204,13 +2203,13 @@ const ft = { get(e) {
|
|
|
2204
2203
|
let r = {};
|
|
2205
2204
|
t != null && t.cookieDomain && (r.domain = t.cookieDomain), Hu(e, r);
|
|
2206
2205
|
} }, bw = { get(e) {
|
|
2207
|
-
return
|
|
2206
|
+
return ht.get(e) || ht.get(`_legacy_${e}`);
|
|
2208
2207
|
}, save(e, t, r) {
|
|
2209
2208
|
let n = {};
|
|
2210
|
-
window.location.protocol === "https:" && (n = { secure: !0 }), r != null && r.daysUntilExpire && (n.expires = r.daysUntilExpire), r != null && r.cookieDomain && (n.domain = r.cookieDomain), zu(`_legacy_${e}`, JSON.stringify(t), n),
|
|
2209
|
+
window.location.protocol === "https:" && (n = { secure: !0 }), r != null && r.daysUntilExpire && (n.expires = r.daysUntilExpire), r != null && r.cookieDomain && (n.domain = r.cookieDomain), zu(`_legacy_${e}`, JSON.stringify(t), n), ht.save(e, t, r);
|
|
2211
2210
|
}, remove(e, t) {
|
|
2212
2211
|
let r = {};
|
|
2213
|
-
t != null && t.cookieDomain && (r.domain = t.cookieDomain), Hu(e, r),
|
|
2212
|
+
t != null && t.cookieDomain && (r.domain = t.cookieDomain), Hu(e, r), ht.remove(e, t), ht.remove(`_legacy_${e}`, t);
|
|
2214
2213
|
} }, Sw = { get(e) {
|
|
2215
2214
|
if (typeof sessionStorage > "u") return;
|
|
2216
2215
|
const t = sessionStorage.getItem(e);
|
|
@@ -2263,7 +2262,7 @@ let kw = class {
|
|
|
2263
2262
|
}
|
|
2264
2263
|
};
|
|
2265
2264
|
const Pw = { memory: () => new Fu().enclosedCache, localstorage: () => new vw() }, ws = (e) => Pw[e], bs = (e) => {
|
|
2266
|
-
const { openUrl: t, onRedirect: r } = e, n =
|
|
2265
|
+
const { openUrl: t, onRedirect: r } = e, n = Ie(e, ["openUrl", "onRedirect"]);
|
|
2267
2266
|
return Object.assign(Object.assign({}, n), { openUrl: t === !1 || t ? t : r });
|
|
2268
2267
|
}, na = new nw();
|
|
2269
2268
|
let Tw = class {
|
|
@@ -2281,7 +2280,7 @@ let Tw = class {
|
|
|
2281
2280
|
if (r = t.cacheLocation || "memory", !ws(r)) throw new Error(`Invalid cache location "${r}"`);
|
|
2282
2281
|
n = ws(r)();
|
|
2283
2282
|
}
|
|
2284
|
-
this.httpTimeoutMs = t.httpTimeoutInSeconds ? 1e3 * t.httpTimeoutInSeconds : 1e4, this.cookieStorage = t.legacySameSiteCookie === !1 ?
|
|
2283
|
+
this.httpTimeoutMs = t.httpTimeoutInSeconds ? 1e3 * t.httpTimeoutInSeconds : 1e4, this.cookieStorage = t.legacySameSiteCookie === !1 ? ht : bw, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((o) => `auth0.${o}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = t.sessionCheckExpiryDays || 1;
|
|
2285
2284
|
const a = t.useCookiesForTransactions ? this.cookieStorage : Sw;
|
|
2286
2285
|
var i;
|
|
2287
2286
|
this.scope = $r("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new mw(a, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || ju, this.cacheManager = new pw(n, n.allKeys ? void 0 : new kw(n, this.options.clientId), this.nowProvider), this.domainUrl = (i = this.options.domain, /^https?:\/\//.test(i) ? i : `https://${i}`), this.tokenIssuer = ((o, c) => o ? o.startsWith("https://") ? o : `https://${o}/` : `${c}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && r === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new $w());
|
|
@@ -2328,12 +2327,12 @@ let Tw = class {
|
|
|
2328
2327
|
}, 1e3 * (c.timeoutInSeconds || 60));
|
|
2329
2328
|
u = function(h) {
|
|
2330
2329
|
if (h.data && h.data.type === "authorization_response") {
|
|
2331
|
-
if (clearTimeout(d), clearInterval(s), window.removeEventListener("message", u, !1), c.popup.close(), h.data.response.error) return f(
|
|
2330
|
+
if (clearTimeout(d), clearInterval(s), window.removeEventListener("message", u, !1), c.popup.close(), h.data.response.error) return f(ae.fromPayload(h.data.response));
|
|
2332
2331
|
l(h.data.response);
|
|
2333
2332
|
}
|
|
2334
2333
|
}, window.addEventListener("message", u);
|
|
2335
2334
|
}))(Object.assign(Object.assign({}, r), { timeoutInSeconds: r.timeoutInSeconds || this.options.authorizeTimeoutInSeconds || 60 }));
|
|
2336
|
-
if (a.state !== i.state) throw new
|
|
2335
|
+
if (a.state !== i.state) throw new ae("state_mismatch", "Invalid state");
|
|
2337
2336
|
const o = ((n = t.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization;
|
|
2338
2337
|
await this._requestToken({ audience: a.audience, scope: a.scope, code_verifier: a.code_verifier, grant_type: "authorization_code", code: i.code, redirect_uri: a.redirect_uri }, { nonceIn: a.nonce, organization: o });
|
|
2339
2338
|
}
|
|
@@ -2349,7 +2348,7 @@ let Tw = class {
|
|
|
2349
2348
|
}
|
|
2350
2349
|
async loginWithRedirect(t = {}) {
|
|
2351
2350
|
var r;
|
|
2352
|
-
const n = bs(t), { openUrl: a, fragment: i, appState: o } = n, c =
|
|
2351
|
+
const n = bs(t), { openUrl: a, fragment: i, appState: o } = n, c = Ie(n, ["openUrl", "fragment", "appState"]), l = ((r = c.authorizationParams) === null || r === void 0 ? void 0 : r.organization) || this.options.authorizationParams.organization, f = await this._prepareAuthorizeUrl(c.authorizationParams || {}), { url: u } = f, s = Ie(f, ["url"]);
|
|
2353
2352
|
this.transactionManager.create(Object.assign(Object.assign(Object.assign({}, s), { appState: o }), l && { organization: l }));
|
|
2354
2353
|
const d = i ? `${u}#${i}` : u;
|
|
2355
2354
|
a ? await a(d) : window.location.assign(d);
|
|
@@ -2362,9 +2361,9 @@ let Tw = class {
|
|
|
2362
2361
|
const d = new URLSearchParams(s);
|
|
2363
2362
|
return { state: d.get("state"), code: d.get("code") || void 0, error: d.get("error") || void 0, error_description: d.get("error_description") || void 0 };
|
|
2364
2363
|
})(r.join("")), c = this.transactionManager.get();
|
|
2365
|
-
if (!c) throw new
|
|
2364
|
+
if (!c) throw new ae("missing_transaction", "Invalid state");
|
|
2366
2365
|
if (this.transactionManager.remove(), i) throw new iw(i, o || i, n, c.appState);
|
|
2367
|
-
if (!c.code_verifier || c.state && c.state !== n) throw new
|
|
2366
|
+
if (!c.code_verifier || c.state && c.state !== n) throw new ae("state_mismatch", "Invalid state");
|
|
2368
2367
|
const l = c.organization, f = c.nonce, u = c.redirect_uri;
|
|
2369
2368
|
return await this._requestToken(Object.assign({ audience: c.audience, scope: c.scope, code_verifier: c.code_verifier, grant_type: "authorization_code", code: a }, u ? { redirect_uri: u } : {}), { nonceIn: f, organization: l }), { appState: c.appState };
|
|
2370
2369
|
}
|
|
@@ -2389,7 +2388,7 @@ let Tw = class {
|
|
|
2389
2388
|
return t.detailedResponse ? a : a == null ? void 0 : a.access_token;
|
|
2390
2389
|
}
|
|
2391
2390
|
async _getTokenSilently(t) {
|
|
2392
|
-
const { cacheMode: r } = t, n =
|
|
2391
|
+
const { cacheMode: r } = t, n = Ie(t, ["cacheMode"]);
|
|
2393
2392
|
if (r !== "off") {
|
|
2394
2393
|
const a = await this._getEntryFromCache({ scope: n.authorizationParams.scope, audience: n.authorizationParams.audience || "default", clientId: this.options.clientId });
|
|
2395
2394
|
if (a) return a;
|
|
@@ -2414,18 +2413,18 @@ let Tw = class {
|
|
|
2414
2413
|
async getTokenWithPopup(t = {}, r = {}) {
|
|
2415
2414
|
var n;
|
|
2416
2415
|
const a = Object.assign(Object.assign({}, t), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), t.authorizationParams), { scope: $r(this.scope, (n = t.authorizationParams) === null || n === void 0 ? void 0 : n.scope) }) });
|
|
2417
|
-
return r = Object.assign(Object.assign({}, aw), r), await this.loginWithPopup(a, r), (await this.cacheManager.get(new
|
|
2416
|
+
return r = Object.assign(Object.assign({}, aw), r), await this.loginWithPopup(a, r), (await this.cacheManager.get(new Xe({ scope: a.authorizationParams.scope, audience: a.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
|
|
2418
2417
|
}
|
|
2419
2418
|
async isAuthenticated() {
|
|
2420
2419
|
return !!await this.getUser();
|
|
2421
2420
|
}
|
|
2422
2421
|
_buildLogoutUrl(t) {
|
|
2423
2422
|
t.clientId !== null ? t.clientId = t.clientId || this.options.clientId : delete t.clientId;
|
|
2424
|
-
const r = t.logoutParams || {}, { federated: n } = r, a =
|
|
2423
|
+
const r = t.logoutParams || {}, { federated: n } = r, a = Ie(r, ["federated"]), i = n ? "&federated" : "";
|
|
2425
2424
|
return this._url(`/v2/logout?${Aa(Object.assign({ clientId: t.clientId }, a))}`) + i;
|
|
2426
2425
|
}
|
|
2427
2426
|
async logout(t = {}) {
|
|
2428
|
-
const r = bs(t), { openUrl: n } = r, a =
|
|
2427
|
+
const r = bs(t), { openUrl: n } = r, a = Ie(r, ["openUrl"]);
|
|
2429
2428
|
t.clientId === null ? await this.cacheManager.clear() : await this.cacheManager.clear(t.clientId || this.options.clientId), this.cookieStorage.remove(this.orgHintCookieName, { cookieDomain: this.options.cookieDomain }), this.cookieStorage.remove(this.isAuthenticatedCookieName, { cookieDomain: this.options.cookieDomain }), this.userCache.remove("@@user@@");
|
|
2430
2429
|
const i = this._buildLogoutUrl(a);
|
|
2431
2430
|
n ? await n(i) : n !== !1 && window.location.assign(i);
|
|
@@ -2435,8 +2434,8 @@ let Tw = class {
|
|
|
2435
2434
|
n && !r.organization && (r.organization = n);
|
|
2436
2435
|
const { url: a, state: i, nonce: o, code_verifier: c, redirect_uri: l, scope: f, audience: u } = await this._prepareAuthorizeUrl(r, { response_mode: "web_message" }, window.location.origin);
|
|
2437
2436
|
try {
|
|
2438
|
-
if (window.crossOriginIsolated) throw new
|
|
2439
|
-
const s = t.timeoutInSeconds || this.options.authorizeTimeoutInSeconds, d = await ((m, S, g = 60) => new Promise(($,
|
|
2437
|
+
if (window.crossOriginIsolated) throw new ae("login_required", "The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");
|
|
2438
|
+
const s = t.timeoutInSeconds || this.options.authorizeTimeoutInSeconds, d = await ((m, S, g = 60) => new Promise(($, P) => {
|
|
2440
2439
|
const b = window.document.createElement("iframe");
|
|
2441
2440
|
b.setAttribute("width", "0"), b.setAttribute("height", "0"), b.style.display = "none";
|
|
2442
2441
|
const v = () => {
|
|
@@ -2444,15 +2443,15 @@ let Tw = class {
|
|
|
2444
2443
|
};
|
|
2445
2444
|
let I;
|
|
2446
2445
|
const O = setTimeout(() => {
|
|
2447
|
-
|
|
2446
|
+
P(new ja()), v();
|
|
2448
2447
|
}, 1e3 * g);
|
|
2449
2448
|
I = function(_) {
|
|
2450
2449
|
if (_.origin != S || !_.data || _.data.type !== "authorization_response") return;
|
|
2451
2450
|
const C = _.source;
|
|
2452
|
-
C && C.close(), _.data.response.error ?
|
|
2451
|
+
C && C.close(), _.data.response.error ? P(ae.fromPayload(_.data.response)) : $(_.data.response), clearTimeout(O), window.removeEventListener("message", I, !1), setTimeout(v, 2e3);
|
|
2453
2452
|
}, window.addEventListener("message", I, !1), window.document.body.appendChild(b), b.setAttribute("src", m);
|
|
2454
2453
|
}))(a, this.domainUrl, s);
|
|
2455
|
-
if (i !== d.state) throw new
|
|
2454
|
+
if (i !== d.state) throw new ae("state_mismatch", "Invalid state");
|
|
2456
2455
|
const h = await this._requestToken(Object.assign(Object.assign({}, t.authorizationParams), { code_verifier: c, code: d.code, grant_type: "authorization_code", redirect_uri: l, timeout: t.authorizationParams.timeout || this.httpTimeoutMs }), { nonceIn: o, organization: r.organization });
|
|
2457
2456
|
return Object.assign(Object.assign({}, h), { scope: f, oauthTokenScope: h.scope, audience: u });
|
|
2458
2457
|
} catch (s) {
|
|
@@ -2460,7 +2459,7 @@ let Tw = class {
|
|
|
2460
2459
|
}
|
|
2461
2460
|
}
|
|
2462
2461
|
async _getTokenUsingRefreshToken(t) {
|
|
2463
|
-
const r = await this.cacheManager.get(new
|
|
2462
|
+
const r = await this.cacheManager.get(new Xe({ scope: t.authorizationParams.scope, audience: t.authorizationParams.audience || "default", clientId: this.options.clientId }));
|
|
2464
2463
|
if (!(r && r.refresh_token || this.worker)) {
|
|
2465
2464
|
if (this.options.useRefreshTokensFallback) return await this._getTokenFromIFrame(t);
|
|
2466
2465
|
throw new Du(t.authorizationParams.audience || "default", t.authorizationParams.scope);
|
|
@@ -2475,15 +2474,15 @@ let Tw = class {
|
|
|
2475
2474
|
}
|
|
2476
2475
|
}
|
|
2477
2476
|
async _saveEntryInCache(t) {
|
|
2478
|
-
const { id_token: r, decodedToken: n } = t, a =
|
|
2477
|
+
const { id_token: r, decodedToken: n } = t, a = Ie(t, ["id_token", "decodedToken"]);
|
|
2479
2478
|
this.userCache.set("@@user@@", { id_token: r, decodedToken: n }), await this.cacheManager.setIdToken(this.options.clientId, t.id_token, t.decodedToken), await this.cacheManager.set(a);
|
|
2480
2479
|
}
|
|
2481
2480
|
async _getIdTokenFromCache() {
|
|
2482
|
-
const t = this.options.authorizationParams.audience || "default", r = await this.cacheManager.getIdToken(new
|
|
2481
|
+
const t = this.options.authorizationParams.audience || "default", r = await this.cacheManager.getIdToken(new Xe({ clientId: this.options.clientId, audience: t, scope: this.scope })), n = this.userCache.get("@@user@@");
|
|
2483
2482
|
return r && r.id_token === (n == null ? void 0 : n.id_token) ? n : (this.userCache.set("@@user@@", r), r);
|
|
2484
2483
|
}
|
|
2485
2484
|
async _getEntryFromCache({ scope: t, audience: r, clientId: n }) {
|
|
2486
|
-
const a = await this.cacheManager.get(new
|
|
2485
|
+
const a = await this.cacheManager.get(new Xe({ scope: t, audience: r, clientId: n }), 60);
|
|
2487
2486
|
if (a && a.access_token) {
|
|
2488
2487
|
const { access_token: i, oauthTokenScope: o, expires_in: c } = a, l = await this._getIdTokenFromCache();
|
|
2489
2488
|
return l && Object.assign(Object.assign({ id_token: l.id_token, access_token: i }, o ? { scope: o } : null), { expires_in: c });
|
|
@@ -2498,13 +2497,13 @@ async function Ew(e) {
|
|
|
2498
2497
|
const t = new Tw(e);
|
|
2499
2498
|
return await t.checkSession(), t;
|
|
2500
2499
|
}
|
|
2501
|
-
var
|
|
2500
|
+
var ye = /* @__PURE__ */ ((e) => (e.READY = "sesamyJsReady", e.AUTHENTICATED = "sesamyJsAuthenticated", e.LOGOUT = "sesamyJsLogout", e.CLEAR_CACHE = "sesamyJsClearCache", e.USER_ATTRIBUTE_CHANGED = "sesamyUserAttributeChanged", e.PURCHASE = "sesamyJsPurchase", e))(ye || {});
|
|
2502
2501
|
const Ow = "sesamy.com", _w = "sesamy.dev", Rw = "https://sesa.my", xa = "sesamyCacheTimestamp";
|
|
2503
|
-
function
|
|
2502
|
+
function xe(e, t) {
|
|
2504
2503
|
return `https://${e}.${t === "dev" ? _w : Ow}`;
|
|
2505
2504
|
}
|
|
2506
|
-
let
|
|
2507
|
-
const
|
|
2505
|
+
let ie, Bu;
|
|
2506
|
+
const $t = "sesamyAccessToken", aa = "sesamyRefreshToken";
|
|
2508
2507
|
async function Cw(e) {
|
|
2509
2508
|
if (!e)
|
|
2510
2509
|
return null;
|
|
@@ -2526,13 +2525,13 @@ async function Cw(e) {
|
|
|
2526
2525
|
if (!a.ok)
|
|
2527
2526
|
throw localStorage.removeItem(aa), new Error("Renew token failed");
|
|
2528
2527
|
const i = await a.json();
|
|
2529
|
-
return localStorage.setItem(aa, i.refresh_token), localStorage.setItem(
|
|
2528
|
+
return localStorage.setItem(aa, i.refresh_token), localStorage.setItem($t, i.access_token), i.access_token;
|
|
2530
2529
|
} catch {
|
|
2531
2530
|
Ku();
|
|
2532
2531
|
}
|
|
2533
2532
|
}
|
|
2534
2533
|
async function Ii() {
|
|
2535
|
-
const e = localStorage.getItem(
|
|
2534
|
+
const e = localStorage.getItem($t);
|
|
2536
2535
|
if (!e)
|
|
2537
2536
|
return null;
|
|
2538
2537
|
const t = Gu(e);
|
|
@@ -2540,7 +2539,7 @@ async function Ii() {
|
|
|
2540
2539
|
const r = await Cw(t);
|
|
2541
2540
|
if (r)
|
|
2542
2541
|
return r;
|
|
2543
|
-
localStorage.removeItem(
|
|
2542
|
+
localStorage.removeItem($t);
|
|
2544
2543
|
}
|
|
2545
2544
|
return e;
|
|
2546
2545
|
}
|
|
@@ -2557,15 +2556,15 @@ async function jw(e) {
|
|
|
2557
2556
|
return;
|
|
2558
2557
|
Bu = e.organization;
|
|
2559
2558
|
const t = {
|
|
2560
|
-
domain:
|
|
2559
|
+
domain: xe("token", e.environment),
|
|
2561
2560
|
clientId: e.clientId,
|
|
2562
2561
|
useCookiesForTransactions: !0
|
|
2563
2562
|
};
|
|
2564
|
-
if (Ss(window.location.href) !== Ss(
|
|
2563
|
+
if (Ss(window.location.href) !== Ss(xe("auth", e.environment)) && (t.cacheLocation = "localstorage", t.useRefreshTokens = !0), ie = await Ew(t), window.location.search.includes("code="))
|
|
2565
2564
|
try {
|
|
2566
|
-
await
|
|
2567
|
-
const r = await
|
|
2568
|
-
|
|
2565
|
+
await ie.handleRedirectCallback();
|
|
2566
|
+
const r = await ie.getUser();
|
|
2567
|
+
Fe(ye.AUTHENTICATED, r);
|
|
2569
2568
|
const n = new URL(location.href), a = n.searchParams;
|
|
2570
2569
|
a.delete("code"), a.delete("state"), n.search = a.toString(), window.history.replaceState({}, document.title, n.toString());
|
|
2571
2570
|
} catch (r) {
|
|
@@ -2573,19 +2572,19 @@ async function jw(e) {
|
|
|
2573
2572
|
}
|
|
2574
2573
|
}
|
|
2575
2574
|
async function $i() {
|
|
2576
|
-
return await Ii() ? !0 :
|
|
2575
|
+
return await Ii() ? !0 : ie ? ie.isAuthenticated() : !1;
|
|
2577
2576
|
}
|
|
2578
2577
|
async function Aw() {
|
|
2579
2578
|
return await Ii() ? {
|
|
2580
2579
|
sub: "local",
|
|
2581
2580
|
name: "Local User"
|
|
2582
|
-
} :
|
|
2581
|
+
} : ie ? ie.getUser() : null;
|
|
2583
2582
|
}
|
|
2584
2583
|
function ki(e) {
|
|
2585
|
-
if (localStorage.removeItem(
|
|
2584
|
+
if (localStorage.removeItem($t), !ie)
|
|
2586
2585
|
throw new Error("Auth0 client not initialized");
|
|
2587
2586
|
const t = (e == null ? void 0 : e.authorizationParams) || {};
|
|
2588
|
-
return
|
|
2587
|
+
return ie.loginWithRedirect({
|
|
2589
2588
|
...e,
|
|
2590
2589
|
authorizationParams: {
|
|
2591
2590
|
organization: Bu,
|
|
@@ -2594,12 +2593,12 @@ function ki(e) {
|
|
|
2594
2593
|
}
|
|
2595
2594
|
});
|
|
2596
2595
|
}
|
|
2597
|
-
async function
|
|
2596
|
+
async function zt(e = !0) {
|
|
2598
2597
|
const t = Ii();
|
|
2599
2598
|
if (t)
|
|
2600
2599
|
return t;
|
|
2601
2600
|
try {
|
|
2602
|
-
return
|
|
2601
|
+
return ie ? await ie.getTokenSilently() : null;
|
|
2603
2602
|
} catch (r) {
|
|
2604
2603
|
if (e)
|
|
2605
2604
|
throw r;
|
|
@@ -2607,8 +2606,8 @@ async function Ft(e = !0) {
|
|
|
2607
2606
|
}
|
|
2608
2607
|
}
|
|
2609
2608
|
async function Ku(e = {}) {
|
|
2610
|
-
if (localStorage.removeItem(
|
|
2611
|
-
return
|
|
2609
|
+
if (localStorage.removeItem($t), Fe(ye.LOGOUT, {}), !!ie)
|
|
2610
|
+
return ie.logout({
|
|
2612
2611
|
...e,
|
|
2613
2612
|
// Default to the current URL if no returnTo is specified
|
|
2614
2613
|
logoutParams: { returnTo: window.location.href, ...e.logoutParams }
|
|
@@ -2629,7 +2628,7 @@ async function Wu(e) {
|
|
|
2629
2628
|
const t = Gu(e);
|
|
2630
2629
|
if (!t || !t.exp || t.exp < (/* @__PURE__ */ new Date()).getTime() / 1e3)
|
|
2631
2630
|
throw new Error("Invalid token");
|
|
2632
|
-
localStorage.setItem(
|
|
2631
|
+
localStorage.setItem($t, e), Fe(ye.AUTHENTICATED, t);
|
|
2633
2632
|
}
|
|
2634
2633
|
const Lw = (e, t) => t.skipDedupe || t.method !== "GET", xw = (e, t) => t.method + "@" + e, Uw = (e) => e.clone(), Is = ({ skip: e = Lw, key: t = xw, resolver: r = Uw } = {}) => {
|
|
2635
2634
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -2663,9 +2662,9 @@ const Lw = (e, t) => t.skipDedupe || t.method !== "GET", xw = (e, t) => t.method
|
|
|
2663
2662
|
error: m,
|
|
2664
2663
|
url: f,
|
|
2665
2664
|
options: u
|
|
2666
|
-
})).then((
|
|
2665
|
+
})).then((P = {}) => {
|
|
2667
2666
|
var b, v;
|
|
2668
|
-
g(l((b =
|
|
2667
|
+
g(l((b = P && P.url) !== null && b !== void 0 ? b : f, (v = P && P.options) !== null && v !== void 0 ? v : u));
|
|
2669
2668
|
}) : g(l(f, u));
|
|
2670
2669
|
}, $);
|
|
2671
2670
|
}).then(d).catch((g) => {
|
|
@@ -2678,7 +2677,7 @@ const Lw = (e, t) => t.skipDedupe || t.method !== "GET", xw = (e, t) => t.method
|
|
|
2678
2677
|
throw h;
|
|
2679
2678
|
return d(null, h);
|
|
2680
2679
|
});
|
|
2681
|
-
}, Mw = "application/json", Vu = "Content-Type",
|
|
2680
|
+
}, Mw = "application/json", Vu = "Content-Type", ft = Symbol(), Zu = Symbol();
|
|
2682
2681
|
function ks(e = {}) {
|
|
2683
2682
|
var t;
|
|
2684
2683
|
return (t = Object.entries(e).find(([r]) => r.toLowerCase() === Vu.toLowerCase())) === null || t === void 0 ? void 0 : t[1];
|
|
@@ -2686,12 +2685,12 @@ function ks(e = {}) {
|
|
|
2686
2685
|
function Ps(e) {
|
|
2687
2686
|
return /^application\/.*json.*/.test(e);
|
|
2688
2687
|
}
|
|
2689
|
-
const
|
|
2688
|
+
const Qe = function(e, t, r = !1) {
|
|
2690
2689
|
return Object.entries(t).reduce((n, [a, i]) => {
|
|
2691
2690
|
const o = e[a];
|
|
2692
|
-
return Array.isArray(o) && Array.isArray(i) ? n[a] = r ? [...o, ...i] : i : typeof o == "object" && typeof i == "object" ? n[a] =
|
|
2691
|
+
return Array.isArray(o) && Array.isArray(i) ? n[a] = r ? [...o, ...i] : i : typeof o == "object" && typeof i == "object" ? n[a] = Qe(o, i, r) : n[a] = i, n;
|
|
2693
2692
|
}, { ...e });
|
|
2694
|
-
},
|
|
2693
|
+
}, kt = {
|
|
2695
2694
|
// Default options
|
|
2696
2695
|
options: {},
|
|
2697
2696
|
// Error type
|
|
@@ -2714,13 +2713,13 @@ const Xe = function(e, t, r = !1) {
|
|
|
2714
2713
|
}
|
|
2715
2714
|
};
|
|
2716
2715
|
function Fw(e, t = !1) {
|
|
2717
|
-
|
|
2716
|
+
kt.options = t ? e : Qe(kt.options, e);
|
|
2718
2717
|
}
|
|
2719
2718
|
function zw(e, t = !1) {
|
|
2720
|
-
|
|
2719
|
+
kt.polyfills = t ? e : Qe(kt.polyfills, e);
|
|
2721
2720
|
}
|
|
2722
2721
|
function Hw(e) {
|
|
2723
|
-
|
|
2722
|
+
kt.errorType = e;
|
|
2724
2723
|
}
|
|
2725
2724
|
const Bw = (e) => (t) => e.reduceRight((r, n) => n(r), t) || t;
|
|
2726
2725
|
class Yu extends Error {
|
|
@@ -2728,10 +2727,10 @@ class Yu extends Error {
|
|
|
2728
2727
|
const Kw = (e) => {
|
|
2729
2728
|
const t = /* @__PURE__ */ Object.create(null);
|
|
2730
2729
|
e = e._addons.reduce((b, v) => v.beforeRequest && v.beforeRequest(b, e._options, t) || b, e);
|
|
2731
|
-
const { _url: r, _options: n, _config: a, _catchers: i, _resolvers: o, _middlewares: c, _addons: l } = e, f = new Map(i), u =
|
|
2730
|
+
const { _url: r, _options: n, _config: a, _catchers: i, _resolvers: o, _middlewares: c, _addons: l } = e, f = new Map(i), u = Qe(a.options, n);
|
|
2732
2731
|
let s = r;
|
|
2733
2732
|
const d = Bw(c)((b, v) => (s = b, a.polyfill("fetch")(b, v)))(r, u), h = new Error(), m = d.catch((b) => {
|
|
2734
|
-
throw { [
|
|
2733
|
+
throw { [ft]: b };
|
|
2735
2734
|
}).then((b) => {
|
|
2736
2735
|
if (!b.ok) {
|
|
2737
2736
|
const v = new Yu();
|
|
@@ -2750,7 +2749,7 @@ CAUSE: ` + h.stack, v.response = b, v.url = s, b.type === "opaque")
|
|
|
2750
2749
|
}
|
|
2751
2750
|
return b;
|
|
2752
2751
|
}), S = (b) => b.catch((v) => {
|
|
2753
|
-
const I = v.hasOwnProperty(
|
|
2752
|
+
const I = v.hasOwnProperty(ft), O = I ? v[ft] : v, _ = (O == null ? void 0 : O.status) && f.get(O.status) || f.get(O == null ? void 0 : O.name) || I && f.has(ft) && f.get(ft);
|
|
2754
2753
|
if (_)
|
|
2755
2754
|
return _(O, e);
|
|
2756
2755
|
const C = f.get(Zu);
|
|
@@ -2789,17 +2788,17 @@ CAUSE: ` + h.stack, v.response = b, v.url = s, b.type === "opaque")
|
|
|
2789
2788
|
return this.error(500, b);
|
|
2790
2789
|
},
|
|
2791
2790
|
fetchError(b) {
|
|
2792
|
-
return this.error(
|
|
2791
|
+
return this.error(ft, b);
|
|
2793
2792
|
}
|
|
2794
|
-
},
|
|
2793
|
+
}, P = l.reduce((b, v) => ({
|
|
2795
2794
|
...b,
|
|
2796
2795
|
...typeof v.resolver == "function" ? v.resolver(b) : v.resolver
|
|
2797
2796
|
}), $);
|
|
2798
|
-
return o.reduce((b, v) => v(b, e),
|
|
2797
|
+
return o.reduce((b, v) => v(b, e), P);
|
|
2799
2798
|
}, Gw = {
|
|
2800
2799
|
_url: "",
|
|
2801
2800
|
_options: {},
|
|
2802
|
-
_config:
|
|
2801
|
+
_config: kt,
|
|
2803
2802
|
_catchers: /* @__PURE__ */ new Map(),
|
|
2804
2803
|
_resolvers: [],
|
|
2805
2804
|
_deferred: [],
|
|
@@ -2822,7 +2821,7 @@ CAUSE: ` + h.stack, v.response = b, v.url = s, b.type === "opaque")
|
|
|
2822
2821
|
...this,
|
|
2823
2822
|
_config: {
|
|
2824
2823
|
...this._config,
|
|
2825
|
-
polyfills: t ? e :
|
|
2824
|
+
polyfills: t ? e : Qe(this._config.polyfills, e)
|
|
2826
2825
|
}
|
|
2827
2826
|
};
|
|
2828
2827
|
},
|
|
@@ -2836,11 +2835,11 @@ CAUSE: ` + h.stack, v.response = b, v.url = s, b.type === "opaque")
|
|
|
2836
2835
|
};
|
|
2837
2836
|
},
|
|
2838
2837
|
options(e, t = !1) {
|
|
2839
|
-
return { ...this, _options: t ? e :
|
|
2838
|
+
return { ...this, _options: t ? e : Qe(this._options, e) };
|
|
2840
2839
|
},
|
|
2841
2840
|
headers(e) {
|
|
2842
2841
|
const t = e ? Array.isArray(e) ? Object.fromEntries(e) : "entries" in e ? Object.fromEntries(e.entries()) : e : {};
|
|
2843
|
-
return { ...this, _options:
|
|
2842
|
+
return { ...this, _options: Qe(this._options, { headers: t }) };
|
|
2844
2843
|
},
|
|
2845
2844
|
accept(e) {
|
|
2846
2845
|
return this.headers({ Accept: e });
|
|
@@ -2907,78 +2906,78 @@ CAUSE: ` + h.stack, v.response = b, v.url = s, b.type === "opaque")
|
|
|
2907
2906
|
return this.content(t || Ps(r) && r || Mw).body(JSON.stringify(e));
|
|
2908
2907
|
}
|
|
2909
2908
|
};
|
|
2910
|
-
function
|
|
2909
|
+
function Re(e = "", t = {}) {
|
|
2911
2910
|
return { ...Gw, _url: e, _options: t };
|
|
2912
2911
|
}
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
function
|
|
2919
|
-
sessionStorage.removeItem(xa),
|
|
2912
|
+
Re.default = Re;
|
|
2913
|
+
Re.options = Fw;
|
|
2914
|
+
Re.errorType = Hw;
|
|
2915
|
+
Re.polyfills = zw;
|
|
2916
|
+
Re.WretchError = Yu;
|
|
2917
|
+
function pe() {
|
|
2918
|
+
sessionStorage.removeItem(xa), Fe(ye.CLEAR_CACHE, {});
|
|
2920
2919
|
}
|
|
2921
2920
|
function Ts() {
|
|
2922
2921
|
var r;
|
|
2923
2922
|
return (r = (document.documentElement.getAttribute("lang") ?? "en").split("-")[0]) == null ? void 0 : r.toLocaleLowerCase();
|
|
2924
2923
|
}
|
|
2925
2924
|
function Ww(e) {
|
|
2926
|
-
const t =
|
|
2927
|
-
let
|
|
2928
|
-
|
|
2929
|
-
const
|
|
2925
|
+
const t = xe("api2", e.environment), r = (w) => async (k, T) => {
|
|
2926
|
+
let H = sessionStorage.getItem(xa);
|
|
2927
|
+
H || (H = Date.now().toString(), sessionStorage.setItem(xa, H));
|
|
2928
|
+
const ee = {
|
|
2930
2929
|
...T,
|
|
2931
2930
|
headers: {
|
|
2932
2931
|
...T.headers,
|
|
2933
|
-
"Cache-Timestamp":
|
|
2932
|
+
"Cache-Timestamp": H
|
|
2934
2933
|
}
|
|
2935
2934
|
};
|
|
2936
|
-
return w(
|
|
2937
|
-
}, n = (w = !0) => (
|
|
2938
|
-
let
|
|
2939
|
-
if (
|
|
2935
|
+
return w(k, ee);
|
|
2936
|
+
}, n = (w = !0) => (k) => async (T, H) => {
|
|
2937
|
+
let ee = null;
|
|
2938
|
+
if (ee = await zt(w), !ee) {
|
|
2940
2939
|
if (w)
|
|
2941
2940
|
throw new Error("No access token available");
|
|
2942
|
-
return
|
|
2941
|
+
return k(T, H);
|
|
2943
2942
|
}
|
|
2944
|
-
const
|
|
2945
|
-
...
|
|
2943
|
+
const je = {
|
|
2944
|
+
...H,
|
|
2946
2945
|
headers: {
|
|
2947
|
-
...
|
|
2948
|
-
...
|
|
2946
|
+
...H.headers,
|
|
2947
|
+
...ee ? { Authorization: `Bearer ${ee}` } : {}
|
|
2949
2948
|
}
|
|
2950
2949
|
};
|
|
2951
|
-
return
|
|
2952
|
-
}, a = (w) => (
|
|
2950
|
+
return k(T, je);
|
|
2951
|
+
}, a = (w) => (k, T) => {
|
|
2953
2952
|
if (T.headers.Authorization)
|
|
2954
|
-
return w(
|
|
2955
|
-
const
|
|
2953
|
+
return w(k, T);
|
|
2954
|
+
const H = localStorage.getItem("__anon_id"), ee = btoa(`${H}:`), je = {
|
|
2956
2955
|
...T,
|
|
2957
2956
|
headers: {
|
|
2958
2957
|
...T.headers,
|
|
2959
|
-
Authorization: `Basic ${
|
|
2958
|
+
Authorization: `Basic ${ee}`
|
|
2960
2959
|
}
|
|
2961
2960
|
};
|
|
2962
|
-
return w(
|
|
2963
|
-
}, i =
|
|
2961
|
+
return w(k, je);
|
|
2962
|
+
}, i = Re(t).headers({ "Content-Type": "application/json" }).middlewares([
|
|
2964
2963
|
r,
|
|
2965
2964
|
n(),
|
|
2966
2965
|
Is(),
|
|
2967
2966
|
$s({
|
|
2968
2967
|
delayTimer: 1e3,
|
|
2969
|
-
delayRamp: (w,
|
|
2968
|
+
delayRamp: (w, k) => w * k,
|
|
2970
2969
|
maxAttempts: 3,
|
|
2971
2970
|
until: (w) => !!(w && (w.ok || w.status >= 400 && w.status < 500)),
|
|
2972
2971
|
retryOnNetworkError: !1
|
|
2973
2972
|
})
|
|
2974
|
-
]), o =
|
|
2973
|
+
]), o = Re(t).headers({ "Content-Type": "application/json" }).middlewares([
|
|
2975
2974
|
r,
|
|
2976
2975
|
n(!1),
|
|
2977
2976
|
a,
|
|
2978
2977
|
Is(),
|
|
2979
2978
|
$s({
|
|
2980
2979
|
delayTimer: 1e3,
|
|
2981
|
-
delayRamp: (w,
|
|
2980
|
+
delayRamp: (w, k) => w * k,
|
|
2982
2981
|
maxAttempts: 3,
|
|
2983
2982
|
until: (w) => !!(w && (w.ok || w.status >= 400 && w.status < 500)),
|
|
2984
2983
|
retryOnNetworkError: !1
|
|
@@ -2988,8 +2987,8 @@ function Ww(e) {
|
|
|
2988
2987
|
return i.get("/entitlements").json();
|
|
2989
2988
|
}
|
|
2990
2989
|
async function l(w) {
|
|
2991
|
-
const
|
|
2992
|
-
return
|
|
2990
|
+
const k = await i.get("/entitlements").json();
|
|
2991
|
+
return k == null ? void 0 : k.find((T) => T.id === w);
|
|
2993
2992
|
}
|
|
2994
2993
|
async function f(w) {
|
|
2995
2994
|
return i.get(`/entitlements/${w}/access`).json();
|
|
@@ -2998,153 +2997,162 @@ function Ww(e) {
|
|
|
2998
2997
|
return i.get("/contracts").json();
|
|
2999
2998
|
}
|
|
3000
2999
|
async function s(w) {
|
|
3001
|
-
const
|
|
3002
|
-
return
|
|
3000
|
+
const k = await i.get("/contracts").json();
|
|
3001
|
+
return k == null ? void 0 : k.find((T) => T.id === w);
|
|
3003
3002
|
}
|
|
3004
3003
|
async function d() {
|
|
3005
|
-
return i.get("/subscriptions").json();
|
|
3004
|
+
return console.warn("getSubscriptions is deprecated, use getContracts instead"), i.get("/subscriptions").json();
|
|
3006
3005
|
}
|
|
3007
3006
|
async function h() {
|
|
3008
3007
|
return i.get("/bills").json();
|
|
3009
3008
|
}
|
|
3010
3009
|
async function m(w) {
|
|
3011
|
-
const
|
|
3012
|
-
return
|
|
3010
|
+
const k = await i.get("/bills").json();
|
|
3011
|
+
return k == null ? void 0 : k.find((T) => T.id === w);
|
|
3013
3012
|
}
|
|
3014
|
-
async function S(
|
|
3015
|
-
|
|
3016
|
-
return De(ge.USER_ATTRIBUTE_CHANGED, {}), ve(), T;
|
|
3013
|
+
async function S() {
|
|
3014
|
+
return i.get("/transactions").json();
|
|
3017
3015
|
}
|
|
3018
3016
|
async function g(w) {
|
|
3019
|
-
const
|
|
3020
|
-
return
|
|
3017
|
+
const k = await i.get("/transactions").json();
|
|
3018
|
+
return k == null ? void 0 : k.find((T) => T.id === w);
|
|
3021
3019
|
}
|
|
3022
|
-
async function $(w) {
|
|
3020
|
+
async function $(w, k) {
|
|
3021
|
+
const T = await i.url(`/user-metadata/${w}`).put(k).json();
|
|
3022
|
+
return Fe(ye.USER_ATTRIBUTE_CHANGED, {}), pe(), T;
|
|
3023
|
+
}
|
|
3024
|
+
async function P(w) {
|
|
3025
|
+
const k = await i.url(`/user-metadata/${w}`).delete().res();
|
|
3026
|
+
return pe(), k.ok;
|
|
3027
|
+
}
|
|
3028
|
+
async function b(w) {
|
|
3023
3029
|
return (await i.url(`/user-metadata/${w}`).get().json())[w];
|
|
3024
3030
|
}
|
|
3025
|
-
async function
|
|
3031
|
+
async function v() {
|
|
3026
3032
|
return await i.url("/user-metadata").get().json();
|
|
3027
3033
|
}
|
|
3028
|
-
async function
|
|
3034
|
+
async function I() {
|
|
3029
3035
|
return await i.url("/tags").get().json();
|
|
3030
3036
|
}
|
|
3031
|
-
async function
|
|
3032
|
-
const
|
|
3033
|
-
return
|
|
3037
|
+
async function O(w) {
|
|
3038
|
+
const k = await i.url(`/tags/${w}`).delete().res();
|
|
3039
|
+
return pe(), k.ok;
|
|
3034
3040
|
}
|
|
3035
|
-
async function
|
|
3036
|
-
const
|
|
3037
|
-
return
|
|
3041
|
+
async function _(w) {
|
|
3042
|
+
const k = await i.url("/tags").post(w).res();
|
|
3043
|
+
return Fe(ye.USER_ATTRIBUTE_CHANGED, {}), pe(), k.ok;
|
|
3038
3044
|
}
|
|
3039
|
-
async function
|
|
3045
|
+
async function C(w) {
|
|
3040
3046
|
return (await o.url("/tallies").get().json())[w];
|
|
3041
3047
|
}
|
|
3042
|
-
async function
|
|
3048
|
+
async function M() {
|
|
3043
3049
|
return await o.url("/tallies").get().json();
|
|
3044
3050
|
}
|
|
3045
|
-
async function
|
|
3046
|
-
const
|
|
3047
|
-
return
|
|
3051
|
+
async function F(w) {
|
|
3052
|
+
const k = await o.url(`/tallies/${w}`).delete().res();
|
|
3053
|
+
return pe(), k.ok;
|
|
3048
3054
|
}
|
|
3049
|
-
async function
|
|
3050
|
-
return await o.url(`/tallies/${w}/push`).post(
|
|
3055
|
+
async function G(w, k) {
|
|
3056
|
+
return await o.url(`/tallies/${w}/push`).post(k).json();
|
|
3051
3057
|
}
|
|
3052
|
-
async function
|
|
3058
|
+
async function L(w) {
|
|
3053
3059
|
return await i.url(`/products/${w}`).get().json();
|
|
3054
3060
|
}
|
|
3055
|
-
async function
|
|
3056
|
-
return await
|
|
3061
|
+
async function N() {
|
|
3062
|
+
return await zt(!1) ? await i.url("/profile").get().json() : null;
|
|
3057
3063
|
}
|
|
3058
|
-
async function
|
|
3059
|
-
const
|
|
3060
|
-
return
|
|
3064
|
+
async function z(w) {
|
|
3065
|
+
const k = await i.url("/profile").patch(w).res();
|
|
3066
|
+
return pe(), k.ok;
|
|
3061
3067
|
}
|
|
3062
|
-
async function
|
|
3068
|
+
async function R() {
|
|
3063
3069
|
return await i.url("/payment-issues").get().json();
|
|
3064
3070
|
}
|
|
3065
|
-
async function
|
|
3071
|
+
async function B() {
|
|
3066
3072
|
return (await i.url("/profile/spotify-link").get().json()).isSpotifyLinked;
|
|
3067
3073
|
}
|
|
3068
|
-
async function
|
|
3074
|
+
async function W() {
|
|
3069
3075
|
return (await i.url("/profile/unlink-spotify").post().res()).ok;
|
|
3070
3076
|
}
|
|
3071
|
-
async function
|
|
3072
|
-
const
|
|
3073
|
-
if (!
|
|
3077
|
+
async function Ke(w) {
|
|
3078
|
+
const k = await zt(!1);
|
|
3079
|
+
if (!k)
|
|
3074
3080
|
throw new Error("No access token available");
|
|
3075
|
-
const T = new URL(`${
|
|
3076
|
-
T.searchParams.set("access_token",
|
|
3081
|
+
const T = new URL(`${xe("spotify-oas", e.environment)}/sesamy-callback`);
|
|
3082
|
+
T.searchParams.set("access_token", k), T.searchParams.set("state", w), window.location.href = T.toString();
|
|
3077
3083
|
}
|
|
3078
|
-
async function
|
|
3079
|
-
const
|
|
3080
|
-
return
|
|
3084
|
+
async function p(w) {
|
|
3085
|
+
const k = await i.url(`/products/${w}/auto-onboard`).post().json();
|
|
3086
|
+
return k.length && pe(), k;
|
|
3081
3087
|
}
|
|
3082
|
-
async function
|
|
3083
|
-
const { shortlink: T } = await
|
|
3088
|
+
async function y(w, k = 3600) {
|
|
3089
|
+
const { shortlink: T } = await Re(Rw).post({ url: w, ttl: k }).json();
|
|
3084
3090
|
return T;
|
|
3085
3091
|
}
|
|
3086
|
-
async function
|
|
3087
|
-
const
|
|
3092
|
+
async function E(w) {
|
|
3093
|
+
const k = await zt(!1);
|
|
3088
3094
|
let T;
|
|
3089
|
-
const
|
|
3095
|
+
const H = w.language || Ts();
|
|
3090
3096
|
switch (w.target) {
|
|
3091
3097
|
case "account":
|
|
3092
|
-
T = new URL(`${
|
|
3098
|
+
T = new URL(`${xe("account", e.environment)}/${H}/subscriptions/${e.clientId}`);
|
|
3093
3099
|
break;
|
|
3094
3100
|
case "consume":
|
|
3095
|
-
T = new URL(`${
|
|
3101
|
+
T = new URL(`${xe("consume", e.environment)}/${H}/@${e.clientId}/${w.sku}`), w.episodeId ? T.href += `/${w.episodeId}` : T.href += "/listen";
|
|
3096
3102
|
break;
|
|
3097
3103
|
default:
|
|
3098
3104
|
throw new Error("Invalid target");
|
|
3099
3105
|
}
|
|
3100
|
-
return T.searchParams.set("sesamy-redirect-url", w.redirectUrl || window.location.href),
|
|
3106
|
+
return T.searchParams.set("sesamy-redirect-url", w.redirectUrl || window.location.href), k && (T.hash = `#access_token=${k}`), w.shorten ? y(T.href, w.ttl) : T.href;
|
|
3101
3107
|
}
|
|
3102
|
-
async function
|
|
3108
|
+
async function x(w) {
|
|
3103
3109
|
return (await o.url("/checkouts").post({ language: Ts(), ...w, vendorId: e.clientId })).json();
|
|
3104
3110
|
}
|
|
3105
|
-
async function
|
|
3106
|
-
return (await o.url(`/checkouts/${w}`).patch(
|
|
3111
|
+
async function U(w, k) {
|
|
3112
|
+
return (await o.url(`/checkouts/${w}`).patch(k)).json();
|
|
3107
3113
|
}
|
|
3108
|
-
async function
|
|
3114
|
+
async function D(w) {
|
|
3109
3115
|
return (await o.url(`/checkouts/${w}`).get()).json();
|
|
3110
3116
|
}
|
|
3111
|
-
async function
|
|
3112
|
-
const w = await
|
|
3113
|
-
w && (
|
|
3117
|
+
async function V() {
|
|
3118
|
+
const w = await zt(!1), k = new URL(`${xe("account", e.environment)}/subscriptions/${e.clientId}`);
|
|
3119
|
+
w && (k.hash = `#access_token=${w}`), window.location.href = k.toString();
|
|
3114
3120
|
}
|
|
3115
3121
|
return {
|
|
3116
|
-
createCheckout:
|
|
3117
|
-
updateCheckout:
|
|
3118
|
-
getCheckout:
|
|
3122
|
+
createCheckout: x,
|
|
3123
|
+
updateCheckout: U,
|
|
3124
|
+
getCheckout: D,
|
|
3119
3125
|
getEntitlements: c,
|
|
3120
3126
|
getEntitlement: l,
|
|
3121
3127
|
getEntitlementAccess: f,
|
|
3122
3128
|
getContracts: u,
|
|
3123
3129
|
getContract: s,
|
|
3124
|
-
getProfile:
|
|
3125
|
-
updateProfile:
|
|
3130
|
+
getProfile: N,
|
|
3131
|
+
updateProfile: z,
|
|
3126
3132
|
getSubscriptions: d,
|
|
3127
3133
|
getBills: h,
|
|
3128
3134
|
getBill: m,
|
|
3129
|
-
setUserMetadata:
|
|
3130
|
-
deleteUserMetadata:
|
|
3131
|
-
getUserMetadata:
|
|
3132
|
-
listUserMetadata:
|
|
3133
|
-
getTags:
|
|
3134
|
-
deleteTag:
|
|
3135
|
-
setTag:
|
|
3136
|
-
getTally:
|
|
3137
|
-
getTallies:
|
|
3138
|
-
deleteTally:
|
|
3139
|
-
pushTally:
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3135
|
+
setUserMetadata: $,
|
|
3136
|
+
deleteUserMetadata: P,
|
|
3137
|
+
getUserMetadata: b,
|
|
3138
|
+
listUserMetadata: v,
|
|
3139
|
+
getTags: I,
|
|
3140
|
+
deleteTag: O,
|
|
3141
|
+
setTag: _,
|
|
3142
|
+
getTally: C,
|
|
3143
|
+
getTallies: M,
|
|
3144
|
+
deleteTally: F,
|
|
3145
|
+
pushTally: G,
|
|
3146
|
+
getTransactions: S,
|
|
3147
|
+
getTransaction: g,
|
|
3148
|
+
getProduct: L,
|
|
3149
|
+
getPaymentIssues: R,
|
|
3150
|
+
autoOnboardProduct: p,
|
|
3151
|
+
isSpotifyLinked: B,
|
|
3152
|
+
unlinkSpotify: W,
|
|
3153
|
+
linkSpotify: Ke,
|
|
3154
|
+
generateLink: E,
|
|
3155
|
+
openHostedAccountPage: V
|
|
3148
3156
|
};
|
|
3149
3157
|
}
|
|
3150
3158
|
const Ju = "@sesamy/sesamy-js", Pi = "1.13.2";
|
|
@@ -3153,12 +3161,12 @@ function Es(e, t, r, n, a) {
|
|
|
3153
3161
|
return e === a ? r : e;
|
|
3154
3162
|
}
|
|
3155
3163
|
var kr = "undefined", Os = "object", Ua = function() {
|
|
3156
|
-
}, Xu = "any", qu = "*",
|
|
3164
|
+
}, Xu = "any", qu = "*", rt = "__", Gr = typeof process < "u" ? process : {};
|
|
3157
3165
|
Gr.env && Gr.env.NODE_ENV;
|
|
3158
|
-
var
|
|
3166
|
+
var Z = typeof document < "u";
|
|
3159
3167
|
Gr.versions != null && Gr.versions.node != null;
|
|
3160
3168
|
typeof Deno < "u" && Deno.core;
|
|
3161
|
-
|
|
3169
|
+
Z && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
|
|
3162
3170
|
function Qu(e, t) {
|
|
3163
3171
|
return t.charAt(0)[e]() + t.slice(1);
|
|
3164
3172
|
}
|
|
@@ -3171,11 +3179,11 @@ function Wr(e, t) {
|
|
|
3171
3179
|
var r = Yw(e);
|
|
3172
3180
|
return t ? Zw(r) : r;
|
|
3173
3181
|
}
|
|
3174
|
-
function
|
|
3182
|
+
function ur(e, t) {
|
|
3175
3183
|
return typeof t === e;
|
|
3176
3184
|
}
|
|
3177
|
-
var
|
|
3178
|
-
|
|
3185
|
+
var re = ur.bind(null, "function"), De = ur.bind(null, "string"), mt = ur.bind(null, "undefined"), Jw = ur.bind(null, "boolean");
|
|
3186
|
+
ur.bind(null, "symbol");
|
|
3179
3187
|
function el(e) {
|
|
3180
3188
|
return e === null;
|
|
3181
3189
|
}
|
|
@@ -3185,7 +3193,7 @@ function Xw(e) {
|
|
|
3185
3193
|
function tl(e) {
|
|
3186
3194
|
return Wr(e) === "array";
|
|
3187
3195
|
}
|
|
3188
|
-
function
|
|
3196
|
+
function te(e) {
|
|
3189
3197
|
if (!qw(e)) return !1;
|
|
3190
3198
|
for (var t = e; Object.getPrototypeOf(t) !== null; ) t = Object.getPrototypeOf(t);
|
|
3191
3199
|
return Object.getPrototypeOf(e) === t;
|
|
@@ -3194,10 +3202,10 @@ function qw(e) {
|
|
|
3194
3202
|
return e && (typeof e == "object" || e !== null);
|
|
3195
3203
|
}
|
|
3196
3204
|
function Qw(e) {
|
|
3197
|
-
return
|
|
3205
|
+
return re(e.constructor) ? e.constructor.name : null;
|
|
3198
3206
|
}
|
|
3199
3207
|
function eb(e) {
|
|
3200
|
-
return e instanceof Error ||
|
|
3208
|
+
return e instanceof Error || De(e.message) && e.constructor && Xw(e.constructor.stackTraceLimit);
|
|
3201
3209
|
}
|
|
3202
3210
|
function rl(e, t) {
|
|
3203
3211
|
if (typeof t != "object" || el(t)) return !1;
|
|
@@ -3239,7 +3247,7 @@ function _s(e) {
|
|
|
3239
3247
|
}
|
|
3240
3248
|
}
|
|
3241
3249
|
function nb() {
|
|
3242
|
-
if (
|
|
3250
|
+
if (Z) {
|
|
3243
3251
|
var e = navigator, t = e.languages;
|
|
3244
3252
|
return e.userLanguage || (t && t.length ? t[0] : e.language);
|
|
3245
3253
|
}
|
|
@@ -3264,7 +3272,7 @@ function ib(e) {
|
|
|
3264
3272
|
}
|
|
3265
3273
|
return n;
|
|
3266
3274
|
}(function(t) {
|
|
3267
|
-
return
|
|
3275
|
+
return Z && window.location.search.substring(1);
|
|
3268
3276
|
}());
|
|
3269
3277
|
}
|
|
3270
3278
|
function ob(e, t, r) {
|
|
@@ -3293,17 +3301,17 @@ function sb(e, t) {
|
|
|
3293
3301
|
return r = this, n = arguments, f <= 0 ? (clearTimeout(i), i = null, o = l, a = e.apply(r, n)) : i || (i = setTimeout(c, f)), a;
|
|
3294
3302
|
};
|
|
3295
3303
|
}
|
|
3296
|
-
var
|
|
3297
|
-
function
|
|
3298
|
-
return
|
|
3304
|
+
var Xt = "global", Pt = rt + "global" + rt, Tt = typeof self === Os && self.self === self && self || typeof global === Os && global.global === global && global || void 0;
|
|
3305
|
+
function nt(e) {
|
|
3306
|
+
return Tt[Pt][e];
|
|
3299
3307
|
}
|
|
3300
|
-
function
|
|
3301
|
-
return
|
|
3308
|
+
function at(e, t) {
|
|
3309
|
+
return Tt[Pt][e] = t;
|
|
3302
3310
|
}
|
|
3303
|
-
function
|
|
3304
|
-
delete
|
|
3311
|
+
function jt(e) {
|
|
3312
|
+
delete Tt[Pt][e];
|
|
3305
3313
|
}
|
|
3306
|
-
function
|
|
3314
|
+
function At(e, t, r) {
|
|
3307
3315
|
var n;
|
|
3308
3316
|
try {
|
|
3309
3317
|
if (Ti(e)) {
|
|
@@ -3314,7 +3322,7 @@ function Ct(e, t, r) {
|
|
|
3314
3322
|
}
|
|
3315
3323
|
return n || r;
|
|
3316
3324
|
}
|
|
3317
|
-
|
|
3325
|
+
Tt[Pt] || (Tt[Pt] = {});
|
|
3318
3326
|
var Pr = {};
|
|
3319
3327
|
function Ti(e) {
|
|
3320
3328
|
if (typeof Pr[e] !== kr) return Pr[e];
|
|
@@ -3335,16 +3343,16 @@ function A() {
|
|
|
3335
3343
|
return e;
|
|
3336
3344
|
}, A.apply(this, arguments);
|
|
3337
3345
|
}
|
|
3338
|
-
var
|
|
3339
|
-
return typeof Symbol ===
|
|
3340
|
-
}(), Tr = " != " +
|
|
3346
|
+
var Ue = "function", _e = "undefined", cb = "@@redux/" + Math.random().toString(36), Rs = /* @__PURE__ */ function() {
|
|
3347
|
+
return typeof Symbol === Ue && Symbol.observable || "@@observable";
|
|
3348
|
+
}(), Tr = " != " + Ue;
|
|
3341
3349
|
function nl(e, t, r) {
|
|
3342
3350
|
var n;
|
|
3343
|
-
if (typeof t ===
|
|
3344
|
-
if (typeof r !==
|
|
3351
|
+
if (typeof t === Ue && typeof r === _e && (r = t, t = void 0), typeof r !== _e) {
|
|
3352
|
+
if (typeof r !== Ue) throw new Error("enhancer" + Tr);
|
|
3345
3353
|
return r(nl)(e, t);
|
|
3346
3354
|
}
|
|
3347
|
-
if (typeof e !==
|
|
3355
|
+
if (typeof e !== Ue) throw new Error("reducer" + Tr);
|
|
3348
3356
|
var a = e, i = t, o = [], c = o, l = !1;
|
|
3349
3357
|
function f() {
|
|
3350
3358
|
c === o && (c = o.slice());
|
|
@@ -3353,7 +3361,7 @@ function nl(e, t, r) {
|
|
|
3353
3361
|
return i;
|
|
3354
3362
|
}
|
|
3355
3363
|
function s(h) {
|
|
3356
|
-
if (typeof h !==
|
|
3364
|
+
if (typeof h !== Ue) throw new Error("Listener" + Tr);
|
|
3357
3365
|
var m = !0;
|
|
3358
3366
|
return f(), c.push(h), function() {
|
|
3359
3367
|
if (m) {
|
|
@@ -3364,8 +3372,8 @@ function nl(e, t, r) {
|
|
|
3364
3372
|
};
|
|
3365
3373
|
}
|
|
3366
3374
|
function d(h) {
|
|
3367
|
-
if (!
|
|
3368
|
-
if (typeof h.type ===
|
|
3375
|
+
if (!te(h)) throw new Error("Act != obj");
|
|
3376
|
+
if (typeof h.type === _e) throw new Error("ActType " + _e);
|
|
3369
3377
|
if (l) throw new Error("Dispatch in reducer");
|
|
3370
3378
|
try {
|
|
3371
3379
|
l = !0, i = a(i, h);
|
|
@@ -3376,7 +3384,7 @@ function nl(e, t, r) {
|
|
|
3376
3384
|
return h;
|
|
3377
3385
|
}
|
|
3378
3386
|
return d({ type: "@@redux/INIT" }), (n = { dispatch: d, subscribe: s, getState: u, replaceReducer: function(h) {
|
|
3379
|
-
if (typeof h !==
|
|
3387
|
+
if (typeof h !== Ue) throw new Error("next reducer" + Tr);
|
|
3380
3388
|
a = h, d({ type: "@@redux/INIT" });
|
|
3381
3389
|
} })[Rs] = function() {
|
|
3382
3390
|
var h, m = s;
|
|
@@ -3393,9 +3401,9 @@ function nl(e, t, r) {
|
|
|
3393
3401
|
}
|
|
3394
3402
|
function ub(e, t) {
|
|
3395
3403
|
var r = t && t.type;
|
|
3396
|
-
return "action " + (r && r.toString() || "?") + "reducer " + e + " returns " +
|
|
3404
|
+
return "action " + (r && r.toString() || "?") + "reducer " + e + " returns " + _e;
|
|
3397
3405
|
}
|
|
3398
|
-
function
|
|
3406
|
+
function Et() {
|
|
3399
3407
|
var e = [].slice.call(arguments);
|
|
3400
3408
|
return e.length === 0 ? function(t) {
|
|
3401
3409
|
return t;
|
|
@@ -3414,11 +3422,11 @@ function lb() {
|
|
|
3414
3422
|
} };
|
|
3415
3423
|
return i = [].slice.call(e).map(function(f) {
|
|
3416
3424
|
return f(l);
|
|
3417
|
-
}), A({}, o, { dispatch: c =
|
|
3425
|
+
}), A({}, o, { dispatch: c = Et.apply(void 0, i)(o.dispatch) });
|
|
3418
3426
|
};
|
|
3419
3427
|
};
|
|
3420
3428
|
}
|
|
3421
|
-
var
|
|
3429
|
+
var Me = rt + "anon_id", et = rt + "user_id", yt = rt + "user_traits", Le = "userId", gt = "anonymousId", Ur = ["bootstrap", "params", "campaign", "initializeStart", "initialize", "initializeEnd", "ready", "resetStart", "reset", "resetEnd", "pageStart", "page", "pageEnd", "pageAborted", "trackStart", "track", "trackEnd", "trackAborted", "identifyStart", "identify", "identifyEnd", "identifyAborted", "userIdChanged", "registerPlugins", "enablePlugin", "disablePlugin", "online", "offline", "setItemStart", "setItem", "setItemEnd", "setItemAborted", "removeItemStart", "removeItem", "removeItemEnd", "removeItemAborted"], Na = ["name", "EVENTS", "config", "loaded"], j = Ur.reduce(function(e, t) {
|
|
3422
3430
|
return e[t] = t, e;
|
|
3423
3431
|
}, { registerPluginType: function(e) {
|
|
3424
3432
|
return "registerPlugin:" + e;
|
|
@@ -3432,7 +3440,7 @@ function fb(e) {
|
|
|
3432
3440
|
return function(a) {
|
|
3433
3441
|
if (a.type === j.bootstrap) {
|
|
3434
3442
|
var i = a.params, o = a.user, c = a.persistedUser, l = a.initialUser, f = c.userId === o.userId;
|
|
3435
|
-
c.anonymousId !== o.anonymousId && t(
|
|
3443
|
+
c.anonymousId !== o.anonymousId && t(Me, o.anonymousId), f || t(et, o.userId), l.traits && t(yt, A({}, f && c.traits ? c.traits : {}, l.traits));
|
|
3436
3444
|
var u = Object.keys(a.params);
|
|
3437
3445
|
if (u.length) {
|
|
3438
3446
|
var s = i.an_uid, d = i.an_event, h = u.reduce(function(m, S) {
|
|
@@ -3457,14 +3465,14 @@ function fb(e) {
|
|
|
3457
3465
|
function db(e) {
|
|
3458
3466
|
return function(t, r) {
|
|
3459
3467
|
if (t === void 0 && (t = {}), r === void 0 && (r = {}), r.type === j.setItemEnd) {
|
|
3460
|
-
if (r.key ===
|
|
3461
|
-
if (r.key ===
|
|
3468
|
+
if (r.key === Me) return A({}, t, { anonymousId: r.value });
|
|
3469
|
+
if (r.key === et) return A({}, t, { userId: r.value });
|
|
3462
3470
|
}
|
|
3463
3471
|
switch (r.type) {
|
|
3464
3472
|
case j.identify:
|
|
3465
3473
|
return Object.assign({}, t, { userId: r.userId, traits: A({}, t.traits, r.traits) });
|
|
3466
3474
|
case j.reset:
|
|
3467
|
-
return [
|
|
3475
|
+
return [et, Me, yt].forEach(function(n) {
|
|
3468
3476
|
e.removeItem(n);
|
|
3469
3477
|
}), Object.assign({}, t, { userId: null, anonymousId: null, traits: {} });
|
|
3470
3478
|
default:
|
|
@@ -3473,10 +3481,10 @@ function db(e) {
|
|
|
3473
3481
|
};
|
|
3474
3482
|
}
|
|
3475
3483
|
function Ls(e) {
|
|
3476
|
-
return { userId: e.getItem(
|
|
3484
|
+
return { userId: e.getItem(et), anonymousId: e.getItem(Me), traits: e.getItem(yt) };
|
|
3477
3485
|
}
|
|
3478
3486
|
var Da = function(e) {
|
|
3479
|
-
return
|
|
3487
|
+
return rt + "TEMP" + rt + e;
|
|
3480
3488
|
};
|
|
3481
3489
|
function hb(e) {
|
|
3482
3490
|
var t = e.storage, r = t.setItem, n = t.removeItem, a = t.getItem;
|
|
@@ -3484,23 +3492,23 @@ function hb(e) {
|
|
|
3484
3492
|
return function(o) {
|
|
3485
3493
|
return function(c) {
|
|
3486
3494
|
var l = c.userId, f = c.traits, u = c.options;
|
|
3487
|
-
if (c.type === j.reset && ([
|
|
3495
|
+
if (c.type === j.reset && ([et, yt, Me].forEach(function(h) {
|
|
3488
3496
|
n(h);
|
|
3489
|
-
}), [
|
|
3490
|
-
|
|
3497
|
+
}), [Le, gt, "traits"].forEach(function(h) {
|
|
3498
|
+
jt(Da(h));
|
|
3491
3499
|
})), c.type === j.identify) {
|
|
3492
|
-
a(
|
|
3493
|
-
var s = a(
|
|
3494
|
-
s && s !== l && i.dispatch({ type: j.userIdChanged, old: { userId: s, traits: d }, new: { userId: l, traits: f }, options: u }), l && r(
|
|
3500
|
+
a(Me) || r(Me, cn());
|
|
3501
|
+
var s = a(et), d = a(yt) || {};
|
|
3502
|
+
s && s !== l && i.dispatch({ type: j.userIdChanged, old: { userId: s, traits: d }, new: { userId: l, traits: f }, options: u }), l && r(et, l), f && r(yt, A({}, d, f));
|
|
3495
3503
|
}
|
|
3496
3504
|
return o(c);
|
|
3497
3505
|
};
|
|
3498
3506
|
};
|
|
3499
3507
|
};
|
|
3500
3508
|
}
|
|
3501
|
-
var
|
|
3509
|
+
var Wt = {};
|
|
3502
3510
|
function xs(e, t) {
|
|
3503
|
-
|
|
3511
|
+
Wt[e] && re(Wt[e]) && (Wt[e](t), delete Wt[e]);
|
|
3504
3512
|
}
|
|
3505
3513
|
function al(e, t, r) {
|
|
3506
3514
|
return new Promise(function(n, a) {
|
|
@@ -3523,14 +3531,14 @@ function il(e, t, r) {
|
|
|
3523
3531
|
if (f.processIndex && f.processIndex.length) {
|
|
3524
3532
|
f.processIndex.forEach(function(s) {
|
|
3525
3533
|
var d = c.actions[s], h = d.plugin, m = d.payload.type, S = a[h][m];
|
|
3526
|
-
if (S &&
|
|
3534
|
+
if (S && re(S)) {
|
|
3527
3535
|
var g, $ = function(v, I) {
|
|
3528
|
-
return v === void 0 && (v = {}), I === void 0 && (I = {}), [
|
|
3536
|
+
return v === void 0 && (v = {}), I === void 0 && (I = {}), [Le, gt].reduce(function(O, _) {
|
|
3529
3537
|
return v.hasOwnProperty(_) && I[_] && I[_] !== v[_] && (O[_] = I[_]), O;
|
|
3530
3538
|
}, v);
|
|
3531
|
-
}(d.payload, l),
|
|
3532
|
-
if (!
|
|
3533
|
-
if (!
|
|
3539
|
+
}(d.payload, l), P = n[$.meta.rid];
|
|
3540
|
+
if (!P && (g = S({ payload: $, config: o[h].config, instance: r, abort: vb })) && te(g) && g.abort) return void (n[$.meta.rid] = !0);
|
|
3541
|
+
if (!P) {
|
|
3534
3542
|
var b = m + ":" + h;
|
|
3535
3543
|
e.dispatch(A({}, $, { type: b, _: { called: b, from: "queueDrain" } }));
|
|
3536
3544
|
}
|
|
@@ -3546,34 +3554,34 @@ function il(e, t, r) {
|
|
|
3546
3554
|
var ia = function(e) {
|
|
3547
3555
|
var t = e.data, r = e.action, n = e.instance, a = e.state, i = e.allPlugins, o = e.allMatches, c = e.store, l = e.EVENTS;
|
|
3548
3556
|
try {
|
|
3549
|
-
var f = a.plugins, u = a.context, s = r.type, d = s.match(
|
|
3557
|
+
var f = a.plugins, u = a.context, s = r.type, d = s.match(wt), h = t.exact.map(function(g) {
|
|
3550
3558
|
return g.pluginName;
|
|
3551
3559
|
});
|
|
3552
3560
|
d && (h = o.during.map(function(g) {
|
|
3553
3561
|
return g.pluginName;
|
|
3554
3562
|
}));
|
|
3555
3563
|
var m = /* @__PURE__ */ function(g, $) {
|
|
3556
|
-
return function(
|
|
3557
|
-
var I = b.config, O = b.name, _ = O + "." +
|
|
3564
|
+
return function(P, b, v) {
|
|
3565
|
+
var I = b.config, O = b.name, _ = O + "." + P.type;
|
|
3558
3566
|
v && (_ = v.event);
|
|
3559
|
-
var C =
|
|
3560
|
-
return function(
|
|
3561
|
-
var B = L ? L.name :
|
|
3562
|
-
if (L && (!(W = R &&
|
|
3563
|
-
return A({},
|
|
3567
|
+
var C = P.type.match(wt) ? /* @__PURE__ */ function(M, F, G, L, N) {
|
|
3568
|
+
return function(z, R) {
|
|
3569
|
+
var B = L ? L.name : M, W = R && rr(R) ? R : G;
|
|
3570
|
+
if (L && (!(W = R && rr(R) ? R : [M]).includes(M) || W.length !== 1)) throw new Error("Method " + F + " can only abort " + M + " plugin. " + JSON.stringify(W) + " input valid");
|
|
3571
|
+
return A({}, N, { abort: { reason: z, plugins: W, caller: F, _: B } });
|
|
3564
3572
|
};
|
|
3565
|
-
}(O, _, $, v,
|
|
3573
|
+
}(O, _, $, v, P) : /* @__PURE__ */ function(M, F) {
|
|
3566
3574
|
return function() {
|
|
3567
|
-
throw new Error(
|
|
3575
|
+
throw new Error(M.type + " action not cancellable. Remove abort in " + F);
|
|
3568
3576
|
};
|
|
3569
|
-
}(
|
|
3570
|
-
return { payload: pb(
|
|
3577
|
+
}(P, _);
|
|
3578
|
+
return { payload: pb(P), instance: g, config: I || {}, abort: C };
|
|
3571
3579
|
};
|
|
3572
3580
|
}(n, h), S = t.exact.reduce(function(g, $) {
|
|
3573
|
-
var
|
|
3574
|
-
return b.match(/^initialize/) || b.match(/^reset/) || (v = !f[
|
|
3581
|
+
var P = $.pluginName, b = $.methodName, v = !1;
|
|
3582
|
+
return b.match(/^initialize/) || b.match(/^reset/) || (v = !f[P].loaded), u.offline && b.match(/^(page|track|identify)/) && (v = !0), g["" + P] = v, g;
|
|
3575
3583
|
}, {});
|
|
3576
|
-
return Promise.resolve(t.exact.reduce(function(g, $,
|
|
3584
|
+
return Promise.resolve(t.exact.reduce(function(g, $, P) {
|
|
3577
3585
|
try {
|
|
3578
3586
|
var b = $.pluginName;
|
|
3579
3587
|
return Promise.resolve(g).then(function(v) {
|
|
@@ -3581,26 +3589,26 @@ var ia = function(e) {
|
|
|
3581
3589
|
return Promise.resolve(v);
|
|
3582
3590
|
}
|
|
3583
3591
|
var O = function() {
|
|
3584
|
-
if (t.namespaced && t.namespaced[b]) return Promise.resolve(t.namespaced[b].reduce(function(_, C,
|
|
3592
|
+
if (t.namespaced && t.namespaced[b]) return Promise.resolve(t.namespaced[b].reduce(function(_, C, M) {
|
|
3585
3593
|
try {
|
|
3586
|
-
return Promise.resolve(_).then(function(
|
|
3587
|
-
return C.method &&
|
|
3588
|
-
var B = Hs(
|
|
3594
|
+
return Promise.resolve(_).then(function(F) {
|
|
3595
|
+
return C.method && re(C.method) ? (function(z, R) {
|
|
3596
|
+
var B = Hs(z);
|
|
3589
3597
|
if (B && B.name === R) {
|
|
3590
3598
|
var W = Hs(B.method);
|
|
3591
|
-
throw new Error([R + " plugin is calling method " +
|
|
3599
|
+
throw new Error([R + " plugin is calling method " + z, "Plugins cant call self", "Use " + B.method + " " + (W ? "or " + W.method : "") + " in " + R + " plugin insteadof " + z].join(`
|
|
3592
3600
|
`));
|
|
3593
3601
|
}
|
|
3594
|
-
}(C.methodName, C.pluginName), Promise.resolve(C.method({ payload:
|
|
3595
|
-
return A({}, G, { abort: { reason:
|
|
3596
|
-
}), config: Ds(C.pluginName, f, i), plugins: f })).then(function(
|
|
3597
|
-
var R =
|
|
3598
|
-
return Promise.resolve(A({},
|
|
3599
|
-
})) :
|
|
3600
|
-
var G, L,
|
|
3602
|
+
}(C.methodName, C.pluginName), Promise.resolve(C.method({ payload: F, instance: n, abort: (G = F, L = b, N = C.pluginName, function(z, R) {
|
|
3603
|
+
return A({}, G, { abort: { reason: z, plugins: R || [L], caller: s, from: N || L } });
|
|
3604
|
+
}), config: Ds(C.pluginName, f, i), plugins: f })).then(function(z) {
|
|
3605
|
+
var R = te(z) ? z : {};
|
|
3606
|
+
return Promise.resolve(A({}, F, R));
|
|
3607
|
+
})) : F;
|
|
3608
|
+
var G, L, N;
|
|
3601
3609
|
});
|
|
3602
|
-
} catch (
|
|
3603
|
-
return Promise.reject(
|
|
3610
|
+
} catch (F) {
|
|
3611
|
+
return Promise.reject(F);
|
|
3604
3612
|
}
|
|
3605
3613
|
}, Promise.resolve(r))).then(function(_) {
|
|
3606
3614
|
v[b] = _;
|
|
@@ -3613,21 +3621,21 @@ var ia = function(e) {
|
|
|
3613
3621
|
return Promise.reject(v);
|
|
3614
3622
|
}
|
|
3615
3623
|
}, Promise.resolve({}))).then(function(g) {
|
|
3616
|
-
return Promise.resolve(t.exact.reduce(function($,
|
|
3624
|
+
return Promise.resolve(t.exact.reduce(function($, P, b) {
|
|
3617
3625
|
try {
|
|
3618
|
-
var v = t.exact.length === b + 1, I =
|
|
3626
|
+
var v = t.exact.length === b + 1, I = P.pluginName, O = i[I];
|
|
3619
3627
|
return Promise.resolve($).then(function(_) {
|
|
3620
3628
|
var C = g[I] ? g[I] : {};
|
|
3621
3629
|
if (d && (C = _), sa(C, I)) return oa({ data: C, method: s, instance: n, pluginName: I, store: c }), Promise.resolve(_);
|
|
3622
3630
|
if (sa(_, I)) return v && oa({ data: _, method: s, instance: n, store: c }), Promise.resolve(_);
|
|
3623
3631
|
if (S.hasOwnProperty(I) && S[I] === !0) return c.dispatch({ type: "queue", plugin: I, payload: C, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(_);
|
|
3624
|
-
var
|
|
3625
|
-
return Promise.resolve(O[s]({ abort:
|
|
3626
|
-
var G =
|
|
3627
|
-
if (sa(
|
|
3632
|
+
var M = m(g[I], i[I]);
|
|
3633
|
+
return Promise.resolve(O[s]({ abort: M.abort, payload: C, instance: n, config: Ds(I, f, i), plugins: f })).then(function(F) {
|
|
3634
|
+
var G = te(F) ? F : {}, L = A({}, _, G), N = g[I];
|
|
3635
|
+
if (sa(N, I)) oa({ data: N, method: s, instance: n, pluginName: I, store: c });
|
|
3628
3636
|
else {
|
|
3629
|
-
var
|
|
3630
|
-
(
|
|
3637
|
+
var z = s + ":" + I;
|
|
3638
|
+
(z.match(/:/g) || []).length < 2 && !s.match(Us) && !s.match(Ns) && n.dispatch(A({}, d ? L : C, { type: z, _: { called: z, from: "submethod" } }));
|
|
3631
3639
|
}
|
|
3632
3640
|
return Promise.resolve(L);
|
|
3633
3641
|
});
|
|
@@ -3636,10 +3644,10 @@ var ia = function(e) {
|
|
|
3636
3644
|
return Promise.reject(_);
|
|
3637
3645
|
}
|
|
3638
3646
|
}, Promise.resolve(r))).then(function($) {
|
|
3639
|
-
if (!(s.match(
|
|
3647
|
+
if (!(s.match(wt) || s.match(/^registerPlugin/) || s.match(Ns) || s.match(Us) || s.match(/^params/) || s.match(/^userIdChanged/))) {
|
|
3640
3648
|
if (l.plugins.includes(s), $._ && $._.originalAction === s) return $;
|
|
3641
|
-
var
|
|
3642
|
-
ol($, t.exact.length) && !s.match(/End$/) && (
|
|
3649
|
+
var P = A({}, $, { _: { originalAction: $.type, called: $.type, from: "engineEnd" } });
|
|
3650
|
+
ol($, t.exact.length) && !s.match(/End$/) && (P = A({}, P, { type: $.type + "Aborted" })), c.dispatch(P);
|
|
3643
3651
|
}
|
|
3644
3652
|
return $;
|
|
3645
3653
|
});
|
|
@@ -3647,7 +3655,7 @@ var ia = function(e) {
|
|
|
3647
3655
|
} catch (g) {
|
|
3648
3656
|
return Promise.reject(g);
|
|
3649
3657
|
}
|
|
3650
|
-
},
|
|
3658
|
+
}, wt = /Start$/, Us = /^bootstrap/, Ns = /^ready/;
|
|
3651
3659
|
function oa(e) {
|
|
3652
3660
|
var t = e.pluginName, r = e.method + "Aborted" + (t ? ":" + t : "");
|
|
3653
3661
|
e.store.dispatch(A({}, e.data, { type: r, _: { called: r, from: "abort" } }));
|
|
@@ -3662,7 +3670,7 @@ function Ms(e, t) {
|
|
|
3662
3670
|
}, []);
|
|
3663
3671
|
}
|
|
3664
3672
|
function Fs(e, t) {
|
|
3665
|
-
var r = e.replace(
|
|
3673
|
+
var r = e.replace(wt, ""), n = t ? ":" + t : "";
|
|
3666
3674
|
return ["" + e + n, "" + r + n, r + "End" + n];
|
|
3667
3675
|
}
|
|
3668
3676
|
function sa(e, t) {
|
|
@@ -3672,15 +3680,15 @@ function sa(e, t) {
|
|
|
3672
3680
|
function ol(e, t) {
|
|
3673
3681
|
var r = e.abort;
|
|
3674
3682
|
if (!r) return !1;
|
|
3675
|
-
if (r === !0 ||
|
|
3683
|
+
if (r === !0 || De(r)) return !0;
|
|
3676
3684
|
var n = r.plugins;
|
|
3677
|
-
return
|
|
3685
|
+
return rr(r) && r.length === t || rr(n) && n.length === t;
|
|
3678
3686
|
}
|
|
3679
|
-
function
|
|
3687
|
+
function rr(e) {
|
|
3680
3688
|
return Array.isArray(e);
|
|
3681
3689
|
}
|
|
3682
3690
|
function zs(e, t) {
|
|
3683
|
-
return !(!e || !
|
|
3691
|
+
return !(!e || !rr(e)) && e.includes(t);
|
|
3684
3692
|
}
|
|
3685
3693
|
function Hs(e) {
|
|
3686
3694
|
var t = e.match(/(.*):(.*)/);
|
|
@@ -3688,7 +3696,7 @@ function Hs(e) {
|
|
|
3688
3696
|
}
|
|
3689
3697
|
function pb(e) {
|
|
3690
3698
|
return Object.keys(e).reduce(function(t, r) {
|
|
3691
|
-
return r === "type" || (t[r] =
|
|
3699
|
+
return r === "type" || (t[r] = te(e[r]) ? Object.assign({}, e[r]) : e[r]), t;
|
|
3692
3700
|
}, {});
|
|
3693
3701
|
}
|
|
3694
3702
|
function mb(e, t, r) {
|
|
@@ -3708,23 +3716,23 @@ function mb(e, t, r) {
|
|
|
3708
3716
|
return u.includes(v);
|
|
3709
3717
|
}).map(function(v) {
|
|
3710
3718
|
return d[v];
|
|
3711
|
-
}), S = [], g = [], $ = o.disabled,
|
|
3719
|
+
}), S = [], g = [], $ = o.disabled, P = m.map(function(v) {
|
|
3712
3720
|
var I = v.loaded, O = v.name, _ = v.config;
|
|
3713
3721
|
return al(v, function() {
|
|
3714
3722
|
return I({ config: _ });
|
|
3715
3723
|
}, 1e4).then(function(C) {
|
|
3716
|
-
return n[O] || (a.dispatch({ type: j.pluginReadyType(O), name: O, events: Object.keys(v).filter(function(
|
|
3717
|
-
return !Na.includes(
|
|
3724
|
+
return n[O] || (a.dispatch({ type: j.pluginReadyType(O), name: O, events: Object.keys(v).filter(function(M) {
|
|
3725
|
+
return !Na.includes(M);
|
|
3718
3726
|
}) }), n[O] = !0), S = S.concat(O), v;
|
|
3719
3727
|
}).catch(function(C) {
|
|
3720
3728
|
if (C instanceof Error) throw new Error(C);
|
|
3721
3729
|
return g = g.concat(C.name), C;
|
|
3722
3730
|
});
|
|
3723
3731
|
});
|
|
3724
|
-
Promise.all(
|
|
3732
|
+
Promise.all(P).then(function(v) {
|
|
3725
3733
|
var I = { plugins: S, failed: g, disabled: $ };
|
|
3726
3734
|
setTimeout(function() {
|
|
3727
|
-
h.length ===
|
|
3735
|
+
h.length === P.length + $.length && a.dispatch(A({}, { type: j.ready }, I));
|
|
3728
3736
|
}, 0);
|
|
3729
3737
|
});
|
|
3730
3738
|
}
|
|
@@ -3733,47 +3741,47 @@ function mb(e, t, r) {
|
|
|
3733
3741
|
return il(a, t, e);
|
|
3734
3742
|
}, 0), Promise.resolve(function(v, I, O, _, C) {
|
|
3735
3743
|
try {
|
|
3736
|
-
var
|
|
3744
|
+
var M = re(I) ? I() : I, F = v.type, G = F.replace(wt, "");
|
|
3737
3745
|
if (v._ && v._.called) return Promise.resolve(v);
|
|
3738
|
-
var L = O.getState(),
|
|
3739
|
-
var y =
|
|
3746
|
+
var L = O.getState(), N = (B = M, (W = L.plugins) === void 0 && (W = {}), (Ke = v.options) === void 0 && (Ke = {}), Object.keys(B).filter(function(p) {
|
|
3747
|
+
var y = Ke.plugins || {};
|
|
3740
3748
|
return Jw(y[p]) ? y[p] : y.all !== !1 && (!W[p] || W[p].enabled !== !1);
|
|
3741
3749
|
}).map(function(p) {
|
|
3742
3750
|
return B[p];
|
|
3743
3751
|
}));
|
|
3744
|
-
|
|
3752
|
+
F === j.initializeStart && v.fromEnable && (N = Object.keys(L.plugins).filter(function(p) {
|
|
3745
3753
|
var y = L.plugins[p];
|
|
3746
3754
|
return v.plugins.includes(p) && !y.initialized;
|
|
3747
3755
|
}).map(function(p) {
|
|
3748
|
-
return
|
|
3756
|
+
return M[p];
|
|
3749
3757
|
}));
|
|
3750
|
-
var
|
|
3758
|
+
var z = N.map(function(p) {
|
|
3751
3759
|
return p.name;
|
|
3752
3760
|
}), R = function(p, y, E) {
|
|
3753
3761
|
var x = Fs(p).map(function(U) {
|
|
3754
3762
|
return Ms(U, y);
|
|
3755
3763
|
});
|
|
3756
|
-
return y.reduce(function(U,
|
|
3757
|
-
var
|
|
3758
|
-
return Ms(
|
|
3759
|
-
}),
|
|
3760
|
-
return
|
|
3764
|
+
return y.reduce(function(U, D) {
|
|
3765
|
+
var V = D.name, w = Fs(p, V).map(function(ee) {
|
|
3766
|
+
return Ms(ee, y);
|
|
3767
|
+
}), k = w[0], T = w[1], H = w[2];
|
|
3768
|
+
return k.length && (U.beforeNS[V] = k), T.length && (U.duringNS[V] = T), H.length && (U.afterNS[V] = H), U;
|
|
3761
3769
|
}, { before: x[0], beforeNS: {}, during: x[1], duringNS: {}, after: x[2], afterNS: {} });
|
|
3762
|
-
}(
|
|
3763
|
-
return Promise.resolve(ia({ action: v, data: { exact: R.before, namespaced: R.beforeNS }, state: L, allPlugins:
|
|
3770
|
+
}(F, N);
|
|
3771
|
+
return Promise.resolve(ia({ action: v, data: { exact: R.before, namespaced: R.beforeNS }, state: L, allPlugins: M, allMatches: R, instance: O, store: _, EVENTS: C })).then(function(p) {
|
|
3764
3772
|
function y() {
|
|
3765
3773
|
var U = function() {
|
|
3766
|
-
if (
|
|
3767
|
-
|
|
3774
|
+
if (F.match(wt)) return Promise.resolve(ia({ action: A({}, E, { type: G + "End" }), data: { exact: R.after, namespaced: R.afterNS }, state: L, allPlugins: M, allMatches: R, instance: O, store: _, EVENTS: C })).then(function(D) {
|
|
3775
|
+
D.meta && D.meta.hasCallback && xs(D.meta.rid, { payload: D });
|
|
3768
3776
|
});
|
|
3769
3777
|
}();
|
|
3770
3778
|
return U && U.then ? U.then(function() {
|
|
3771
3779
|
return p;
|
|
3772
3780
|
}) : p;
|
|
3773
3781
|
}
|
|
3774
|
-
if (ol(p,
|
|
3782
|
+
if (ol(p, z.length)) return p;
|
|
3775
3783
|
var E, x = function() {
|
|
3776
|
-
if (
|
|
3784
|
+
if (F !== G) return Promise.resolve(ia({ action: A({}, p, { type: G }), data: { exact: R.during, namespaced: R.duringNS }, state: L, allPlugins: M, allMatches: R, instance: O, store: _, EVENTS: C })).then(function(U) {
|
|
3777
3785
|
E = U;
|
|
3778
3786
|
});
|
|
3779
3787
|
E = p;
|
|
@@ -3783,7 +3791,7 @@ function mb(e, t, r) {
|
|
|
3783
3791
|
} catch (p) {
|
|
3784
3792
|
return Promise.reject(p);
|
|
3785
3793
|
}
|
|
3786
|
-
var B, W,
|
|
3794
|
+
var B, W, Ke;
|
|
3787
3795
|
}(o, t, e, a, r)).then(function(v) {
|
|
3788
3796
|
return c = 1, i(v);
|
|
3789
3797
|
});
|
|
@@ -3828,7 +3836,7 @@ var yb = function() {
|
|
|
3828
3836
|
} }, o = e[t].map(function(c) {
|
|
3829
3837
|
return c(i);
|
|
3830
3838
|
});
|
|
3831
|
-
return
|
|
3839
|
+
return Et.apply(void 0, o)(n)(a);
|
|
3832
3840
|
};
|
|
3833
3841
|
};
|
|
3834
3842
|
};
|
|
@@ -3905,10 +3913,10 @@ function kb(e) {
|
|
|
3905
3913
|
return "/" + (t && t[3] ? t[3].split("?")[0].replace(cl, "") : "");
|
|
3906
3914
|
}
|
|
3907
3915
|
var ul, ll, fl, dl, Pb = function(e) {
|
|
3908
|
-
if (e === void 0 && (e = {}), !
|
|
3916
|
+
if (e === void 0 && (e = {}), !Z) return e;
|
|
3909
3917
|
var t = document, r = t.title, n = t.referrer, a = window, i = a.location, o = a.innerWidth, c = a.innerHeight, l = i.hash, f = i.search, u = function(d) {
|
|
3910
3918
|
var h = function() {
|
|
3911
|
-
if (
|
|
3919
|
+
if (Z) {
|
|
3912
3920
|
for (var m, S = document.getElementsByTagName("link"), g = 0; m = S[g]; g++) if (m.getAttribute("rel") === "canonical") return m.getAttribute("href");
|
|
3913
3921
|
}
|
|
3914
3922
|
}();
|
|
@@ -3926,11 +3934,11 @@ function Eb(e, t) {
|
|
|
3926
3934
|
return e;
|
|
3927
3935
|
}
|
|
3928
3936
|
ul = function() {
|
|
3929
|
-
if (!
|
|
3937
|
+
if (!Z) return !1;
|
|
3930
3938
|
var e = navigator.appVersion;
|
|
3931
3939
|
return ~e.indexOf("Win") ? "Windows" : ~e.indexOf("Mac") ? "MacOS" : ~e.indexOf("X11") ? "UNIX" : ~e.indexOf("Linux") ? "Linux" : "Unknown OS";
|
|
3932
|
-
}(), ll =
|
|
3933
|
-
var Gs = { initialized: !1, sessionId: cn(), app: null, version: null, debug: !1, offline: !!
|
|
3940
|
+
}(), ll = Z ? document.referrer : null, fl = nb(), dl = ab();
|
|
3941
|
+
var Gs = { initialized: !1, sessionId: cn(), app: null, version: null, debug: !1, offline: !!Z && !navigator.onLine, os: { name: ul }, userAgent: Z ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.13" }, timezone: dl, locale: fl, campaign: {}, referrer: ll };
|
|
3934
3942
|
function Ob(e, t) {
|
|
3935
3943
|
e === void 0 && (e = Gs);
|
|
3936
3944
|
var r = e.initialized, n = t.campaign;
|
|
@@ -3947,7 +3955,7 @@ function Ob(e, t) {
|
|
|
3947
3955
|
}
|
|
3948
3956
|
var _b = ["plugins", "reducers", "storage"];
|
|
3949
3957
|
function Rb(e, t, r) {
|
|
3950
|
-
if (
|
|
3958
|
+
if (Z) {
|
|
3951
3959
|
var n = window[(r ? "add" : "remove") + "EventListener"];
|
|
3952
3960
|
e.split(" ").forEach(function(a) {
|
|
3953
3961
|
n(a, t);
|
|
@@ -3963,18 +3971,18 @@ function Cb(e) {
|
|
|
3963
3971
|
};
|
|
3964
3972
|
}
|
|
3965
3973
|
function hl() {
|
|
3966
|
-
return
|
|
3974
|
+
return at("analytics", []), function(e) {
|
|
3967
3975
|
return function(t, r, n) {
|
|
3968
3976
|
var a = e(t, r, n), i = a.dispatch;
|
|
3969
3977
|
return Object.assign(a, { dispatch: function(o) {
|
|
3970
|
-
return
|
|
3978
|
+
return Tt[Pt].analytics.push(o.action || o), i(o);
|
|
3971
3979
|
} });
|
|
3972
3980
|
};
|
|
3973
3981
|
};
|
|
3974
3982
|
}
|
|
3975
3983
|
function Ws(e) {
|
|
3976
3984
|
return function() {
|
|
3977
|
-
return
|
|
3985
|
+
return Et(Et.apply(null, arguments), hl());
|
|
3978
3986
|
};
|
|
3979
3987
|
}
|
|
3980
3988
|
function ca(e) {
|
|
@@ -3983,8 +3991,8 @@ function ca(e) {
|
|
|
3983
3991
|
function Vs(e, t, r) {
|
|
3984
3992
|
e === void 0 && (e = {});
|
|
3985
3993
|
var n, a, i = cn();
|
|
3986
|
-
return t && (
|
|
3987
|
-
for (var c, l = o || Array.prototype.slice.call(arguments), f = 0; f < l.length; f++) if (
|
|
3994
|
+
return t && (Wt[i] = (n = t, a = function(o) {
|
|
3995
|
+
for (var c, l = o || Array.prototype.slice.call(arguments), f = 0; f < l.length; f++) if (re(l[f])) {
|
|
3988
3996
|
c = l[f];
|
|
3989
3997
|
break;
|
|
3990
3998
|
}
|
|
@@ -3996,27 +4004,27 @@ function Vs(e, t, r) {
|
|
|
3996
4004
|
function jb(e) {
|
|
3997
4005
|
e === void 0 && (e = {});
|
|
3998
4006
|
var t = e.reducers || {}, r = e.initialUser || {}, n = (e.plugins || []).reduce(function(p, y) {
|
|
3999
|
-
if (
|
|
4007
|
+
if (re(y)) return p.middlewares = p.middlewares.concat(y), p;
|
|
4000
4008
|
if (y.NAMESPACE && (y.name = y.NAMESPACE), !y.name) throw new Error("https://lytics.dev/errors/1");
|
|
4001
4009
|
y.config || (y.config = {});
|
|
4002
|
-
var E = y.EVENTS ? Object.keys(y.EVENTS).map(function(
|
|
4003
|
-
return y.EVENTS[
|
|
4010
|
+
var E = y.EVENTS ? Object.keys(y.EVENTS).map(function(D) {
|
|
4011
|
+
return y.EVENTS[D];
|
|
4004
4012
|
}) : [];
|
|
4005
|
-
p.pluginEnabled[y.name] = !(y.enabled === !1 || y.config.enabled === !1), delete y.enabled, y.methods && (p.methods[y.name] = Object.keys(y.methods).reduce(function(
|
|
4006
|
-
var
|
|
4007
|
-
return
|
|
4008
|
-
for (var
|
|
4009
|
-
return
|
|
4010
|
-
}),
|
|
4013
|
+
p.pluginEnabled[y.name] = !(y.enabled === !1 || y.config.enabled === !1), delete y.enabled, y.methods && (p.methods[y.name] = Object.keys(y.methods).reduce(function(D, V) {
|
|
4014
|
+
var w;
|
|
4015
|
+
return D[V] = (w = y.methods[V], function() {
|
|
4016
|
+
for (var k = Array.prototype.slice.call(arguments), T = new Array(w.length), H = 0; H < k.length; H++) T[H] = k[H];
|
|
4017
|
+
return T[T.length] = I, w.apply({ instance: I }, T);
|
|
4018
|
+
}), D;
|
|
4011
4019
|
}, {}), delete y.methods);
|
|
4012
4020
|
var x = Object.keys(y).concat(E), U = new Set(p.events.concat(x));
|
|
4013
4021
|
if (p.events = Array.from(U), p.pluginsArray = p.pluginsArray.concat(y), p.plugins[y.name]) throw new Error(y.name + "AlreadyLoaded");
|
|
4014
4022
|
return p.plugins[y.name] = y, p.plugins[y.name].loaded || (p.plugins[y.name].loaded = function() {
|
|
4015
4023
|
return !0;
|
|
4016
4024
|
}), p;
|
|
4017
|
-
}, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), a = e.storage ? e.storage : { getItem:
|
|
4025
|
+
}, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), a = e.storage ? e.storage : { getItem: nt, setItem: at, removeItem: jt }, i = /* @__PURE__ */ function(p) {
|
|
4018
4026
|
return function(y, E, x) {
|
|
4019
|
-
return E.getState("user")[y] || (x &&
|
|
4027
|
+
return E.getState("user")[y] || (x && te(x) && x[y] ? x[y] : Ls(p)[y] || nt(Da(y)) || null);
|
|
4020
4028
|
};
|
|
4021
4029
|
}(a), o = n.plugins, c = n.events.filter(function(p) {
|
|
4022
4030
|
return !Na.includes(p);
|
|
@@ -4026,8 +4034,8 @@ function jb(e) {
|
|
|
4026
4034
|
return o;
|
|
4027
4035
|
}, s = new yb(), d = s.addMiddleware, h = s.removeMiddleware, m = s.dynamicMiddlewares, S = function() {
|
|
4028
4036
|
throw new Error("Abort disabled inListener");
|
|
4029
|
-
}, g = ib(), $ = Ls(a),
|
|
4030
|
-
|
|
4037
|
+
}, g = ib(), $ = Ls(a), P = A({}, $, r, g.an_uid ? { userId: g.an_uid } : {}, g.an_aid ? { anonymousId: g.an_aid } : {});
|
|
4038
|
+
P.anonymousId || (P.anonymousId = cn());
|
|
4031
4039
|
var b = A({ enable: function(p, y) {
|
|
4032
4040
|
return new Promise(function(E) {
|
|
4033
4041
|
R.dispatch({ type: j.enablePlugin, plugins: ca(p), _: { originalAction: j.enablePlugin } }, E, [y]);
|
|
@@ -4038,38 +4046,38 @@ function jb(e) {
|
|
|
4038
4046
|
});
|
|
4039
4047
|
} }, n.methods), v = !1, I = { identify: function(p, y, E, x) {
|
|
4040
4048
|
try {
|
|
4041
|
-
var U =
|
|
4042
|
-
|
|
4043
|
-
var
|
|
4044
|
-
return Promise.resolve(new Promise(function(N) {
|
|
4045
|
-
R.dispatch(A({ type: j.identifyStart, userId: M, traits: w || {}, options: P, anonymousId: T.anonymousId }, T.id && T.id !== U && { previousId: T.id }), N, [y, E, x]);
|
|
4046
|
-
}));
|
|
4047
|
-
} catch (N) {
|
|
4048
|
-
return Promise.reject(N);
|
|
4049
|
-
}
|
|
4050
|
-
}, track: function(p, y, E, x) {
|
|
4051
|
-
try {
|
|
4052
|
-
var U = ee(p) ? p.event : p;
|
|
4053
|
-
if (!U || !Ue(U)) throw new Error("EventMissing");
|
|
4054
|
-
var w = ee(p) ? p : y || {}, P = ee(E) ? E : {};
|
|
4049
|
+
var U = De(p) ? p : null, D = te(p) ? p : y, V = E || {}, w = I.user();
|
|
4050
|
+
at(Da(Le), U);
|
|
4051
|
+
var k = U || D.userId || i(Le, I, D);
|
|
4055
4052
|
return Promise.resolve(new Promise(function(T) {
|
|
4056
|
-
R.dispatch({ type: j.
|
|
4053
|
+
R.dispatch(A({ type: j.identifyStart, userId: k, traits: D || {}, options: V, anonymousId: w.anonymousId }, w.id && w.id !== U && { previousId: w.id }), T, [y, E, x]);
|
|
4057
4054
|
}));
|
|
4058
4055
|
} catch (T) {
|
|
4059
4056
|
return Promise.reject(T);
|
|
4060
4057
|
}
|
|
4061
|
-
},
|
|
4058
|
+
}, track: function(p, y, E, x) {
|
|
4062
4059
|
try {
|
|
4063
|
-
var
|
|
4060
|
+
var U = te(p) ? p.event : p;
|
|
4061
|
+
if (!U || !De(U)) throw new Error("EventMissing");
|
|
4062
|
+
var D = te(p) ? p : y || {}, V = te(E) ? E : {};
|
|
4064
4063
|
return Promise.resolve(new Promise(function(w) {
|
|
4065
|
-
R.dispatch({ type: j.
|
|
4064
|
+
R.dispatch({ type: j.trackStart, event: U, properties: D, options: V, userId: i(Le, I, y), anonymousId: i(gt, I, y) }, w, [y, E, x]);
|
|
4066
4065
|
}));
|
|
4067
4066
|
} catch (w) {
|
|
4068
4067
|
return Promise.reject(w);
|
|
4069
4068
|
}
|
|
4069
|
+
}, page: function(p, y, E) {
|
|
4070
|
+
try {
|
|
4071
|
+
var x = te(p) ? p : {}, U = te(y) ? y : {};
|
|
4072
|
+
return Promise.resolve(new Promise(function(D) {
|
|
4073
|
+
R.dispatch({ type: j.pageStart, properties: Pb(x), options: U, userId: i(Le, I, x), anonymousId: i(gt, I, x) }, D, [p, y, E]);
|
|
4074
|
+
}));
|
|
4075
|
+
} catch (D) {
|
|
4076
|
+
return Promise.reject(D);
|
|
4077
|
+
}
|
|
4070
4078
|
}, user: function(p) {
|
|
4071
|
-
if (p ===
|
|
4072
|
-
if (p ===
|
|
4079
|
+
if (p === Le || p === "id") return i(Le, I);
|
|
4080
|
+
if (p === gt || p === "anonId") return i(gt, I);
|
|
4073
4081
|
var y = I.getState("user");
|
|
4074
4082
|
return p ? Es(y, p) : y;
|
|
4075
4083
|
}, reset: function(p) {
|
|
@@ -4081,20 +4089,20 @@ function jb(e) {
|
|
|
4081
4089
|
p(y), v = !0;
|
|
4082
4090
|
});
|
|
4083
4091
|
}, on: function(p, y) {
|
|
4084
|
-
if (!p || !
|
|
4092
|
+
if (!p || !re(y)) return !1;
|
|
4085
4093
|
if (p === j.bootstrap) throw new Error(".on disabled for " + p);
|
|
4086
4094
|
var E = /Start$|Start:/;
|
|
4087
4095
|
if (p === "*") {
|
|
4088
|
-
var x = function(
|
|
4089
|
-
return function(
|
|
4090
|
-
return function(
|
|
4091
|
-
return
|
|
4096
|
+
var x = function(w) {
|
|
4097
|
+
return function(k) {
|
|
4098
|
+
return function(T) {
|
|
4099
|
+
return T.type.match(E) && y({ payload: T, instance: I, plugins: o }), k(T);
|
|
4092
4100
|
};
|
|
4093
4101
|
};
|
|
4094
|
-
}, U = function(
|
|
4095
|
-
return function(
|
|
4096
|
-
return function(
|
|
4097
|
-
return
|
|
4102
|
+
}, U = function(w) {
|
|
4103
|
+
return function(k) {
|
|
4104
|
+
return function(T) {
|
|
4105
|
+
return T.type.match(E) || y({ payload: T, instance: I, plugins: o }), k(T);
|
|
4098
4106
|
};
|
|
4099
4107
|
};
|
|
4100
4108
|
};
|
|
@@ -4102,18 +4110,18 @@ function jb(e) {
|
|
|
4102
4110
|
h(x, Er), h(U, Or);
|
|
4103
4111
|
};
|
|
4104
4112
|
}
|
|
4105
|
-
var
|
|
4106
|
-
return function(
|
|
4107
|
-
return function(
|
|
4108
|
-
return
|
|
4113
|
+
var D = p.match(E) ? Er : Or, V = function(w) {
|
|
4114
|
+
return function(k) {
|
|
4115
|
+
return function(T) {
|
|
4116
|
+
return T.type === p && y({ payload: T, instance: I, plugins: o, abort: S }), k(T);
|
|
4109
4117
|
};
|
|
4110
4118
|
};
|
|
4111
4119
|
};
|
|
4112
|
-
return d(
|
|
4113
|
-
return h(
|
|
4120
|
+
return d(V, D), function() {
|
|
4121
|
+
return h(V, D);
|
|
4114
4122
|
};
|
|
4115
4123
|
}, once: function(p, y) {
|
|
4116
|
-
if (!p || !
|
|
4124
|
+
if (!p || !re(y)) return !1;
|
|
4117
4125
|
if (p === j.bootstrap) throw new Error(".once disabled for " + p);
|
|
4118
4126
|
var E = I.on(p, function(x) {
|
|
4119
4127
|
y({ payload: x.payload, instance: I, plugins: o, abort: S }), E();
|
|
@@ -4123,7 +4131,7 @@ function jb(e) {
|
|
|
4123
4131
|
var y = R.getState();
|
|
4124
4132
|
return p ? Es(y, p) : Object.assign({}, y);
|
|
4125
4133
|
}, dispatch: function(p) {
|
|
4126
|
-
var y =
|
|
4134
|
+
var y = De(p) ? { type: p } : p;
|
|
4127
4135
|
if (Ur.includes(y.type)) throw new Error("reserved action " + y.type);
|
|
4128
4136
|
var E = A({}, y, { _: A({ originalAction: y.type }, p._ || {}) });
|
|
4129
4137
|
R.dispatch(E);
|
|
@@ -4132,70 +4140,70 @@ function jb(e) {
|
|
|
4132
4140
|
}, removeItem: function(p, y) {
|
|
4133
4141
|
R.dispatch({ type: j.removeItemStart, key: p, options: y });
|
|
4134
4142
|
} }, setAnonymousId: function(p, y) {
|
|
4135
|
-
I.storage.setItem(
|
|
4143
|
+
I.storage.setItem(Me, p, y);
|
|
4136
4144
|
}, events: { core: Ur, plugins: c } }, O = n.middlewares.concat([function(p) {
|
|
4137
4145
|
return function(y) {
|
|
4138
4146
|
return function(E) {
|
|
4139
4147
|
return E.meta || (E.meta = Vs()), y(E);
|
|
4140
4148
|
};
|
|
4141
4149
|
};
|
|
4142
|
-
}, m(Er), mb(I, u, { all: f, plugins: c }), gb(a), fb(I), hb(I), m(Or)]), _ = { context: Ob, user: db(a), page: Eb, track: Sb, plugins: wb(u), queue: $b }, C =
|
|
4143
|
-
if (
|
|
4144
|
-
var
|
|
4145
|
-
|
|
4146
|
-
return arguments.length === 0 ? hl() :
|
|
4150
|
+
}, m(Er), mb(I, u, { all: f, plugins: c }), gb(a), fb(I), hb(I), m(Or)]), _ = { context: Ob, user: db(a), page: Eb, track: Sb, plugins: wb(u), queue: $b }, C = Et, M = Et;
|
|
4151
|
+
if (Z && e.debug) {
|
|
4152
|
+
var F = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
|
|
4153
|
+
F && (C = F({ trace: !0, traceLimit: 25 })), M = function() {
|
|
4154
|
+
return arguments.length === 0 ? hl() : te(typeof arguments[0]) ? Ws() : Ws().apply(null, arguments);
|
|
4147
4155
|
};
|
|
4148
4156
|
}
|
|
4149
4157
|
var G, L = function(p) {
|
|
4150
4158
|
return Object.keys(p).reduce(function(y, E) {
|
|
4151
4159
|
return _b.includes(E) || (y[E] = p[E]), y;
|
|
4152
4160
|
}, {});
|
|
4153
|
-
}(e),
|
|
4154
|
-
var E = y.name, x = y.config, U = y.loaded,
|
|
4155
|
-
return p[E] = { enabled:
|
|
4156
|
-
}, {}),
|
|
4161
|
+
}(e), N = n.pluginsArray.reduce(function(p, y) {
|
|
4162
|
+
var E = y.name, x = y.config, U = y.loaded, D = n.pluginEnabled[E];
|
|
4163
|
+
return p[E] = { enabled: D, initialized: !!D && !y.initialize, loaded: !!U({ config: x }), config: x }, p;
|
|
4164
|
+
}, {}), z = { context: L, user: P, plugins: N }, R = nl(function(p) {
|
|
4157
4165
|
for (var y = Object.keys(p), E = {}, x = 0; x < y.length; x++) {
|
|
4158
4166
|
var U = y[x];
|
|
4159
|
-
typeof p[U] ===
|
|
4167
|
+
typeof p[U] === Ue && (E[U] = p[U]);
|
|
4160
4168
|
}
|
|
4161
|
-
var
|
|
4169
|
+
var D, V = Object.keys(E);
|
|
4162
4170
|
try {
|
|
4163
|
-
(function(
|
|
4164
|
-
Object.keys(
|
|
4165
|
-
var
|
|
4166
|
-
if (typeof
|
|
4171
|
+
(function(w) {
|
|
4172
|
+
Object.keys(w).forEach(function(k) {
|
|
4173
|
+
var T = w[k];
|
|
4174
|
+
if (typeof T(void 0, { type: "@@redux/INIT" }) === _e || typeof T(void 0, { type: cb }) === _e) throw new Error("reducer " + k + " " + _e);
|
|
4167
4175
|
});
|
|
4168
4176
|
})(E);
|
|
4169
|
-
} catch (
|
|
4170
|
-
|
|
4177
|
+
} catch (w) {
|
|
4178
|
+
D = w;
|
|
4171
4179
|
}
|
|
4172
|
-
return function(
|
|
4173
|
-
if (
|
|
4174
|
-
for (var
|
|
4175
|
-
var
|
|
4176
|
-
if (typeof fn ===
|
|
4177
|
-
var Tl = ub(
|
|
4180
|
+
return function(w, k) {
|
|
4181
|
+
if (w === void 0 && (w = {}), D) throw D;
|
|
4182
|
+
for (var T = !1, H = {}, ee = 0; ee < V.length; ee++) {
|
|
4183
|
+
var je = V[ee], Ai = w[je], fn = (0, E[je])(Ai, k);
|
|
4184
|
+
if (typeof fn === _e) {
|
|
4185
|
+
var Tl = ub(je, k);
|
|
4178
4186
|
throw new Error(Tl);
|
|
4179
4187
|
}
|
|
4180
|
-
|
|
4188
|
+
H[je] = fn, T = T || fn !== Ai;
|
|
4181
4189
|
}
|
|
4182
|
-
return
|
|
4190
|
+
return T ? H : w;
|
|
4183
4191
|
};
|
|
4184
|
-
}(A({}, _, t)),
|
|
4192
|
+
}(A({}, _, t)), z, M(C(lb.apply(void 0, O))));
|
|
4185
4193
|
R.dispatch = (G = R.dispatch, function(p, y, E) {
|
|
4186
4194
|
var x = A({}, p, { meta: Vs(p.meta, y, ca(E)) });
|
|
4187
4195
|
return G.apply(null, [x]);
|
|
4188
4196
|
});
|
|
4189
4197
|
var B = Object.keys(o);
|
|
4190
|
-
R.dispatch({ type: j.bootstrap, plugins: B, config: L, params: g, user:
|
|
4198
|
+
R.dispatch({ type: j.bootstrap, plugins: B, config: L, params: g, user: P, initialUser: r, persistedUser: $ });
|
|
4191
4199
|
var W = B.filter(function(p) {
|
|
4192
4200
|
return n.pluginEnabled[p];
|
|
4193
|
-
}),
|
|
4201
|
+
}), Ke = B.filter(function(p) {
|
|
4194
4202
|
return !n.pluginEnabled[p];
|
|
4195
4203
|
});
|
|
4196
4204
|
return R.dispatch({ type: j.registerPlugins, plugins: B, enabled: n.pluginEnabled }), n.pluginsArray.map(function(p, y) {
|
|
4197
4205
|
var E = p.bootstrap, x = p.config, U = p.name;
|
|
4198
|
-
E &&
|
|
4206
|
+
E && re(E) && E({ instance: I, config: x, payload: p }), R.dispatch({ type: j.registerPluginType(U), name: U, enabled: n.pluginEnabled[U], plugin: p }), n.pluginsArray.length === y + 1 && R.dispatch({ type: j.initializeStart, plugins: W, disabled: Ke });
|
|
4199
4207
|
}), Cb(function(p) {
|
|
4200
4208
|
R.dispatch({ type: p ? j.offline : j.online });
|
|
4201
4209
|
}), function(p, y, E) {
|
|
@@ -4204,40 +4212,40 @@ function jb(e) {
|
|
|
4204
4212
|
}, 3e3);
|
|
4205
4213
|
}(R, u, I), I;
|
|
4206
4214
|
}
|
|
4207
|
-
var Er = "before", Or = "after",
|
|
4215
|
+
var Er = "before", Or = "after", qt = "cookie", Ye = ml(), vl = un, Ab = un;
|
|
4208
4216
|
function pl(e) {
|
|
4209
|
-
return
|
|
4217
|
+
return Ye ? un(e, "", -1) : jt(e);
|
|
4210
4218
|
}
|
|
4211
4219
|
function ml() {
|
|
4212
|
-
if (
|
|
4220
|
+
if (Ye !== void 0) return Ye;
|
|
4213
4221
|
var e = "cookiecookie";
|
|
4214
4222
|
try {
|
|
4215
|
-
un(e, e),
|
|
4223
|
+
un(e, e), Ye = document.cookie.indexOf(e) !== -1, pl(e);
|
|
4216
4224
|
} catch {
|
|
4217
|
-
|
|
4225
|
+
Ye = !1;
|
|
4218
4226
|
}
|
|
4219
|
-
return
|
|
4227
|
+
return Ye;
|
|
4220
4228
|
}
|
|
4221
4229
|
function un(e, t, r, n, a, i) {
|
|
4222
4230
|
if (typeof window < "u") {
|
|
4223
4231
|
var o = arguments.length > 1;
|
|
4224
|
-
return
|
|
4225
|
-
}
|
|
4226
|
-
}
|
|
4227
|
-
var
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
var
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
function
|
|
4232
|
+
return Ye === !1 && (o ? at(e, t) : nt(e)), o ? document.cookie = e + "=" + encodeURIComponent(t) + (r ? "; expires=" + new Date(+/* @__PURE__ */ new Date() + 1e3 * r).toUTCString() + (n ? "; path=" + n : "") + (a ? "; domain=" + a : "") + (i ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + e + "=")[1] || "").split(";")[0]);
|
|
4233
|
+
}
|
|
4234
|
+
}
|
|
4235
|
+
var Qt = "localStorage", Lb = Ti.bind(null, "localStorage");
|
|
4236
|
+
At("localStorage", "getItem", nt);
|
|
4237
|
+
At("localStorage", "setItem", at);
|
|
4238
|
+
At("localStorage", "removeItem", jt);
|
|
4239
|
+
var er = "sessionStorage", xb = Ti.bind(null, "sessionStorage");
|
|
4240
|
+
At("sessionStorage", "getItem", nt);
|
|
4241
|
+
At("sessionStorage", "setItem", at);
|
|
4242
|
+
At("sessionStorage", "removeItem", jt);
|
|
4243
|
+
function bt(e) {
|
|
4236
4244
|
var t = e;
|
|
4237
4245
|
try {
|
|
4238
4246
|
if ((t = JSON.parse(e)) === "true") return !0;
|
|
4239
4247
|
if (t === "false") return !1;
|
|
4240
|
-
if (
|
|
4248
|
+
if (te(t)) return t;
|
|
4241
4249
|
parseFloat(t) === t && (t = parseFloat(t));
|
|
4242
4250
|
} catch {
|
|
4243
4251
|
}
|
|
@@ -4246,39 +4254,39 @@ function yt(e) {
|
|
|
4246
4254
|
var Ub = Lb(), Nb = xb(), Db = ml();
|
|
4247
4255
|
function gl(e, t) {
|
|
4248
4256
|
if (e) {
|
|
4249
|
-
var r = Ei(t), n = !Ci(r), a = Oi(r) ?
|
|
4250
|
-
if (n && !
|
|
4251
|
-
var i = _i(r) ?
|
|
4257
|
+
var r = Ei(t), n = !Ci(r), a = Oi(r) ? bt(localStorage.getItem(e)) : void 0;
|
|
4258
|
+
if (n && !mt(a)) return a;
|
|
4259
|
+
var i = _i(r) ? bt(vl(e)) : void 0;
|
|
4252
4260
|
if (n && i) return i;
|
|
4253
|
-
var o = Ri(r) ?
|
|
4261
|
+
var o = Ri(r) ? bt(sessionStorage.getItem(e)) : void 0;
|
|
4254
4262
|
if (n && o) return o;
|
|
4255
|
-
var c =
|
|
4263
|
+
var c = nt(e);
|
|
4256
4264
|
return n ? c : { localStorage: a, sessionStorage: o, cookie: i, global: c };
|
|
4257
4265
|
}
|
|
4258
4266
|
}
|
|
4259
4267
|
function Mb(e, t, r) {
|
|
4260
|
-
if (e && !
|
|
4268
|
+
if (e && !mt(t)) {
|
|
4261
4269
|
var n = {}, a = Ei(r), i = JSON.stringify(t), o = !Ci(a);
|
|
4262
|
-
return Oi(a) && (n[
|
|
4270
|
+
return Oi(a) && (n[Qt] = _r(Qt, t, bt(localStorage.getItem(e))), localStorage.setItem(e, i), o) ? n[Qt] : _i(a) && (n[qt] = _r(qt, t, bt(vl(e))), Ab(e, i), o) ? n[qt] : Ri(a) && (n[er] = _r(er, t, bt(sessionStorage.getItem(e))), sessionStorage.setItem(e, i), o) ? n[er] : (n[Xt] = _r(Xt, t, nt(e)), at(e, t), o ? n[Xt] : n);
|
|
4263
4271
|
}
|
|
4264
4272
|
}
|
|
4265
4273
|
function Fb(e, t) {
|
|
4266
4274
|
if (e) {
|
|
4267
4275
|
var r = Ei(t), n = gl(e, qu), a = {};
|
|
4268
|
-
return !
|
|
4276
|
+
return !mt(n.localStorage) && Oi(r) && (localStorage.removeItem(e), a[Qt] = n.localStorage), !mt(n.cookie) && _i(r) && (pl(e), a[qt] = n.cookie), !mt(n.sessionStorage) && Ri(r) && (sessionStorage.removeItem(e), a[er] = n.sessionStorage), !mt(n.global) && ln(r, Xt) && (jt(e), a[Xt] = n.global), a;
|
|
4269
4277
|
}
|
|
4270
4278
|
}
|
|
4271
4279
|
function Ei(e) {
|
|
4272
|
-
return e ?
|
|
4280
|
+
return e ? De(e) ? e : e.storage : Xu;
|
|
4273
4281
|
}
|
|
4274
4282
|
function Oi(e) {
|
|
4275
|
-
return Ub && ln(e,
|
|
4283
|
+
return Ub && ln(e, Qt);
|
|
4276
4284
|
}
|
|
4277
4285
|
function _i(e) {
|
|
4278
|
-
return Db && ln(e,
|
|
4286
|
+
return Db && ln(e, qt);
|
|
4279
4287
|
}
|
|
4280
4288
|
function Ri(e) {
|
|
4281
|
-
return Nb && ln(e,
|
|
4289
|
+
return Nb && ln(e, er);
|
|
4282
4290
|
}
|
|
4283
4291
|
function Ci(e) {
|
|
4284
4292
|
return e === qu || e === "all";
|
|
@@ -4371,37 +4379,37 @@ function Vb(e) {
|
|
|
4371
4379
|
}
|
|
4372
4380
|
function Zb() {
|
|
4373
4381
|
Gb(() => {
|
|
4374
|
-
|
|
4382
|
+
Oe.page();
|
|
4375
4383
|
});
|
|
4376
4384
|
}
|
|
4377
4385
|
function Yb(e) {
|
|
4378
|
-
if (e === void 0 && (e = {}), !
|
|
4386
|
+
if (e === void 0 && (e = {}), !Z) return Ua;
|
|
4379
4387
|
var t = Xs(), r = Ma(), n = Js(), a = Rr(n, t), i = Rr(r, t), o = [], c = [], l = [], f = n, u = a, s = i, d = Object.keys(e);
|
|
4380
4388
|
if (!d.length) return Ua;
|
|
4381
4389
|
var h = d.map(function(S) {
|
|
4382
4390
|
return Number(S);
|
|
4383
4391
|
}), m = sb(function() {
|
|
4384
|
-
var S = Xs(), g = function(L,
|
|
4385
|
-
return
|
|
4386
|
-
return
|
|
4392
|
+
var S = Xs(), g = function(L, N) {
|
|
4393
|
+
return N.map(function(z) {
|
|
4394
|
+
return z === 100 ? L - 5 : L * (z / 100);
|
|
4387
4395
|
});
|
|
4388
|
-
}(S, h), $ = Ma(),
|
|
4396
|
+
}(S, h), $ = Ma(), P = Js(), b = Rr(P, S), v = Rr($, S);
|
|
4389
4397
|
if (u = b > u ? b : u, s = v < s ? v : s, !(o.length >= h.length)) {
|
|
4390
|
-
var I = f ===
|
|
4391
|
-
I ? O = "initial" : f <=
|
|
4398
|
+
var I = f === P, O = "up";
|
|
4399
|
+
I ? O = "initial" : f <= P && (O = "down");
|
|
4392
4400
|
var _ = g, C = h;
|
|
4393
4401
|
(O === "up" || I) && (_ = g.slice().reverse(), C = h.slice().reverse());
|
|
4394
|
-
var
|
|
4395
|
-
var R = _[
|
|
4396
|
-
return l.includes(
|
|
4397
|
-
return B !==
|
|
4398
|
-
}), L.singleFunction =
|
|
4402
|
+
var M = C.reduce(function(L, N, z) {
|
|
4403
|
+
var R = _[z];
|
|
4404
|
+
return l.includes(N) && P <= R && (l = l.filter(function(B) {
|
|
4405
|
+
return B !== N;
|
|
4406
|
+
}), L.singleFunction = N), O === "down" && !o.includes(N) && P >= R && N > i ? (c.push(N), L.callbacks = L.callbacks.concat(N), L) : O === "up" && !o.includes(N) && P <= R && N <= b ? (L.foundFunc = [N], L) : (I && P >= R && L.foundFunc.length === 0 && (L.foundFunc = [N]), !c.includes(N) && P >= R && (c.push(N), L.singleFunction ? l.push(N) : L.singleFunction = N), L);
|
|
4399
4407
|
}, { foundFunc: [], singleFunction: null, callbacks: [], direction: O });
|
|
4400
|
-
if (f =
|
|
4401
|
-
|
|
4402
|
-
}),
|
|
4403
|
-
var
|
|
4404
|
-
|
|
4408
|
+
if (f = P, O === "down" && M.callbacks && M.callbacks.forEach(function(L) {
|
|
4409
|
+
re(e[L]) && (e[L]({ trigger: L, direction: O, scrollMin: s, scrollMax: u, range: [s, u] }), o.push(L));
|
|
4410
|
+
}), M.singleFunction) {
|
|
4411
|
+
var F = M.singleFunction, G = M.direction;
|
|
4412
|
+
re(e[F]) && e[F]({ trigger: F, direction: G, scrollMin: s, scrollMax: u, range: [s, u] }), o.push(F);
|
|
4405
4413
|
}
|
|
4406
4414
|
}
|
|
4407
4415
|
}, 500);
|
|
@@ -4410,16 +4418,16 @@ function Yb(e) {
|
|
|
4410
4418
|
};
|
|
4411
4419
|
}
|
|
4412
4420
|
function Ma() {
|
|
4413
|
-
return
|
|
4421
|
+
return Z ? document.body.scrollTop || document.documentElement.scrollTop : 0;
|
|
4414
4422
|
}
|
|
4415
4423
|
function Jb() {
|
|
4416
|
-
return
|
|
4424
|
+
return Z ? window.innerHeight || document.documentElement.clientHeight : 0;
|
|
4417
4425
|
}
|
|
4418
4426
|
function Js() {
|
|
4419
4427
|
return Math.round(Ma() + Jb());
|
|
4420
4428
|
}
|
|
4421
4429
|
function Xs() {
|
|
4422
|
-
if (!
|
|
4430
|
+
if (!Z) return 0;
|
|
4423
4431
|
var e = document.body, t = document.documentElement;
|
|
4424
4432
|
return Math.max(e.scrollHeight, e.offsetHeight, t.clientHeight, t.scrollHeight, t.offsetHeight);
|
|
4425
4433
|
}
|
|
@@ -4430,7 +4438,7 @@ var qs = "EventListener";
|
|
|
4430
4438
|
function Xb(e) {
|
|
4431
4439
|
return function(t, r, n, a) {
|
|
4432
4440
|
var i = n || Ua, o = a || !1;
|
|
4433
|
-
if (!
|
|
4441
|
+
if (!Z) return i;
|
|
4434
4442
|
var c = Vr(r), l = Vr(t, !0);
|
|
4435
4443
|
if (!l.length) throw new Error("noElements");
|
|
4436
4444
|
if (!c.length) throw new Error("noEvent");
|
|
@@ -4447,7 +4455,7 @@ function Xb(e) {
|
|
|
4447
4455
|
};
|
|
4448
4456
|
}
|
|
4449
4457
|
function Vr(e, t) {
|
|
4450
|
-
if (
|
|
4458
|
+
if (De(e)) return t ? Vr(document.querySelectorAll(e)) : (r = e).split(r.indexOf(",") > -1 ? "," : " ").map(function(o) {
|
|
4451
4459
|
return o.trim();
|
|
4452
4460
|
});
|
|
4453
4461
|
var r;
|
|
@@ -4457,7 +4465,7 @@ function Vr(e, t) {
|
|
|
4457
4465
|
}
|
|
4458
4466
|
var i = rb(e);
|
|
4459
4467
|
return t ? i.map(function(o) {
|
|
4460
|
-
return
|
|
4468
|
+
return De(o) ? Vr(o, !0) : o;
|
|
4461
4469
|
}).flat() : i;
|
|
4462
4470
|
}
|
|
4463
4471
|
function qb(e, t) {
|
|
@@ -4468,7 +4476,7 @@ function qb(e, t) {
|
|
|
4468
4476
|
}
|
|
4469
4477
|
var ua = Xb("Event");
|
|
4470
4478
|
function yl(e, t) {
|
|
4471
|
-
return
|
|
4479
|
+
return Z && re(window[e]) ? (r = window[e], n = t, (a = window) === void 0 && (a = null), re(r) ? function() {
|
|
4472
4480
|
r.apply(a, arguments), n.apply(a, arguments);
|
|
4473
4481
|
} : n) : window[e] = t;
|
|
4474
4482
|
var r, n, a;
|
|
@@ -4527,8 +4535,8 @@ function nS(e) {
|
|
|
4527
4535
|
return clearTimeout(t);
|
|
4528
4536
|
};
|
|
4529
4537
|
function m(g) {
|
|
4530
|
-
h(), i && !u && i(
|
|
4531
|
-
u = !0, n && (r = /* @__PURE__ */ new Date(), n(
|
|
4538
|
+
h(), i && !u && i(Ht(d), g), a && u && (u = !1, a(Ht(r), g), d = /* @__PURE__ */ new Date()), t = setTimeout(function() {
|
|
4539
|
+
u = !0, n && (r = /* @__PURE__ */ new Date(), n(Ht(d), g));
|
|
4532
4540
|
}, c);
|
|
4533
4541
|
}
|
|
4534
4542
|
var S = rS(m, { throttle: f });
|
|
@@ -4539,26 +4547,26 @@ function nS(e) {
|
|
|
4539
4547
|
return s = !1, d = /* @__PURE__ */ new Date(), m({ type: "load" }), g();
|
|
4540
4548
|
};
|
|
4541
4549
|
}, getStatus: function() {
|
|
4542
|
-
return { isIdle: u, isDisabled: s, active: u ? 0 :
|
|
4550
|
+
return { isIdle: u, isDisabled: s, active: u ? 0 : Ht(d, s), idle: u ? Ht(r, s) : 0 };
|
|
4543
4551
|
} };
|
|
4544
4552
|
}
|
|
4545
|
-
function
|
|
4553
|
+
function Ht(e, t) {
|
|
4546
4554
|
return t ? 0 : Math.round((/* @__PURE__ */ new Date() - e) / 1e3);
|
|
4547
4555
|
}
|
|
4548
4556
|
const ec = 5e3;
|
|
4549
4557
|
class aS {
|
|
4550
4558
|
constructor(t) {
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4559
|
+
oe(this, "element");
|
|
4560
|
+
oe(this, "isInViewport", !1);
|
|
4561
|
+
oe(this, "isAwake", !1);
|
|
4562
|
+
oe(this, "isFlushing");
|
|
4563
|
+
oe(this, "observer");
|
|
4564
|
+
oe(this, "lastEventAt", Date.now());
|
|
4565
|
+
oe(this, "registeredView", !1);
|
|
4566
|
+
oe(this, "viewCallback");
|
|
4567
|
+
oe(this, "activeDurationCallback");
|
|
4568
|
+
oe(this, "idleDurationCallback");
|
|
4569
|
+
oe(this, "scrollCallback");
|
|
4562
4570
|
this.element = t.element, this.viewCallback = t.viewCallback, this.activeDurationCallback = t.activeDurationCallback, this.idleDurationCallback = t.idleDurationCallback, this.scrollCallback = t.scrollCallback, this.observer = new IntersectionObserver(
|
|
4563
4571
|
(r) => {
|
|
4564
4572
|
r.forEach((n) => {
|
|
@@ -4614,30 +4622,30 @@ function iS() {
|
|
|
4614
4622
|
}
|
|
4615
4623
|
let bl = !1, Fa, rc, Zr;
|
|
4616
4624
|
function oS({ clientId: e, enabled: t = !0, environment: r }) {
|
|
4617
|
-
if (Fa = e, rc = t, Zr = `${
|
|
4625
|
+
if (Fa = e, rc = t, Zr = `${xe("logs", r)}/events`, !rc)
|
|
4618
4626
|
return;
|
|
4619
4627
|
Zb();
|
|
4620
4628
|
const n = new aS({
|
|
4621
4629
|
element: document.body,
|
|
4622
4630
|
viewCallback: () => {
|
|
4623
|
-
|
|
4631
|
+
Oe.page();
|
|
4624
4632
|
},
|
|
4625
4633
|
activeDurationCallback: (a, i, o) => {
|
|
4626
|
-
|
|
4634
|
+
Oe.track("activeDuration", {
|
|
4627
4635
|
duration: a,
|
|
4628
4636
|
durationStart: o,
|
|
4629
4637
|
flushing: i
|
|
4630
4638
|
});
|
|
4631
4639
|
},
|
|
4632
4640
|
idleDurationCallback: (a, i, o) => {
|
|
4633
|
-
|
|
4641
|
+
Oe.track("idleDuration", {
|
|
4634
4642
|
duration: a,
|
|
4635
4643
|
durationStart: o,
|
|
4636
4644
|
flushing: i
|
|
4637
4645
|
});
|
|
4638
4646
|
},
|
|
4639
4647
|
scrollCallback: (a) => {
|
|
4640
|
-
|
|
4648
|
+
Oe.track("scroll", {
|
|
4641
4649
|
scroll: a.scrollMax
|
|
4642
4650
|
});
|
|
4643
4651
|
}
|
|
@@ -4646,11 +4654,11 @@ function oS({ clientId: e, enabled: t = !0, environment: r }) {
|
|
|
4646
4654
|
n.flush();
|
|
4647
4655
|
}), lS(document.body, () => {
|
|
4648
4656
|
n.handleVisibilityChange();
|
|
4649
|
-
}), window.addEventListener(
|
|
4657
|
+
}), window.addEventListener(ye.AUTHENTICATED, async (a) => {
|
|
4650
4658
|
const i = a;
|
|
4651
|
-
await
|
|
4652
|
-
}), window.addEventListener(
|
|
4653
|
-
await
|
|
4659
|
+
await Oe.identify(i.detail.sub);
|
|
4660
|
+
}), window.addEventListener(ye.LOGOUT, async () => {
|
|
4661
|
+
await Oe.track("logout", {}), ji.flush(), await Oe.reset();
|
|
4654
4662
|
});
|
|
4655
4663
|
}
|
|
4656
4664
|
function Sl(e) {
|
|
@@ -4707,7 +4715,7 @@ function la(e) {
|
|
|
4707
4715
|
} else
|
|
4708
4716
|
ji.push(e);
|
|
4709
4717
|
}
|
|
4710
|
-
const
|
|
4718
|
+
const Oe = Bb({
|
|
4711
4719
|
app: Ju,
|
|
4712
4720
|
// @ts-expect-error The type in the library is incorrect. It should be a string.
|
|
4713
4721
|
version: Pi,
|
|
@@ -4747,7 +4755,7 @@ const Ee = Bb({
|
|
|
4747
4755
|
]
|
|
4748
4756
|
});
|
|
4749
4757
|
function sS(e, t) {
|
|
4750
|
-
|
|
4758
|
+
Oe.track(e, t);
|
|
4751
4759
|
}
|
|
4752
4760
|
function cS() {
|
|
4753
4761
|
return bl = !0, ji.flush();
|
|
@@ -4798,19 +4806,19 @@ function dS(e) {
|
|
|
4798
4806
|
deleteTag: S,
|
|
4799
4807
|
setTag: g,
|
|
4800
4808
|
getUserMetadata: $,
|
|
4801
|
-
listUserMetadata:
|
|
4809
|
+
listUserMetadata: P,
|
|
4802
4810
|
setUserMetadata: b,
|
|
4803
4811
|
deleteUserMetadata: v,
|
|
4804
4812
|
getTally: I,
|
|
4805
4813
|
getTallies: O,
|
|
4806
4814
|
pushTally: _,
|
|
4807
4815
|
deleteTally: C,
|
|
4808
|
-
getProduct:
|
|
4809
|
-
getPaymentIssues:
|
|
4816
|
+
getProduct: M,
|
|
4817
|
+
getPaymentIssues: F,
|
|
4810
4818
|
isSpotifyLinked: G,
|
|
4811
4819
|
unlinkSpotify: L,
|
|
4812
|
-
linkSpotify:
|
|
4813
|
-
autoOnboardProduct:
|
|
4820
|
+
linkSpotify: N,
|
|
4821
|
+
autoOnboardProduct: z,
|
|
4814
4822
|
openHostedAccountPage: R,
|
|
4815
4823
|
generateLink: B
|
|
4816
4824
|
} = Ww(e), W = {
|
|
@@ -4857,7 +4865,7 @@ function dS(e) {
|
|
|
4857
4865
|
},
|
|
4858
4866
|
userMetadata: {
|
|
4859
4867
|
get: $,
|
|
4860
|
-
list:
|
|
4868
|
+
list: P,
|
|
4861
4869
|
set: b,
|
|
4862
4870
|
delete: v
|
|
4863
4871
|
},
|
|
@@ -4871,14 +4879,14 @@ function dS(e) {
|
|
|
4871
4879
|
list: c
|
|
4872
4880
|
},
|
|
4873
4881
|
products: {
|
|
4874
|
-
get:
|
|
4875
|
-
autoOnboard:
|
|
4876
|
-
linkSpotify:
|
|
4882
|
+
get: M,
|
|
4883
|
+
autoOnboard: z,
|
|
4884
|
+
linkSpotify: N
|
|
4877
4885
|
},
|
|
4878
4886
|
getVersion: hS,
|
|
4879
|
-
getPaymentIssues:
|
|
4887
|
+
getPaymentIssues: F,
|
|
4880
4888
|
generateLink: B,
|
|
4881
|
-
clearCache:
|
|
4889
|
+
clearCache: pe
|
|
4882
4890
|
};
|
|
4883
4891
|
return e.namespace && (window[e.namespace] = W), W;
|
|
4884
4892
|
}
|
|
@@ -4943,7 +4951,7 @@ function mS() {
|
|
|
4943
4951
|
const e = new URLSearchParams(window.location.search), t = e.get(ic), r = e.get(ac);
|
|
4944
4952
|
if (t !== null || r !== null) {
|
|
4945
4953
|
const n = new URL(window.location.href);
|
|
4946
|
-
e.delete(ic), e.delete(ac), n.search = e.toString(),
|
|
4954
|
+
e.delete(ic), e.delete(ac), n.search = e.toString(), pe(), window.history.replaceState(null, "", n);
|
|
4947
4955
|
}
|
|
4948
4956
|
}
|
|
4949
4957
|
function gS() {
|
|
@@ -4968,7 +4976,7 @@ async function yS() {
|
|
|
4968
4976
|
if (!t)
|
|
4969
4977
|
return;
|
|
4970
4978
|
const r = await Aw();
|
|
4971
|
-
(r == null ? void 0 : r.email) !== t && (
|
|
4979
|
+
(r == null ? void 0 : r.email) !== t && (pe(), ki({ authorizationParams: { email_hint: t, login_hint: t } }));
|
|
4972
4980
|
const n = new URL(window.location.href);
|
|
4973
4981
|
n.searchParams.delete(oc), window.history.replaceState(null, "", n);
|
|
4974
4982
|
}
|
|
@@ -4977,7 +4985,7 @@ function wS() {
|
|
|
4977
4985
|
const e = new URLSearchParams(window.location.search), t = e.get(sc);
|
|
4978
4986
|
if (t !== null) {
|
|
4979
4987
|
const r = new URL(window.location.href);
|
|
4980
|
-
e.delete(sc), r.search = e.toString(),
|
|
4988
|
+
e.delete(sc), r.search = e.toString(), Fe(ye.PURCHASE, { itemSrc: t }), pe(), window.history.replaceState(null, "", r);
|
|
4981
4989
|
}
|
|
4982
4990
|
}
|
|
4983
4991
|
const cc = "sesamy-login";
|
|
@@ -5002,7 +5010,7 @@ async function SS(e) {
|
|
|
5002
5010
|
...e.auth
|
|
5003
5011
|
}), e.transform && await vS(e.transform);
|
|
5004
5012
|
const t = dS({ clientId: e.clientId, environment: e.environment, ...e.api });
|
|
5005
|
-
return
|
|
5013
|
+
return Fe(ye.READY, {}), pS(), mS(), gS(), await bS(), await yS(), wS(), t;
|
|
5006
5014
|
}
|
|
5007
5015
|
if (typeof document < "u") {
|
|
5008
5016
|
const e = document.getElementById("sesamy-js");
|