@everymatrix/bonus-elevate-shop 1.69.2 → 1.70.0
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/bonus-elevate-shop/bonus-elevate-shop.esm.js +1 -1
- package/dist/bonus-elevate-shop/bonus-elevate-shop_5.entry.js +1 -1
- package/dist/bonus-elevate-shop/player-elevate-card.entry.js +1 -1
- package/dist/bonus-elevate-shop/player-elevate-loyaltycard.entry.js +1 -1
- package/dist/bonus-elevate-shop/player-rakeback-card.entry.js +1 -1
- package/dist/cjs/bonus-elevate-shop.cjs.js +1 -1
- package/dist/cjs/bonus-elevate-shop_5.cjs.entry.js +98 -26
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/player-elevate-card.cjs.entry.js +2 -1
- package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +2 -2
- package/dist/cjs/player-rakeback-card.cjs.entry.js +2 -1
- package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.js +19 -1
- package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.stories.js +4 -0
- package/dist/esm/bonus-elevate-shop.js +1 -1
- package/dist/esm/bonus-elevate-shop_5.entry.js +98 -26
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-elevate-card.entry.js +2 -1
- package/dist/esm/player-elevate-loyaltycard.entry.js +2 -2
- package/dist/esm/player-rakeback-card.entry.js +2 -1
- package/dist/types/components/bonus-elevate-shop/bonus-elevate-shop.d.ts +2 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./index-4bbe8850.js";export{s as setNonce}from"./index-4bbe8850.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-shop_5",[[1,"bonus-elevate-shop",{session:[513],endpoint:[513],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],limit:[1538],navItemAccount:[514,"nav-item-account"],pageLimitOptions:[1537,"page-limit-options"],locale:[32],gifts:[32],total:[32],offset:[32],shopListId:[32],isLoading:[32],pageLimitSelectOptions:[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{endpoint:["onPropsChange"],language:["onPropsChange"],session:["onPropsChange"]}],[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],e))));
|
|
1
|
+
import{p as e,b as a}from"./index-4bbe8850.js";export{s as setNonce}from"./index-4bbe8850.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-shop_5",[[1,"bonus-elevate-shop",{session:[513],endpoint:[513],language:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],limit:[1538],navItemAccount:[514,"nav-item-account"],pageLimitOptions:[1537,"page-limit-options"],locale:[32],gifts:[32],total:[32],offset:[32],shopListId:[32],isLoading:[32],pageLimitSelectOptions:[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{endpoint:["onPropsChange"],language:["onPropsChange"],session:["onPropsChange"]}],[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],mbSource:[513,"mb-source"],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],targetTranslations:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as n,g as i,a,F as r}from"./index-4bbe8850.js";import{t as s,T as o,a as l}from"./locale.utils-34e6f004.js";import{r as d,t as h,g as c,P as g,a as p}from"./player-elevate-card-items-d0cd4d5f.js";async function v(e,t={},n={}){const{endpoint:i,language:a,session:r}=this,s=t;n.method&&"GET"!==n.method||(s.language=a);const o=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(`${i}${e}`,s);n.headers||(n.headers={}),n.headers["x-SessionId"]=r;const l=await(async(e,t={})=>{let n;n=await fetch(e,t),n=await n.text();try{n=JSON.parse(n)}catch(e){console.error(e)}return n})(o,n);return l}const f={en:{Points:"Coins",Point:"Coin",loading:"Loading",noContent:"No Content",redeemGift:"Redeem Gift",perPage:"Per Page"}},b=(t,n,i)=>e("div",{class:"Gifts FlexLayout"},t.map((t=>{var a;const r=((e,t)=>{switch(e.available){case"true":return{extraClass:" active",onClick:()=>t(e.id)};case"false":return{extraClass:" deactive",onClick:()=>{}}}})(t,i),s=t.presentation;return e("div",{class:"Gift"},e("div",{class:"ImgContainer",onClick:()=>window.postMessage({type:"BEEShopImgClicked",itemId:t.id},window.location.href),style:Object.assign({},(o=(null===(a=s.assets)||void 0===a?void 0:a.length)>0?s.assets[0]:"",o?{backgroundImage:`url('${o}')`}:{}))}),e("div",{class:"InfoContainer"},e("div",null,e("div",{class:"Point"},t.points," ",1===t.points?n.Point:n.Points),e("div",{class:"Title"},(null==s?void 0:s.displayName)||t.displayName),e("div",{class:"Description"},(null==s?void 0:s.description)||"")),e("div",{class:`AvaliableWrap RedeemButton ${r.extraClass}`,onClick:r.onClick},n.redeemGift)));var o}))),u=class{constructor(e){t(this,e),this.redeemGiftButton=n(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.isInitialized=!1,this.session=void 0,this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.limit=10,this.navItemAccount=5,this.pageLimitOptions="10,25,50",this.locale=f.en,this.gifts=[],this.total=0,this.offset=0,this.shopListId="elevateShopList",this.isLoading=!0,this.pageLimitSelectOptions=[]}async onPropsChange(){this.isInitialized&&this.updateGifts()}async updateGifts(){if(this.isLoading=!0,this.session){const{data:e,total:t}=await v.bind(this,"/v1/elevate/shop",{pagination:`offset=${this.offset},limit=${this.limit}`}).call();this.gifts=e||[],this.total=t}else this.gifts=[],this.total=0;this.isLoading=!1}redeemGiftConfirm(e){const t=this.gifts.filter((t=>t.id===e))[0];window.postMessage({type:"BEERedeemConfirm",shopItem:t},window.location.href)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}async redeemGift(e){const t=await v.bind(this,"/v1/elevate/redeem",{},{method:"PUT",body:JSON.stringify({giftID:e}),headers:{"Content-Type":"application/json-patch+json"}}).call();t.success?(this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:e},window.location.href)):window.postMessage({type:"BEEGiftRedeemFailed",itemId:e,err:t},window.location.href)}loadGifts(t){return this.isLoading?e("div",{class:"Loading"},this.locale.loading):0===this.gifts.length?e("div",{class:"NoContent"},this.locale.noContent):t()}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}onPageLimitChangedHandler(e){var t;this.isInitialized&&"pageLimits"===(null===(t=e.detail)||void 0===t?void 0:t.name)&&(this.limit=parseInt(e.detail.value||"10"),this.offset=0,this.updateGifts())}reloadPageByTypeHandler(e){var t;if((null===(t=e.detail)||void 0===t?void 0:t.tableId)!=this.shopListId)return;const{limit:n,offset:i}=e.detail;this.limit=n,this.offset=i||0,this.updateGifts()}componentWillLoad(){this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((e=>({label:e,value:e})))}componentWillRender(){this.locale=Object.assign(Object.assign({},f.en),f[this.language])}render(){return e("main",{key:"6d6a73aabf26cb760a43dd4b05a3f189f6bc97fc",class:"MainContainer"},e("general-styling-wrapper",{key:"2f2961c1612020e2e191551eaf603db72f268e68",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:f,translationUrl:this.translationUrl}),e("player-elevate-pointcard",{key:"a9a972b2e9927a8b8727c7912f37f65241f2511a",endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),this.loadGifts(b.bind(this,this.gifts,this.locale,this.redeemGiftConfirm.bind(this))),e("div",{key:"acab31501081a5857af319035933178c717a2cd2",class:"ShopBottom"},e("bonus-pagination-nav",{key:"e5ebf819bb213652cbeed247a0669d7f8cfdcc06",total:this.total,offset:this.offset,limit:this.limit,tableId:this.shopListId,"nav-item-account":7,arrowsActive:!1,"display-page-numbers":"true"}),e("general-input",{key:"5a16c30bbc86e6577a2ded5e123709039af5665a",type:"dropdown",name:"pageLimits",displayName:this.locale.perPage,defaultValue:this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language,"client-styling-url":this.clientStylingUrl})))}handleMessage(e){"bee-redeem-confirmed"===e.data.type&&e.data.id&&this.redeemGift(e.data.id)}async componentDidLoad(){this.updateGifts(),this.isInitialized=!0,window.addEventListener("message",this.bindedHandler,!1)}static get assetsDirs(){return["static"]}static get watchers(){return{endpoint:["onPropsChange"],language:["onPropsChange"],session:["onPropsChange"]}}};u.style=":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.MainContainer .ShopBottom{display:flex;flex-direction:row;justify-content:space-between}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between;flex-direction:column}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emw--color-black-150, rgba(167, 167, 167, 0.2));border-radius:11px;background:var(--emw--color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emw--color-black-200, rgba(0, 0, 0, 0.2509803922));cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emw--color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emw--elevate-avaliable-button-size, 46px)}.RedeemButton{width:100%;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px)}.RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.RedeemButton.deactive{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.NoContent{font-size:16px;color:var(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";const x=["pt-br","en","es-mx","hu","hr"],m={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}"}},w=(e,t,n)=>{const i=t;let a=m[void 0!==i&&x.includes(i)?i:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");a=a.replace(n,t)}return a},y=class{constructor(e){t(this,e),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(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||parseInt(e.toString(),10)>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return e("ul",{class:"PaginationArea"},this.pagesArray.map((t=>e("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return e("general-styling-wrapper",{targetTranslations:m,translationUrl:this.translationUrl})}generateNavItemsByType(e,t){if(this.endPageIndex<e)return Array.from({length:this.endPageIndex+1},((e,t)=>t+1));let n=[],i=Math.floor(e/2);const a=this.endPageIndex+1;return t?this.currentPage<i||this.currentPage>a-i+1?(n=Array.from({length:i},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i},((e,t)=>this.endPageIndex-1+t)))):this.currentPage==i?(n=Array.from({length:i+1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i-1},((e,t)=>this.endPageIndex+t)))):this.currentPage==a-i+1?(n=Array.from({length:i-1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i+1},((e,t)=>this.endPageIndex-2+t)))):(n=[1,"..."],n=n.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),n=n.concat(["...",a])):this.currentPage<i-1?(n=Array.from({length:e-1},((e,t)=>t+1)),n.push("...")):this.endPageIndex-this.currentPage<i+1?(n=Array.from({length:e-1},((e,t)=>this.endPageIndex-i+t)),n.unshift("...")):(n=Array.from({length:i+1},((e,t)=>this.currentPage+t-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 e("div",{key:"aa8d14788833b1b0e13ea20943935b03a3b043ac",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&e("span",{key:"a018261b6c598116829d878b8120aee7ae2576c4",class:"PageOfMessage"},w("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}})),e("div",{key:"64fc17d0b992b30a4b8d712e47442ee6a2d44b82",class:"PageNavigation"},this.arrowsActive&&e("div",{key:"f5f3b562fbdfb9e4b39ffd9755e5dba41e6231ba",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},w("firstPage",this.language)),this.secondaryArrowsActive&&e("span",{key:"39222e258f6c63502bfd3914c673d804edc96b53",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},w("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&e("span",{key:"d6f9a1394debdae49702713ccc59bea710ccd7ae",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},w("nextPage",this.language)),this.arrowsActive&&e("div",{key:"d2bb76f9d40fcfc3dbc6bb5fbfe6d237e77f0ee6",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",w("lastPage",this.language)," "),this.renderStylingWrapper()))}};y.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const P=class{constructor(e){t(this,e),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const i=(t=this.translationUrl,n=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{n[e]=n[e]||n.en,Object.keys(t[e]).forEach((i=>{n.en[i]&&(n[e][i]=n[e][i]||n.en[i],"object"==typeof t[e][i]?Object.keys(t[e][i]).forEach((a=>{n[e][i][a]=t[e][i][a]})):n[e][i]=t[e][i])}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(i)}var t,n;return await Promise.all(e)}render(){return e("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},e("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return i(this)}};function k(e){d(1,arguments);var t=h(e);return t.setHours(0,0,0,0),t}function I(e,t){return d(2,arguments),h(e).getTime()-h(t).getTime()}P.style=":host{display:block}";var C={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function L(e){return e?C[e]:C.trunc}const E=class{constructor(e){t(this,e),this.playerElevateLeveLoaded=n(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{n(e)}))))}calcuatePointsToBeExpired(e,t){let n="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return n;e.aboutToExpire.sort(((e,t)=>function(e,t){d(2,arguments);var n=h(e),i=h(t);return n.getTime()<i.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const i=e.aboutToExpire[0],a=function(e,t){d(2,arguments);var n=k(e),i=k(t),a=n.getTime()-c(n),r=i.getTime()-c(i);return Math.round((a-r)/864e5)}(new Date(i.expireTime),new Date);let r=0,o=0,l=0===a?`${t}Day`:t;return a<=0&&(r=function(e,t,n){d(2,arguments);var i=I(e,t)/36e5;return L(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=r>1?`${t}Hours`:`${t}Hour`,r<=0&&(o=function(e,t,n){d(2,arguments);var i=I(e,t)/6e4;return L(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${t}Minutes`:`${t}Minute`)),n=s(l,{expirationPoints:i.points,expireDay:Math.max(a,r,o),lang:this.params.language}),n}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var i,a,r;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void n(!0);let s=e.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(i=s.spendableWallet)||void 0===i?void 0:i.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(a=e.data.spendableWallet)||void 0===a?void 0:a.total,l=null===(r=e.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:l});let d=this.calcuatePointsToBeExpired(o,"coinsToBeExpired"),h=this.calcuatePointsToBeExpired(l,"pointsToBeExpired");(d||h)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:h}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),n(!0)}))))}setLoyaltyProgress(e){!function(e,t){const n=e.querySelector("#total_level"),i=n.getBBox().width,a=t>1?1:t,r=a*i-17<0?0:a*i-17,s=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),l=e.querySelector("#circle_current_level");n.setAttribute("viewbox",`0 0 ${r} 28`),s.setAttribute("width",`${r}`),l.setAttribute("cx",`${r<6.5?6.5:r}`),o.setAttribute("x",""+(r-8));const d=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),c=e.querySelector("#filter_ball"),g=e.querySelector("#filter_heart"),p=e.querySelector("#filter_lock"),v=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),u=e.querySelector("#heart_box"),x=i-10;d.setAttribute("cx",`${x}`),f.setAttribute("x1",`${x}`),f.setAttribute("x2",`${x}`),v.setAttribute("x1",""+(x-6)),v.setAttribute("x2",""+(x-6+11.2)),p.setAttribute("x",""+(x-6)),g.setAttribute("x",""+(x-6-2)),c.setAttribute("x",""+(x-6-2-2)),h.setAttribute("x",""+(x-6-2-2-4)),b.setAttribute("x",""+(x-6)),u.setAttribute("x",""+(x-6)),n.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach(((e,i)=>{t>e.firstEntryPoints&&(n=i)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return i(this)}static get watchers(){return{params:["onParamsChanged"]}}};E.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emw--elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: var(--emw--border-radius-medium, 10px);\n background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emw--color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emw--color-red, #9e595f);\n}';const A=class{constructor(e){t(this,e),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const t=a("../static/card-ground.svg"),n=a("../static/card-ground-over.svg");return e("div",{key:"ab47a39fc8fa5562e2843755b6b935296f6952fd",class:`ElevateCardWrapper ${this.theme}`},e("div",{key:"8b9ce754eb082af8005b40915e9b2e861ec99287",class:"PointsCard Outer ",style:{backgroundImage:`url(${t}`}},e("general-styling-wrapper",{key:"f7d660116db83ce86b36a558441bf02bf74592e6",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl}),e("player-elevate-card-data",{key:"f42375d3631031e7ef8041ccabe62659858e6ac0",params:this.paramProxy}),e("div",{key:"0b5eb08baa589ed85c96e0c5731ea7d93c76d398",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},e("div",{key:"3b66d8f8baa7c510c04a6ebe73ba87fc1ba33426",class:"Content Row"},this.playerElevateLevel&&e(r,{key:"fa0f8a796e0d08f18bd37ab193f1e6a49d6138b5"},e("div",{key:"ffe65be1e5d9f04a2c3711e9f61f56c95818244b",class:"PlayerImg"},e(g,{key:"4947af0ebd6978f938d5f3f0185f8700a3506b75",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),e("div",{key:"2f0a7c4ef826f16472313cca974b4c208c33e83a",class:`LevelInfo ${this.playerElevateLevel.name}`},e("div",{key:"118eabd6511b72fbb7c78a0ee2d190b719d708ae",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:l("spendablePoints",this.language)),e("div",{key:"5a15d9630c51f23024ddd5967ef8753bac746936",class:"PointsTxt SPPoints"},e(p,{key:"7994e6b898d69a62ec8c4aeb0892a1c718104d7e",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),e("a",{key:"8d25c48516245dc067676278cd861193ca4863bd",class:"TC",onClick:()=>{this.onDetailsClick()}},l("termAndConditions",this.language))),this.pointExpireString&&e("div",{key:"6c221bd9a75643bce76e493addbb45cee6edf8b9",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};A.style=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";export{u as bonus_elevate_shop,y as bonus_pagination_nav,P as general_styling_wrapper,E as player_elevate_card_data,A as player_elevate_pointcard}
|
|
1
|
+
import{h as e,r as t,c as n,g as i,a,F as r}from"./index-4bbe8850.js";import{t as s,T as o,a as l}from"./locale.utils-34e6f004.js";import{r as d,t as h,g as c,P as g,a as p}from"./player-elevate-card-items-d0cd4d5f.js";async function v(e,t={},n={}){const{endpoint:i,language:a,session:r}=this,s=t;n.method&&"GET"!==n.method||(s.language=a);const o=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(`${i}${e}`,s);n.headers||(n.headers={}),n.headers["x-SessionId"]=r;const l=await(async(e,t={})=>{let n;n=await fetch(e,t),n=await n.text();try{n=JSON.parse(n)}catch(e){console.error(e)}return n})(o,n);return l}const f={en:{Points:"Coins",Point:"Coin",loading:"Loading",noContent:"No Content",redeemGift:"Redeem Gift",perPage:"Per Page"}},b=(t,n,i)=>e("div",{class:"Gifts FlexLayout"},t.map((t=>{var a;const r=((e,t)=>{switch(e.available){case"true":return{extraClass:" active",onClick:()=>t(e.id)};case"false":return{extraClass:" deactive",onClick:()=>{}}}})(t,i),s=t.presentation;return e("div",{class:"Gift"},e("div",{class:"ImgContainer",onClick:()=>window.postMessage({type:"BEEShopImgClicked",itemId:t.id},window.location.href),style:Object.assign({},(o=(null===(a=s.assets)||void 0===a?void 0:a.length)>0?s.assets[0]:"",o?{backgroundImage:`url('${o}')`}:{}))}),e("div",{class:"InfoContainer"},e("div",null,e("div",{class:"Point"},t.points," ",1===t.points?n.Point:n.Points),e("div",{class:"Title"},(null==s?void 0:s.displayName)||t.displayName),e("div",{class:"Description"},(null==s?void 0:s.description)||"")),e("div",{class:`AvaliableWrap RedeemButton ${r.extraClass}`,onClick:r.onClick},n.redeemGift)));var o}))),u=class{constructor(e){t(this,e),this.redeemGiftButton=n(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.isInitialized=!1,this.session=void 0,this.endpoint=void 0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.limit=10,this.navItemAccount=5,this.pageLimitOptions="10,25,50",this.locale=f.en,this.gifts=[],this.total=0,this.offset=0,this.shopListId="elevateShopList",this.isLoading=!0,this.pageLimitSelectOptions=[]}async onPropsChange(){this.isInitialized&&this.updateGifts()}async updateGifts(){if(this.isLoading=!0,this.session){const{data:e,total:t}=await v.bind(this,"/v1/elevate/shop",{pagination:`offset=${this.offset},limit=${this.limit}`}).call();this.gifts=e||[],this.total=t}else this.gifts=[],this.total=0;this.isLoading=!1}redeemGiftConfirm(e){const t=this.gifts.filter((t=>t.id===e))[0];window.postMessage({type:"BEERedeemConfirm",shopItem:t},window.location.href)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}async redeemGift(e){const t=await v.bind(this,"/v1/elevate/redeem",{},{method:"PUT",body:JSON.stringify({giftID:e}),headers:{"Content-Type":"application/json-patch+json"}}).call();t.success?(this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:e},window.location.href)):window.postMessage({type:"BEEGiftRedeemFailed",itemId:e,err:t},window.location.href)}loadGifts(t){return this.isLoading?e("div",{class:"Loading"},this.locale.loading):0===this.gifts.length?e("div",{class:"NoContent"},this.locale.noContent):t()}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}onPageLimitChangedHandler(e){var t;this.isInitialized&&"pageLimits"===(null===(t=e.detail)||void 0===t?void 0:t.name)&&(this.limit=parseInt(e.detail.value||"10"),this.offset=0,this.updateGifts())}reloadPageByTypeHandler(e){var t;if((null===(t=e.detail)||void 0===t?void 0:t.tableId)!=this.shopListId)return;const{limit:n,offset:i}=e.detail;this.limit=n,this.offset=i||0,this.updateGifts()}componentWillLoad(){this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((e=>({label:e,value:e})))}componentWillRender(){this.locale=Object.assign(Object.assign({},f.en),f[this.language])}render(){return e("main",{key:"b3500b7f2d9ce92a6516f34d9e589538f888900a",class:"MainContainer"},e("general-styling-wrapper",{key:"038ebd20a7676c1f2c44fa5decf2377ab0abed76",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:f,translationUrl:this.translationUrl,mbSource:this.mbSource}),e("player-elevate-pointcard",{key:"dfe15faf5ffe2c6bc0d03d863159829fc85c1053",endpoint:this.endpoint,session:this.session,language:this.language,mbSource:this.mbSource,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),this.loadGifts(b.bind(this,this.gifts,this.locale,this.redeemGiftConfirm.bind(this))),e("div",{key:"c77f4d76ed3383f2b58153eb7bfe3b5e1b922456",class:"ShopBottom"},e("bonus-pagination-nav",{key:"a383af9908f5eb3359c0c8d570c9b1edf50b3027",total:this.total,offset:this.offset,limit:this.limit,tableId:this.shopListId,"nav-item-account":7,arrowsActive:!1,"display-page-numbers":"true"}),e("general-input",{key:"93d1e1c3540234b2db2d521524ed1788b122a9ab",type:"dropdown",name:"pageLimits",displayName:this.locale.perPage,defaultValue:this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language,mbSource:this.mbSource,"client-styling-url":this.clientStylingUrl})))}handleMessage(e){"bee-redeem-confirmed"===e.data.type&&e.data.id&&this.redeemGift(e.data.id)}async componentDidLoad(){this.updateGifts(),this.isInitialized=!0,window.addEventListener("message",this.bindedHandler,!1)}static get assetsDirs(){return["static"]}static get watchers(){return{endpoint:["onPropsChange"],language:["onPropsChange"],session:["onPropsChange"]}}};u.style=":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.MainContainer .ShopBottom{display:flex;flex-direction:row;justify-content:space-between}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between;flex-direction:column}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emw--color-black-150, rgba(167, 167, 167, 0.2));border-radius:11px;background:var(--emw--color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emw--color-black-200, rgba(0, 0, 0, 0.2509803922));cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emw--color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emw--elevate-avaliable-button-size, 46px)}.RedeemButton{width:100%;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px)}.RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.RedeemButton.deactive{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.NoContent{font-size:16px;color:var(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";const x=["pt-br","en","es-mx","hu","hr"],m={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}"}},w=(e,t,n)=>{const i=t;let a=m[void 0!==i&&x.includes(i)?i:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");a=a.replace(n,t)}return a},y=class{constructor(e){t(this,e),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(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||parseInt(e.toString(),10)>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return e("ul",{class:"PaginationArea"},this.pagesArray.map((t=>e("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return e("general-styling-wrapper",{targetTranslations:m,translationUrl:this.translationUrl})}generateNavItemsByType(e,t){if(this.endPageIndex<e)return Array.from({length:this.endPageIndex+1},((e,t)=>t+1));let n=[],i=Math.floor(e/2);const a=this.endPageIndex+1;return t?this.currentPage<i||this.currentPage>a-i+1?(n=Array.from({length:i},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i},((e,t)=>this.endPageIndex-1+t)))):this.currentPage==i?(n=Array.from({length:i+1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i-1},((e,t)=>this.endPageIndex+t)))):this.currentPage==a-i+1?(n=Array.from({length:i-1},((e,t)=>t+1)),n.push("..."),n=n.concat(Array.from({length:i+1},((e,t)=>this.endPageIndex-2+t)))):(n=[1,"..."],n=n.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),n=n.concat(["...",a])):this.currentPage<i-1?(n=Array.from({length:e-1},((e,t)=>t+1)),n.push("...")):this.endPageIndex-this.currentPage<i+1?(n=Array.from({length:e-1},((e,t)=>this.endPageIndex-i+t)),n.unshift("...")):(n=Array.from({length:i+1},((e,t)=>this.currentPage+t-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 e("div",{key:"aa8d14788833b1b0e13ea20943935b03a3b043ac",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&e("span",{key:"a018261b6c598116829d878b8120aee7ae2576c4",class:"PageOfMessage"},w("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}})),e("div",{key:"64fc17d0b992b30a4b8d712e47442ee6a2d44b82",class:"PageNavigation"},this.arrowsActive&&e("div",{key:"f5f3b562fbdfb9e4b39ffd9755e5dba41e6231ba",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},w("firstPage",this.language)),this.secondaryArrowsActive&&e("span",{key:"39222e258f6c63502bfd3914c673d804edc96b53",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},w("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&e("span",{key:"d6f9a1394debdae49702713ccc59bea710ccd7ae",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},w("nextPage",this.language)),this.arrowsActive&&e("div",{key:"d2bb76f9d40fcfc3dbc6bb5fbfe6d237e77f0ee6",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",w("lastPage",this.language)," "),this.renderStylingWrapper()))}};function P(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function k(e,t){const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}y.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const C=class{constructor(e){t(this,e),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{n.innerHTML=t,e&&e.appendChild(n)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&P(this.el,this.clientStyling),this.clientStylingUrl&&k(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&P(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&k(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&P(this.el,this.clientStyling),this.clientStylingUrl&&k(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const i=(t=this.translationUrl,n=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{n[e]=n[e]||n.en,Object.keys(t[e]).forEach((i=>{n.en[i]&&(n[e][i]=n[e][i]||n.en[i],"object"==typeof t[e][i]?Object.keys(t[e][i]).forEach((a=>{n[e][i][a]=t[e][i][a]})):n[e][i]=t[e][i])}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(i)}var t,n;return await Promise.all(e)}render(){return e("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},e("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};function I(e){d(1,arguments);var t=h(e);return t.setHours(0,0,0,0),t}function L(e,t){return d(2,arguments),h(e).getTime()-h(t).getTime()}C.style=":host{display:block}";var E={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function A(e){return e?E[e]:E.trunc}const R=class{constructor(e){t(this,e),this.playerElevateLeveLoaded=n(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{n(e)}))))}calcuatePointsToBeExpired(e,t){let n="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return n;e.aboutToExpire.sort(((e,t)=>function(e,t){d(2,arguments);var n=h(e),i=h(t);return n.getTime()<i.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const i=e.aboutToExpire[0],a=function(e,t){d(2,arguments);var n=I(e),i=I(t),a=n.getTime()-c(n),r=i.getTime()-c(i);return Math.round((a-r)/864e5)}(new Date(i.expireTime),new Date);let r=0,o=0,l=0===a?`${t}Day`:t;return a<=0&&(r=function(e,t,n){d(2,arguments);var i=L(e,t)/36e5;return A(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=r>1?`${t}Hours`:`${t}Hour`,r<=0&&(o=function(e,t,n){d(2,arguments);var i=L(e,t)/6e4;return A(null==n?void 0:n.roundingMethod)(i)}(new Date(i.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${t}Minutes`:`${t}Minute`)),n=s(l,{expirationPoints:i.points,expireDay:Math.max(a,r,o),lang:this.params.language}),n}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var i,a,r;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void n(!0);let s=e.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(i=s.spendableWallet)||void 0===i?void 0:i.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(a=e.data.spendableWallet)||void 0===a?void 0:a.total,l=null===(r=e.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:l});let d=this.calcuatePointsToBeExpired(o,"coinsToBeExpired"),h=this.calcuatePointsToBeExpired(l,"pointsToBeExpired");(d||h)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:h}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),n(!0)}))))}setLoyaltyProgress(e){!function(e,t){const n=e.querySelector("#total_level"),i=n.getBBox().width,a=t>1?1:t,r=a*i-17<0?0:a*i-17,s=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),l=e.querySelector("#circle_current_level");n.setAttribute("viewbox",`0 0 ${r} 28`),s.setAttribute("width",`${r}`),l.setAttribute("cx",`${r<6.5?6.5:r}`),o.setAttribute("x",""+(r-8));const d=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),c=e.querySelector("#filter_ball"),g=e.querySelector("#filter_heart"),p=e.querySelector("#filter_lock"),v=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),u=e.querySelector("#heart_box"),x=i-10;d.setAttribute("cx",`${x}`),f.setAttribute("x1",`${x}`),f.setAttribute("x2",`${x}`),v.setAttribute("x1",""+(x-6)),v.setAttribute("x2",""+(x-6+11.2)),p.setAttribute("x",""+(x-6)),g.setAttribute("x",""+(x-6-2)),c.setAttribute("x",""+(x-6-2-2)),h.setAttribute("x",""+(x-6-2-2-4)),b.setAttribute("x",""+(x-6)),u.setAttribute("x",""+(x-6)),n.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach(((e,i)=>{t>e.firstEntryPoints&&(n=i)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return i(this)}static get watchers(){return{params:["onParamsChanged"]}}};R.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emw--elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: var(--emw--border-radius-medium, 10px);\n background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emw--color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emw--color-red, #9e595f);\n}';const B=class{constructor(e){t(this,e),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.mbSource=void 0,this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const t=a("../static/card-ground.svg"),n=a("../static/card-ground-over.svg");return e("div",{key:"45aa5be359b46d5503a8310daa4db2029a8c59b8",class:`ElevateCardWrapper ${this.theme}`},e("div",{key:"0d1773bd9eb0913ede4eeedfc93f22967aa133d6",class:"PointsCard Outer ",style:{backgroundImage:`url(${t}`}},e("general-styling-wrapper",{key:"cfb35c5220633e39e25b11f0be5b6fc5cc73df5c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl,mbSource:this.mbSource}),e("player-elevate-card-data",{key:"25206c4deb6e51e3ea60259d4fee3452df8253d6",params:this.paramProxy}),e("div",{key:"c14ee3498a1a584b7f484fe2ef6a204c337d2b27",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},e("div",{key:"dd7e0528034013d889f1f9bfbacf7928d2b4d1e9",class:"Content Row"},this.playerElevateLevel&&e(r,{key:"20b36f112f735446a6219b61e012e4568f199717"},e("div",{key:"3705136c1ee509484f43b7268b23cfbe273f727c",class:"PlayerImg"},e(g,{key:"b81cbcff0528acd3253a676e0a64141c6414fc2a",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),e("div",{key:"311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58",class:`LevelInfo ${this.playerElevateLevel.name}`},e("div",{key:"ba1744b3b9cee03a424093df96454ff68d04aec1",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:l("spendablePoints",this.language)),e("div",{key:"6b554d17a0f74684e23549365fb06f6079ba7239",class:"PointsTxt SPPoints"},e(p,{key:"6c9f812eccea99cd94095c252ba552816f800447",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),e("a",{key:"eb79d25c2ccce8c542a192c1ca07265649dbd1bc",class:"TC",onClick:()=>{this.onDetailsClick()}},l("termAndConditions",this.language))),this.pointExpireString&&e("div",{key:"e64127c87c4c4a3e5253606e2c4c472e9b728103",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};B.style=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";export{u as bonus_elevate_shop,y as bonus_pagination_nav,C as general_styling_wrapper,R as player_elevate_card_data,B as player_elevate_pointcard}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,a as n,h as a,F as t}from"./index-4bbe8850.js";import{P as i,a as s,b as r,c as d,d as
|
|
1
|
+
import{r as e,a as n,h as a,F as t}from"./index-4bbe8850.js";import{P as i,a as s,b as r,c as d,d as o,e as l}from"./player-elevate-card-items-d0cd4d5f.js";import{T as c}from"./locale.utils-34e6f004.js";const f=class{constructor(n){e(this,n),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerLevelFlag=0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString),e.detail.calculatedLevelFlag&&(this.playerLevelFlag=e.detail.calculatedLevelFlag))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language,calculateLevelFlag:!0}}render(){const e=n("../static/card-ground.svg"),f=n("../static/card-ground-over.svg");return a("div",{key:"e976417483a756b8f67d70feb09afb544efb3802",class:`ElevateCardWrapper ${this.theme}`},a("div",{key:"5de2dbc7d093bbcbe7b415122effa691c058ddb6",class:"Card Outer",style:{backgroundImage:`url(${e}`}},a("general-styling-wrapper",{key:"1a5b13640d37efab6dacee24e27f9f2bdc83cd0c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:c,translationUrl:this.translationUrl,mbSource:this.mbSource}),a("player-elevate-card-data",{key:"e80389984932f77408c772ad9cb130de99e88504",params:this.paramProxy}),a("div",{key:"fec6145e06a300bc044fec2f96e61dfe86f44d6c",class:"OuterCover Inner",style:{backgroundImage:`url(${f}`}},this.playerElevateLevel&&a(t,{key:"90b1f057c5d1d5ae286a75c3d30182c16593bbe6"},a("div",{key:"cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91",class:"Content Row"},a("div",{key:"f3348ba8eb7bcb08085ab49ce2059c7fd86f862f",class:"PlayerImg"},a(i,{key:"8fa96d942ee70d43ea0231b87f5d5de0b72198df",playerAvatarUrl:this.playerAvatarUrl,loyaltyIconUrl:this.playerElevateLevel.presentation.asset}),a(s,{key:"f774e833169326404d44dd8c2361bd89f0e5a9e6",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language})),this.pointExpireString&&a("div",{key:"c85b28e71be4e13df275f2ae74f5b0c9538b3cda",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),a("div",{key:"63ef752d5e25c3a65e5af7977b9e9f4846b8ba45",class:`LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}`},a(r,{key:"7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4",playerName:this.playerName}),a(d,{key:"38d7c5aed410c9bf55e9640a98f6f74fc2d38291",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),a(o,{key:"2e1305ff3bea4cb2f432f1187c40bb36a1464627"}),a(l,{key:"427405f246bec7a028b5164fc70292b769ea609b",onRedeemClick:this.onRedeemClick,language:this.language})))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};f.style="@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n .Inner .Row .ExpirationPoints {\n order: 1;\n }\n}\n.Card .PlayerImg {\n order: 0;\n}\n.Card .ExpirationPoints {\n order: 3;\n}\n.Card .LevelInfo {\n order: 2;\n}\n.Card .Inner .Row .PlayerImg {\n flex-direction: column;\n}\n.Card .Inner .Row .PointsInfo {\n width: 100%;\n text-align: center;\n display: flex;\n flex-direction: column;\n max-height: 50%;\n}\n.Card .Inner .PlayerAvatar .Badge {\n background-size: contain;\n background-repeat: no-repeat;\n position: absolute;\n right: 5px;\n bottom: -5px;\n width: 40%;\n height: 40%;\n overflow: visible;\n}\n.Card .Inner .Row .ExpirationPoints {\n text-align: left;\n color: var(--emw--color-red, red);\n}\n.Card .Inner .Row .Points {\n text-wrap: nowrap;\n}\n.Card .Inner .LevelInfo .ElevateLevel {\n flex-direction: column;\n}\n.Card .Inner .LevelInfo .ElevateLevel .LevelName {\n width: calc(100% - 20px);\n text-align: left;\n font-size: 13px;\n padding-left: 20px;\n margin: 10px 0;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {\n text-align: center;\n font-size: smaller;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {\n margin-left: 5px;\n}";export{f as player_elevate_card}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,a,h as t,F as i}from"./index-4bbe8850.js";import{P as n,a as l,d as s,L as o}from"./player-elevate-card-items-d0cd4d5f.js";import{t as d,T as r}from"./locale.utils-34e6f004.js";const c=class{constructor(a){e(this,a),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,a;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(a=this.playerElevateLevel)||void 0===a?void 0:a.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let a=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&a){const e=(a.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return d("tipsForNextLevel",{pointsToReach:e,levelName:a.name,lang:this.language})}return""}render(){const e=a("../static/card-ground.svg"),d=a("../static/card-ground-over.svg");return t("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"
|
|
1
|
+
import{r as e,a,h as t,F as i}from"./index-4bbe8850.js";import{P as n,a as l,d as s,L as o}from"./player-elevate-card-items-d0cd4d5f.js";import{t as d,T as r}from"./locale.utils-34e6f004.js";const c=class{constructor(a){e(this,a),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,a;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(a=this.playerElevateLevel)||void 0===a?void 0:a.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let a=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&a){const e=(a.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return d("tipsForNextLevel",{pointsToReach:e,levelName:a.name,lang:this.language})}return""}render(){const e=a("../static/card-ground.svg"),d=a("../static/card-ground-over.svg");return t("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"3648821972ac115a1c33705463cdc2cdb427a95b",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:r,translationUrl:this.translationUrl,mbSource:this.mbSource}),t("player-elevate-card-data",{key:"7b36c46a869bd4b014d1f04dbb718445b23ec964",params:this.paramProxy}),t("div",{key:"f4e5aa453459f693e07c166028aec9b0b696c907",class:"OuterCover Inner",style:{backgroundImage:`url(${d}`}},t("div",{key:"d5f1894120cba3e7cf3c54b838a025f469bc445e",class:"Content Row"},this.playerElevateLevel&&t(i,{key:"112ee04598b23dda6911f043101c0c1631454d7f"},t("div",{key:"7af4b6e937bbe73cc00aae0f27f8c93da47bb626",class:"PlayerImg"},t(n,{key:"1b5037bfa196063f56cccd947c988a3aca0781b0",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),t("div",{key:"7b714e446f4e01edd4f4aefcc035d070b7d6a47b",class:`LevelInfo ${this.playerElevateLevel.name}`},t("div",{key:"37ad8ce5dae374685e74f6772d28e79d251932e3",class:"CardCell ElevateLevel"},t("span",{key:"2d9dcf4b08fcecc927d3e8bdca74c75ff4336480",class:"LevelName",title:this.playerElevateLevel.name},this.playerElevateLevel.name)),t("div",{key:"cc89cbaa70d9583b9626da15e98f9fd61d82f81f",class:"PointsRange"},t(l,{key:"32de4cac05a4fd5610af857b25e096a7cb9ba34d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),t(l,{key:"298f492c8991384547c31396fc930b5c21f41501",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),t(s,{key:"aca4f5642c41db1c4b7fa04411331a5c25c655dd"}),t("div",{key:"d841c5df319de105376c6eee24bc685757916aae",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&t("div",{key:"774279829f3f52ee5696550a855a833b39df8c81",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),this.playerElevateLevel.expireTime&&t(o,{key:"3a4319e502e85b26cb220942492b161ad842be82",expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language})))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};c.style=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}";export{c as player_elevate_loyaltycard}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as e}from"./index-4bbe8850.js";import{a as t,t as i,T as n}from"./locale.utils-34e6f004.js";const r=class{constructor(e){a(this,e),this.truncateNumber=(a,e=2)=>{const t=a.toString(),[i,n=""]=t.split(".");return e>0?`${i}.${n?n.slice(0,e):"00"}`:`${i}`},this.sendRakebackClaimedEvent=()=>{this.endpoint&&this.session&&this.rakebackInfo.claimable&&!this.isLoading&&window.postMessage({type:"RakebackClaimTrigger",points:this.rakebackInfo.points},window.location.href)},this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.show=!0,this.rakebackInfo={hasRakebackWallet:!1,points:0,currency:"TRY",claimable:!1,minutesCanClaim:0,showCanClaim:!1},this.isLoading=!1,this.coolingOffPeriod=!1,this.showTheWidget=!1}async onSessionOrEndpointChange(){await this.loadRakebackInfo()}async onShowOrHasRakebackWalletChange(){this.showTheWidget=this.show&&this.rakebackInfo.hasRakebackWallet}handleMessage(a){const{type:e}=null==a?void 0:a.data;"RakebackClaimConfirmed"===e&&this.claimRakeback()}async loadRakebackInfo(){if(this.endpoint&&this.session){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`),e=await fetch(a.href,{method:"GET",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to load rakeback info");const{rakebackWallet:i}=null==t?void 0:t.data;if(!i)return void window.postMessage({type:"RakebackWalletMissing"},window.location.href);const{total:n,claimable:r,currency:o,minutesCanClaim:s}=i||{};this.rakebackInfo={hasRakebackWallet:!0,points:(null==n?void 0:n.points)?this.truncateNumber(n.points,2):"0.00",currency:o||"",claimable:r||!1,showCanClaim:Boolean(s&&s>0),minutesCanClaim:s?s<=1&&s>0?1:this.truncateNumber(s,0):0}}catch(a){console.error("Error loading rakeback info:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}}async claimRakeback(){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/rakeback/claim`),e=await fetch(a.href,{method:"PUT",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to claim rakeback");await this.loadRakebackInfo(),window.postMessage({type:"RakebackClaimed",points:this.rakebackInfo.points},window.location.href)}catch(a){console.error("Error claiming rakeback:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}async componentWillLoad(){await this.loadRakebackInfo(),await this.onShowOrHasRakebackWalletChange()}render(){return this.showTheWidget?e("div",{class:"RakebackCard"},e("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl}),e("div",{class:"RakebackCardContent"},e("div",{class:"RakebackTitle"},t("rakebackTitle",this.language)),e("div",{class:"RakebackDetails"},e("div",{class:"RakebackInfo"},e("div",{class:"RakebackNumContainer"},e("span",{class:"RakebackNum"},this.rakebackInfo.points),e("span",{class:"RakebackCurrency"},this.rakebackInfo.currency))),e("div",{class:"RakebackButton "+(this.isLoading||!this.rakebackInfo.claimable?"disabled":""),onClick:this.sendRakebackClaimedEvent},t("claim",this.language))),!this.rakebackInfo.claimable&&this.rakebackInfo.showCanClaim&&e("div",{class:"RakebackCoolOff"},i("minutesCanClaim",{lang:this.language,minutes:this.rakebackInfo.minutesCanClaim})))):null}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}}};r.style=":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}";export{r as player_rakeback_card}
|
|
1
|
+
import{r as a,h as e}from"./index-4bbe8850.js";import{a as t,t as i,T as n}from"./locale.utils-34e6f004.js";const r=class{constructor(e){a(this,e),this.truncateNumber=(a,e=2)=>{const t=a.toString(),[i,n=""]=t.split(".");return e>0?`${i}.${n?n.slice(0,e):"00"}`:`${i}`},this.sendRakebackClaimedEvent=()=>{this.endpoint&&this.session&&this.rakebackInfo.claimable&&!this.isLoading&&window.postMessage({type:"RakebackClaimTrigger",points:this.rakebackInfo.points},window.location.href)},this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.show=!0,this.rakebackInfo={hasRakebackWallet:!1,points:0,currency:"TRY",claimable:!1,minutesCanClaim:0,showCanClaim:!1},this.isLoading=!1,this.coolingOffPeriod=!1,this.showTheWidget=!1}async onSessionOrEndpointChange(){await this.loadRakebackInfo()}async onShowOrHasRakebackWalletChange(){this.showTheWidget=this.show&&this.rakebackInfo.hasRakebackWallet}handleMessage(a){const{type:e}=null==a?void 0:a.data;"RakebackClaimConfirmed"===e&&this.claimRakeback()}async loadRakebackInfo(){if(this.endpoint&&this.session){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`),e=await fetch(a.href,{method:"GET",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to load rakeback info");const{rakebackWallet:i}=null==t?void 0:t.data;if(!i)return void window.postMessage({type:"RakebackWalletMissing"},window.location.href);const{total:n,claimable:r,currency:o,minutesCanClaim:s}=i||{};this.rakebackInfo={hasRakebackWallet:!0,points:(null==n?void 0:n.points)?this.truncateNumber(n.points,2):"0.00",currency:o||"",claimable:r||!1,showCanClaim:Boolean(s&&s>0),minutesCanClaim:s?s<=1&&s>0?1:this.truncateNumber(s,0):0}}catch(a){console.error("Error loading rakeback info:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}}async claimRakeback(){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/rakeback/claim`),e=await fetch(a.href,{method:"PUT",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to claim rakeback");await this.loadRakebackInfo(),window.postMessage({type:"RakebackClaimed",points:this.rakebackInfo.points},window.location.href)}catch(a){console.error("Error claiming rakeback:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}async componentWillLoad(){await this.loadRakebackInfo(),await this.onShowOrHasRakebackWalletChange()}render(){return this.showTheWidget?e("div",{class:"RakebackCard"},e("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl,mbSource:this.mbSource}),e("div",{class:"RakebackCardContent"},e("div",{class:"RakebackTitle"},t("rakebackTitle",this.language)),e("div",{class:"RakebackDetails"},e("div",{class:"RakebackInfo"},e("div",{class:"RakebackNumContainer"},e("span",{class:"RakebackNum"},this.rakebackInfo.points),e("span",{class:"RakebackCurrency"},this.rakebackInfo.currency))),e("div",{class:"RakebackButton "+(this.isLoading||!this.rakebackInfo.claimable?"disabled":""),onClick:this.sendRakebackClaimedEvent},t("claim",this.language))),!this.rakebackInfo.claimable&&this.rakebackInfo.showCanClaim&&e("div",{class:"RakebackCoolOff"},i("minutesCanClaim",{lang:this.language,minutes:this.rakebackInfo.minutesCanClaim})))):null}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}}};r.style=":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}";export{r as player_rakeback_card}
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["bonus-elevate-shop_5.cjs",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard.cjs",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["bonus-elevate-shop_5.cjs",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard.cjs",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -96,6 +96,7 @@ const BonusElevateShop = class {
|
|
|
96
96
|
this.session = undefined;
|
|
97
97
|
this.endpoint = undefined;
|
|
98
98
|
this.language = 'en';
|
|
99
|
+
this.mbSource = undefined;
|
|
99
100
|
this.clientStyling = '';
|
|
100
101
|
this.clientStylingUrl = '';
|
|
101
102
|
this.translationUrl = '';
|
|
@@ -215,7 +216,7 @@ const BonusElevateShop = class {
|
|
|
215
216
|
this.locale = Object.assign(Object.assign({}, translation['en']), translation[this.language]);
|
|
216
217
|
}
|
|
217
218
|
render() {
|
|
218
|
-
return (index.h("main", { key: '
|
|
219
|
+
return (index.h("main", { key: 'b3500b7f2d9ce92a6516f34d9e589538f888900a', class: "MainContainer" }, index.h("general-styling-wrapper", { key: '038ebd20a7676c1f2c44fa5decf2377ab0abed76', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-pointcard", { key: 'dfe15faf5ffe2c6bc0d03d863159829fc85c1053', endpoint: this.endpoint, session: this.session, language: this.language, mbSource: this.mbSource, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), this.loadGifts(renderGifts.bind(this, this.gifts, this.locale, this.redeemGiftConfirm.bind(this))), index.h("div", { key: 'c77f4d76ed3383f2b58153eb7bfe3b5e1b922456', class: "ShopBottom" }, index.h("bonus-pagination-nav", { key: 'a383af9908f5eb3359c0c8d570c9b1edf50b3027', total: this.total, offset: this.offset, limit: this.limit, tableId: this.shopListId, "nav-item-account": 7, arrowsActive: false, "display-page-numbers": "true" }), index.h("general-input", { key: '93d1e1c3540234b2db2d521524ed1788b122a9ab', type: "dropdown", name: "pageLimits", displayName: this.locale.perPage, defaultValue: this.limit, validation: { mandatory: false }, options: this.pageLimitSelectOptions, emitValue: true, language: this.language, mbSource: this.mbSource, "client-styling-url": this.clientStylingUrl }))));
|
|
219
220
|
}
|
|
220
221
|
handleMessage(message) {
|
|
221
222
|
if (message.data.type === 'bee-redeem-confirmed' && message.data.id) {
|
|
@@ -470,6 +471,63 @@ const mergeTranslations = (url, target) => {
|
|
|
470
471
|
});
|
|
471
472
|
};
|
|
472
473
|
|
|
474
|
+
/**
|
|
475
|
+
* @name setClientStyling
|
|
476
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
477
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
478
|
+
* @param {string} clientStyling The style content
|
|
479
|
+
*/
|
|
480
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
481
|
+
if (stylingContainer) {
|
|
482
|
+
const sheet = document.createElement('style');
|
|
483
|
+
sheet.innerHTML = clientStyling;
|
|
484
|
+
stylingContainer.appendChild(sheet);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* @name setClientStylingURL
|
|
490
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
491
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
492
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
493
|
+
*/
|
|
494
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
495
|
+
const url = new URL(clientStylingUrl);
|
|
496
|
+
|
|
497
|
+
fetch(url.href)
|
|
498
|
+
.then((res) => res.text())
|
|
499
|
+
.then((data) => {
|
|
500
|
+
const cssFile = document.createElement('style');
|
|
501
|
+
cssFile.innerHTML = data;
|
|
502
|
+
if (stylingContainer) {
|
|
503
|
+
stylingContainer.appendChild(cssFile);
|
|
504
|
+
}
|
|
505
|
+
})
|
|
506
|
+
.catch((err) => {
|
|
507
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* @name setStreamLibrary
|
|
513
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
514
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
515
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
516
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
517
|
+
*/
|
|
518
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
519
|
+
if (window.emMessageBus) {
|
|
520
|
+
const sheet = document.createElement('style');
|
|
521
|
+
|
|
522
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
523
|
+
sheet.innerHTML = data;
|
|
524
|
+
if (stylingContainer) {
|
|
525
|
+
stylingContainer.appendChild(sheet);
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
473
531
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
474
532
|
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
475
533
|
|
|
@@ -477,38 +535,47 @@ const GeneralStylingWrapper = class {
|
|
|
477
535
|
constructor(hostRef) {
|
|
478
536
|
index.registerInstance(this, hostRef);
|
|
479
537
|
this.stylingAppends = false;
|
|
480
|
-
this.setClientStyling = () => {
|
|
481
|
-
let sheet = document.createElement('style');
|
|
482
|
-
sheet.innerHTML = this.clientStyling;
|
|
483
|
-
this.el.prepend(sheet);
|
|
484
|
-
};
|
|
485
|
-
this.setClientStylingURL = () => {
|
|
486
|
-
let url = new URL(this.clientStylingUrl);
|
|
487
|
-
let cssFile = document.createElement('style');
|
|
488
|
-
fetch(url.href)
|
|
489
|
-
.then((res) => res.text())
|
|
490
|
-
.then((data) => {
|
|
491
|
-
cssFile.innerHTML = data;
|
|
492
|
-
setTimeout(() => {
|
|
493
|
-
this.el.prepend(cssFile);
|
|
494
|
-
}, 1);
|
|
495
|
-
})
|
|
496
|
-
.catch((err) => {
|
|
497
|
-
console.log('error ', err);
|
|
498
|
-
});
|
|
499
|
-
};
|
|
500
538
|
this.clientStyling = '';
|
|
501
539
|
this.clientStylingUrl = '';
|
|
540
|
+
this.mbSource = undefined;
|
|
502
541
|
this.translationUrl = '';
|
|
503
542
|
this.targetTranslations = undefined;
|
|
504
543
|
}
|
|
544
|
+
componentDidLoad() {
|
|
545
|
+
if (this.el) {
|
|
546
|
+
if (window.emMessageBus != undefined) {
|
|
547
|
+
setStreamStyling(this.el, `${this.mbSource}.Style`);
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
if (this.clientStyling)
|
|
551
|
+
setClientStyling(this.el, this.clientStyling);
|
|
552
|
+
if (this.clientStylingUrl)
|
|
553
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
554
|
+
this.stylingAppends = true;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
disconnectedCallback() {
|
|
559
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
560
|
+
}
|
|
561
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
562
|
+
if (newValue != oldValue) {
|
|
563
|
+
setClientStyling(this.el, this.clientStyling);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
567
|
+
if (newValue != oldValue) {
|
|
568
|
+
if (this.clientStylingUrl)
|
|
569
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
505
572
|
componentDidRender() {
|
|
506
573
|
// start custom styling area
|
|
507
574
|
if (!this.stylingAppends) {
|
|
508
575
|
if (this.clientStyling)
|
|
509
|
-
this.
|
|
576
|
+
setClientStyling(this.el, this.clientStyling);
|
|
510
577
|
if (this.clientStylingUrl)
|
|
511
|
-
this.
|
|
578
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
512
579
|
this.stylingAppends = true;
|
|
513
580
|
}
|
|
514
581
|
// end custom styling area
|
|
@@ -522,9 +589,13 @@ const GeneralStylingWrapper = class {
|
|
|
522
589
|
return await Promise.all(promises);
|
|
523
590
|
}
|
|
524
591
|
render() {
|
|
525
|
-
return (index.h("div", { key: '
|
|
592
|
+
return (index.h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, index.h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
|
|
526
593
|
}
|
|
527
594
|
get el() { return index.getElement(this); }
|
|
595
|
+
static get watchers() { return {
|
|
596
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
597
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
598
|
+
}; }
|
|
528
599
|
};
|
|
529
600
|
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
530
601
|
|
|
@@ -995,6 +1066,7 @@ const PlayerElevatePointcard = class {
|
|
|
995
1066
|
this.session = undefined;
|
|
996
1067
|
this.playerAvatarUrl = undefined;
|
|
997
1068
|
this.language = 'en';
|
|
1069
|
+
this.mbSource = undefined;
|
|
998
1070
|
this.playerName = undefined;
|
|
999
1071
|
this.cardTitle = undefined;
|
|
1000
1072
|
this.buttonType = 'earningRule';
|
|
@@ -1039,9 +1111,9 @@ const PlayerElevatePointcard = class {
|
|
|
1039
1111
|
render() {
|
|
1040
1112
|
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
1041
1113
|
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
1042
|
-
return (index.h("div", { key: '
|
|
1114
|
+
return (index.h("div", { key: '45aa5be359b46d5503a8310daa4db2029a8c59b8', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '0d1773bd9eb0913ede4eeedfc93f22967aa133d6', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'cfb35c5220633e39e25b11f0be5b6fc5cc73df5c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: '25206c4deb6e51e3ea60259d4fee3452df8253d6', params: this.paramProxy }), index.h("div", { key: 'c14ee3498a1a584b7f484fe2ef6a204c337d2b27', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'dd7e0528034013d889f1f9bfbacf7928d2b4d1e9', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '20b36f112f735446a6219b61e012e4568f199717' }, index.h("div", { key: '3705136c1ee509484f43b7268b23cfbe273f727c', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: 'b81cbcff0528acd3253a676e0a64141c6414fc2a', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: 'ba1744b3b9cee03a424093df96454ff68d04aec1', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : locale_utils.translate('spendablePoints', this.language)), index.h("div", { key: '6b554d17a0f74684e23549365fb06f6079ba7239', class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { key: '6c9f812eccea99cd94095c252ba552816f800447', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: 'eb79d25c2ccce8c542a192c1ca07265649dbd1bc', class: "TC", onClick: () => {
|
|
1043
1115
|
this.onDetailsClick();
|
|
1044
|
-
} }, locale_utils.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '
|
|
1116
|
+
} }, locale_utils.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: 'e64127c87c4c4a3e5253606e2c4c472e9b728103', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
1045
1117
|
}
|
|
1046
1118
|
static get watchers() { return {
|
|
1047
1119
|
"session": ["onSessionOrEndpointChange"],
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["bonus-elevate-shop_5.cjs",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard.cjs",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["bonus-elevate-shop_5.cjs",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard.cjs",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -19,6 +19,7 @@ const PlayerElevateCard = class {
|
|
|
19
19
|
this.language = 'en';
|
|
20
20
|
this.playerName = undefined;
|
|
21
21
|
this.dateFormat = 'yyyy-MM-dd';
|
|
22
|
+
this.mbSource = undefined;
|
|
22
23
|
this.clientStyling = '';
|
|
23
24
|
this.clientStylingUrl = '';
|
|
24
25
|
this.translationUrl = '';
|
|
@@ -61,7 +62,7 @@ const PlayerElevateCard = class {
|
|
|
61
62
|
render() {
|
|
62
63
|
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
63
64
|
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
64
|
-
return (index.h("div", { key: '
|
|
65
|
+
return (index.h("div", { key: 'e976417483a756b8f67d70feb09afb544efb3802', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '5de2dbc7d093bbcbe7b415122effa691c058ddb6', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '1a5b13640d37efab6dacee24e27f9f2bdc83cd0c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: 'e80389984932f77408c772ad9cb130de99e88504', params: this.paramProxy }), index.h("div", { key: 'fec6145e06a300bc044fec2f96e61dfe86f44d6c', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (index.h(index.Fragment, { key: '90b1f057c5d1d5ae286a75c3d30182c16593bbe6' }, index.h("div", { key: 'cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91', class: 'Content Row' }, index.h("div", { key: 'f3348ba8eb7bcb08085ab49ce2059c7fd86f862f', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '8fa96d942ee70d43ea0231b87f5d5de0b72198df', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), index.h(playerElevateCardItems.PlayerPoints, { key: 'f774e833169326404d44dd8c2361bd89f0e5a9e6', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (index.h("div", { key: 'c85b28e71be4e13df275f2ae74f5b0c9538b3cda', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h("div", { key: '63ef752d5e25c3a65e5af7977b9e9f4846b8ba45', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, index.h(playerElevateCardItems.PlayerNameDiv, { key: '7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4', playerName: this.playerName }), index.h(playerElevateCardItems.PlayerElevateLoyaltyLevel, { key: '38d7c5aed410c9bf55e9640a98f6f74fc2d38291', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: '2e1305ff3bea4cb2f432f1187c40bb36a1464627' }), index.h(playerElevateCardItems.PlayerElevateCardRedeem, { key: '427405f246bec7a028b5164fc70292b769ea609b', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
65
66
|
}
|
|
66
67
|
static get assetsDirs() { return ["../static"]; }
|
|
67
68
|
static get watchers() { return {
|
|
@@ -75,8 +75,8 @@ const PlayerElevateLoyaltycard = class {
|
|
|
75
75
|
render() {
|
|
76
76
|
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
77
77
|
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
78
|
-
return (index.h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '
|
|
79
|
-
index.h(playerElevateCardItems.LoyaltyLevelExpireDay, { key: '
|
|
78
|
+
return (index.h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '3648821972ac115a1c33705463cdc2cdb427a95b', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: '7b36c46a869bd4b014d1f04dbb718445b23ec964', params: this.paramProxy }), index.h("div", { key: 'f4e5aa453459f693e07c166028aec9b0b696c907', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'd5f1894120cba3e7cf3c54b838a025f469bc445e', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '112ee04598b23dda6911f043101c0c1631454d7f' }, index.h("div", { key: '7af4b6e937bbe73cc00aae0f27f8c93da47bb626', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '1b5037bfa196063f56cccd947c988a3aca0781b0', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '7b714e446f4e01edd4f4aefcc035d070b7d6a47b', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: '37ad8ce5dae374685e74f6772d28e79d251932e3', class: 'CardCell ElevateLevel' }, index.h("span", { key: '2d9dcf4b08fcecc927d3e8bdca74c75ff4336480', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), index.h("div", { key: 'cc89cbaa70d9583b9626da15e98f9fd61d82f81f', class: 'PointsRange' }, index.h(playerElevateCardItems.PlayerPoints, { key: '32de4cac05a4fd5610af857b25e096a7cb9ba34d', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), index.h(playerElevateCardItems.PlayerPoints, { key: '298f492c8991384547c31396fc930b5c21f41501', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: 'aca4f5642c41db1c4b7fa04411331a5c25c655dd' }), index.h("div", { key: 'd841c5df319de105376c6eee24bc685757916aae', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (index.h("div", { key: '774279829f3f52ee5696550a855a833b39df8c81', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
|
|
79
|
+
index.h(playerElevateCardItems.LoyaltyLevelExpireDay, { key: '3a4319e502e85b26cb220942492b161ad842be82', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
|
|
80
80
|
}
|
|
81
81
|
static get watchers() { return {
|
|
82
82
|
"session": ["onSessionOrEndpointChange"],
|
|
@@ -31,6 +31,7 @@ const PlayerRakebackCard = class {
|
|
|
31
31
|
this.theme = 'Dark';
|
|
32
32
|
this.session = undefined;
|
|
33
33
|
this.language = 'en';
|
|
34
|
+
this.mbSource = undefined;
|
|
34
35
|
this.clientStyling = '';
|
|
35
36
|
this.clientStylingUrl = '';
|
|
36
37
|
this.translationUrl = '';
|
|
@@ -144,7 +145,7 @@ const PlayerRakebackCard = class {
|
|
|
144
145
|
await this.onShowOrHasRakebackWalletChange();
|
|
145
146
|
}
|
|
146
147
|
render() {
|
|
147
|
-
return this.showTheWidget ? (index.h("div", { class: "RakebackCard" }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("div", { class: "RakebackCardContent" }, index.h("div", { class: "RakebackTitle" }, locale_utils.translate('rakebackTitle', this.language)), index.h("div", { class: "RakebackDetails" }, index.h("div", { class: "RakebackInfo" }, index.h("div", { class: "RakebackNumContainer" }, index.h("span", { class: "RakebackNum" }, this.rakebackInfo.points), index.h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), index.h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, locale_utils.translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (index.h("div", { class: "RakebackCoolOff" }, locale_utils.translateWithParams('minutesCanClaim', {
|
|
148
|
+
return this.showTheWidget ? (index.h("div", { class: "RakebackCard" }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("div", { class: "RakebackCardContent" }, index.h("div", { class: "RakebackTitle" }, locale_utils.translate('rakebackTitle', this.language)), index.h("div", { class: "RakebackDetails" }, index.h("div", { class: "RakebackInfo" }, index.h("div", { class: "RakebackNumContainer" }, index.h("span", { class: "RakebackNum" }, this.rakebackInfo.points), index.h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), index.h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, locale_utils.translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (index.h("div", { class: "RakebackCoolOff" }, locale_utils.translateWithParams('minutesCanClaim', {
|
|
148
149
|
lang: this.language,
|
|
149
150
|
minutes: this.rakebackInfo.minutesCanClaim
|
|
150
151
|
})))))) : null;
|
|
@@ -12,6 +12,7 @@ export class BonusElevateShop {
|
|
|
12
12
|
this.session = undefined;
|
|
13
13
|
this.endpoint = undefined;
|
|
14
14
|
this.language = 'en';
|
|
15
|
+
this.mbSource = undefined;
|
|
15
16
|
this.clientStyling = '';
|
|
16
17
|
this.clientStylingUrl = '';
|
|
17
18
|
this.translationUrl = '';
|
|
@@ -131,7 +132,7 @@ export class BonusElevateShop {
|
|
|
131
132
|
this.locale = Object.assign(Object.assign({}, translation['en']), translation[this.language]);
|
|
132
133
|
}
|
|
133
134
|
render() {
|
|
134
|
-
return (h("main", { key: '
|
|
135
|
+
return (h("main", { key: 'b3500b7f2d9ce92a6516f34d9e589538f888900a', class: "MainContainer" }, h("general-styling-wrapper", { key: '038ebd20a7676c1f2c44fa5decf2377ab0abed76', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-pointcard", { key: 'dfe15faf5ffe2c6bc0d03d863159829fc85c1053', endpoint: this.endpoint, session: this.session, language: this.language, mbSource: this.mbSource, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), this.loadGifts(renderGifts.bind(this, this.gifts, this.locale, this.redeemGiftConfirm.bind(this))), h("div", { key: 'c77f4d76ed3383f2b58153eb7bfe3b5e1b922456', class: "ShopBottom" }, h("bonus-pagination-nav", { key: 'a383af9908f5eb3359c0c8d570c9b1edf50b3027', total: this.total, offset: this.offset, limit: this.limit, tableId: this.shopListId, "nav-item-account": 7, arrowsActive: false, "display-page-numbers": "true" }), h("general-input", { key: '93d1e1c3540234b2db2d521524ed1788b122a9ab', type: "dropdown", name: "pageLimits", displayName: this.locale.perPage, defaultValue: this.limit, validation: { mandatory: false }, options: this.pageLimitSelectOptions, emitValue: true, language: this.language, mbSource: this.mbSource, "client-styling-url": this.clientStylingUrl }))));
|
|
135
136
|
}
|
|
136
137
|
handleMessage(message) {
|
|
137
138
|
if (message.data.type === 'bee-redeem-confirmed' && message.data.id) {
|
|
@@ -210,6 +211,23 @@ export class BonusElevateShop {
|
|
|
210
211
|
"reflect": true,
|
|
211
212
|
"defaultValue": "'en'"
|
|
212
213
|
},
|
|
214
|
+
"mbSource": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "string",
|
|
219
|
+
"resolved": "string",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "Client custom styling via streamStyling"
|
|
227
|
+
},
|
|
228
|
+
"attribute": "mb-source",
|
|
229
|
+
"reflect": true
|
|
230
|
+
},
|
|
213
231
|
"clientStyling": {
|
|
214
232
|
"type": "string",
|
|
215
233
|
"mutable": false,
|
|
@@ -13,6 +13,7 @@ const meta = {
|
|
|
13
13
|
limit: "10",
|
|
14
14
|
navItemAccount: "5",
|
|
15
15
|
pageLimitOptions: "10,25,50",
|
|
16
|
+
mbSource: "",
|
|
16
17
|
},
|
|
17
18
|
argTypes: {
|
|
18
19
|
session: { control: 'text', description: '' },
|
|
@@ -24,6 +25,7 @@ const meta = {
|
|
|
24
25
|
limit: { control: 'text', description: '' },
|
|
25
26
|
navItemAccount: { control: 'text', description: '' },
|
|
26
27
|
pageLimitOptions: { control: 'text', description: '' },
|
|
28
|
+
mbSource: { control: 'text', description: '' },
|
|
27
29
|
},
|
|
28
30
|
};
|
|
29
31
|
export default meta;
|
|
@@ -38,6 +40,7 @@ const Template = (args) => {
|
|
|
38
40
|
limit="${args.limit}"
|
|
39
41
|
nav-item-account="${args.navItemAccount}"
|
|
40
42
|
page-limit-options="${args.pageLimitOptions}"
|
|
43
|
+
mb-source="${args.mbSource}"
|
|
41
44
|
></bonus-elevate-shop>`;
|
|
42
45
|
};
|
|
43
46
|
export const Default = Template.bind({});
|
|
@@ -47,6 +50,7 @@ Default.args = {
|
|
|
47
50
|
language: "en",
|
|
48
51
|
clientStyling: "",
|
|
49
52
|
clientStylingUrl: "",
|
|
53
|
+
mbSource: "",
|
|
50
54
|
translationUrl: "",
|
|
51
55
|
limit: "10",
|
|
52
56
|
navItemAccount: "5",
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["bonus-elevate-shop_5",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["bonus-elevate-shop_5",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -92,6 +92,7 @@ const BonusElevateShop = class {
|
|
|
92
92
|
this.session = undefined;
|
|
93
93
|
this.endpoint = undefined;
|
|
94
94
|
this.language = 'en';
|
|
95
|
+
this.mbSource = undefined;
|
|
95
96
|
this.clientStyling = '';
|
|
96
97
|
this.clientStylingUrl = '';
|
|
97
98
|
this.translationUrl = '';
|
|
@@ -211,7 +212,7 @@ const BonusElevateShop = class {
|
|
|
211
212
|
this.locale = Object.assign(Object.assign({}, translation['en']), translation[this.language]);
|
|
212
213
|
}
|
|
213
214
|
render() {
|
|
214
|
-
return (h("main", { key: '
|
|
215
|
+
return (h("main", { key: 'b3500b7f2d9ce92a6516f34d9e589538f888900a', class: "MainContainer" }, h("general-styling-wrapper", { key: '038ebd20a7676c1f2c44fa5decf2377ab0abed76', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-pointcard", { key: 'dfe15faf5ffe2c6bc0d03d863159829fc85c1053', endpoint: this.endpoint, session: this.session, language: this.language, mbSource: this.mbSource, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), this.loadGifts(renderGifts.bind(this, this.gifts, this.locale, this.redeemGiftConfirm.bind(this))), h("div", { key: 'c77f4d76ed3383f2b58153eb7bfe3b5e1b922456', class: "ShopBottom" }, h("bonus-pagination-nav", { key: 'a383af9908f5eb3359c0c8d570c9b1edf50b3027', total: this.total, offset: this.offset, limit: this.limit, tableId: this.shopListId, "nav-item-account": 7, arrowsActive: false, "display-page-numbers": "true" }), h("general-input", { key: '93d1e1c3540234b2db2d521524ed1788b122a9ab', type: "dropdown", name: "pageLimits", displayName: this.locale.perPage, defaultValue: this.limit, validation: { mandatory: false }, options: this.pageLimitSelectOptions, emitValue: true, language: this.language, mbSource: this.mbSource, "client-styling-url": this.clientStylingUrl }))));
|
|
215
216
|
}
|
|
216
217
|
handleMessage(message) {
|
|
217
218
|
if (message.data.type === 'bee-redeem-confirmed' && message.data.id) {
|
|
@@ -466,6 +467,63 @@ const mergeTranslations = (url, target) => {
|
|
|
466
467
|
});
|
|
467
468
|
};
|
|
468
469
|
|
|
470
|
+
/**
|
|
471
|
+
* @name setClientStyling
|
|
472
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
473
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
474
|
+
* @param {string} clientStyling The style content
|
|
475
|
+
*/
|
|
476
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
477
|
+
if (stylingContainer) {
|
|
478
|
+
const sheet = document.createElement('style');
|
|
479
|
+
sheet.innerHTML = clientStyling;
|
|
480
|
+
stylingContainer.appendChild(sheet);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* @name setClientStylingURL
|
|
486
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
487
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
488
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
489
|
+
*/
|
|
490
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
491
|
+
const url = new URL(clientStylingUrl);
|
|
492
|
+
|
|
493
|
+
fetch(url.href)
|
|
494
|
+
.then((res) => res.text())
|
|
495
|
+
.then((data) => {
|
|
496
|
+
const cssFile = document.createElement('style');
|
|
497
|
+
cssFile.innerHTML = data;
|
|
498
|
+
if (stylingContainer) {
|
|
499
|
+
stylingContainer.appendChild(cssFile);
|
|
500
|
+
}
|
|
501
|
+
})
|
|
502
|
+
.catch((err) => {
|
|
503
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* @name setStreamLibrary
|
|
509
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
510
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
511
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
512
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
513
|
+
*/
|
|
514
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
515
|
+
if (window.emMessageBus) {
|
|
516
|
+
const sheet = document.createElement('style');
|
|
517
|
+
|
|
518
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
519
|
+
sheet.innerHTML = data;
|
|
520
|
+
if (stylingContainer) {
|
|
521
|
+
stylingContainer.appendChild(sheet);
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
469
527
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
470
528
|
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
471
529
|
|
|
@@ -473,38 +531,47 @@ const GeneralStylingWrapper = class {
|
|
|
473
531
|
constructor(hostRef) {
|
|
474
532
|
registerInstance(this, hostRef);
|
|
475
533
|
this.stylingAppends = false;
|
|
476
|
-
this.setClientStyling = () => {
|
|
477
|
-
let sheet = document.createElement('style');
|
|
478
|
-
sheet.innerHTML = this.clientStyling;
|
|
479
|
-
this.el.prepend(sheet);
|
|
480
|
-
};
|
|
481
|
-
this.setClientStylingURL = () => {
|
|
482
|
-
let url = new URL(this.clientStylingUrl);
|
|
483
|
-
let cssFile = document.createElement('style');
|
|
484
|
-
fetch(url.href)
|
|
485
|
-
.then((res) => res.text())
|
|
486
|
-
.then((data) => {
|
|
487
|
-
cssFile.innerHTML = data;
|
|
488
|
-
setTimeout(() => {
|
|
489
|
-
this.el.prepend(cssFile);
|
|
490
|
-
}, 1);
|
|
491
|
-
})
|
|
492
|
-
.catch((err) => {
|
|
493
|
-
console.log('error ', err);
|
|
494
|
-
});
|
|
495
|
-
};
|
|
496
534
|
this.clientStyling = '';
|
|
497
535
|
this.clientStylingUrl = '';
|
|
536
|
+
this.mbSource = undefined;
|
|
498
537
|
this.translationUrl = '';
|
|
499
538
|
this.targetTranslations = undefined;
|
|
500
539
|
}
|
|
540
|
+
componentDidLoad() {
|
|
541
|
+
if (this.el) {
|
|
542
|
+
if (window.emMessageBus != undefined) {
|
|
543
|
+
setStreamStyling(this.el, `${this.mbSource}.Style`);
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
if (this.clientStyling)
|
|
547
|
+
setClientStyling(this.el, this.clientStyling);
|
|
548
|
+
if (this.clientStylingUrl)
|
|
549
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
550
|
+
this.stylingAppends = true;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
disconnectedCallback() {
|
|
555
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
556
|
+
}
|
|
557
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
558
|
+
if (newValue != oldValue) {
|
|
559
|
+
setClientStyling(this.el, this.clientStyling);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
563
|
+
if (newValue != oldValue) {
|
|
564
|
+
if (this.clientStylingUrl)
|
|
565
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
501
568
|
componentDidRender() {
|
|
502
569
|
// start custom styling area
|
|
503
570
|
if (!this.stylingAppends) {
|
|
504
571
|
if (this.clientStyling)
|
|
505
|
-
this.
|
|
572
|
+
setClientStyling(this.el, this.clientStyling);
|
|
506
573
|
if (this.clientStylingUrl)
|
|
507
|
-
this.
|
|
574
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
508
575
|
this.stylingAppends = true;
|
|
509
576
|
}
|
|
510
577
|
// end custom styling area
|
|
@@ -518,9 +585,13 @@ const GeneralStylingWrapper = class {
|
|
|
518
585
|
return await Promise.all(promises);
|
|
519
586
|
}
|
|
520
587
|
render() {
|
|
521
|
-
return (h("div", { key: '
|
|
588
|
+
return (h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
|
|
522
589
|
}
|
|
523
590
|
get el() { return getElement(this); }
|
|
591
|
+
static get watchers() { return {
|
|
592
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
593
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
594
|
+
}; }
|
|
524
595
|
};
|
|
525
596
|
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
526
597
|
|
|
@@ -991,6 +1062,7 @@ const PlayerElevatePointcard = class {
|
|
|
991
1062
|
this.session = undefined;
|
|
992
1063
|
this.playerAvatarUrl = undefined;
|
|
993
1064
|
this.language = 'en';
|
|
1065
|
+
this.mbSource = undefined;
|
|
994
1066
|
this.playerName = undefined;
|
|
995
1067
|
this.cardTitle = undefined;
|
|
996
1068
|
this.buttonType = 'earningRule';
|
|
@@ -1035,9 +1107,9 @@ const PlayerElevatePointcard = class {
|
|
|
1035
1107
|
render() {
|
|
1036
1108
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
1037
1109
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
1038
|
-
return (h("div", { key: '
|
|
1110
|
+
return (h("div", { key: '45aa5be359b46d5503a8310daa4db2029a8c59b8', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '0d1773bd9eb0913ede4eeedfc93f22967aa133d6', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'cfb35c5220633e39e25b11f0be5b6fc5cc73df5c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: '25206c4deb6e51e3ea60259d4fee3452df8253d6', params: this.paramProxy }), h("div", { key: 'c14ee3498a1a584b7f484fe2ef6a204c337d2b27', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'dd7e0528034013d889f1f9bfbacf7928d2b4d1e9', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '20b36f112f735446a6219b61e012e4568f199717' }, h("div", { key: '3705136c1ee509484f43b7268b23cfbe273f727c', class: "PlayerImg" }, h(PlayerAvatar, { key: 'b81cbcff0528acd3253a676e0a64141c6414fc2a', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: 'ba1744b3b9cee03a424093df96454ff68d04aec1', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate$1('spendablePoints', this.language)), h("div", { key: '6b554d17a0f74684e23549365fb06f6079ba7239', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: '6c9f812eccea99cd94095c252ba552816f800447', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: 'eb79d25c2ccce8c542a192c1ca07265649dbd1bc', class: "TC", onClick: () => {
|
|
1039
1111
|
this.onDetailsClick();
|
|
1040
|
-
} }, translate$1('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '
|
|
1112
|
+
} }, translate$1('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: 'e64127c87c4c4a3e5253606e2c4c472e9b728103', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
1041
1113
|
}
|
|
1042
1114
|
static get watchers() { return {
|
|
1043
1115
|
"session": ["onSessionOrEndpointChange"],
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["bonus-elevate-shop_5",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["bonus-elevate-shop_5",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[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,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-loyaltycard",[[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -15,6 +15,7 @@ const PlayerElevateCard = class {
|
|
|
15
15
|
this.language = 'en';
|
|
16
16
|
this.playerName = undefined;
|
|
17
17
|
this.dateFormat = 'yyyy-MM-dd';
|
|
18
|
+
this.mbSource = undefined;
|
|
18
19
|
this.clientStyling = '';
|
|
19
20
|
this.clientStylingUrl = '';
|
|
20
21
|
this.translationUrl = '';
|
|
@@ -57,7 +58,7 @@ const PlayerElevateCard = class {
|
|
|
57
58
|
render() {
|
|
58
59
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
59
60
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
60
|
-
return (h("div", { key: '
|
|
61
|
+
return (h("div", { key: 'e976417483a756b8f67d70feb09afb544efb3802', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '5de2dbc7d093bbcbe7b415122effa691c058ddb6', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '1a5b13640d37efab6dacee24e27f9f2bdc83cd0c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: 'e80389984932f77408c772ad9cb130de99e88504', params: this.paramProxy }), h("div", { key: 'fec6145e06a300bc044fec2f96e61dfe86f44d6c', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, { key: '90b1f057c5d1d5ae286a75c3d30182c16593bbe6' }, h("div", { key: 'cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91', class: 'Content Row' }, h("div", { key: 'f3348ba8eb7bcb08085ab49ce2059c7fd86f862f', class: "PlayerImg" }, h(PlayerAvatar, { key: '8fa96d942ee70d43ea0231b87f5d5de0b72198df', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { key: 'f774e833169326404d44dd8c2361bd89f0e5a9e6', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { key: 'c85b28e71be4e13df275f2ae74f5b0c9538b3cda', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { key: '63ef752d5e25c3a65e5af7977b9e9f4846b8ba45', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { key: '7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4', playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { key: '38d7c5aed410c9bf55e9640a98f6f74fc2d38291', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, { key: '2e1305ff3bea4cb2f432f1187c40bb36a1464627' }), h(PlayerElevateCardRedeem, { key: '427405f246bec7a028b5164fc70292b769ea609b', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
61
62
|
}
|
|
62
63
|
static get assetsDirs() { return ["../static"]; }
|
|
63
64
|
static get watchers() { return {
|
|
@@ -71,8 +71,8 @@ const PlayerElevateLoyaltycard = class {
|
|
|
71
71
|
render() {
|
|
72
72
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
73
73
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
74
|
-
return (h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '
|
|
75
|
-
h(LoyaltyLevelExpireDay, { key: '
|
|
74
|
+
return (h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '3648821972ac115a1c33705463cdc2cdb427a95b', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: '7b36c46a869bd4b014d1f04dbb718445b23ec964', params: this.paramProxy }), h("div", { key: 'f4e5aa453459f693e07c166028aec9b0b696c907', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'd5f1894120cba3e7cf3c54b838a025f469bc445e', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '112ee04598b23dda6911f043101c0c1631454d7f' }, h("div", { key: '7af4b6e937bbe73cc00aae0f27f8c93da47bb626', class: "PlayerImg" }, h(PlayerAvatar, { key: '1b5037bfa196063f56cccd947c988a3aca0781b0', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '7b714e446f4e01edd4f4aefcc035d070b7d6a47b', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: '37ad8ce5dae374685e74f6772d28e79d251932e3', class: 'CardCell ElevateLevel' }, h("span", { key: '2d9dcf4b08fcecc927d3e8bdca74c75ff4336480', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), h("div", { key: 'cc89cbaa70d9583b9626da15e98f9fd61d82f81f', class: 'PointsRange' }, h(PlayerPoints, { key: '32de4cac05a4fd5610af857b25e096a7cb9ba34d', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), h(PlayerPoints, { key: '298f492c8991384547c31396fc930b5c21f41501', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), h(PlayerLoyaltyProcess, { key: 'aca4f5642c41db1c4b7fa04411331a5c25c655dd' }), h("div", { key: 'd841c5df319de105376c6eee24bc685757916aae', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (h("div", { key: '774279829f3f52ee5696550a855a833b39df8c81', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
|
|
75
|
+
h(LoyaltyLevelExpireDay, { key: '3a4319e502e85b26cb220942492b161ad842be82', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
|
|
76
76
|
}
|
|
77
77
|
static get watchers() { return {
|
|
78
78
|
"session": ["onSessionOrEndpointChange"],
|
|
@@ -27,6 +27,7 @@ const PlayerRakebackCard = class {
|
|
|
27
27
|
this.theme = 'Dark';
|
|
28
28
|
this.session = undefined;
|
|
29
29
|
this.language = 'en';
|
|
30
|
+
this.mbSource = undefined;
|
|
30
31
|
this.clientStyling = '';
|
|
31
32
|
this.clientStylingUrl = '';
|
|
32
33
|
this.translationUrl = '';
|
|
@@ -140,7 +141,7 @@ const PlayerRakebackCard = class {
|
|
|
140
141
|
await this.onShowOrHasRakebackWalletChange();
|
|
141
142
|
}
|
|
142
143
|
render() {
|
|
143
|
-
return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
|
|
144
|
+
return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
|
|
144
145
|
lang: this.language,
|
|
145
146
|
minutes: this.rakebackInfo.minutesCanClaim
|
|
146
147
|
})))))) : null;
|
|
@@ -27,6 +27,10 @@ export namespace Components {
|
|
|
27
27
|
* The item account showed on per page
|
|
28
28
|
*/
|
|
29
29
|
"limit": number;
|
|
30
|
+
/**
|
|
31
|
+
* Client custom styling via streamStyling
|
|
32
|
+
*/
|
|
33
|
+
"mbSource": string;
|
|
30
34
|
/**
|
|
31
35
|
* The nav items count on pagination, default 5
|
|
32
36
|
*/
|
|
@@ -93,6 +97,10 @@ declare namespace LocalJSX {
|
|
|
93
97
|
* The item account showed on per page
|
|
94
98
|
*/
|
|
95
99
|
"limit"?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Client custom styling via streamStyling
|
|
102
|
+
*/
|
|
103
|
+
"mbSource"?: string;
|
|
96
104
|
/**
|
|
97
105
|
* The nav items count on pagination, default 5
|
|
98
106
|
*/
|