@kalamba/sdk 0.1.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.
@@ -0,0 +1,1746 @@
1
+ /**
2
+ * BSD 3-Clause License
3
+ * Copyright (c) 2024, Kalamba Games Limited
4
+ */
5
+ var ma = Object.defineProperty;
6
+ var wa = (e, r, a) => r in e ? ma(e, r, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[r] = a;
7
+ var je = (e, r, a) => (wa(e, typeof r != "symbol" ? r + "" : r, a), a), ke = (e, r, a) => {
8
+ if (!r.has(e))
9
+ throw TypeError("Cannot " + a);
10
+ };
11
+ var A = (e, r, a) => (ke(e, r, "read from private field"), a ? a.call(e) : r.get(e)), N = (e, r, a) => {
12
+ if (r.has(e))
13
+ throw TypeError("Cannot add the same private member more than once");
14
+ r instanceof WeakSet ? r.add(e) : r.set(e, a);
15
+ }, j = (e, r, a, t) => (ke(e, r, "write to private field"), t ? t.call(e, a) : r.set(e, a), a);
16
+ import { c as H, n as Sa, g as ee } from "./noop-3336849b.js";
17
+ const Be = () => {
18
+ }, Aa = () => {
19
+ };
20
+ var O, J, P, L;
21
+ class ag {
22
+ constructor({
23
+ messagePort: r,
24
+ plugins: a,
25
+ configManager: t
26
+ }) {
27
+ N(this, O, void 0);
28
+ N(this, J, void 0);
29
+ N(this, P, {
30
+ balance: 0,
31
+ bet: {
32
+ base: 0,
33
+ multiplier: 0
34
+ },
35
+ gameName: "",
36
+ version: ""
37
+ });
38
+ N(this, L, void 0);
39
+ j(this, O, r), j(this, L, new t()), j(this, J, {
40
+ rgs: new a.rgs(this.config),
41
+ casino: a.casino.map((n) => new n(this.config)),
42
+ telemetry: a.telemetry.map(
43
+ ({ plugin: n, trackers: s }) => new n(
44
+ s.map((i) => new i(this.config)),
45
+ this.config
46
+ )
47
+ )
48
+ }), this.on("balance", ({ balance: n }) => {
49
+ this.setState((s) => ({ ...s, balance: n }));
50
+ }), this.on("sdk:bet", (n) => {
51
+ this.setState((s) => ({ ...s, bet: n }));
52
+ }), this.on("sdk:playCycleStart", () => {
53
+ this.setState((n) => ({ ...n, balance: n.balance - n.bet.base * n.bet.multiplier }));
54
+ }), this.on("sdk:openGame", (n) => {
55
+ this.setState((s) => ({ ...s, ...n }));
56
+ }), this.on("rgs:openGameResponse", async (n) => {
57
+ this.setState((s) => ({ ...s, balance: n.balance })), this.config.ui = await A(this, L).getConfig(), this.send("configured", this.config);
58
+ }), this.forwardMessages();
59
+ }
60
+ setState(r) {
61
+ j(this, P, r(A(this, P))), this.send("state", A(this, P));
62
+ }
63
+ forwardMessages() {
64
+ this.forwardToPlugins("casino", [
65
+ "sdk:autoplay",
66
+ "sdk:balance",
67
+ "sdk:bet",
68
+ "sdk:cashier",
69
+ "sdk:choice",
70
+ "sdk:close",
71
+ "sdk:error",
72
+ "sdk:history",
73
+ "sdk:loadEnd",
74
+ "sdk:loadProgress",
75
+ "sdk:loadStart",
76
+ "sdk:openGame",
77
+ "sdk:play",
78
+ "sdk:playCycleEnd",
79
+ "sdk:playCycleStart",
80
+ "sdk:playEnd",
81
+ "sdk:playStart",
82
+ "sdk:settings"
83
+ ]), this.forwardToPlugins("casino", ["rgs:playResponse", "rgs:openGameResponse"]), this.forwardToPlugins("rgs", ["sdk:openGame", "sdk:play", "sdk:history"]), this.forwardToPlugins("rgs", ["casino:play", "casino:cashier", "casino:close", "casino:history"]), this.forwardToPlugins("telemetry", [
84
+ "sdk:autoplay",
85
+ "sdk:error",
86
+ "sdk:playCycleStart",
87
+ "sdk:playCycleEnd",
88
+ "sdk:loadStart",
89
+ "sdk:loadProgress",
90
+ "sdk:loadEnd",
91
+ "sdk:telemetry.click",
92
+ "sdk:telemetry.orientationChange"
93
+ ]), this.forwardToPlugins("telemetry", ["rgs:openGameResponse", "rgs:playResponse"]), this.forwardToSdk([
94
+ "casino:balance",
95
+ "casino:bet",
96
+ "casino:choice",
97
+ "casino:freeze",
98
+ "casino:help",
99
+ "casino:paytable",
100
+ "casino:resume",
101
+ "casino:settings",
102
+ "casino:suspend",
103
+ "casino:unfreeze"
104
+ ]), this.forwardToSdk([
105
+ "rgs:openGameError",
106
+ "rgs:openGameResponse",
107
+ "rgs:playError",
108
+ "rgs:playResponse",
109
+ "rgs:realityCheck"
110
+ ]);
111
+ }
112
+ get config() {
113
+ return A(this, L).config;
114
+ }
115
+ forwardToPlugins(r, a) {
116
+ a.forEach((t) => {
117
+ const n = (s) => {
118
+ s.data.message === `kalamba:${t}` && (Be("wrapper:forwardToPlugins", r, s.data.message.replace(/^kalamba:/, ""), s.data.payload), window.postMessage({
119
+ message: `kalamba:wrapper-${r}:${t.replace(/^(.+):/, "")}`,
120
+ payload: s.data.payload
121
+ }));
122
+ };
123
+ window.addEventListener("message", n);
124
+ });
125
+ }
126
+ forwardToSdk(r) {
127
+ r.forEach((a) => {
128
+ const t = (n) => {
129
+ n.data.message === `kalamba:${a}` && (Aa("wrapper:forwardToSdk", n.data.message.replace(/^kalamba:/, ""), n.data.payload), A(this, O).postMessage(
130
+ {
131
+ message: `kalamba:wrapper:${a.replace(/^(.+):/, "")}`,
132
+ payload: n.data.payload
133
+ },
134
+ "*"
135
+ ));
136
+ };
137
+ window.addEventListener("message", t);
138
+ });
139
+ }
140
+ // TODO error messages
141
+ on(r, a, t) {
142
+ const n = function s(i) {
143
+ !new RegExp(`^kalamba:${r.includes(":") ? "" : "(.+):"}${r}$`).test(
144
+ i.data.message
145
+ ) || // Do not listen to messages forwarded by wrapper
146
+ new RegExp(`^kalamba:wrapper-(.+):${r}`).test(i.data.message) || new RegExp(`^kalamba:(.+)-wrapper:${r}`).test(i.data.message) || (Be("on", i.data.message.replace(/^kalamba:/, ""), i.data.payload), a(i.data.payload), t != null && t.once && window.removeEventListener("message", s));
147
+ };
148
+ window.addEventListener("message", n);
149
+ }
150
+ send(r, ...[a]) {
151
+ window.postMessage({
152
+ message: `kalamba:wrapper:${r}`,
153
+ payload: a
154
+ }), A(this, O).postMessage(
155
+ {
156
+ message: `kalamba:wrapper:${r}`,
157
+ payload: a
158
+ },
159
+ "*"
160
+ );
161
+ }
162
+ }
163
+ O = new WeakMap(), J = new WeakMap(), P = new WeakMap(), L = new WeakMap();
164
+ function Ta(e) {
165
+ var r = typeof e;
166
+ return e != null && (r == "object" || r == "function");
167
+ }
168
+ var b = Ta, Ca = b, Ue = Object.create, Oa = function() {
169
+ function e() {
170
+ }
171
+ return function(r) {
172
+ if (!Ca(r))
173
+ return {};
174
+ if (Ue)
175
+ return Ue(r);
176
+ e.prototype = r;
177
+ var a = new e();
178
+ return e.prototype = void 0, a;
179
+ };
180
+ }(), be = Oa;
181
+ function Pa() {
182
+ }
183
+ var me = Pa, La = be, Ma = me;
184
+ function W(e, r) {
185
+ this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!r, this.__index__ = 0, this.__values__ = void 0;
186
+ }
187
+ W.prototype = La(Ma.prototype);
188
+ W.prototype.constructor = W;
189
+ var we = W;
190
+ function Ea(e, r) {
191
+ for (var a = -1, t = r.length, n = e.length; ++a < t; )
192
+ e[n + a] = r[a];
193
+ return e;
194
+ }
195
+ var Gr = Ea, Ia = typeof H == "object" && H && H.Object === Object && H, Nr = Ia, xa = Nr, Fa = typeof self == "object" && self && self.Object === Object && self, Da = xa || Fa || Function("return this")(), _ = Da, Ra = _, Ga = Ra.Symbol, B = Ga, Ke = B, jr = Object.prototype, Na = jr.hasOwnProperty, ja = jr.toString, k = Ke ? Ke.toStringTag : void 0;
196
+ function ka(e) {
197
+ var r = Na.call(e, k), a = e[k];
198
+ try {
199
+ e[k] = void 0;
200
+ var t = !0;
201
+ } catch {
202
+ }
203
+ var n = ja.call(e);
204
+ return t && (r ? e[k] = a : delete e[k]), n;
205
+ }
206
+ var Ba = ka, Ua = Object.prototype, Ka = Ua.toString;
207
+ function Ha(e) {
208
+ return Ka.call(e);
209
+ }
210
+ var qa = Ha, He = B, Wa = Ba, za = qa, Qa = "[object Null]", Xa = "[object Undefined]", qe = He ? He.toStringTag : void 0;
211
+ function Ya(e) {
212
+ return e == null ? e === void 0 ? Xa : Qa : qe && qe in Object(e) ? Wa(e) : za(e);
213
+ }
214
+ var M = Ya;
215
+ function Va(e) {
216
+ return e != null && typeof e == "object";
217
+ }
218
+ var m = Va, Za = M, Ja = m, et = "[object Arguments]";
219
+ function rt(e) {
220
+ return Ja(e) && Za(e) == et;
221
+ }
222
+ var at = rt, We = at, tt = m, kr = Object.prototype, nt = kr.hasOwnProperty, st = kr.propertyIsEnumerable, it = We(function() {
223
+ return arguments;
224
+ }()) ? We : function(e) {
225
+ return tt(e) && nt.call(e, "callee") && !st.call(e, "callee");
226
+ }, re = it, ot = Array.isArray, d = ot, ze = B, ut = re, lt = d, Qe = ze ? ze.isConcatSpreadable : void 0;
227
+ function ft(e) {
228
+ return lt(e) || ut(e) || !!(Qe && e && e[Qe]);
229
+ }
230
+ var ct = ft, pt = Gr, ht = ct;
231
+ function Br(e, r, a, t, n) {
232
+ var s = -1, i = e.length;
233
+ for (a || (a = ht), n || (n = []); ++s < i; ) {
234
+ var o = e[s];
235
+ r > 0 && a(o) ? r > 1 ? Br(o, r - 1, a, t, n) : pt(n, o) : t || (n[n.length] = o);
236
+ }
237
+ return n;
238
+ }
239
+ var Ur = Br, vt = Ur;
240
+ function gt(e) {
241
+ var r = e == null ? 0 : e.length;
242
+ return r ? vt(e, 1) : [];
243
+ }
244
+ var dt = gt;
245
+ function yt(e, r, a) {
246
+ switch (a.length) {
247
+ case 0:
248
+ return e.call(r);
249
+ case 1:
250
+ return e.call(r, a[0]);
251
+ case 2:
252
+ return e.call(r, a[0], a[1]);
253
+ case 3:
254
+ return e.call(r, a[0], a[1], a[2]);
255
+ }
256
+ return e.apply(r, a);
257
+ }
258
+ var _t = yt, $t = _t, Xe = Math.max;
259
+ function bt(e, r, a) {
260
+ return r = Xe(r === void 0 ? e.length - 1 : r, 0), function() {
261
+ for (var t = arguments, n = -1, s = Xe(t.length - r, 0), i = Array(s); ++n < s; )
262
+ i[n] = t[r + n];
263
+ n = -1;
264
+ for (var o = Array(r + 1); ++n < r; )
265
+ o[n] = t[n];
266
+ return o[r] = a(i), $t(e, this, o);
267
+ };
268
+ }
269
+ var Kr = bt;
270
+ function mt(e) {
271
+ return function() {
272
+ return e;
273
+ };
274
+ }
275
+ var wt = mt, St = M, At = b, Tt = "[object AsyncFunction]", Ct = "[object Function]", Ot = "[object GeneratorFunction]", Pt = "[object Proxy]";
276
+ function Lt(e) {
277
+ if (!At(e))
278
+ return !1;
279
+ var r = St(e);
280
+ return r == Ct || r == Ot || r == Tt || r == Pt;
281
+ }
282
+ var Se = Lt, Mt = _, Et = Mt["__core-js_shared__"], It = Et, le = It, Ye = function() {
283
+ var e = /[^.]+$/.exec(le && le.keys && le.keys.IE_PROTO || "");
284
+ return e ? "Symbol(src)_1." + e : "";
285
+ }();
286
+ function xt(e) {
287
+ return !!Ye && Ye in e;
288
+ }
289
+ var Ft = xt, Dt = Function.prototype, Rt = Dt.toString;
290
+ function Gt(e) {
291
+ if (e != null) {
292
+ try {
293
+ return Rt.call(e);
294
+ } catch {
295
+ }
296
+ try {
297
+ return e + "";
298
+ } catch {
299
+ }
300
+ }
301
+ return "";
302
+ }
303
+ var Hr = Gt, Nt = Se, jt = Ft, kt = b, Bt = Hr, Ut = /[\\^$.*+?()[\]{}|]/g, Kt = /^\[object .+?Constructor\]$/, Ht = Function.prototype, qt = Object.prototype, Wt = Ht.toString, zt = qt.hasOwnProperty, Qt = RegExp(
304
+ "^" + Wt.call(zt).replace(Ut, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
305
+ );
306
+ function Xt(e) {
307
+ if (!kt(e) || jt(e))
308
+ return !1;
309
+ var r = Nt(e) ? Qt : Kt;
310
+ return r.test(Bt(e));
311
+ }
312
+ var Yt = Xt;
313
+ function Vt(e, r) {
314
+ return e == null ? void 0 : e[r];
315
+ }
316
+ var Zt = Vt, Jt = Yt, en = Zt;
317
+ function rn(e, r) {
318
+ var a = en(e, r);
319
+ return Jt(a) ? a : void 0;
320
+ }
321
+ var C = rn, an = C, tn = function() {
322
+ try {
323
+ var e = an(Object, "defineProperty");
324
+ return e({}, "", {}), e;
325
+ } catch {
326
+ }
327
+ }(), qr = tn;
328
+ function nn(e) {
329
+ return e;
330
+ }
331
+ var ae = nn, sn = wt, Ve = qr, on = ae, un = Ve ? function(e, r) {
332
+ return Ve(e, "toString", {
333
+ configurable: !0,
334
+ enumerable: !1,
335
+ value: sn(r),
336
+ writable: !0
337
+ });
338
+ } : on, ln = un, fn = 800, cn = 16, pn = Date.now;
339
+ function hn(e) {
340
+ var r = 0, a = 0;
341
+ return function() {
342
+ var t = pn(), n = cn - (t - a);
343
+ if (a = t, n > 0) {
344
+ if (++r >= fn)
345
+ return arguments[0];
346
+ } else
347
+ r = 0;
348
+ return e.apply(void 0, arguments);
349
+ };
350
+ }
351
+ var vn = hn, gn = ln, dn = vn, yn = dn(gn), Wr = yn, _n = dt, $n = Kr, bn = Wr;
352
+ function mn(e) {
353
+ return bn($n(e, void 0, _n), e + "");
354
+ }
355
+ var wn = mn, Sn = C, An = _, Tn = Sn(An, "WeakMap"), zr = Tn, Ze = zr, Cn = Ze && new Ze(), On = Cn, Je = On, Pn = Sa, Ln = Je ? function(e) {
356
+ return Je.get(e);
357
+ } : Pn, Qr = Ln, Mn = {}, En = Mn, er = En, In = Object.prototype, xn = In.hasOwnProperty;
358
+ function Fn(e) {
359
+ for (var r = e.name + "", a = er[r], t = xn.call(er, r) ? a.length : 0; t--; ) {
360
+ var n = a[t], s = n.func;
361
+ if (s == null || s == e)
362
+ return n.name;
363
+ }
364
+ return r;
365
+ }
366
+ var Xr = Fn, Dn = be, Rn = me, Gn = 4294967295;
367
+ function z(e) {
368
+ this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = Gn, this.__views__ = [];
369
+ }
370
+ z.prototype = Dn(Rn.prototype);
371
+ z.prototype.constructor = z;
372
+ var Ae = z;
373
+ function Nn(e, r) {
374
+ var a = -1, t = e.length;
375
+ for (r || (r = Array(t)); ++a < t; )
376
+ r[a] = e[a];
377
+ return r;
378
+ }
379
+ var Yr = Nn, jn = Ae, kn = we, Bn = Yr;
380
+ function Un(e) {
381
+ if (e instanceof jn)
382
+ return e.clone();
383
+ var r = new kn(e.__wrapped__, e.__chain__);
384
+ return r.__actions__ = Bn(e.__actions__), r.__index__ = e.__index__, r.__values__ = e.__values__, r;
385
+ }
386
+ var Kn = Un, Hn = Ae, rr = we, qn = me, Wn = d, zn = m, Qn = Kn, Xn = Object.prototype, Yn = Xn.hasOwnProperty;
387
+ function Q(e) {
388
+ if (zn(e) && !Wn(e) && !(e instanceof Hn)) {
389
+ if (e instanceof rr)
390
+ return e;
391
+ if (Yn.call(e, "__wrapped__"))
392
+ return Qn(e);
393
+ }
394
+ return new rr(e);
395
+ }
396
+ Q.prototype = qn.prototype;
397
+ Q.prototype.constructor = Q;
398
+ var Vn = Q, Zn = Ae, Jn = Qr, es = Xr, rs = Vn;
399
+ function as(e) {
400
+ var r = es(e), a = rs[r];
401
+ if (typeof a != "function" || !(r in Zn.prototype))
402
+ return !1;
403
+ if (e === a)
404
+ return !0;
405
+ var t = Jn(a);
406
+ return !!t && e === t[0];
407
+ }
408
+ var ts = as, ar = we, ns = wn, ss = Qr, fe = Xr, is = d, tr = ts, os = "Expected a function", us = 8, ls = 32, fs = 128, cs = 256;
409
+ function ps(e) {
410
+ return ns(function(r) {
411
+ var a = r.length, t = a, n = ar.prototype.thru;
412
+ for (e && r.reverse(); t--; ) {
413
+ var s = r[t];
414
+ if (typeof s != "function")
415
+ throw new TypeError(os);
416
+ if (n && !i && fe(s) == "wrapper")
417
+ var i = new ar([], !0);
418
+ }
419
+ for (t = i ? t : a; ++t < a; ) {
420
+ s = r[t];
421
+ var o = fe(s), u = o == "wrapper" ? ss(s) : void 0;
422
+ u && tr(u[0]) && u[1] == (fs | us | ls | cs) && !u[4].length && u[9] == 1 ? i = i[fe(u[0])].apply(i, u[3]) : i = s.length == 1 && tr(s) ? i[o]() : i.thru(s);
423
+ }
424
+ return function() {
425
+ var l = arguments, f = l[0];
426
+ if (i && l.length == 1 && is(f))
427
+ return i.plant(f).value();
428
+ for (var p = 0, c = a ? r[p].apply(this, l) : f; ++p < a; )
429
+ c = r[p].call(this, c);
430
+ return c;
431
+ };
432
+ });
433
+ }
434
+ var hs = ps, vs = hs, gs = vs(), ds = gs;
435
+ const ys = /* @__PURE__ */ ee(ds);
436
+ function _s() {
437
+ this.__data__ = [], this.size = 0;
438
+ }
439
+ var $s = _s;
440
+ function bs(e, r) {
441
+ return e === r || e !== e && r !== r;
442
+ }
443
+ var E = bs, ms = E;
444
+ function ws(e, r) {
445
+ for (var a = e.length; a--; )
446
+ if (ms(e[a][0], r))
447
+ return a;
448
+ return -1;
449
+ }
450
+ var te = ws, Ss = te, As = Array.prototype, Ts = As.splice;
451
+ function Cs(e) {
452
+ var r = this.__data__, a = Ss(r, e);
453
+ if (a < 0)
454
+ return !1;
455
+ var t = r.length - 1;
456
+ return a == t ? r.pop() : Ts.call(r, a, 1), --this.size, !0;
457
+ }
458
+ var Os = Cs, Ps = te;
459
+ function Ls(e) {
460
+ var r = this.__data__, a = Ps(r, e);
461
+ return a < 0 ? void 0 : r[a][1];
462
+ }
463
+ var Ms = Ls, Es = te;
464
+ function Is(e) {
465
+ return Es(this.__data__, e) > -1;
466
+ }
467
+ var xs = Is, Fs = te;
468
+ function Ds(e, r) {
469
+ var a = this.__data__, t = Fs(a, e);
470
+ return t < 0 ? (++this.size, a.push([e, r])) : a[t][1] = r, this;
471
+ }
472
+ var Rs = Ds, Gs = $s, Ns = Os, js = Ms, ks = xs, Bs = Rs;
473
+ function I(e) {
474
+ var r = -1, a = e == null ? 0 : e.length;
475
+ for (this.clear(); ++r < a; ) {
476
+ var t = e[r];
477
+ this.set(t[0], t[1]);
478
+ }
479
+ }
480
+ I.prototype.clear = Gs;
481
+ I.prototype.delete = Ns;
482
+ I.prototype.get = js;
483
+ I.prototype.has = ks;
484
+ I.prototype.set = Bs;
485
+ var ne = I, Us = ne;
486
+ function Ks() {
487
+ this.__data__ = new Us(), this.size = 0;
488
+ }
489
+ var Hs = Ks;
490
+ function qs(e) {
491
+ var r = this.__data__, a = r.delete(e);
492
+ return this.size = r.size, a;
493
+ }
494
+ var Ws = qs;
495
+ function zs(e) {
496
+ return this.__data__.get(e);
497
+ }
498
+ var Qs = zs;
499
+ function Xs(e) {
500
+ return this.__data__.has(e);
501
+ }
502
+ var Ys = Xs, Vs = C, Zs = _, Js = Vs(Zs, "Map"), Te = Js, ei = C, ri = ei(Object, "create"), se = ri, nr = se;
503
+ function ai() {
504
+ this.__data__ = nr ? nr(null) : {}, this.size = 0;
505
+ }
506
+ var ti = ai;
507
+ function ni(e) {
508
+ var r = this.has(e) && delete this.__data__[e];
509
+ return this.size -= r ? 1 : 0, r;
510
+ }
511
+ var si = ni, ii = se, oi = "__lodash_hash_undefined__", ui = Object.prototype, li = ui.hasOwnProperty;
512
+ function fi(e) {
513
+ var r = this.__data__;
514
+ if (ii) {
515
+ var a = r[e];
516
+ return a === oi ? void 0 : a;
517
+ }
518
+ return li.call(r, e) ? r[e] : void 0;
519
+ }
520
+ var ci = fi, pi = se, hi = Object.prototype, vi = hi.hasOwnProperty;
521
+ function gi(e) {
522
+ var r = this.__data__;
523
+ return pi ? r[e] !== void 0 : vi.call(r, e);
524
+ }
525
+ var di = gi, yi = se, _i = "__lodash_hash_undefined__";
526
+ function $i(e, r) {
527
+ var a = this.__data__;
528
+ return this.size += this.has(e) ? 0 : 1, a[e] = yi && r === void 0 ? _i : r, this;
529
+ }
530
+ var bi = $i, mi = ti, wi = si, Si = ci, Ai = di, Ti = bi;
531
+ function x(e) {
532
+ var r = -1, a = e == null ? 0 : e.length;
533
+ for (this.clear(); ++r < a; ) {
534
+ var t = e[r];
535
+ this.set(t[0], t[1]);
536
+ }
537
+ }
538
+ x.prototype.clear = mi;
539
+ x.prototype.delete = wi;
540
+ x.prototype.get = Si;
541
+ x.prototype.has = Ai;
542
+ x.prototype.set = Ti;
543
+ var Ci = x, sr = Ci, Oi = ne, Pi = Te;
544
+ function Li() {
545
+ this.size = 0, this.__data__ = {
546
+ hash: new sr(),
547
+ map: new (Pi || Oi)(),
548
+ string: new sr()
549
+ };
550
+ }
551
+ var Mi = Li;
552
+ function Ei(e) {
553
+ var r = typeof e;
554
+ return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? e !== "__proto__" : e === null;
555
+ }
556
+ var Ii = Ei, xi = Ii;
557
+ function Fi(e, r) {
558
+ var a = e.__data__;
559
+ return xi(r) ? a[typeof r == "string" ? "string" : "hash"] : a.map;
560
+ }
561
+ var ie = Fi, Di = ie;
562
+ function Ri(e) {
563
+ var r = Di(this, e).delete(e);
564
+ return this.size -= r ? 1 : 0, r;
565
+ }
566
+ var Gi = Ri, Ni = ie;
567
+ function ji(e) {
568
+ return Ni(this, e).get(e);
569
+ }
570
+ var ki = ji, Bi = ie;
571
+ function Ui(e) {
572
+ return Bi(this, e).has(e);
573
+ }
574
+ var Ki = Ui, Hi = ie;
575
+ function qi(e, r) {
576
+ var a = Hi(this, e), t = a.size;
577
+ return a.set(e, r), this.size += a.size == t ? 0 : 1, this;
578
+ }
579
+ var Wi = qi, zi = Mi, Qi = Gi, Xi = ki, Yi = Ki, Vi = Wi;
580
+ function F(e) {
581
+ var r = -1, a = e == null ? 0 : e.length;
582
+ for (this.clear(); ++r < a; ) {
583
+ var t = e[r];
584
+ this.set(t[0], t[1]);
585
+ }
586
+ }
587
+ F.prototype.clear = zi;
588
+ F.prototype.delete = Qi;
589
+ F.prototype.get = Xi;
590
+ F.prototype.has = Yi;
591
+ F.prototype.set = Vi;
592
+ var Ce = F, Zi = ne, Ji = Te, eo = Ce, ro = 200;
593
+ function ao(e, r) {
594
+ var a = this.__data__;
595
+ if (a instanceof Zi) {
596
+ var t = a.__data__;
597
+ if (!Ji || t.length < ro - 1)
598
+ return t.push([e, r]), this.size = ++a.size, this;
599
+ a = this.__data__ = new eo(t);
600
+ }
601
+ return a.set(e, r), this.size = a.size, this;
602
+ }
603
+ var to = ao, no = ne, so = Hs, io = Ws, oo = Qs, uo = Ys, lo = to;
604
+ function D(e) {
605
+ var r = this.__data__ = new no(e);
606
+ this.size = r.size;
607
+ }
608
+ D.prototype.clear = so;
609
+ D.prototype.delete = io;
610
+ D.prototype.get = oo;
611
+ D.prototype.has = uo;
612
+ D.prototype.set = lo;
613
+ var Oe = D, ir = qr;
614
+ function fo(e, r, a) {
615
+ r == "__proto__" && ir ? ir(e, r, {
616
+ configurable: !0,
617
+ enumerable: !0,
618
+ value: a,
619
+ writable: !0
620
+ }) : e[r] = a;
621
+ }
622
+ var Pe = fo, co = Pe, po = E;
623
+ function ho(e, r, a) {
624
+ (a !== void 0 && !po(e[r], a) || a === void 0 && !(r in e)) && co(e, r, a);
625
+ }
626
+ var Vr = ho;
627
+ function vo(e) {
628
+ return function(r, a, t) {
629
+ for (var n = -1, s = Object(r), i = t(r), o = i.length; o--; ) {
630
+ var u = i[e ? o : ++n];
631
+ if (a(s[u], u, s) === !1)
632
+ break;
633
+ }
634
+ return r;
635
+ };
636
+ }
637
+ var go = vo, yo = go, _o = yo(), Zr = _o, X = { exports: {} };
638
+ X.exports;
639
+ (function(e, r) {
640
+ var a = _, t = r && !r.nodeType && r, n = t && !0 && e && !e.nodeType && e, s = n && n.exports === t, i = s ? a.Buffer : void 0, o = i ? i.allocUnsafe : void 0;
641
+ function u(l, f) {
642
+ if (f)
643
+ return l.slice();
644
+ var p = l.length, c = o ? o(p) : new l.constructor(p);
645
+ return l.copy(c), c;
646
+ }
647
+ e.exports = u;
648
+ })(X, X.exports);
649
+ var $o = X.exports, bo = _, mo = bo.Uint8Array, Jr = mo, or = Jr;
650
+ function wo(e) {
651
+ var r = new e.constructor(e.byteLength);
652
+ return new or(r).set(new or(e)), r;
653
+ }
654
+ var So = wo, Ao = So;
655
+ function To(e, r) {
656
+ var a = r ? Ao(e.buffer) : e.buffer;
657
+ return new e.constructor(a, e.byteOffset, e.length);
658
+ }
659
+ var Co = To;
660
+ function Oo(e, r) {
661
+ return function(a) {
662
+ return e(r(a));
663
+ };
664
+ }
665
+ var ea = Oo, Po = ea, Lo = Po(Object.getPrototypeOf, Object), ra = Lo, Mo = Object.prototype;
666
+ function Eo(e) {
667
+ var r = e && e.constructor, a = typeof r == "function" && r.prototype || Mo;
668
+ return e === a;
669
+ }
670
+ var Le = Eo, Io = be, xo = ra, Fo = Le;
671
+ function Do(e) {
672
+ return typeof e.constructor == "function" && !Fo(e) ? Io(xo(e)) : {};
673
+ }
674
+ var Ro = Do, Go = 9007199254740991;
675
+ function No(e) {
676
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Go;
677
+ }
678
+ var Me = No, jo = Se, ko = Me;
679
+ function Bo(e) {
680
+ return e != null && ko(e.length) && !jo(e);
681
+ }
682
+ var R = Bo, Uo = R, Ko = m;
683
+ function Ho(e) {
684
+ return Ko(e) && Uo(e);
685
+ }
686
+ var qo = Ho, Y = { exports: {} };
687
+ function Wo() {
688
+ return !1;
689
+ }
690
+ var zo = Wo;
691
+ Y.exports;
692
+ (function(e, r) {
693
+ var a = _, t = zo, n = r && !r.nodeType && r, s = n && !0 && e && !e.nodeType && e, i = s && s.exports === n, o = i ? a.Buffer : void 0, u = o ? o.isBuffer : void 0, l = u || t;
694
+ e.exports = l;
695
+ })(Y, Y.exports);
696
+ var Ee = Y.exports, Qo = M, Xo = ra, Yo = m, Vo = "[object Object]", Zo = Function.prototype, Jo = Object.prototype, aa = Zo.toString, eu = Jo.hasOwnProperty, ru = aa.call(Object);
697
+ function au(e) {
698
+ if (!Yo(e) || Qo(e) != Vo)
699
+ return !1;
700
+ var r = Xo(e);
701
+ if (r === null)
702
+ return !0;
703
+ var a = eu.call(r, "constructor") && r.constructor;
704
+ return typeof a == "function" && a instanceof a && aa.call(a) == ru;
705
+ }
706
+ var tu = au, nu = M, su = Me, iu = m, ou = "[object Arguments]", uu = "[object Array]", lu = "[object Boolean]", fu = "[object Date]", cu = "[object Error]", pu = "[object Function]", hu = "[object Map]", vu = "[object Number]", gu = "[object Object]", du = "[object RegExp]", yu = "[object Set]", _u = "[object String]", $u = "[object WeakMap]", bu = "[object ArrayBuffer]", mu = "[object DataView]", wu = "[object Float32Array]", Su = "[object Float64Array]", Au = "[object Int8Array]", Tu = "[object Int16Array]", Cu = "[object Int32Array]", Ou = "[object Uint8Array]", Pu = "[object Uint8ClampedArray]", Lu = "[object Uint16Array]", Mu = "[object Uint32Array]", h = {};
707
+ h[wu] = h[Su] = h[Au] = h[Tu] = h[Cu] = h[Ou] = h[Pu] = h[Lu] = h[Mu] = !0;
708
+ h[ou] = h[uu] = h[bu] = h[lu] = h[mu] = h[fu] = h[cu] = h[pu] = h[hu] = h[vu] = h[gu] = h[du] = h[yu] = h[_u] = h[$u] = !1;
709
+ function Eu(e) {
710
+ return iu(e) && su(e.length) && !!h[nu(e)];
711
+ }
712
+ var Iu = Eu;
713
+ function xu(e) {
714
+ return function(r) {
715
+ return e(r);
716
+ };
717
+ }
718
+ var ta = xu, V = { exports: {} };
719
+ V.exports;
720
+ (function(e, r) {
721
+ var a = Nr, t = r && !r.nodeType && r, n = t && !0 && e && !e.nodeType && e, s = n && n.exports === t, i = s && a.process, o = function() {
722
+ try {
723
+ var u = n && n.require && n.require("util").types;
724
+ return u || i && i.binding && i.binding("util");
725
+ } catch {
726
+ }
727
+ }();
728
+ e.exports = o;
729
+ })(V, V.exports);
730
+ var Fu = V.exports, Du = Iu, Ru = ta, ur = Fu, lr = ur && ur.isTypedArray, Gu = lr ? Ru(lr) : Du, Ie = Gu;
731
+ function Nu(e, r) {
732
+ if (!(r === "constructor" && typeof e[r] == "function") && r != "__proto__")
733
+ return e[r];
734
+ }
735
+ var na = Nu, ju = Pe, ku = E, Bu = Object.prototype, Uu = Bu.hasOwnProperty;
736
+ function Ku(e, r, a) {
737
+ var t = e[r];
738
+ (!(Uu.call(e, r) && ku(t, a)) || a === void 0 && !(r in e)) && ju(e, r, a);
739
+ }
740
+ var Hu = Ku, qu = Hu, Wu = Pe;
741
+ function zu(e, r, a, t) {
742
+ var n = !a;
743
+ a || (a = {});
744
+ for (var s = -1, i = r.length; ++s < i; ) {
745
+ var o = r[s], u = t ? t(a[o], e[o], o, a, e) : void 0;
746
+ u === void 0 && (u = e[o]), n ? Wu(a, o, u) : qu(a, o, u);
747
+ }
748
+ return a;
749
+ }
750
+ var Qu = zu;
751
+ function Xu(e, r) {
752
+ for (var a = -1, t = Array(e); ++a < e; )
753
+ t[a] = r(a);
754
+ return t;
755
+ }
756
+ var Yu = Xu, Vu = 9007199254740991, Zu = /^(?:0|[1-9]\d*)$/;
757
+ function Ju(e, r) {
758
+ var a = typeof e;
759
+ return r = r ?? Vu, !!r && (a == "number" || a != "symbol" && Zu.test(e)) && e > -1 && e % 1 == 0 && e < r;
760
+ }
761
+ var xe = Ju, el = Yu, rl = re, al = d, tl = Ee, nl = xe, sl = Ie, il = Object.prototype, ol = il.hasOwnProperty;
762
+ function ul(e, r) {
763
+ var a = al(e), t = !a && rl(e), n = !a && !t && tl(e), s = !a && !t && !n && sl(e), i = a || t || n || s, o = i ? el(e.length, String) : [], u = o.length;
764
+ for (var l in e)
765
+ (r || ol.call(e, l)) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode.
766
+ (l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
767
+ n && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
768
+ s && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
769
+ nl(l, u))) && o.push(l);
770
+ return o;
771
+ }
772
+ var sa = ul;
773
+ function ll(e) {
774
+ var r = [];
775
+ if (e != null)
776
+ for (var a in Object(e))
777
+ r.push(a);
778
+ return r;
779
+ }
780
+ var fl = ll, cl = b, pl = Le, hl = fl, vl = Object.prototype, gl = vl.hasOwnProperty;
781
+ function dl(e) {
782
+ if (!cl(e))
783
+ return hl(e);
784
+ var r = pl(e), a = [];
785
+ for (var t in e)
786
+ t == "constructor" && (r || !gl.call(e, t)) || a.push(t);
787
+ return a;
788
+ }
789
+ var yl = dl, _l = sa, $l = yl, bl = R;
790
+ function ml(e) {
791
+ return bl(e) ? _l(e, !0) : $l(e);
792
+ }
793
+ var ia = ml, wl = Qu, Sl = ia;
794
+ function Al(e) {
795
+ return wl(e, Sl(e));
796
+ }
797
+ var Tl = Al, fr = Vr, Cl = $o, Ol = Co, Pl = Yr, Ll = Ro, cr = re, pr = d, Ml = qo, El = Ee, Il = Se, xl = b, Fl = tu, Dl = Ie, hr = na, Rl = Tl;
798
+ function Gl(e, r, a, t, n, s, i) {
799
+ var o = hr(e, a), u = hr(r, a), l = i.get(u);
800
+ if (l) {
801
+ fr(e, a, l);
802
+ return;
803
+ }
804
+ var f = s ? s(o, u, a + "", e, r, i) : void 0, p = f === void 0;
805
+ if (p) {
806
+ var c = pr(u), g = !c && El(u), v = !c && !g && Dl(u);
807
+ f = u, c || g || v ? pr(o) ? f = o : Ml(o) ? f = Pl(o) : g ? (p = !1, f = Cl(u, !0)) : v ? (p = !1, f = Ol(u, !0)) : f = [] : Fl(u) || cr(u) ? (f = o, cr(o) ? f = Rl(o) : (!xl(o) || Il(o)) && (f = Ll(u))) : p = !1;
808
+ }
809
+ p && (i.set(u, f), n(f, u, t, s, i), i.delete(u)), fr(e, a, f);
810
+ }
811
+ var Nl = Gl, jl = Oe, kl = Vr, Bl = Zr, Ul = Nl, Kl = b, Hl = ia, ql = na;
812
+ function oa(e, r, a, t, n) {
813
+ e !== r && Bl(r, function(s, i) {
814
+ if (n || (n = new jl()), Kl(s))
815
+ Ul(e, r, i, a, oa, t, n);
816
+ else {
817
+ var o = t ? t(ql(e, i), s, i + "", e, r, n) : void 0;
818
+ o === void 0 && (o = s), kl(e, i, o);
819
+ }
820
+ }, Hl);
821
+ }
822
+ var Wl = oa, zl = ae, Ql = Kr, Xl = Wr;
823
+ function Yl(e, r) {
824
+ return Xl(Ql(e, r, zl), e + "");
825
+ }
826
+ var ua = Yl, Vl = E, Zl = R, Jl = xe, ef = b;
827
+ function rf(e, r, a) {
828
+ if (!ef(a))
829
+ return !1;
830
+ var t = typeof r;
831
+ return (t == "number" ? Zl(a) && Jl(r, a.length) : t == "string" && r in a) ? Vl(a[r], e) : !1;
832
+ }
833
+ var la = rf, af = ua, tf = la;
834
+ function nf(e) {
835
+ return af(function(r, a) {
836
+ var t = -1, n = a.length, s = n > 1 ? a[n - 1] : void 0, i = n > 2 ? a[2] : void 0;
837
+ for (s = e.length > 3 && typeof s == "function" ? (n--, s) : void 0, i && tf(a[0], a[1], i) && (s = n < 3 ? void 0 : s, n = 1), r = Object(r); ++t < n; ) {
838
+ var o = a[t];
839
+ o && e(r, o, t, s);
840
+ }
841
+ return r;
842
+ });
843
+ }
844
+ var sf = nf, of = Wl, uf = sf, lf = uf(function(e, r, a) {
845
+ of(e, r, a);
846
+ }), ff = lf;
847
+ const ce = /* @__PURE__ */ ee(ff);
848
+ function cf(e, r) {
849
+ for (var a = -1, t = e == null ? 0 : e.length, n = Array(t); ++a < t; )
850
+ n[a] = r(e[a], a, e);
851
+ return n;
852
+ }
853
+ var fa = cf, pf = M, hf = m, vf = "[object Symbol]";
854
+ function gf(e) {
855
+ return typeof e == "symbol" || hf(e) && pf(e) == vf;
856
+ }
857
+ var oe = gf, df = d, yf = oe, _f = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, $f = /^\w*$/;
858
+ function bf(e, r) {
859
+ if (df(e))
860
+ return !1;
861
+ var a = typeof e;
862
+ return a == "number" || a == "symbol" || a == "boolean" || e == null || yf(e) ? !0 : $f.test(e) || !_f.test(e) || r != null && e in Object(r);
863
+ }
864
+ var Fe = bf, ca = Ce, mf = "Expected a function";
865
+ function De(e, r) {
866
+ if (typeof e != "function" || r != null && typeof r != "function")
867
+ throw new TypeError(mf);
868
+ var a = function() {
869
+ var t = arguments, n = r ? r.apply(this, t) : t[0], s = a.cache;
870
+ if (s.has(n))
871
+ return s.get(n);
872
+ var i = e.apply(this, t);
873
+ return a.cache = s.set(n, i) || s, i;
874
+ };
875
+ return a.cache = new (De.Cache || ca)(), a;
876
+ }
877
+ De.Cache = ca;
878
+ var wf = De, Sf = wf, Af = 500;
879
+ function Tf(e) {
880
+ var r = Sf(e, function(t) {
881
+ return a.size === Af && a.clear(), t;
882
+ }), a = r.cache;
883
+ return r;
884
+ }
885
+ var Cf = Tf, Of = Cf, Pf = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Lf = /\\(\\)?/g, Mf = Of(function(e) {
886
+ var r = [];
887
+ return e.charCodeAt(0) === 46 && r.push(""), e.replace(Pf, function(a, t, n, s) {
888
+ r.push(n ? s.replace(Lf, "$1") : t || a);
889
+ }), r;
890
+ }), Ef = Mf, vr = B, If = fa, xf = d, Ff = oe, Df = 1 / 0, gr = vr ? vr.prototype : void 0, dr = gr ? gr.toString : void 0;
891
+ function pa(e) {
892
+ if (typeof e == "string")
893
+ return e;
894
+ if (xf(e))
895
+ return If(e, pa) + "";
896
+ if (Ff(e))
897
+ return dr ? dr.call(e) : "";
898
+ var r = e + "";
899
+ return r == "0" && 1 / e == -Df ? "-0" : r;
900
+ }
901
+ var Rf = pa, Gf = Rf;
902
+ function Nf(e) {
903
+ return e == null ? "" : Gf(e);
904
+ }
905
+ var jf = Nf, kf = d, Bf = Fe, Uf = Ef, Kf = jf;
906
+ function Hf(e, r) {
907
+ return kf(e) ? e : Bf(e, r) ? [e] : Uf(Kf(e));
908
+ }
909
+ var ha = Hf, qf = oe, Wf = 1 / 0;
910
+ function zf(e) {
911
+ if (typeof e == "string" || qf(e))
912
+ return e;
913
+ var r = e + "";
914
+ return r == "0" && 1 / e == -Wf ? "-0" : r;
915
+ }
916
+ var ue = zf, Qf = ha, Xf = ue;
917
+ function Yf(e, r) {
918
+ r = Qf(r, e);
919
+ for (var a = 0, t = r.length; e != null && a < t; )
920
+ e = e[Xf(r[a++])];
921
+ return a && a == t ? e : void 0;
922
+ }
923
+ var Re = Yf, Vf = "__lodash_hash_undefined__";
924
+ function Zf(e) {
925
+ return this.__data__.set(e, Vf), this;
926
+ }
927
+ var Jf = Zf;
928
+ function ec(e) {
929
+ return this.__data__.has(e);
930
+ }
931
+ var rc = ec, ac = Ce, tc = Jf, nc = rc;
932
+ function Z(e) {
933
+ var r = -1, a = e == null ? 0 : e.length;
934
+ for (this.__data__ = new ac(); ++r < a; )
935
+ this.add(e[r]);
936
+ }
937
+ Z.prototype.add = Z.prototype.push = tc;
938
+ Z.prototype.has = nc;
939
+ var sc = Z;
940
+ function ic(e, r) {
941
+ for (var a = -1, t = e == null ? 0 : e.length; ++a < t; )
942
+ if (r(e[a], a, e))
943
+ return !0;
944
+ return !1;
945
+ }
946
+ var oc = ic;
947
+ function uc(e, r) {
948
+ return e.has(r);
949
+ }
950
+ var lc = uc, fc = sc, cc = oc, pc = lc, hc = 1, vc = 2;
951
+ function gc(e, r, a, t, n, s) {
952
+ var i = a & hc, o = e.length, u = r.length;
953
+ if (o != u && !(i && u > o))
954
+ return !1;
955
+ var l = s.get(e), f = s.get(r);
956
+ if (l && f)
957
+ return l == r && f == e;
958
+ var p = -1, c = !0, g = a & vc ? new fc() : void 0;
959
+ for (s.set(e, r), s.set(r, e); ++p < o; ) {
960
+ var v = e[p], y = r[p];
961
+ if (t)
962
+ var $ = i ? t(y, v, p, r, e, s) : t(v, y, p, e, r, s);
963
+ if ($ !== void 0) {
964
+ if ($)
965
+ continue;
966
+ c = !1;
967
+ break;
968
+ }
969
+ if (g) {
970
+ if (!cc(r, function(w, S) {
971
+ if (!pc(g, S) && (v === w || n(v, w, a, t, s)))
972
+ return g.push(S);
973
+ })) {
974
+ c = !1;
975
+ break;
976
+ }
977
+ } else if (!(v === y || n(v, y, a, t, s))) {
978
+ c = !1;
979
+ break;
980
+ }
981
+ }
982
+ return s.delete(e), s.delete(r), c;
983
+ }
984
+ var va = gc;
985
+ function dc(e) {
986
+ var r = -1, a = Array(e.size);
987
+ return e.forEach(function(t, n) {
988
+ a[++r] = [n, t];
989
+ }), a;
990
+ }
991
+ var yc = dc;
992
+ function _c(e) {
993
+ var r = -1, a = Array(e.size);
994
+ return e.forEach(function(t) {
995
+ a[++r] = t;
996
+ }), a;
997
+ }
998
+ var $c = _c, yr = B, _r = Jr, bc = E, mc = va, wc = yc, Sc = $c, Ac = 1, Tc = 2, Cc = "[object Boolean]", Oc = "[object Date]", Pc = "[object Error]", Lc = "[object Map]", Mc = "[object Number]", Ec = "[object RegExp]", Ic = "[object Set]", xc = "[object String]", Fc = "[object Symbol]", Dc = "[object ArrayBuffer]", Rc = "[object DataView]", $r = yr ? yr.prototype : void 0, pe = $r ? $r.valueOf : void 0;
999
+ function Gc(e, r, a, t, n, s, i) {
1000
+ switch (a) {
1001
+ case Rc:
1002
+ if (e.byteLength != r.byteLength || e.byteOffset != r.byteOffset)
1003
+ return !1;
1004
+ e = e.buffer, r = r.buffer;
1005
+ case Dc:
1006
+ return !(e.byteLength != r.byteLength || !s(new _r(e), new _r(r)));
1007
+ case Cc:
1008
+ case Oc:
1009
+ case Mc:
1010
+ return bc(+e, +r);
1011
+ case Pc:
1012
+ return e.name == r.name && e.message == r.message;
1013
+ case Ec:
1014
+ case xc:
1015
+ return e == r + "";
1016
+ case Lc:
1017
+ var o = wc;
1018
+ case Ic:
1019
+ var u = t & Ac;
1020
+ if (o || (o = Sc), e.size != r.size && !u)
1021
+ return !1;
1022
+ var l = i.get(e);
1023
+ if (l)
1024
+ return l == r;
1025
+ t |= Tc, i.set(e, r);
1026
+ var f = mc(o(e), o(r), t, n, s, i);
1027
+ return i.delete(e), f;
1028
+ case Fc:
1029
+ if (pe)
1030
+ return pe.call(e) == pe.call(r);
1031
+ }
1032
+ return !1;
1033
+ }
1034
+ var Nc = Gc, jc = Gr, kc = d;
1035
+ function Bc(e, r, a) {
1036
+ var t = r(e);
1037
+ return kc(e) ? t : jc(t, a(e));
1038
+ }
1039
+ var Uc = Bc;
1040
+ function Kc(e, r) {
1041
+ for (var a = -1, t = e == null ? 0 : e.length, n = 0, s = []; ++a < t; ) {
1042
+ var i = e[a];
1043
+ r(i, a, e) && (s[n++] = i);
1044
+ }
1045
+ return s;
1046
+ }
1047
+ var Hc = Kc;
1048
+ function qc() {
1049
+ return [];
1050
+ }
1051
+ var Wc = qc, zc = Hc, Qc = Wc, Xc = Object.prototype, Yc = Xc.propertyIsEnumerable, br = Object.getOwnPropertySymbols, Vc = br ? function(e) {
1052
+ return e == null ? [] : (e = Object(e), zc(br(e), function(r) {
1053
+ return Yc.call(e, r);
1054
+ }));
1055
+ } : Qc, Zc = Vc, Jc = ea, ep = Jc(Object.keys, Object), rp = ep, ap = Le, tp = rp, np = Object.prototype, sp = np.hasOwnProperty;
1056
+ function ip(e) {
1057
+ if (!ap(e))
1058
+ return tp(e);
1059
+ var r = [];
1060
+ for (var a in Object(e))
1061
+ sp.call(e, a) && a != "constructor" && r.push(a);
1062
+ return r;
1063
+ }
1064
+ var op = ip, up = sa, lp = op, fp = R;
1065
+ function cp(e) {
1066
+ return fp(e) ? up(e) : lp(e);
1067
+ }
1068
+ var Ge = cp, pp = Uc, hp = Zc, vp = Ge;
1069
+ function gp(e) {
1070
+ return pp(e, vp, hp);
1071
+ }
1072
+ var dp = gp, mr = dp, yp = 1, _p = Object.prototype, $p = _p.hasOwnProperty;
1073
+ function bp(e, r, a, t, n, s) {
1074
+ var i = a & yp, o = mr(e), u = o.length, l = mr(r), f = l.length;
1075
+ if (u != f && !i)
1076
+ return !1;
1077
+ for (var p = u; p--; ) {
1078
+ var c = o[p];
1079
+ if (!(i ? c in r : $p.call(r, c)))
1080
+ return !1;
1081
+ }
1082
+ var g = s.get(e), v = s.get(r);
1083
+ if (g && v)
1084
+ return g == r && v == e;
1085
+ var y = !0;
1086
+ s.set(e, r), s.set(r, e);
1087
+ for (var $ = i; ++p < u; ) {
1088
+ c = o[p];
1089
+ var w = e[c], S = r[c];
1090
+ if (t)
1091
+ var Ne = i ? t(S, w, c, r, e, s) : t(w, S, c, e, r, s);
1092
+ if (!(Ne === void 0 ? w === S || n(w, S, a, t, s) : Ne)) {
1093
+ y = !1;
1094
+ break;
1095
+ }
1096
+ $ || ($ = c == "constructor");
1097
+ }
1098
+ if (y && !$) {
1099
+ var U = e.constructor, K = r.constructor;
1100
+ U != K && "constructor" in e && "constructor" in r && !(typeof U == "function" && U instanceof U && typeof K == "function" && K instanceof K) && (y = !1);
1101
+ }
1102
+ return s.delete(e), s.delete(r), y;
1103
+ }
1104
+ var mp = bp, wp = C, Sp = _, Ap = wp(Sp, "DataView"), Tp = Ap, Cp = C, Op = _, Pp = Cp(Op, "Promise"), Lp = Pp, Mp = C, Ep = _, Ip = Mp(Ep, "Set"), xp = Ip, ge = Tp, de = Te, ye = Lp, _e = xp, $e = zr, ga = M, G = Hr, wr = "[object Map]", Fp = "[object Object]", Sr = "[object Promise]", Ar = "[object Set]", Tr = "[object WeakMap]", Cr = "[object DataView]", Dp = G(ge), Rp = G(de), Gp = G(ye), Np = G(_e), jp = G($e), T = ga;
1105
+ (ge && T(new ge(new ArrayBuffer(1))) != Cr || de && T(new de()) != wr || ye && T(ye.resolve()) != Sr || _e && T(new _e()) != Ar || $e && T(new $e()) != Tr) && (T = function(e) {
1106
+ var r = ga(e), a = r == Fp ? e.constructor : void 0, t = a ? G(a) : "";
1107
+ if (t)
1108
+ switch (t) {
1109
+ case Dp:
1110
+ return Cr;
1111
+ case Rp:
1112
+ return wr;
1113
+ case Gp:
1114
+ return Sr;
1115
+ case Np:
1116
+ return Ar;
1117
+ case jp:
1118
+ return Tr;
1119
+ }
1120
+ return r;
1121
+ });
1122
+ var kp = T, he = Oe, Bp = va, Up = Nc, Kp = mp, Or = kp, Pr = d, Lr = Ee, Hp = Ie, qp = 1, Mr = "[object Arguments]", Er = "[object Array]", q = "[object Object]", Wp = Object.prototype, Ir = Wp.hasOwnProperty;
1123
+ function zp(e, r, a, t, n, s) {
1124
+ var i = Pr(e), o = Pr(r), u = i ? Er : Or(e), l = o ? Er : Or(r);
1125
+ u = u == Mr ? q : u, l = l == Mr ? q : l;
1126
+ var f = u == q, p = l == q, c = u == l;
1127
+ if (c && Lr(e)) {
1128
+ if (!Lr(r))
1129
+ return !1;
1130
+ i = !0, f = !1;
1131
+ }
1132
+ if (c && !f)
1133
+ return s || (s = new he()), i || Hp(e) ? Bp(e, r, a, t, n, s) : Up(e, r, u, a, t, n, s);
1134
+ if (!(a & qp)) {
1135
+ var g = f && Ir.call(e, "__wrapped__"), v = p && Ir.call(r, "__wrapped__");
1136
+ if (g || v) {
1137
+ var y = g ? e.value() : e, $ = v ? r.value() : r;
1138
+ return s || (s = new he()), n(y, $, a, t, s);
1139
+ }
1140
+ }
1141
+ return c ? (s || (s = new he()), Kp(e, r, a, t, n, s)) : !1;
1142
+ }
1143
+ var Qp = zp, Xp = Qp, xr = m;
1144
+ function da(e, r, a, t, n) {
1145
+ return e === r ? !0 : e == null || r == null || !xr(e) && !xr(r) ? e !== e && r !== r : Xp(e, r, a, t, da, n);
1146
+ }
1147
+ var ya = da, Yp = Oe, Vp = ya, Zp = 1, Jp = 2;
1148
+ function eh(e, r, a, t) {
1149
+ var n = a.length, s = n, i = !t;
1150
+ if (e == null)
1151
+ return !s;
1152
+ for (e = Object(e); n--; ) {
1153
+ var o = a[n];
1154
+ if (i && o[2] ? o[1] !== e[o[0]] : !(o[0] in e))
1155
+ return !1;
1156
+ }
1157
+ for (; ++n < s; ) {
1158
+ o = a[n];
1159
+ var u = o[0], l = e[u], f = o[1];
1160
+ if (i && o[2]) {
1161
+ if (l === void 0 && !(u in e))
1162
+ return !1;
1163
+ } else {
1164
+ var p = new Yp();
1165
+ if (t)
1166
+ var c = t(l, f, u, e, r, p);
1167
+ if (!(c === void 0 ? Vp(f, l, Zp | Jp, t, p) : c))
1168
+ return !1;
1169
+ }
1170
+ }
1171
+ return !0;
1172
+ }
1173
+ var rh = eh, ah = b;
1174
+ function th(e) {
1175
+ return e === e && !ah(e);
1176
+ }
1177
+ var _a = th, nh = _a, sh = Ge;
1178
+ function ih(e) {
1179
+ for (var r = sh(e), a = r.length; a--; ) {
1180
+ var t = r[a], n = e[t];
1181
+ r[a] = [t, n, nh(n)];
1182
+ }
1183
+ return r;
1184
+ }
1185
+ var oh = ih;
1186
+ function uh(e, r) {
1187
+ return function(a) {
1188
+ return a == null ? !1 : a[e] === r && (r !== void 0 || e in Object(a));
1189
+ };
1190
+ }
1191
+ var $a = uh, lh = rh, fh = oh, ch = $a;
1192
+ function ph(e) {
1193
+ var r = fh(e);
1194
+ return r.length == 1 && r[0][2] ? ch(r[0][0], r[0][1]) : function(a) {
1195
+ return a === e || lh(a, e, r);
1196
+ };
1197
+ }
1198
+ var hh = ph, vh = Re;
1199
+ function gh(e, r, a) {
1200
+ var t = e == null ? void 0 : vh(e, r);
1201
+ return t === void 0 ? a : t;
1202
+ }
1203
+ var dh = gh;
1204
+ function yh(e, r) {
1205
+ return e != null && r in Object(e);
1206
+ }
1207
+ var _h = yh, $h = ha, bh = re, mh = d, wh = xe, Sh = Me, Ah = ue;
1208
+ function Th(e, r, a) {
1209
+ r = $h(r, e);
1210
+ for (var t = -1, n = r.length, s = !1; ++t < n; ) {
1211
+ var i = Ah(r[t]);
1212
+ if (!(s = e != null && a(e, i)))
1213
+ break;
1214
+ e = e[i];
1215
+ }
1216
+ return s || ++t != n ? s : (n = e == null ? 0 : e.length, !!n && Sh(n) && wh(i, n) && (mh(e) || bh(e)));
1217
+ }
1218
+ var Ch = Th, Oh = _h, Ph = Ch;
1219
+ function Lh(e, r) {
1220
+ return e != null && Ph(e, r, Oh);
1221
+ }
1222
+ var Mh = Lh, Eh = ya, Ih = dh, xh = Mh, Fh = Fe, Dh = _a, Rh = $a, Gh = ue, Nh = 1, jh = 2;
1223
+ function kh(e, r) {
1224
+ return Fh(e) && Dh(r) ? Rh(Gh(e), r) : function(a) {
1225
+ var t = Ih(a, e);
1226
+ return t === void 0 && t === r ? xh(a, e) : Eh(r, t, Nh | jh);
1227
+ };
1228
+ }
1229
+ var Bh = kh;
1230
+ function Uh(e) {
1231
+ return function(r) {
1232
+ return r == null ? void 0 : r[e];
1233
+ };
1234
+ }
1235
+ var Kh = Uh, Hh = Re;
1236
+ function qh(e) {
1237
+ return function(r) {
1238
+ return Hh(r, e);
1239
+ };
1240
+ }
1241
+ var Wh = qh, zh = Kh, Qh = Wh, Xh = Fe, Yh = ue;
1242
+ function Vh(e) {
1243
+ return Xh(e) ? zh(Yh(e)) : Qh(e);
1244
+ }
1245
+ var Zh = Vh, Jh = hh, ev = Bh, rv = ae, av = d, tv = Zh;
1246
+ function nv(e) {
1247
+ return typeof e == "function" ? e : e == null ? rv : typeof e == "object" ? av(e) ? ev(e[0], e[1]) : Jh(e) : tv(e);
1248
+ }
1249
+ var sv = nv, iv = Zr, ov = Ge;
1250
+ function uv(e, r) {
1251
+ return e && iv(e, r, ov);
1252
+ }
1253
+ var lv = uv, fv = R;
1254
+ function cv(e, r) {
1255
+ return function(a, t) {
1256
+ if (a == null)
1257
+ return a;
1258
+ if (!fv(a))
1259
+ return e(a, t);
1260
+ for (var n = a.length, s = r ? n : -1, i = Object(a); (r ? s-- : ++s < n) && t(i[s], s, i) !== !1; )
1261
+ ;
1262
+ return a;
1263
+ };
1264
+ }
1265
+ var pv = cv, hv = lv, vv = pv, gv = vv(hv), dv = gv, yv = dv, _v = R;
1266
+ function $v(e, r) {
1267
+ var a = -1, t = _v(e) ? Array(e.length) : [];
1268
+ return yv(e, function(n, s, i) {
1269
+ t[++a] = r(n, s, i);
1270
+ }), t;
1271
+ }
1272
+ var bv = $v;
1273
+ function mv(e, r) {
1274
+ var a = e.length;
1275
+ for (e.sort(r); a--; )
1276
+ e[a] = e[a].value;
1277
+ return e;
1278
+ }
1279
+ var wv = mv, Fr = oe;
1280
+ function Sv(e, r) {
1281
+ if (e !== r) {
1282
+ var a = e !== void 0, t = e === null, n = e === e, s = Fr(e), i = r !== void 0, o = r === null, u = r === r, l = Fr(r);
1283
+ if (!o && !l && !s && e > r || s && i && u && !o && !l || t && i && u || !a && u || !n)
1284
+ return 1;
1285
+ if (!t && !s && !l && e < r || l && a && n && !t && !s || o && a && n || !i && n || !u)
1286
+ return -1;
1287
+ }
1288
+ return 0;
1289
+ }
1290
+ var Av = Sv, Tv = Av;
1291
+ function Cv(e, r, a) {
1292
+ for (var t = -1, n = e.criteria, s = r.criteria, i = n.length, o = a.length; ++t < i; ) {
1293
+ var u = Tv(n[t], s[t]);
1294
+ if (u) {
1295
+ if (t >= o)
1296
+ return u;
1297
+ var l = a[t];
1298
+ return u * (l == "desc" ? -1 : 1);
1299
+ }
1300
+ }
1301
+ return e.index - r.index;
1302
+ }
1303
+ var Ov = Cv, ve = fa, Pv = Re, Lv = sv, Mv = bv, Ev = wv, Iv = ta, xv = Ov, Fv = ae, Dv = d;
1304
+ function Rv(e, r, a) {
1305
+ r.length ? r = ve(r, function(s) {
1306
+ return Dv(s) ? function(i) {
1307
+ return Pv(i, s.length === 1 ? s[0] : s);
1308
+ } : s;
1309
+ }) : r = [Fv];
1310
+ var t = -1;
1311
+ r = ve(r, Iv(Lv));
1312
+ var n = Mv(e, function(s, i, o) {
1313
+ var u = ve(r, function(l) {
1314
+ return l(s);
1315
+ });
1316
+ return { criteria: u, index: ++t, value: s };
1317
+ });
1318
+ return Ev(n, function(s, i) {
1319
+ return xv(s, i, a);
1320
+ });
1321
+ }
1322
+ var Gv = Rv, Nv = Ur, jv = Gv, kv = ua, Dr = la, Bv = kv(function(e, r) {
1323
+ if (e == null)
1324
+ return [];
1325
+ var a = r.length;
1326
+ return a > 1 && Dr(e, r[0], r[1]) ? r = [] : a > 2 && Dr(r[0], r[1], r[2]) && (r = [r[0]]), jv(e, Nv(r, 1), []);
1327
+ }), Uv = Bv;
1328
+ const Kv = /* @__PURE__ */ ee(Uv);
1329
+ var Hv = E;
1330
+ function qv(e, r) {
1331
+ for (var a = -1, t = e.length, n = 0, s = []; ++a < t; ) {
1332
+ var i = e[a], o = r ? r(i) : i;
1333
+ if (!a || !Hv(o, u)) {
1334
+ var u = o;
1335
+ s[n++] = i === 0 ? 0 : i;
1336
+ }
1337
+ }
1338
+ return s;
1339
+ }
1340
+ var Wv = qv, zv = Wv;
1341
+ function Qv(e) {
1342
+ return e && e.length ? zv(e) : [];
1343
+ }
1344
+ var Xv = Qv;
1345
+ const Yv = /* @__PURE__ */ ee(Xv);
1346
+ class Vv {
1347
+ constructor() {
1348
+ je(this, "config");
1349
+ this.config = {
1350
+ api: {
1351
+ brand: "",
1352
+ cashierUrl: void 0,
1353
+ coinValueInCents: 1,
1354
+ country: "",
1355
+ currency: "",
1356
+ game: "",
1357
+ gameHistoryUrl: "",
1358
+ homeUrl: void 0,
1359
+ integration: "",
1360
+ jurisdiction: "",
1361
+ playMode: "FUN",
1362
+ user: ""
1363
+ },
1364
+ ui: {
1365
+ autoplay: {
1366
+ enabled: !1,
1367
+ rounds: {
1368
+ enabled: !1,
1369
+ showNoLimit: !1,
1370
+ showCustomLimit: !1,
1371
+ options: []
1372
+ },
1373
+ lossLimit: {
1374
+ enabled: !1,
1375
+ showNoLimit: !1,
1376
+ showCustomLimit: !1,
1377
+ options: []
1378
+ },
1379
+ winLimit: {
1380
+ enabled: !1,
1381
+ showNoLimit: !1,
1382
+ showCustomLimit: !1,
1383
+ options: []
1384
+ },
1385
+ simple: !1,
1386
+ stopOnFeature: !1
1387
+ },
1388
+ cashier: {
1389
+ enabled: !1,
1390
+ balanceThreshold: [0]
1391
+ },
1392
+ feature: {
1393
+ allowTelemetry: !1,
1394
+ allowFullscreen: !1,
1395
+ allowQuickStop: !1,
1396
+ showCashier: !1,
1397
+ showClock: !1,
1398
+ showCloseGame: !1,
1399
+ showCurrency: !0,
1400
+ showFastPlay: !1,
1401
+ showFeatureBuy: !1,
1402
+ showFeatureIntro: !1,
1403
+ showFeatureOutro: !1,
1404
+ showFunModeBanner: !1,
1405
+ showHistory: !1,
1406
+ showLowWinCelebration: !1,
1407
+ showMaximumWin: !1,
1408
+ showNetPosition: !1,
1409
+ showPaylineLines: !1,
1410
+ showPaytable: !1,
1411
+ showRoundId: !1,
1412
+ showRtp: !1,
1413
+ showRules: !1,
1414
+ showSessionDuration: !1,
1415
+ showUi: !0
1416
+ },
1417
+ language: "en",
1418
+ maximumBet: void 0,
1419
+ minimumSpinDuration: 0,
1420
+ requestTimeoutMs: 1e4,
1421
+ realityCheck: {
1422
+ sessionDurationPeriodFormat: "minutes",
1423
+ showCloseGame: !1,
1424
+ showHistory: !1,
1425
+ showNetPosition: !1,
1426
+ showSessionDuration: !1,
1427
+ showSumBets: !1,
1428
+ showSumWins: !1
1429
+ },
1430
+ skipInsufficientFundsCheck: !1,
1431
+ skipSplash: !1
1432
+ }
1433
+ };
1434
+ }
1435
+ }
1436
+ var ba = /* @__PURE__ */ ((e) => (e.BG = "BG", e.CA = "CA", e.CO = "CO", e.CW = "CW", e.DE = "DE", e.DK = "DK", e.ES = "ES", e.GR = "GR", e.IM = "IM", e.IT = "IT", e.MT = "MT", e.NL = "NL", e.NOT_APPLICABLE = "NOT_APPLICABLE", e.PT = "PT", e.SE = "SE", e.SK = "SK", e.UK = "UK", e.UNKNOWN = "UNKNOWN", e.US = "US", e.SOCIAL = "SOCIAL", e))(ba || {});
1437
+ const Rr = {
1438
+ CA_BC: "CA",
1439
+ CA_ON: "CA",
1440
+ GER: "DE",
1441
+ HR: "ES",
1442
+ US_CT: "US",
1443
+ US_MI: "US",
1444
+ US_NJ: "US",
1445
+ USA: "US"
1446
+ /* US */
1447
+ }, Zv = (e) => {
1448
+ const r = e && e in ba, a = e && e in Rr;
1449
+ return !e || !(r || a) ? "UNKNOWN" : Rr[e] ?? e;
1450
+ };
1451
+ function Jv(e, r) {
1452
+ function a(t, {
1453
+ maxCount: n
1454
+ }) {
1455
+ const s = (u) => (u == null ? void 0 : u.filter((l) => l <= n)) ?? [], i = (u) => (u == null ? void 0 : u.map((l) => Number(l))) ?? [], o = [...t, n];
1456
+ return ys([i, s, Kv, Yv])(o);
1457
+ }
1458
+ switch (r) {
1459
+ case "BG":
1460
+ return {
1461
+ autoplay: {
1462
+ lossLimit: {
1463
+ enabled: !0,
1464
+ showNoLimit: !1
1465
+ },
1466
+ winLimit: {
1467
+ enabled: !0
1468
+ }
1469
+ },
1470
+ feature: {
1471
+ showFastPlay: !1,
1472
+ allowQuickStop: !1
1473
+ },
1474
+ minimumSpinDuration: 3
1475
+ };
1476
+ case "CA":
1477
+ return {
1478
+ autoplay: {
1479
+ enabled: !1
1480
+ },
1481
+ feature: {
1482
+ showFastPlay: !1,
1483
+ allowQuickStop: !1,
1484
+ showFeatureBuy: !1
1485
+ },
1486
+ minimumSpinDuration: 2.5
1487
+ };
1488
+ case "CO":
1489
+ return {
1490
+ autoplay: {
1491
+ rounds: {
1492
+ showNoLimit: !1,
1493
+ showCustomLimit: !1,
1494
+ options: a(e.autoplay.rounds.options, {
1495
+ maxCount: 100
1496
+ })
1497
+ }
1498
+ },
1499
+ feature: {
1500
+ showFastPlay: !1,
1501
+ allowQuickStop: !1
1502
+ },
1503
+ minimumSpinDuration: 3
1504
+ };
1505
+ case "DE":
1506
+ return {
1507
+ autoplay: {
1508
+ enabled: !1
1509
+ },
1510
+ feature: {
1511
+ showFastPlay: !1,
1512
+ allowQuickStop: !1,
1513
+ showFeatureBuy: !1
1514
+ },
1515
+ minimumSpinDuration: 5
1516
+ };
1517
+ case "ES":
1518
+ return {
1519
+ autoplay: {
1520
+ rounds: {
1521
+ showNoLimit: !1,
1522
+ showCustomLimit: !1,
1523
+ options: a(e.autoplay.rounds.options, {
1524
+ maxCount: 100
1525
+ })
1526
+ }
1527
+ },
1528
+ feature: {
1529
+ showFastPlay: !1,
1530
+ allowQuickStop: !1
1531
+ },
1532
+ minimumSpinDuration: 3
1533
+ };
1534
+ case "GR":
1535
+ return {
1536
+ feature: {
1537
+ showFastPlay: !1,
1538
+ allowQuickStop: !1,
1539
+ showFeatureBuy: !1
1540
+ },
1541
+ minimumSpinDuration: 3
1542
+ };
1543
+ case "IT":
1544
+ return {
1545
+ feature: {
1546
+ showPaylineLines: !0
1547
+ }
1548
+ };
1549
+ case "NL":
1550
+ return {
1551
+ autoplay: {
1552
+ enabled: !1
1553
+ },
1554
+ feature: {
1555
+ showFeatureBuy: !1
1556
+ }
1557
+ };
1558
+ case "PT":
1559
+ return {
1560
+ autoplay: {
1561
+ rounds: {
1562
+ showNoLimit: !1,
1563
+ showCustomLimit: !1,
1564
+ options: a(e.autoplay.rounds.options, {
1565
+ maxCount: 100
1566
+ })
1567
+ }
1568
+ },
1569
+ feature: {
1570
+ showFastPlay: !1,
1571
+ allowQuickStop: !1
1572
+ },
1573
+ minimumSpinDuration: 3
1574
+ };
1575
+ case "SE":
1576
+ return {
1577
+ autoplay: {
1578
+ rounds: {
1579
+ showNoLimit: !1,
1580
+ showCustomLimit: !1,
1581
+ options: a(e.autoplay.rounds.options, {
1582
+ maxCount: 100
1583
+ })
1584
+ }
1585
+ },
1586
+ feature: {
1587
+ showFastPlay: !1,
1588
+ allowQuickStop: !1
1589
+ },
1590
+ minimumSpinDuration: 3
1591
+ };
1592
+ case "UK":
1593
+ return {
1594
+ autoplay: {
1595
+ enabled: !1
1596
+ },
1597
+ feature: {
1598
+ showFastPlay: !1,
1599
+ allowQuickStop: !1,
1600
+ showFeatureBuy: !1
1601
+ },
1602
+ minimumSpinDuration: 2.5
1603
+ };
1604
+ case "US":
1605
+ return {
1606
+ feature: {
1607
+ showPaylineLines: !0
1608
+ }
1609
+ };
1610
+ case "MT":
1611
+ return {
1612
+ feature: {
1613
+ showClock: !0
1614
+ }
1615
+ };
1616
+ case "SOCIAL":
1617
+ return {
1618
+ feature: {
1619
+ showGameHistory: !1
1620
+ }
1621
+ };
1622
+ }
1623
+ return {};
1624
+ }
1625
+ class tg extends Vv {
1626
+ async getConfig() {
1627
+ let r = this.config.ui;
1628
+ const a = await this.fetchOperatorConfig();
1629
+ r = ce({}, r, a);
1630
+ const t = new URLSearchParams(window.location.search), n = JSON.parse(t.get("badgeParameters") ?? "{}");
1631
+ r = ce({}, r, n);
1632
+ const s = Zv(this.config.api.jurisdiction), i = Jv(r, s);
1633
+ return r = ce({}, r, i), r;
1634
+ }
1635
+ get mappedIntegration() {
1636
+ const r = this.config.api.integration.toLowerCase(), a = this.config.api.brand.toLowerCase();
1637
+ if (r === "spinomenal") {
1638
+ if (a.startsWith("gg-"))
1639
+ return "groovegaming";
1640
+ } else if (r === "pariplay") {
1641
+ if (a.startsWith("8x1"))
1642
+ return "pariplay-8x1";
1643
+ } else {
1644
+ if (/openbox-.*/.test(r))
1645
+ return "openbox";
1646
+ if (/oryx-.*/.test(r))
1647
+ return "oryx";
1648
+ if (/relax-.*/.test(r))
1649
+ return "relax";
1650
+ }
1651
+ return r;
1652
+ }
1653
+ get mappedBrand() {
1654
+ const r = this.config.api.integration.toLowerCase(), a = this.config.api.brand.toLowerCase();
1655
+ return r === "bspot" && this.config.api.playMode.toLowerCase() === "fun" ? "demo" : a;
1656
+ }
1657
+ mapUiConfig(r) {
1658
+ return r ? {
1659
+ autoplay: {
1660
+ enabled: r.badge.autoplayType !== 5,
1661
+ rounds: {
1662
+ enabled: r.badge.autoplayType !== 5,
1663
+ showNoLimit: !1,
1664
+ showCustomLimit: !1,
1665
+ options: r.badge.autoplayRounds ?? [5, 10, 25, 75, 100]
1666
+ },
1667
+ lossLimit: {
1668
+ enabled: r.badge.autoplayType === 1 || r.badge.autoplayType === 4,
1669
+ showNoLimit: r.badge.autoplayType === 1,
1670
+ showCustomLimit: !0,
1671
+ options: [5, 25, 50]
1672
+ },
1673
+ winLimit: {
1674
+ enabled: r.badge.autoplayType === 1 || r.badge.autoplayType === 4,
1675
+ showNoLimit: !0,
1676
+ showCustomLimit: !0,
1677
+ options: [10, 20, 75]
1678
+ },
1679
+ simple: r.badge.autoplayType === 3
1680
+ // stopOnFeature: false,
1681
+ },
1682
+ cashier: {
1683
+ enabled: r.badge.showQuickDeposit,
1684
+ balanceThreshold: r.badge.quickDepositBalanceThresholds
1685
+ },
1686
+ feature: {
1687
+ allowTelemetry: !0,
1688
+ allowFullscreen: r.defaults.fullscreen === "true",
1689
+ allowQuickStop: r.badge.minimumSpinDuration === 0,
1690
+ showCashier: r.badge.showQuickDeposit,
1691
+ showClock: r.badge.showClock,
1692
+ showCloseGame: r.badge.showCloseGameButton,
1693
+ showCurrency: r.badge.showCurrency,
1694
+ showFastPlay: r.badge.showTurboButton,
1695
+ showFeatureBuy: r.badge.showHyperBonus,
1696
+ // showFeatureIntro: false,
1697
+ // showFeatureOutro: false,
1698
+ showFunModeBanner: r.badge.showFunBanner,
1699
+ showHistory: r.badge.showGameHistory,
1700
+ // showLowWinCelebration: false,
1701
+ // showMaximumWin: false,
1702
+ // showNetPosition: false,
1703
+ showPaylineLines: r.badge.showPaylineLines,
1704
+ // showPaytable: false,
1705
+ showRoundId: r.badge.showRoundId,
1706
+ // showRtp: false,
1707
+ showRules: r.badge.showGameRules,
1708
+ showSessionDuration: r.badge.realityCheckShowSessionDuration,
1709
+ showUi: r.badge.showGameUi
1710
+ },
1711
+ // maximumBet: undefined,
1712
+ minimumSpinDuration: r.badge.minimumSpinDuration,
1713
+ requestTimeoutMs: r.badge.requestTimeoutMs,
1714
+ realityCheck: {
1715
+ sessionDurationPeriodFormat: r.badge.realityCheckPeriodFormat,
1716
+ showCloseGame: r.badge.realityCheckShowCloseGame,
1717
+ showHistory: r.badge.realityCheckShowHistoryLink,
1718
+ showNetPosition: r.badge.realityCheckShowNetGamingActivity,
1719
+ showSessionDuration: r.badge.realityCheckShowSessionDuration,
1720
+ showSumBets: r.badge.realityCheckShowSumBets,
1721
+ showSumWins: r.badge.realityCheckShowSumWins
1722
+ },
1723
+ skipInsufficientFundsCheck: r.badge.skipInsufficientFundsCheck,
1724
+ skipSplash: r.badge.loaderAutoContinue
1725
+ } : {};
1726
+ }
1727
+ async fetchOperatorConfig() {
1728
+ const r = "https://awscdn.kalamba.net/games/games/build/", a = this.mappedIntegration, t = this.mappedBrand;
1729
+ let n = {};
1730
+ try {
1731
+ n = await fetch(`${r}config/${a}/cage/${t}.json`).then((s) => s.json());
1732
+ } catch {
1733
+ try {
1734
+ n = await fetch(`${r}config/${a}/operator.json`).then((i) => i.json());
1735
+ } catch {
1736
+ n = await fetch(`${r}config/fun/operator.json`).then((o) => o.json());
1737
+ }
1738
+ }
1739
+ return this.mapUiConfig(n);
1740
+ }
1741
+ }
1742
+ export {
1743
+ tg as KalambaSdkConfigManager,
1744
+ ag as KalambaSdkWrapper,
1745
+ Vv as SdkConfigManager
1746
+ };