@everymatrix/bonus-elevate-powerups 0.0.38 → 0.0.40

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.
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./index-c7067e6d.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function o(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function a(e,t){if(!e||!t)return;const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function r(e,t,o,a=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!a)return o=function(e,t){const i=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(i.innerHTML=t,e.appendChild(i))}))}(e,t),o;window[i]||(window[i]={}),o=function(e,t){return window.emMessageBus.subscribe(t,(o=>{if(!e)return;const a=e.getRootNode(),r=window[i];let s=r[t]&&r[t].sheet;s?r[t].refCount=r[t].refCount+1:(s=new CSSStyleSheet,s.replaceSync(o),r[t]={sheet:s,refCount:1});const n=a.adoptedStyleSheets||[];n.includes(s)||(a.adoptedStyleSheets=[...n,s])}))}(e,t);const r=o.unsubscribe.bind(o);return o.unsubscribe=()=>{if(window[i][t]){const e=window[i][t];e.refCount>1?e.refCount=e.refCount-1:delete window[i][t]}r()},o}var s,n,l;!function(e){e.COINS="coins",e.XP="xp"}(s||(s={})),function(e){e.TIME_PERIOD="timePeriod",e.NUMBER_OF_ROUNDS="numberOfRounds"}(n||(n={})),function(e){e[e.ACTIVE=0]="ACTIVE",e[e.ACTIVATED=1]="ACTIVATED",e[e.EXPIRED=2]="EXPIRED",e[e.CONSUMED=3]="CONSUMED",e[e.DISABLED=4]="DISABLED",e[e.ENABLED=6]="ENABLED",e[e.ACTIVATING=999]="ACTIVATING"}(l||(l={}));const p={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",expiresIn:"EXPIRES IN ",playNow:"Start Now!",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups at the moment.",gotoShop:"Go to the shop to check power-ups availability.",termsCon:"Read full Terms & Conditions > ",games:"Games",selectGameToActive:"Select the game to activate power-up",days:"days"}},d=e=>new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{p[t]||(p[t]={});for(let i in e[t])p[t][i]=e[t][i]})),t(!0)}))})),w=(e,t,i)=>{let o=p[void 0!==t&&t in p?t:"en"][e];if(void 0!==i)for(const[e,t]of Object.entries(i.values)){const i=new RegExp(`{${e}}`,"g");o=o.replace(i,t)}return o},h={expand:"games",fields:"id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,games(id,gameId,name,slug,thumbnail)",status:`${l.ACTIVE},${l.ACTIVATED}`},c={expand:"games",fields:"id,powerUpID,games(id,gameId,slug,name,thumbnail)"},m=class{constructor(t){e(this,t),this.tableId="powerups",this.gameObservers=new Map,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.openTermsPage=!0,this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0}onReloadPageByType(e){const{limit:t,offset:i,tableId:o}=e.detail;o===this.tableId&&(this.offset=i,this.limit=t)}async loadData(){if(this.endpoint&&this.session){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const e=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit},games(limit=20,offset=0)`);let t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};Object.entries(h).forEach((([t,i])=>{e.searchParams.append(t,i)})),e.searchParams.append("language",this.language);const i=await fetch(e,t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:o,total:a}=await i.json();this.powerups=o,this.total=a}catch(e){"AbortError"!==e.name&&(console.error("Failed to load powerups history:",e),window.postMessage({type:"peHistoryLoaderError",error:e}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}onGameClick(e){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e.slug}})}onTermsUrlClick(e){window.postMessage({type:"onPowerupTermsUrlClicked",termsUrl:e},"*")}async loadMoreGames(e){var t;if(!(e.games.items.length>=e.games.total))try{const i=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${e.games.items.length})`),o={headers:{"x-SessionId":this.session}};i.searchParams.append("filter",`id=${e.powerUpID}`),Object.entries(c).forEach((([e,t])=>{i.searchParams.append(e,t)}));const a=await fetch(i.toString(),o);if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const{data:r}=await a.json(),s=this.powerups.findIndex((t=>t.id===e.id));if(-1!==s){const e=Object.assign({},this.powerups[s]),i=null==r?void 0:r[0];if(i&&(null===(t=i.games)||void 0===t?void 0:t.items)){e.games.items=[...e.games.items,...i.games.items];const t=[...this.powerups];t[s]=e,this.powerups=t}}}catch(e){console.error("Failed to load more games:",e)}}initializeGamesObserver(e){let t=this.gameObservers.get(e.id);t&&t.disconnect(),t=new IntersectionObserver((i=>{i.forEach((i=>{i.isIntersecting&&(this.loadMoreGames(e),t.unobserve(i.target),this.gameObservers.delete(e.id))}))})),this.gameObservers.set(e.id,t),setTimeout((()=>{const i=this.stylingContainer.querySelector(`.PowerUpItem[data-powerup-id="${e.id}"] .Game:last-child`);i&&t.observe(i)}),200)}componentDidUpdate(){this.powerups.forEach((e=>{var t,i;(null===(t=e.games)||void 0===t?void 0:t.items.length)<(null===(i=e.games)||void 0===i?void 0:i.total)&&this.initializeGamesObserver(e)}))}render(){return t("div",{key:"7de60fedad83668fcff2f4a1ea02b489b80d3b12",class:"PowerUpsContainer",ref:e=>this.stylingContainer=e},this.isLoading?t("p",null,"Loading..."):this.total?[t("div",{class:"PowerUps"},this.powerups.map((e=>{var i,o;return t("div",{class:"PowerUpItem Card","data-powerup-id":e.id},t("div",{class:"CardLeft"},t("div",{class:"MainInfo"},t("div",{class:"DisplayName"}," ",e.displayName||"-"," "),t("div",{class:"Title2 PowerUpMultiplier"},t("span",{class:"BoostingPeriod"},t("span",{class:"Period"},e.boostingPeriod.minutes||e.boostingPeriod.numberOfRounds," "),w(e.boostingPeriod.mode===n.TIME_PERIOD?"min":"rounds",this.language)," "),t("span",{class:"Multiplier"},"| X ",e.multiplier.coefficient," "),t("span",{class:"MultiplierMode"},"| ",w(e.multiplier.mode,this.language)," "),e.expireTime&&[t("span",null," | "),t("span",{class:"ExpireCount"},t("time-count",{"expire-time":e.expireTime,language:this.language}))]),t("div",{class:"Description"},e.description)),t("div",{class:"TermsC"},this.openTermsPage?t("a",{href:e.termsUrl?e.termsUrl:"#",target:"_blank"},w("termsCon",this.language)):t("span",{onClick:this.onTermsUrlClick.bind(this,e.termsUrl)},w("termsCon",this.language)," "))),t("div",{class:"GamesContent CardRight"},t("div",{class:"GamesTitle"},t("span",{class:"Title2"}," ",w("games",this.language)),t("span",{class:"GamesAmount"}," ( ",(null===(i=e.games)||void 0===i?void 0:i.total)||0," ) ")),t("div",{class:"GameTitleTip"},w("selectGameToActive",this.language)),t("div",{class:"GamesList"},t("div",{class:"Games"},null===(o=e.games)||void 0===o?void 0:o.items.map((e=>t("div",{class:"Game"},t("ui-image",{src:e.thumbnail}),t("div",{class:"GameMask",onClick:this.onGameClick.bind(this,e)},t("div",{class:"GameStartBtn"},t("div",{class:"PlayIcon"}),t("span",null,w("playNow",this.language)))))))))))}))),t("div",{class:"Pagination"},this.total&&this.total>this.limit&&t("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"secondary-arrows-active":!0,"table-id":this.tableId,total:this.total}))]:t("div",{class:"EmptyPowerups"},t("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,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"/>\n</defs>\n</svg>\n'}),t("span",{class:"NoPowerTitle"},w("nothingHere",this.language)),t("span",null,w("noPowerUps")),t("span",null,w("gotoShop")),t("div",null)))}handleDataConfigChange(){this.loadData().catch(console.error)}handleClientStylingChange(e,t){e!=t&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&r(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){d(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await d(this.translationUrl),this.loadData().catch(console.error)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&r(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.gameObservers.forEach((e=>e.disconnect())),this.gameObservers.clear()}static get assetsDirs(){return["assets"]}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};m.style=':host{display:block;font-family:inherit;--game-amount-line:4}@media screen and (max-width: 768px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:32%}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{padding:8px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{margin:8px}}@media screen and (max-width: 470px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:45%}.PowerUpsContainer .PowerUps .PowerUpItem.Card{max-height:600px;height:fit-content;flex-direction:column}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft{gap:10px;min-width:320px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{height:51%;overflow:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{width:auto;margin:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft .Game,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight .Game{width:45%}}.PowerUpsContainer{font-size:0.95rem;display:flex;flex-direction:column;min-height:300px}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2em;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2em;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{width:100%;gap:12px;display:flex;flex-direction:column}.PowerUpsContainer .PowerUps time-count{margin-left:3px}.PowerUpsContainer .PowerUps .Card{width:100%;max-height:307px;gap:12px;border-radius:12px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .CardLeft,.PowerUpsContainer .PowerUps .Card .CardRight{display:flex;flex-direction:column}.PowerUpsContainer .PowerUps .Card .CardLeft{padding:20px;width:35%;display:flex;min-width:339px;flex-direction:column;justify-content:space-between}.PowerUpsContainer .PowerUps .Card .CardLeft .MainInfo{display:flex;flex-direction:column;gap:12px}.PowerUpsContainer .PowerUps .Card .CardRight{padding:10px}.PowerUpsContainer .PowerUps .Card .Description{color:var(--emw--color-gray-150, #c8d6ce);line-height:1.2rem;flex:1}.PowerUpsContainer .PowerUps .Card .CardLeft .DisplayName{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:22px;gap:12px;font-size:1.11rem}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier{text-transform:uppercase;font-size:0.85em;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Label{text-transform:uppercase}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Highlighted{-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange2, #E0A84E) 100%)}.PowerUpsContainer .PowerUps .Card .CardLeft .ExpireCount,.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{display:inline-block;-webkit-background-clip:text;background-clip:text;color:transparent}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{text-transform:uppercase;background-image:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);font-size:0.8em;font-weight:bold}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC a{color:var(--emw--color-powup-light-green, #18CE51);text-decoration:none}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC span{cursor:pointer}.PowerUpsContainer .PowerUps .Card .GamesContent{margin:20px;flex:1;gap:12px;display:flex;border-radius:8px;border:2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle{display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .Title2{text-transform:capitalize}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .GamesAmount{opacity:0.8}.PowerUpsContainer .PowerUps .Card .GamesContent .GameTitleTip{color:var(--emw--color-powup-gray-green, #C8D6CE);font-size:0.8rem}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList{display:flex;justify-content:center;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{padding:0;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line) - 1))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line));position:relative;min-width:132px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game .GameMask{display:none;transition:display;transition-duration:0.2s;position:absolute;width:70%;height:100%}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .mask-filter{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameStartBtn{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameMask{mix-blend-mode:screen;background-color:var(--emw--color-powup-green, #24B24E);display:flex;justify-content:center;align-items:center;position:absolute;width:100%;left:0;height:100%;top:0;border-radius:8px}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .GameStartBtn{width:98px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, #03832D 0%, #4DC071 100%);border:1px solid #FFFFFF;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.PowerUpsContainer .GameStartBtn .PlayIcon{background-image:url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 11 11" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 1C3.01472 1 1 3.01472 1 5.5C1 7.98528 3.01472 10 5.5 10C7.98528 10 10 7.98528 10 5.5C10 3.01472 7.98528 1 5.5 1ZM0 5.5C0 2.46243 2.46243 0 5.5 0C8.53757 0 11 2.46243 11 5.5C11 8.53757 8.53757 11 5.5 11C2.46243 11 0 8.53757 0 5.5ZM5.12255 3.21652C5.12728 3.21956 5.13199 3.22259 5.13668 3.22561L7.49698 4.74294C7.50129 4.74571 7.50562 4.74849 7.50998 4.75129C7.58551 4.79982 7.66805 4.85285 7.73381 4.90413C7.80355 4.95852 7.91363 5.05446 7.97854 5.20809C8.0574 5.39471 8.0574 5.60529 7.97854 5.79191C7.91363 5.94554 7.80355 6.04148 7.73381 6.09587C7.66805 6.14715 7.58551 6.20018 7.50998 6.24871C7.50562 6.25151 7.50129 6.25429 7.49698 6.25706L5.13668 7.77439C5.13199 7.77741 5.12727 7.78045 5.12255 7.78348C5.03469 7.84 4.9423 7.89941 4.86094 7.94176C4.77909 7.98436 4.63056 8.05332 4.44657 8.04018C4.22957 8.02468 4.02999 7.91572 3.89961 7.74157C3.78907 7.59391 3.76675 7.43167 3.75832 7.33979C3.74995 7.24844 3.74997 7.1386 3.75 7.03414C3.75 7.02852 3.75 7.02292 3.75 7.01733V3.98267C3.75 3.97708 3.75 3.97148 3.75 3.96586C3.74997 3.8614 3.74995 3.75156 3.75832 3.66021C3.76675 3.56833 3.78907 3.40609 3.89961 3.25843C4.02999 3.08428 4.22957 2.97532 4.44657 2.95982C4.63056 2.94668 4.77909 3.01564 4.86094 3.05824C4.94231 3.10059 5.03469 3.16001 5.12255 3.21652ZM4.75 4.16583V6.83417L6.82537 5.5L4.75 4.16583Z" fill="white"/> <path d="M4.75 6.83417V4.16583L6.82537 5.5L4.75 6.83417Z" fill="white"/></svg>\');height:16px;width:16px;background-repeat:no-repeat;background-size:contain}';export{m as B,w as t}
@@ -1,4 +1,4 @@
1
- import{t}from"./bonus-elevate-powerups-0d3660aa.js";export{B as bonus_elevate_powerups}from"./bonus-elevate-powerups-0d3660aa.js";import{r as e,c as n,h as i,H as r,g as s}from"./index-c7067e6d.js";const a=["pt-br","en","es-mx","hu","hr"],o={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},h=(t,e,n)=>{const i=e;let r=o[void 0!==i&&a.includes(i)?i:"en"][t];if(void 0!==n)for(const[t,e]of Object.entries(n.values)){const n=new RegExp(`{${t}}`,"g");r=r.replace(n,e)}return r},u=class{constructor(t){e(this,t),this.reloadPageEmitter=n(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(t){this.limit=t.detail.limit?t.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==t.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(t){"..."==t||0==t||parseInt(t.toString(),10)>this.endPageIndex+1||(this.currentPage=t,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return i("ul",{class:"PaginationArea"},this.pagesArray.map((t=>i("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:o,translationUrl:this.translationUrl})}generateNavItemsByType(t,e){if(this.endPageIndex<t)return Array.from({length:this.endPageIndex+1},((t,e)=>e+1));let n=[],i=Math.floor(t/2);const r=this.endPageIndex+1;return e?this.currentPage<i||this.currentPage>r-i+1?(n=Array.from({length:i},((t,e)=>e+1)),n.push("..."),n=n.concat(Array.from({length:i},((t,e)=>this.endPageIndex-1+e)))):this.currentPage==i?(n=Array.from({length:i+1},((t,e)=>e+1)),n.push("..."),n=n.concat(Array.from({length:i-1},((t,e)=>this.endPageIndex+e)))):this.currentPage==r-i+1?(n=Array.from({length:i-1},((t,e)=>e+1)),n.push("..."),n=n.concat(Array.from({length:i+1},((t,e)=>this.endPageIndex-2+e)))):(n=[1,"..."],n=n.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),n=n.concat(["...",r])):this.currentPage<=t-i?(n=Array.from({length:t-1},((t,e)=>e+1)),n.push("...")):this.currentPage>r-(t-i)?(n=Array.from({length:t-1},((e,n)=>r-(t-2)+n)),n.unshift("...")):(n=Array.from({length:t-2},((t,e)=>this.currentPage+e-i+1)),n.push("..."),n.unshift("...")),n}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return i("div",{key:"77610598f3ce40796b8d486fd27725fc68b61878",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&i("span",{key:"879bd2f268a18ea3c9cb2bb706d23c8db0634592",class:"PageOfMessage"},h("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),i("div",{key:"590af1c2fcb70d782b318c505deb507a8376e13b",class:"PageNavigation"},this.arrowsActive&&i("div",{key:"2d4746e889a43d6199ad7f305676d79bdbaa4f04",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},h("firstPage",this.language)),this.secondaryArrowsActive&&i("span",{key:"89b588abdf7b77e3cdc00f44bbad27c432146f97",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},h("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&i("span",{key:"097710df72de15cd1b0c03dfb2ac7870c99e12c0",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},h("nextPage",this.language)),this.arrowsActive&&i("div",{key:"a61296f3e627bc012545618c0fda239a1356da1f",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",h("lastPage",this.language)," "),this.renderStylingWrapper()))}};
1
+ import{t}from"./bonus-elevate-powerups-a8be6efc.js";export{B as bonus_elevate_powerups}from"./bonus-elevate-powerups-a8be6efc.js";import{r as e,c as n,h as i,H as r,g as s}from"./index-c7067e6d.js";const a=["pt-br","en","es-mx","hu","hr"],o={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},h=(t,e,n)=>{const i=e;let r=o[void 0!==i&&a.includes(i)?i:"en"][t];if(void 0!==n)for(const[t,e]of Object.entries(n.values)){const n=new RegExp(`{${t}}`,"g");r=r.replace(n,e)}return r},u=class{constructor(t){e(this,t),this.reloadPageEmitter=n(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(t){this.limit=t.detail.limit?t.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==t.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(t){"..."==t||0==t||parseInt(t.toString(),10)>this.endPageIndex+1||(this.currentPage=t,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return i("ul",{class:"PaginationArea"},this.pagesArray.map((t=>i("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:o,translationUrl:this.translationUrl})}generateNavItemsByType(t,e){if(this.endPageIndex<t)return Array.from({length:this.endPageIndex+1},((t,e)=>e+1));let n=[],i=Math.floor(t/2);const r=this.endPageIndex+1;return e?this.currentPage<i||this.currentPage>r-i+1?(n=Array.from({length:i},((t,e)=>e+1)),n.push("..."),n=n.concat(Array.from({length:i},((t,e)=>this.endPageIndex-1+e)))):this.currentPage==i?(n=Array.from({length:i+1},((t,e)=>e+1)),n.push("..."),n=n.concat(Array.from({length:i-1},((t,e)=>this.endPageIndex+e)))):this.currentPage==r-i+1?(n=Array.from({length:i-1},((t,e)=>e+1)),n.push("..."),n=n.concat(Array.from({length:i+1},((t,e)=>this.endPageIndex-2+e)))):(n=[1,"..."],n=n.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),n=n.concat(["...",r])):this.currentPage<=t-i?(n=Array.from({length:t-1},((t,e)=>e+1)),n.push("...")):this.currentPage>r-(t-i)?(n=Array.from({length:t-1},((e,n)=>r-(t-2)+n)),n.unshift("...")):(n=Array.from({length:t-2},((t,e)=>this.currentPage+e-i+1)),n.push("..."),n.unshift("...")),n}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return i("div",{key:"77610598f3ce40796b8d486fd27725fc68b61878",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&i("span",{key:"879bd2f268a18ea3c9cb2bb706d23c8db0634592",class:"PageOfMessage"},h("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),i("div",{key:"590af1c2fcb70d782b318c505deb507a8376e13b",class:"PageNavigation"},this.arrowsActive&&i("div",{key:"2d4746e889a43d6199ad7f305676d79bdbaa4f04",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},h("firstPage",this.language)),this.secondaryArrowsActive&&i("span",{key:"89b588abdf7b77e3cdc00f44bbad27c432146f97",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},h("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&i("span",{key:"097710df72de15cd1b0c03dfb2ac7870c99e12c0",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},h("nextPage",this.language)),this.arrowsActive&&i("div",{key:"a61296f3e627bc012545618c0fda239a1356da1f",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",h("lastPage",this.language)," "),this.renderStylingWrapper()))}};
2
2
  //! moment.js
3
3
  //! version : 2.29.4
4
4
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
@@ -1 +1 @@
1
- export{B as BonusElevatePowerups}from"./bonus-elevate-powerups-0d3660aa.js";import"./index-c7067e6d.js";
1
+ export{B as BonusElevatePowerups}from"./bonus-elevate-powerups-a8be6efc.js";import"./index-c7067e6d.js";
@@ -138,6 +138,7 @@ var PowerUpStatus;
138
138
  PowerUpStatus[PowerUpStatus["CONSUMED"] = 3] = "CONSUMED";
139
139
  PowerUpStatus[PowerUpStatus["DISABLED"] = 4] = "DISABLED";
140
140
  PowerUpStatus[PowerUpStatus["ENABLED"] = 6] = "ENABLED";
141
+ PowerUpStatus[PowerUpStatus["ACTIVATING"] = 999] = "ACTIVATING";
141
142
  })(PowerUpStatus || (PowerUpStatus = {}));
142
143
 
143
144
  const DEFAULT_LANGUAGE = 'en';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const bonusElevatePowerups = require('./bonus-elevate-powerups-849d8986.js');
5
+ const bonusElevatePowerups = require('./bonus-elevate-powerups-9143badb.js');
6
6
  const index = require('./index-3dbb4007.js');
7
7
 
8
8
  const DEFAULT_LANGUAGE = 'en';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const bonusElevatePowerups = require('./bonus-elevate-powerups-849d8986.js');
5
+ const bonusElevatePowerups = require('./bonus-elevate-powerups-9143badb.js');
6
6
  require('./index-3dbb4007.js');
7
7
 
8
8
 
@@ -136,6 +136,7 @@ var PowerUpStatus;
136
136
  PowerUpStatus[PowerUpStatus["CONSUMED"] = 3] = "CONSUMED";
137
137
  PowerUpStatus[PowerUpStatus["DISABLED"] = 4] = "DISABLED";
138
138
  PowerUpStatus[PowerUpStatus["ENABLED"] = 6] = "ENABLED";
139
+ PowerUpStatus[PowerUpStatus["ACTIVATING"] = 999] = "ACTIVATING";
139
140
  })(PowerUpStatus || (PowerUpStatus = {}));
140
141
 
141
142
  const DEFAULT_LANGUAGE = 'en';
@@ -1,5 +1,5 @@
1
- import { t as translate$1 } from './bonus-elevate-powerups-0d3660aa.js';
2
- export { B as bonus_elevate_powerups } from './bonus-elevate-powerups-0d3660aa.js';
1
+ import { t as translate$1 } from './bonus-elevate-powerups-a8be6efc.js';
2
+ export { B as bonus_elevate_powerups } from './bonus-elevate-powerups-a8be6efc.js';
3
3
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c7067e6d.js';
4
4
 
5
5
  const DEFAULT_LANGUAGE = 'en';
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { B as BonusElevatePowerups } from './bonus-elevate-powerups-0d3660aa.js';
1
+ export { B as BonusElevatePowerups } from './bonus-elevate-powerups-a8be6efc.js';
2
2
  import './index-c7067e6d.js';
@@ -12,7 +12,8 @@ export declare enum PowerUpStatus {
12
12
  EXPIRED = 2,//'expired',
13
13
  CONSUMED = 3,//'consumed'
14
14
  DISABLED = 4,// 'disabled',
15
- ENABLED = 6
15
+ ENABLED = 6,//'enabled',
16
+ ACTIVATING = 999
16
17
  }
17
18
  export interface PowerUpMultiplier {
18
19
  mode: MultiplierMode | string;
@@ -37,7 +38,6 @@ export interface PowerUp {
37
38
  multiplier: PowerUpMultiplier;
38
39
  boostingPeriod: PowerUpBoostingPeriod;
39
40
  triggerMethod: PowerUpTriggerMethod;
40
- powerUpName?: string;
41
41
  displayName: string;
42
42
  description?: string;
43
43
  validity: number;
@@ -45,6 +45,7 @@ export interface PowerUp {
45
45
  universalID: string;
46
46
  ins?: string;
47
47
  powerUpID?: number;
48
+ powerUpName?: string;
48
49
  currentTime?: string;
49
50
  expireTime?: string;
50
51
  activatedAt?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-elevate-powerups",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./index-c7067e6d.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function o(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function a(e,t){if(!e||!t)return;const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function r(e,t,o,a=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!a)return o=function(e,t){const i=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(i.innerHTML=t,e.appendChild(i))}))}(e,t),o;window[i]||(window[i]={}),o=function(e,t){return window.emMessageBus.subscribe(t,(o=>{if(!e)return;const a=e.getRootNode(),r=window[i];let s=r[t]&&r[t].sheet;s?r[t].refCount=r[t].refCount+1:(s=new CSSStyleSheet,s.replaceSync(o),r[t]={sheet:s,refCount:1});const n=a.adoptedStyleSheets||[];n.includes(s)||(a.adoptedStyleSheets=[...n,s])}))}(e,t);const r=o.unsubscribe.bind(o);return o.unsubscribe=()=>{if(window[i][t]){const e=window[i][t];e.refCount>1?e.refCount=e.refCount-1:delete window[i][t]}r()},o}var s,n,l;!function(e){e.COINS="coins",e.XP="xp"}(s||(s={})),function(e){e.TIME_PERIOD="timePeriod",e.NUMBER_OF_ROUNDS="numberOfRounds"}(n||(n={})),function(e){e[e.ACTIVE=0]="ACTIVE",e[e.ACTIVATED=1]="ACTIVATED",e[e.EXPIRED=2]="EXPIRED",e[e.CONSUMED=3]="CONSUMED",e[e.DISABLED=4]="DISABLED",e[e.ENABLED=6]="ENABLED"}(l||(l={}));const p={en:{min:"MIN",rounds:"Rounds",coins:"Coins",xp:"XP",expiresIn:"EXPIRES IN ",playNow:"Start Now!",nothingHere:"Nothing here -- yet!",noPowerUps:"No power-ups at the moment.",gotoShop:"Go to the shop to check power-ups availability.",termsCon:"Read full Terms & Conditions > ",games:"Games",selectGameToActive:"Select the game to activate power-up",days:"days"}},d=e=>new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{p[t]||(p[t]={});for(let i in e[t])p[t][i]=e[t][i]})),t(!0)}))})),w=(e,t,i)=>{let o=p[void 0!==t&&t in p?t:"en"][e];if(void 0!==i)for(const[e,t]of Object.entries(i.values)){const i=new RegExp(`{${e}}`,"g");o=o.replace(i,t)}return o},h={expand:"games",fields:"id,powerUpID,displayName,termsUrl,description,status,multiplier,boostingPeriod,currentTime,expireTime,games(id,gameId,name,slug,thumbnail)",status:`${l.ACTIVE},${l.ACTIVATED}`},c={expand:"games",fields:"id,powerUpID,games(id,gameId,slug,name,thumbnail)"},m=class{constructor(t){e(this,t),this.tableId="powerups",this.gameObservers=new Map,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.openTermsPage=!0,this.isLoading=!0,this.powerups=[],this.offset=0,this.total=void 0}onReloadPageByType(e){const{limit:t,offset:i,tableId:o}=e.detail;o===this.tableId&&(this.offset=i,this.limit=t)}async loadData(){if(this.endpoint&&this.session){this.isLoading=!0,this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const e=new URL(`${this.endpoint}/v1/elevate/powerups?pagination=offset=${this.offset},limit=${this.limit},games(limit=20,offset=0)`);let t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET",signal:this.abortController.signal};Object.entries(h).forEach((([t,i])=>{e.searchParams.append(t,i)})),e.searchParams.append("language",this.language);const i=await fetch(e,t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:o,total:a}=await i.json();this.powerups=o,this.total=a}catch(e){"AbortError"!==e.name&&(console.error("Failed to load powerups history:",e),window.postMessage({type:"peHistoryLoaderError",error:e}))}finally{this.abortController.signal.aborted||(this.isLoading=!1)}}}onGameClick(e){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e.slug}})}onTermsUrlClick(e){window.postMessage({type:"onPowerupTermsUrlClicked",termsUrl:e},"*")}async loadMoreGames(e){var t;if(!(e.games.items.length>=e.games.total))try{const i=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${e.games.items.length})`),o={headers:{"x-SessionId":this.session}};i.searchParams.append("filter",`id=${e.powerUpID}`),Object.entries(c).forEach((([e,t])=>{i.searchParams.append(e,t)}));const a=await fetch(i.toString(),o);if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const{data:r}=await a.json(),s=this.powerups.findIndex((t=>t.id===e.id));if(-1!==s){const e=Object.assign({},this.powerups[s]),i=null==r?void 0:r[0];if(i&&(null===(t=i.games)||void 0===t?void 0:t.items)){e.games.items=[...e.games.items,...i.games.items];const t=[...this.powerups];t[s]=e,this.powerups=t}}}catch(e){console.error("Failed to load more games:",e)}}initializeGamesObserver(e){let t=this.gameObservers.get(e.id);t&&t.disconnect(),t=new IntersectionObserver((i=>{i.forEach((i=>{i.isIntersecting&&(this.loadMoreGames(e),t.unobserve(i.target),this.gameObservers.delete(e.id))}))})),this.gameObservers.set(e.id,t),setTimeout((()=>{const i=this.stylingContainer.querySelector(`.PowerUpItem[data-powerup-id="${e.id}"] .Game:last-child`);i&&t.observe(i)}),200)}componentDidUpdate(){this.powerups.forEach((e=>{var t,i;(null===(t=e.games)||void 0===t?void 0:t.items.length)<(null===(i=e.games)||void 0===i?void 0:i.total)&&this.initializeGamesObserver(e)}))}render(){return t("div",{key:"7de60fedad83668fcff2f4a1ea02b489b80d3b12",class:"PowerUpsContainer",ref:e=>this.stylingContainer=e},this.isLoading?t("p",null,"Loading..."):this.total?[t("div",{class:"PowerUps"},this.powerups.map((e=>{var i,o;return t("div",{class:"PowerUpItem Card","data-powerup-id":e.id},t("div",{class:"CardLeft"},t("div",{class:"MainInfo"},t("div",{class:"DisplayName"}," ",e.displayName||"-"," "),t("div",{class:"Title2 PowerUpMultiplier"},t("span",{class:"BoostingPeriod"},t("span",{class:"Period"},e.boostingPeriod.minutes||e.boostingPeriod.numberOfRounds," "),w(e.boostingPeriod.mode===n.TIME_PERIOD?"min":"rounds",this.language)," "),t("span",{class:"Multiplier"},"| X ",e.multiplier.coefficient," "),t("span",{class:"MultiplierMode"},"| ",w(e.multiplier.mode,this.language)," "),e.expireTime&&[t("span",null," | "),t("span",{class:"ExpireCount"},t("time-count",{"expire-time":e.expireTime,language:this.language}))]),t("div",{class:"Description"},e.description)),t("div",{class:"TermsC"},this.openTermsPage?t("a",{href:e.termsUrl?e.termsUrl:"#",target:"_blank"},w("termsCon",this.language)):t("span",{onClick:this.onTermsUrlClick.bind(this,e.termsUrl)},w("termsCon",this.language)," "))),t("div",{class:"GamesContent CardRight"},t("div",{class:"GamesTitle"},t("span",{class:"Title2"}," ",w("games",this.language)),t("span",{class:"GamesAmount"}," ( ",(null===(i=e.games)||void 0===i?void 0:i.total)||0," ) ")),t("div",{class:"GameTitleTip"},w("selectGameToActive",this.language)),t("div",{class:"GamesList"},t("div",{class:"Games"},null===(o=e.games)||void 0===o?void 0:o.items.map((e=>t("div",{class:"Game"},t("ui-image",{src:e.thumbnail}),t("div",{class:"GameMask",onClick:this.onGameClick.bind(this,e)},t("div",{class:"GameStartBtn"},t("div",{class:"PlayIcon"}),t("span",null,w("playNow",this.language)))))))))))}))),t("div",{class:"Pagination"},this.total&&this.total>this.limit&&t("bonus-pagination-nav",{offset:this.offset,limit:this.limit,"secondary-arrows-active":!0,"table-id":this.tableId,total:this.total}))]:t("div",{class:"EmptyPowerups"},t("div",{class:"Icon",innerHTML:'<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="52" height="52" fill="url(#pattern0_1132_30534)"/>\n<defs>\n<pattern id="pattern0_1132_30534" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_1132_30534" transform="scale(0.01)"/>\n</pattern>\n<image id="image0_1132_30534" width="100" height="100" preserveAspectRatio="none" xlink:href="data:image/png;base64,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"/>\n</defs>\n</svg>\n'}),t("span",{class:"NoPowerTitle"},w("nothingHere",this.language)),t("span",null,w("noPowerUps")),t("span",null,w("gotoShop")),t("div",null)))}handleDataConfigChange(){this.loadData().catch(console.error)}handleClientStylingChange(e,t){e!=t&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&r(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){d(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await d(this.translationUrl),this.loadData().catch(console.error)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&r(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.abortController&&this.abortController.abort(),this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.gameObservers.forEach((e=>e.disconnect())),this.gameObservers.clear()}static get assetsDirs(){return["assets"]}static get watchers(){return{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};m.style=':host{display:block;font-family:inherit;--game-amount-line:4}@media screen and (max-width: 768px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:32%}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{padding:8px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{margin:8px}}@media screen and (max-width: 470px){.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:45%}.PowerUpsContainer .PowerUps .PowerUpItem.Card{max-height:600px;height:fit-content;flex-direction:column}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft{gap:10px;min-width:320px}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{height:51%;overflow:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight{width:auto;margin:auto}.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardLeft .Game,.PowerUpsContainer .PowerUps .PowerUpItem.Card .CardRight .Game{width:45%}}.PowerUpsContainer{font-size:0.95rem;display:flex;flex-direction:column;min-height:300px}.PowerUpsContainer .EmptyPowerups{align-items:center;justify-content:center;font-weight:400;font-size:1.2em;line-height:24px;text-align:center;vertical-align:middle;width:max-content;margin:auto;display:flex;flex-direction:column;padding:50px}.PowerUpsContainer .EmptyPowerups .Icon,.PowerUpsContainer .EmptyPowerups .NoPowerTitle{text-align:center}.PowerUpsContainer .EmptyPowerups .Icon svg,.PowerUpsContainer .EmptyPowerups .NoPowerTitle svg{width:40px}.PowerUpsContainer .EmptyPowerups .NoPowerTitle{font-size:1.2em;font-weight:bold;margin:10px}.PowerUpsContainer .PowerUps{width:100%;gap:12px;display:flex;flex-direction:column}.PowerUpsContainer .PowerUps time-count{margin-left:3px}.PowerUpsContainer .PowerUps .Card{width:100%;max-height:307px;gap:12px;border-radius:12px;border:2px solid var(--emw--button-border-color-secondary, rgba(188, 252, 177, 0.0509803922));display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .CardLeft,.PowerUpsContainer .PowerUps .Card .CardRight{display:flex;flex-direction:column}.PowerUpsContainer .PowerUps .Card .CardLeft{padding:20px;width:35%;display:flex;min-width:339px;flex-direction:column;justify-content:space-between}.PowerUpsContainer .PowerUps .Card .CardLeft .MainInfo{display:flex;flex-direction:column;gap:12px}.PowerUpsContainer .PowerUps .Card .CardRight{padding:10px}.PowerUpsContainer .PowerUps .Card .Description{color:var(--emw--color-gray-150, #c8d6ce);line-height:1.2rem;flex:1}.PowerUpsContainer .PowerUps .Card .CardLeft .DisplayName{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:22px;gap:12px;font-size:1.11rem}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier{text-transform:uppercase;font-size:0.85em;color:var(--emw--color-gray-dark, #727672)}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Label{text-transform:uppercase}.PowerUpsContainer .PowerUps .Card .CardLeft .PowerUpMultiplier .ExpireCount .Highlighted{-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange2, #E0A84E) 100%)}.PowerUpsContainer .PowerUps .Card .CardLeft .ExpireCount,.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{display:inline-block;-webkit-background-clip:text;background-clip:text;color:transparent}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC{text-transform:uppercase;background-image:linear-gradient(180deg, var(--emw--color-powup-green, #24B24E) 0%, var(--emw--color-powup-light-green, #18CE51) 100%);font-size:0.8em;font-weight:bold}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC a{color:var(--emw--color-powup-light-green, #18CE51);text-decoration:none}.PowerUpsContainer .PowerUps .Card .CardLeft .TermsC span{cursor:pointer}.PowerUpsContainer .PowerUps .Card .GamesContent{margin:20px;flex:1;gap:12px;display:flex;border-radius:8px;border:2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle{display:flex;flex-direction:row}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .Title2{text-transform:capitalize}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesTitle .GamesAmount{opacity:0.8}.PowerUpsContainer .PowerUps .Card .GamesContent .GameTitleTip{color:var(--emw--color-powup-gray-green, #C8D6CE);font-size:0.8rem}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList{display:flex;justify-content:center;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games{padding:0;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-line) - 1))}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-line));position:relative;min-width:132px}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game .GameMask{display:none;transition:display;transition-duration:0.2s;position:absolute;width:70%;height:100%}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .mask-filter{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameStartBtn{opacity:1}.PowerUpsContainer .PowerUps .Card .GamesContent .GamesList .Games .Game:hover .GameMask{mix-blend-mode:screen;background-color:var(--emw--color-powup-green, #24B24E);display:flex;justify-content:center;align-items:center;position:absolute;width:100%;left:0;height:100%;top:0;border-radius:8px}.PowerUpsContainer .Pagination{display:flex;justify-content:center}.PowerUpsContainer .GameStartBtn{width:98px;height:22px;border-radius:8px;opacity:1;padding:4px 5px;background:linear-gradient(180deg, #03832D 0%, #4DC071 100%);border:1px solid #FFFFFF;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.PowerUpsContainer .GameStartBtn .PlayIcon{background-image:url(\'data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 11 11" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 1C3.01472 1 1 3.01472 1 5.5C1 7.98528 3.01472 10 5.5 10C7.98528 10 10 7.98528 10 5.5C10 3.01472 7.98528 1 5.5 1ZM0 5.5C0 2.46243 2.46243 0 5.5 0C8.53757 0 11 2.46243 11 5.5C11 8.53757 8.53757 11 5.5 11C2.46243 11 0 8.53757 0 5.5ZM5.12255 3.21652C5.12728 3.21956 5.13199 3.22259 5.13668 3.22561L7.49698 4.74294C7.50129 4.74571 7.50562 4.74849 7.50998 4.75129C7.58551 4.79982 7.66805 4.85285 7.73381 4.90413C7.80355 4.95852 7.91363 5.05446 7.97854 5.20809C8.0574 5.39471 8.0574 5.60529 7.97854 5.79191C7.91363 5.94554 7.80355 6.04148 7.73381 6.09587C7.66805 6.14715 7.58551 6.20018 7.50998 6.24871C7.50562 6.25151 7.50129 6.25429 7.49698 6.25706L5.13668 7.77439C5.13199 7.77741 5.12727 7.78045 5.12255 7.78348C5.03469 7.84 4.9423 7.89941 4.86094 7.94176C4.77909 7.98436 4.63056 8.05332 4.44657 8.04018C4.22957 8.02468 4.02999 7.91572 3.89961 7.74157C3.78907 7.59391 3.76675 7.43167 3.75832 7.33979C3.74995 7.24844 3.74997 7.1386 3.75 7.03414C3.75 7.02852 3.75 7.02292 3.75 7.01733V3.98267C3.75 3.97708 3.75 3.97148 3.75 3.96586C3.74997 3.8614 3.74995 3.75156 3.75832 3.66021C3.76675 3.56833 3.78907 3.40609 3.89961 3.25843C4.02999 3.08428 4.22957 2.97532 4.44657 2.95982C4.63056 2.94668 4.77909 3.01564 4.86094 3.05824C4.94231 3.10059 5.03469 3.16001 5.12255 3.21652ZM4.75 4.16583V6.83417L6.82537 5.5L4.75 4.16583Z" fill="white"/> <path d="M4.75 6.83417V4.16583L6.82537 5.5L4.75 6.83417Z" fill="white"/></svg>\');height:16px;width:16px;background-repeat:no-repeat;background-size:contain}';export{m as B,w as t}