@everymatrix/player-account-balance-modal-nd 1.77.18 → 1.77.19
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/components/{PlayerAccountBalanceModalNd-pqPzOPTL.js → PlayerAccountBalanceModalNd-CLwmo33m.js} +43 -33
- package/components/{PlayerAccountBalanceModalNd-DmLIKkkM.cjs → PlayerAccountBalanceModalNd-COzm7A94.cjs} +3 -3
- package/components/{PlayerAccountBalanceModalNd-Dav9pAGk.js → PlayerAccountBalanceModalNd-DiZWRnsX.js} +43 -33
- package/es2015/player-account-balance-modal-nd.cjs +1 -1
- package/es2015/player-account-balance-modal-nd.js +1 -1
- package/esnext/player-account-balance-modal-nd.js +1 -1
- package/package.json +1 -1
|
@@ -4242,7 +4242,7 @@ var tr = { exports: {} };
|
|
|
4242
4242
|
K.call(this, h), this.error = y.error;
|
|
4243
4243
|
}
|
|
4244
4244
|
x.prototype = Object.create(K.prototype);
|
|
4245
|
-
var ve = -1, pe = 0,
|
|
4245
|
+
var ve = -1, pe = 0, ae = 1, He = 2, qe = -1, me = 0, Ye = 1, Me = 2, st = 3, Ot = /^text\/event\-stream(;.*)?$/i, Qe = 1e3, ut = 18e6, Je = function(h, y) {
|
|
4246
4246
|
var E = h == null ? y : parseInt(h, 10);
|
|
4247
4247
|
return E !== E && (E = y), Le(E);
|
|
4248
4248
|
}, Le = function(h) {
|
|
@@ -4254,7 +4254,7 @@ var tr = { exports: {} };
|
|
|
4254
4254
|
U(g);
|
|
4255
4255
|
}
|
|
4256
4256
|
};
|
|
4257
|
-
function
|
|
4257
|
+
function se(h, y) {
|
|
4258
4258
|
q.call(this), y = y || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, Rt(this, h, y);
|
|
4259
4259
|
}
|
|
4260
4260
|
function Pt() {
|
|
@@ -4263,39 +4263,39 @@ var tr = { exports: {} };
|
|
|
4263
4263
|
var lt = b != null && m != null && "body" in m.prototype;
|
|
4264
4264
|
function Rt(h, y, E) {
|
|
4265
4265
|
y = String(y);
|
|
4266
|
-
var g = !!E.withCredentials, c = E.lastEventIdQueryParameterName || "lastEventId", d = Le(1e3), p = Je(E.heartbeatTimeout, 45e3), v = "", T = d, C = !1, S = 0, B = E.headers || {}, L = E.Transport, ee = lt && L == null ? void 0 : new I(L != null ? new L() : Pt()), Ae = L != null && typeof L != "string" ? new L() : ee == null ? new D() : new Z(), X = void 0, te = 0, fe = ve, Ne = "", ht = "", _e = "", ft = "", re = me, Mt = 0, Oe = 0, Tn = function(Y, z,
|
|
4266
|
+
var g = !!E.withCredentials, c = E.lastEventIdQueryParameterName || "lastEventId", d = Le(1e3), p = Je(E.heartbeatTimeout, 45e3), v = "", T = d, C = !1, S = 0, B = E.headers || {}, L = E.Transport, ee = lt && L == null ? void 0 : new I(L != null ? new L() : Pt()), Ae = L != null && typeof L != "string" ? new L() : ee == null ? new D() : new Z(), X = void 0, te = 0, fe = ve, Ne = "", ht = "", _e = "", ft = "", re = me, Mt = 0, Oe = 0, Tn = function(Y, z, ue, le) {
|
|
4267
4267
|
if (fe === pe)
|
|
4268
|
-
if (Y === 200 &&
|
|
4269
|
-
fe =
|
|
4268
|
+
if (Y === 200 && ue != null && Ot.test(ue)) {
|
|
4269
|
+
fe = ae, C = Date.now(), T = d, h.readyState = ae;
|
|
4270
4270
|
var ne = new ye("open", {
|
|
4271
4271
|
status: Y,
|
|
4272
4272
|
statusText: z,
|
|
4273
|
-
headers:
|
|
4273
|
+
headers: le
|
|
4274
4274
|
});
|
|
4275
4275
|
h.dispatchEvent(ne), Be(h, h.onopen, ne);
|
|
4276
4276
|
} else {
|
|
4277
4277
|
var J = "";
|
|
4278
|
-
Y !== 200 ? (z && (z = z.replace(/\s+/g, " ")), J = "EventSource's response has a status " + Y + " " + z + " that is not 200. Aborting the connection.") : J = "EventSource's response has a Content-Type specifying an unsupported type: " + (
|
|
4278
|
+
Y !== 200 ? (z && (z = z.replace(/\s+/g, " ")), J = "EventSource's response has a status " + Y + " " + z + " that is not 200. Aborting the connection.") : J = "EventSource's response has a Content-Type specifying an unsupported type: " + (ue == null ? "-" : ue.replace(/\s+/g, " ")) + ". Aborting the connection.", Lt();
|
|
4279
4279
|
var ne = new ye("error", {
|
|
4280
4280
|
status: Y,
|
|
4281
4281
|
statusText: z,
|
|
4282
|
-
headers:
|
|
4282
|
+
headers: le
|
|
4283
4283
|
});
|
|
4284
4284
|
h.dispatchEvent(ne), Be(h, h.onerror, ne), console.error(J);
|
|
4285
4285
|
}
|
|
4286
4286
|
}, Bn = function(Y) {
|
|
4287
|
-
if (fe ===
|
|
4288
|
-
for (var z = -1,
|
|
4289
|
-
var
|
|
4290
|
-
(
|
|
4287
|
+
if (fe === ae) {
|
|
4288
|
+
for (var z = -1, ue = 0; ue < Y.length; ue += 1) {
|
|
4289
|
+
var le = Y.charCodeAt(ue);
|
|
4290
|
+
(le === 10 || le === 13) && (z = ue);
|
|
4291
4291
|
}
|
|
4292
4292
|
var ne = (z !== -1 ? ft : "") + Y.slice(0, z + 1);
|
|
4293
4293
|
ft = (z === -1 ? ft : "") + Y.slice(z + 1), Y !== "" && (C = Date.now(), S += Y.length);
|
|
4294
4294
|
for (var J = 0; J < ne.length; J += 1) {
|
|
4295
|
-
var
|
|
4296
|
-
if (re === qe &&
|
|
4295
|
+
var le = ne.charCodeAt(J);
|
|
4296
|
+
if (re === qe && le === 10)
|
|
4297
4297
|
re = me;
|
|
4298
|
-
else if (re === qe && (re = me),
|
|
4298
|
+
else if (re === qe && (re = me), le === 13 || le === 10) {
|
|
4299
4299
|
if (re !== me) {
|
|
4300
4300
|
re === Ye && (Oe = J + 1);
|
|
4301
4301
|
var Ee = ne.slice(Mt, Oe - 1), xe = ne.slice(Oe + (Oe < J && ne.charCodeAt(Oe) === 32 ? 1 : 0), J);
|
|
@@ -4316,13 +4316,13 @@ var tr = { exports: {} };
|
|
|
4316
4316
|
}
|
|
4317
4317
|
Ne = "", _e = "";
|
|
4318
4318
|
}
|
|
4319
|
-
re =
|
|
4319
|
+
re = le === 13 ? qe : me;
|
|
4320
4320
|
} else
|
|
4321
|
-
re === me && (Mt = J, re = Ye), re === Ye ?
|
|
4321
|
+
re === me && (Mt = J, re = Ye), re === Ye ? le === 58 && (Oe = J + 1, re = Me) : re === Me && (re = st);
|
|
4322
4322
|
}
|
|
4323
4323
|
}
|
|
4324
4324
|
}, hr = function(Y) {
|
|
4325
|
-
if (fe ===
|
|
4325
|
+
if (fe === ae || fe === pe) {
|
|
4326
4326
|
fe = ve, te !== 0 && (i(te), te = 0), te = n(function() {
|
|
4327
4327
|
Ke();
|
|
4328
4328
|
}, T), T = Le(Math.min(d * 16, T * 2)), h.readyState = pe;
|
|
@@ -4348,36 +4348,36 @@ var tr = { exports: {} };
|
|
|
4348
4348
|
}, p), fe = pe, Ne = "", _e = "", ht = v, ft = "", Mt = 0, Oe = 0, re = me;
|
|
4349
4349
|
var z = y;
|
|
4350
4350
|
if (y.slice(0, 5) !== "data:" && y.slice(0, 5) !== "blob:" && v !== "") {
|
|
4351
|
-
var
|
|
4352
|
-
z =
|
|
4351
|
+
var ue = y.indexOf("?");
|
|
4352
|
+
z = ue === -1 ? y : y.slice(0, ue + 1) + y.slice(ue + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(xe, Ie) {
|
|
4353
4353
|
return Ie === c ? "" : xe;
|
|
4354
4354
|
}), z += (y.indexOf("?") === -1 ? "?" : "&") + c + "=" + encodeURIComponent(v);
|
|
4355
4355
|
}
|
|
4356
|
-
var
|
|
4356
|
+
var le = h.withCredentials, ne = {};
|
|
4357
4357
|
ne.Accept = "text/event-stream";
|
|
4358
4358
|
var J = h.headers;
|
|
4359
4359
|
if (J != null)
|
|
4360
4360
|
for (var Ee in J)
|
|
4361
4361
|
Object.prototype.hasOwnProperty.call(J, Ee) && (ne[Ee] = J[Ee]);
|
|
4362
4362
|
try {
|
|
4363
|
-
X = Ae.open(ee, Tn, Bn, hr, z,
|
|
4363
|
+
X = Ae.open(ee, Tn, Bn, hr, z, le, ne);
|
|
4364
4364
|
} catch (xe) {
|
|
4365
4365
|
throw Lt(), xe;
|
|
4366
4366
|
}
|
|
4367
4367
|
};
|
|
4368
4368
|
h.url = y, h.readyState = pe, h.withCredentials = g, h.headers = B, h._close = Lt, Ke();
|
|
4369
4369
|
}
|
|
4370
|
-
|
|
4370
|
+
se.prototype = Object.create(q.prototype), se.prototype.CONNECTING = pe, se.prototype.OPEN = ae, se.prototype.CLOSED = He, se.prototype.close = function() {
|
|
4371
4371
|
this._close();
|
|
4372
|
-
},
|
|
4372
|
+
}, se.CONNECTING = pe, se.OPEN = ae, se.CLOSED = He, se.prototype.withCredentials = void 0;
|
|
4373
4373
|
var ct = l;
|
|
4374
|
-
o != null && (l == null || !("withCredentials" in l.prototype)) && (ct =
|
|
4374
|
+
o != null && (l == null || !("withCredentials" in l.prototype)) && (ct = se), function(h) {
|
|
4375
4375
|
{
|
|
4376
4376
|
var y = h(t);
|
|
4377
4377
|
y !== void 0 && (e.exports = y);
|
|
4378
4378
|
}
|
|
4379
4379
|
}(function(h) {
|
|
4380
|
-
h.EventSourcePolyfill =
|
|
4380
|
+
h.EventSourcePolyfill = se, h.NativeEventSource = l, h.EventSource = ct;
|
|
4381
4381
|
});
|
|
4382
4382
|
})(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : ei : globalThis);
|
|
4383
4383
|
})(tr, tr.exports);
|
|
@@ -5226,7 +5226,7 @@ function ca(e, t, r) {
|
|
|
5226
5226
|
fetch(b).then((c) => c.json()).then((c) => Object.keys(c).forEach((d) => Cr(d, c[d]))).catch((c) => console.log(c));
|
|
5227
5227
|
};
|
|
5228
5228
|
Object.keys(Hr).forEach((c) => Cr(c, Hr[c]));
|
|
5229
|
-
const
|
|
5229
|
+
const ae = (c) => {
|
|
5230
5230
|
switch (c) {
|
|
5231
5231
|
case "balance":
|
|
5232
5232
|
window.postMessage(
|
|
@@ -5479,11 +5479,11 @@ function ca(e, t, r) {
|
|
|
5479
5479
|
}
|
|
5480
5480
|
ut();
|
|
5481
5481
|
}, Le = () => {
|
|
5482
|
-
|
|
5483
|
-
}, Be = (c) => c === "SESSION_EXPIRATION" ? (window.postMessage({ type: "SessionExpiration" }, window.location.href), !0) : !1,
|
|
5482
|
+
ae("closebalance"), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
|
|
5483
|
+
}, Be = (c) => c === "SESSION_EXPIRATION" ? (window.postMessage({ type: "SessionExpiration" }, window.location.href), !0) : !1, se = () => {
|
|
5484
5484
|
ve.includes(_) || (console.error(`Unsupported value ('${_}') for totalcalculationmode parameter. Only the following values are supported ${ve}. Using default value ('${ve[0]}').`), r(10, _ = ve[0]));
|
|
5485
5485
|
}, Pt = () => {
|
|
5486
|
-
switch ($o(a),
|
|
5486
|
+
switch ($o(a), se(), m) {
|
|
5487
5487
|
case "gmcore":
|
|
5488
5488
|
me();
|
|
5489
5489
|
break;
|
|
@@ -5493,13 +5493,23 @@ function ca(e, t, r) {
|
|
|
5493
5493
|
default:
|
|
5494
5494
|
throw Error(`Invalid apiversion attribute: ${m}`);
|
|
5495
5495
|
}
|
|
5496
|
-
}, lt = (c) =>
|
|
5496
|
+
}, lt = (c) => {
|
|
5497
|
+
const { data: { type: d } = {} } = c || {};
|
|
5498
|
+
switch (d) {
|
|
5499
|
+
case "LogoutSuccessfull":
|
|
5500
|
+
U.close();
|
|
5501
|
+
break;
|
|
5502
|
+
case "CloseBalance":
|
|
5503
|
+
ae("closebalance");
|
|
5504
|
+
break;
|
|
5505
|
+
}
|
|
5506
|
+
}, Rt = () => {
|
|
5497
5507
|
window.postMessage({ type: "UpdateBalanceBackground" }, window.location.href);
|
|
5498
5508
|
};
|
|
5499
5509
|
In(() => (window.addEventListener("message", lt, !1), r(5, D = oa(q)), () => {
|
|
5500
5510
|
window.removeEventListener("message", lt), U && U.close();
|
|
5501
5511
|
}));
|
|
5502
|
-
const ct = () =>
|
|
5512
|
+
const ct = () => ae("balance"), h = () => ae("closebalance"), y = () => Le(), E = () => ae("closebalance");
|
|
5503
5513
|
function g(c) {
|
|
5504
5514
|
$t[c ? "unshift" : "push"](() => {
|
|
5505
5515
|
I = c, r(0, I);
|
|
@@ -5524,7 +5534,7 @@ function ca(e, t, r) {
|
|
|
5524
5534
|
k,
|
|
5525
5535
|
D,
|
|
5526
5536
|
n,
|
|
5527
|
-
|
|
5537
|
+
ae,
|
|
5528
5538
|
He,
|
|
5529
5539
|
Le,
|
|
5530
5540
|
_,
|
|
@@ -5,8 +5,8 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
5
5
|
* Available under MIT License (MIT)
|
|
6
6
|
* https://github.com/Yaffle/EventSource/
|
|
7
7
|
*/(function(e,t){(function(r){var n=r.setTimeout,i=r.clearTimeout,o=r.XMLHttpRequest,a=r.XDomainRequest,s=r.ActiveXObject,l=r.EventSource,u=r.document,f=r.Promise,b=r.fetch,m=r.Response,S=r.TextDecoder,_=r.TextEncoder,A=r.AbortController;if(typeof window!="undefined"&&typeof u!="undefined"&&!("readyState"in u)&&u.body==null&&(u.readyState="loading",window.addEventListener("load",function(h){u.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(h){function y(){}return y.prototype=h,new y}),Date.now||(Date.now=function(){return new Date().getTime()}),A==null){var N=b;b=function(h,y){var E=y.signal;return N(h,{headers:y.headers,credentials:y.credentials,cache:y.cache}).then(function(g){var c=g.body.getReader();return E._reader=c,E._aborted&&E._reader.cancel(),{status:g.status,statusText:g.statusText,headers:g.headers,body:{getReader:function(){return c}}}})},A=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function W(){this.bitsNeeded=0,this.codePoint=0}W.prototype.decode=function(h){function y(C,v,B){if(B===1)return C>=128>>v&&C<<v<=2047;if(B===2)return C>=2048>>v&&C<<v<=55295||C>=57344>>v&&C<<v<=65535;if(B===3)return C>=65536>>v&&C<<v<=1114111;throw new Error}function E(C,v){if(C===6*1)return v>>6>15?3:v>31?2:1;if(C===6*2)return v>15?3:2;if(C===6*3)return 3;throw new Error}for(var g=65533,c="",d=this.bitsNeeded,p=this.codePoint,x=0;x<h.length;x+=1){var T=h[x];d!==0&&(T<128||T>191||!y(p<<6|T&63,d-6,E(d,p)))&&(d=0,p=g,c+=String.fromCharCode(p)),d===0?(T>=0&&T<=127?(d=0,p=T):T>=192&&T<=223?(d=6*1,p=T&31):T>=224&&T<=239?(d=6*2,p=T&15):T>=240&&T<=247?(d=6*3,p=T&7):(d=0,p=g),d!==0&&!y(p,d,E(d,p))&&(d=0,p=g)):(d-=6,p=p<<6|T&63),d===0&&(p<=65535?c+=String.fromCharCode(p):(c+=String.fromCharCode(55296+(p-65535-1>>10)),c+=String.fromCharCode(56320+(p-65535-1&1023))))}return this.bitsNeeded=d,this.codePoint=p,c};var V=function(){try{return new S().decode(new _().encode("test"),{stream:!0})==="test"}catch(h){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+h)}return!1};(S==null||_==null||!V())&&(S=W);var P=function(){};function I(h){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=P,this.onload=P,this.onerror=P,this.onreadystatechange=P,this._contentType="",this._xhr=h,this._sendTimeout=0,this._abort=P}I.prototype.open=function(h,y){this._abort(!0);var E=this,g=this._xhr,c=1,d=0;this._abort=function(B){E._sendTimeout!==0&&(i(E._sendTimeout),E._sendTimeout=0),(c===1||c===2||c===3)&&(c=4,g.onload=P,g.onerror=P,g.onabort=P,g.onprogress=P,g.onreadystatechange=P,g.abort(),d!==0&&(i(d),d=0),B||(E.readyState=4,E.onabort(null),E.onreadystatechange())),c=0};var p=function(){if(c===1){var B=0,L="",ee=void 0;if("contentType"in g)B=200,L="OK",ee=g.contentType;else try{B=g.status,L=g.statusText,ee=g.getResponseHeader("Content-Type")}catch(Ce){B=0,L="",ee=void 0}B!==0&&(c=2,E.readyState=2,E.status=B,E.statusText=L,E._contentType=ee,E.onreadystatechange())}},x=function(){if(p(),c===2||c===3){c=3;var B="";try{B=g.responseText}catch(L){}E.readyState=3,E.responseText=B,E.onprogress()}},T=function(B,L){if((L==null||L.preventDefault==null)&&(L={preventDefault:P}),x(),c===1||c===2||c===3){if(c=4,d!==0&&(i(d),d=0),E.readyState=4,B==="load")E.onload(L);else if(B==="error")E.onerror(L);else if(B==="abort")E.onabort(L);else throw new TypeError;E.onreadystatechange()}},C=function(B){g!=null&&(g.readyState===4?(!("onload"in g)||!("onerror"in g)||!("onabort"in g))&&T(g.responseText===""?"error":"load",B):g.readyState===3?"onprogress"in g||x():g.readyState===2&&p())},v=function(){d=n(function(){v()},500),g.readyState===3&&x()};"onload"in g&&(g.onload=function(B){T("load",B)}),"onerror"in g&&(g.onerror=function(B){T("error",B)}),"onabort"in g&&(g.onabort=function(B){T("abort",B)}),"onprogress"in g&&(g.onprogress=x),"onreadystatechange"in g&&(g.onreadystatechange=function(B){C(B)}),("contentType"in g||!("ontimeout"in o.prototype))&&(y+=(y.indexOf("?")===-1?"?":"&")+"padding=true"),g.open(h,y,!0),"readyState"in g&&(d=n(function(){v()},0))},I.prototype.abort=function(){this._abort(!1)},I.prototype.getResponseHeader=function(h){return this._contentType},I.prototype.setRequestHeader=function(h,y){var E=this._xhr;"setRequestHeader"in E&&E.setRequestHeader(h,y)},I.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},I.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&u!=null&&u.readyState!=null&&u.readyState!=="complete"){var h=this;h._sendTimeout=n(function(){h._sendTimeout=0,h.send()},4);return}var y=this._xhr;"withCredentials"in y&&(y.withCredentials=this.withCredentials);try{y.send(void 0)}catch(E){throw E}};function j(h){return h.replace(/[A-Z]/g,function(y){return String.fromCharCode(y.charCodeAt(0)+32)})}function oe(h){for(var y=Object.create(null),E=h.split(`\r
|
|
8
|
-
`),g=0;g<E.length;g+=1){var c=E[g],d=c.split(": "),p=d.shift(),x=d.join(": ");y[j(p)]=x}this._map=y}oe.prototype.get=function(h){return this._map[j(h)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function Z(){}Z.prototype.open=function(h,y,E,g,c,d,p){h.open("GET",c);var x=0;h.onprogress=function(){var C=h.responseText,v=C.slice(x);x+=v.length,E(v)},h.onerror=function(C){C.preventDefault(),g(new Error("NetworkError"))},h.onload=function(){g(null)},h.onabort=function(){g(null)},h.onreadystatechange=function(){if(h.readyState===o.HEADERS_RECEIVED){var C=h.status,v=h.statusText,B=h.getResponseHeader("Content-Type"),L=h.getAllResponseHeaders();y(C,v,B,new oe(L))}},h.withCredentials=d;for(var T in p)Object.prototype.hasOwnProperty.call(p,T)&&h.setRequestHeader(T,p[T]);return h.send(),h};function k(h){this._headers=h}k.prototype.get=function(h){return this._headers.get(h)};function D(){}D.prototype.open=function(h,y,E,g,c,d,p){var x=null,T=new A,C=T.signal,v=new S;return b(c,{headers:p,credentials:d?"include":"same-origin",signal:C,cache:"no-store"}).then(function(B){return x=B.body.getReader(),y(B.status,B.statusText,B.headers.get("Content-Type"),new k(B.headers)),new f(function(L,ee){var Ce=function(){x.read().then(function(X){if(X.done)L(void 0);else{var te=v.decode(X.value,{stream:!0});E(te),Ce()}}).catch(function(X){ee(X)})};Ce()})}).catch(function(B){if(B.name!=="AbortError")return B}).then(function(B){g(B)}),{abort:function(){x!=null&&x.cancel(),T.abort()}}};function q(){this._listeners=Object.create(null)}function U(h){n(function(){throw h},0)}q.prototype.dispatchEvent=function(h){h.target=this;var y=this._listeners[h.type];if(y!=null)for(var E=y.length,g=0;g<E;g+=1){var c=y[g];try{typeof c.handleEvent=="function"?c.handleEvent(h):c.call(this,h)}catch(d){U(d)}}},q.prototype.addEventListener=function(h,y){h=String(h);var E=this._listeners,g=E[h];g==null&&(g=[],E[h]=g);for(var c=!1,d=0;d<g.length;d+=1)g[d]===y&&(c=!0);c||g.push(y)},q.prototype.removeEventListener=function(h,y){h=String(h);var E=this._listeners,g=E[h];if(g!=null){for(var c=[],d=0;d<g.length;d+=1)g[d]!==y&&c.push(g[d]);c.length===0?delete E[h]:E[h]=c}};function K(h){this.type=h,this.target=void 0}function fe(h,y){K.call(this,h),this.data=y.data,this.lastEventId=y.lastEventId}fe.prototype=Object.create(K.prototype);function ve(h,y){K.call(this,h),this.status=y.status,this.statusText=y.statusText,this.headers=y.headers}ve.prototype=Object.create(K.prototype);function w(h,y){K.call(this,h),this.error=y.error}w.prototype=Object.create(K.prototype);var _e=-1,me=0,
|
|
9
|
-
`,Ie+=we):xe==="id"?ft=we:xe==="event"?Ee=we:xe==="retry"?(d=Ke(we,d),T=d):xe==="heartbeatTimeout"&&(p=Ke(we,p),te!==0&&(i(te),te=n(function(){et()},p)))}if(re===be){if(Ie!==""){x=ft,Ee===""&&(Ee="message");var De=new fe(Ee,{data:Ie.slice(1),lastEventId:ft});if(h.dispatchEvent(De),Ee==="open"?Ae(h,h.onopen,De):Ee==="message"?Ae(h,h.onmessage,De):Ee==="error"&&Ae(h,h.onerror,De),de===Oe)return}Ie="",Ee=""}re=
|
|
8
|
+
`),g=0;g<E.length;g+=1){var c=E[g],d=c.split(": "),p=d.shift(),x=d.join(": ");y[j(p)]=x}this._map=y}oe.prototype.get=function(h){return this._map[j(h)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function Z(){}Z.prototype.open=function(h,y,E,g,c,d,p){h.open("GET",c);var x=0;h.onprogress=function(){var C=h.responseText,v=C.slice(x);x+=v.length,E(v)},h.onerror=function(C){C.preventDefault(),g(new Error("NetworkError"))},h.onload=function(){g(null)},h.onabort=function(){g(null)},h.onreadystatechange=function(){if(h.readyState===o.HEADERS_RECEIVED){var C=h.status,v=h.statusText,B=h.getResponseHeader("Content-Type"),L=h.getAllResponseHeaders();y(C,v,B,new oe(L))}},h.withCredentials=d;for(var T in p)Object.prototype.hasOwnProperty.call(p,T)&&h.setRequestHeader(T,p[T]);return h.send(),h};function k(h){this._headers=h}k.prototype.get=function(h){return this._headers.get(h)};function D(){}D.prototype.open=function(h,y,E,g,c,d,p){var x=null,T=new A,C=T.signal,v=new S;return b(c,{headers:p,credentials:d?"include":"same-origin",signal:C,cache:"no-store"}).then(function(B){return x=B.body.getReader(),y(B.status,B.statusText,B.headers.get("Content-Type"),new k(B.headers)),new f(function(L,ee){var Ce=function(){x.read().then(function(X){if(X.done)L(void 0);else{var te=v.decode(X.value,{stream:!0});E(te),Ce()}}).catch(function(X){ee(X)})};Ce()})}).catch(function(B){if(B.name!=="AbortError")return B}).then(function(B){g(B)}),{abort:function(){x!=null&&x.cancel(),T.abort()}}};function q(){this._listeners=Object.create(null)}function U(h){n(function(){throw h},0)}q.prototype.dispatchEvent=function(h){h.target=this;var y=this._listeners[h.type];if(y!=null)for(var E=y.length,g=0;g<E;g+=1){var c=y[g];try{typeof c.handleEvent=="function"?c.handleEvent(h):c.call(this,h)}catch(d){U(d)}}},q.prototype.addEventListener=function(h,y){h=String(h);var E=this._listeners,g=E[h];g==null&&(g=[],E[h]=g);for(var c=!1,d=0;d<g.length;d+=1)g[d]===y&&(c=!0);c||g.push(y)},q.prototype.removeEventListener=function(h,y){h=String(h);var E=this._listeners,g=E[h];if(g!=null){for(var c=[],d=0;d<g.length;d+=1)g[d]!==y&&c.push(g[d]);c.length===0?delete E[h]:E[h]=c}};function K(h){this.type=h,this.target=void 0}function fe(h,y){K.call(this,h),this.data=y.data,this.lastEventId=y.lastEventId}fe.prototype=Object.create(K.prototype);function ve(h,y){K.call(this,h),this.status=y.status,this.statusText=y.statusText,this.headers=y.headers}ve.prototype=Object.create(K.prototype);function w(h,y){K.call(this,h),this.error=y.error}w.prototype=Object.create(K.prototype);var _e=-1,me=0,ae=1,Oe=2,Ye=-1,be=0,Qe=1,Le=2,ut=3,Mt=/^text\/event\-stream(;.*)?$/i,Je=1e3,lt=18e6,Ke=function(h,y){var E=h==null?y:parseInt(h,10);return E!==E&&(E=y),Ne(E)},Ne=function(h){return Math.min(Math.max(h,Je),lt)},Ae=function(h,y,E){try{typeof y=="function"&&y.call(h,E)}catch(g){U(g)}};function se(h,y){q.call(this),y=y||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Rt(this,h,y)}function Pt(){return o!=null&&"withCredentials"in o.prototype||a==null?new o:new a}var ct=b!=null&&m!=null&&"body"in m.prototype;function Rt(h,y,E){y=String(y);var g=!!E.withCredentials,c=E.lastEventIdQueryParameterName||"lastEventId",d=Ne(1e3),p=Ke(E.heartbeatTimeout,45e3),x="",T=d,C=!1,v=0,B=E.headers||{},L=E.Transport,ee=ct&&L==null?void 0:new I(L!=null?new L:Pt()),Ce=L!=null&&typeof L!="string"?new L:ee==null?new D:new Z,X=void 0,te=0,de=_e,Ie="",ft="",Ee="",dt="",re=be,Lt=0,Me=0,Rn=function(Y,z,ue,le){if(de===me)if(Y===200&&ue!=null&&Mt.test(ue)){de=ae,C=Date.now(),T=d,h.readyState=ae;var ne=new ve("open",{status:Y,statusText:z,headers:le});h.dispatchEvent(ne),Ae(h,h.onopen,ne)}else{var J="";Y!==200?(z&&(z=z.replace(/\s+/g," ")),J="EventSource's response has a status "+Y+" "+z+" that is not 200. Aborting the connection."):J="EventSource's response has a Content-Type specifying an unsupported type: "+(ue==null?"-":ue.replace(/\s+/g," "))+". Aborting the connection.",Nt();var ne=new ve("error",{status:Y,statusText:z,headers:le});h.dispatchEvent(ne),Ae(h,h.onerror,ne),console.error(J)}},Ln=function(Y){if(de===ae){for(var z=-1,ue=0;ue<Y.length;ue+=1){var le=Y.charCodeAt(ue);(le===10||le===13)&&(z=ue)}var ne=(z!==-1?dt:"")+Y.slice(0,z+1);dt=(z===-1?dt:"")+Y.slice(z+1),Y!==""&&(C=Date.now(),v+=Y.length);for(var J=0;J<ne.length;J+=1){var le=ne.charCodeAt(J);if(re===Ye&&le===10)re=be;else if(re===Ye&&(re=be),le===13||le===10){if(re!==be){re===Qe&&(Me=J+1);var xe=ne.slice(Lt,Me-1),we=ne.slice(Me+(Me<J&&ne.charCodeAt(Me)===32?1:0),J);xe==="data"?(Ie+=`
|
|
9
|
+
`,Ie+=we):xe==="id"?ft=we:xe==="event"?Ee=we:xe==="retry"?(d=Ke(we,d),T=d):xe==="heartbeatTimeout"&&(p=Ke(we,p),te!==0&&(i(te),te=n(function(){et()},p)))}if(re===be){if(Ie!==""){x=ft,Ee===""&&(Ee="message");var De=new fe(Ee,{data:Ie.slice(1),lastEventId:ft});if(h.dispatchEvent(De),Ee==="open"?Ae(h,h.onopen,De):Ee==="message"?Ae(h,h.onmessage,De):Ee==="error"&&Ae(h,h.onerror,De),de===Oe)return}Ie="",Ee=""}re=le===13?Ye:be}else re===be&&(Lt=J,re=Qe),re===Qe?le===58&&(Me=J+1,re=Le):re===Le&&(re=ut)}}},gr=function(Y){if(de===ae||de===me){de=_e,te!==0&&(i(te),te=0),te=n(function(){et()},T),T=Ne(Math.min(d*16,T*2)),h.readyState=me;var z=new w("error",{error:Y});h.dispatchEvent(z),Ae(h,h.onerror,z),Y!=null&&console.error(Y)}},Nt=function(){de=Oe,X!=null&&(X.abort(),X=void 0),te!==0&&(i(te),te=0),h.readyState=Oe},et=function(){if(te=0,de!==_e){if(!C&&X!=null)gr(new Error("No activity within "+p+" milliseconds. "+(de===me?"No response received.":v+" chars received.")+" Reconnecting.")),X!=null&&(X.abort(),X=void 0);else{var Y=Math.max((C||Date.now())+p-Date.now(),1);C=!1,te=n(function(){et()},Y)}return}C=!1,v=0,te=n(function(){et()},p),de=me,Ie="",Ee="",ft=x,dt="",Lt=0,Me=0,re=be;var z=y;if(y.slice(0,5)!=="data:"&&y.slice(0,5)!=="blob:"&&x!==""){var ue=y.indexOf("?");z=ue===-1?y:y.slice(0,ue+1)+y.slice(ue+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(we,De){return De===c?"":we}),z+=(y.indexOf("?")===-1?"?":"&")+c+"="+encodeURIComponent(x)}var le=h.withCredentials,ne={};ne.Accept="text/event-stream";var J=h.headers;if(J!=null)for(var xe in J)Object.prototype.hasOwnProperty.call(J,xe)&&(ne[xe]=J[xe]);try{X=Ce.open(ee,Rn,Ln,gr,z,le,ne)}catch(we){throw Nt(),we}};h.url=y,h.readyState=me,h.withCredentials=g,h.headers=B,h._close=Nt,et()}se.prototype=Object.create(q.prototype),se.prototype.CONNECTING=me,se.prototype.OPEN=ae,se.prototype.CLOSED=Oe,se.prototype.close=function(){this._close()},se.CONNECTING=me,se.OPEN=ae,se.CLOSED=Oe,se.prototype.withCredentials=void 0;var ht=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(ht=se),function(h){{var y=h(t);y!==void 0&&(e.exports=y)}}(function(h){h.EventSourcePolyfill=se,h.NativeEventSource=l,h.EventSource=ht})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:di:globalThis)})(sr,sr.exports);var na=sr.exports;/*! *****************************************************************************
|
|
10
10
|
Copyright (c) Microsoft Corporation.
|
|
11
11
|
|
|
12
12
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -21,4 +21,4 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
21
21
|
PERFORMANCE OF THIS SOFTWARE.
|
|
22
22
|
***************************************************************************** */var ur=function(e,t){return ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ur(e,t)};function st(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ur(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function lr(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function cr(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function hr(e,t,r){if(arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||t)}function Be(e){return typeof e=="function"}function Bn(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Zt=Bn(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
23
23
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
24
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function fr(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ot=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=lr(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(A){t={error:A}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var f=this.initialTeardown;if(Be(f))try{f()}catch(A){o=A instanceof Zt?A.errors:[A]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var m=lr(b),S=m.next();!S.done;S=m.next()){var _=S.value;try{Dr(_)}catch(A){o=o!=null?o:[],A instanceof Zt?o=hr(hr([],cr(o)),cr(A.errors)):o.push(A)}}}catch(A){n={error:A}}finally{try{S&&!S.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(o)throw new Zt(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Dr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&fr(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&fr(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),An=Ot.EMPTY;function Cn(e){return e instanceof Ot||e&&"closed"in e&&Be(e.remove)&&Be(e.add)&&Be(e.unsubscribe)}function Dr(e){Be(e)?e():e.unsubscribe()}var ia={Promise:void 0},oa={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,hr([e,t],cr(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function aa(e){oa.setTimeout(function(){throw e})}function Ur(){}function vt(e){e()}var Hn=function(e){st(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Cn(r)&&r.add(n)):n.destination=la,n}return t.create=function(r,n,i){return new dr(r,n,i)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ot),sa=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){mt(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){mt(n)}else mt(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){mt(r)}},e}(),dr=function(e){st(t,e);function t(r,n,i){var o=e.call(this)||this,a;return Be(r)||!r?a={next:r!=null?r:void 0,error:n!=null?n:void 0,complete:i!=null?i:void 0}:a=r,o.destination=new sa(a),o}return t}(Hn);function mt(e){aa(e)}function ua(e){throw e}var la={closed:!0,next:Ur,error:ua,complete:Ur},ca=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ha(e){return e}function fa(e){return e.length===0?ha:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var Fr=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=pa(t)?t:new dr(t,r,n);return vt(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Gr(r),new r(function(i,o){var a=new dr({next:function(s){try{t(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[ca]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return fa(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Gr(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function Gr(e){var t;return(t=e!=null?e:ia.Promise)!==null&&t!==void 0?t:Promise}function da(e){return e&&Be(e.next)&&Be(e.error)&&Be(e.complete)}function pa(e){return e&&e instanceof Hn||da(e)&&Cn(e)}var ma=Bn(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),On=function(e){st(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new jr(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new ma},t.prototype.next=function(r){var n=this;vt(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=lr(n.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(r)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;vt(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;vt(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?An:(this.currentObservers=null,s.push(r),new Ot(function(){n.currentObservers=null,fr(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new Fr;return r.source=this,r},t.create=function(r,n){return new jr(r,n)},t}(Fr),jr=function(e){st(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:An},t}(On),Mn={now:function(){return(Mn.delegate||Date).now()},delegate:void 0},ba=function(e){st(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=Mn);var o=e.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return t.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,s=n._timestampProvider,l=n._windowTime;i||(o.push(r),!a&&o.push(s.now()+l)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!r.closed;l+=o?1:2)r.next(s[l]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,s=(a?1:2)*n;if(n<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,f=1;f<o.length&&o[f]<=l;f+=2)u=f;u&&o.splice(0,u+1)}},t}(On);const kr=[],$r={},ga=(e,t=0)=>{if(kr.indexOf(e)==-1){const r=new ba(t);$r[e]=r,kr.push(e)}return $r[e]};window.emWidgets={topic:ga};const ya=e=>!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));function va(e){kn(e,"svelte-lfsn3o",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}@keyframes growWidthPercent{from{height:0}to{height:100%}}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px;fill:black}.ShowBalance .BalanceValue span{padding-left:5px}.ShowBalance .BalanceValue .TriangleActive,.ShowBalance .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance .BalanceValue .TriangleActive:hover,.ShowBalance .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.ShowBalance .BalanceValue .TriangleActive svg,.ShowBalance .BalanceValue .TriangleInactive svg{margin:2px 0px}.ShowBalance .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open{opacity:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit;opacity:0}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose:hover{transform:scale(1.1)}.BalanceModalClose.Open{opacity:1}.BalanceModal{transition:all 0.2s ease-in;width:270px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary);font-size:14px}.BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open{opacity:1}')}function Vr(e,t,r){const n=e.slice();return n[54]=t[r],n}function Xr(e,t,r){const n=e.slice();return n[57]=t[r],n}function _a(e){let t,r,n=(e[1].Total?e[8](e[1].Total[0].amount):"0")+"",i,o,a,s,l,u,f,b,m,S,_=e[4]&&zr(e);return{c(){t=G("button"),r=G("p"),i=Se(n),o=Te(),a=G("span"),s=_r("svg"),l=_r("path"),f=Te(),_&&_.c(),b=Xn(),M(l,"id","arrow"),M(l,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),M(l,"transform","translate(-274.511 -441.088)"),M(l,"fill","#d1d1d1"),M(s,"xmlns","http://www.w3.org/2000/svg"),M(s,"width","14"),M(s,"height","6.835"),M(s,"viewBox","0 0 14 6.835"),M(a,"class",u=e[3]?"TriangleActive":"TriangleInactive"),M(t,"class","BalanceValue")},m(A,N){ye(A,t,N),R(t,r),R(r,i),R(t,o),R(t,a),R(a,s),R(s,l),ye(A,f,N),_&&_.m(A,N),ye(A,b,N),m||(S=_t(t,"click",e[26]),m=!0)},p(A,N){N[0]&2&&n!==(n=(A[1].Total?A[8](A[1].Total[0].amount):"0")+"")&&Pe(i,n),N[0]&8&&u!==(u=A[3]?"TriangleActive":"TriangleInactive")&&M(a,"class",u),A[4]?_?_.p(A,N):(_=zr(A),_.c(),_.m(b.parentNode,b)):_&&(_.d(1),_=null)},d(A){A&&(pe(t),pe(f),pe(b)),_&&_.d(A),m=!1,S()}}}function Ea(e){let t,r=e[6]("Loading")+"",n;return{c(){t=G("p"),n=Se(r),M(t,"class","Loading")},m(i,o){ye(i,t,o),R(t,n)},p(i,o){o[0]&64&&r!==(r=i[6]("Loading")+"")&&Pe(n,r)},d(i){i&&pe(t)}}}function zr(e){let t,r,n,i,o,a,s,l,u=e[6]("Title")+"",f,b,m,S,_,A,N=e[6]("DepositButton")+"",W,V,P,I,j,oe,Z=Et(Object.keys(e[1])),k=[];for(let D=0;D<Z.length;D+=1)k[D]=Zr(Vr(e,Z,D));return{c(){t=G("div"),r=G("button"),i=Te(),o=G("div"),a=G("div"),s=G("div"),l=G("p"),f=Se(u),b=Te(),m=G("div");for(let D=0;D<k.length;D+=1)k[D].c();S=Te(),_=G("div"),A=G("button"),W=Se(N),M(r,"class",n="BalanceModalClose "+(e[3]?"Open":"")),M(l,"class","BalanceModalTitle"),M(s,"class","BalanceModalHeader"),M(m,"class","BalanceModalBody"),M(A,"class","BalanceModalAction"),M(_,"class","BalanceModalFooter"),M(a,"class",V="ModalContent "+(e[3]?"Open":"")),M(o,"class",P="BalanceModal "+(e[3]?"Open":"")),M(t,"class",I="BalanceModalWrapper "+(e[3]?"Open":""))},m(D,q){ye(D,t,q),R(t,r),R(t,i),R(t,o),R(o,a),R(a,s),R(s,l),R(l,f),R(a,b),R(a,m);for(let U=0;U<k.length;U+=1)k[U]&&k[U].m(m,null);R(a,S),R(a,_),R(_,A),R(A,W),j||(oe=[_t(r,"click",e[27]),_t(A,"click",e[28])],j=!0)},p(D,q){if(q[0]&8&&n!==(n="BalanceModalClose "+(D[3]?"Open":""))&&M(r,"class",n),q[0]&64&&u!==(u=D[6]("Title")+"")&&Pe(f,u),q[0]&322){Z=Et(Object.keys(D[1]));let U;for(U=0;U<Z.length;U+=1){const K=Vr(D,Z,U);k[U]?k[U].p(K,q):(k[U]=Zr(K),k[U].c(),k[U].m(m,null))}for(;U<k.length;U+=1)k[U].d(1);k.length=Z.length}q[0]&64&&N!==(N=D[6]("DepositButton")+"")&&Pe(W,N),q[0]&8&&V!==(V="ModalContent "+(D[3]?"Open":""))&&M(a,"class",V),q[0]&8&&P!==(P="BalanceModal "+(D[3]?"Open":""))&&M(o,"class",P),q[0]&8&&I!==(I="BalanceModalWrapper "+(D[3]?"Open":""))&&M(t,"class",I)},d(D){D&&pe(t),Kr(k,D),j=!1,ze(oe)}}}function Wr(e){let t,r,n=e[6](e[54])+"",i,o,a=(e[57].productType?e[6](e[57].productType):"")+"",s,l,u,f,b=e[8](e[57].amount)+"",m;return{c(){t=G("div"),r=G("p"),i=Se(n),o=Te(),s=Se(a),l=Te(),u=G("p"),f=G("span"),m=Se(b),M(r,"class","BalanceModalText"),M(f,"class","BalanceModalAmount"),M(u,"class","BalanceModalValue"),M(t,"class","BalanceModalRowLine")},m(S,_){ye(S,t,_),R(t,r),R(r,i),R(r,o),R(r,s),R(t,l),R(t,u),R(u,f),R(f,m)},p(S,_){_[0]&66&&n!==(n=S[6](S[54])+"")&&Pe(i,n),_[0]&66&&a!==(a=(S[57].productType?S[6](S[57].productType):"")+"")&&Pe(s,a),_[0]&2&&b!==(b=S[8](S[57].amount)+"")&&Pe(m,b)},d(S){S&&pe(t)}}}function Zr(e){let t,r,n=Et(e[1][e[54]]),i=[];for(let o=0;o<n.length;o+=1)i[o]=Wr(Xr(e,n,o));return{c(){t=G("div");for(let o=0;o<i.length;o+=1)i[o].c();r=Te(),M(t,"class","BalanceModalRowBoth")},m(o,a){ye(o,t,a);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null);R(t,r)},p(o,a){if(a[0]&322){n=Et(o[1][o[54]]);let s;for(s=0;s<n.length;s+=1){const l=Xr(o,n,s);i[s]?i[s].p(l,a):(i[s]=Wr(l),i[s].c(),i[s].m(t,r))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},d(o){o&&pe(t),Kr(i,o)}}}function qr(e){let t,r,n;return{c(){t=G("button"),M(t,"class","ShowBalanceModalOverlay")},m(i,o){ye(i,t,o),r||(n=_t(t,"click",e[29]),r=!0)},p:he,d(i){i&&pe(t),r=!1,n()}}}function xa(e){let t,r,n,i;function o(u,f){return u[2]?Ea:_a}let a=o(e),s=a(e),l=e[4]&&qr(e);return{c(){t=G("div"),r=G("div"),s.c(),i=Te(),l&&l.c(),M(r,"class",n="ShowBalance "+(e[5]?"Mobile":""))},m(u,f){ye(u,t,f),R(t,r),s.m(r,null),R(t,i),l&&l.m(t,null),e[30](t)},p(u,f){a===(a=o(u))&&s?s.p(u,f):(s.d(1),s=a(u),s&&(s.c(),s.m(r,null))),f[0]&32&&n!==(n="ShowBalance "+(u[5]?"Mobile":""))&&M(r,"class",n),u[4]?l?l.p(u,f):(l=qr(u),l.c(),l.m(t,null)):l&&(l.d(1),l=null)},i:he,o:he,d(u){u&&pe(t),s.d(),l&&l.d(),e[30](null)}}}function wa(e,t,r){let n;jn(e,ta,c=>r(6,n=c));let{userid:i=""}=t,{session:o=""}=t,{endpoint:a=""}=t,{lang:s="en"}=t,{mbsource:l}=t,{clientstyling:u=""}=t,{clientstylingurl:f=""}=t,{translationurl:b=""}=t,{gmversion:m="gm16"}=t,{displaybalanceoption:S="All"}=t,{totalcalculationmode:_="totalCashAmount"}=t,{currencylocale:A="en"}=t,{currencydisplay:N="symbol"}=t,{maximumfractiondigits:W="2"}=t,{minimumfractiondigits:V="0"}=t,{customdisplayformat:P=""}=t,I,j=!0,oe=!1,Z=!1,k=!1,D=!1,q=window.navigator.userAgent,U,K="",fe=[],ve;const w={},_e=["totalCashAmount","totalRealAmount"],me=()=>{fetch(b).then(c=>c.json()).then(c=>Object.keys(c).forEach(d=>Nr(d,c[d]))).catch(c=>console.log(c))};Object.keys(Ir).forEach(c=>Nr(c,Ir[c]));const le=c=>{switch(c){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),r(4,k=!0),setTimeout(()=>r(3,oe=!0),150);break;case"closebalance":r(3,oe=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{r(4,k=!1)},150);break}},Oe=c=>{if(P)return Ye(c);const d=A||s,p={style:"currency",currency:K,useGrouping:!0,currencyDisplay:N||"code",maximumFractionDigits:W===""||isNaN(Number(W))?2:Number(W),minimumFractionDigits:V===""||isNaN(Number(V))?0:Number(V)};return new Intl.NumberFormat(d,p).format(c)},Ye=c=>{const d=[];let p="";for(const x of P)switch(x){default:p+=x;break;case"{":p&&d.push(p),p="";break;case"}":const[T,C]=p.split("|");if(p="",T.toLowerCase()==="currency")p=K;else if(T.toLowerCase()==="amount"){let v=",",B=".",L=2;C&&(C[0]!==" "&&(v=C[0]),C[1]!==" "&&(B=C[1]),C[2]!==" "&&!isNaN(Number(C[2]))&&(L=Number(C[2])));let[ee,Ce]=String(Math.floor(c*Dt(10,L))/Dt(10,L)).split(".");p+=ee[0];for(let X=1;X<ee.length;++X)(ee.length-X)%3===0?p+=v+ee[X]:p+=ee[X];Ce&&(p+=B+Ce)}p&&d.push(p),p="";break}return d.push(p),d.join("")},be=()=>Gt(this,null,function*(){var d,p,x;r(2,j=!0);const c=new URL(`${a}/v1/player/${i}/account`);try{const T=yield fetch(c,{method:"GET",headers:{"X-SessionID":o}}),C=yield T.json();if(T.ok)window.postMessage({type:"BalancedFetched"},window.location.href),fe=C.items,K=(d=fe.find(v=>v.displayName==="Casino"))==null?void 0:d.currency,r(1,w.Total=[{amount:C.totalAmount[K]}],w),r(1,w.Real=[{amount:(p=fe.find(v=>v.displayName==="Casino"))==null?void 0:p.balanceAmount}],w),r(1,w.Bonus=[{amount:(x=fe.find(v=>v.displayName==="UBS"))==null?void 0:x.balanceAmount}],w);else throw new Error("Failed to fetch balance data !")}catch(T){console.log("Balance error: ",T)}finally{r(2,j=!1)}}),Qe=()=>{r(2,j=!0);const c=new URL(`${a}/v2/player/${i}/balance`),d=new Headers;d.append("X-SessionID",o),fetch(c,{method:"GET",headers:d}).then(x=>x.json()).then(x=>{x[_]||r(10,_=_e[0]);const T=x.items.find(v=>v.type==="Real"&&v.walletAccountType==="Ordinary");if(K=T.currency,Z=!!T.productType,r(1,w.Total=[{amount:0}],w),r(1,w.Real=[],w),r(1,w.Bonus=[],w),r(1,w.Credit=[],w),!Z){ve={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},r(1,w.Total[0].amount=x[_][K],w);for(const v of x.items)switch(v.type){case"Bonus":w.Bonus.length===0?w.Bonus.push({amount:v.amount}):r(1,w.Bonus[0].amount+=v.amount,w);break;case"Real":if(v.creditLine&&w.Credit.length===0&&w.Credit.push({amount:v.creditLine}),_==="totalRealAmount")continue;w.Real.length===0?w.Real.push({amount:v.amount}):r(1,w.Real[0].amount+=v.amount,w);break}for(const[v,B]of Object.entries(w))B.length<1&&delete w[v];r(2,j=!1);return}ve={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let C=x.items;S&&S!=="All"&&(C=x.items.filter(v=>v.productType===S));for(const v of C){let B;switch(v.type){case"Bonus":B=w.Bonus.findIndex(L=>L.productType===v.productType),B>0?r(1,w.Bonus[B].amount+=v.amount,w):w.Bonus.push({amount:v.amount,productType:v.productType});break;case"Real":v.creditLine&&w.Credit.push({amount:v.creditLine,productType:v.productType}),B=w.Real.findIndex(L=>L.productType===v.productType),B>0?r(1,w.Real[B].amount+=v.amount,w):w.Real.push({amount:v.amount,productType:v.productType});break}}lt();for(const[v,B]of Object.entries(w))B.length<1&&delete w[v];r(2,j=!1)}).catch(x=>{throw r(2,j=!1),console.log("Balance fetch error",x),new Error("Failed to fetch balance data!")})},Le=()=>{if(U&&U.close(),o.length<1)return;let c,d;switch(m){case"gm16":c=new URL(`${a}/v2/player/${i}/information/updates`),d=T=>Ke(T);break;case"gmcore":c=new URL(`${a}/v1/player/${i}/balance/updates`),d=T=>Mt(T);break}const p={accept:"text/event-stream","X-SessionId":o},x=new na.EventSourcePolyfill(c,{headers:p});U=x,x.addEventListener("message",d)},ut=c=>{let d;try{d=JSON.parse(c)}catch(p){console.log("Balance stream failed: ",p);return}return d},Mt=c=>{var T,C;const d=ut(c.data);if(!d){Le();return}let p="0";const x=d.balanceChange;fe=fe.map(v=>(x&&x[v.id]&&(v=Ft(Ut({},v),{balanceAmount:x[v.id].afterAmount})),p=(parseFloat(v==null?void 0:v.balanceAmount)+parseFloat(p)).toString(),v)),r(1,w.Real=[{amount:(T=fe[0])==null?void 0:T.balanceAmount}],w),r(1,w.Bonus=[{amount:(C=fe[1])==null?void 0:C.balanceAmount}],w),r(1,w.Total=[{amount:Number(p)}],w)},Je=(c,d,p)=>{let x=null;switch(p.walletAccountType){case"Ordinary":(p.afterAmount!==p.affectedAmount||d.lastOrdinaryAfterAmount===0)&&(d.lastOrdinaryAfterAmount=p.afterAmount,d.showCreditLineAfterAmount||(x=p.afterAmount));break;case"CreditLine":p.afterAmount!==0?(x=p.afterAmount,d.showCreditLineAfterAmount=!0):(x=d.lastOrdinaryAfterAmount,d.showCreditLineAfterAmount=!1);break;default:x=p.afterAmount}return x===null?c:x},lt=()=>{switch(_){case"totalCashAmount":let c=0;for(const p of["Real","Bonus"])for(const x of w[p])c+=Math.max(x.amount,0);r(1,w.Total[0].amount=c,w);break;case"totalRealAmount":if(!Z)return;let d=0;for(const p of w.Real)d+=p.amount;r(1,w.Total[0].amount=d,w)}},Ke=c=>{const d=ut(c.data);if(!d){Le();return}if(Ae(d==null?void 0:d.type)||d.type!=="BALANCE_UPDATE_V2")return;const p=d.body.balanceChange;for(const[x,T]of Object.entries(p))if(_==="totalRealAmount"&&x==="Real"&&!Z&&r(1,w.Total[0].amount=Je(w.Total[0].amount,ve,T),w),!!w[x])for(const C of w[x]){if(!Z){C.amount=x==="Real"?Je(C.amount,ve,T):T.afterAmount;continue}T.productType===C.productType&&(C.amount=x==="Real"?Je(C.amount,ve[C.productType],T):T.afterAmount)}lt()},Ne=()=>{le("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Ae=c=>c==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,ae=()=>{_e.includes(_)||(console.error(`Unsupported value ('${_}') for totalcalculationmode parameter. Only the following values are supported ${_e}. Using default value ('${_e[0]}').`),r(10,_=_e[0]))},Pt=()=>{switch(ra(s),ae(),m){case"gmcore":be();break;case"gm16":Qe();break;default:throw Error(`Invalid apiversion attribute: ${m}`)}},ct=c=>c.data&&c.data.type==="LogoutSuccessfull"&&U.close(),Rt=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};qn(()=>(window.addEventListener("message",ct,!1),r(5,D=ya(q)),()=>{window.removeEventListener("message",ct),U&&U.close()}));const ht=()=>le("balance"),h=()=>le("closebalance"),y=()=>Ne(),E=()=>le("closebalance");function g(c){qt[c?"unshift":"push"](()=>{I=c,r(0,I)})}return e.$$set=c=>{"userid"in c&&r(11,i=c.userid),"session"in c&&r(12,o=c.session),"endpoint"in c&&r(13,a=c.endpoint),"lang"in c&&r(14,s=c.lang),"mbsource"in c&&r(15,l=c.mbsource),"clientstyling"in c&&r(16,u=c.clientstyling),"clientstylingurl"in c&&r(17,f=c.clientstylingurl),"translationurl"in c&&r(18,b=c.translationurl),"gmversion"in c&&r(19,m=c.gmversion),"displaybalanceoption"in c&&r(20,S=c.displaybalanceoption),"totalcalculationmode"in c&&r(10,_=c.totalcalculationmode),"currencylocale"in c&&r(21,A=c.currencylocale),"currencydisplay"in c&&r(22,N=c.currencydisplay),"maximumfractiondigits"in c&&r(23,W=c.maximumfractiondigits),"minimumfractiondigits"in c&&r(24,V=c.minimumfractiondigits),"customdisplayformat"in c&&r(25,P=c.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&1603584&&a&&i&&o&&s&&m&&S&&Pt(),e.$$.dirty[0]&538624&&a&&i&&o&&m&&Le(),e.$$.dirty[0]&262144&&b&&me(),e.$$.dirty[0]&2&&w.Total&&Rt(),e.$$.dirty[0]&65537&&u&&I&&li(I,u),e.$$.dirty[0]&131073&&f&&I&&ci(I,f),e.$$.dirty[0]&32769&&l&&I&&hi(I,`${l}.Style`)},[I,w,j,oe,k,D,n,le,Oe,Ne,_,i,o,a,s,l,u,f,b,m,S,A,N,W,V,P,ht,h,y,E,g]}class Pn extends si{constructor(t){super(),oi(this,t,wa,xa,Qr,{userid:11,session:12,endpoint:13,lang:14,mbsource:15,clientstyling:16,clientstylingurl:17,translationurl:18,gmversion:19,displaybalanceoption:20,totalcalculationmode:10,currencylocale:21,currencydisplay:22,maximumfractiondigits:23,minimumfractiondigits:24,customdisplayformat:25},va,[-1,-1])}get userid(){return this.$$.ctx[11]}set userid(t){this.$$set({userid:t}),Q()}get session(){return this.$$.ctx[12]}set session(t){this.$$set({session:t}),Q()}get endpoint(){return this.$$.ctx[13]}set endpoint(t){this.$$set({endpoint:t}),Q()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),Q()}get mbsource(){return this.$$.ctx[15]}set mbsource(t){this.$$set({mbsource:t}),Q()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(t){this.$$set({clientstyling:t}),Q()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Q()}get translationurl(){return this.$$.ctx[18]}set translationurl(t){this.$$set({translationurl:t}),Q()}get gmversion(){return this.$$.ctx[19]}set gmversion(t){this.$$set({gmversion:t}),Q()}get displaybalanceoption(){return this.$$.ctx[20]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),Q()}get totalcalculationmode(){return this.$$.ctx[10]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),Q()}get currencylocale(){return this.$$.ctx[21]}set currencylocale(t){this.$$set({currencylocale:t}),Q()}get currencydisplay(){return this.$$.ctx[22]}set currencydisplay(t){this.$$set({currencydisplay:t}),Q()}get maximumfractiondigits(){return this.$$.ctx[23]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),Q()}get minimumfractiondigits(){return this.$$.ctx[24]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),Q()}get customdisplayformat(){return this.$$.ctx[25]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),Q()}}ai(Pn,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Pn;
|
|
24
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function fr(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ot=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=lr(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(A){t={error:A}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var f=this.initialTeardown;if(Be(f))try{f()}catch(A){o=A instanceof Zt?A.errors:[A]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var m=lr(b),S=m.next();!S.done;S=m.next()){var _=S.value;try{Dr(_)}catch(A){o=o!=null?o:[],A instanceof Zt?o=hr(hr([],cr(o)),cr(A.errors)):o.push(A)}}}catch(A){n={error:A}}finally{try{S&&!S.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(o)throw new Zt(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Dr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&fr(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&fr(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),An=Ot.EMPTY;function Cn(e){return e instanceof Ot||e&&"closed"in e&&Be(e.remove)&&Be(e.add)&&Be(e.unsubscribe)}function Dr(e){Be(e)?e():e.unsubscribe()}var ia={Promise:void 0},oa={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,hr([e,t],cr(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function aa(e){oa.setTimeout(function(){throw e})}function Ur(){}function vt(e){e()}var Hn=function(e){st(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Cn(r)&&r.add(n)):n.destination=la,n}return t.create=function(r,n,i){return new dr(r,n,i)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ot),sa=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){mt(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){mt(n)}else mt(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){mt(r)}},e}(),dr=function(e){st(t,e);function t(r,n,i){var o=e.call(this)||this,a;return Be(r)||!r?a={next:r!=null?r:void 0,error:n!=null?n:void 0,complete:i!=null?i:void 0}:a=r,o.destination=new sa(a),o}return t}(Hn);function mt(e){aa(e)}function ua(e){throw e}var la={closed:!0,next:Ur,error:ua,complete:Ur},ca=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ha(e){return e}function fa(e){return e.length===0?ha:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var Fr=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=pa(t)?t:new dr(t,r,n);return vt(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Gr(r),new r(function(i,o){var a=new dr({next:function(s){try{t(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[ca]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return fa(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Gr(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function Gr(e){var t;return(t=e!=null?e:ia.Promise)!==null&&t!==void 0?t:Promise}function da(e){return e&&Be(e.next)&&Be(e.error)&&Be(e.complete)}function pa(e){return e&&e instanceof Hn||da(e)&&Cn(e)}var ma=Bn(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),On=function(e){st(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new jr(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new ma},t.prototype.next=function(r){var n=this;vt(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=lr(n.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(r)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;vt(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;vt(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?An:(this.currentObservers=null,s.push(r),new Ot(function(){n.currentObservers=null,fr(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new Fr;return r.source=this,r},t.create=function(r,n){return new jr(r,n)},t}(Fr),jr=function(e){st(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:An},t}(On),Mn={now:function(){return(Mn.delegate||Date).now()},delegate:void 0},ba=function(e){st(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=Mn);var o=e.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return t.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,s=n._timestampProvider,l=n._windowTime;i||(o.push(r),!a&&o.push(s.now()+l)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!r.closed;l+=o?1:2)r.next(s[l]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,s=(a?1:2)*n;if(n<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,f=1;f<o.length&&o[f]<=l;f+=2)u=f;u&&o.splice(0,u+1)}},t}(On);const kr=[],$r={},ga=(e,t=0)=>{if(kr.indexOf(e)==-1){const r=new ba(t);$r[e]=r,kr.push(e)}return $r[e]};window.emWidgets={topic:ga};const ya=e=>!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));function va(e){kn(e,"svelte-lfsn3o",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}@keyframes growWidthPercent{from{height:0}to{height:100%}}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px;fill:black}.ShowBalance .BalanceValue span{padding-left:5px}.ShowBalance .BalanceValue .TriangleActive,.ShowBalance .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance .BalanceValue .TriangleActive:hover,.ShowBalance .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.ShowBalance .BalanceValue .TriangleActive svg,.ShowBalance .BalanceValue .TriangleInactive svg{margin:2px 0px}.ShowBalance .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open{opacity:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit;opacity:0}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose:hover{transform:scale(1.1)}.BalanceModalClose.Open{opacity:1}.BalanceModal{transition:all 0.2s ease-in;width:270px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary);font-size:14px}.BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open{opacity:1}')}function Vr(e,t,r){const n=e.slice();return n[54]=t[r],n}function Xr(e,t,r){const n=e.slice();return n[57]=t[r],n}function _a(e){let t,r,n=(e[1].Total?e[8](e[1].Total[0].amount):"0")+"",i,o,a,s,l,u,f,b,m,S,_=e[4]&&zr(e);return{c(){t=G("button"),r=G("p"),i=Se(n),o=Te(),a=G("span"),s=_r("svg"),l=_r("path"),f=Te(),_&&_.c(),b=Xn(),M(l,"id","arrow"),M(l,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),M(l,"transform","translate(-274.511 -441.088)"),M(l,"fill","#d1d1d1"),M(s,"xmlns","http://www.w3.org/2000/svg"),M(s,"width","14"),M(s,"height","6.835"),M(s,"viewBox","0 0 14 6.835"),M(a,"class",u=e[3]?"TriangleActive":"TriangleInactive"),M(t,"class","BalanceValue")},m(A,N){ye(A,t,N),R(t,r),R(r,i),R(t,o),R(t,a),R(a,s),R(s,l),ye(A,f,N),_&&_.m(A,N),ye(A,b,N),m||(S=_t(t,"click",e[26]),m=!0)},p(A,N){N[0]&2&&n!==(n=(A[1].Total?A[8](A[1].Total[0].amount):"0")+"")&&Pe(i,n),N[0]&8&&u!==(u=A[3]?"TriangleActive":"TriangleInactive")&&M(a,"class",u),A[4]?_?_.p(A,N):(_=zr(A),_.c(),_.m(b.parentNode,b)):_&&(_.d(1),_=null)},d(A){A&&(pe(t),pe(f),pe(b)),_&&_.d(A),m=!1,S()}}}function Ea(e){let t,r=e[6]("Loading")+"",n;return{c(){t=G("p"),n=Se(r),M(t,"class","Loading")},m(i,o){ye(i,t,o),R(t,n)},p(i,o){o[0]&64&&r!==(r=i[6]("Loading")+"")&&Pe(n,r)},d(i){i&&pe(t)}}}function zr(e){let t,r,n,i,o,a,s,l,u=e[6]("Title")+"",f,b,m,S,_,A,N=e[6]("DepositButton")+"",W,V,P,I,j,oe,Z=Et(Object.keys(e[1])),k=[];for(let D=0;D<Z.length;D+=1)k[D]=Zr(Vr(e,Z,D));return{c(){t=G("div"),r=G("button"),i=Te(),o=G("div"),a=G("div"),s=G("div"),l=G("p"),f=Se(u),b=Te(),m=G("div");for(let D=0;D<k.length;D+=1)k[D].c();S=Te(),_=G("div"),A=G("button"),W=Se(N),M(r,"class",n="BalanceModalClose "+(e[3]?"Open":"")),M(l,"class","BalanceModalTitle"),M(s,"class","BalanceModalHeader"),M(m,"class","BalanceModalBody"),M(A,"class","BalanceModalAction"),M(_,"class","BalanceModalFooter"),M(a,"class",V="ModalContent "+(e[3]?"Open":"")),M(o,"class",P="BalanceModal "+(e[3]?"Open":"")),M(t,"class",I="BalanceModalWrapper "+(e[3]?"Open":""))},m(D,q){ye(D,t,q),R(t,r),R(t,i),R(t,o),R(o,a),R(a,s),R(s,l),R(l,f),R(a,b),R(a,m);for(let U=0;U<k.length;U+=1)k[U]&&k[U].m(m,null);R(a,S),R(a,_),R(_,A),R(A,W),j||(oe=[_t(r,"click",e[27]),_t(A,"click",e[28])],j=!0)},p(D,q){if(q[0]&8&&n!==(n="BalanceModalClose "+(D[3]?"Open":""))&&M(r,"class",n),q[0]&64&&u!==(u=D[6]("Title")+"")&&Pe(f,u),q[0]&322){Z=Et(Object.keys(D[1]));let U;for(U=0;U<Z.length;U+=1){const K=Vr(D,Z,U);k[U]?k[U].p(K,q):(k[U]=Zr(K),k[U].c(),k[U].m(m,null))}for(;U<k.length;U+=1)k[U].d(1);k.length=Z.length}q[0]&64&&N!==(N=D[6]("DepositButton")+"")&&Pe(W,N),q[0]&8&&V!==(V="ModalContent "+(D[3]?"Open":""))&&M(a,"class",V),q[0]&8&&P!==(P="BalanceModal "+(D[3]?"Open":""))&&M(o,"class",P),q[0]&8&&I!==(I="BalanceModalWrapper "+(D[3]?"Open":""))&&M(t,"class",I)},d(D){D&&pe(t),Kr(k,D),j=!1,ze(oe)}}}function Wr(e){let t,r,n=e[6](e[54])+"",i,o,a=(e[57].productType?e[6](e[57].productType):"")+"",s,l,u,f,b=e[8](e[57].amount)+"",m;return{c(){t=G("div"),r=G("p"),i=Se(n),o=Te(),s=Se(a),l=Te(),u=G("p"),f=G("span"),m=Se(b),M(r,"class","BalanceModalText"),M(f,"class","BalanceModalAmount"),M(u,"class","BalanceModalValue"),M(t,"class","BalanceModalRowLine")},m(S,_){ye(S,t,_),R(t,r),R(r,i),R(r,o),R(r,s),R(t,l),R(t,u),R(u,f),R(f,m)},p(S,_){_[0]&66&&n!==(n=S[6](S[54])+"")&&Pe(i,n),_[0]&66&&a!==(a=(S[57].productType?S[6](S[57].productType):"")+"")&&Pe(s,a),_[0]&2&&b!==(b=S[8](S[57].amount)+"")&&Pe(m,b)},d(S){S&&pe(t)}}}function Zr(e){let t,r,n=Et(e[1][e[54]]),i=[];for(let o=0;o<n.length;o+=1)i[o]=Wr(Xr(e,n,o));return{c(){t=G("div");for(let o=0;o<i.length;o+=1)i[o].c();r=Te(),M(t,"class","BalanceModalRowBoth")},m(o,a){ye(o,t,a);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null);R(t,r)},p(o,a){if(a[0]&322){n=Et(o[1][o[54]]);let s;for(s=0;s<n.length;s+=1){const l=Xr(o,n,s);i[s]?i[s].p(l,a):(i[s]=Wr(l),i[s].c(),i[s].m(t,r))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},d(o){o&&pe(t),Kr(i,o)}}}function qr(e){let t,r,n;return{c(){t=G("button"),M(t,"class","ShowBalanceModalOverlay")},m(i,o){ye(i,t,o),r||(n=_t(t,"click",e[29]),r=!0)},p:he,d(i){i&&pe(t),r=!1,n()}}}function xa(e){let t,r,n,i;function o(u,f){return u[2]?Ea:_a}let a=o(e),s=a(e),l=e[4]&&qr(e);return{c(){t=G("div"),r=G("div"),s.c(),i=Te(),l&&l.c(),M(r,"class",n="ShowBalance "+(e[5]?"Mobile":""))},m(u,f){ye(u,t,f),R(t,r),s.m(r,null),R(t,i),l&&l.m(t,null),e[30](t)},p(u,f){a===(a=o(u))&&s?s.p(u,f):(s.d(1),s=a(u),s&&(s.c(),s.m(r,null))),f[0]&32&&n!==(n="ShowBalance "+(u[5]?"Mobile":""))&&M(r,"class",n),u[4]?l?l.p(u,f):(l=qr(u),l.c(),l.m(t,null)):l&&(l.d(1),l=null)},i:he,o:he,d(u){u&&pe(t),s.d(),l&&l.d(),e[30](null)}}}function wa(e,t,r){let n;jn(e,ta,c=>r(6,n=c));let{userid:i=""}=t,{session:o=""}=t,{endpoint:a=""}=t,{lang:s="en"}=t,{mbsource:l}=t,{clientstyling:u=""}=t,{clientstylingurl:f=""}=t,{translationurl:b=""}=t,{gmversion:m="gm16"}=t,{displaybalanceoption:S="All"}=t,{totalcalculationmode:_="totalCashAmount"}=t,{currencylocale:A="en"}=t,{currencydisplay:N="symbol"}=t,{maximumfractiondigits:W="2"}=t,{minimumfractiondigits:V="0"}=t,{customdisplayformat:P=""}=t,I,j=!0,oe=!1,Z=!1,k=!1,D=!1,q=window.navigator.userAgent,U,K="",fe=[],ve;const w={},_e=["totalCashAmount","totalRealAmount"],me=()=>{fetch(b).then(c=>c.json()).then(c=>Object.keys(c).forEach(d=>Nr(d,c[d]))).catch(c=>console.log(c))};Object.keys(Ir).forEach(c=>Nr(c,Ir[c]));const ae=c=>{switch(c){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),r(4,k=!0),setTimeout(()=>r(3,oe=!0),150);break;case"closebalance":r(3,oe=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{r(4,k=!1)},150);break}},Oe=c=>{if(P)return Ye(c);const d=A||s,p={style:"currency",currency:K,useGrouping:!0,currencyDisplay:N||"code",maximumFractionDigits:W===""||isNaN(Number(W))?2:Number(W),minimumFractionDigits:V===""||isNaN(Number(V))?0:Number(V)};return new Intl.NumberFormat(d,p).format(c)},Ye=c=>{const d=[];let p="";for(const x of P)switch(x){default:p+=x;break;case"{":p&&d.push(p),p="";break;case"}":const[T,C]=p.split("|");if(p="",T.toLowerCase()==="currency")p=K;else if(T.toLowerCase()==="amount"){let v=",",B=".",L=2;C&&(C[0]!==" "&&(v=C[0]),C[1]!==" "&&(B=C[1]),C[2]!==" "&&!isNaN(Number(C[2]))&&(L=Number(C[2])));let[ee,Ce]=String(Math.floor(c*Dt(10,L))/Dt(10,L)).split(".");p+=ee[0];for(let X=1;X<ee.length;++X)(ee.length-X)%3===0?p+=v+ee[X]:p+=ee[X];Ce&&(p+=B+Ce)}p&&d.push(p),p="";break}return d.push(p),d.join("")},be=()=>Gt(this,null,function*(){var d,p,x;r(2,j=!0);const c=new URL(`${a}/v1/player/${i}/account`);try{const T=yield fetch(c,{method:"GET",headers:{"X-SessionID":o}}),C=yield T.json();if(T.ok)window.postMessage({type:"BalancedFetched"},window.location.href),fe=C.items,K=(d=fe.find(v=>v.displayName==="Casino"))==null?void 0:d.currency,r(1,w.Total=[{amount:C.totalAmount[K]}],w),r(1,w.Real=[{amount:(p=fe.find(v=>v.displayName==="Casino"))==null?void 0:p.balanceAmount}],w),r(1,w.Bonus=[{amount:(x=fe.find(v=>v.displayName==="UBS"))==null?void 0:x.balanceAmount}],w);else throw new Error("Failed to fetch balance data !")}catch(T){console.log("Balance error: ",T)}finally{r(2,j=!1)}}),Qe=()=>{r(2,j=!0);const c=new URL(`${a}/v2/player/${i}/balance`),d=new Headers;d.append("X-SessionID",o),fetch(c,{method:"GET",headers:d}).then(x=>x.json()).then(x=>{x[_]||r(10,_=_e[0]);const T=x.items.find(v=>v.type==="Real"&&v.walletAccountType==="Ordinary");if(K=T.currency,Z=!!T.productType,r(1,w.Total=[{amount:0}],w),r(1,w.Real=[],w),r(1,w.Bonus=[],w),r(1,w.Credit=[],w),!Z){ve={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},r(1,w.Total[0].amount=x[_][K],w);for(const v of x.items)switch(v.type){case"Bonus":w.Bonus.length===0?w.Bonus.push({amount:v.amount}):r(1,w.Bonus[0].amount+=v.amount,w);break;case"Real":if(v.creditLine&&w.Credit.length===0&&w.Credit.push({amount:v.creditLine}),_==="totalRealAmount")continue;w.Real.length===0?w.Real.push({amount:v.amount}):r(1,w.Real[0].amount+=v.amount,w);break}for(const[v,B]of Object.entries(w))B.length<1&&delete w[v];r(2,j=!1);return}ve={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let C=x.items;S&&S!=="All"&&(C=x.items.filter(v=>v.productType===S));for(const v of C){let B;switch(v.type){case"Bonus":B=w.Bonus.findIndex(L=>L.productType===v.productType),B>0?r(1,w.Bonus[B].amount+=v.amount,w):w.Bonus.push({amount:v.amount,productType:v.productType});break;case"Real":v.creditLine&&w.Credit.push({amount:v.creditLine,productType:v.productType}),B=w.Real.findIndex(L=>L.productType===v.productType),B>0?r(1,w.Real[B].amount+=v.amount,w):w.Real.push({amount:v.amount,productType:v.productType});break}}lt();for(const[v,B]of Object.entries(w))B.length<1&&delete w[v];r(2,j=!1)}).catch(x=>{throw r(2,j=!1),console.log("Balance fetch error",x),new Error("Failed to fetch balance data!")})},Le=()=>{if(U&&U.close(),o.length<1)return;let c,d;switch(m){case"gm16":c=new URL(`${a}/v2/player/${i}/information/updates`),d=T=>Ke(T);break;case"gmcore":c=new URL(`${a}/v1/player/${i}/balance/updates`),d=T=>Mt(T);break}const p={accept:"text/event-stream","X-SessionId":o},x=new na.EventSourcePolyfill(c,{headers:p});U=x,x.addEventListener("message",d)},ut=c=>{let d;try{d=JSON.parse(c)}catch(p){console.log("Balance stream failed: ",p);return}return d},Mt=c=>{var T,C;const d=ut(c.data);if(!d){Le();return}let p="0";const x=d.balanceChange;fe=fe.map(v=>(x&&x[v.id]&&(v=Ft(Ut({},v),{balanceAmount:x[v.id].afterAmount})),p=(parseFloat(v==null?void 0:v.balanceAmount)+parseFloat(p)).toString(),v)),r(1,w.Real=[{amount:(T=fe[0])==null?void 0:T.balanceAmount}],w),r(1,w.Bonus=[{amount:(C=fe[1])==null?void 0:C.balanceAmount}],w),r(1,w.Total=[{amount:Number(p)}],w)},Je=(c,d,p)=>{let x=null;switch(p.walletAccountType){case"Ordinary":(p.afterAmount!==p.affectedAmount||d.lastOrdinaryAfterAmount===0)&&(d.lastOrdinaryAfterAmount=p.afterAmount,d.showCreditLineAfterAmount||(x=p.afterAmount));break;case"CreditLine":p.afterAmount!==0?(x=p.afterAmount,d.showCreditLineAfterAmount=!0):(x=d.lastOrdinaryAfterAmount,d.showCreditLineAfterAmount=!1);break;default:x=p.afterAmount}return x===null?c:x},lt=()=>{switch(_){case"totalCashAmount":let c=0;for(const p of["Real","Bonus"])for(const x of w[p])c+=Math.max(x.amount,0);r(1,w.Total[0].amount=c,w);break;case"totalRealAmount":if(!Z)return;let d=0;for(const p of w.Real)d+=p.amount;r(1,w.Total[0].amount=d,w)}},Ke=c=>{const d=ut(c.data);if(!d){Le();return}if(Ae(d==null?void 0:d.type)||d.type!=="BALANCE_UPDATE_V2")return;const p=d.body.balanceChange;for(const[x,T]of Object.entries(p))if(_==="totalRealAmount"&&x==="Real"&&!Z&&r(1,w.Total[0].amount=Je(w.Total[0].amount,ve,T),w),!!w[x])for(const C of w[x]){if(!Z){C.amount=x==="Real"?Je(C.amount,ve,T):T.afterAmount;continue}T.productType===C.productType&&(C.amount=x==="Real"?Je(C.amount,ve[C.productType],T):T.afterAmount)}lt()},Ne=()=>{ae("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Ae=c=>c==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,se=()=>{_e.includes(_)||(console.error(`Unsupported value ('${_}') for totalcalculationmode parameter. Only the following values are supported ${_e}. Using default value ('${_e[0]}').`),r(10,_=_e[0]))},Pt=()=>{switch(ra(s),se(),m){case"gmcore":be();break;case"gm16":Qe();break;default:throw Error(`Invalid apiversion attribute: ${m}`)}},ct=c=>{const{data:{type:d}={}}=c||{};switch(d){case"LogoutSuccessfull":U.close();break;case"CloseBalance":ae("closebalance");break}},Rt=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};qn(()=>(window.addEventListener("message",ct,!1),r(5,D=ya(q)),()=>{window.removeEventListener("message",ct),U&&U.close()}));const ht=()=>ae("balance"),h=()=>ae("closebalance"),y=()=>Ne(),E=()=>ae("closebalance");function g(c){qt[c?"unshift":"push"](()=>{I=c,r(0,I)})}return e.$$set=c=>{"userid"in c&&r(11,i=c.userid),"session"in c&&r(12,o=c.session),"endpoint"in c&&r(13,a=c.endpoint),"lang"in c&&r(14,s=c.lang),"mbsource"in c&&r(15,l=c.mbsource),"clientstyling"in c&&r(16,u=c.clientstyling),"clientstylingurl"in c&&r(17,f=c.clientstylingurl),"translationurl"in c&&r(18,b=c.translationurl),"gmversion"in c&&r(19,m=c.gmversion),"displaybalanceoption"in c&&r(20,S=c.displaybalanceoption),"totalcalculationmode"in c&&r(10,_=c.totalcalculationmode),"currencylocale"in c&&r(21,A=c.currencylocale),"currencydisplay"in c&&r(22,N=c.currencydisplay),"maximumfractiondigits"in c&&r(23,W=c.maximumfractiondigits),"minimumfractiondigits"in c&&r(24,V=c.minimumfractiondigits),"customdisplayformat"in c&&r(25,P=c.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&1603584&&a&&i&&o&&s&&m&&S&&Pt(),e.$$.dirty[0]&538624&&a&&i&&o&&m&&Le(),e.$$.dirty[0]&262144&&b&&me(),e.$$.dirty[0]&2&&w.Total&&Rt(),e.$$.dirty[0]&65537&&u&&I&&li(I,u),e.$$.dirty[0]&131073&&f&&I&&ci(I,f),e.$$.dirty[0]&32769&&l&&I&&hi(I,`${l}.Style`)},[I,w,j,oe,k,D,n,ae,Oe,Ne,_,i,o,a,s,l,u,f,b,m,S,A,N,W,V,P,ht,h,y,E,g]}class Pn extends si{constructor(t){super(),oi(this,t,wa,xa,Qr,{userid:11,session:12,endpoint:13,lang:14,mbsource:15,clientstyling:16,clientstylingurl:17,translationurl:18,gmversion:19,displaybalanceoption:20,totalcalculationmode:10,currencylocale:21,currencydisplay:22,maximumfractiondigits:23,minimumfractiondigits:24,customdisplayformat:25},va,[-1,-1])}get userid(){return this.$$.ctx[11]}set userid(t){this.$$set({userid:t}),Q()}get session(){return this.$$.ctx[12]}set session(t){this.$$set({session:t}),Q()}get endpoint(){return this.$$.ctx[13]}set endpoint(t){this.$$set({endpoint:t}),Q()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),Q()}get mbsource(){return this.$$.ctx[15]}set mbsource(t){this.$$set({mbsource:t}),Q()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(t){this.$$set({clientstyling:t}),Q()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Q()}get translationurl(){return this.$$.ctx[18]}set translationurl(t){this.$$set({translationurl:t}),Q()}get gmversion(){return this.$$.ctx[19]}set gmversion(t){this.$$set({gmversion:t}),Q()}get displaybalanceoption(){return this.$$.ctx[20]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),Q()}get totalcalculationmode(){return this.$$.ctx[10]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),Q()}get currencylocale(){return this.$$.ctx[21]}set currencylocale(t){this.$$set({currencylocale:t}),Q()}get currencydisplay(){return this.$$.ctx[22]}set currencydisplay(t){this.$$set({currencydisplay:t}),Q()}get maximumfractiondigits(){return this.$$.ctx[23]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),Q()}get minimumfractiondigits(){return this.$$.ctx[24]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),Q()}get customdisplayformat(){return this.$$.ctx[25]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),Q()}}ai(Pn,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Pn;
|
|
@@ -4279,7 +4279,7 @@ var sr = { exports: {} };
|
|
|
4279
4279
|
K.call(this, h), this.error = y.error;
|
|
4280
4280
|
}
|
|
4281
4281
|
w.prototype = Object.create(K.prototype);
|
|
4282
|
-
var _e = -1, me = 0,
|
|
4282
|
+
var _e = -1, me = 0, ae = 1, Oe = 2, Ye = -1, be = 0, Qe = 1, Le = 2, ut = 3, Rt = /^text\/event\-stream(;.*)?$/i, Je = 1e3, lt = 18e6, Ke = function(h, y) {
|
|
4283
4283
|
var E = h == null ? y : parseInt(h, 10);
|
|
4284
4284
|
return E !== E && (E = y), Ne(E);
|
|
4285
4285
|
}, Ne = function(h) {
|
|
@@ -4291,7 +4291,7 @@ var sr = { exports: {} };
|
|
|
4291
4291
|
U(g);
|
|
4292
4292
|
}
|
|
4293
4293
|
};
|
|
4294
|
-
function
|
|
4294
|
+
function se(h, y) {
|
|
4295
4295
|
q.call(this), y = y || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, Pt(this, h, y);
|
|
4296
4296
|
}
|
|
4297
4297
|
function Mt() {
|
|
@@ -4300,39 +4300,39 @@ var sr = { exports: {} };
|
|
|
4300
4300
|
var ct = b != null && m != null && "body" in m.prototype;
|
|
4301
4301
|
function Pt(h, y, E) {
|
|
4302
4302
|
y = String(y);
|
|
4303
|
-
var g = !!E.withCredentials, c = E.lastEventIdQueryParameterName || "lastEventId", d = Ne(1e3), p = Ke(E.heartbeatTimeout, 45e3), x = "", T = d, C = !1, v = 0, B = E.headers || {}, L = E.Transport, ee = ct && L == null ? void 0 : new I(L != null ? new L() : Mt()), Ce = L != null && typeof L != "string" ? new L() : ee == null ? new D() : new Z(), X = void 0, te = 0, de = _e, Ie = "", ft = "", Ee = "", dt = "", re = be, Lt = 0, Re = 0, Mn = function(Y, z,
|
|
4303
|
+
var g = !!E.withCredentials, c = E.lastEventIdQueryParameterName || "lastEventId", d = Ne(1e3), p = Ke(E.heartbeatTimeout, 45e3), x = "", T = d, C = !1, v = 0, B = E.headers || {}, L = E.Transport, ee = ct && L == null ? void 0 : new I(L != null ? new L() : Mt()), Ce = L != null && typeof L != "string" ? new L() : ee == null ? new D() : new Z(), X = void 0, te = 0, de = _e, Ie = "", ft = "", Ee = "", dt = "", re = be, Lt = 0, Re = 0, Mn = function(Y, z, ue, le) {
|
|
4304
4304
|
if (de === me)
|
|
4305
|
-
if (Y === 200 &&
|
|
4306
|
-
de =
|
|
4305
|
+
if (Y === 200 && ue != null && Rt.test(ue)) {
|
|
4306
|
+
de = ae, C = Date.now(), T = d, h.readyState = ae;
|
|
4307
4307
|
var ne = new ve("open", {
|
|
4308
4308
|
status: Y,
|
|
4309
4309
|
statusText: z,
|
|
4310
|
-
headers:
|
|
4310
|
+
headers: le
|
|
4311
4311
|
});
|
|
4312
4312
|
h.dispatchEvent(ne), Ae(h, h.onopen, ne);
|
|
4313
4313
|
} else {
|
|
4314
4314
|
var J = "";
|
|
4315
|
-
Y !== 200 ? (z && (z = z.replace(/\s+/g, " ")), J = "EventSource's response has a status " + Y + " " + z + " that is not 200. Aborting the connection.") : J = "EventSource's response has a Content-Type specifying an unsupported type: " + (
|
|
4315
|
+
Y !== 200 ? (z && (z = z.replace(/\s+/g, " ")), J = "EventSource's response has a status " + Y + " " + z + " that is not 200. Aborting the connection.") : J = "EventSource's response has a Content-Type specifying an unsupported type: " + (ue == null ? "-" : ue.replace(/\s+/g, " ")) + ". Aborting the connection.", Nt();
|
|
4316
4316
|
var ne = new ve("error", {
|
|
4317
4317
|
status: Y,
|
|
4318
4318
|
statusText: z,
|
|
4319
|
-
headers:
|
|
4319
|
+
headers: le
|
|
4320
4320
|
});
|
|
4321
4321
|
h.dispatchEvent(ne), Ae(h, h.onerror, ne), console.error(J);
|
|
4322
4322
|
}
|
|
4323
4323
|
}, Pn = function(Y) {
|
|
4324
|
-
if (de ===
|
|
4325
|
-
for (var z = -1,
|
|
4326
|
-
var
|
|
4327
|
-
(
|
|
4324
|
+
if (de === ae) {
|
|
4325
|
+
for (var z = -1, ue = 0; ue < Y.length; ue += 1) {
|
|
4326
|
+
var le = Y.charCodeAt(ue);
|
|
4327
|
+
(le === 10 || le === 13) && (z = ue);
|
|
4328
4328
|
}
|
|
4329
4329
|
var ne = (z !== -1 ? dt : "") + Y.slice(0, z + 1);
|
|
4330
4330
|
dt = (z === -1 ? dt : "") + Y.slice(z + 1), Y !== "" && (C = Date.now(), v += Y.length);
|
|
4331
4331
|
for (var J = 0; J < ne.length; J += 1) {
|
|
4332
|
-
var
|
|
4333
|
-
if (re === Ye &&
|
|
4332
|
+
var le = ne.charCodeAt(J);
|
|
4333
|
+
if (re === Ye && le === 10)
|
|
4334
4334
|
re = be;
|
|
4335
|
-
else if (re === Ye && (re = be),
|
|
4335
|
+
else if (re === Ye && (re = be), le === 13 || le === 10) {
|
|
4336
4336
|
if (re !== be) {
|
|
4337
4337
|
re === Qe && (Re = J + 1);
|
|
4338
4338
|
var xe = ne.slice(Lt, Re - 1), we = ne.slice(Re + (Re < J && ne.charCodeAt(Re) === 32 ? 1 : 0), J);
|
|
@@ -4353,13 +4353,13 @@ var sr = { exports: {} };
|
|
|
4353
4353
|
}
|
|
4354
4354
|
Ie = "", Ee = "";
|
|
4355
4355
|
}
|
|
4356
|
-
re =
|
|
4356
|
+
re = le === 13 ? Ye : be;
|
|
4357
4357
|
} else
|
|
4358
|
-
re === be && (Lt = J, re = Qe), re === Qe ?
|
|
4358
|
+
re === be && (Lt = J, re = Qe), re === Qe ? le === 58 && (Re = J + 1, re = Le) : re === Le && (re = ut);
|
|
4359
4359
|
}
|
|
4360
4360
|
}
|
|
4361
4361
|
}, gr = function(Y) {
|
|
4362
|
-
if (de ===
|
|
4362
|
+
if (de === ae || de === me) {
|
|
4363
4363
|
de = _e, te !== 0 && (i(te), te = 0), te = n(function() {
|
|
4364
4364
|
et();
|
|
4365
4365
|
}, T), T = Ne(Math.min(d * 16, T * 2)), h.readyState = me;
|
|
@@ -4385,36 +4385,36 @@ var sr = { exports: {} };
|
|
|
4385
4385
|
}, p), de = me, Ie = "", Ee = "", ft = x, dt = "", Lt = 0, Re = 0, re = be;
|
|
4386
4386
|
var z = y;
|
|
4387
4387
|
if (y.slice(0, 5) !== "data:" && y.slice(0, 5) !== "blob:" && x !== "") {
|
|
4388
|
-
var
|
|
4389
|
-
z =
|
|
4388
|
+
var ue = y.indexOf("?");
|
|
4389
|
+
z = ue === -1 ? y : y.slice(0, ue + 1) + y.slice(ue + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(we, De) {
|
|
4390
4390
|
return De === c ? "" : we;
|
|
4391
4391
|
}), z += (y.indexOf("?") === -1 ? "?" : "&") + c + "=" + encodeURIComponent(x);
|
|
4392
4392
|
}
|
|
4393
|
-
var
|
|
4393
|
+
var le = h.withCredentials, ne = {};
|
|
4394
4394
|
ne.Accept = "text/event-stream";
|
|
4395
4395
|
var J = h.headers;
|
|
4396
4396
|
if (J != null)
|
|
4397
4397
|
for (var xe in J)
|
|
4398
4398
|
Object.prototype.hasOwnProperty.call(J, xe) && (ne[xe] = J[xe]);
|
|
4399
4399
|
try {
|
|
4400
|
-
X = Ce.open(ee, Mn, Pn, gr, z,
|
|
4400
|
+
X = Ce.open(ee, Mn, Pn, gr, z, le, ne);
|
|
4401
4401
|
} catch (we) {
|
|
4402
4402
|
throw Nt(), we;
|
|
4403
4403
|
}
|
|
4404
4404
|
};
|
|
4405
4405
|
h.url = y, h.readyState = me, h.withCredentials = g, h.headers = B, h._close = Nt, et();
|
|
4406
4406
|
}
|
|
4407
|
-
|
|
4407
|
+
se.prototype = Object.create(q.prototype), se.prototype.CONNECTING = me, se.prototype.OPEN = ae, se.prototype.CLOSED = Oe, se.prototype.close = function() {
|
|
4408
4408
|
this._close();
|
|
4409
|
-
},
|
|
4409
|
+
}, se.CONNECTING = me, se.OPEN = ae, se.CLOSED = Oe, se.prototype.withCredentials = void 0;
|
|
4410
4410
|
var ht = l;
|
|
4411
|
-
o != null && (l == null || !("withCredentials" in l.prototype)) && (ht =
|
|
4411
|
+
o != null && (l == null || !("withCredentials" in l.prototype)) && (ht = se), function(h) {
|
|
4412
4412
|
{
|
|
4413
4413
|
var y = h(t);
|
|
4414
4414
|
y !== void 0 && (e.exports = y);
|
|
4415
4415
|
}
|
|
4416
4416
|
}(function(h) {
|
|
4417
|
-
h.EventSourcePolyfill =
|
|
4417
|
+
h.EventSourcePolyfill = se, h.NativeEventSource = l, h.EventSource = ht;
|
|
4418
4418
|
});
|
|
4419
4419
|
})(typeof globalThis == "undefined" ? typeof window != "undefined" ? window : typeof self != "undefined" ? self : fi : globalThis);
|
|
4420
4420
|
})(sr, sr.exports);
|
|
@@ -5263,7 +5263,7 @@ function xa(e, t, r) {
|
|
|
5263
5263
|
fetch(b).then((c) => c.json()).then((c) => Object.keys(c).forEach((d) => Nr(d, c[d]))).catch((c) => console.log(c));
|
|
5264
5264
|
};
|
|
5265
5265
|
Object.keys(Ir).forEach((c) => Nr(c, Ir[c]));
|
|
5266
|
-
const
|
|
5266
|
+
const ae = (c) => {
|
|
5267
5267
|
switch (c) {
|
|
5268
5268
|
case "balance":
|
|
5269
5269
|
window.postMessage(
|
|
@@ -5517,11 +5517,11 @@ function xa(e, t, r) {
|
|
|
5517
5517
|
}
|
|
5518
5518
|
lt();
|
|
5519
5519
|
}, Ne = () => {
|
|
5520
|
-
|
|
5521
|
-
}, Ae = (c) => c === "SESSION_EXPIRATION" ? (window.postMessage({ type: "SessionExpiration" }, window.location.href), !0) : !1,
|
|
5520
|
+
ae("closebalance"), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
|
|
5521
|
+
}, Ae = (c) => c === "SESSION_EXPIRATION" ? (window.postMessage({ type: "SessionExpiration" }, window.location.href), !0) : !1, se = () => {
|
|
5522
5522
|
_e.includes(_) || (console.error(`Unsupported value ('${_}') for totalcalculationmode parameter. Only the following values are supported ${_e}. Using default value ('${_e[0]}').`), r(10, _ = _e[0]));
|
|
5523
5523
|
}, Mt = () => {
|
|
5524
|
-
switch (ta(s),
|
|
5524
|
+
switch (ta(s), se(), m) {
|
|
5525
5525
|
case "gmcore":
|
|
5526
5526
|
be();
|
|
5527
5527
|
break;
|
|
@@ -5531,13 +5531,23 @@ function xa(e, t, r) {
|
|
|
5531
5531
|
default:
|
|
5532
5532
|
throw Error(`Invalid apiversion attribute: ${m}`);
|
|
5533
5533
|
}
|
|
5534
|
-
}, ct = (c) =>
|
|
5534
|
+
}, ct = (c) => {
|
|
5535
|
+
const { data: { type: d } = {} } = c || {};
|
|
5536
|
+
switch (d) {
|
|
5537
|
+
case "LogoutSuccessfull":
|
|
5538
|
+
U.close();
|
|
5539
|
+
break;
|
|
5540
|
+
case "CloseBalance":
|
|
5541
|
+
ae("closebalance");
|
|
5542
|
+
break;
|
|
5543
|
+
}
|
|
5544
|
+
}, Pt = () => {
|
|
5535
5545
|
window.postMessage({ type: "UpdateBalanceBackground" }, window.location.href);
|
|
5536
5546
|
};
|
|
5537
5547
|
Zn(() => (window.addEventListener("message", ct, !1), r(5, D = ga(q)), () => {
|
|
5538
5548
|
window.removeEventListener("message", ct), U && U.close();
|
|
5539
5549
|
}));
|
|
5540
|
-
const ht = () =>
|
|
5550
|
+
const ht = () => ae("balance"), h = () => ae("closebalance"), y = () => Ne(), E = () => ae("closebalance");
|
|
5541
5551
|
function g(c) {
|
|
5542
5552
|
qt[c ? "unshift" : "push"](() => {
|
|
5543
5553
|
I = c, r(0, I);
|
|
@@ -5562,7 +5572,7 @@ function xa(e, t, r) {
|
|
|
5562
5572
|
k,
|
|
5563
5573
|
D,
|
|
5564
5574
|
n,
|
|
5565
|
-
|
|
5575
|
+
ae,
|
|
5566
5576
|
Oe,
|
|
5567
5577
|
Ne,
|
|
5568
5578
|
_,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModalNd-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModalNd-COzm7A94.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal-nd")&&customElements.define("player-account-balance-modal-nd",t.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModalNd-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModalNd-DiZWRnsX.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("player-account-balance-modal-nd") && customElements.define("player-account-balance-modal-nd", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
package/package.json
CHANGED