@everymatrix/bonus-elevate-shop 1.67.0 → 1.68.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.
|
@@ -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-a874e9d5.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;for(let i in t[e]){if(!n.en[i])return;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)}))})));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:"4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17",class:`ElevateCardWrapper ${this.theme}`},e("div",{key:"ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253",class:"PointsCard Outer ",style:{backgroundImage:`url(${t}`}},e("general-styling-wrapper",{key:"c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl}),e("player-elevate-card-data",{key:"4371faac6967c5b3eced57f6251064ea4e1d6a65",params:this.paramProxy}),e("div",{key:"c78235a6fdc2aed90df898f007b5ee091cece8dc",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},e("div",{key:"025e779223c1c85c11998be8389a8ff836a31e6c",class:"Content Row"},this.playerElevateLevel&&e(r,{key:"68daa6047dc93d2596d8b2309a26f56960737617"},e("div",{key:"6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319",class:"PlayerImg"},e(g,{key:"aeaf35ad8055ad4f7312922c8600ea58d09be74f",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),e("div",{key:"bd51ce868b4d8a547f40ec55548bbf3cfa416534",class:`LevelInfo ${this.playerElevateLevel.name}`},e("div",{key:"5f4d77a5b43c8efee850b9813bc1c8e61d27d45d",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:l("spendablePoints")),e("div",{key:"bae5dc76d00c98aed803601c19fe3bf1aa4418d5",class:"PointsTxt SPPoints"},e(p,{key:"59d51bd37f44ed23108fc4356af41c01668354e3",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),e("a",{key:"3a923bea242ae5fa412f4448dca7277b3588621e",class:"TC",onClick:()=>{this.onDetailsClick()}},l("termAndConditions",this.language))),this.pointExpireString&&e("div",{key:"8803ae8d343885da58dfa04b9a4474ff473b5a74",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-a874e9d5.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)}))})));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:"4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17",class:`ElevateCardWrapper ${this.theme}`},e("div",{key:"ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253",class:"PointsCard Outer ",style:{backgroundImage:`url(${t}`}},e("general-styling-wrapper",{key:"c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl}),e("player-elevate-card-data",{key:"4371faac6967c5b3eced57f6251064ea4e1d6a65",params:this.paramProxy}),e("div",{key:"c78235a6fdc2aed90df898f007b5ee091cece8dc",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},e("div",{key:"025e779223c1c85c11998be8389a8ff836a31e6c",class:"Content Row"},this.playerElevateLevel&&e(r,{key:"68daa6047dc93d2596d8b2309a26f56960737617"},e("div",{key:"6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319",class:"PlayerImg"},e(g,{key:"aeaf35ad8055ad4f7312922c8600ea58d09be74f",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),e("div",{key:"bd51ce868b4d8a547f40ec55548bbf3cfa416534",class:`LevelInfo ${this.playerElevateLevel.name}`},e("div",{key:"5f4d77a5b43c8efee850b9813bc1c8e61d27d45d",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:l("spendablePoints")),e("div",{key:"bae5dc76d00c98aed803601c19fe3bf1aa4418d5",class:"PointsTxt SPPoints"},e(p,{key:"59d51bd37f44ed23108fc4356af41c01668354e3",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),e("a",{key:"3a923bea242ae5fa412f4448dca7277b3588621e",class:"TC",onClick:()=>{this.onDetailsClick()}},l("termAndConditions",this.language))),this.pointExpireString&&e("div",{key:"8803ae8d343885da58dfa04b9a4474ff473b5a74",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}
|
|
@@ -444,8 +444,8 @@ const mergeTranslations = (url, target) => {
|
|
|
444
444
|
.then((data) => {
|
|
445
445
|
Object.keys(data).forEach((item) => {
|
|
446
446
|
target[item] = target[item] || target['en'];
|
|
447
|
-
|
|
448
|
-
//if there is
|
|
447
|
+
Object.keys(data[item]).forEach((key) => {
|
|
448
|
+
//if there is not key in target, do nothing
|
|
449
449
|
if (!target['en'][key]) {
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
@@ -459,7 +459,7 @@ const mergeTranslations = (url, target) => {
|
|
|
459
459
|
else {
|
|
460
460
|
target[item][key] = data[item][key];
|
|
461
461
|
}
|
|
462
|
-
}
|
|
462
|
+
});
|
|
463
463
|
});
|
|
464
464
|
resolve(true);
|
|
465
465
|
});
|
|
@@ -440,8 +440,8 @@ const mergeTranslations = (url, target) => {
|
|
|
440
440
|
.then((data) => {
|
|
441
441
|
Object.keys(data).forEach((item) => {
|
|
442
442
|
target[item] = target[item] || target['en'];
|
|
443
|
-
|
|
444
|
-
//if there is
|
|
443
|
+
Object.keys(data[item]).forEach((key) => {
|
|
444
|
+
//if there is not key in target, do nothing
|
|
445
445
|
if (!target['en'][key]) {
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
@@ -455,7 +455,7 @@ const mergeTranslations = (url, target) => {
|
|
|
455
455
|
else {
|
|
456
456
|
target[item][key] = data[item][key];
|
|
457
457
|
}
|
|
458
|
-
}
|
|
458
|
+
});
|
|
459
459
|
});
|
|
460
460
|
resolve(true);
|
|
461
461
|
});
|