@everymatrix/bonus-elevate-powerups-lobby 0.0.16 → 0.0.18

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 t,h as e}from"./index-64ff3a3a.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function s(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function o(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function n(t,e,s,o=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!o)return s=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),s;window[i]||(window[i]={}),s=function(t,e){return window.emMessageBus.subscribe(e,(s=>{if(!t)return;const o=t.getRootNode(),n=window[i];let a=n[e]&&n[e].sheet;a?n[e].refCount=n[e].refCount+1:(a=new CSSStyleSheet,a.replaceSync(s),n[e]={sheet:a,refCount:1});const r=o.adoptedStyleSheets||[];r.includes(a)||(o.adoptedStyleSheets=[...r,a])}))}(t,e);const n=s.unsubscribe.bind(s);return s.unsubscribe=()=>{if(window[i][e]){const t=window[i][e];t.refCount>1?t.refCount=t.refCount-1:delete window[i][e]}n()},s}const a={en:{history:"History",available:"Available"}},r=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{a[e]||(a[e]={});for(let i in t[e])a[e][i]=t[e][i]})),e(!0)}))})),l=(t,e,i)=>{let s=a[void 0!==e&&e in a?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s};var c,h,d;!function(t){t.COINS="coins",t.XP="xp"}(c||(c={})),function(t){t.TIME_PERIOD="timePeriod",t.NUMBER_OF_ROUNDS="numberOfRounds"}(h||(h={})),function(t){t[t.ACTIVE=0]="ACTIVE",t[t.ACTIVATED=1]="ACTIVATED",t[t.EXPIRED=2]="EXPIRED",t[t.CONSUMED=3]="CONSUMED",t[t.DISABLED=4]="DISABLED",t[t.ENABLED=6]="ENABLED"}(d||(d={}));const b=class{constructor(e){t(this,e),this.tabsInfo={available:{tabId:"available",offset:0,limit:this.limit},history:{tabId:"history",offset:0,limit:this.limit}},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.language="en",this.endpoint=void 0,this.session=void 0,this.limit=10,this.activeTab=this.tabsInfo.available.tabId}onTabClick(t){this.activeTab=t}render(){return e("div",{key:"d02a197df9729b803c63fc618d2ce6acefca9237",class:"PowerUpsLobby",ref:t=>this.stylingContainer=t},e("div",{key:"e6a44cfe64a887aca6d23ad6cc57462639ee3631",class:"TabTitle"},e("span",{key:"09644cd28e50adbaf43347f01c08a6f6a8874c89",class:"Tab TabItem "+("available"===this.activeTab?"Active":""),onClick:this.onTabClick.bind(this,"available")},l("available",this.language)),e("span",{key:"6fc8efd978827391122130b5ea899071634003a8",class:"Tab TabItem "+("history"===this.activeTab?"Active":""),onClick:this.onTabClick.bind(this,"history")},l("history",this.language))),e("div",{key:"48a5e6a3291904f3113fa4903d3231ff59be3dd0",class:"Desc"}," ",c.XP," "),e("div",{key:"b918a55f179d1f64cf605df4ca47d93e3a6dba17",class:"TabContent"},"available"===this.activeTab&&e("bonus-elevate-powerups",{key:"f0d346fcafb0d6451fca43ec566b519173791e32",endpoint:this.endpoint,session:this.session,language:this.language,"mb-source":this.mbSource,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,limit:this.limit}),"history"===this.activeTab&&e("bonus-elevate-powerups-history",{key:"f01b6a1fed3455735bab4fe406fa05ae6c84ac00",endpoint:this.endpoint,session:this.session,language:this.language,"mb-source":this.mbSource,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,limit:this.limit})))}handleClientStylingChange(t,e){t!=e&&s(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}handleNewTranslations(){r(this.translationUrl)}async componentWillLoad(){this.translationUrl&&await r(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};b.style=':host{display:block}.PowerUpsLobby{padding:10px}.PowerUpsLobby .Desc{display:none !important}.PowerUpsLobby .TabItem{position:relative;cursor:pointer;padding:10px 20px;border-bottom:2px solid transparent}.PowerUpsLobby .TabItem::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background-image:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);transform:scaleX(0)}.PowerUpsLobby .TabItem.Active::after{transform:scaleX(1)}.PowerUpsLobby .TabTitle{display:flex;flex-direction:row;text-transform:uppercase}.PowerUpsLobby .TabTitle .Tab{flex:1;padding:10px 20px;text-align:center;cursor:pointer}.PowerUpsLobby .TabTitle .Active1{border-bottom:2px solid;border-image-source:linear-gradient(180deg, var(--emw--color-powup-orange1, #EA9018) 0%, var(--emw--color-powup-orange1, #E0A84E) 100%);border-image-slice:1}.PowerUpsLobby .TabContent{margin-top:20px}';export{b as B,d as P,h as a,o as b,n as c,s}
@@ -1 +1 @@
1
- import{p as e,b as a}from"./index-64ff3a3a.js";export{s as setNonce}from"./index-64ff3a3a.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const a=import.meta.url,n={};return""!==a&&(n.resourcesUrl=new URL(".",a).href),e(n)})().then((async e=>(await n(),a([["bonus-elevate-powerups_7",[[1,"bonus-elevate-powerups-lobby",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],endpoint:[513],session:[513],pageSize:[514,"page-size"],activeTab:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}],[1,"bonus-elevate-powerups",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],endpoint:[513],session:[513],pageSize:[514,"page-size"],isLoading:[32],powerups:[32],offset:[32],limit:[32],total:[32]},[[8,"reloadPageByType","onReloadPageByType"]],{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"bonus-elevate-powerups-history",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],endpoint:[513],session:[513],pageSize:[514,"page-size"],translationUrl:[513,"translation-url"],isLoading:[32],powerups:[32],offset:[32],limit:[32],total:[32]},[[8,"reloadPageByType","onReloadPageByType"]],{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData"],endpoint:["loadData"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}],[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}],[0,"time-count",{expireTime:[1,"expire-time"],displayTime:[32]},null,{expireTime:["startTimeChanged"]}],[0,"bonus-pagination-nav",{total:[1538],limit:[1538],offset:[1538],tableId:[1537,"table-id"],language:[1537],translationUrl:[513,"translation-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],displayPageNumbers:[1540,"display-page-numbers"],displayRangeOfTotal:[1540,"display-range-of-total"],navItemAccount:[1538,"nav-item-account"],endPageIndex:[32],pagesArray:[32],currentPage:[32],showAsEllipsisMid:[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],e))));
1
+ import{p as e,b as a}from"./index-64ff3a3a.js";export{s as setNonce}from"./index-64ff3a3a.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const a=import.meta.url,n={};return""!==a&&(n.resourcesUrl=new URL(".",a).href),e(n)})().then((async e=>(await n(),a([["bonus-elevate-powerups_7",[[1,"bonus-elevate-powerups-lobby",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],endpoint:[513],session:[513],limit:[1538],activeTab:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}],[1,"bonus-elevate-powerups",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],endpoint:[513],session:[513],limit:[1538],openTermsPage:[4,"open-terms-page"],isLoading:[32],powerups:[32],offset:[32],total:[32]},[[8,"reloadPageByType","onReloadPageByType"]],{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData","handleDataConfigChange"],endpoint:["loadData","handleDataConfigChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}],[1,"bonus-elevate-powerups-history",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],endpoint:[513],session:[513],limit:[514],translationUrl:[513,"translation-url"],isLoading:[32],powerups:[32],offset:[32],total:[32]},[[8,"reloadPageByType","onReloadPageByType"]],{offset:["loadData"],limit:["loadData"],language:["loadData"],session:["loadData"],endpoint:["loadData"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}],[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}],[0,"time-count",{expireTime:[1,"expire-time"],language:[1],displayTime:[32],isExpireInDay1:[32]},null,{expireTime:["startTimeChanged"]}],[0,"bonus-pagination-nav",{total:[1538],limit:[1538],offset:[1538],tableId:[1537,"table-id"],language:[1537],translationUrl:[513,"translation-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],displayPageNumbers:[1540,"display-page-numbers"],displayRangeOfTotal:[1540,"display-range-of-total"],navItemAccount:[1538,"nav-item-account"],endPageIndex:[32],pagesArray:[32],currentPage:[32],showAsEllipsisMid:[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],e))));