@everymatrix/player-account-balance-modal-nd 1.72.2 → 1.73.1
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-DF4DE4rJ.cjs → PlayerAccountBalanceModalNd-CQHYwFRa.cjs} +1 -1
- package/components/{PlayerAccountBalanceModalNd-CxIVoMZ2.js → PlayerAccountBalanceModalNd-CnGVklY6.js} +12 -18
- package/components/{PlayerAccountBalanceModalNd-BV7nZN5C.js → PlayerAccountBalanceModalNd-DDJ9KVRC.js} +12 -18
- 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
|
@@ -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 Ae(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),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(T){t={error:T}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var f=this.initialTeardown;if(Ae(f))try{f()}catch(T){o=T instanceof Zt?T.errors:[T]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var m=lr(b),w=m.next();!w.done;w=m.next()){var _=w.value;try{Dr(_)}catch(T){o=o!=null?o:[],T instanceof Zt?o=hr(hr([],cr(o)),cr(T.errors)):o.push(T)}}}catch(T){n={error:T}}finally{try{w&&!w.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&&Ae(e.remove)&&Ae(e.add)&&Ae(e.unsubscribe)}function Dr(e){Ae(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 Ae(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,c=a.source;o.add(s?s.call(o,c):c?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(c){o(c),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&&Ae(e.next)&&Ae(e.error)&&Ae(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 c=s.value;c.next(r)}}catch(l){i={error:l}}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),Pn={now:function(){return(Pn.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=Pn);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,c=n._windowTime;i||(o.push(r),!a&&o.push(s.now()+c)),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(),c=0;c<s.length&&!r.closed;c+=o?1:2)r.next(s[c]);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 c=i.now(),l=0,f=1;f<o.length&&o[f]<=c;f+=2)l=f;l&&o.splice(0,l+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[53]=t[r],n}function Xr(e,t,r){const n=e.slice();return n[56]=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,c,l,f,b,m,w,_=e[4]&&zr(e);return{c(){t=G("button"),r=G("p"),i=Te(n),o=Be(),a=G("span"),s=_r("svg"),c=_r("path"),f=Be(),_&&_.c(),b=Xn(),P(c,"id","arrow"),P(c,"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"),P(c,"transform","translate(-274.511 -441.088)"),P(c,"fill","#d1d1d1"),P(s,"xmlns","http://www.w3.org/2000/svg"),P(s,"width","14"),P(s,"height","6.835"),P(s,"viewBox","0 0 14 6.835"),P(a,"class",l=e[3]?"TriangleActive":"TriangleInactive"),P(t,"class","BalanceValue")},m(T,M){ve(T,t,M),L(t,r),L(r,i),L(t,o),L(t,a),L(a,s),L(s,c),ve(T,f,M),_&&_.m(T,M),ve(T,b,M),m||(w=_t(t,"click",e[26]),m=!0)},p(T,M){M[0]&2&&n!==(n=(T[1].Total?T[8](T[1].Total[0].amount):"0")+"")&&Re(i,n),M[0]&8&&l!==(l=T[3]?"TriangleActive":"TriangleInactive")&&P(a,"class",l),T[4]?_?_.p(T,M):(_=zr(T),_.c(),_.m(b.parentNode,b)):_&&(_.d(1),_=null)},d(T){T&&(me(t),me(f),me(b)),_&&_.d(T),m=!1,w()}}}function Ea(e){let t,r=e[6]("Loading")+"",n;return{c(){t=G("p"),n=Te(r),P(t,"class","Loading")},m(i,o){ve(i,t,o),L(t,n)},p(i,o){o[0]&64&&r!==(r=i[6]("Loading")+"")&&Re(n,r)},d(i){i&&me(t)}}}function zr(e){let t,r,n,i,o,a,s,c,l=e[6]("Title")+"",f,b,m,w,_,T,M=e[6]("DepositButton")+"",z,V,R,I,j,ne,W=Et(Object.keys(e[1])),k=[];for(let D=0;D<W.length;D+=1)k[D]=Zr(Vr(e,W,D));return{c(){t=G("div"),r=G("button"),i=Be(),o=G("div"),a=G("div"),s=G("div"),c=G("p"),f=Te(l),b=Be(),m=G("div");for(let D=0;D<k.length;D+=1)k[D].c();w=Be(),_=G("div"),T=G("button"),z=Te(M),P(r,"class",n="BalanceModalClose "+(e[3]?"Open":"")),P(c,"class","BalanceModalTitle"),P(s,"class","BalanceModalHeader"),P(m,"class","BalanceModalBody"),P(T,"class","BalanceModalAction"),P(_,"class","BalanceModalFooter"),P(a,"class",V="ModalContent "+(e[3]?"Open":"")),P(o,"class",R="BalanceModal "+(e[3]?"Open":"")),P(t,"class",I="BalanceModalWrapper "+(e[3]?"Open":""))},m(D,Z){ve(D,t,Z),L(t,r),L(t,i),L(t,o),L(o,a),L(a,s),L(s,c),L(c,f),L(a,b),L(a,m);for(let U=0;U<k.length;U+=1)k[U]&&k[U].m(m,null);L(a,w),L(a,_),L(_,T),L(T,z),j||(ne=[_t(r,"click",e[27]),_t(T,"click",e[28])],j=!0)},p(D,Z){if(Z[0]&8&&n!==(n="BalanceModalClose "+(D[3]?"Open":""))&&P(r,"class",n),Z[0]&64&&l!==(l=D[6]("Title")+"")&&Re(f,l),Z[0]&322){W=Et(Object.keys(D[1]));let U;for(U=0;U<W.length;U+=1){const J=Vr(D,W,U);k[U]?k[U].p(J,Z):(k[U]=Zr(J),k[U].c(),k[U].m(m,null))}for(;U<k.length;U+=1)k[U].d(1);k.length=W.length}Z[0]&64&&M!==(M=D[6]("DepositButton")+"")&&Re(z,M),Z[0]&8&&V!==(V="ModalContent "+(D[3]?"Open":""))&&P(a,"class",V),Z[0]&8&&R!==(R="BalanceModal "+(D[3]?"Open":""))&&P(o,"class",R),Z[0]&8&&I!==(I="BalanceModalWrapper "+(D[3]?"Open":""))&&P(t,"class",I)},d(D){D&&me(t),Kr(k,D),j=!1,ze(ne)}}}function Wr(e){let t,r,n=e[6](e[53])+"",i,o,a=(e[56].productType?e[6](e[56].productType):"")+"",s,c,l,f,b=(e[56].amount?e[8](e[56].amount):"0")+"",m;return{c(){t=G("div"),r=G("p"),i=Te(n),o=Be(),s=Te(a),c=Be(),l=G("p"),f=G("span"),m=Te(b),P(r,"class","BalanceModalText"),P(f,"class","BalanceModalAmount"),P(l,"class","BalanceModalValue"),P(t,"class","BalanceModalRowLine")},m(w,_){ve(w,t,_),L(t,r),L(r,i),L(r,o),L(r,s),L(t,c),L(t,l),L(l,f),L(f,m)},p(w,_){_[0]&66&&n!==(n=w[6](w[53])+"")&&Re(i,n),_[0]&66&&a!==(a=(w[56].productType?w[6](w[56].productType):"")+"")&&Re(s,a),_[0]&2&&b!==(b=(w[56].amount?w[8](w[56].amount):"0")+"")&&Re(m,b)},d(w){w&&me(t)}}}function Zr(e){let t,r,n=Et(e[1][e[53]]),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=Be(),P(t,"class","BalanceModalRowBoth")},m(o,a){ve(o,t,a);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null);L(t,r)},p(o,a){if(a[0]&322){n=Et(o[1][o[53]]);let s;for(s=0;s<n.length;s+=1){const c=Xr(o,n,s);i[s]?i[s].p(c,a):(i[s]=Wr(c),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&&me(t),Kr(i,o)}}}function qr(e){let t,r,n;return{c(){t=G("button"),P(t,"class","ShowBalanceModalOverlay")},m(i,o){ve(i,t,o),r||(n=_t(t,"click",e[29]),r=!0)},p:he,d(i){i&&me(t),r=!1,n()}}}function xa(e){let t,r,n,i;function o(l,f){return l[2]?Ea:_a}let a=o(e),s=a(e),c=e[4]&&qr(e);return{c(){t=G("div"),r=G("div"),s.c(),i=Be(),c&&c.c(),P(r,"class",n="ShowBalance "+(e[5]?"Mobile":""))},m(l,f){ve(l,t,f),L(t,r),s.m(r,null),L(t,i),c&&c.m(t,null),e[30](t)},p(l,f){a===(a=o(l))&&s?s.p(l,f):(s.d(1),s=a(l),s&&(s.c(),s.m(r,null))),f[0]&32&&n!==(n="ShowBalance "+(l[5]?"Mobile":""))&&P(r,"class",n),l[4]?c?c.p(l,f):(c=qr(l),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i:he,o:he,d(l){l&&me(t),s.d(),c&&c.d(),e[30](null)}}}function wa(e,t,r){let n;jn(e,ta,u=>r(6,n=u));let{userid:i=""}=t,{session:o=""}=t,{endpoint:a=""}=t,{lang:s="en"}=t,{mbsource:c}=t,{clientstyling:l=""}=t,{clientstylingurl:f=""}=t,{translationurl:b=""}=t,{gmversion:m="gm16"}=t,{displaybalanceoption:w="All"}=t,{totalcalculationmode:_="totalCashAmount"}=t,{currencylocale:T="en"}=t,{currencydisplay:M="symbol"}=t,{maximumfractiondigits:z="2"}=t,{minimumfractiondigits:V="0"}=t,{customdisplayformat:R=""}=t,I,j=!0,ne=!1,W=!1,k=!1,D=!1,Z=window.navigator.userAgent,U,J="",fe=[],_e;const x={},Ee=["totalCashAmount","totalRealAmount"],be=()=>{fetch(b).then(u=>u.json()).then(u=>Object.keys(u).forEach(p=>Nr(p,u[p]))).catch(u=>console.log(u))};Object.keys(Ir).forEach(u=>Nr(u,Ir[u]));const ue=u=>{switch(u){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),r(4,k=!0),setTimeout(()=>r(3,ne=!0),150);break;case"closebalance":r(3,ne=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{r(4,k=!1)},150);break}},Oe=u=>{if(R)return Ye(u);const p=T||s,d={style:"currency",currency:J,useGrouping:!0,currencyDisplay:M||"code",maximumFractionDigits:z===""||isNaN(Number(z))?2:Number(z),minimumFractionDigits:V===""||isNaN(Number(V))?0:Number(V)};return new Intl.NumberFormat(p,d).format(u)},Ye=u=>{const p=[];let d="";for(const y of R)switch(y){default:d+=y;break;case"{":d&&p.push(d),d="";break;case"}":const[A,S]=d.split("|");if(d="",A.toLowerCase()==="currency")d=J;else if(A.toLowerCase()==="amount"){let g=",",C=".",B=2;S&&(S[0]!==" "&&(g=S[0]),S[1]!==" "&&(C=S[1]),S[2]!==" "&&!isNaN(Number(S[2]))&&(B=Number(S[2])));let[N,le]=String(Math.floor(u*Dt(10,B))/Dt(10,B)).split(".");d+=N[0];for(let de=1;de<N.length;++de)(N.length-de)%3===0?d+=g+N[de]:d+=N[de];le&&(d+=C+le)}d&&p.push(d),d="";break}return p.push(d),p.join("")},ge=()=>Gt(this,null,function*(){var p,d,y;r(2,j=!0);const u=new URL(`${a}/v1/player/${i}/account`);try{const A=yield fetch(u,{method:"GET",headers:{"X-SessionID":o}}),S=yield A.json();if(A.ok)window.postMessage({type:"BalancedFetched"},window.location.href),fe=S.items,J=(p=fe.find(g=>g.displayName==="Casino"))==null?void 0:p.currency,r(1,x.Total=[{amount:S.totalAmount[J]}],x),r(1,x.Real=[{amount:(d=fe.find(g=>g.displayName==="Casino"))==null?void 0:d.balanceAmount}],x),r(1,x.Bonus=[{amount:(y=fe.find(g=>g.displayName==="UBS"))==null?void 0:y.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(A){console.log("Balance error: ",A)}finally{r(2,j=!1)}}),Qe=()=>{r(2,j=!0);const u=new URL(`${a}/v2/player/${i}/balance`),p=new Headers;p.append("X-SessionID",o),fetch(u,{method:"GET",headers:p}).then(y=>y.json()).then(y=>{y[_]||r(10,_=Ee[0]);const A=y.items.find(g=>g.type==="Real"&&g.walletAccountType==="Ordinary");if(J=A.currency,W=!!A.productType,r(1,x.Total=[{amount:0}],x),r(1,x.Real=[],x),r(1,x.Bonus=[],x),r(1,x.Credit=[],x),!W){_e={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},r(1,x.Total[0].amount=y[_][J],x);for(const g of y.items)switch(g.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:g.amount}):r(1,x.Bonus[0].amount+=g.amount,x);break;case"Real":if(g.creditLine&&x.Credit.length===0&&x.Credit.push({amount:g.creditLine}),_==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:g.amount}):r(1,x.Real[0].amount+=g.amount,x);break}for(const[g,C]of Object.entries(x))C.length<1&&delete x[g];r(2,j=!1);return}_e={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let S=y.items;w&&w!=="All"&&(S=y.items.filter(g=>g.productType===w));for(const g of S){let C;switch(g.type){case"Bonus":C=x.Bonus.findIndex(B=>B.productType===g.productType),C>0?r(1,x.Bonus[C].amount+=g.amount,x):x.Bonus.push({amount:g.amount,productType:g.productType});break;case"Real":g.creditLine&&x.Credit.push({amount:g.creditLine,productType:g.productType}),C=x.Real.findIndex(B=>B.productType===g.productType),C>0?r(1,x.Real[C].amount+=g.amount,x):x.Real.push({amount:g.amount,productType:g.productType});break}}lt();for(const[g,C]of Object.entries(x))C.length<1&&delete x[g];r(2,j=!1)}).catch(y=>{throw r(2,j=!1),console.log("Balance fetch error",y),new Error("Failed to fetch balance data!")})},Me=()=>{if(U&&U.close(),o.length<1)return;let u,p;switch(m){case"gm16":u=new URL(`${a}/v2/player/${i}/information/updates`),p=A=>Ke(A);break;case"gmcore":u=new URL(`${a}/v1/player/${i}/balance/updates`),p=A=>Pt(A);break}const d={accept:"text/event-stream","X-SessionId":o},y=new na.EventSourcePolyfill(u,{headers:d});U=y,y.addEventListener("message",p)},ut=u=>{let p;try{p=JSON.parse(u)}catch(d){console.log("Balance stream failed: ",d);return}return p},Pt=u=>{var A,S;const p=ut(u.data);if(!p){Me();return}let d="0";const y=p.balanceChange;fe=fe.map(g=>(y&&y[g.id]&&(g=Ft(Ut({},g),{balanceAmount:y[g.id].afterAmount})),d=(parseFloat(g==null?void 0:g.balanceAmount)+parseFloat(d)).toString(),g)),r(1,x.Real=[{amount:(A=fe[0])==null?void 0:A.balanceAmount}],x),r(1,x.Bonus=[{amount:(S=fe[1])==null?void 0:S.balanceAmount}],x),r(1,x.Total=[{amount:Number(d)}],x)},Je=(u,p,d)=>{let y=null;switch(d.walletAccountType){case"Ordinary":(d.afterAmount!==d.affectedAmount||p.lastOrdinaryAfterAmount===0)&&(p.lastOrdinaryAfterAmount=d.afterAmount,p.showCreditLineAfterAmount||(y=d.afterAmount));break;case"CreditLine":d.afterAmount!==0?(y=d.afterAmount,p.showCreditLineAfterAmount=!0):(y=p.lastOrdinaryAfterAmount,p.showCreditLineAfterAmount=!1);break;default:y=d.afterAmount}return y===null?u:y},lt=()=>{switch(_){case"totalCashAmount":let u=0;for(const d of["Real","Bonus"])for(const y of x[d])u+=Math.max(y.amount,0);r(1,x.Total[0].amount=u,x);break;case"totalRealAmount":if(!W)return;let p=0;for(const d of x.Real)p+=d.amount;r(1,x.Total[0].amount=p,x)}},Ke=u=>{const p=ut(u.data);if(!p){Me();return}if(p.type!=="BALANCE_UPDATE_V2")return;const d=p.body.balanceChange;for(const[y,A]of Object.entries(d))if(_==="totalRealAmount"&&y==="Real"&&!W&&r(1,x.Total[0].amount=Je(x.Total[0].amount,_e,A),x),!!x[y])for(const S of x[y]){if(!W){S.amount=y==="Real"?Je(S.amount,_e,A):A.afterAmount;continue}A.productType===S.productType&&(S.amount=y==="Real"?Je(S.amount,_e[S.productType],A):A.afterAmount)}lt()},Ne=()=>{ue("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Ce=()=>{Ee.includes(_)||(console.error(`Unsupported value ('${_}') for totalcalculationmode parameter. Only the following values are supported ${Ee}. Using default value ('${Ee[0]}').`),r(10,_=Ee[0]))},ie=()=>{switch(ra(s),Ce(),m){case"gmcore":ge();break;case"gm16":Qe();break;default:throw Error(`Invalid apiversion attribute: ${m}`)}},ct=u=>u.data&&u.data.type==="LogoutSuccessfull"&&U.close(),Rt=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};qn(()=>(window.addEventListener("message",ct,!1),r(5,D=ya(Z)),()=>{window.removeEventListener("message",ct),U&&U.close()}));const Lt=()=>ue("balance"),ht=()=>ue("closebalance"),h=()=>Ne(),v=()=>ue("closeBalance");function E(u){qt[u?"unshift":"push"](()=>{I=u,r(0,I)})}return e.$$set=u=>{"userid"in u&&r(11,i=u.userid),"session"in u&&r(12,o=u.session),"endpoint"in u&&r(13,a=u.endpoint),"lang"in u&&r(14,s=u.lang),"mbsource"in u&&r(15,c=u.mbsource),"clientstyling"in u&&r(16,l=u.clientstyling),"clientstylingurl"in u&&r(17,f=u.clientstylingurl),"translationurl"in u&&r(18,b=u.translationurl),"gmversion"in u&&r(19,m=u.gmversion),"displaybalanceoption"in u&&r(20,w=u.displaybalanceoption),"totalcalculationmode"in u&&r(10,_=u.totalcalculationmode),"currencylocale"in u&&r(21,T=u.currencylocale),"currencydisplay"in u&&r(22,M=u.currencydisplay),"maximumfractiondigits"in u&&r(23,z=u.maximumfractiondigits),"minimumfractiondigits"in u&&r(24,V=u.minimumfractiondigits),"customdisplayformat"in u&&r(25,R=u.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&1603584&&a&&i&&o&&s&&m&&w&&ie(),e.$$.dirty[0]&538624&&a&&i&&o&&m&&Me(),e.$$.dirty[0]&262144&&b&&be(),e.$$.dirty[0]&2&&x.Total&&Rt(),e.$$.dirty[0]&65537&&l&&I&&li(I,l),e.$$.dirty[0]&131073&&f&&I&&ci(I,f),e.$$.dirty[0]&32769&&c&&I&&hi(I,`${c}.Style`)},[I,x,j,ne,k,D,n,ue,Oe,Ne,_,i,o,a,s,c,l,f,b,m,w,T,M,z,V,R,Lt,ht,h,v,E]}class Rn 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}),Y()}get session(){return this.$$.ctx[12]}set session(t){this.$$set({session:t}),Y()}get endpoint(){return this.$$.ctx[13]}set endpoint(t){this.$$set({endpoint:t}),Y()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),Y()}get mbsource(){return this.$$.ctx[15]}set mbsource(t){this.$$set({mbsource:t}),Y()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(t){this.$$set({clientstyling:t}),Y()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Y()}get translationurl(){return this.$$.ctx[18]}set translationurl(t){this.$$set({translationurl:t}),Y()}get gmversion(){return this.$$.ctx[19]}set gmversion(t){this.$$set({gmversion:t}),Y()}get displaybalanceoption(){return this.$$.ctx[20]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),Y()}get totalcalculationmode(){return this.$$.ctx[10]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),Y()}get currencylocale(){return this.$$.ctx[21]}set currencylocale(t){this.$$set({currencylocale:t}),Y()}get currencydisplay(){return this.$$.ctx[22]}set currencydisplay(t){this.$$set({currencydisplay:t}),Y()}get maximumfractiondigits(){return this.$$.ctx[23]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),Y()}get minimumfractiondigits(){return this.$$.ctx[24]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),Y()}get customdisplayformat(){return this.$$.ctx[25]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),Y()}}ai(Rn,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Rn;
|
|
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),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(T){t={error:T}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var f=this.initialTeardown;if(Ae(f))try{f()}catch(T){o=T instanceof Zt?T.errors:[T]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var m=lr(b),w=m.next();!w.done;w=m.next()){var _=w.value;try{Dr(_)}catch(T){o=o!=null?o:[],T instanceof Zt?o=hr(hr([],cr(o)),cr(T.errors)):o.push(T)}}}catch(T){n={error:T}}finally{try{w&&!w.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&&Ae(e.remove)&&Ae(e.add)&&Ae(e.unsubscribe)}function Dr(e){Ae(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 Ae(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,c=a.source;o.add(s?s.call(o,c):c?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(c){o(c),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&&Ae(e.next)&&Ae(e.error)&&Ae(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 c=s.value;c.next(r)}}catch(l){i={error:l}}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),Pn={now:function(){return(Pn.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=Pn);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,c=n._windowTime;i||(o.push(r),!a&&o.push(s.now()+c)),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(),c=0;c<s.length&&!r.closed;c+=o?1:2)r.next(s[c]);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 c=i.now(),l=0,f=1;f<o.length&&o[f]<=c;f+=2)l=f;l&&o.splice(0,l+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[53]=t[r],n}function Xr(e,t,r){const n=e.slice();return n[56]=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,c,l,f,b,m,w,_=e[4]&&zr(e);return{c(){t=G("button"),r=G("p"),i=Te(n),o=Be(),a=G("span"),s=_r("svg"),c=_r("path"),f=Be(),_&&_.c(),b=Xn(),P(c,"id","arrow"),P(c,"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"),P(c,"transform","translate(-274.511 -441.088)"),P(c,"fill","#d1d1d1"),P(s,"xmlns","http://www.w3.org/2000/svg"),P(s,"width","14"),P(s,"height","6.835"),P(s,"viewBox","0 0 14 6.835"),P(a,"class",l=e[3]?"TriangleActive":"TriangleInactive"),P(t,"class","BalanceValue")},m(T,M){ve(T,t,M),L(t,r),L(r,i),L(t,o),L(t,a),L(a,s),L(s,c),ve(T,f,M),_&&_.m(T,M),ve(T,b,M),m||(w=_t(t,"click",e[26]),m=!0)},p(T,M){M[0]&2&&n!==(n=(T[1].Total?T[8](T[1].Total[0].amount):"0")+"")&&Re(i,n),M[0]&8&&l!==(l=T[3]?"TriangleActive":"TriangleInactive")&&P(a,"class",l),T[4]?_?_.p(T,M):(_=zr(T),_.c(),_.m(b.parentNode,b)):_&&(_.d(1),_=null)},d(T){T&&(me(t),me(f),me(b)),_&&_.d(T),m=!1,w()}}}function Ea(e){let t,r=e[6]("Loading")+"",n;return{c(){t=G("p"),n=Te(r),P(t,"class","Loading")},m(i,o){ve(i,t,o),L(t,n)},p(i,o){o[0]&64&&r!==(r=i[6]("Loading")+"")&&Re(n,r)},d(i){i&&me(t)}}}function zr(e){let t,r,n,i,o,a,s,c,l=e[6]("Title")+"",f,b,m,w,_,T,M=e[6]("DepositButton")+"",z,V,R,I,j,ne,W=Et(Object.keys(e[1])),k=[];for(let D=0;D<W.length;D+=1)k[D]=Zr(Vr(e,W,D));return{c(){t=G("div"),r=G("button"),i=Be(),o=G("div"),a=G("div"),s=G("div"),c=G("p"),f=Te(l),b=Be(),m=G("div");for(let D=0;D<k.length;D+=1)k[D].c();w=Be(),_=G("div"),T=G("button"),z=Te(M),P(r,"class",n="BalanceModalClose "+(e[3]?"Open":"")),P(c,"class","BalanceModalTitle"),P(s,"class","BalanceModalHeader"),P(m,"class","BalanceModalBody"),P(T,"class","BalanceModalAction"),P(_,"class","BalanceModalFooter"),P(a,"class",V="ModalContent "+(e[3]?"Open":"")),P(o,"class",R="BalanceModal "+(e[3]?"Open":"")),P(t,"class",I="BalanceModalWrapper "+(e[3]?"Open":""))},m(D,Z){ve(D,t,Z),L(t,r),L(t,i),L(t,o),L(o,a),L(a,s),L(s,c),L(c,f),L(a,b),L(a,m);for(let U=0;U<k.length;U+=1)k[U]&&k[U].m(m,null);L(a,w),L(a,_),L(_,T),L(T,z),j||(ne=[_t(r,"click",e[27]),_t(T,"click",e[28])],j=!0)},p(D,Z){if(Z[0]&8&&n!==(n="BalanceModalClose "+(D[3]?"Open":""))&&P(r,"class",n),Z[0]&64&&l!==(l=D[6]("Title")+"")&&Re(f,l),Z[0]&322){W=Et(Object.keys(D[1]));let U;for(U=0;U<W.length;U+=1){const J=Vr(D,W,U);k[U]?k[U].p(J,Z):(k[U]=Zr(J),k[U].c(),k[U].m(m,null))}for(;U<k.length;U+=1)k[U].d(1);k.length=W.length}Z[0]&64&&M!==(M=D[6]("DepositButton")+"")&&Re(z,M),Z[0]&8&&V!==(V="ModalContent "+(D[3]?"Open":""))&&P(a,"class",V),Z[0]&8&&R!==(R="BalanceModal "+(D[3]?"Open":""))&&P(o,"class",R),Z[0]&8&&I!==(I="BalanceModalWrapper "+(D[3]?"Open":""))&&P(t,"class",I)},d(D){D&&me(t),Kr(k,D),j=!1,ze(ne)}}}function Wr(e){let t,r,n=e[6](e[53])+"",i,o,a=(e[56].productType?e[6](e[56].productType):"")+"",s,c,l,f,b=e[8](e[56].amount)+"",m;return{c(){t=G("div"),r=G("p"),i=Te(n),o=Be(),s=Te(a),c=Be(),l=G("p"),f=G("span"),m=Te(b),P(r,"class","BalanceModalText"),P(f,"class","BalanceModalAmount"),P(l,"class","BalanceModalValue"),P(t,"class","BalanceModalRowLine")},m(w,_){ve(w,t,_),L(t,r),L(r,i),L(r,o),L(r,s),L(t,c),L(t,l),L(l,f),L(f,m)},p(w,_){_[0]&66&&n!==(n=w[6](w[53])+"")&&Re(i,n),_[0]&66&&a!==(a=(w[56].productType?w[6](w[56].productType):"")+"")&&Re(s,a),_[0]&2&&b!==(b=w[8](w[56].amount)+"")&&Re(m,b)},d(w){w&&me(t)}}}function Zr(e){let t,r,n=Et(e[1][e[53]]),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=Be(),P(t,"class","BalanceModalRowBoth")},m(o,a){ve(o,t,a);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null);L(t,r)},p(o,a){if(a[0]&322){n=Et(o[1][o[53]]);let s;for(s=0;s<n.length;s+=1){const c=Xr(o,n,s);i[s]?i[s].p(c,a):(i[s]=Wr(c),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&&me(t),Kr(i,o)}}}function qr(e){let t,r,n;return{c(){t=G("button"),P(t,"class","ShowBalanceModalOverlay")},m(i,o){ve(i,t,o),r||(n=_t(t,"click",e[29]),r=!0)},p:he,d(i){i&&me(t),r=!1,n()}}}function xa(e){let t,r,n,i;function o(l,f){return l[2]?Ea:_a}let a=o(e),s=a(e),c=e[4]&&qr(e);return{c(){t=G("div"),r=G("div"),s.c(),i=Be(),c&&c.c(),P(r,"class",n="ShowBalance "+(e[5]?"Mobile":""))},m(l,f){ve(l,t,f),L(t,r),s.m(r,null),L(t,i),c&&c.m(t,null),e[30](t)},p(l,f){a===(a=o(l))&&s?s.p(l,f):(s.d(1),s=a(l),s&&(s.c(),s.m(r,null))),f[0]&32&&n!==(n="ShowBalance "+(l[5]?"Mobile":""))&&P(r,"class",n),l[4]?c?c.p(l,f):(c=qr(l),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i:he,o:he,d(l){l&&me(t),s.d(),c&&c.d(),e[30](null)}}}function wa(e,t,r){let n;jn(e,ta,u=>r(6,n=u));let{userid:i=""}=t,{session:o=""}=t,{endpoint:a=""}=t,{lang:s="en"}=t,{mbsource:c}=t,{clientstyling:l=""}=t,{clientstylingurl:f=""}=t,{translationurl:b=""}=t,{gmversion:m="gm16"}=t,{displaybalanceoption:w="All"}=t,{totalcalculationmode:_="totalCashAmount"}=t,{currencylocale:T="en"}=t,{currencydisplay:M="symbol"}=t,{maximumfractiondigits:z="2"}=t,{minimumfractiondigits:V="0"}=t,{customdisplayformat:R=""}=t,I,j=!0,ne=!1,W=!1,k=!1,D=!1,Z=window.navigator.userAgent,U,J="",fe=[],_e;const x={},Ee=["totalCashAmount","totalRealAmount"],be=()=>{fetch(b).then(u=>u.json()).then(u=>Object.keys(u).forEach(p=>Nr(p,u[p]))).catch(u=>console.log(u))};Object.keys(Ir).forEach(u=>Nr(u,Ir[u]));const ue=u=>{switch(u){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),r(4,k=!0),setTimeout(()=>r(3,ne=!0),150);break;case"closebalance":r(3,ne=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{r(4,k=!1)},150);break}},Oe=u=>{if(R)return Ye(u);const p=T||s,d={style:"currency",currency:J,useGrouping:!0,currencyDisplay:M||"code",maximumFractionDigits:z===""||isNaN(Number(z))?2:Number(z),minimumFractionDigits:V===""||isNaN(Number(V))?0:Number(V)};return new Intl.NumberFormat(p,d).format(u)},Ye=u=>{const p=[];let d="";for(const y of R)switch(y){default:d+=y;break;case"{":d&&p.push(d),d="";break;case"}":const[A,S]=d.split("|");if(d="",A.toLowerCase()==="currency")d=J;else if(A.toLowerCase()==="amount"){let g=",",C=".",B=2;S&&(S[0]!==" "&&(g=S[0]),S[1]!==" "&&(C=S[1]),S[2]!==" "&&!isNaN(Number(S[2]))&&(B=Number(S[2])));let[N,le]=String(Math.floor(u*Dt(10,B))/Dt(10,B)).split(".");d+=N[0];for(let de=1;de<N.length;++de)(N.length-de)%3===0?d+=g+N[de]:d+=N[de];le&&(d+=C+le)}d&&p.push(d),d="";break}return p.push(d),p.join("")},ge=()=>Gt(this,null,function*(){var p,d,y;r(2,j=!0);const u=new URL(`${a}/v1/player/${i}/account`);try{const A=yield fetch(u,{method:"GET",headers:{"X-SessionID":o}}),S=yield A.json();if(A.ok)window.postMessage({type:"BalancedFetched"},window.location.href),fe=S.items,J=(p=fe.find(g=>g.displayName==="Casino"))==null?void 0:p.currency,r(1,x.Total=[{amount:S.totalAmount[J]}],x),r(1,x.Real=[{amount:(d=fe.find(g=>g.displayName==="Casino"))==null?void 0:d.balanceAmount}],x),r(1,x.Bonus=[{amount:(y=fe.find(g=>g.displayName==="UBS"))==null?void 0:y.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(A){console.log("Balance error: ",A)}finally{r(2,j=!1)}}),Qe=()=>{r(2,j=!0);const u=new URL(`${a}/v2/player/${i}/balance`),p=new Headers;p.append("X-SessionID",o),fetch(u,{method:"GET",headers:p}).then(y=>y.json()).then(y=>{y[_]||r(10,_=Ee[0]);const A=y.items.find(g=>g.type==="Real"&&g.walletAccountType==="Ordinary");if(J=A.currency,W=!!A.productType,r(1,x.Total=[{amount:0}],x),r(1,x.Real=[],x),r(1,x.Bonus=[],x),r(1,x.Credit=[],x),!W){_e={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},r(1,x.Total[0].amount=y[_][J],x);for(const g of y.items)switch(g.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:g.amount}):r(1,x.Bonus[0].amount+=g.amount,x);break;case"Real":if(g.creditLine&&x.Credit.length===0&&x.Credit.push({amount:g.creditLine}),_==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:g.amount}):r(1,x.Real[0].amount+=g.amount,x);break}for(const[g,C]of Object.entries(x))C.length<1&&delete x[g];r(2,j=!1);return}_e={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let S=y.items;w&&w!=="All"&&(S=y.items.filter(g=>g.productType===w));for(const g of S){let C;switch(g.type){case"Bonus":C=x.Bonus.findIndex(B=>B.productType===g.productType),C>0?r(1,x.Bonus[C].amount+=g.amount,x):x.Bonus.push({amount:g.amount,productType:g.productType});break;case"Real":g.creditLine&&x.Credit.push({amount:g.creditLine,productType:g.productType}),C=x.Real.findIndex(B=>B.productType===g.productType),C>0?r(1,x.Real[C].amount+=g.amount,x):x.Real.push({amount:g.amount,productType:g.productType});break}}lt();for(const[g,C]of Object.entries(x))C.length<1&&delete x[g];r(2,j=!1)}).catch(y=>{throw r(2,j=!1),console.log("Balance fetch error",y),new Error("Failed to fetch balance data!")})},Me=()=>{if(U&&U.close(),o.length<1)return;let u,p;switch(m){case"gm16":u=new URL(`${a}/v2/player/${i}/information/updates`),p=A=>Ke(A);break;case"gmcore":u=new URL(`${a}/v1/player/${i}/balance/updates`),p=A=>Pt(A);break}const d={accept:"text/event-stream","X-SessionId":o},y=new na.EventSourcePolyfill(u,{headers:d});U=y,y.addEventListener("message",p)},ut=u=>{let p;try{p=JSON.parse(u)}catch(d){console.log("Balance stream failed: ",d);return}return p},Pt=u=>{var A,S;const p=ut(u.data);if(!p){Me();return}let d="0";const y=p.balanceChange;fe=fe.map(g=>(y&&y[g.id]&&(g=Ft(Ut({},g),{balanceAmount:y[g.id].afterAmount})),d=(parseFloat(g==null?void 0:g.balanceAmount)+parseFloat(d)).toString(),g)),r(1,x.Real=[{amount:(A=fe[0])==null?void 0:A.balanceAmount}],x),r(1,x.Bonus=[{amount:(S=fe[1])==null?void 0:S.balanceAmount}],x),r(1,x.Total=[{amount:Number(d)}],x)},Je=(u,p,d)=>{let y=null;switch(d.walletAccountType){case"Ordinary":(d.afterAmount!==d.affectedAmount||p.lastOrdinaryAfterAmount===0)&&(p.lastOrdinaryAfterAmount=d.afterAmount,p.showCreditLineAfterAmount||(y=d.afterAmount));break;case"CreditLine":d.afterAmount!==0?(y=d.afterAmount,p.showCreditLineAfterAmount=!0):(y=p.lastOrdinaryAfterAmount,p.showCreditLineAfterAmount=!1);break;default:y=d.afterAmount}return y===null?u:y},lt=()=>{switch(_){case"totalCashAmount":let u=0;for(const d of["Real","Bonus"])for(const y of x[d])u+=Math.max(y.amount,0);r(1,x.Total[0].amount=u,x);break;case"totalRealAmount":if(!W)return;let p=0;for(const d of x.Real)p+=d.amount;r(1,x.Total[0].amount=p,x)}},Ke=u=>{const p=ut(u.data);if(!p){Me();return}if(p.type!=="BALANCE_UPDATE_V2")return;const d=p.body.balanceChange;for(const[y,A]of Object.entries(d))if(_==="totalRealAmount"&&y==="Real"&&!W&&r(1,x.Total[0].amount=Je(x.Total[0].amount,_e,A),x),!!x[y])for(const S of x[y]){if(!W){S.amount=y==="Real"?Je(S.amount,_e,A):A.afterAmount;continue}A.productType===S.productType&&(S.amount=y==="Real"?Je(S.amount,_e[S.productType],A):A.afterAmount)}lt()},Ne=()=>{ue("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Ce=()=>{Ee.includes(_)||(console.error(`Unsupported value ('${_}') for totalcalculationmode parameter. Only the following values are supported ${Ee}. Using default value ('${Ee[0]}').`),r(10,_=Ee[0]))},ie=()=>{switch(ra(s),Ce(),m){case"gmcore":ge();break;case"gm16":Qe();break;default:throw Error(`Invalid apiversion attribute: ${m}`)}},ct=u=>u.data&&u.data.type==="LogoutSuccessfull"&&U.close(),Rt=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};qn(()=>(window.addEventListener("message",ct,!1),r(5,D=ya(Z)),()=>{window.removeEventListener("message",ct),U&&U.close()}));const Lt=()=>ue("balance"),ht=()=>ue("closebalance"),h=()=>Ne(),v=()=>ue("closebalance");function E(u){qt[u?"unshift":"push"](()=>{I=u,r(0,I)})}return e.$$set=u=>{"userid"in u&&r(11,i=u.userid),"session"in u&&r(12,o=u.session),"endpoint"in u&&r(13,a=u.endpoint),"lang"in u&&r(14,s=u.lang),"mbsource"in u&&r(15,c=u.mbsource),"clientstyling"in u&&r(16,l=u.clientstyling),"clientstylingurl"in u&&r(17,f=u.clientstylingurl),"translationurl"in u&&r(18,b=u.translationurl),"gmversion"in u&&r(19,m=u.gmversion),"displaybalanceoption"in u&&r(20,w=u.displaybalanceoption),"totalcalculationmode"in u&&r(10,_=u.totalcalculationmode),"currencylocale"in u&&r(21,T=u.currencylocale),"currencydisplay"in u&&r(22,M=u.currencydisplay),"maximumfractiondigits"in u&&r(23,z=u.maximumfractiondigits),"minimumfractiondigits"in u&&r(24,V=u.minimumfractiondigits),"customdisplayformat"in u&&r(25,R=u.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&1603584&&a&&i&&o&&s&&m&&w&&ie(),e.$$.dirty[0]&538624&&a&&i&&o&&m&&Me(),e.$$.dirty[0]&262144&&b&&be(),e.$$.dirty[0]&2&&x.Total&&Rt(),e.$$.dirty[0]&65537&&l&&I&&li(I,l),e.$$.dirty[0]&131073&&f&&I&&ci(I,f),e.$$.dirty[0]&32769&&c&&I&&hi(I,`${c}.Style`)},[I,x,j,ne,k,D,n,ue,Oe,Ne,_,i,o,a,s,c,l,f,b,m,w,T,M,z,V,R,Lt,ht,h,v,E]}class Rn 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}),Y()}get session(){return this.$$.ctx[12]}set session(t){this.$$set({session:t}),Y()}get endpoint(){return this.$$.ctx[13]}set endpoint(t){this.$$set({endpoint:t}),Y()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),Y()}get mbsource(){return this.$$.ctx[15]}set mbsource(t){this.$$set({mbsource:t}),Y()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(t){this.$$set({clientstyling:t}),Y()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Y()}get translationurl(){return this.$$.ctx[18]}set translationurl(t){this.$$set({translationurl:t}),Y()}get gmversion(){return this.$$.ctx[19]}set gmversion(t){this.$$set({gmversion:t}),Y()}get displaybalanceoption(){return this.$$.ctx[20]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),Y()}get totalcalculationmode(){return this.$$.ctx[10]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),Y()}get currencylocale(){return this.$$.ctx[21]}set currencylocale(t){this.$$set({currencylocale:t}),Y()}get currencydisplay(){return this.$$.ctx[22]}set currencydisplay(t){this.$$set({currencydisplay:t}),Y()}get maximumfractiondigits(){return this.$$.ctx[23]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),Y()}get minimumfractiondigits(){return this.$$.ctx[24]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),Y()}get customdisplayformat(){return this.$$.ctx[25]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),Y()}}ai(Rn,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Rn;
|
|
@@ -5115,14 +5115,11 @@ function Wr(e) {
|
|
|
5115
5115
|
)
|
|
5116
5116
|
) : "") + ""
|
|
5117
5117
|
), s, c, l, f, b = (
|
|
5118
|
-
/*
|
|
5119
|
-
|
|
5120
|
-
/*
|
|
5121
|
-
e[
|
|
5122
|
-
|
|
5123
|
-
e[56].amount
|
|
5124
|
-
)
|
|
5125
|
-
) : "0") + ""
|
|
5118
|
+
/*formatBalance*/
|
|
5119
|
+
e[8](
|
|
5120
|
+
/*b*/
|
|
5121
|
+
e[56].amount
|
|
5122
|
+
) + ""
|
|
5126
5123
|
), m;
|
|
5127
5124
|
return {
|
|
5128
5125
|
c() {
|
|
@@ -5146,14 +5143,11 @@ function Wr(e) {
|
|
|
5146
5143
|
w[56].productType
|
|
5147
5144
|
)
|
|
5148
5145
|
) : "") + "") && Le(s, a), _[0] & /*balances*/
|
|
5149
|
-
2 && b !== (b = /*
|
|
5150
|
-
|
|
5151
|
-
/*
|
|
5152
|
-
w[
|
|
5153
|
-
|
|
5154
|
-
w[56].amount
|
|
5155
|
-
)
|
|
5156
|
-
) : "0") + "") && Le(m, b);
|
|
5146
|
+
2 && b !== (b = /*formatBalance*/
|
|
5147
|
+
w[8](
|
|
5148
|
+
/*b*/
|
|
5149
|
+
w[56].amount
|
|
5150
|
+
) + "") && Le(m, b);
|
|
5157
5151
|
},
|
|
5158
5152
|
d(w) {
|
|
5159
5153
|
w && me(t);
|
|
@@ -5184,7 +5178,7 @@ function Zr(e) {
|
|
|
5184
5178
|
P(t, r);
|
|
5185
5179
|
},
|
|
5186
5180
|
p(o, a) {
|
|
5187
|
-
if (a[0] & /*
|
|
5181
|
+
if (a[0] & /*formatBalance, balances, $_*/
|
|
5188
5182
|
322) {
|
|
5189
5183
|
n = Et(
|
|
5190
5184
|
/*balances*/
|
|
@@ -5543,7 +5537,7 @@ function xa(e, t, r) {
|
|
|
5543
5537
|
Zn(() => (window.addEventListener("message", ct, !1), r(5, D = ga(Z)), () => {
|
|
5544
5538
|
window.removeEventListener("message", ct), U && U.close();
|
|
5545
5539
|
}));
|
|
5546
|
-
const Pt = () => ue("balance"), ht = () => ue("closebalance"), h = () => Ne(), v = () => ue("
|
|
5540
|
+
const Pt = () => ue("balance"), ht = () => ue("closebalance"), h = () => Ne(), v = () => ue("closebalance");
|
|
5547
5541
|
function E(u) {
|
|
5548
5542
|
qt[u ? "unshift" : "push"](() => {
|
|
5549
5543
|
I = u, r(0, I);
|
|
@@ -5078,14 +5078,11 @@ function Gr(e) {
|
|
|
5078
5078
|
)
|
|
5079
5079
|
) : "") + ""
|
|
5080
5080
|
), a, c, l, f, g = (
|
|
5081
|
-
/*
|
|
5082
|
-
|
|
5083
|
-
/*
|
|
5084
|
-
e[
|
|
5085
|
-
|
|
5086
|
-
e[56].amount
|
|
5087
|
-
)
|
|
5088
|
-
) : "0") + ""
|
|
5081
|
+
/*formatBalance*/
|
|
5082
|
+
e[8](
|
|
5083
|
+
/*b*/
|
|
5084
|
+
e[56].amount
|
|
5085
|
+
) + ""
|
|
5089
5086
|
), m;
|
|
5090
5087
|
return {
|
|
5091
5088
|
c() {
|
|
@@ -5109,14 +5106,11 @@ function Gr(e) {
|
|
|
5109
5106
|
w[56].productType
|
|
5110
5107
|
)
|
|
5111
5108
|
) : "") + "") && Pe(a, s), v[0] & /*balances*/
|
|
5112
|
-
2 && g !== (g = /*
|
|
5113
|
-
|
|
5114
|
-
/*
|
|
5115
|
-
w[
|
|
5116
|
-
|
|
5117
|
-
w[56].amount
|
|
5118
|
-
)
|
|
5119
|
-
) : "0") + "") && Pe(m, g);
|
|
5109
|
+
2 && g !== (g = /*formatBalance*/
|
|
5110
|
+
w[8](
|
|
5111
|
+
/*b*/
|
|
5112
|
+
w[56].amount
|
|
5113
|
+
) + "") && Pe(m, g);
|
|
5120
5114
|
},
|
|
5121
5115
|
d(w) {
|
|
5122
5116
|
w && pe(t);
|
|
@@ -5147,7 +5141,7 @@ function jr(e) {
|
|
|
5147
5141
|
L(t, r);
|
|
5148
5142
|
},
|
|
5149
5143
|
p(o, s) {
|
|
5150
|
-
if (s[0] & /*
|
|
5144
|
+
if (s[0] & /*formatBalance, balances, $_*/
|
|
5151
5145
|
322) {
|
|
5152
5146
|
n = _t(
|
|
5153
5147
|
/*balances*/
|
|
@@ -5505,7 +5499,7 @@ function ca(e, t, r) {
|
|
|
5505
5499
|
In(() => (window.addEventListener("message", lt, !1), r(5, D = oa(Z)), () => {
|
|
5506
5500
|
window.removeEventListener("message", lt), U && U.close();
|
|
5507
5501
|
}));
|
|
5508
|
-
const Rt = () => ue("balance"), ct = () => ue("closebalance"), h = () => Me(), y = () => ue("
|
|
5502
|
+
const Rt = () => ue("balance"), ct = () => ue("closebalance"), h = () => Me(), y = () => ue("closebalance");
|
|
5509
5503
|
function _(u) {
|
|
5510
5504
|
$t[u ? "unshift" : "push"](() => {
|
|
5511
5505
|
I = u, r(0, I);
|
|
@@ -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-CQHYwFRa.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-CnGVklY6.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
|
}
|