@everymatrix/casino-winners 1.2.1 → 1.2.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.
package/dist/casino-winners.js
CHANGED
|
@@ -633,7 +633,7 @@ function Bn(e){let t,r,n,i,o,s,a,u,p,m,_,w,T,B,A,H,S,P,C,O,L,I,N,x,M=/*winner*/e
|
|
|
633
633
|
return e[38](/*winner*/e[60])}return{c(){t=d("div"),r=d("div"),n=d("img"),s=y(),a=d("p"),u=b(M),p=y(),m=d("p"),_=b(R),w=y(),T=d("p"),B=b(U),A=y(),H=d("p"),S=b($),P=y(),C=d("span"),O=b(D),L=y(),l(n.src,i=/*winner*/e[60]?.gameModel?.thumbnail)||v(n,"src",i),v(n,"alt",o=/*winner*/e[60]?.gameModel?.thumbnail),v(n,"class","WinnersImage"),v(T,"class","WinnerUsername"),v(r,"class","WinnerCard"),v(t,"class",I="CardWrapper "+(/*addAnimation*/e[13]?"CardWrapperAnimation":""))},m(e,i){h(e,t,i),c(t,r),c(r,n),c(r,s),c(r,a),c(a,u),c(r,p),c(r,m),c(m,_),c(r,w),c(r,T),c(T,B),c(r,A),c(r,H),c(H,S),c(H,P),c(H,C),c(C,O),c(t,L),N||(x=g(n,"click",G),N=!0)},p(r,s){e=r,/*winners*/256&s[0]&&!l(n.src,i=/*winner*/e[60]?.gameModel?.thumbnail)&&v(n,"src",i),/*winners*/256&s[0]&&o!==(o=/*winner*/e[60]?.gameModel?.thumbnail)&&v(n,"alt",o),/*winners*/256&s[0]&&M!==(M=/*winner*/e[60].gameName+"")&&E(u,M),/*winners*/256&s[0]&&R!==(R=/*maskUsername*/e[17](/*winner*/e[60].username)+"")&&E(_,R),/*$_*/32768&s[0]&&U!==(U=/*$_*/e[15]("Translations.won")+"")&&E(B,U),/*winners*/256&s[0]&&$!==($=/*winner*/e[60].specifiedCurrencyAmount.toFixed(2)+"")&&E(S,$),/*isLoggedIn, userCurrency, defaultcurrency*/2068&s[0]&&D!==(D=/*isLoggedIn*/(e[4]?/*userCurrency*/e[11]:/*defaultcurrency*/e[2])+"")&&E(O,D),/*addAnimation*/8192&s[0]&&I!==(I="CardWrapper "+(/*addAnimation*/e[13]?"CardWrapperAnimation":""))&&v(t,"class",I)},d(e){e&&f(t),N=!1,x()}}}function An(t){let r;function n(e,t){/*isLoading*/
|
|
634
634
|
return e[12]?En:vn}let i=n(t),o=i(t);return{c(){r=d("div"),o.c(),this.c=e},m(e,n){h(e,r,n),o.m(r,null),
|
|
635
635
|
/*div_binding*/t[40](r)},p(e,t){i===(i=n(e))&&o?o.p(e,t):(o.d(1),o=i(e),o&&(o.c(),o.m(r,null)))},i:e,o:e,d(e){e&&f(r),o.d(),
|
|
636
|
-
/*div_binding*/t[40](null)}}}function Hn(e,t,r){let n;var i,o;i=or,o=e=>r(15,n=e),e.$$.on_destroy.push(u(i,o));let s,a,l,c,h,f,p,d,m,b,y,{endpoint:g=""}=t,{session:v=""}=t,{periodrecent:E="Today"}=t,{periodtop:_="Last7Days"}=t,{numberusersrecent:w="20"}=t,{numberuserstop:B="20"}=t,{amountlimit:H="1"}=t,{lang:S="en"}=t,{isrecentavailable:P="true"}=t,{istopavailable:C="true"}=t,{defaultcurrency:O=""}=t,{clientstyling:L=""}=t,{clientstylingurl:I=""}=t,{enableautoscroll:N=""}=t,{tabsorder:x=""}=t,{
|
|
636
|
+
/*div_binding*/t[40](null)}}}function Hn(e,t,r){let n;var i,o;i=or,o=e=>r(15,n=e),e.$$.on_destroy.push(u(i,o));let s,a,l,c,h,f,p,d,m,b,y,{endpoint:g=""}=t,{session:v=""}=t,{periodrecent:E="Today"}=t,{periodtop:_="Last7Days"}=t,{numberusersrecent:w="20"}=t,{numberuserstop:B="20"}=t,{amountlimit:H="1"}=t,{lang:S="en"}=t,{isrecentavailable:P="true"}=t,{istopavailable:C="true"}=t,{defaultcurrency:O=""}=t,{clientstyling:L=""}=t,{clientstylingurl:I=""}=t,{enableautoscroll:N=""}=t,{tabsorder:x=""}=t,{translationurl:M=""}=t,R=[],U=0,$=0,D=window.navigator.userAgent,G=!0,F=!1;Object.keys(ar).forEach((e=>{sr(e,ar[e])}));const W=()=>{const e=new URL(`${g}/casino/${a}-winners`);e.searchParams.append("limit","recent"==a?w:B),e.searchParams.append("specifiedCurrency",y),e.searchParams.append("period","recent"==a?E:_),e.searchParams.append("language",S),e.searchParams.append("amountLimit",H),fetch(e.href).then((e=>e.json())).then((e=>{r(8,R=[]),r(8,R=e.items.map((e=>e))),r(12,G=!1),
|
|
637
637
|
// Stupid hacks 'cuz svelte is a pain in the ass sometimes
|
|
638
638
|
setTimeout((()=>{K(),V(),"true"==N&&z()}))}))},k=e=>{a!==e&&(r(7,a=e),r(8,R=[]),W())},j=(e,t,r)=>{window.postMessage({type:"OpenCasinoWinnersGame",gameId:e,launchUrl:t,gameName:r},window.location.href),
|
|
639
639
|
//Analytics event
|
|
@@ -641,5 +641,5 @@ setTimeout((()=>{K(),V(),"true"==N&&z()}))}))},k=e=>{a!==e&&(r(7,a=e),r(8,R=[]),
|
|
|
641
641
|
//Automatic scroll animation rules
|
|
642
642
|
"true"==N&&(U===e-$?U=0:U++),
|
|
643
643
|
//Standard scroll animation rules
|
|
644
|
-
"false"==N&&(U===e-$?U=0:e-$<U+$?U=e-$:U+=$),X())},q=()=>{var e;e=S,Xt.set(e)},J=()=>{(function(e,t){return new Promise(((r,n)=>{let i=new Headers;i.append("X-SessionID",t),Ir(`${e}/player/session/player`,{method:"GET",headers:i}).then((e=>e.json())).then((e=>r(e))).catch((e=>n(e)))}))})(g,v).then((e=>{e.Guid,r(11,f=e.Currency),h=e.UserID,r(4,c=!0)}),(e=>{r(4,c=!1)}))},Q=()=>{r(14,b=x.split(",")),r(7,a=b[0]),"false"==P&&r(21,H=""),r(33,y=c?f:O)};T((()=>(r(10,l=(e=>!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(D)),()=>{clearInterval(m)})));return e.$$set=e=>{"endpoint"in e&&r(22,g=e.endpoint),"session"in e&&r(23,v=e.session),"periodrecent"in e&&r(24,E=e.periodrecent),"periodtop"in e&&r(25,_=e.periodtop),"numberusersrecent"in e&&r(26,w=e.numberusersrecent),"numberuserstop"in e&&r(27,B=e.numberuserstop),"amountlimit"in e&&r(21,H=e.amountlimit),"lang"in e&&r(28,S=e.lang),"isrecentavailable"in e&&r(0,P=e.isrecentavailable),"istopavailable"in e&&r(1,C=e.istopavailable),"defaultcurrency"in e&&r(2,O=e.defaultcurrency),"clientstyling"in e&&r(29,L=e.clientstyling),"clientstylingurl"in e&&r(30,I=e.clientstylingurl),"enableautoscroll"in e&&r(3,N=e.enableautoscroll),"tabsorder"in e&&r(31,x=e.tabsorder),"
|
|
644
|
+
"false"==N&&(U===e-$?U=0:e-$<U+$?U=e-$:U+=$),X())},q=()=>{var e;e=S,Xt.set(e)},J=()=>{(function(e,t){return new Promise(((r,n)=>{let i=new Headers;i.append("X-SessionID",t),Ir(`${e}/player/session/player`,{method:"GET",headers:i}).then((e=>e.json())).then((e=>r(e))).catch((e=>n(e)))}))})(g,v).then((e=>{e.Guid,r(11,f=e.Currency),h=e.UserID,r(4,c=!0)}),(e=>{r(4,c=!1)}))},Q=()=>{r(14,b=x.split(",")),r(7,a=b[0]),"false"==P&&r(21,H=""),r(33,y=c?f:O)};T((()=>(r(10,l=(e=>!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(D)),()=>{clearInterval(m)})));return e.$$set=e=>{"endpoint"in e&&r(22,g=e.endpoint),"session"in e&&r(23,v=e.session),"periodrecent"in e&&r(24,E=e.periodrecent),"periodtop"in e&&r(25,_=e.periodtop),"numberusersrecent"in e&&r(26,w=e.numberusersrecent),"numberuserstop"in e&&r(27,B=e.numberuserstop),"amountlimit"in e&&r(21,H=e.amountlimit),"lang"in e&&r(28,S=e.lang),"isrecentavailable"in e&&r(0,P=e.isrecentavailable),"istopavailable"in e&&r(1,C=e.istopavailable),"defaultcurrency"in e&&r(2,O=e.defaultcurrency),"clientstyling"in e&&r(29,L=e.clientstyling),"clientstylingurl"in e&&r(30,I=e.clientstylingurl),"enableautoscroll"in e&&r(3,N=e.enableautoscroll),"tabsorder"in e&&r(31,x=e.tabsorder),"translationurl"in e&&r(32,M=e.translationurl)},e.$$.update=()=>{/*isrecentavailable, istopavailable, periodrecent, periodtop, numberusersrecent, numberuserstop, amountlimit, lang, isLoggedIn*/522190867&e.$$.dirty[0]|/*tabsorder*/1&e.$$.dirty[1]&&P&&C&&E&&_&&w&&B&&H&&S&&x&&null!=c&&Q(),/*endpoint*/4194304&e.$$.dirty[0]&&g&&J(),/*endpoint, enableautoscroll*/4194312&e.$$.dirty[0]|/*currency*/4&e.$$.dirty[1]&&g&&y&&N&&W(),/*lang*/268435456&e.$$.dirty[0]&&S&&q(),/*translationurl*/2&e.$$.dirty[1]&&M&&fetch(M).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{sr(t,e[t])}))})).catch((e=>{console.log(e)})),/*clientstyling, customStylingContainer*/536870944&e.$$.dirty[0]&&L&&p&&(()=>{let e=document.createElement("style");e.innerHTML=L,p.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/1073741856&e.$$.dirty[0]&&I&&p&&(()=>{let e=new URL(I),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{p.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[P,C,O,N,c,p,s,a,R,$,l,f,G,F,b,n,k,e=>e.slice(0,2)+e.slice(2,-2).replace(/./g,"*")+e.slice(-2),j,Y,Z,H,g,v,E,_,w,B,S,L,I,x,M,y,()=>k("recent"),()=>k("top"),()=>Y(),()=>Z(),e=>j(e.gameId,e.gameModel.launchUrl,e.gameModel.name),function(e){A[e?"unshift":"push"]((()=>{s=e,r(6,s)}))},function(e){A[e?"unshift":"push"]((()=>{p=e,r(5,p)}))}]}class Sn extends ${constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.Off{display:none}.CasinoWinners{background-color:var(--emfe-w-color-contrast, #07072A);width:100%;height:320px;margin:0 auto}.CasinoWinners.Mobile{padding:25px 10px;height:250px}.WinnersHeader{display:flex;justify-content:space-between}.SliderButton{border:1px solid rgba(255, 255, 255, 0.2);border-radius:5px;background-color:rgba(0, 0, 25, 0.2);height:40px;width:40px}.SliderButton.SliderButton:active{transform:translateY(1px)}.WinnerButtonsContainer{display:flex;margin-bottom:42px}.WinnersButton{border:none;background:none;color:var(--emfe-w-color-white, #FFFFFF);font-size:22px;font-weight:500;margin-right:60px;cursor:pointer}.WinnersButton:hover{border-bottom:1px solid var(--emfe-w-color-primary, #D0046C);line-height:40px}.WinnersButton:focus{color:var(--emfe-w-color-primary, #D0046C);line-height:40px}.WinnersButton.Active{border-bottom:2px solid #D0046C;padding-bottom:10px;color:var(--emfe-w-color-primary, #D0046C)}.WinnersButton.Active{border-bottom:1px solid var(--emfe-w-color-primary, #D0046C);color:var(--emfe-w-color-primary, #D0046C);line-height:40px}.ButtonsContainerNone{display:none}.WinnersSlider{display:flex;justify-content:flex-start;position:relative;height:180px;overflow:hidden}.CardWrapper{position:absolute;top:0;left:0}.CardWrapperAnimation{transition:transform 2s}.WinnerCard{border:1px solid rgba(255, 255, 255, 0.2);border-radius:5px;background-color:rgba(0, 0, 25, 0.2);display:flex;align-items:center;flex-direction:column;justify-content:center;gap:4px;height:180px;min-width:191px;margin-bottom:30px;margin-right:30px}.WinnerCard p:first-of-type{color:var(--emfe-w-color-gray-150, #828282);font-size:14px;inline-size:189px;overflow-wrap:break-word;text-align:center}.WinnerCard p:nth-child(3){text-align:center;color:var(--emfe-w-color-gray-100, #E6E6E6);font-size:14px;width:100px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.WinnerCard p:nth-child(4){color:var(--emfe-w-color-gray-100, #E6E6E6);font-size:14px;text-align:center}.WinnerCard p:last-of-type{color:var(--emfe-w-color-primary, #D0046C);font-size:16px}.WinnerCard:hover{border:1px solid rgba(255, 255, 255, 0.4)}.WinnersImage{border-radius:5px;height:54px;margin-bottom:10px;width:80px;cursor:pointer}.Mobile .WinnersHeader{justify-content:flex-start}.Mobile .WinnersButton{font-size:18px;white-space:nowrap;margin-right:40px}.Mobile .WinnersButton.Active{padding-bottom:4px}.Mobile .WinnersSlider{overflow:scroll;overflow-y:hidden;-ms-overflow-style:none;scrollbar-width:none}.Mobile .WinnersSlider::-webkit-scrollbar{display:none}.Mobile .SliderButton{display:none}.Mobile .WinnerCard{width:140px;height:150px;min-width:140px;margin-right:12px}.Mobile .WinnerCard p:first-of-type{font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;width:100px}.Mobile .WinnerCard p:nth-child(3){font-size:10px}.Mobile .WinnerCard p:nth-child(4){font-size:8px;font-weight:300;text-align:center}.Mobile .WinnerCard p:last-of-type{font-size:11px}.Mobile .WinnerButtonsContainer{margin-bottom:20px}</style>",U(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},Hn,An,o,{endpoint:22,session:23,periodrecent:24,periodtop:25,numberusersrecent:26,numberuserstop:27,amountlimit:21,lang:28,isrecentavailable:0,istopavailable:1,defaultcurrency:2,clientstyling:29,clientstylingurl:30,enableautoscroll:3,tabsorder:31,translationurl:32},null,[-1,-1,-1]),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["endpoint","session","periodrecent","periodtop","numberusersrecent","numberuserstop","amountlimit","lang","isrecentavailable","istopavailable","defaultcurrency","clientstyling","clientstylingurl","enableautoscroll","tabsorder","translationurl"]}get endpoint(){return this.$$.ctx[22]}set endpoint(e){this.$$set({endpoint:e}),N()}get session(){return this.$$.ctx[23]}set session(e){this.$$set({session:e}),N()}get periodrecent(){return this.$$.ctx[24]}set periodrecent(e){this.$$set({periodrecent:e}),N()}get periodtop(){return this.$$.ctx[25]}set periodtop(e){this.$$set({periodtop:e}),N()}get numberusersrecent(){return this.$$.ctx[26]}set numberusersrecent(e){this.$$set({numberusersrecent:e}),N()}get numberuserstop(){return this.$$.ctx[27]}set numberuserstop(e){this.$$set({numberuserstop:e}),N()}get amountlimit(){return this.$$.ctx[21]}set amountlimit(e){this.$$set({amountlimit:e}),N()}get lang(){return this.$$.ctx[28]}set lang(e){this.$$set({lang:e}),N()}get isrecentavailable(){return this.$$.ctx[0]}set isrecentavailable(e){this.$$set({isrecentavailable:e}),N()}get istopavailable(){return this.$$.ctx[1]}set istopavailable(e){this.$$set({istopavailable:e}),N()}get defaultcurrency(){return this.$$.ctx[2]}set defaultcurrency(e){this.$$set({defaultcurrency:e}),N()}get clientstyling(){return this.$$.ctx[29]}set clientstyling(e){this.$$set({clientstyling:e}),N()}get clientstylingurl(){return this.$$.ctx[30]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),N()}get enableautoscroll(){return this.$$.ctx[3]}set enableautoscroll(e){this.$$set({enableautoscroll:e}),N()}get tabsorder(){return this.$$.ctx[31]}set tabsorder(e){this.$$set({tabsorder:e}),N()}get translationurl(){return this.$$.ctx[32]}set translationurl(e){this.$$set({translationurl:e}),N()}}return!customElements.get("casino-winners")&&customElements.define("casino-winners",Sn),Sn}));
|
|
645
645
|
//# sourceMappingURL=casino-winners.js.map
|