@betorigami/games 2.1.1 → 2.1.2

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 (2) hide show
  1. package/dist/index.mjs +2 -19
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -57,11 +57,7 @@ var $7=Object.create;var{getPrototypeOf:Q7,defineProperty:f4,getOwnPropertyNames
57
57
  position: absolute;
58
58
  inset: 0;
59
59
  z-index: 9999;
60
- display: flex;
61
- flex-direction: column;
62
- align-items: center;
63
- justify-content: center;
64
- gap: var(--loading-gap, 12px);
60
+ display: var(--loading-overlay-display, none);
65
61
  background: var(--loading-background, var(--background-tertiary, #2F2F2F));
66
62
  transition: transform 0.3s ease-out;
67
63
  will-change: transform;
@@ -78,17 +74,6 @@ var $7=Object.create;var{getPrototypeOf:Q7,defineProperty:f4,getOwnPropertyNames
78
74
  }
79
75
  }
80
76
 
81
- .loading-logo {
82
- width: var(--loading-logo-width, 0px);
83
- height: var(--loading-logo-height, 0px);
84
- background: var(--loading-logo, none) center / contain no-repeat;
85
- }
86
-
87
- .loading-overlay::after {
88
- content: var(--loading-text, none);
89
- color: var(--loading-text-color, var(--primary-text-color, #FFFFFF));
90
- font-size: var(--loading-text-font-size, 16px);
91
- }
92
77
  `;var Mt=20,jt=1,u2=1e6,o5=1e6,qt=-7,Lt=21,At=!1,d0="[big.js] ",d2=d0+"Invalid ",Y0=d2+"decimal places",Jt=d2+"rounding mode",s5=d0+"Division by zero",Z1={},Ha=void 0,Tt=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function h5(){function a(e){var i=this;if(!(i instanceof a))return e===Ha&&arguments.length===0?h5():new a(e);if(e instanceof a)i.s=e.s,i.e=e.e,i.c=e.c.slice();else{if(typeof e!=="string"){if(a.strict===!0&&typeof e!=="bigint")throw TypeError(d2+"value");e=e===0&&1/e<0?"-0":String(e)}Et(i,e)}i.constructor=a}return a.prototype=Z1,a.DP=Mt,a.RM=jt,a.NE=qt,a.PE=Lt,a.strict=At,a.roundDown=0,a.roundHalfUp=1,a.roundHalfEven=2,a.roundUp=3,a}function Et(a,e){var i,r,n;if(!Tt.test(e))throw Error(d2+"number");if(a.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(i=e.indexOf("."))>-1)e=e.replace(".","");if((r=e.search(/e/i))>0){if(i<0)i=r;i+=+e.slice(r+1),e=e.substring(0,r)}else if(i<0)i=e.length;n=e.length;for(r=0;r<n&&e.charAt(r)=="0";)++r;if(r==n)a.c=[a.e=0];else{for(;n>0&&e.charAt(--n)=="0";);a.e=i-r-1,a.c=[];for(i=0;r<=n;)a.c[i++]=+e.charAt(r++)}return a}function c2(a,e,i,r){var n=a.c;if(i===Ha)i=a.constructor.RM;if(i!==0&&i!==1&&i!==2&&i!==3)throw Error(Jt);if(e<1)if(r=i===3&&(r||!!n[0])||e===0&&(i===1&&n[0]>=5||i===2&&(n[0]>5||n[0]===5&&(r||n[1]!==Ha))),n.length=1,r)a.e=a.e-e+1,n[0]=1;else n[0]=a.e=0;else if(e<n.length){if(r=i===1&&n[e]>=5||i===2&&(n[e]>5||n[e]===5&&(r||n[e+1]!==Ha||n[e-1]&1))||i===3&&(r||!!n[0]),n.length=e,r){for(;++n[--e]>9;)if(n[e]=0,e===0){++a.e,n.unshift(1);break}}for(e=n.length;!n[--e];)n.pop()}return a}function f2(a,e,i){var r=a.e,n=a.c.join(""),t=n.length;if(e)n=n.charAt(0)+(t>1?"."+n.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)n="0"+n;n="0."+n}else if(r>0){if(++r>t)for(r-=t;r--;)n+="0";else if(r<t)n=n.slice(0,r)+"."+n.slice(r)}else if(t>1)n=n.charAt(0)+"."+n.slice(1);return a.s<0&&i?"-"+n:n}Z1.abs=function(){var a=new this.constructor(this);return a.s=1,a};Z1.cmp=function(a){var e,i=this,r=i.c,n=(a=new i.constructor(a)).c,t=i.s,l=a.s,o=i.e,s=a.e;if(!r[0]||!n[0])return!r[0]?!n[0]?0:-l:t;if(t!=l)return t;if(e=t<0,o!=s)return o>s^e?1:-1;l=(o=r.length)<(s=n.length)?o:s;for(t=-1;++t<l;)if(r[t]!=n[t])return r[t]>n[t]^e?1:-1;return o==s?0:o>s^e?1:-1};Z1.div=function(a){var e=this,i=e.constructor,r=e.c,n=(a=new i(a)).c,t=e.s==a.s?1:-1,l=i.DP;if(l!==~~l||l<0||l>u2)throw Error(Y0);if(!n[0])throw Error(s5);if(!r[0])return a.s=t,a.c=[a.e=0],a;var o,s,c,d,m,h=n.slice(),f=o=n.length,w=r.length,v=r.slice(0,o),x=v.length,z=a,p=z.c=[],g=0,k=l+(z.e=e.e-a.e)+1;z.s=t,t=k<0?0:k,h.unshift(0);for(;x++<o;)v.push(0);do{for(c=0;c<10;c++){if(o!=(x=v.length))d=o>x?1:-1;else for(m=-1,d=0;++m<o;)if(n[m]!=v[m]){d=n[m]>v[m]?1:-1;break}if(d<0){for(s=x==o?n:h;x;){if(v[--x]<s[x]){m=x;for(;m&&!v[--m];)v[m]=9;--v[m],v[x]+=10}v[x]-=s[x]}for(;!v[0];)v.shift()}else break}if(p[g++]=d?c:++c,v[0]&&d)v[x]=r[f]||0;else v=[r[f]]}while((f++<w||v[0]!==Ha)&&t--);if(!p[0]&&g!=1)p.shift(),z.e--,k--;if(g>k)c2(z,k,i.RM,v[0]!==Ha);return z};Z1.eq=function(a){return this.cmp(a)===0};Z1.gt=function(a){return this.cmp(a)>0};Z1.gte=function(a){return this.cmp(a)>-1};Z1.lt=function(a){return this.cmp(a)<0};Z1.lte=function(a){return this.cmp(a)<1};Z1.minus=Z1.sub=function(a){var e,i,r,n,t=this,l=t.constructor,o=t.s,s=(a=new l(a)).s;if(o!=s)return a.s=-s,t.plus(a);var c=t.c.slice(),d=t.e,m=a.c,h=a.e;if(!c[0]||!m[0]){if(m[0])a.s=-s;else if(c[0])a=new l(t);else a.s=1;return a}if(o=d-h){if(n=o<0)o=-o,r=c;else h=d,r=m;r.reverse();for(s=o;s--;)r.push(0);r.reverse()}else{i=((n=c.length<m.length)?c:m).length;for(o=s=0;s<i;s++)if(c[s]!=m[s]){n=c[s]<m[s];break}}if(n)r=c,c=m,m=r,a.s=-a.s;if((s=(i=m.length)-(e=c.length))>0)for(;s--;)c[e++]=0;for(s=e;i>o;){if(c[--i]<m[i]){for(e=i;e&&!c[--e];)c[e]=9;--c[e],c[i]+=10}c[i]-=m[i]}for(;c[--s]===0;)c.pop();for(;c[0]===0;)c.shift(),--h;if(!c[0])a.s=1,c=[h=0];return a.c=c,a.e=h,a};Z1.mod=function(a){var e,i=this,r=i.constructor,n=i.s,t=(a=new r(a)).s;if(!a.c[0])throw Error(s5);if(i.s=a.s=1,e=a.cmp(i)==1,i.s=n,a.s=t,e)return new r(i);return n=r.DP,t=r.RM,r.DP=r.RM=0,i=i.div(a),r.DP=n,r.RM=t,this.minus(i.times(a))};Z1.neg=function(){var a=new this.constructor(this);return a.s=-a.s,a};Z1.plus=Z1.add=function(a){var e,i,r,n=this,t=n.constructor;if(a=new t(a),n.s!=a.s)return a.s=-a.s,n.minus(a);var{e:l,c:o}=n,s=a.e,c=a.c;if(!o[0]||!c[0]){if(!c[0])if(o[0])a=new t(n);else a.s=n.s;return a}if(o=o.slice(),e=l-s){if(e>0)s=l,r=c;else e=-e,r=o;r.reverse();for(;e--;)r.push(0);r.reverse()}if(o.length-c.length<0)r=c,c=o,o=r;e=c.length;for(i=0;e;o[e]%=10)i=(o[--e]=o[e]+c[e]+i)/10|0;if(i)o.unshift(i),++s;for(e=o.length;o[--e]===0;)o.pop();return a.c=o,a.e=s,a};Z1.pow=function(a){var e=this,i=new e.constructor("1"),r=i,n=a<0;if(a!==~~a||a<-o5||a>o5)throw Error(d2+"exponent");if(n)a=-a;for(;;){if(a&1)r=r.times(e);if(a>>=1,!a)break;e=e.times(e)}return n?i.div(r):r};Z1.prec=function(a,e){if(a!==~~a||a<1||a>u2)throw Error(d2+"precision");return c2(new this.constructor(this),a,e)};Z1.round=function(a,e){if(a===Ha)a=0;else if(a!==~~a||a<-u2||a>u2)throw Error(Y0);return c2(new this.constructor(this),a+this.e+1,e)};Z1.sqrt=function(){var a,e,i,r=this,n=r.constructor,t=r.s,l=r.e,o=new n("0.5");if(!r.c[0])return new n(r);if(t<0)throw Error(d0+"No square root");if(t=Math.sqrt(+f2(r,!0,!0)),t===0||t===1/0){if(e=r.c.join(""),!(e.length+l&1))e+="0";t=Math.sqrt(e),l=((l+1)/2|0)-(l<0||l&1),a=new n((t==1/0?"5e":(t=t.toExponential()).slice(0,t.indexOf("e")+1))+l)}else a=new n(t+"");l=a.e+(n.DP+=4);do i=a,a=o.times(i.plus(r.div(i)));while(i.c.slice(0,l).join("")!==a.c.slice(0,l).join(""));return c2(a,(n.DP-=4)+a.e+1,n.RM)};Z1.times=Z1.mul=function(a){var e,i=this,r=i.constructor,n=i.c,t=(a=new r(a)).c,l=n.length,o=t.length,s=i.e,c=a.e;if(a.s=i.s==a.s?1:-1,!n[0]||!t[0])return a.c=[a.e=0],a;if(a.e=s+c,l<o)e=n,n=t,t=e,c=l,l=o,o=c;for(e=new Array(c=l+o);c--;)e[c]=0;for(s=o;s--;){o=0;for(c=l+s;c>s;)o=e[c]+t[s]*n[c-s-1]+o,e[c--]=o%10,o=o/10|0;e[c]=o}if(o)++a.e;else e.shift();for(s=e.length;!e[--s];)e.pop();return a.c=e,a};Z1.toExponential=function(a,e){var i=this,r=i.c[0];if(a!==Ha){if(a!==~~a||a<0||a>u2)throw Error(Y0);i=c2(new i.constructor(i),++a,e);for(;i.c.length<a;)i.c.push(0)}return f2(i,!0,!!r)};Z1.toFixed=function(a,e){var i=this,r=i.c[0];if(a!==Ha){if(a!==~~a||a<0||a>u2)throw Error(Y0);i=c2(new i.constructor(i),a+i.e+1,e);for(a=a+i.e+1;i.c.length<a;)i.c.push(0)}return f2(i,!1,!!r)};Z1.toJSON=Z1.toString=function(){var a=this,e=a.constructor;return f2(a,a.e<=e.NE||a.e>=e.PE,!!a.c[0])};if(typeof Symbol!=="undefined")Z1[Symbol.for("nodejs.util.inspect.custom")]=Z1.toJSON;Z1.toNumber=function(){var a=+f2(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(a.toString()))throw Error(d0+"Imprecise conversion");return a};Z1.toPrecision=function(a,e){var i=this,r=i.constructor,n=i.c[0];if(a!==Ha){if(a!==~~a||a<1||a>u2)throw Error(d2+"precision");i=c2(new r(i),a,e);for(;i.c.length<a;)i.c.push(0)}return f2(i,a<=i.e||i.e<=r.NE||i.e>=r.PE,!!n)};Z1.valueOf=function(){var a=this,e=a.constructor;if(e.strict===!0)throw Error(d0+"valueOf disallowed");return f2(a,a.e<=e.NE||a.e>=e.PE,!0)};var La=h5(),K=La;class X0 extends X{constructor(){super(...arguments);this.currency=w1;this.balance=n1.balance;this.currencyDecimals=n1.currencyDecimals;this.baseUrl=n1.baseUrl;this.authToken=n1.authToken;this.origamiGame="DICE";this.lobbyUrl=n1.lobbyUrl;this.depositUrl=n1.depositUrl;this.maxPayout=n1.maxPayout;this.minBet=n1.minBet;this.maxBet=n1.maxBet;this.edge=n1.edge;this.showCurrencyAsText=!1;this.footerPosition=n1.footerPosition;this.logoUrl=null;this.seasonTheme="DEFAULT";this.alwaysEnableMaxBetButton=n1.alwaysEnableMaxBetButton;this.gcCurrencyIconSvgUrl=n1.gcCurrencyIconSvgUrl;this.scCurrencyIconSvgUrl=n1.scCurrencyIconSvgUrl;this.customMinesBackgroundSvgUrl=n1.customMinesBackgroundSvgUrl;this.customMinesGemSvgUrl=n1.customMinesGemSvgUrl;this.customMinesBombSvgUrl=n1.customMinesBombSvgUrl;this.customMinesTileSvgUrl=n1.customMinesTileSvgUrl;this.customMinesAutobetSelectedTileSvgUrl=n1.customMinesAutobetSelectedTileSvgUrl;this.customKenoBackgroundSvgUrl=n1.customKenoBackgroundSvgUrl;this.customKenoGemSvgUrl=n1.customKenoGemSvgUrl;this.customKenoNonMatchTileSvgUrl=n1.customKenoNonMatchTileSvgUrl;this.customKenoTileSvgUrl=n1.customKenoTileSvgUrl;this.customKenoSelectedTileSvgUrl=n1.customKenoSelectedTileSvgUrl;this.customRouletteBackgroundSvgUrl=n1.customRouletteBackgroundSvgUrl;this.roulettePreventOppositeBets=n1.roulettePreventOppositeBets;this.rouletteDefaultInstantBet=!1;this.customDiceBackgroundSvgUrl=n1.customDiceBackgroundSvgUrl;this.diceMinMultiplier=n1.diceMinMultiplier;this.advancedDiceMinMultiplier=n1.advancedDiceMinMultiplier;this.customAdvancedDiceBackgroundSvgUrl=n1.customAdvancedDiceBackgroundSvgUrl;this.customPlinkoBackgroundSvgUrl=n1.customPlinkoBackgroundSvgUrl;this.customPlinkoEdgeColor=n1.customPlinkoEdgeColor;this.customPlinkoCenterColor=n1.customPlinkoCenterColor;this.customBaccaratBackgroundSvgUrl=n1.customBaccaratBackgroundSvgUrl;this.customBaccaratCardBackSvgUrl=n1.customBaccaratCardBackSvgUrl;this.baccaratPreventOppositeBets=n1.baccaratPreventOppositeBets;this.customLimboBackgroundSvgUrl=n1.customLimboBackgroundSvgUrl;this.customWheelBackgroundSvgUrl=n1.customWheelBackgroundSvgUrl;this.customWheelCenterSvgUrl=n1.customWheelCenterSvgUrl;this.customWheelCenterPadding=n1.customWheelCenterPadding;this.customDiamondsBackgroundSvgUrl=n1.customDiamondsBackgroundSvgUrl;this.customBlackjackBackgroundSvgUrl=n1.customBlackjackBackgroundSvgUrl;this.customCardBackSvgUrl=n1.customCardBackSvgUrl;this.customFooterLobbySvgUrl=n1.customFooterLobbySvgUrl;this.customFooterVolumeSvgUrl=n1.customFooterVolumeSvgUrl;this.customFooterGameInfoSvgUrl=n1.customFooterGameInfoSvgUrl;this.customFooterInstantBetSvgUrl=n1.customFooterInstantBetSvgUrl;this.customFooterHotkeysSvgUrl=n1.customFooterHotkeysSvgUrl;this.customFooterProvablyFairSvgUrl=n1.customFooterProvablyFairSvgUrl;this.betAmount=n1.betAmount;this.autobetNumberOfBets=n1.autobetNumberOfBets;this.hotkeysOpenEnabled=!1;this.showMaxBetButton=n1.showMaxBetButton;this.volume=n1.volume;this.instantBetEnabled=n1.instantBetEnabled;this.mainWidth=n1.mainWidth;this.publicKey=n1.publicKey;this.scale=1;this.language=n1.language;this.hasLoadedBalance=!1}static styles=[l5];_soundEffects=new d3(this);_historyController=new u3(this);_haptics=new h3(this);_resizeObserver=null;_gameProvider=new t2(this,{context:P,initialValue:this.createGameContextValue()});connectedCallback(){if(super.connectedCallback(),this.rouletteDefaultInstantBet&&this.origamiGame==="ROULETTE")this.instantBetEnabled=!0;this.updateProviderValue(),this.fetchBalance(),this.fetchPublicKey(),this.setupResizeObserver(),this.calculateScale(),this.updateMainWidth(document.documentElement.clientWidth)}async firstUpdated(a){if(super.firstUpdated(a),await this.updateComplete,!T4.includes(this.origamiGame))this.updateBetAmount(K(this.minBet??0))}disconnectedCallback(){super.disconnectedCallback(),this.cleanupResizeObserver(),this._soundEffects.destroy(),this._haptics.destroy()}updated(a){if(super.updated(a),a.has("currency")||a.has("balance")||a.has("baseUrl")||a.has("showCurrencyAsText")||a.has("authToken")||a.has("hotkeysOpenEnabled")||a.has("volume")||a.has("instantBetEnabled")||a.has("showMaxBetButton")||a.has("mainWidth")||a.has("footerPosition")||a.has("logoUrl")||a.has("scale")||a.has("seasonTheme")||a.has("customMinesGemSvgUrl")||a.has("customMinesBombSvgUrl")||a.has("customKenoGemSvgUrl")||a.has("edge")||a.has("language")||a.has("maxPayout")||a.has("minBet")||a.has("maxBet")||a.has("depositUrl")||a.has("currencyDecimals")||a.has("lobbyUrl")||a.has("roulettePreventOppositeBets")||a.has("alwaysEnableMaxBetButton")||a.has("gcCurrencyIconSvgUrl")||a.has("scCurrencyIconSvgUrl")||a.has("customMinesBackgroundSvgUrl")||a.has("customMinesTileSvgUrl")||a.has("customMinesAutobetSelectedTileSvgUrl")||a.has("customKenoBackgroundSvgUrl")||a.has("customKenoNonMatchTileSvgUrl")||a.has("customKenoTileSvgUrl")||a.has("customKenoSelectedTileSvgUrl")||a.has("customRouletteBackgroundSvgUrl")||a.has("customDiceBackgroundSvgUrl")||a.has("diceMinMultiplier")||a.has("advancedDiceMinMultiplier")||a.has("customAdvancedDiceBackgroundSvgUrl")||a.has("customPlinkoBackgroundSvgUrl")||a.has("customPlinkoEdgeColor")||a.has("customPlinkoCenterColor")||a.has("customBaccaratBackgroundSvgUrl")||a.has("customBaccaratCardBackSvgUrl")||a.has("baccaratPreventOppositeBets")||a.has("customLimboBackgroundSvgUrl")||a.has("customWheelBackgroundSvgUrl")||a.has("customWheelCenterSvgUrl")||a.has("customWheelCenterPadding")||a.has("customDiamondsBackgroundSvgUrl")||a.has("customBlackjackBackgroundSvgUrl")||a.has("customCardBackSvgUrl")||a.has("customFooterLobbySvgUrl")||a.has("customFooterVolumeSvgUrl")||a.has("customFooterGameInfoSvgUrl")||a.has("customFooterInstantBetSvgUrl")||a.has("customFooterHotkeysSvgUrl")||a.has("customFooterProvablyFairSvgUrl"))this.updateProviderValue()}get gameData(){return this._gameProvider.value}createGameContextValue(){return{betAmount:this.betAmount,updateBetAmount:this.updateBetAmount.bind(this),updateBalance:this.updateBalance.bind(this),currency:this.currency,showCurrencyAsText:this.showCurrencyAsText,currencyDecimals:this.currencyDecimals,lobbyUrl:this.lobbyUrl,depositUrl:this.depositUrl,maxPayout:this.maxPayout,minBet:this.minBet,maxBet:this.maxBet,edge:this.edge,balance:this.balance,hasLoadedBalance:this.hasLoadedBalance,baseUrl:this.baseUrl,authToken:this.authToken,publicKey:this.publicKey,autobetNumberOfBets:this.autobetNumberOfBets,hotkeysOpenEnabled:this.hotkeysOpenEnabled,showMaxBetButton:this.showMaxBetButton,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundEffects:this._soundEffects,historyController:this._historyController,haptics:this._haptics,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateShowMaxBetButton:this.updateShowMaxBetButton.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),mainWidth:this.mainWidth,updateMainWidth:this.updateMainWidth.bind(this),language:this.language,footerPosition:this.footerPosition,logoUrl:this.logoUrl,scale:this.scale,seasonTheme:this.seasonTheme,alwaysEnableMaxBetButton:this.alwaysEnableMaxBetButton,gcCurrencyIconSvgUrl:this.gcCurrencyIconSvgUrl,scCurrencyIconSvgUrl:this.scCurrencyIconSvgUrl,customMinesBackgroundSvgUrl:this.customMinesBackgroundSvgUrl,customMinesGemSvgUrl:this.customMinesGemSvgUrl,customMinesBombSvgUrl:this.customMinesBombSvgUrl,customMinesTileSvgUrl:this.customMinesTileSvgUrl,customMinesAutobetSelectedTileSvgUrl:this.customMinesAutobetSelectedTileSvgUrl,customKenoBackgroundSvgUrl:this.customKenoBackgroundSvgUrl,customKenoGemSvgUrl:this.customKenoGemSvgUrl,customKenoNonMatchTileSvgUrl:this.customKenoNonMatchTileSvgUrl,customKenoTileSvgUrl:this.customKenoTileSvgUrl,customKenoSelectedTileSvgUrl:this.customKenoSelectedTileSvgUrl,customRouletteBackgroundSvgUrl:this.customRouletteBackgroundSvgUrl,roulettePreventOppositeBets:this.roulettePreventOppositeBets,customDiceBackgroundSvgUrl:this.customDiceBackgroundSvgUrl,diceMinMultiplier:this.diceMinMultiplier,advancedDiceMinMultiplier:this.advancedDiceMinMultiplier,customAdvancedDiceBackgroundSvgUrl:this.customAdvancedDiceBackgroundSvgUrl,customPlinkoBackgroundSvgUrl:this.customPlinkoBackgroundSvgUrl,customPlinkoEdgeColor:this.customPlinkoEdgeColor,customPlinkoCenterColor:this.customPlinkoCenterColor,customBaccaratBackgroundSvgUrl:this.customBaccaratBackgroundSvgUrl,customBaccaratCardBackSvgUrl:this.customBaccaratCardBackSvgUrl,baccaratPreventOppositeBets:this.baccaratPreventOppositeBets,customLimboBackgroundSvgUrl:this.customLimboBackgroundSvgUrl,customWheelBackgroundSvgUrl:this.customWheelBackgroundSvgUrl,customWheelCenterSvgUrl:this.customWheelCenterSvgUrl,customWheelCenterPadding:this.customWheelCenterPadding,customDiamondsBackgroundSvgUrl:this.customDiamondsBackgroundSvgUrl,customBlackjackBackgroundSvgUrl:this.customBlackjackBackgroundSvgUrl,customCardBackSvgUrl:this.customCardBackSvgUrl,customFooterLobbySvgUrl:this.customFooterLobbySvgUrl,customFooterVolumeSvgUrl:this.customFooterVolumeSvgUrl,customFooterGameInfoSvgUrl:this.customFooterGameInfoSvgUrl,customFooterInstantBetSvgUrl:this.customFooterInstantBetSvgUrl,customFooterHotkeysSvgUrl:this.customFooterHotkeysSvgUrl,customFooterProvablyFairSvgUrl:this.customFooterProvablyFairSvgUrl}}updateProviderValue(){this._gameProvider.setValue(this.createGameContextValue())}fetchBalance=async()=>{if(!this.authToken||!this.baseUrl){this.balance=1000,this.hasLoadedBalance=!0,this.updateProviderValue();return}try{let a=await fetch(`${this.baseUrl}/users/balance?currency=${this.currency}&origamiGame=${this.origamiGame}`,{headers:{Authorization:`Bearer ${this.authToken}`,"Content-Type":"application/json"}});if(!a.ok){console.error("Failed to fetch balance:",a.statusText),this.hasLoadedBalance=!0;return}let e=await a.json();this.balance=K(e.balance).toNumber(),this.hasLoadedBalance=!0,this.updateProviderValue()}catch(a){console.error("Error fetching balance:",a),this.hasLoadedBalance=!0}};fetchPublicKey=async()=>{if(!this.authToken||!this.baseUrl)return;let a=await fetch(`${this.baseUrl}/provably-fair/public-key`);if(!a.ok){console.error("Failed to fetch public key:",a.statusText);return}let e=await a.json();this.publicKey=e.publicKey};updateHotkeysOpenEnabled(a){this.hotkeysOpenEnabled=a,this.updateProviderValue()}updateShowMaxBetButton(a){this.showMaxBetButton=a,this.updateProviderValue()}updateVolume(a){this.volume=a,this._soundEffects.setVolume(a/100),this.updateProviderValue()}updateInstantBetEnabled(a){this.instantBetEnabled=a,this.updateProviderValue()}updateAutobetNumberOfBets(a){this.autobetNumberOfBets=a,this.updateProviderValue()}updateMainWidth(a){this.mainWidth=a,this.updateProviderValue()}updateBetAmount(a){if(a.lt(0)){this.betAmount="0";return}let e=a.toFixed(this.currencyDecimals);this.betAmount=e,this.updateProviderValue()}updateBalance(a){if(a.lt(0)){this.balance=0;return}this.balance=a.toNumber(),this.updateProviderValue()}_boundCalculateScale=this.calculateScale.bind(this);setupResizeObserver(){if(typeof ResizeObserver!=="undefined")this._resizeObserver=new ResizeObserver(()=>{this.calculateScale(),this.gameData.updateMainWidth(document.documentElement.clientWidth)}),this._resizeObserver.observe(document.body);else window.addEventListener("resize",this._boundCalculateScale)}cleanupResizeObserver(){if(this._resizeObserver)this._resizeObserver.disconnect(),this._resizeObserver=null;else window.removeEventListener("resize",this._boundCalculateScale)}calculateScale(){let a=document.documentElement.clientWidth,e=document.documentElement.clientHeight,i=1200,r=675;if(a/e>1.7777777777777777){let t=e/675;this.scale=t}else{let t=a/1200;this.scale=t}this.requestUpdate()}render(){let a=(()=>{switch(this.origamiGame){case"DICE":return R`<origami-dice-game></origami-dice-game>`;case"KENO":return R`<origami-keno-game></origami-keno-game>`;case"MINES":return R`<origami-mines-game></origami-mines-game>`;case"LIMBO":return R`<origami-limbo-game></origami-limbo-game>`;case"ADVANCED_DICE":return R`<origami-advanced-dice-game></origami-advanced-dice-game>`;case"PLINKO":return R`<origami-plinko-game></origami-plinko-game>`;case"DIAMONDS":return R`<origami-diamonds-game></origami-diamonds-game>`;case"WHEEL":return R`<origami-wheel-game></origami-wheel-game>`;case"ROULETTE":return R`<origami-roulette-game></origami-roulette-game>`;case"BACCARAT":return R`<origami-baccarat-game></origami-baccarat-game>`;default:this.origamiGame}})(),e=`
93
78
  position: absolute;
94
79
  top: 0%;
@@ -100,9 +85,7 @@ var $7=Object.create;var{getPrototypeOf:Q7,defineProperty:f4,getOwnPropertyNames
100
85
  transform: translate(0%, 0%);
101
86
  `;return R`
102
87
  <div style=${this.gameData.mainWidth>=768?e:""}>${a}</div>
103
- <div class=${B({"loading-overlay":!0,loaded:this.hasLoadedBalance})}>
104
- <div class="loading-logo"></div>
105
- </div>
88
+ <div class=${B({"loading-overlay":!0,loaded:this.hasLoadedBalance})}></div>
106
89
  `}}u([b({type:String})],X0.prototype,"currency",void 0),u([b({type:Number})],X0.prototype,"balance",void 0),u([b({type:Number})],X0.prototype,"currencyDecimals",void 0),u([b({type:String})],X0.prototype,"baseUrl",void 0),u([b({type:String})],X0.prototype,"authToken",void 0),u([b({type:String})],X0.prototype,"origamiGame",void 0),u([b({type:String})],X0.prototype,"lobbyUrl",void 0),u([b({type:String})],X0.prototype,"depositUrl",void 0),u([b({type:Number})],X0.prototype,"maxPayout",void 0),u([b({type:Number})],X0.prototype,"minBet",void 0),u([b({type:Number})],X0.prototype,"maxBet",void 0),u([b({type:Number})],X0.prototype,"edge",void 0),u([b({type:Boolean})],X0.prototype,"showCurrencyAsText",void 0),u([b({type:String})],X0.prototype,"footerPosition",void 0),u([b({type:String})],X0.prototype,"logoUrl",void 0),u([b({type:String})],X0.prototype,"seasonTheme",void 0),u([b({type:Boolean})],X0.prototype,"alwaysEnableMaxBetButton",void 0),u([b({type:String})],X0.prototype,"gcCurrencyIconSvgUrl",void 0),u([b({type:String})],X0.prototype,"scCurrencyIconSvgUrl",void 0),u([b({type:String})],X0.prototype,"customMinesBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customMinesGemSvgUrl",void 0),u([b({type:String})],X0.prototype,"customMinesBombSvgUrl",void 0),u([b({type:String})],X0.prototype,"customMinesTileSvgUrl",void 0),u([b({type:String})],X0.prototype,"customMinesAutobetSelectedTileSvgUrl",void 0),u([b({type:String})],X0.prototype,"customKenoBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customKenoGemSvgUrl",void 0),u([b({type:String})],X0.prototype,"customKenoNonMatchTileSvgUrl",void 0),u([b({type:String})],X0.prototype,"customKenoTileSvgUrl",void 0),u([b({type:String})],X0.prototype,"customKenoSelectedTileSvgUrl",void 0),u([b({type:String})],X0.prototype,"customRouletteBackgroundSvgUrl",void 0),u([b({type:Boolean})],X0.prototype,"roulettePreventOppositeBets",void 0),u([b({type:Boolean})],X0.prototype,"rouletteDefaultInstantBet",void 0),u([b({type:String})],X0.prototype,"customDiceBackgroundSvgUrl",void 0),u([b({type:Number})],X0.prototype,"diceMinMultiplier",void 0),u([b({type:Number})],X0.prototype,"advancedDiceMinMultiplier",void 0),u([b({type:String})],X0.prototype,"customAdvancedDiceBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customPlinkoBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customPlinkoEdgeColor",void 0),u([b({type:String})],X0.prototype,"customPlinkoCenterColor",void 0),u([b({type:String})],X0.prototype,"customBaccaratBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customBaccaratCardBackSvgUrl",void 0),u([b({type:Boolean})],X0.prototype,"baccaratPreventOppositeBets",void 0),u([b({type:String})],X0.prototype,"customLimboBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customWheelBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customWheelCenterSvgUrl",void 0),u([b({type:Number})],X0.prototype,"customWheelCenterPadding",void 0),u([b({type:String})],X0.prototype,"customDiamondsBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customBlackjackBackgroundSvgUrl",void 0),u([b({type:String})],X0.prototype,"customCardBackSvgUrl",void 0),u([b({type:String})],X0.prototype,"customFooterLobbySvgUrl",void 0),u([b({type:String})],X0.prototype,"customFooterVolumeSvgUrl",void 0),u([b({type:String})],X0.prototype,"customFooterGameInfoSvgUrl",void 0),u([b({type:String})],X0.prototype,"customFooterInstantBetSvgUrl",void 0),u([b({type:String})],X0.prototype,"customFooterHotkeysSvgUrl",void 0),u([b({type:String})],X0.prototype,"customFooterProvablyFairSvgUrl",void 0),u([q()],X0.prototype,"betAmount",void 0),u([q()],X0.prototype,"autobetNumberOfBets",void 0),u([q()],X0.prototype,"hotkeysOpenEnabled",void 0),u([q()],X0.prototype,"showMaxBetButton",void 0),u([q()],X0.prototype,"volume",void 0),u([q()],X0.prototype,"instantBetEnabled",void 0),u([q()],X0.prototype,"mainWidth",void 0),u([q()],X0.prototype,"publicKey",void 0),u([q()],X0.prototype,"scale",void 0),u([b()],X0.prototype,"language",void 0),u([q()],X0.prototype,"hasLoadedBalance",void 0),X0=u([E("origami-game-provider-wrapper")],X0);var u5=$`
107
90
  :host {
108
91
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betorigami/games",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",