@everymatrix/casino-header-controller-nd 1.62.0 → 1.62.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.
Files changed (62) hide show
  1. package/components/{CasinoHamburgerMenuNd--v-LS_32.js → CasinoHamburgerMenuNd-BImplJDa.js} +1120 -1100
  2. package/components/{CasinoHamburgerMenuNd-CynOfgCi.js → CasinoHamburgerMenuNd-DyhHC83Z.js} +1118 -1098
  3. package/components/{CasinoHamburgerMenuNd-DWRsBVV8.cjs → CasinoHamburgerMenuNd-l5qToGBM.cjs} +4 -4
  4. package/components/{CasinoHeaderControllerNd-DWovu05C.js → CasinoHeaderControllerNd-C7xz5nJ9.js} +220 -221
  5. package/components/{CasinoHeaderControllerNd-BSXw10r3.js → CasinoHeaderControllerNd-DcSieKLS.js} +202 -203
  6. package/components/CasinoHeaderControllerNd-R7R3O_T8.cjs +1 -0
  7. package/components/PlayerAccountBalanceModalNd-C80czGIn.cjs +13 -0
  8. package/components/PlayerAccountBalanceModalNd-CnYDSo0G.js +1585 -0
  9. package/components/PlayerAccountBalanceModalNd-DWI__Jly.js +1556 -0
  10. package/components/{PlayerDeposit-BTUc7VwV.js → PlayerDeposit-B4tHIWB-.js} +77 -77
  11. package/components/PlayerDeposit-CvpjmPUK.cjs +1 -0
  12. package/components/{PlayerDeposit-CIkwXyuE.js → PlayerDeposit-DwSBl6nO.js} +77 -77
  13. package/es2015/casino-header-controller-nd.cjs +1 -1
  14. package/es2015/casino-header-controller-nd.js +1 -1
  15. package/esnext/casino-header-controller-nd.js +1 -1
  16. package/package.json +1 -1
  17. package/stencil/app-globals-0f993ce5-D-kw1sls.js +5 -0
  18. package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
  19. package/stencil/{gamification-dropdown-CThmjz5c.js → gamification-dropdown-7bHznlgt.js} +2 -2
  20. package/stencil/{gamification-dropdown-8eb8a896-u5btxGNb.js → gamification-dropdown-8eb8a896-B5TUPoPs.js} +1 -1
  21. package/stencil/{gamification-dropdown-8eb8a896-cKQI7KOv.cjs → gamification-dropdown-8eb8a896-B8CcqKs3.cjs} +1 -1
  22. package/stencil/{gamification-dropdown-8eb8a896-txnj_mSw.js → gamification-dropdown-8eb8a896-CNDebAQo.js} +1 -1
  23. package/stencil/{gamification-dropdown-CjOxbJA2.cjs → gamification-dropdown-Bg0tW7ha.cjs} +1 -1
  24. package/stencil/{gamification-dropdown-AXnIBZGr.js → gamification-dropdown-DXlyb6GA.js} +2 -2
  25. package/stencil/gamification-dropdown_4-Blt8-SSN.cjs +192 -0
  26. package/stencil/{gamification-dropdown_4-DtHO1RaT.js → gamification-dropdown_4-BskNa0nU.js} +4 -4
  27. package/stencil/{gamification-dropdown_4-C3TSeQG8.js → gamification-dropdown_4-C304wJye.js} +4 -4
  28. package/stencil/{index-71b1bdfa-28u_D-DT.js → index-71b1bdfa-BNR9dJmZ.js} +264 -268
  29. package/stencil/index-71b1bdfa-BcIWqICi.js +753 -0
  30. package/stencil/index-71b1bdfa-DJwBo2rv.cjs +1 -0
  31. package/stencil/{player-elevate-card-DtTuAooa.js → player-elevate-card-D_EV-YVW.js} +2 -2
  32. package/stencil/{player-elevate-card-NVJ1tyn-.cjs → player-elevate-card-Da18eACv.cjs} +1 -1
  33. package/stencil/{player-elevate-card-B002wYul.js → player-elevate-card-WtXwQ6BK.js} +2 -2
  34. package/stencil/{player-elevate-card-items-66be34fb-DIaZKUPZ.js → player-elevate-card-items-66be34fb-Bl4Mdtm2.js} +11 -13
  35. package/stencil/{player-elevate-card-items-66be34fb-C3fGBNsZ.js → player-elevate-card-items-66be34fb-C8y5xd3m.js} +11 -13
  36. package/stencil/player-elevate-card-items-66be34fb-DARKYMdQ.cjs +1 -0
  37. package/stencil/{player-elevate-pointcard-Ci6rphS3.cjs → player-elevate-pointcard-Akuofz_v.cjs} +1 -1
  38. package/stencil/{player-elevate-pointcard-DpnCGgi8.js → player-elevate-pointcard-DEGlZBo6.js} +2 -2
  39. package/stencil/{player-elevate-pointcard-DZEaqOhV.js → player-elevate-pointcard-DGdQLOFe.js} +2 -2
  40. package/stencil/{player-rakeback-card-BpL3lkfi.js → player-rakeback-card-CHzbUYFI.js} +1 -1
  41. package/stencil/{player-rakeback-card-DQhoczwz.js → player-rakeback-card-CMKK-24q.js} +1 -1
  42. package/stencil/{player-rakeback-card-DBtdbjzD.cjs → player-rakeback-card-CNHOtnA1.cjs} +1 -1
  43. package/components/CasinoHeaderControllerNd-CaGtPYb_.cjs +0 -1
  44. package/components/PlayerAccountBalanceModalNd-DHS4EiDT.js +0 -1556
  45. package/components/PlayerAccountBalanceModalNd-Ngc7csLH.js +0 -1585
  46. package/components/PlayerAccountBalanceModalNd-rbgsZoYF.cjs +0 -13
  47. package/components/PlayerDeposit-DICh9OXT.cjs +0 -1
  48. package/stencil/app-globals-0f993ce5-B6nNHmA4.js +0 -7
  49. package/stencil/app-globals-0f993ce5-DgOnOgxM.cjs +0 -1
  50. package/stencil/gamification-dropdown_4-CO7vZzDH.cjs +0 -192
  51. package/stencil/index-71b1bdfa-CLy6cikP.js +0 -757
  52. package/stencil/index-71b1bdfa-CpwYbS6b.cjs +0 -1
  53. package/stencil/index-b7bbd57e-Cgb8WuPm.cjs +0 -1
  54. package/stencil/index-b7bbd57e-DHOmwG9M.js +0 -550
  55. package/stencil/index-b7bbd57e-vLItFRw3.js +0 -534
  56. package/stencil/player-elevate-card-items-66be34fb-CFw6-30L.cjs +0 -1
  57. package/stencil/ui-image-38c3c15f-BMSjUaYN.js +0 -39
  58. package/stencil/ui-image-38c3c15f-BmqlDnWt.js +0 -39
  59. package/stencil/ui-image-38c3c15f-CZmv085J.cjs +0 -1
  60. package/stencil/ui-image-B7RTPzpA.cjs +0 -1
  61. package/stencil/ui-image-BRij37_c.js +0 -29
  62. package/stencil/ui-image-C_C-Wh69.js +0 -11
@@ -1,13 +0,0 @@
1
- "use strict";var at=Object.defineProperty,ot=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var ze=(r,t,n)=>t in r?at(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Ue=(r,t)=>{for(var n in t||(t={}))it.call(t,n)&&ze(r,n,t[n]);if(He)for(var n of He(t))lt.call(t,n)&&ze(r,n,t[n]);return r},Pe=(r,t)=>ot(r,rt(t));var Xe=(r,t,n)=>new Promise((l,u)=>{var d=y=>{try{h(n.next(y))}catch(w){u(w)}},g=y=>{try{h(n.throw(y))}catch(w){u(w)}},h=y=>y.done?l(y.value):Promise.resolve(y.value).then(d,g);h((n=n.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenuNd-DWRsBVV8.cjs");function Ge(r,t){e.addMessages(r,t)}function st(r){e.$locale.set(r)}const qe={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."}};var Ie={exports:{}};/** @license
2
- * eventsource.js
3
- * Available under MIT License (MIT)
4
- * https://github.com/Yaffle/EventSource/
5
- */(function(r,t){(function(n){var l=n.setTimeout,u=n.clearTimeout,d=n.XMLHttpRequest,g=n.XDomainRequest,h=n.ActiveXObject,y=n.EventSource,w=n.document,A=n.Promise,D=n.fetch,O=n.Response,L=n.TextDecoder,F=n.TextEncoder,R=n.AbortController;if(typeof window!="undefined"&&typeof w!="undefined"&&!("readyState"in w)&&w.body==null&&(w.readyState="loading",window.addEventListener("load",function(o){w.readyState="complete"},!1)),d==null&&h!=null&&(d=function(){return new h("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(o){function a(){}return a.prototype=o,new a}),Date.now||(Date.now=function(){return new Date().getTime()}),R==null){var T=D;D=function(o,a){var s=a.signal;return T(o,{headers:a.headers,credentials:a.credentials,cache:a.cache}).then(function(i){var c=i.body.getReader();return s._reader=c,s._aborted&&s._reader.cancel(),{status:i.status,statusText:i.statusText,headers:i.headers,body:{getReader:function(){return c}}}})},R=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function S(){this.bitsNeeded=0,this.codePoint=0}S.prototype.decode=function(o){function a(C,E,B){if(B===1)return C>=128>>E&&C<<E<=2047;if(B===2)return C>=2048>>E&&C<<E<=55295||C>=57344>>E&&C<<E<=65535;if(B===3)return C>=65536>>E&&C<<E<=1114111;throw new Error}function s(C,E){if(C===6*1)return E>>6>15?3:E>31?2:1;if(C===6*2)return E>15?3:2;if(C===6*3)return 3;throw new Error}for(var i=65533,c="",f=this.bitsNeeded,v=this.codePoint,p=0;p<o.length;p+=1){var b=o[p];f!==0&&(b<128||b>191||!a(v<<6|b&63,f-6,s(f,v)))&&(f=0,v=i,c+=String.fromCharCode(v)),f===0?(b>=0&&b<=127?(f=0,v=b):b>=192&&b<=223?(f=6*1,v=b&31):b>=224&&b<=239?(f=6*2,v=b&15):b>=240&&b<=247?(f=6*3,v=b&7):(f=0,v=i),f!==0&&!a(v,f,s(f,v))&&(f=0,v=i)):(f-=6,v=v<<6|b&63),f===0&&(v<=65535?c+=String.fromCharCode(v):(c+=String.fromCharCode(55296+(v-65535-1>>10)),c+=String.fromCharCode(56320+(v-65535-1&1023))))}return this.bitsNeeded=f,this.codePoint=v,c};var j=function(){try{return new L().decode(new F().encode("test"),{stream:!0})==="test"}catch(o){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+o)}return!1};(L==null||F==null||!j())&&(L=S);var k=function(){};function I(o){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=k,this.onload=k,this.onerror=k,this.onreadystatechange=k,this._contentType="",this._xhr=o,this._sendTimeout=0,this._abort=k}I.prototype.open=function(o,a){this._abort(!0);var s=this,i=this._xhr,c=1,f=0;this._abort=function(B){s._sendTimeout!==0&&(u(s._sendTimeout),s._sendTimeout=0),(c===1||c===2||c===3)&&(c=4,i.onload=k,i.onerror=k,i.onabort=k,i.onprogress=k,i.onreadystatechange=k,i.abort(),f!==0&&(u(f),f=0),B||(s.readyState=4,s.onabort(null),s.onreadystatechange())),c=0};var v=function(){if(c===1){var B=0,N="",le=void 0;if("contentType"in i)B=200,N="OK",le=i.contentType;else try{B=i.status,N=i.statusText,le=i.getResponseHeader("Content-Type")}catch(Be){B=0,N="",le=void 0}B!==0&&(c=2,s.readyState=2,s.status=B,s.statusText=N,s._contentType=le,s.onreadystatechange())}},p=function(){if(v(),c===2||c===3){c=3;var B="";try{B=i.responseText}catch(N){}s.readyState=3,s.responseText=B,s.onprogress()}},b=function(B,N){if((N==null||N.preventDefault==null)&&(N={preventDefault:k}),p(),c===1||c===2||c===3){if(c=4,f!==0&&(u(f),f=0),s.readyState=4,B==="load")s.onload(N);else if(B==="error")s.onerror(N);else if(B==="abort")s.onabort(N);else throw new TypeError;s.onreadystatechange()}},C=function(B){i!=null&&(i.readyState===4?(!("onload"in i)||!("onerror"in i)||!("onabort"in i))&&b(i.responseText===""?"error":"load",B):i.readyState===3?"onprogress"in i||p():i.readyState===2&&v())},E=function(){f=l(function(){E()},500),i.readyState===3&&p()};"onload"in i&&(i.onload=function(B){b("load",B)}),"onerror"in i&&(i.onerror=function(B){b("error",B)}),"onabort"in i&&(i.onabort=function(B){b("abort",B)}),"onprogress"in i&&(i.onprogress=p),"onreadystatechange"in i&&(i.onreadystatechange=function(B){C(B)}),("contentType"in i||!("ontimeout"in d.prototype))&&(a+=(a.indexOf("?")===-1?"?":"&")+"padding=true"),i.open(o,a,!0),"readyState"in i&&(f=l(function(){E()},0))},I.prototype.abort=function(){this._abort(!1)},I.prototype.getResponseHeader=function(o){return this._contentType},I.prototype.setRequestHeader=function(o,a){var s=this._xhr;"setRequestHeader"in s&&s.setRequestHeader(o,a)},I.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},I.prototype.send=function(){if((!("ontimeout"in d.prototype)||!("sendAsBinary"in d.prototype)&&!("mozAnon"in d.prototype))&&w!=null&&w.readyState!=null&&w.readyState!=="complete"){var o=this;o._sendTimeout=l(function(){o._sendTimeout=0,o.send()},4);return}var a=this._xhr;"withCredentials"in a&&(a.withCredentials=this.withCredentials);try{a.send(void 0)}catch(s){throw s}};function ne(o){return o.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)+32)})}function ae(o){for(var a=Object.create(null),s=o.split(`\r
6
- `),i=0;i<s.length;i+=1){var c=s[i],f=c.split(": "),v=f.shift(),p=f.join(": ");a[ne(v)]=p}this._map=a}ae.prototype.get=function(o){return this._map[ne(o)]},d!=null&&d.HEADERS_RECEIVED==null&&(d.HEADERS_RECEIVED=2);function P(){}P.prototype.open=function(o,a,s,i,c,f,v){o.open("GET",c);var p=0;o.onprogress=function(){var C=o.responseText,E=C.slice(p);p+=E.length,s(E)},o.onerror=function(C){C.preventDefault(),i(new Error("NetworkError"))},o.onload=function(){i(null)},o.onabort=function(){i(null)},o.onreadystatechange=function(){if(o.readyState===d.HEADERS_RECEIVED){var C=o.status,E=o.statusText,B=o.getResponseHeader("Content-Type"),N=o.getAllResponseHeaders();a(C,E,B,new ae(N))}},o.withCredentials=f;for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&o.setRequestHeader(b,v[b]);return o.send(),o};function V(o){this._headers=o}V.prototype.get=function(o){return this._headers.get(o)};function _(){}_.prototype.open=function(o,a,s,i,c,f,v){var p=null,b=new R,C=b.signal,E=new L;return D(c,{headers:v,credentials:f?"include":"same-origin",signal:C,cache:"no-store"}).then(function(B){return p=B.body.getReader(),a(B.status,B.statusText,B.headers.get("Content-Type"),new V(B.headers)),new A(function(N,le){var Be=function(){p.read().then(function(Y){if(Y.done)N(void 0);else{var G=E.decode(Y.value,{stream:!0});s(G),Be()}}).catch(function(Y){le(Y)})};Be()})}).catch(function(B){if(B.name!=="AbortError")return B}).then(function(B){i(B)}),{abort:function(){p!=null&&p.cancel(),b.abort()}}};function M(){this._listeners=Object.create(null)}function x(o){l(function(){throw o},0)}M.prototype.dispatchEvent=function(o){o.target=this;var a=this._listeners[o.type];if(a!=null)for(var s=a.length,i=0;i<s;i+=1){var c=a[i];try{typeof c.handleEvent=="function"?c.handleEvent(o):c.call(this,o)}catch(f){x(f)}}},M.prototype.addEventListener=function(o,a){o=String(o);var s=this._listeners,i=s[o];i==null&&(i=[],s[o]=i);for(var c=!1,f=0;f<i.length;f+=1)i[f]===a&&(c=!0);c||i.push(a)},M.prototype.removeEventListener=function(o,a){o=String(o);var s=this._listeners,i=s[o];if(i!=null){for(var c=[],f=0;f<i.length;f+=1)i[f]!==a&&c.push(i[f]);c.length===0?delete s[o]:s[o]=c}};function X(o){this.type=o,this.target=void 0}function m(o,a){X.call(this,o),this.data=a.data,this.lastEventId=a.lastEventId}m.prototype=Object.create(X.prototype);function oe(o,a){X.call(this,o),this.status=a.status,this.statusText=a.statusText,this.headers=a.headers}oe.prototype=Object.create(X.prototype);function Se(o,a){X.call(this,o),this.error=a.error}Se.prototype=Object.create(X.prototype);var re=-1,$=0,ue=1,fe=2,ye=-1,Z=0,he=1,Ce=2,ve=3,_e=/^text\/event\-stream(;.*)?$/i,De=1e3,Ae=18e6,we=function(o,a){var s=o==null?a:parseInt(o,10);return s!==s&&(s=a),be(s)},be=function(o){return Math.min(Math.max(o,De),Ae)},ie=function(o,a,s){try{typeof a=="function"&&a.call(o,s)}catch(i){x(i)}};function W(o,a){M.call(this),a=a||{},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,ke(this,o,a)}function Oe(){return d!=null&&"withCredentials"in d.prototype||g==null?new d:new g}var Le=D!=null&&O!=null&&"body"in O.prototype;function ke(o,a,s){a=String(a);var i=!!s.withCredentials,c=s.lastEventIdQueryParameterName||"lastEventId",f=be(1e3),v=we(s.heartbeatTimeout,45e3),p="",b=f,C=!1,E=0,B=s.headers||{},N=s.Transport,le=Le&&N==null?void 0:new I(N!=null?new N:Oe()),Be=N!=null&&typeof N!="string"?new N:le==null?new _:new P,Y=void 0,G=0,ee=re,me="",xe="",se="",Ee="",q=Z,Fe=0,pe=0,tt=function(z,H,J,Q){if(ee===$)if(z===200&&J!=null&&_e.test(J)){ee=ue,C=Date.now(),b=f,o.readyState=ue;var K=new oe("open",{status:z,statusText:H,headers:Q});o.dispatchEvent(K),ie(o,o.onopen,K)}else{var U="";z!==200?(H&&(H=H.replace(/\s+/g," ")),U="EventSource's response has a status "+z+" "+H+" that is not 200. Aborting the connection."):U="EventSource's response has a Content-Type specifying an unsupported type: "+(J==null?"-":J.replace(/\s+/g," "))+". Aborting the connection.",Ne();var K=new oe("error",{status:z,statusText:H,headers:Q});o.dispatchEvent(K),ie(o,o.onerror,K),console.error(U)}},nt=function(z){if(ee===ue){for(var H=-1,J=0;J<z.length;J+=1){var Q=z.charCodeAt(J);(Q===10||Q===13)&&(H=J)}var K=(H!==-1?Ee:"")+z.slice(0,H+1);Ee=(H===-1?Ee:"")+z.slice(H+1),z!==""&&(C=Date.now(),E+=z.length);for(var U=0;U<K.length;U+=1){var Q=K.charCodeAt(U);if(q===ye&&Q===10)q=Z;else if(q===ye&&(q=Z),Q===13||Q===10){if(q!==Z){q===he&&(pe=U+1);var ce=K.slice(Fe,pe-1),de=K.slice(pe+(pe<U&&K.charCodeAt(pe)===32?1:0),U);ce==="data"?(me+=`
7
- `,me+=de):ce==="id"?xe=de:ce==="event"?se=de:ce==="retry"?(f=we(de,f),b=f):ce==="heartbeatTimeout"&&(v=we(de,v),G!==0&&(u(G),G=l(function(){Te()},v)))}if(q===Z){if(me!==""){p=xe,se===""&&(se="message");var ge=new m(se,{data:me.slice(1),lastEventId:xe});if(o.dispatchEvent(ge),se==="open"?ie(o,o.onopen,ge):se==="message"?ie(o,o.onmessage,ge):se==="error"&&ie(o,o.onerror,ge),ee===fe)return}me="",se=""}q=Q===13?ye:Z}else q===Z&&(Fe=U,q=he),q===he?Q===58&&(pe=U+1,q=Ce):q===Ce&&(q=ve)}}},je=function(z){if(ee===ue||ee===$){ee=re,G!==0&&(u(G),G=0),G=l(function(){Te()},b),b=be(Math.min(f*16,b*2)),o.readyState=$;var H=new Se("error",{error:z});o.dispatchEvent(H),ie(o,o.onerror,H),z!=null&&console.error(z)}},Ne=function(){ee=fe,Y!=null&&(Y.abort(),Y=void 0),G!==0&&(u(G),G=0),o.readyState=fe},Te=function(){if(G=0,ee!==re){if(!C&&Y!=null)je(new Error("No activity within "+v+" milliseconds. "+(ee===$?"No response received.":E+" chars received.")+" Reconnecting.")),Y!=null&&(Y.abort(),Y=void 0);else{var z=Math.max((C||Date.now())+v-Date.now(),1);C=!1,G=l(function(){Te()},z)}return}C=!1,E=0,G=l(function(){Te()},v),ee=$,me="",se="",xe=p,Ee="",Fe=0,pe=0,q=Z;var H=a;if(a.slice(0,5)!=="data:"&&a.slice(0,5)!=="blob:"&&p!==""){var J=a.indexOf("?");H=J===-1?a:a.slice(0,J+1)+a.slice(J+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(de,ge){return ge===c?"":de}),H+=(a.indexOf("?")===-1?"?":"&")+c+"="+encodeURIComponent(p)}var Q=o.withCredentials,K={};K.Accept="text/event-stream";var U=o.headers;if(U!=null)for(var ce in U)Object.prototype.hasOwnProperty.call(U,ce)&&(K[ce]=U[ce]);try{Y=Be.open(le,tt,nt,je,H,Q,K)}catch(de){throw Ne(),de}};o.url=a,o.readyState=$,o.withCredentials=i,o.headers=B,o._close=Ne,Te()}W.prototype=Object.create(M.prototype),W.prototype.CONNECTING=$,W.prototype.OPEN=ue,W.prototype.CLOSED=fe,W.prototype.close=function(){this._close()},W.CONNECTING=$,W.OPEN=ue,W.CLOSED=fe,W.prototype.withCredentials=void 0;var Re=y;d!=null&&(y==null||!("withCredentials"in y.prototype))&&(Re=W),function(o){{var a=o(t);a!==void 0&&(r.exports=a)}}(function(o){o.EventSourcePolyfill=W,o.NativeEventSource=y,o.EventSource=Re})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Ie,Ie.exports);var ct=Ie.exports;/*!
8
- * currency.js - v2.0.4
9
- * http://scurker.github.io/currency.js
10
- *
11
- * Copyright (c) 2021 Jason Wilson
12
- * Released under MIT license
13
- */var dt={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:ht,fromCents:!1},$e=function(t){return Math.round(t)},Ve=function(t){return Math.pow(10,t)},ut=function(t,n){return $e(t/n)*n},ft=/(\d)(?=(\d{3})+\b)/g,pt=/(\d)(?=(\d\d)+\d\b)/g;function te(r,t){var n=this;if(!(n instanceof te))return new te(r,t);var l=Object.assign({},dt,t),u=Ve(l.precision),d=Me(r,l);n.intValue=d,n.value=d/u,l.increment=l.increment||1/u,l.useVedic?l.groups=pt:l.groups=ft,this.s=l,this.p=u}function Me(r,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=0,u=t.decimal,d=t.errorOnInvalid,g=t.precision,h=t.fromCents,y=Ve(g),w=typeof r=="number",A=r instanceof te;if(A&&h)return r.intValue;if(w||A)l=A?r.value:r;else if(typeof r=="string"){var D=new RegExp("[^-\\d"+u+"]","g"),O=new RegExp("\\"+u,"g");l=r.replace(/\((.*)\)/,"-$1").replace(D,"").replace(O,"."),l=l||0}else{if(d)throw Error("Invalid Input");l=0}return h||(l*=y,l=l.toFixed(4)),n?$e(l):l}function ht(r,t){var n=t.pattern,l=t.negativePattern,u=t.symbol,d=t.separator,g=t.decimal,h=t.groups,y=(""+r).replace(/^-/,"").split("."),w=y[0],A=y[1];return(r.value>=0?n:l).replace("!",u).replace("#",w.replace(h,"$1"+d)+(A?g+A:""))}te.prototype={add:function(t){var n=this.intValue,l=this.s,u=this.p;return te((n+=Me(t,l))/(l.fromCents?1:u),l)},subtract:function(t){var n=this.intValue,l=this.s,u=this.p;return te((n-=Me(t,l))/(l.fromCents?1:u),l)},multiply:function(t){var n=this.intValue,l=this.s;return te((n*=t)/(l.fromCents?1:Ve(l.precision)),l)},divide:function(t){var n=this.intValue,l=this.s;return te(n/=Me(t,l,!1),l)},distribute:function(t){for(var n=this.intValue,l=this.p,u=this.s,d=[],g=Math[n>=0?"floor":"ceil"](n/t),h=Math.abs(n-g*t),y=u.fromCents?1:l;t!==0;t--){var w=te(g/y,u);h-- >0&&(w=w[n>=0?"add":"subtract"](1/y)),d.push(w)}return d},dollars:function(){return~~this.value},cents:function(){var t=this.intValue,n=this.p;return~~(t%n)},format:function(t){var n=this.s;return typeof t=="function"?t(this,n):n.format(this,Object.assign({},n,t))},toString:function(){var t=this.intValue,n=this.p,l=this.s;return ut(t/n,l.increment).toFixed(l.precision)},toJSON:function(){return this.value}};function mt(r){e.append_styles(r,"svelte-1tsugyl",'*,*::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;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, #D0046C));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;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 Ke(r,t,n){const l=r.slice();return l[50]=t[n],l}function We(r,t,n){const l=r.slice();return l[53]=t[n],l}function gt(r){let t,n,l=(r[1].Total?r[8](r[1].Total[0].amount):"0")+"",u,d,g,h,y,w,A,D,O,L,F,R,T=r[4]&&Ye(r);return{c(){t=e.element("div"),n=e.element("p"),u=e.text(l),d=e.space(),g=e.text(r[5]),h=e.space(),y=e.element("span"),w=e.svg_element("svg"),A=e.svg_element("path"),O=e.space(),T&&T.c(),L=e.empty(),e.attr(A,"id","arrow"),e.attr(A,"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"),e.attr(A,"transform","translate(-274.511 -441.088)"),e.attr(A,"fill","#d1d1d1"),e.attr(w,"xmlns","http://www.w3.org/2000/svg"),e.attr(w,"width","14"),e.attr(w,"height","6.835"),e.attr(w,"viewBox","0 0 14 6.835"),e.attr(y,"class",D=r[3]?"TriangleActive":"TriangleInactive"),e.attr(t,"class","BalanceValue")},m(S,j){e.insert(S,t,j),e.append(t,n),e.append(n,u),e.append(n,d),e.append(n,g),e.append(t,h),e.append(t,y),e.append(y,w),e.append(w,A),e.insert(S,O,j),T&&T.m(S,j),e.insert(S,L,j),F||(R=e.listen(t,"click",r[25]),F=!0)},p(S,j){j[0]&2&&l!==(l=(S[1].Total?S[8](S[1].Total[0].amount):"0")+"")&&e.set_data(u,l),j[0]&32&&e.set_data(g,S[5]),j[0]&8&&D!==(D=S[3]?"TriangleActive":"TriangleInactive")&&e.attr(y,"class",D),S[4]?T?T.p(S,j):(T=Ye(S),T.c(),T.m(L.parentNode,L)):T&&(T.d(1),T=null)},d(S){S&&(e.detach(t),e.detach(O),e.detach(L)),T&&T.d(S),F=!1,R()}}}function yt(r){let t,n=r[6]("Loading")+"",l;return{c(){t=e.element("p"),l=e.text(n),e.attr(t,"class","Loading")},m(u,d){e.insert(u,t,d),e.append(t,l)},p(u,d){d[0]&64&&n!==(n=u[6]("Loading")+"")&&e.set_data(l,n)},d(u){u&&e.detach(t)}}}function Ye(r){let t,n,l,u,d,g,h,y,w=r[6]("Title")+"",A,D,O,L,F,R,T=r[6]("DepositButton")+"",S,j,k,I,ne,ae,P=e.ensure_array_like(Object.keys(r[1])),V=[];for(let _=0;_<P.length;_+=1)V[_]=Qe(Ke(r,P,_));return{c(){t=e.element("div"),n=e.element("div"),u=e.space(),d=e.element("div"),g=e.element("div"),h=e.element("div"),y=e.element("p"),A=e.text(w),D=e.space(),O=e.element("div");for(let _=0;_<V.length;_+=1)V[_].c();L=e.space(),F=e.element("div"),R=e.element("button"),S=e.text(T),e.attr(n,"class",l="BalanceModalClose "+(r[3]?"Open":"")),e.attr(y,"class","BalanceModalTitle"),e.attr(h,"class","BalanceModalHeader"),e.attr(O,"class","BalanceModalBody"),e.attr(R,"class","BalanceModalAction"),e.attr(F,"class","BalanceModalFooter"),e.attr(g,"class",j="ModalContent "+(r[3]?"Open":"")),e.attr(d,"class",k="BalanceModal "+(r[3]?"Open":"")),e.attr(t,"class",I="BalanceModalWrapper "+(r[3]?"Open":""))},m(_,M){e.insert(_,t,M),e.append(t,n),e.append(t,u),e.append(t,d),e.append(d,g),e.append(g,h),e.append(h,y),e.append(y,A),e.append(g,D),e.append(g,O);for(let x=0;x<V.length;x+=1)V[x]&&V[x].m(O,null);e.append(g,L),e.append(g,F),e.append(F,R),e.append(R,S),ne||(ae=[e.listen(n,"click",r[26]),e.listen(R,"click",r[27])],ne=!0)},p(_,M){if(M[0]&8&&l!==(l="BalanceModalClose "+(_[3]?"Open":""))&&e.attr(n,"class",l),M[0]&64&&w!==(w=_[6]("Title")+"")&&e.set_data(A,w),M[0]&354){P=e.ensure_array_like(Object.keys(_[1]));let x;for(x=0;x<P.length;x+=1){const X=Ke(_,P,x);V[x]?V[x].p(X,M):(V[x]=Qe(X),V[x].c(),V[x].m(O,null))}for(;x<V.length;x+=1)V[x].d(1);V.length=P.length}M[0]&64&&T!==(T=_[6]("DepositButton")+"")&&e.set_data(S,T),M[0]&8&&j!==(j="ModalContent "+(_[3]?"Open":""))&&e.attr(g,"class",j),M[0]&8&&k!==(k="BalanceModal "+(_[3]?"Open":""))&&e.attr(d,"class",k),M[0]&8&&I!==(I="BalanceModalWrapper "+(_[3]?"Open":""))&&e.attr(t,"class",I)},d(_){_&&e.detach(t),e.destroy_each(V,_),ne=!1,e.run_all(ae)}}}function Je(r){let t,n,l=r[6](r[50])+"",u,d,g=(r[53].productType?r[6](r[53].productType):"")+"",h,y,w,A,D=(r[53].amount?r[8](r[53].amount):"0")+"",O,L,F,R;return{c(){t=e.element("div"),n=e.element("p"),u=e.text(l),d=e.space(),h=e.text(g),y=e.space(),w=e.element("p"),A=e.element("span"),O=e.text(D),L=e.space(),F=e.element("span"),R=e.text(r[5]),e.attr(n,"class","BalanceModalText"),e.attr(A,"class","BalanceModalAmount"),e.attr(F,"class","BalanceModalCurrency"),e.attr(w,"class","BalanceModalValue"),e.attr(t,"class","BalanceModalRowLine")},m(T,S){e.insert(T,t,S),e.append(t,n),e.append(n,u),e.append(n,d),e.append(n,h),e.append(t,y),e.append(t,w),e.append(w,A),e.append(A,O),e.append(w,L),e.append(w,F),e.append(F,R)},p(T,S){S[0]&66&&l!==(l=T[6](T[50])+"")&&e.set_data(u,l),S[0]&66&&g!==(g=(T[53].productType?T[6](T[53].productType):"")+"")&&e.set_data(h,g),S[0]&2&&D!==(D=(T[53].amount?T[8](T[53].amount):"0")+"")&&e.set_data(O,D),S[0]&32&&e.set_data(R,T[5])},d(T){T&&e.detach(t)}}}function Qe(r){let t,n,l=e.ensure_array_like(r[1][r[50]]),u=[];for(let d=0;d<l.length;d+=1)u[d]=Je(We(r,l,d));return{c(){t=e.element("div");for(let d=0;d<u.length;d+=1)u[d].c();n=e.space(),e.attr(t,"class","BalanceModalRowBoth")},m(d,g){e.insert(d,t,g);for(let h=0;h<u.length;h+=1)u[h]&&u[h].m(t,null);e.append(t,n)},p(d,g){if(g[0]&354){l=e.ensure_array_like(d[1][d[50]]);let h;for(h=0;h<l.length;h+=1){const y=We(d,l,h);u[h]?u[h].p(y,g):(u[h]=Je(y),u[h].c(),u[h].m(t,n))}for(;h<u.length;h+=1)u[h].d(1);u.length=l.length}},d(d){d&&e.detach(t),e.destroy_each(u,d)}}}function Ze(r){let t,n,l;return{c(){t=e.element("div"),e.attr(t,"class","ShowBalanceModalOverlay")},m(u,d){e.insert(u,t,d),n||(l=e.listen(t,"click",r[28]),n=!0)},p:e.noop,d(u){u&&e.detach(t),n=!1,l()}}}function vt(r){let t,n,l;function u(y,w){return y[2]?yt:gt}let d=u(r),g=d(r),h=r[4]&&Ze(r);return{c(){t=e.element("div"),n=e.element("div"),g.c(),l=e.space(),h&&h.c(),e.attr(n,"class","ShowBalance")},m(y,w){e.insert(y,t,w),e.append(t,n),g.m(n,null),e.append(t,l),h&&h.m(t,null),r[29](t)},p(y,w){d===(d=u(y))&&g?g.p(y,w):(g.d(1),g=d(y),g&&(g.c(),g.m(n,null))),y[4]?h?h.p(y,w):(h=Ze(y),h.c(),h.m(t,null)):h&&(h.d(1),h=null)},i:e.noop,o:e.noop,d(y){y&&e.detach(t),g.d(),h&&h.d(),r[29](null)}}}function wt(r,t,n){let l;e.component_subscribe(r,e.$format,a=>n(6,l=a));let{userid:u=""}=t,{session:d=""}=t,{endpoint:g=""}=t,{lang:h="en"}=t,{mbsource:y}=t,{clientstyling:w=""}=t,{clientstylingurl:A=""}=t,{translationurl:D=""}=t,{customlocaleidentifier:O=""}=t,{gmversion:L="gm16"}=t,{displaybalanceoption:F="All"}=t,{totalcalculationmode:R="totalCashAmount"}=t,{currencyseparator:T=""}=t,{currencydecimal:S=""}=t,{currencyprecision:j=""}=t,k,I,ne,ae,P,V=!1,_="",M=[],x,X=!1;const m={},oe=["totalCashAmount","totalRealAmount"],Se=()=>{fetch(D).then(a=>a.json()).then(a=>Object.keys(a).forEach(s=>Ge(s,a[s]))).catch(a=>console.log(a))};Object.keys(qe).forEach(a=>Ge(a,qe[a]));const re=a=>{switch(a){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),n(4,V=!0),setTimeout(()=>n(3,ae=!0),150);break;case"closebalance":n(3,ae=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{n(4,V=!1)},150);break}},$=()=>{if(O.includes(h))return O},ue=a=>O?new Intl.NumberFormat($(),{useGrouping:!0}).format(a):T&&S?te(a,{separator:T,decimal:S,symbol:"",precision:parseInt(j||"2",10)}).format():te(a,{separator:".",decimal:",",symbol:"",precision:parseInt(j||"2",10)}).format(),fe=()=>Xe(this,null,function*(){var s,i,c;n(2,k=!0);const a=new URL(`${g}/v1/player/${u}/account`);try{const f=yield fetch(a,{method:"GET",headers:{"X-SessionID":d}}),v=yield f.json();if(f.ok)window.postMessage({type:"BalancedFetched"},window.location.href),M=v.items,n(5,_=(s=M.find(p=>p.displayName==="Casino"))==null?void 0:s.currency),n(1,m.Total=[{amount:v.totalAmount[_]}],m),n(1,m.Real=[{amount:(i=M.find(p=>p.displayName==="Casino"))==null?void 0:i.balanceAmount}],m),n(1,m.Bonus=[{amount:(c=M.find(p=>p.displayName==="UBS"))==null?void 0:c.balanceAmount}],m);else throw new Error("Failed to fetch balance data !")}catch(f){console.log("Balance error: ",f)}finally{n(2,k=!1)}}),ye=()=>{n(2,k=!0);const a=new URL(`${g}/v2/player/${u}/balance`),s=new Headers;s.append("X-SessionID",d),fetch(a,{method:"GET",headers:s}).then(c=>c.json()).then(c=>{c[R]||n(10,R=oe[0]);const f=c.items.find(p=>p.type==="Real"&&p.walletAccountType==="Ordinary");if(n(5,_=f.currency),X=!!f.productType,n(1,m.Total=[{amount:0}],m),n(1,m.Real=[],m),n(1,m.Bonus=[],m),n(1,m.Credit=[],m),!X){x={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(1,m.Total[0].amount=c[R][_],m);for(const p of c.items)switch(p.type){case"Bonus":m.Bonus.length===0?m.Bonus.push({amount:p.amount}):n(1,m.Bonus[0].amount+=p.amount,m);break;case"Real":if(p.creditLine&&m.Credit.length===0&&m.Credit.push({amount:p.creditLine}),R==="totalRealAmount")continue;m.Real.length===0?m.Real.push({amount:p.amount}):n(1,m.Real[0].amount+=p.amount,m);break}for(const[p,b]of Object.entries(m))b.length<1&&delete m[p];n(2,k=!1);return}x={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let v=c.items;F&&F!=="All"&&(v=c.items.filter(p=>p.productType===F));for(const p of v){let b;switch(p.type){case"Bonus":b=m.Bonus.findIndex(C=>C.productType===p.productType),b>0?n(1,m.Bonus[b].amount+=p.amount,m):m.Bonus.push({amount:p.amount,productType:p.productType});break;case"Real":p.creditLine&&m.Credit.push({amount:p.creditLine,productType:p.productType}),b=m.Real.findIndex(C=>C.productType===p.productType),b>0?n(1,m.Real[b].amount+=p.amount,m):m.Real.push({amount:p.amount,productType:p.productType});break}}_e();for(const[p,b]of Object.entries(m))b.length<1&&delete m[p];n(2,k=!1)}).catch(c=>{throw n(2,k=!1),new Error("Failed to fetch balance data !")})},Z=()=>{if(P&&P.close(),d.length<1)return;let a,s;switch(L){case"gm16":a=new URL(`${g}/v2/player/${u}/information/updates`),s=f=>De(f);break;case"gmcore":a=new URL(`${g}/v1/player/${u}/balance/updates`),s=f=>Ce(f);break}const i={accept:"text/event-stream","X-SessionId":d},c=new ct.EventSourcePolyfill(a,{headers:i});P=c,c.addEventListener("message",s)},he=a=>{let s;try{s=JSON.parse(a)}catch(i){console.log("Balance stream failed: ",i);return}return s},Ce=a=>{var f,v;const s=he(a.data);if(!s){Z();return}let i="0";const c=s.balanceChange;M=M.map(p=>(c&&c[p.id]&&(p=Pe(Ue({},p),{balanceAmount:c[p.id].afterAmount})),i=(parseFloat(p==null?void 0:p.balanceAmount)+parseFloat(i)).toString(),p)),n(1,m.Real=[{amount:(f=M[0])==null?void 0:f.balanceAmount}],m),n(1,m.Bonus=[{amount:(v=M[1])==null?void 0:v.balanceAmount}],m),n(1,m.Total=[{amount:Number(i)}],m)},ve=(a,s,i)=>{let c=null;switch(i.walletAccountType){case"Ordinary":i.afterAmount!==i.affectedAmount&&(s.lastOrdinaryAfterAmount=i.afterAmount,s.showCreditLineAfterAmount||(c=i.afterAmount));break;case"CreditLine":i.afterAmount!==0?(c=i.afterAmount,s.showCreditLineAfterAmount=!0):(c=s.lastOrdinaryAfterAmount,s.showCreditLineAfterAmount=!1);break;default:c=i.afterAmount}return c===null?a:c},_e=()=>{switch(R){case"totalCashAmount":let a=0;for(const i of["Real","Bonus"])for(const c of m[i])a+=Math.max(c.amount,0);n(1,m.Total[0].amount=a,m);break;case"totalRealAmount":if(!X)return;let s=0;for(const i of m.Real)s+=i.amount;n(1,m.Total[0].amount=s,m)}},De=a=>{const s=he(a.data);if(!s){Z();return}if(s.type!=="BALANCE_UPDATE_V2")return;const i=s.body.balanceChange;for(const[c,f]of Object.entries(i))if(R==="totalRealAmount"&&c==="Real"&&!X&&n(1,m.Total[0].amount=ve(m.Total[0].amount,x,f),m),!!m[c])for(const v of m[c]){if(!X){v.amount=c==="Real"?ve(v.amount,x,f):f.afterAmount;continue}f.productType===v.productType&&(v.amount=c==="Real"?ve(v.amount,x[v.productType],f):f.afterAmount)}_e()},Ae=()=>{re("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&&gtag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},we=()=>{oe.includes(R)||(console.error(`Unsupported value ('${R}') for totalcalculationmode parameter. Only the following values are supported ${oe}. Using default value ('${oe[0]}').`),n(10,R=oe[0]))},be=()=>{switch(st(h),we(),L){case"gmcore":fe();break;case"gm16":ye();break;default:throw Error(`Invalid apiversion attribute: ${L}`)}},ie=a=>a.data&&a.data.type==="LogoutSuccessfull"&&P.close(),W=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};e.onMount(()=>(window.addEventListener("message",ie,!1),()=>{window.emMessageBus&&ne&&ne.unsubscribe(),window.removeEventListener("message",ie),P&&P.close()}));const Oe=()=>re("balance"),Le=()=>re("closebalance"),ke=()=>Ae(),Re=()=>re("closeBalance");function o(a){e.binding_callbacks[a?"unshift":"push"](()=>{I=a,n(0,I)})}return r.$$set=a=>{"userid"in a&&n(11,u=a.userid),"session"in a&&n(12,d=a.session),"endpoint"in a&&n(13,g=a.endpoint),"lang"in a&&n(14,h=a.lang),"mbsource"in a&&n(15,y=a.mbsource),"clientstyling"in a&&n(16,w=a.clientstyling),"clientstylingurl"in a&&n(17,A=a.clientstylingurl),"translationurl"in a&&n(18,D=a.translationurl),"customlocaleidentifier"in a&&n(19,O=a.customlocaleidentifier),"gmversion"in a&&n(20,L=a.gmversion),"displaybalanceoption"in a&&n(21,F=a.displaybalanceoption),"totalcalculationmode"in a&&n(10,R=a.totalcalculationmode),"currencyseparator"in a&&n(22,T=a.currencyseparator),"currencydecimal"in a&&n(23,S=a.currencydecimal),"currencyprecision"in a&&n(24,j=a.currencyprecision)},r.$$.update=()=>{r.$$.dirty[0]&16384&&h&&$(),r.$$.dirty[0]&3176448&&g&&u&&d&&h&&L&&F&&be(),r.$$.dirty[0]&1062912&&g&&u&&d&&L&&Z(),r.$$.dirty[0]&262144&&D&&Se(),r.$$.dirty[0]&2&&m.Total&&W(),r.$$.dirty[0]&65537&&w&&I&&e.setClientStyling(I,w),r.$$.dirty[0]&131073&&A&&I&&e.setClientStylingURL(I,A),r.$$.dirty[0]&32769&&y&&I&&e.setStreamStyling(I,`${y}.Style`)},[I,m,k,ae,V,_,l,re,ue,Ae,R,u,d,g,h,y,w,A,D,O,L,F,T,S,j,Oe,Le,ke,Re,o]}class et extends e.SvelteComponent{constructor(t){super(),e.init(this,t,wt,vt,e.safe_not_equal,{userid:11,session:12,endpoint:13,lang:14,mbsource:15,clientstyling:16,clientstylingurl:17,translationurl:18,customlocaleidentifier:19,gmversion:20,displaybalanceoption:21,totalcalculationmode:10,currencyseparator:22,currencydecimal:23,currencyprecision:24},mt,[-1,-1])}get userid(){return this.$$.ctx[11]}set userid(t){this.$$set({userid:t}),e.flush()}get session(){return this.$$.ctx[12]}set session(t){this.$$set({session:t}),e.flush()}get endpoint(){return this.$$.ctx[13]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),e.flush()}get mbsource(){return this.$$.ctx[15]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[18]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get customlocaleidentifier(){return this.$$.ctx[19]}set customlocaleidentifier(t){this.$$set({customlocaleidentifier:t}),e.flush()}get gmversion(){return this.$$.ctx[20]}set gmversion(t){this.$$set({gmversion:t}),e.flush()}get displaybalanceoption(){return this.$$.ctx[21]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),e.flush()}get totalcalculationmode(){return this.$$.ctx[10]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),e.flush()}get currencyseparator(){return this.$$.ctx[22]}set currencyseparator(t){this.$$set({currencyseparator:t}),e.flush()}get currencydecimal(){return this.$$.ctx[23]}set currencydecimal(t){this.$$set({currencydecimal:t}),e.flush()}get currencyprecision(){return this.$$.ctx[24]}set currencyprecision(t){this.$$set({currencyprecision:t}),e.flush()}}e.create_custom_element(et,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencyseparator:{},currencydecimal:{},currencyprecision:{}},[],[],!0);exports.default=et;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenuNd-DWRsBVV8.cjs");function E(s,t){e.addMessages(s,t)}function H(s){e.$locale.set(s)}const L={en:{titleDeposit:"Deposit",loading:"Loading, please wait ..."},"zh-hk":{titleDeposit:"訂金",loading:"加載請稍候…"},fr:{titleDeposit:"Dépôt",loading:"Chargement, veuillez patienter ..."},tr:{titleDeposit:"PARA YATIR",loading:"Yükleniyor ..."},ro:{titleDeposit:"Depunere",loading:"Se încarcă..."},es:{titleDeposit:"Deposita",loading:"Cargando ..."},pt:{titleDeposit:"Depósito",loading:"Carregando, por favor espere ..."},hr:{titleDeposit:"Uplata",loading:"Učitavanje"},"pt-br":{titleDeposit:"Depositar",Loading:"Carregando, por favor espere..."},"es-mx":{titleDeposit:"Depositar",Loading:"Cargando, por favor espere..."}};function W(s){e.append_styles(s,"svelte-lvm6lo","button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}")}function j(s){let t,a,o,n,c,m,d,p,f,l,r=s[4]("titleDeposit")+"",u,w,D;return{c(){t=e.element("div"),a=e.svg_element("svg"),o=e.svg_element("defs"),n=e.svg_element("style"),c=e.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),m=e.svg_element("g"),d=e.svg_element("g"),p=e.svg_element("path"),f=e.space(),l=e.element("h2"),u=e.text(r),e.attr(p,"class","aaa"),e.attr(p,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(p,"transform","translate(15 15) rotate(180)"),e.attr(d,"transform","translate(20 158)"),e.attr(m,"transform","translate(-20 -158)"),e.attr(a,"xmlns","http://www.w3.org/2000/svg"),e.attr(a,"width","15"),e.attr(a,"height","15"),e.attr(a,"viewBox","0 0 15 15"),e.attr(l,"class","DepositTitleMobile"),e.attr(t,"class","MenuReturnButton")},m(g,h){e.insert(g,t,h),e.append(t,a),e.append(a,o),e.append(o,n),e.append(n,c),e.append(a,m),e.append(m,d),e.append(d,p),e.append(t,f),e.append(t,l),e.append(l,u),w||(D=e.listen(t,"click",s[18]),w=!0)},p(g,h){h&16&&r!==(r=g[4]("titleDeposit")+"")&&e.set_data(u,r)},d(g){g&&e.detach(t),w=!1,D()}}}function z(s){let t,a,o;return{c(){t=e.element("div"),a=e.element("iframe"),e.src_url_equal(a.src,o=s[3])||e.attr(a,"src",o),e.attr(a,"title","Deposit Iframe"),e.attr(t,"class","DepositIframeWrapper")},m(n,c){e.insert(n,t,c),e.append(t,a)},p(n,c){c&8&&!e.src_url_equal(a.src,o=n[3])&&e.attr(a,"src",o)},d(n){n&&e.detach(t)}}}function G(s){let t,a=s[4]("loading")+"",o;return{c(){t=e.element("p"),o=e.text(a)},m(n,c){e.insert(n,t,c),e.append(t,o)},p(n,c){c&16&&a!==(a=n[4]("loading")+"")&&e.set_data(o,a)},d(n){n&&e.detach(t)}}}function N(s){let t,a,o,n=s[4]("titleDeposit")+"",c,m,d=s[5]&&j(s);function p(r,u){return r[1]?G:z}let f=p(s),l=f(s);return{c(){t=e.element("div"),d&&d.c(),a=e.space(),o=e.element("h2"),c=e.text(n),m=e.space(),l.c(),e.attr(o,"class","DepositTitle "+(s[5]?"DepositTitleNone":"")),e.attr(t,"class","DepositWrapper "+(s[5]?"DepositWrapperMobile":"")),e.set_style(t,"--dynamic-height",s[2])},m(r,u){e.insert(r,t,u),d&&d.m(t,null),e.append(t,a),e.append(t,o),e.append(o,c),e.append(t,m),l.m(t,null),s[19](t)},p(r,[u]){r[5]&&d.p(r,u),u&16&&n!==(n=r[4]("titleDeposit")+"")&&e.set_data(c,n),f===(f=p(r))&&l?l.p(r,u):(l.d(1),l=f(r),l&&(l.c(),l.m(t,null))),u&4&&e.set_style(t,"--dynamic-height",r[2])},i:e.noop,o:e.noop,d(r){r&&e.detach(t),d&&d.d(),l.d(),s[19](null)}}}function q(s,t,a){let o,n;e.component_subscribe(s,e.$format,i=>a(4,n=i));let{endpoint:c=""}=t,{session:m=""}=t,{playerid:d=""}=t,{lang:p="en"}=t,{hasdefaultamount:f=""}=t,{clientstyling:l=""}=t,{clientstylingurl:r=""}=t,{translationurl:u=""}=t,{currency:w=""}=t,{mbsource:D}=t,{shortcashierenabled:g="false"}=t,h,B=window.navigator.userAgent,v=e.getDevice(B)!=="PC",M=!0,k,C,_=0,S="";const P=()=>{fetch(u).then(y=>y.json()).then(y=>{Object.keys(y).forEach(b=>{E(b,y[b])})}).catch(y=>{console.log(y)})};Object.keys(L).forEach(i=>{E(i,L[i])});const x=()=>{window.postMessage({type:"GoToPreviousRoute",isMobile:v},window.location.href)},T=i=>{if(i.data){switch(i.data.type){case"ProfileDetailsData":a(7,w=i.data.profileDetails.currency);break}switch(i.data["MMFE:setQuickDepositHeight"]&&a(2,k=i.data["MMFE:setQuickDepositHeight"].toString()+"px"),i.data["MMFE:openFullCashier"]==="true"&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),i.data.redirect){case"mm-hc-casino":window.postMessage({type:"GoToCasino"},window.location.href);break;case"mm-hc-sports":window.postMessage({type:"GoToSports"},window.location.href);break;case"mm-hc-contact":window.postMessage({type:"GoToCustomerSupport"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href);break;case"mm-hc-back-to-merchant":window.postMessage({type:"GoToHomepage"},window.location.href);break;case"mm-wm-hc-init-deposit":window.postMessage({type:"RedirectWithdrawDepositCloseModal"},window.location.href);break;case"mm-wm-hc-init-deposit-quick":window.postMessage({type:"CloseShortCashier"},window.location.href);break}}},I=()=>{let i=new URL(`${c}/v1/player/${d}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);if(i.searchParams.append("language",p),o&&i.searchParams.append("isShortCashier",g),f)switch(w){case"USD":_=.4;break;case"CDF":_=1e3;break}let y={method:"POST",headers:{"X-SessionId":m,currency:w||"EUR",amount:_,cashierMode:"Default",IsShortCashier:g,accept:"application/json"}};fetch(i.href,y).then(b=>b.json()).then(b=>{a(1,M=!1),a(3,S=b.CashierUrl)},b=>{console.error(b)})},U=()=>{H(p)};e.onMount(()=>(window.addEventListener("message",T,!1),()=>{window.emMessageBus&&C&&C.unsubscribe(),window.removeEventListener("message",T)}));const A=()=>x();function F(i){e.binding_callbacks[i?"unshift":"push"](()=>{h=i,a(0,h)})}return s.$$set=i=>{"endpoint"in i&&a(8,c=i.endpoint),"session"in i&&a(9,m=i.session),"playerid"in i&&a(10,d=i.playerid),"lang"in i&&a(11,p=i.lang),"hasdefaultamount"in i&&a(12,f=i.hasdefaultamount),"clientstyling"in i&&a(13,l=i.clientstyling),"clientstylingurl"in i&&a(14,r=i.clientstylingurl),"translationurl"in i&&a(15,u=i.translationurl),"currency"in i&&a(7,w=i.currency),"mbsource"in i&&a(16,D=i.mbsource),"shortcashierenabled"in i&&a(17,g=i.shortcashierenabled)},s.$$.update=()=>{s.$$.dirty&2048&&p&&U(),s.$$.dirty&131072&&(o=g.toLocaleLowerCase()==="true"),s.$$.dirty&8193&&l&&h&&e.setClientStyling(h,l),s.$$.dirty&16385&&r&&h&&e.setClientStylingURL(h,r),s.$$.dirty&65537&&D&&h&&e.setStreamStyling(h,`${D}.Style`),s.$$.dirty&32768&&u&&P(),s.$$.dirty&135040&&m&&d&&c&&w&&p&&g&&I()},[h,M,k,S,n,v,x,w,c,m,d,p,f,l,r,u,D,g,A,F]}class R extends e.SvelteComponent{constructor(t){super(),e.init(this,t,q,N,e.safe_not_equal,{endpoint:8,session:9,playerid:10,lang:11,hasdefaultamount:12,clientstyling:13,clientstylingurl:14,translationurl:15,currency:7,mbsource:16,shortcashierenabled:17},W)}get endpoint(){return this.$$.ctx[8]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[9]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[11]}set lang(t){this.$$set({lang:t}),e.flush()}get hasdefaultamount(){return this.$$.ctx[12]}set hasdefaultamount(t){this.$$set({hasdefaultamount:t}),e.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get currency(){return this.$$.ctx[7]}set currency(t){this.$$set({currency:t}),e.flush()}get mbsource(){return this.$$.ctx[16]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get shortcashierenabled(){return this.$$.ctx[17]}set shortcashierenabled(t){this.$$set({shortcashierenabled:t}),e.flush()}}e.create_custom_element(R,{endpoint:{},session:{},playerid:{},lang:{},hasdefaultamount:{},clientstyling:{},clientstylingurl:{},translationurl:{},currency:{},mbsource:{},shortcashierenabled:{}},[],[],!0);exports.default=R;
@@ -1,7 +0,0 @@
1
- const s = () => {
2
- }, a = () => {
3
- };
4
- export {
5
- s as a,
6
- a as g
7
- };
@@ -1 +0,0 @@
1
- "use strict";const l=()=>{},s=()=>{};exports.globalScripts=s;exports.globalScripts$1=l;
@@ -1,192 +0,0 @@
1
- "use strict";var x=(e,t,a)=>new Promise((n,l)=>{var i=d=>{try{s(a.next(d))}catch(p){l(p)}},c=d=>{try{s(a.throw(d))}catch(p){l(p)}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,c);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./gamification-dropdown-8eb8a896-cKQI7KOv.cjs"),r=require("./index-71b1bdfa-CpwYbS6b.cjs"),y=require("./locale-DHn5ZpQu.cjs"),o=require("./player-elevate-card-items-66be34fb-CFw6-30L.cjs"),M=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]?t[l]:{};for(let i in n[l])t[l][i]=n[l][i]}),a(!0)})}),R=":host{display:block}",O=R,L=class{constructor(e){r.registerInstance(this,e),this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{a.innerHTML=n,setTimeout(()=>{this.el.prepend(a)},1)}).catch(n=>{console.log("error ",n)})},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}componentWillLoad(){return x(this,null,function*(){const e=[];if(this.translationUrl){const t=M(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return r.h("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},r.h("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return r.getElement(this)}};L.style=O;function m(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var q=864e5;function N(e,t){o.requiredArgs(2,arguments);var a=m(e),n=m(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),i=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-i)/q)}var W=6e4,$=36e5;function E(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var b={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},z="trunc";function w(e){return e?b[e]:b[z]}function U(e,t,a){o.requiredArgs(2,arguments);var n=E(e,t)/$;return w(a==null?void 0:a.roundingMethod)(n)}function F(e,t,a){o.requiredArgs(2,arguments);var n=E(e,t)/W;return w(a==null?void 0:a.roundingMethod)(n)}function j(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function H(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,i=a.getBBox().width,c=t>1?1:t,s=c*i-n<0?0:c*i-n,d=e.querySelector("#current_level"),p=e.querySelector("#filter_current_level"),h=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),d.setAttribute("width",`${s}`),h.setAttribute("cx",`${s<l?l:s}`),p.setAttribute("x",`${s-8}`);const g=e.querySelector("#lock"),S=e.querySelector("#filter_heart_ball"),C=e.querySelector("#filter_ball"),k=e.querySelector("#filter_heart"),T=e.querySelector("#filter_lock"),u=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),A=e.querySelector("#lock_box"),D=e.querySelector("#heart_box"),_=10,v=i-_;g.setAttribute("cx",`${v}`),f.setAttribute("x1",`${v}`),f.setAttribute("x2",`${v}`),u.setAttribute("x1",`${v-6}`),u.setAttribute("x2",`${v-6+11.2}`),T.setAttribute("x",`${v-6}`),k.setAttribute("x",`${v-6-2}`),C.setAttribute("x",`${v-6-2-2}`),S.setAttribute("x",`${v-6-2-2-4}`),A.setAttribute("x",`${v-6}`),D.setAttribute("x",`${v-6}`),a.parentElement.style.opacity="1"}const G=`:host {
2
- display: block;
3
- width: 360px;
4
- height: 230px;
5
- }
6
-
7
- .ElevateCardWrapper {
8
- contain: layout inline-size;
9
- width: 100%;
10
- height: fit-content;
11
- min-height: 218px;
12
- }
13
-
14
- .Outer {
15
- container-type: inline-size;
16
- font-size: 12px;
17
- background-size: cover;
18
- background-repeat: no-repeat;
19
- line-height: initial;
20
- width: 100%;
21
- height: 100%;
22
- }
23
-
24
- .Dark {
25
- color: var(--emw--color-gray150, #efefef);
26
- }
27
-
28
- .Light {
29
- color: var(--emw--color-black, #0e0e0e);
30
- }
31
-
32
- @container (min-width: 381px) {
33
- .Outer {
34
- background-size: cover;
35
- }
36
- .Outer .OuterCover {
37
- min-height: 190px;
38
- }
39
- }
40
- @container (min-width: 260px) {
41
- .Outer {
42
- background-size: contain;
43
- }
44
- }
45
- .OuterCover {
46
- width: 100%;
47
- height: 100%;
48
- content: "";
49
- background-repeat: no-repeat;
50
- background-size: cover;
51
- border-radius: 15px;
52
- }
53
-
54
- .Inner {
55
- display: flex;
56
- flex-direction: column;
57
- min-height: 158px;
58
- }
59
- .Inner .Content {
60
- padding: 15px;
61
- flex-wrap: wrap;
62
- gap: 8px;
63
- }
64
- .Inner .Row {
65
- display: flex;
66
- flex-direction: row;
67
- }
68
- .Inner .CardCell {
69
- display: flex;
70
- }
71
- .Inner .LevelProgress svg {
72
- transition: opacity 0.4s;
73
- }
74
- .Inner .LevelInfo {
75
- display: flex;
76
- flex-direction: column;
77
- }
78
- .Inner .LevelInfo .ElevateLevel .LevelName {
79
- height: 28px;
80
- border-radius: 5px;
81
- line-height: 28px;
82
- overflow: hidden;
83
- text-overflow: ellipsis;
84
- white-space: nowrap;
85
- }
86
- .Inner .LevelInfo.Level0 .ElevateLevel .LevelName {
87
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));
88
- background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);
89
- }
90
- .Inner .LevelInfo.Level1 .ElevateLevel .LevelName {
91
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));
92
- background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);
93
- }
94
- .Inner .LevelInfo.Level2 .ElevateLevel .LevelName {
95
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));
96
- background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);
97
- }
98
- .Inner .LevelInfo.Level3 .ElevateLevel .LevelName {
99
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));
100
- background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);
101
- }
102
- .Inner .LevelInfo.Level4 .ElevateLevel .LevelName {
103
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));
104
- background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);
105
- }
106
- .Inner .LevelInfo .ElevateLevel {
107
- display: flex;
108
- }
109
- .Inner .LevelInfo {
110
- flex: 1;
111
- flex-grow: 1;
112
- min-width: 150px;
113
- }
114
- .Inner .PlayerImg {
115
- width: 29%;
116
- margin: auto;
117
- max-width: 100px;
118
- min-width: 30px;
119
- order: 0;
120
- }
121
- .Inner .PlayerAvatar {
122
- max-width: 100px;
123
- flex-basis: 100px;
124
- height: auto;
125
- margin: auto;
126
- padding-top: 10px;
127
- }
128
- .Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {
129
- width: 100%;
130
- height: 100%;
131
- }
132
- .Inner .PlayerAvatar .Avatar {
133
- border-radius: 50%;
134
- background-size: contain;
135
- background-repeat: no-repeat;
136
- }
137
- .Inner .ElevateLevel .ExpirationDate {
138
- max-width: 138px;
139
- min-width: 118px;
140
- }
141
- .Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {
142
- text-transform: capitalize;
143
- width: 100%;
144
- }
145
- .Inner .PlayerName {
146
- font-size: 16px;
147
- }
148
- .Inner .Row .PointsInfo {
149
- display: table;
150
- font-weight: 600;
151
- }
152
- .Inner .Row .Redeem {
153
- justify-content: flex-end;
154
- margin-left: auto;
155
- }
156
- .Inner .Row .Redeem:hover {
157
- color: var(--emw--elevate-color-redeem-hover, #00ABA4);
158
- cursor: pointer;
159
- }
160
- .Inner .Row .RedeemButton:hover span {
161
- color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);
162
- font-weight: bold;
163
- }
164
- .Inner .Row .RedeemButton {
165
- width: 95px;
166
- height: 35px;
167
- display: flex;
168
- align-items: center;
169
- border-radius: 10px;
170
- background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);
171
- box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);
172
- }
173
- .Inner .Row .RedeemButton span {
174
- color: var(--emw--color-white, #fff);
175
- line-height: 18px;
176
- font-size: 15px;
177
- text-align: center;
178
- width: 100%;
179
- }
180
- .Inner .Row .Points {
181
- font-size: large;
182
- vertical-align: middle;
183
- }
184
- .Inner .Row .Points .XP {
185
- font-size: x-small;
186
- }
187
- .Inner .Row .ExpirationPoints {
188
- font-size: small;
189
- text-align: right;
190
- font-weight: bold;
191
- color: var(--emw--color-red, #9e595f);
192
- }`,X=G,I=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort((s,d)=>j(new Date(s.expireTime),new Date(d.expireTime))?-1:1);const a=e.aboutToExpire[0],n=N(new Date(a.expireTime),new Date);let l=0,i=0,c=n===0?"pointsToBeExpiredDay":"pointsToBeExpired";return n<=0&&(l=U(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=l>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour",l<=0&&(i=F(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=i>1?"pointsToBeExpiredMinutes":"pointsToBeExpiredMinute")),t=y.translateWithParams(c,{expirationPoints:a.points,expireDay:Math.max(n,l,i)}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,i,c;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=((l=s.spendableWallet)===null||l===void 0?void 0:l.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const d=(i=n.data.spendableWallet)===null||i===void 0?void 0:i.total,p=(c=n.data.loyaltyWallet)===null||c===void 0?void 0:c.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:d,loyaltyWalletTotal:p});let h=this.calcuatePointsToBeExpired(d),g=this.calcuatePointsToBeExpired(p);(h||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:g}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){H(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout(()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)},80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,i)=>l.firstEntryPoints>i.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,i)=>{a>l.firstEntryPoints&&(n=i)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};I.style=X;const K=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}",Y=K,P=class{constructor(e){r.registerInstance(this,e),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return y.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=r.getAssetPath("../static/card-ground.svg"),t=r.getAssetPath("../static/card-ground-over.svg");return r.h("div",{key:"39295a651da66747a20554699bba5f96b8ad5c35",class:`ElevateCardWrapper ${this.theme}`},r.h("div",{key:"78c34fe054fc2459f8af3354116cd21a68ce01be",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},r.h("general-styling-wrapper",{key:"be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:y.TRANSLATIONS,translationUrl:this.translationUrl}),r.h("player-elevate-card-data",{key:"b53e4b59d4ee55a2f567efa09afab3d72969e6e4",params:this.paramProxy}),r.h("div",{key:"1f3e504440bab2df3a181058fad7149c85c48c14",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},r.h("div",{key:"a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1",class:"Content Row"},this.playerElevateLevel&&r.h(r.Fragment,{key:"5c104f5ba1a018219c6ed5f6e50af99b035a0344"},r.h("div",{key:"bd94591e6ab9298ab7c769fa48efaf314dc1a63b",class:"PlayerImg"},r.h(o.PlayerAvatar,{key:"928849ce86d8c7a483eba7850efc83f8149bae43",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),r.h("div",{key:"37192c9b8502eb3c7d93914369df2d784c17e9f7",class:`LevelInfo ${this.playerElevateLevel.name}`},r.h(o.PlayerElevateLoyaltyLevel,{key:"2684a177f4bb1053c4587fd4158666fb35ca23f4",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),r.h("div",{key:"173a37c63868f2d900c12af3ffc2d9a4a57550e4",class:"PointsRange"},r.h(o.PlayerPoints,{key:"a7111154f7dc547e0b05c70d24508bdd75c5d882",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),r.h(o.PlayerPoints,{key:"ad31574e7db81a7ecb7a06b28b1d4968cbcab93e",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),r.h(o.PlayerLoyaltyProcess,{key:"88ddfdb326edfb1de9519da6b3d0e5b514725e27"}),r.h("div",{key:"b9c79555a8001bd2c754d7573df04016da235c84",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&r.h("div",{key:"02da725060c9db4a8c1c2e8bad3426894d7f8f2c",class:"PointsInfo ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};P.style=Y;exports.gamification_dropdown=B.GamificationDropdown;exports.general_styling_wrapper=L;exports.player_elevate_card_data=I;exports.player_elevate_loyaltycard=P;