@everymatrix/bonus-elevate-shop-item 1.69.0 → 1.69.3
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-item/bonus-elevate-shop-assets-slider_3.entry.js +1 -1
- package/dist/bonus-elevate-shop-item/bonus-elevate-shop-item.esm.js +1 -1
- package/dist/bonus-elevate-shop-item/{index-7750792f.js → index-fca048d8.js} +2 -2
- package/dist/cjs/bonus-elevate-shop-assets-slider_3.cjs.entry.js +105 -27
- package/dist/cjs/bonus-elevate-shop-item.cjs.js +2 -2
- package/dist/cjs/{index-0f3e5ac0.js → index-ad2fddb6.js} +28 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.js +21 -3
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.stories.js +4 -0
- package/dist/collection/utils/locale.utils.js +3 -0
- package/dist/esm/bonus-elevate-shop-assets-slider_3.entry.js +105 -27
- package/dist/esm/bonus-elevate-shop-item.js +3 -3
- package/dist/esm/{index-7750792f.js → index-fca048d8.js} +28 -2
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bonus-elevate-shop-item/bonus-elevate-shop-item.d.ts +2 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,g as i,c as a,F as s,H as o}from"./index-7750792f.js";const r=class{constructor(t){e(this,t),this.xDown=null,this.yDown=null,this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.showSliderDots=!1,this.showSliderArrows=!0,this.itemsPerPage=1,this.sliderItems=[],this.activeIndex=0}setActive(e){var t;const i=null===(t=this.sliderItems)||void 0===t?void 0:t.length;this.activeIndex=e>=0?e>=i-1?i-1:e:0}move(e){this.setActive(this.activeIndex+e)}goTo(e){let t=this.activeIndex-e;if(t>0)for(let e=0;e<t;e++)this.move(-1);else for(let e=0;e>t;e--)this.move(1)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.move(t>0?1:-1),this.xDown=null,this.yDown=null}recalculateItemsPerPage(){this.sliderItemsElement&&(this.itemElementWidth=this.sliderItemsElement.clientWidth,this.sliderItemsElementWidth=(this.sliderItems.length-1)*this.itemElementWidth)}renderDots(){var e;const i=[];for(let a=0;a<(null===(e=this.sliderItems)||void 0===e?void 0:e.length)/this.itemsPerPage;a++)i.push(t("li",{class:a==this.activeIndex?"active":"default",onClick:()=>{this.goTo(a),this.setActive(a)}}));return i}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage()}componentDidUpdate(){this.recalculateItemsPerPage()}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}render(){var e;const i={transform:`translate(${this.sliderItemsElementWidth/((null===(e=this.sliderItems)||void 0===e?void 0:e.length)-1)*this.activeIndex*-1}px, 0px)`},a={width:this.itemElementWidth/this.itemsPerPage+"px"};return t("div",{key:"3740bd5b367f4e24f0b4391dc7f25c63ccb12958",class:"SliderWrapper"},t("div",{key:"6aac842f54de59cea8b2f2655e8408a8778702d4",class:"MainContent "},this.showSliderArrows&&t("div",{key:"94de38b6a631824bbe15964d70377639af769917",class:`SliderNavButton LeftArrow ${0===this.activeIndex?"DisabledArrow ":""} ${1===this.sliderItems.length?"HiddenArrow ":""}`,onClick:()=>this.move(-1)},t("svg",{key:"382d3d0c54932b359b2be4b9ed8c3db3c6da49ec",fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"9b4d592aa650ddff2fbd8625a8b0a5d1b604c723","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"b3ec493624a11931eb48e44eb620373b2613d0a8",class:"ItemsWrapper",ref:e=>this.sliderItemsElement=e},t("div",{key:"724e11f1b3899c0f4bb179fff9b60f40c363e7f1",class:"Items AssetsItems",style:i},this.sliderItems.map((e=>t("img",{class:`img${this.itemsPerPage}`,alt:"Gift Thumbnails",style:a,src:e}))))),this.showSliderArrows&&t("div",{key:"2791a14781f73619c122401a97a9833e33787282",class:`SliderNavButton RightArrow ${1===this.sliderItems.length?"HiddenArrow ":""}\n ${this.activeIndex===this.sliderItems.length-1||this.itemsPerPage==this.sliderItems.length?"DisabledArrow":""}`,onClick:()=>this.move(1)},t("svg",{key:"3810b14f2a0fc436601186335a01b7af90aabab5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"18178c52a74cf77c856f65b6f377a350fc672db8","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))),this.showSliderDots&&this.sliderItems.length>1&&t("div",{key:"83964fb11e6728adb065958ebfbf17902e301b2e",class:"DotsWrapper"},t("ul",{key:"cafab68d463e25a0847306314c64041bc3f107f7",class:"Dots"},this.renderDots())))}get el(){return i(this)}},d={en:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},ro:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},fr:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},ar:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},hu:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"}},n=(e,t)=>d[t||"en"][e]||d.en[e],l=class{constructor(t){e(this,t),this.redeemGiftButton=a(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.deviceType=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})(),this.endpoint=void 0,this.language="en",this.itemId=void 0,this.elevateGift=void 0,this.session=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showSliderDots=!1,this.showSliderArrows=!0,this.isGiftNotFound=!1,this.redeemErrorMsg="",this.isRedeeming=!1}redeemGiftConfirm(){this.isRedeeming||"true"!=this.elevateGift.available||window.postMessage({type:"BEERedeemConfirm",shopItem:this.elevateGift},window.location.href)}handleMessage(e){e.data&&"bee-redeem-confirmed"===e.data.type&&e.data.id==this.elevateGift.id&&this.redeemGift()}onBackClicked(){window.postMessage({type:"OnGiftDetailsBackButtonClicked"},window.location.href)}redeemGift(){if("false"===this.elevateGift.available.toLowerCase()||this.isRedeeming)return;let e=new URL(`${this.endpoint}/v1/elevate/redeem`),t={method:"PUT",headers:{"x-SessionId":this.session,"Content-Type":"application/json-patch+json"},body:JSON.stringify({giftId:this.elevateGift.id})};this.redeemErrorMsg="",this.isRedeeming=!0,fetch(e.toString(),t).then((e=>e.json())).then((e=>{if(e.success)this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:this.elevateGift.id},window.location.href);else{let t=n(`error${e.errorCode}`,this.language);this.redeemErrorMsg=t||n("redeemFailed",this.language),window.postMessage({type:"BEEGiftRedeemFailed",itemId:this.elevateGift.id,res:e},window.location.href)}})).catch((e=>{window.postMessage({type:"BEEGiftClaimFailed",itemId:this.elevateGift.id,err:e},window.location.href)})).finally((()=>{this.isRedeeming=!1}))}async loadElevateGift(){let e=new URL(`${this.endpoint}/v1/elevate/shop?language=${this.language}&filter=id=${this.itemId}`),t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET"};await new Promise((i=>{fetch(e.href,t).then((e=>e.json())).then((e=>{let t=e.data;t&&1==t.length?(this.elevateGift=t[0],this.isGiftNotFound=!1):this.isGiftNotFound=!0,i(!0)}))}))}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}async componentWillLoad(){var e;this.translationUrl.length>2&&await(e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{d[t]=d[t]||{};for(let i in e[t])d[t][i]=e[t][i]})),t(!0)}))}))),this.elevateGift?this.isGiftNotFound=!1:await this.loadElevateGift()}render(){return t(o,{key:"a2a758ab006921f8ec338fda72ab48518f964f3a"},t("general-styling-wrapper",{key:"e1c4d819b7d41706380cd2353eb6da4c82dae256",clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling}),t("div",{key:"5bb49371ddf5c55969132b0d33fe30095779fecb",class:"ElevateDetails"},this.isGiftNotFound&&t(s,{key:"dd7e3a21bedfa2d4ead0553d168a3c087268004d"},t("div",{key:"065b3c57d55abe302ec6a38d6522b3ebe98404b9",class:"Row ThumbnailRow"},t("div",{key:"81f4b48c4ec79824d23a98127a232fa3ed8933fd",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"255d69ec2b508e36d0eac44d97bf75a3f9715eb6",class:"BackArrow",innerHTML:"<"}),t("span",{key:"76867b36d03809eaa6a334c09817640d19ca6273",class:"BackTxt"}," ",n("back",this.language)," "))),t("div",{key:"c43cdf9911df9895f6e947bb1b160ba05f495027",class:"Thumnails GiftNotFound"},n("noDataFound",this.language),".")),this.elevateGift&&t(s,{key:"0c53a7450d3e6c86933c7612346471dfb9bd1b76"},t("div",{key:"9c2d934e82e4147b9f77e91a45548abb568b24ff",class:"ThumbnailRow"},t("div",{key:"0ba463a1262c0b9aad66407d201060240f90e695",class:"Row"},t("div",{key:"b16e46f40ec7a2d48d88adf2123929d2d107f42a",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"dec9e77e0cc5e5df846cbce61c79fa5c2a7af194",class:"BackArrow",innerHTML:"<"}),t("span",{key:"013fcd5ae4702bcf2b1a2f4fadea810896501a7e",class:"BackTxt"}," ",n("back",this.language)," ")),t("bonus-elevate-shop-assets-slider",{key:"e72ed5a7a62411a840190da1d88eafc35e060086",class:"Thumbnails",itemsPerPage:1,sliderItems:this.elevateGift.presentation.assets,showSliderDots:this.showSliderDots})),t("div",{key:"da8e89af090202073a213f708b5d991dcd0bf46f",class:"Col Details"},t("h3",{key:"f057ad4ea2d08c7ece777cf97c4363f36fae74a8",class:"GiftName"},this.elevateGift.presentation.displayName||this.elevateGift.displayName),t("div",{key:"48349d04e8057979453b4497f65d576cd68786bd",class:"GiftPoints"},t("span",{key:"f89912c2447b3d800673a12076aea4344bc8d110",class:"Points"},this.elevateGift.points," "),t("span",{key:"695faa9923ba7d83601ed84d52ae23a8628a4b6f",class:" PointsLabel"},n("coins",this.language))))),t("div",{key:"55f40001d80c1358c458e4a44e464850e683f8ff",class:"ShopItemDetail Details"},t("div",{key:"ce5da55a6b0913a38cb6a2896da9d0a8007434bc",class:"GiftPresentation"},t("p",{key:"83cc1faf299250619be468a2209b1f89e210173d"},this.elevateGift.presentation.description?this.elevateGift.presentation.description:n("noGiftPresentation",this.language))),t("div",{key:"5c5cfb64bc73e6161a64e91e048be70f5783fb8b",class:`RedeemButton ${"false"===this.elevateGift.available||this.isRedeeming?"Disabled deactive":" active "}\n ${"dk"==this.deviceType?"DkButton":""}`,onClick:this.redeemGiftConfirm.bind(this)},n("redeemGift",this.language)),t("span",{key:"ef2e12788cc82b7f199637fbbea9480d679abc4c",class:"RedeemError Error"}," ",this.redeemErrorMsg," ")))))}};l.style=":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emw--color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:100px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:rgb(227, 222, 222)}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emw--color-gray-300, rgb(78, 90, 55));font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton{width:150px;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)}.ElevateDetails .RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.ElevateDetails .RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.ElevateDetails .RedeemButton.deactive,.ElevateDetails .RedeemButton.disabled{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:rgb(239, 239, 239);border:1px solid rgb(239, 239, 239);border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emw--color-secondary, #FD2839);background:var(--emw--color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emw--color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emw--color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emw--color-secondary, #FD2839);pointer-events:none}";const c=class{constructor(t){e(this,t),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 a=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]||i.en,Object.keys(t[e]).forEach((a=>{i.en[a]&&(i[e][a]=i[e][a]||i.en[a],"object"==typeof t[e][a]?Object.keys(t[e][a]).forEach((s=>{i[e][a][s]=t[e][a][s]})):i[e][a]=t[e][a])}))})),e(!0)}))})));e.push(a)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return i(this)}};c.style=":host{display:block}";export{r as bonus_elevate_shop_assets_slider,l as bonus_elevate_shop_item,c as general_styling_wrapper}
|
|
1
|
+
import{r as e,h as t,g as i,c as a,F as s,H as o}from"./index-fca048d8.js";const n=class{constructor(t){e(this,t),this.xDown=null,this.yDown=null,this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.showSliderDots=!1,this.showSliderArrows=!0,this.itemsPerPage=1,this.sliderItems=[],this.activeIndex=0}setActive(e){var t;const i=null===(t=this.sliderItems)||void 0===t?void 0:t.length;this.activeIndex=e>=0?e>=i-1?i-1:e:0}move(e){this.setActive(this.activeIndex+e)}goTo(e){let t=this.activeIndex-e;if(t>0)for(let e=0;e<t;e++)this.move(-1);else for(let e=0;e>t;e--)this.move(1)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.move(t>0?1:-1),this.xDown=null,this.yDown=null}recalculateItemsPerPage(){this.sliderItemsElement&&(this.itemElementWidth=this.sliderItemsElement.clientWidth,this.sliderItemsElementWidth=(this.sliderItems.length-1)*this.itemElementWidth)}renderDots(){var e;const i=[];for(let a=0;a<(null===(e=this.sliderItems)||void 0===e?void 0:e.length)/this.itemsPerPage;a++)i.push(t("li",{class:a==this.activeIndex?"active":"default",onClick:()=>{this.goTo(a),this.setActive(a)}}));return i}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage()}componentDidUpdate(){this.recalculateItemsPerPage()}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}render(){var e;const i={transform:`translate(${this.sliderItemsElementWidth/((null===(e=this.sliderItems)||void 0===e?void 0:e.length)-1)*this.activeIndex*-1}px, 0px)`},a={width:this.itemElementWidth/this.itemsPerPage+"px"};return t("div",{key:"3740bd5b367f4e24f0b4391dc7f25c63ccb12958",class:"SliderWrapper"},t("div",{key:"6aac842f54de59cea8b2f2655e8408a8778702d4",class:"MainContent "},this.showSliderArrows&&t("div",{key:"94de38b6a631824bbe15964d70377639af769917",class:`SliderNavButton LeftArrow ${0===this.activeIndex?"DisabledArrow ":""} ${1===this.sliderItems.length?"HiddenArrow ":""}`,onClick:()=>this.move(-1)},t("svg",{key:"382d3d0c54932b359b2be4b9ed8c3db3c6da49ec",fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"9b4d592aa650ddff2fbd8625a8b0a5d1b604c723","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"b3ec493624a11931eb48e44eb620373b2613d0a8",class:"ItemsWrapper",ref:e=>this.sliderItemsElement=e},t("div",{key:"724e11f1b3899c0f4bb179fff9b60f40c363e7f1",class:"Items AssetsItems",style:i},this.sliderItems.map((e=>t("img",{class:`img${this.itemsPerPage}`,alt:"Gift Thumbnails",style:a,src:e}))))),this.showSliderArrows&&t("div",{key:"2791a14781f73619c122401a97a9833e33787282",class:`SliderNavButton RightArrow ${1===this.sliderItems.length?"HiddenArrow ":""}\n ${this.activeIndex===this.sliderItems.length-1||this.itemsPerPage==this.sliderItems.length?"DisabledArrow":""}`,onClick:()=>this.move(1)},t("svg",{key:"3810b14f2a0fc436601186335a01b7af90aabab5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"18178c52a74cf77c856f65b6f377a350fc672db8","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))),this.showSliderDots&&this.sliderItems.length>1&&t("div",{key:"83964fb11e6728adb065958ebfbf17902e301b2e",class:"DotsWrapper"},t("ul",{key:"cafab68d463e25a0847306314c64041bc3f107f7",class:"Dots"},this.renderDots())))}get el(){return i(this)}},r={en:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},ro:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},fr:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},ar:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},hu:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"}},d=(e,t)=>r[t||"en"][e]||r.en[e],l=class{constructor(t){e(this,t),this.redeemGiftButton=a(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.deviceType=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})(),this.endpoint=void 0,this.language="en",this.itemId=void 0,this.elevateGift=void 0,this.session=void 0,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showSliderDots=!1,this.showSliderArrows=!0,this.isGiftNotFound=!1,this.redeemErrorMsg="",this.isRedeeming=!1}redeemGiftConfirm(){this.isRedeeming||"true"!=this.elevateGift.available||window.postMessage({type:"BEERedeemConfirm",shopItem:this.elevateGift},window.location.href)}handleMessage(e){e.data&&"bee-redeem-confirmed"===e.data.type&&e.data.id==this.elevateGift.id&&this.redeemGift()}onBackClicked(){window.postMessage({type:"OnGiftDetailsBackButtonClicked"},window.location.href)}redeemGift(){if("false"===this.elevateGift.available.toLowerCase()||this.isRedeeming)return;let e=new URL(`${this.endpoint}/v1/elevate/redeem`),t={method:"PUT",headers:{"x-SessionId":this.session,"Content-Type":"application/json-patch+json"},body:JSON.stringify({giftId:this.elevateGift.id})};this.redeemErrorMsg="",this.isRedeeming=!0,fetch(e.toString(),t).then((e=>e.json())).then((e=>{if(e.success)this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:this.elevateGift.id},window.location.href);else{let t=d(`error${e.errorCode}`,this.language);this.redeemErrorMsg=t||d("redeemFailed",this.language),window.postMessage({type:"BEEGiftRedeemFailed",itemId:this.elevateGift.id,res:e},window.location.href)}})).catch((e=>{window.postMessage({type:"BEEGiftClaimFailed",itemId:this.elevateGift.id,err:e},window.location.href)})).finally((()=>{this.isRedeeming=!1}))}async loadElevateGift(){let e=new URL(`${this.endpoint}/v1/elevate/shop?language=${this.language}&filter=id=${this.itemId}`),t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET"};await new Promise((i=>{fetch(e.href,t).then((e=>e.json())).then((e=>{let t=e.data;t&&1==t.length?(this.elevateGift=t[0],this.isGiftNotFound=!1):this.isGiftNotFound=!0,i(!0)}))}))}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}async componentWillLoad(){var e;this.translationUrl.length>2&&await(e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{r[t]=r[t]||{};for(let i in e[t])r[t][i]=e[t][i]})),t(!0)})).catch((e=>{console.error("Failed to load translations:",e),t(!1)}))}))),this.elevateGift?this.isGiftNotFound=!1:await this.loadElevateGift()}render(){return t(o,{key:"059f0eb449e36b30ce271306a9faf85b79197f36"},t("general-styling-wrapper",{key:"4b857c7d532d288c660fc9b9cfc28c17ba80c400",clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,mbSource:this.mbSource}),t("div",{key:"b400e365431afc6af40c11010b708a72525d4af6",class:"ElevateDetails"},this.isGiftNotFound&&t(s,{key:"93a532a9d25137fe02aca600c98237f08dbc5347"},t("div",{key:"b423b7b20c4e6829ecd5cf53ab860b909ac639d5",class:"Row ThumbnailRow"},t("div",{key:"eaafe445f831699a1f4a22bc951a68e211bc1eb1",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"70105de7173a933b921bd4a78c62c4d6e5cf847e",class:"BackArrow",innerHTML:"<"}),t("span",{key:"d695e223a899ae130355d5ee083a622b7cf131dd",class:"BackTxt"}," ",d("back",this.language)," "))),t("div",{key:"f9624e689b03b06c0937f81821ff4e00c0911851",class:"Thumnails GiftNotFound"},d("noDataFound",this.language),".")),this.elevateGift&&t(s,{key:"5c104bba7cd29706418cffa9ffdd20d13714bf2a"},t("div",{key:"c100262b2d4547e1a81108426fa07e6a66e8f560",class:"ThumbnailRow"},t("div",{key:"bf573c9685c7afe71239faced77bfaef4fab2a37",class:"Row"},t("div",{key:"10ff56e0df5eca9792428fc5279a79d79f619c56",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"899bbe9f1288b49743d51f4afec8b9237052b7f1",class:"BackArrow",innerHTML:"<"}),t("span",{key:"f4dd1b849114f4fd9743b6726394aacf444a6e7b",class:"BackTxt"}," ",d("back",this.language)," ")),t("bonus-elevate-shop-assets-slider",{key:"b11de8226e28e3038e70615093e07dd7ae896730",class:"Thumbnails",itemsPerPage:1,sliderItems:this.elevateGift.presentation.assets,showSliderDots:this.showSliderDots})),t("div",{key:"4084bea351593009e0a3a9dd3e3cb70b9d1a864c",class:"Col Details"},t("h3",{key:"2346e29ead91d6ace97f99fa768c46db704d1ab9",class:"GiftName"},this.elevateGift.presentation.displayName||this.elevateGift.displayName),t("div",{key:"835a0b059b2c0399cdb442a8376b0ef8ddf1c9e2",class:"GiftPoints"},t("span",{key:"73afb596b3b493736e67c3b62207b2dc7dbc27d9",class:"Points"},this.elevateGift.points," "),t("span",{key:"7a484d65195a5e6e32b079ca31410eefd239a240",class:" PointsLabel"},d("coins",this.language))))),t("div",{key:"f318deaf612752dc61b49e57b5751755800291ea",class:"ShopItemDetail Details"},t("div",{key:"2a7b77649b74baad93816eabf8413d0b45930f83",class:"GiftPresentation"},t("p",{key:"3ce1a1a6adb36127b3526e005a3ac49349349bfd"},this.elevateGift.presentation.description?this.elevateGift.presentation.description:d("noGiftPresentation",this.language))),t("div",{key:"e8f61acba748c582288e2053f61c7efc754bb8f9",class:`RedeemButton ${"false"===this.elevateGift.available||this.isRedeeming?"Disabled deactive":" active "}\n ${"dk"==this.deviceType?"DkButton":""}`,onClick:this.redeemGiftConfirm.bind(this)},d("redeemGift",this.language)),t("span",{key:"8cfe770fbbe29d1aebab26826146590cc1ecd177",class:"RedeemError Error"}," ",this.redeemErrorMsg," ")))))}};function c(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function h(e,t){const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}l.style=":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emw--color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:100px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:rgb(227, 222, 222)}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emw--color-gray-300, rgb(78, 90, 55));font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton{width:150px;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)}.ElevateDetails .RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.ElevateDetails .RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.ElevateDetails .RedeemButton.deactive,.ElevateDetails .RedeemButton.disabled{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:rgb(239, 239, 239);border:1px solid rgb(239, 239, 239);border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emw--color-secondary, #FD2839);background:var(--emw--color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emw--color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emw--color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emw--color-secondary, #FD2839);pointer-events:none}";const f=class{constructor(t){e(this,t),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 i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,e&&e.appendChild(i)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&c(this.el,this.clientStyling),this.clientStylingUrl&&h(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&c(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&h(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&c(this.el,this.clientStyling),this.clientStylingUrl&&h(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const a=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]||i.en,Object.keys(t[e]).forEach((a=>{i.en[a]&&(i[e][a]=i[e][a]||i.en[a],"object"==typeof t[e][a]?Object.keys(t[e][a]).forEach((s=>{i[e][a][s]=t[e][a][s]})):i[e][a]=t[e][a])}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(a)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},t("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};f.style=":host{display:block}";export{n as bonus_elevate_shop_assets_slider,l as bonus_elevate_shop_item,f as general_styling_wrapper}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./index-
|
|
1
|
+
import{p as e,b as t}from"./index-fca048d8.js";export{s as setNonce}from"./index-fca048d8.js";import{g as l}from"./app-globals-0f993ce5.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((async e=>(await l(),t([["bonus-elevate-shop-assets-slider_3",[[1,"bonus-elevate-shop-item",{endpoint:[513],language:[513],itemId:[1537,"item-id"],elevateGift:[1040],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],isGiftNotFound:[32],redeemErrorMsg:[32],isRedeeming:[32]}],[0,"bonus-elevate-shop-assets-slider",{showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],itemsPerPage:[514,"items-per-page"],sliderItems:[16],activeIndex:[32]}],[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"]}]]]],e))));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="undefined"!=typeof window?window:{},u=f.document||{head:{}},a={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},d=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&a.o?w(b):a.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(m),$(v),(p=m.length>0)&&a.raf(b)},w=e=>d().then(e),g=y(v,!0),k={},S=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>T});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,R,P=e=>{if(e.isOk)return e.value;throw e.value},T=e=>{if(e.isErr)return e.value;throw e.value},A=(e,t,...n)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof e&&!S(o))&&(o+=""),i&&r?c[c.length-1].i+=o:c.push(i?D(null,o):o),r=i)};if(f(n),t){t.key&&(l=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,L);const u=D(e,null);return u.u=t,c.length>0&&(u.h=c),u.p=l,u.m=s,u},D=(e,t)=>({o:0,v:e,i:t,$:null,h:null,u:null,p:null,m:null}),F={},L={forEach:(e,t)=>e.map(N).forEach(t),map:(e,t)=>e.map(N).map(t).map(U)},N=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.m,vtag:e.v,vtext:e.i}),U=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),A(e.vtag,t,...e.vchildren||[])}const t=D(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.m=e.vname,t},H=e=>n(e).$hostElement$,W=(e,t,n)=>{const o=H(e);return{emit:e=>q(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},q=(e,t,n)=>{const o=a.ce(t,n);return e.dispatchEvent(o),o},G=new WeakMap,V=e=>"sc-"+e.k,_=(e,t,n,o,s,i)=>{if(n!==o){let r=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=B(n),s=B(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if("ref"===t)o&&o(e);else if(r||"o"!==t[0]||"n"!==t[1]){const l=S(o);if((r||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?r=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(f,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(I);t=t.replace(J,""),n&&a.rel(e,t,n,l),o&&a.ael(e,t,o,l)}}},z=/\s/,B=e=>e?e.split(z):[],I="Capture",J=RegExp(I+"$"),K=(e,t,n)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,l=e&&e.u||k,s=t.u||k;for(const e of Q(Object.keys(l)))e in s||_(o,e,l[e],void 0,n,t.o);for(const e of Q(Object.keys(s)))_(o,e,l[e],s[e],n,t.o)};function Q(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var X=!1,Y=!1,Z=!1,ee=!1,te=(e,t,n,o)=>{var l;const s=t.h[n];let i,r,c,f=0;if(X||(Z=!0,"slot"===s.v&&(M&&o.classList.add(M+"-s"),s.o|=s.h?2:1)),null!==s.i)i=s.$=u.createTextNode(s.i);else if(1&s.o)i=s.$=u.createTextNode("");else{if(ee||(ee="svg"===s.v),i=s.$=u.createElementNS(ee?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!X&&2&s.o?"slot-fb":s.v),ee&&"foreignObject"===s.v&&(ee=!1),K(null,s,ee),null!=M&&i["s-si"]!==M&&i.classList.add(i["s-si"]=M),s.h)for(f=0;f<s.h.length;++f)r=te(e,s,f,i),r&&i.appendChild(r);"svg"===s.v?ee=!1:"foreignObject"===i.tagName&&(ee=!0)}return i["s-hn"]=R,3&s.o&&(i["s-sr"]=!0,i["s-cr"]=x,i["s-sn"]=s.m||"",i["s-rf"]=null==(l=s.u)?void 0:l.ref,c=e&&e.h&&e.h[n],c&&c.v===s.v&&e.$&&ne(e.$,!1)),i},ne=(e,t)=>{a.o|=1;const n=Array.from(e.childNodes);for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==R&&o["s-ol"]&&(pe(re(o),o,ie(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Z=!0),t&&ne(o,t)}a.o&=-2},oe=(e,t,n,o,l,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===R&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=te(null,n,l,e),i&&(o[l].$=i,pe(r,i,ie(t))))},le=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.$;he(t),e&&(Y=!0,e["s-ol"]?e["s-ol"].remove():ne(e,!0),e.remove())}}},se=(e,t,n=!1)=>e.v===t.v&&("slot"===e.v?e.m===t.m:!!n||e.p===t.p),ie=e=>e&&e["s-ol"]||e,re=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,ce=(e,t,n=!1)=>{const o=t.$=e.$,l=e.h,s=t.h,i=t.v,r=t.i;let c;null===r?(ee="svg"===i||"foreignObject"!==i&&ee,("slot"!==i||X)&&K(e,t,ee),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=t.length-1,d=t[0],h=t[a],p=o.length-1,m=o[0],v=o[p];for(;r<=a&&c<=p;)if(null==d)d=t[++r];else if(null==h)h=t[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(se(d,m,l))ce(d,m,l),d=t[++r],m=o[++c];else if(se(h,v,l))ce(h,v,l),h=t[--a],v=o[--p];else if(se(d,v,l))"slot"!==d.v&&"slot"!==v.v||ne(d.$.parentNode,!1),ce(d,v,l),pe(e,d.$,h.$.nextSibling),d=t[++r],v=o[--p];else if(se(h,m,l))"slot"!==d.v&&"slot"!==v.v||ne(h.$.parentNode,!1),ce(h,m,l),pe(e,h.$,d.$),h=t[--a],m=o[++c];else{for(f=-1,u=r;u<=a;++u)if(t[u]&&null!==t[u].p&&t[u].p===m.p){f=u;break}f>=0?(i=t[f],i.v!==m.v?s=te(t&&t[c],n,f,e):(ce(i,m,l),t[f]=void 0,s=i.$),m=o[++c]):(s=te(t&&t[c],n,c,e),m=o[++c]),s&&pe(re(d.$),s,ie(d.$))}r>a?oe(e,null==o[p+1]?null:o[p+1].$,n,o,c,p):c>p&&le(t,r,a)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),oe(o,null,t,s,0,s.length-1)):null!==l&&le(l,0,l.length-1),ee&&"svg"===i&&(ee=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:e.i!==r&&(o.data=r)},fe=e=>{const t=e.childNodes;for(const e of t)if(1===e.nodeType){if(e["s-sr"]){const n=e["s-sn"];e.hidden=!1;for(const o of t)if(o!==e)if(o["s-hn"]!==e["s-hn"]||""!==n){if(1===o.nodeType&&(n===o.getAttribute("slot")||n===o["s-sn"])||3===o.nodeType&&n===o["s-sn"]){e.hidden=!0;break}}else if(1===o.nodeType||3===o.nodeType&&""!==o.textContent.trim()){e.hidden=!0;break}}fe(e)}},ue=[],ae=e=>{let t,n,o;for(const l of e.childNodes){if(l["s-sr"]&&(t=l["s-cr"])&&t.parentNode){n=t.parentNode.childNodes;const e=l["s-sn"];for(o=n.length-1;o>=0;o--)if(t=n[o],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==l["s-hn"])if(de(t,e)){let n=ue.find((e=>e.S===t));Y=!0,t["s-sn"]=t["s-sn"]||e,n?(n.S["s-sh"]=l["s-hn"],n.j=l):(t["s-sh"]=l["s-hn"],ue.push({j:l,S:t})),t["s-sr"]&&ue.map((e=>{de(e.S,t["s-sn"])&&(n=ue.find((e=>e.S===t)),n&&!e.j&&(e.j=n.j))}))}else ue.some((e=>e.S===t))||ue.push({S:t})}1===l.nodeType&&ae(l)}},de=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,he=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(he)},pe=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),me=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},ve=(e,t)=>{if(e.o|=16,!(4&e.o))return me(e,e.C),g((()=>ye(e,t)));e.o|=512},ye=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(o=je(n,"componentWillLoad")),$e(o,(()=>we(e,n,t)))},$e=(e,t)=>be(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),be=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,we=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=V(t),l=r.get(o);if(e=11===e.nodeType?e:u,l)if("string"==typeof l){let s,i=G.get(e=e.head||e);if(i||G.set(e,i=new Set),!i.has(o)){{s=u.createElement("style"),s.innerHTML=l;const t=null!=(n=a.R)?n:j(u);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.o&&(s.innerHTML+=c),i&&i.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);ge(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>ke(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},ge=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{var o,l,s,i;const r=e.$hostElement$,c=e.M,f=e.P||D(null,null),d=(e=>e&&e.v===F)(t)?t:A(null,null,t);if(R=r.tagName,c.T&&(d.u=d.u||{},c.T.map((([e,t])=>d.u[t]=r[e]))),n&&d.u)for(const e of Object.keys(d.u))r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(d.u[e]=r[e]);if(d.v=null,d.o|=4,e.P=d,d.$=f.$=r.shadowRoot||r,M=r["s-sc"],X=!!(1&c.o),x=r["s-cr"],Y=!1,ce(f,d,n),a.o|=1,Z){ae(d.$);for(const e of ue){const t=e.S;if(!t["s-ol"]){const e=u.createTextNode("");e["s-nr"]=t,pe(t.parentNode,t["s-ol"]=e,t)}}for(const e of ue){const t=e.S,r=e.j;if(r){const e=r.parentNode;let n=r.nextSibling;{let s=null==(o=t["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===t["s-sn"]&&e===o.parentNode){for(o=o.nextSibling;o===t||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&e!==t.parentNode||t.nextSibling!==n)&&t!==n&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),pe(e,t,n),1===t.nodeType&&(t.hidden=null!=(s=t["s-ih"])&&s)),t&&"function"==typeof r["s-rf"]&&r["s-rf"](t)}else 1===t.nodeType&&(n&&(t["s-ih"]=null!=(i=t.hidden)&&i),t.hidden=!0)}}Y&&fe(d.$),a.o&=-2,ue.length=0,x=void 0})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},ke=e=>{const t=e.$hostElement$,n=e.t,o=e.C;je(n,"componentDidRender"),64&e.o?je(n,"componentDidUpdate"):(e.o|=64,Oe(t),je(n,"componentDidLoad"),e.A(t),o||Se()),e.O&&(e.O(),e.O=void 0),512&e.o&&w((()=>ve(e,!1))),e.o&=-517},Se=()=>{Oe(u.documentElement),w((()=>q(f,"appload",{detail:{namespace:"bonus-elevate-shop-item"}})))},je=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},Oe=e=>e.classList.add("hydrated"),Ee=(e,t,o)=>{var l,s;const i=e.prototype;if(t.D){const r=Object.entries(null!=(l=t.D)?l:{});if(r.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).F.get(t))(0,e)},set(o){((e,t,o,l)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${l.k}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.F.get(t),r=s.o,c=s.t;o=((e,t)=>null==e||S(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(o,l.D[t][0]),8&r&&void 0!==i||o===i||Number.isNaN(i)&&Number.isNaN(o)||(s.F.set(t,o),c&&2==(18&r)&&ve(s,!1))})(this,e,o,t)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,s){a.jmp((()=>{var r;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=t.L)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.L)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.T)||l.push([e,s])),s}))]))}}return e},Ce=e=>{je(e,"connectedCallback")},Me=e=>{je(e,"disconnectedCallback")},xe=(e,o={})=>{var l;const d=[],p=o.exclude||[],m=f.customElements,v=u.head,y=v.querySelector("meta[charset]"),$=u.createElement("style"),b=[];let w,g=!0;Object.assign(a,o),a.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let k=!1;if(e.map((e=>{e[1].map((o=>{const l={o:o[0],k:o[1],D:o[2],N:o[3]};4&l.o&&(k=!0),l.D=o[2],l.T=[];const c=l.k,f=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,M:n,F:new Map};o.U=new Promise((e=>o.A=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,l),1&l.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${l.k}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):a.jmp((()=>(e=>{if(!(1&a.o)){const t=n(e),o=t.M,l=()=>{};if(1&t.o)(null==t?void 0:t.t)?Ce(t.t):(null==t?void 0:t.U)&&t.U.then((()=>Ce(t.t)));else{t.o|=1,12&o.o&&(e=>{const t=e["s-cr"]=u.createComment("");t["s-cn"]=!0,pe(e,t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){me(t,t.C=n);break}}o.D&&Object.entries(o.D).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.H){const e=(e=>{const t=e.k.replace(/-/g,"_"),n=e.H;if(!n)return;const o=i.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(i.set(n,e),e[t])),s)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.k}#${t.W}" was not found`);o.isProxied||(Ee(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){s(e)}t.o&=-9,l(),Ce(t.t)}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=V(n);if(!r.has(t)){const o=()=>{};((e,t,n)=>{let o=r.get(e);h&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,r.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.C,c=()=>ve(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.o)){const e=n(this);(null==e?void 0:e.t)?Me(e.t):(null==e?void 0:e.U)&&e.U.then((()=>Me(e.t)))}})()))}componentOnReady(){return n(this).U}};
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="undefined"!=typeof window?window:{},u=f.document||{head:{}},a={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},d=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&a.o?w(b):a.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(m),$(v),(p=m.length>0)&&a.raf(b)},w=e=>d().then(e),g=y(v,!0),k={},S=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>T});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,R,P=e=>{if(e.isOk)return e.value;throw e.value},T=e=>{if(e.isErr)return e.value;throw e.value},A=(e,t,...n)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof e&&!S(o))&&(o+=""),i&&r?c[c.length-1].i+=o:c.push(i?D(null,o):o),r=i)};if(f(n),t){t.key&&(l=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,L);const u=D(e,null);return u.u=t,c.length>0&&(u.h=c),u.p=l,u.m=s,u},D=(e,t)=>({o:0,v:e,i:t,$:null,h:null,u:null,p:null,m:null}),F={},L={forEach:(e,t)=>e.map(N).forEach(t),map:(e,t)=>e.map(N).map(t).map(U)},N=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.m,vtag:e.v,vtext:e.i}),U=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),A(e.vtag,t,...e.vchildren||[])}const t=D(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.m=e.vname,t},H=e=>n(e).$hostElement$,W=(e,t,n)=>{const o=H(e);return{emit:e=>q(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},q=(e,t,n)=>{const o=a.ce(t,n);return e.dispatchEvent(o),o},G=new WeakMap,V=e=>"sc-"+e.k,_=(e,t,n,o,s,i)=>{if(n!==o){let r=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=B(n),s=B(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if("ref"===t)o&&o(e);else if(r||"o"!==t[0]||"n"!==t[1]){const l=S(o);if((r||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?r=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(f,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(I);t=t.replace(J,""),n&&a.rel(e,t,n,l),o&&a.ael(e,t,o,l)}}},z=/\s/,B=e=>e?e.split(z):[],I="Capture",J=RegExp(I+"$"),K=(e,t,n)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,l=e&&e.u||k,s=t.u||k;for(const e of Q(Object.keys(l)))e in s||_(o,e,l[e],void 0,n,t.o);for(const e of Q(Object.keys(s)))_(o,e,l[e],s[e],n,t.o)};function Q(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var X=!1,Y=!1,Z=!1,ee=!1,te=(e,t,n,o)=>{var l;const s=t.h[n];let i,r,c,f=0;if(X||(Z=!0,"slot"===s.v&&(M&&o.classList.add(M+"-s"),s.o|=s.h?2:1)),null!==s.i)i=s.$=u.createTextNode(s.i);else if(1&s.o)i=s.$=u.createTextNode("");else{if(ee||(ee="svg"===s.v),i=s.$=u.createElementNS(ee?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!X&&2&s.o?"slot-fb":s.v),ee&&"foreignObject"===s.v&&(ee=!1),K(null,s,ee),null!=M&&i["s-si"]!==M&&i.classList.add(i["s-si"]=M),s.h)for(f=0;f<s.h.length;++f)r=te(e,s,f,i),r&&i.appendChild(r);"svg"===s.v?ee=!1:"foreignObject"===i.tagName&&(ee=!0)}return i["s-hn"]=R,3&s.o&&(i["s-sr"]=!0,i["s-cr"]=x,i["s-sn"]=s.m||"",i["s-rf"]=null==(l=s.u)?void 0:l.ref,c=e&&e.h&&e.h[n],c&&c.v===s.v&&e.$&&ne(e.$,!1)),i},ne=(e,t)=>{a.o|=1;const n=Array.from(e.childNodes);for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==R&&o["s-ol"]&&(pe(re(o),o,ie(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Z=!0),t&&ne(o,t)}a.o&=-2},oe=(e,t,n,o,l,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===R&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=te(null,n,l,e),i&&(o[l].$=i,pe(r,i,ie(t))))},le=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.$;he(t),e&&(Y=!0,e["s-ol"]?e["s-ol"].remove():ne(e,!0),e.remove())}}},se=(e,t,n=!1)=>e.v===t.v&&("slot"===e.v?e.m===t.m:!!n||e.p===t.p),ie=e=>e&&e["s-ol"]||e,re=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,ce=(e,t,n=!1)=>{const o=t.$=e.$,l=e.h,s=t.h,i=t.v,r=t.i;let c;null===r?(ee="svg"===i||"foreignObject"!==i&&ee,("slot"!==i||X)&&K(e,t,ee),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=t.length-1,d=t[0],h=t[a],p=o.length-1,m=o[0],v=o[p];for(;r<=a&&c<=p;)if(null==d)d=t[++r];else if(null==h)h=t[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(se(d,m,l))ce(d,m,l),d=t[++r],m=o[++c];else if(se(h,v,l))ce(h,v,l),h=t[--a],v=o[--p];else if(se(d,v,l))"slot"!==d.v&&"slot"!==v.v||ne(d.$.parentNode,!1),ce(d,v,l),pe(e,d.$,h.$.nextSibling),d=t[++r],v=o[--p];else if(se(h,m,l))"slot"!==d.v&&"slot"!==v.v||ne(h.$.parentNode,!1),ce(h,m,l),pe(e,h.$,d.$),h=t[--a],m=o[++c];else{for(f=-1,u=r;u<=a;++u)if(t[u]&&null!==t[u].p&&t[u].p===m.p){f=u;break}f>=0?(i=t[f],i.v!==m.v?s=te(t&&t[c],n,f,e):(ce(i,m,l),t[f]=void 0,s=i.$),m=o[++c]):(s=te(t&&t[c],n,c,e),m=o[++c]),s&&pe(re(d.$),s,ie(d.$))}r>a?oe(e,null==o[p+1]?null:o[p+1].$,n,o,c,p):c>p&&le(t,r,a)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),oe(o,null,t,s,0,s.length-1)):null!==l&&le(l,0,l.length-1),ee&&"svg"===i&&(ee=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:e.i!==r&&(o.data=r)},fe=e=>{const t=e.childNodes;for(const e of t)if(1===e.nodeType){if(e["s-sr"]){const n=e["s-sn"];e.hidden=!1;for(const o of t)if(o!==e)if(o["s-hn"]!==e["s-hn"]||""!==n){if(1===o.nodeType&&(n===o.getAttribute("slot")||n===o["s-sn"])||3===o.nodeType&&n===o["s-sn"]){e.hidden=!0;break}}else if(1===o.nodeType||3===o.nodeType&&""!==o.textContent.trim()){e.hidden=!0;break}}fe(e)}},ue=[],ae=e=>{let t,n,o;for(const l of e.childNodes){if(l["s-sr"]&&(t=l["s-cr"])&&t.parentNode){n=t.parentNode.childNodes;const e=l["s-sn"];for(o=n.length-1;o>=0;o--)if(t=n[o],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==l["s-hn"])if(de(t,e)){let n=ue.find((e=>e.S===t));Y=!0,t["s-sn"]=t["s-sn"]||e,n?(n.S["s-sh"]=l["s-hn"],n.j=l):(t["s-sh"]=l["s-hn"],ue.push({j:l,S:t})),t["s-sr"]&&ue.map((e=>{de(e.S,t["s-sn"])&&(n=ue.find((e=>e.S===t)),n&&!e.j&&(e.j=n.j))}))}else ue.some((e=>e.S===t))||ue.push({S:t})}1===l.nodeType&&ae(l)}},de=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,he=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(he)},pe=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),me=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},ve=(e,t)=>{if(e.o|=16,!(4&e.o))return me(e,e.C),g((()=>ye(e,t)));e.o|=512},ye=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(o=je(n,"componentWillLoad")),$e(o,(()=>we(e,n,t)))},$e=(e,t)=>be(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),be=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,we=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=V(t),l=r.get(o);if(e=11===e.nodeType?e:u,l)if("string"==typeof l){let s,i=G.get(e=e.head||e);if(i||G.set(e,i=new Set),!i.has(o)){{s=u.createElement("style"),s.innerHTML=l;const t=null!=(n=a.R)?n:j(u);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.o&&(s.innerHTML+=c),i&&i.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);ge(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>ke(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},ge=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{var o,l,s,i;const r=e.$hostElement$,c=e.M,f=e.P||D(null,null),d=(e=>e&&e.v===F)(t)?t:A(null,null,t);if(R=r.tagName,c.T&&(d.u=d.u||{},c.T.map((([e,t])=>d.u[t]=r[e]))),n&&d.u)for(const e of Object.keys(d.u))r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(d.u[e]=r[e]);if(d.v=null,d.o|=4,e.P=d,d.$=f.$=r.shadowRoot||r,M=r["s-sc"],X=!!(1&c.o),x=r["s-cr"],Y=!1,ce(f,d,n),a.o|=1,Z){ae(d.$);for(const e of ue){const t=e.S;if(!t["s-ol"]){const e=u.createTextNode("");e["s-nr"]=t,pe(t.parentNode,t["s-ol"]=e,t)}}for(const e of ue){const t=e.S,r=e.j;if(r){const e=r.parentNode;let n=r.nextSibling;{let s=null==(o=t["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===t["s-sn"]&&e===o.parentNode){for(o=o.nextSibling;o===t||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&e!==t.parentNode||t.nextSibling!==n)&&t!==n&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),pe(e,t,n),1===t.nodeType&&(t.hidden=null!=(s=t["s-ih"])&&s)),t&&"function"==typeof r["s-rf"]&&r["s-rf"](t)}else 1===t.nodeType&&(n&&(t["s-ih"]=null!=(i=t.hidden)&&i),t.hidden=!0)}}Y&&fe(d.$),a.o&=-2,ue.length=0,x=void 0})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},ke=e=>{const t=e.$hostElement$,n=e.t,o=e.C;je(n,"componentDidRender"),64&e.o?je(n,"componentDidUpdate"):(e.o|=64,Oe(t),je(n,"componentDidLoad"),e.A(t),o||Se()),e.O&&(e.O(),e.O=void 0),512&e.o&&w((()=>ve(e,!1))),e.o&=-517},Se=()=>{Oe(u.documentElement),w((()=>q(f,"appload",{detail:{namespace:"bonus-elevate-shop-item"}})))},je=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},Oe=e=>e.classList.add("hydrated"),Ee=(e,t,o)=>{var l,i;const r=e.prototype;if(t.D||t.F||e.watchers){e.watchers&&!t.F&&(t.F=e.watchers);const c=Object.entries(null!=(l=t.D)?l:{});if(c.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).L.get(t))(0,e)},set(o){((e,t,o,l)=>{const i=n(e);if(!i)throw Error(`Couldn't find host element for "${l.k}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.L.get(t),f=i.o,u=i.t;if(o=((e,t)=>null==e||S(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(o,l.D[t][0]),(!(8&f)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.L.set(t,o),u)){if(l.F&&128&f){const e=l.F[t];e&&e.map((e=>{try{u[e](o,c,t)}catch(e){s(e,r)}}))}2==(18&f)&&ve(i,!1)}})(this,e,o,t)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;r.attributeChangedCallback=function(e,l,s){a.jmp((()=>{var i;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),r=null==o?void 0:o.o;if(r&&!(8&r)&&128&r&&s!==l){const n=o.t,r=null==(i=t.F)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=t.F)?i:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.T)||l.push([e,s])),s}))]))}}return e},Ce=e=>{je(e,"connectedCallback")},Me=e=>{je(e,"disconnectedCallback")},xe=(e,o={})=>{var l;const d=[],p=o.exclude||[],m=f.customElements,v=u.head,y=v.querySelector("meta[charset]"),$=u.createElement("style"),b=[];let w,g=!0;Object.assign(a,o),a.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let k=!1;if(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],k:o[1],D:o[2],N:o[3]};4&c.o&&(k=!0),c.D=o[2],c.T=[],c.F=null!=(l=o[4])?l:{};const f=c.k,v=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,M:n,L:new Map};o.U=new Promise((e=>o.A=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,c),1&c.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.k}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):a.jmp((()=>(e=>{if(!(1&a.o)){const t=n(e),o=t.M,l=()=>{};if(1&t.o)(null==t?void 0:t.t)?Ce(t.t):(null==t?void 0:t.U)&&t.U.then((()=>Ce(t.t)));else{t.o|=1,12&o.o&&(e=>{const t=e["s-cr"]=u.createComment("");t["s-cn"]=!0,pe(e,t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){me(t,t.C=n);break}}o.D&&Object.entries(o.D).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.H){const e=(e=>{const t=e.k.replace(/-/g,"_"),n=e.H;if(!n)return;const o=i.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(i.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.k}#${t.W}" was not found`);o.isProxied||(n.F=o.watchers,Ee(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){s(e)}t.o&=-9,t.o|=128,l(),Ce(t.t)}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=V(n);if(!r.has(t)){const o=()=>{};((e,t,n)=>{let o=r.get(e);h&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,r.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.C,c=()=>ve(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.o)){const e=n(this);(null==e?void 0:e.t)?Me(e.t):(null==e?void 0:e.U)&&e.U.then((()=>Me(e.t)))}})()))}componentOnReady(){return n(this).U}};c.H=e[0],p.includes(f)||m.get(f)||(d.push(f),m.define(f,Ee(v,c,1)))}))})),d.length>0&&(k&&($.textContent+=c),$.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(l=a.R)?l:j(u);null!=e&&$.setAttribute("nonce",e),v.insertBefore($,y?y.nextSibling:v.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):a.jmp((()=>w=setTimeout(Se,30)))},Re=(e,t)=>t,Pe=e=>a.R=e;export{Re as F,F as H,xe as b,W as c,H as g,A as h,d as p,o as r,Pe as s}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ad2fddb6.js');
|
|
6
6
|
|
|
7
7
|
const BonusElevateShopAssetsSlider = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -195,6 +195,9 @@ const getTranslations = (url) => {
|
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
resolve(true);
|
|
198
|
+
}).catch((err) => {
|
|
199
|
+
console.error("Failed to load translations:", err);
|
|
200
|
+
resolve(false);
|
|
198
201
|
});
|
|
199
202
|
});
|
|
200
203
|
};
|
|
@@ -247,6 +250,7 @@ const BonusElevateShopItem = class {
|
|
|
247
250
|
this.itemId = undefined;
|
|
248
251
|
this.elevateGift = undefined;
|
|
249
252
|
this.session = undefined;
|
|
253
|
+
this.mbSource = undefined;
|
|
250
254
|
this.clientStyling = '';
|
|
251
255
|
this.clientStylingUrl = '';
|
|
252
256
|
this.translationUrl = '';
|
|
@@ -348,10 +352,10 @@ const BonusElevateShopItem = class {
|
|
|
348
352
|
}
|
|
349
353
|
}
|
|
350
354
|
render() {
|
|
351
|
-
return (index.h(index.Host, { key: '
|
|
355
|
+
return (index.h(index.Host, { key: '059f0eb449e36b30ce271306a9faf85b79197f36' }, index.h("general-styling-wrapper", { key: '4b857c7d532d288c660fc9b9cfc28c17ba80c400', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, mbSource: this.mbSource }), index.h("div", { key: 'b400e365431afc6af40c11010b708a72525d4af6', class: 'ElevateDetails' }, this.isGiftNotFound && (index.h(index.Fragment, { key: '93a532a9d25137fe02aca600c98237f08dbc5347' }, index.h("div", { key: 'b423b7b20c4e6829ecd5cf53ab860b909ac639d5', class: "Row ThumbnailRow" }, index.h("div", { key: 'eaafe445f831699a1f4a22bc951a68e211bc1eb1', class: "BackButton", onClick: () => {
|
|
352
356
|
this.onBackClicked();
|
|
353
|
-
} }, index.h("span", { key: '
|
|
354
|
-
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), index.h("span", { key: '
|
|
357
|
+
} }, index.h("span", { key: '70105de7173a933b921bd4a78c62c4d6e5cf847e', class: "BackArrow", innerHTML: "<" }), index.h("span", { key: 'd695e223a899ae130355d5ee083a622b7cf131dd', class: "BackTxt" }, " ", translate('back', this.language), " "))), index.h("div", { key: 'f9624e689b03b06c0937f81821ff4e00c0911851', class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && index.h(index.Fragment, { key: '5c104bba7cd29706418cffa9ffdd20d13714bf2a' }, index.h("div", { key: 'c100262b2d4547e1a81108426fa07e6a66e8f560', class: "ThumbnailRow" }, index.h("div", { key: 'bf573c9685c7afe71239faced77bfaef4fab2a37', class: 'Row' }, index.h("div", { key: '10ff56e0df5eca9792428fc5279a79d79f619c56', class: "BackButton", onClick: () => { this.onBackClicked(); } }, index.h("span", { key: '899bbe9f1288b49743d51f4afec8b9237052b7f1', class: "BackArrow", innerHTML: "<" }), index.h("span", { key: 'f4dd1b849114f4fd9743b6726394aacf444a6e7b', class: "BackTxt" }, " ", translate('back', this.language), " ")), index.h("bonus-elevate-shop-assets-slider", { key: 'b11de8226e28e3038e70615093e07dd7ae896730', class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), index.h("div", { key: '4084bea351593009e0a3a9dd3e3cb70b9d1a864c', class: 'Col Details' }, index.h("h3", { key: '2346e29ead91d6ace97f99fa768c46db704d1ab9', class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), index.h("div", { key: '835a0b059b2c0399cdb442a8376b0ef8ddf1c9e2', class: "GiftPoints" }, index.h("span", { key: '73afb596b3b493736e67c3b62207b2dc7dbc27d9', class: "Points" }, this.elevateGift.points, " "), index.h("span", { key: '7a484d65195a5e6e32b079ca31410eefd239a240', class: " PointsLabel" }, translate('coins', this.language))))), index.h("div", { key: 'f318deaf612752dc61b49e57b5751755800291ea', class: 'ShopItemDetail Details' }, index.h("div", { key: '2a7b77649b74baad93816eabf8413d0b45930f83', class: "GiftPresentation" }, index.h("p", { key: '3ce1a1a6adb36127b3526e005a3ac49349349bfd' }, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), index.h("div", { key: 'e8f61acba748c582288e2053f61c7efc754bb8f9', class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled deactive' : ' active '}
|
|
358
|
+
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), index.h("span", { key: '8cfe770fbbe29d1aebab26826146590cc1ecd177', class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))));
|
|
355
359
|
}
|
|
356
360
|
};
|
|
357
361
|
BonusElevateShopItem.style = BonusElevateShopItemStyle0;
|
|
@@ -381,10 +385,71 @@ const mergeTranslations = (url, target) => {
|
|
|
381
385
|
});
|
|
382
386
|
});
|
|
383
387
|
resolve(true);
|
|
388
|
+
})
|
|
389
|
+
.catch(err => {
|
|
390
|
+
console.error("Failed to load translations:", err);
|
|
391
|
+
resolve(false);
|
|
384
392
|
});
|
|
385
393
|
});
|
|
386
394
|
};
|
|
387
395
|
|
|
396
|
+
/**
|
|
397
|
+
* @name setClientStyling
|
|
398
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
399
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
400
|
+
* @param {string} clientStyling The style content
|
|
401
|
+
*/
|
|
402
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
403
|
+
if (stylingContainer) {
|
|
404
|
+
const sheet = document.createElement('style');
|
|
405
|
+
sheet.innerHTML = clientStyling;
|
|
406
|
+
stylingContainer.appendChild(sheet);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @name setClientStylingURL
|
|
412
|
+
* @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
|
|
413
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
414
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
415
|
+
*/
|
|
416
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
417
|
+
const url = new URL(clientStylingUrl);
|
|
418
|
+
|
|
419
|
+
fetch(url.href)
|
|
420
|
+
.then((res) => res.text())
|
|
421
|
+
.then((data) => {
|
|
422
|
+
const cssFile = document.createElement('style');
|
|
423
|
+
cssFile.innerHTML = data;
|
|
424
|
+
if (stylingContainer) {
|
|
425
|
+
stylingContainer.appendChild(cssFile);
|
|
426
|
+
}
|
|
427
|
+
})
|
|
428
|
+
.catch((err) => {
|
|
429
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @name setStreamLibrary
|
|
435
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
436
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
437
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
438
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
439
|
+
*/
|
|
440
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
441
|
+
if (window.emMessageBus) {
|
|
442
|
+
const sheet = document.createElement('style');
|
|
443
|
+
|
|
444
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
445
|
+
sheet.innerHTML = data;
|
|
446
|
+
if (stylingContainer) {
|
|
447
|
+
stylingContainer.appendChild(sheet);
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
388
453
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
389
454
|
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
390
455
|
|
|
@@ -392,38 +457,47 @@ const GeneralStylingWrapper = class {
|
|
|
392
457
|
constructor(hostRef) {
|
|
393
458
|
index.registerInstance(this, hostRef);
|
|
394
459
|
this.stylingAppends = false;
|
|
395
|
-
this.setClientStyling = () => {
|
|
396
|
-
let sheet = document.createElement('style');
|
|
397
|
-
sheet.innerHTML = this.clientStyling;
|
|
398
|
-
this.el.prepend(sheet);
|
|
399
|
-
};
|
|
400
|
-
this.setClientStylingURL = () => {
|
|
401
|
-
let url = new URL(this.clientStylingUrl);
|
|
402
|
-
let cssFile = document.createElement('style');
|
|
403
|
-
fetch(url.href)
|
|
404
|
-
.then((res) => res.text())
|
|
405
|
-
.then((data) => {
|
|
406
|
-
cssFile.innerHTML = data;
|
|
407
|
-
setTimeout(() => {
|
|
408
|
-
this.el.prepend(cssFile);
|
|
409
|
-
}, 1);
|
|
410
|
-
})
|
|
411
|
-
.catch((err) => {
|
|
412
|
-
console.log('error ', err);
|
|
413
|
-
});
|
|
414
|
-
};
|
|
415
460
|
this.clientStyling = '';
|
|
416
461
|
this.clientStylingUrl = '';
|
|
462
|
+
this.mbSource = undefined;
|
|
417
463
|
this.translationUrl = '';
|
|
418
464
|
this.targetTranslations = undefined;
|
|
419
465
|
}
|
|
466
|
+
componentDidLoad() {
|
|
467
|
+
if (this.el) {
|
|
468
|
+
if (window.emMessageBus != undefined) {
|
|
469
|
+
setStreamStyling(this.el, `${this.mbSource}.Style`);
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
if (this.clientStyling)
|
|
473
|
+
setClientStyling(this.el, this.clientStyling);
|
|
474
|
+
if (this.clientStylingUrl)
|
|
475
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
476
|
+
this.stylingAppends = true;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
disconnectedCallback() {
|
|
481
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
482
|
+
}
|
|
483
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
484
|
+
if (newValue != oldValue) {
|
|
485
|
+
setClientStyling(this.el, this.clientStyling);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
489
|
+
if (newValue != oldValue) {
|
|
490
|
+
if (this.clientStylingUrl)
|
|
491
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
420
494
|
componentDidRender() {
|
|
421
495
|
// start custom styling area
|
|
422
496
|
if (!this.stylingAppends) {
|
|
423
497
|
if (this.clientStyling)
|
|
424
|
-
this.
|
|
498
|
+
setClientStyling(this.el, this.clientStyling);
|
|
425
499
|
if (this.clientStylingUrl)
|
|
426
|
-
this.
|
|
500
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
427
501
|
this.stylingAppends = true;
|
|
428
502
|
}
|
|
429
503
|
// end custom styling area
|
|
@@ -437,9 +511,13 @@ const GeneralStylingWrapper = class {
|
|
|
437
511
|
return await Promise.all(promises);
|
|
438
512
|
}
|
|
439
513
|
render() {
|
|
440
|
-
return (index.h("div", { key: '
|
|
514
|
+
return (index.h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, index.h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
|
|
441
515
|
}
|
|
442
516
|
get el() { return index.getElement(this); }
|
|
517
|
+
static get watchers() { return {
|
|
518
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
519
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
520
|
+
}; }
|
|
443
521
|
};
|
|
444
522
|
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
445
523
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ad2fddb6.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -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-assets-slider_3.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["bonus-elevate-shop-assets-slider_3.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[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"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'bonus-elevate-shop-item';
|
|
24
|
-
const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback:
|
|
24
|
+
const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -1213,6 +1213,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1213
1213
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
|
|
1214
1214
|
);
|
|
1215
1215
|
}
|
|
1216
|
+
const elm = hostRef.$hostElement$ ;
|
|
1216
1217
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1217
1218
|
const flags = hostRef.$flags$;
|
|
1218
1219
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -1222,6 +1223,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1222
1223
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
1223
1224
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1224
1225
|
if (instance) {
|
|
1226
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1227
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1228
|
+
if (watchMethods) {
|
|
1229
|
+
watchMethods.map((watchMethodName) => {
|
|
1230
|
+
try {
|
|
1231
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1232
|
+
} catch (e) {
|
|
1233
|
+
consoleError(e, elm);
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1225
1238
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1226
1239
|
scheduleUpdate(hostRef, false);
|
|
1227
1240
|
}
|
|
@@ -1233,7 +1246,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1233
1246
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1234
1247
|
var _a, _b;
|
|
1235
1248
|
const prototype = Cstr.prototype;
|
|
1236
|
-
if (cmpMeta.$members$ ||
|
|
1249
|
+
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
1250
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
1251
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1252
|
+
}
|
|
1237
1253
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1238
1254
|
members.map(([memberName, [memberFlags]]) => {
|
|
1239
1255
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
@@ -1315,6 +1331,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1315
1331
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1316
1332
|
}
|
|
1317
1333
|
if (!Cstr.isProxied) {
|
|
1334
|
+
{
|
|
1335
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1336
|
+
}
|
|
1318
1337
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1319
1338
|
Cstr.isProxied = true;
|
|
1320
1339
|
}
|
|
@@ -1330,6 +1349,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1330
1349
|
{
|
|
1331
1350
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1332
1351
|
}
|
|
1352
|
+
{
|
|
1353
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1354
|
+
}
|
|
1333
1355
|
endNewInstance();
|
|
1334
1356
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1335
1357
|
} else {
|
|
@@ -1450,6 +1472,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1450
1472
|
let hasSlotRelocation = false;
|
|
1451
1473
|
lazyBundles.map((lazyBundle) => {
|
|
1452
1474
|
lazyBundle[1].map((compactMeta) => {
|
|
1475
|
+
var _a2;
|
|
1453
1476
|
const cmpMeta = {
|
|
1454
1477
|
$flags$: compactMeta[0],
|
|
1455
1478
|
$tagName$: compactMeta[1],
|
|
@@ -1465,6 +1488,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1465
1488
|
{
|
|
1466
1489
|
cmpMeta.$attrsToReflect$ = [];
|
|
1467
1490
|
}
|
|
1491
|
+
{
|
|
1492
|
+
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1493
|
+
}
|
|
1468
1494
|
const tagName = cmpMeta.$tagName$;
|
|
1469
1495
|
const HostElement = class extends HTMLElement {
|
|
1470
1496
|
// StencilLazyHost
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ad2fddb6.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
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-assets-slider_3.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["bonus-elevate-shop-assets-slider_3.cjs",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[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"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -11,6 +11,7 @@ export class BonusElevateShopItem {
|
|
|
11
11
|
this.itemId = undefined;
|
|
12
12
|
this.elevateGift = undefined;
|
|
13
13
|
this.session = undefined;
|
|
14
|
+
this.mbSource = undefined;
|
|
14
15
|
this.clientStyling = '';
|
|
15
16
|
this.clientStylingUrl = '';
|
|
16
17
|
this.translationUrl = '';
|
|
@@ -112,10 +113,10 @@ export class BonusElevateShopItem {
|
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
render() {
|
|
115
|
-
return (h(Host, { key: '
|
|
116
|
+
return (h(Host, { key: '059f0eb449e36b30ce271306a9faf85b79197f36' }, h("general-styling-wrapper", { key: '4b857c7d532d288c660fc9b9cfc28c17ba80c400', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, mbSource: this.mbSource }), h("div", { key: 'b400e365431afc6af40c11010b708a72525d4af6', class: 'ElevateDetails' }, this.isGiftNotFound && (h(Fragment, { key: '93a532a9d25137fe02aca600c98237f08dbc5347' }, h("div", { key: 'b423b7b20c4e6829ecd5cf53ab860b909ac639d5', class: "Row ThumbnailRow" }, h("div", { key: 'eaafe445f831699a1f4a22bc951a68e211bc1eb1', class: "BackButton", onClick: () => {
|
|
116
117
|
this.onBackClicked();
|
|
117
|
-
} }, h("span", { key: '
|
|
118
|
-
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), h("span", { key: '
|
|
118
|
+
} }, h("span", { key: '70105de7173a933b921bd4a78c62c4d6e5cf847e', class: "BackArrow", innerHTML: "<" }), h("span", { key: 'd695e223a899ae130355d5ee083a622b7cf131dd', class: "BackTxt" }, " ", translate('back', this.language), " "))), h("div", { key: 'f9624e689b03b06c0937f81821ff4e00c0911851', class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, { key: '5c104bba7cd29706418cffa9ffdd20d13714bf2a' }, h("div", { key: 'c100262b2d4547e1a81108426fa07e6a66e8f560', class: "ThumbnailRow" }, h("div", { key: 'bf573c9685c7afe71239faced77bfaef4fab2a37', class: 'Row' }, h("div", { key: '10ff56e0df5eca9792428fc5279a79d79f619c56', class: "BackButton", onClick: () => { this.onBackClicked(); } }, h("span", { key: '899bbe9f1288b49743d51f4afec8b9237052b7f1', class: "BackArrow", innerHTML: "<" }), h("span", { key: 'f4dd1b849114f4fd9743b6726394aacf444a6e7b', class: "BackTxt" }, " ", translate('back', this.language), " ")), h("bonus-elevate-shop-assets-slider", { key: 'b11de8226e28e3038e70615093e07dd7ae896730', class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { key: '4084bea351593009e0a3a9dd3e3cb70b9d1a864c', class: 'Col Details' }, h("h3", { key: '2346e29ead91d6ace97f99fa768c46db704d1ab9', class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { key: '835a0b059b2c0399cdb442a8376b0ef8ddf1c9e2', class: "GiftPoints" }, h("span", { key: '73afb596b3b493736e67c3b62207b2dc7dbc27d9', class: "Points" }, this.elevateGift.points, " "), h("span", { key: '7a484d65195a5e6e32b079ca31410eefd239a240', class: " PointsLabel" }, translate('coins', this.language))))), h("div", { key: 'f318deaf612752dc61b49e57b5751755800291ea', class: 'ShopItemDetail Details' }, h("div", { key: '2a7b77649b74baad93816eabf8413d0b45930f83', class: "GiftPresentation" }, h("p", { key: '3ce1a1a6adb36127b3526e005a3ac49349349bfd' }, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { key: 'e8f61acba748c582288e2053f61c7efc754bb8f9', class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled deactive' : ' active '}
|
|
119
|
+
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), h("span", { key: '8cfe770fbbe29d1aebab26826146590cc1ecd177', class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))));
|
|
119
120
|
}
|
|
120
121
|
static get is() { return "bonus-elevate-shop-item"; }
|
|
121
122
|
static get encapsulation() { return "shadow"; }
|
|
@@ -221,6 +222,23 @@ export class BonusElevateShopItem {
|
|
|
221
222
|
"attribute": "session",
|
|
222
223
|
"reflect": true
|
|
223
224
|
},
|
|
225
|
+
"mbSource": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "string",
|
|
230
|
+
"resolved": "string",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Client custom styling via streamStyling"
|
|
238
|
+
},
|
|
239
|
+
"attribute": "mb-source",
|
|
240
|
+
"reflect": true
|
|
241
|
+
},
|
|
224
242
|
"clientStyling": {
|
|
225
243
|
"type": "string",
|
|
226
244
|
"mutable": false,
|
package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.stories.js
CHANGED
|
@@ -14,6 +14,7 @@ const meta = {
|
|
|
14
14
|
translationUrl: "",
|
|
15
15
|
showSliderDots: "false",
|
|
16
16
|
showSliderArrows: "true",
|
|
17
|
+
mbSource: "",
|
|
17
18
|
},
|
|
18
19
|
argTypes: {
|
|
19
20
|
endpoint: { control: 'text', description: '' },
|
|
@@ -26,6 +27,7 @@ const meta = {
|
|
|
26
27
|
translationUrl: { control: 'text', description: '' },
|
|
27
28
|
showSliderDots: { control: 'text', description: '' },
|
|
28
29
|
showSliderArrows: { control: 'text', description: '' },
|
|
30
|
+
mbSource: { control: 'text', description: '' },
|
|
29
31
|
},
|
|
30
32
|
};
|
|
31
33
|
export default meta;
|
|
@@ -41,6 +43,7 @@ const Template = (args) => {
|
|
|
41
43
|
translation-url="${args.translationUrl}"
|
|
42
44
|
show-slider-dots="${args.showSliderDots}"
|
|
43
45
|
show-slider-arrows="${args.showSliderArrows}"
|
|
46
|
+
mb-source="${args.mbSource}"
|
|
44
47
|
></bonus-elevate-shop-item>`;
|
|
45
48
|
};
|
|
46
49
|
export const Default = Template.bind({});
|
|
@@ -55,4 +58,5 @@ Default.args = {
|
|
|
55
58
|
translationUrl: "",
|
|
56
59
|
showSliderDots: "false",
|
|
57
60
|
showSliderArrows: "true",
|
|
61
|
+
mbSource: "",
|
|
58
62
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement, c as createEvent, F as Fragment, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement, c as createEvent, F as Fragment, H as Host } from './index-fca048d8.js';
|
|
2
2
|
|
|
3
3
|
const BonusElevateShopAssetsSlider = class {
|
|
4
4
|
constructor(hostRef) {
|
|
@@ -191,6 +191,9 @@ const getTranslations = (url) => {
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
resolve(true);
|
|
194
|
+
}).catch((err) => {
|
|
195
|
+
console.error("Failed to load translations:", err);
|
|
196
|
+
resolve(false);
|
|
194
197
|
});
|
|
195
198
|
});
|
|
196
199
|
};
|
|
@@ -243,6 +246,7 @@ const BonusElevateShopItem = class {
|
|
|
243
246
|
this.itemId = undefined;
|
|
244
247
|
this.elevateGift = undefined;
|
|
245
248
|
this.session = undefined;
|
|
249
|
+
this.mbSource = undefined;
|
|
246
250
|
this.clientStyling = '';
|
|
247
251
|
this.clientStylingUrl = '';
|
|
248
252
|
this.translationUrl = '';
|
|
@@ -344,10 +348,10 @@ const BonusElevateShopItem = class {
|
|
|
344
348
|
}
|
|
345
349
|
}
|
|
346
350
|
render() {
|
|
347
|
-
return (h(Host, { key: '
|
|
351
|
+
return (h(Host, { key: '059f0eb449e36b30ce271306a9faf85b79197f36' }, h("general-styling-wrapper", { key: '4b857c7d532d288c660fc9b9cfc28c17ba80c400', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, mbSource: this.mbSource }), h("div", { key: 'b400e365431afc6af40c11010b708a72525d4af6', class: 'ElevateDetails' }, this.isGiftNotFound && (h(Fragment, { key: '93a532a9d25137fe02aca600c98237f08dbc5347' }, h("div", { key: 'b423b7b20c4e6829ecd5cf53ab860b909ac639d5', class: "Row ThumbnailRow" }, h("div", { key: 'eaafe445f831699a1f4a22bc951a68e211bc1eb1', class: "BackButton", onClick: () => {
|
|
348
352
|
this.onBackClicked();
|
|
349
|
-
} }, h("span", { key: '
|
|
350
|
-
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), h("span", { key: '
|
|
353
|
+
} }, h("span", { key: '70105de7173a933b921bd4a78c62c4d6e5cf847e', class: "BackArrow", innerHTML: "<" }), h("span", { key: 'd695e223a899ae130355d5ee083a622b7cf131dd', class: "BackTxt" }, " ", translate('back', this.language), " "))), h("div", { key: 'f9624e689b03b06c0937f81821ff4e00c0911851', class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, { key: '5c104bba7cd29706418cffa9ffdd20d13714bf2a' }, h("div", { key: 'c100262b2d4547e1a81108426fa07e6a66e8f560', class: "ThumbnailRow" }, h("div", { key: 'bf573c9685c7afe71239faced77bfaef4fab2a37', class: 'Row' }, h("div", { key: '10ff56e0df5eca9792428fc5279a79d79f619c56', class: "BackButton", onClick: () => { this.onBackClicked(); } }, h("span", { key: '899bbe9f1288b49743d51f4afec8b9237052b7f1', class: "BackArrow", innerHTML: "<" }), h("span", { key: 'f4dd1b849114f4fd9743b6726394aacf444a6e7b', class: "BackTxt" }, " ", translate('back', this.language), " ")), h("bonus-elevate-shop-assets-slider", { key: 'b11de8226e28e3038e70615093e07dd7ae896730', class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { key: '4084bea351593009e0a3a9dd3e3cb70b9d1a864c', class: 'Col Details' }, h("h3", { key: '2346e29ead91d6ace97f99fa768c46db704d1ab9', class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { key: '835a0b059b2c0399cdb442a8376b0ef8ddf1c9e2', class: "GiftPoints" }, h("span", { key: '73afb596b3b493736e67c3b62207b2dc7dbc27d9', class: "Points" }, this.elevateGift.points, " "), h("span", { key: '7a484d65195a5e6e32b079ca31410eefd239a240', class: " PointsLabel" }, translate('coins', this.language))))), h("div", { key: 'f318deaf612752dc61b49e57b5751755800291ea', class: 'ShopItemDetail Details' }, h("div", { key: '2a7b77649b74baad93816eabf8413d0b45930f83', class: "GiftPresentation" }, h("p", { key: '3ce1a1a6adb36127b3526e005a3ac49349349bfd' }, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { key: 'e8f61acba748c582288e2053f61c7efc754bb8f9', class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled deactive' : ' active '}
|
|
354
|
+
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeemGift', this.language)), h("span", { key: '8cfe770fbbe29d1aebab26826146590cc1ecd177', class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))));
|
|
351
355
|
}
|
|
352
356
|
};
|
|
353
357
|
BonusElevateShopItem.style = BonusElevateShopItemStyle0;
|
|
@@ -377,10 +381,71 @@ const mergeTranslations = (url, target) => {
|
|
|
377
381
|
});
|
|
378
382
|
});
|
|
379
383
|
resolve(true);
|
|
384
|
+
})
|
|
385
|
+
.catch(err => {
|
|
386
|
+
console.error("Failed to load translations:", err);
|
|
387
|
+
resolve(false);
|
|
380
388
|
});
|
|
381
389
|
});
|
|
382
390
|
};
|
|
383
391
|
|
|
392
|
+
/**
|
|
393
|
+
* @name setClientStyling
|
|
394
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
395
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
396
|
+
* @param {string} clientStyling The style content
|
|
397
|
+
*/
|
|
398
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
399
|
+
if (stylingContainer) {
|
|
400
|
+
const sheet = document.createElement('style');
|
|
401
|
+
sheet.innerHTML = clientStyling;
|
|
402
|
+
stylingContainer.appendChild(sheet);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @name setClientStylingURL
|
|
408
|
+
* @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
|
|
409
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
410
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
411
|
+
*/
|
|
412
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
413
|
+
const url = new URL(clientStylingUrl);
|
|
414
|
+
|
|
415
|
+
fetch(url.href)
|
|
416
|
+
.then((res) => res.text())
|
|
417
|
+
.then((data) => {
|
|
418
|
+
const cssFile = document.createElement('style');
|
|
419
|
+
cssFile.innerHTML = data;
|
|
420
|
+
if (stylingContainer) {
|
|
421
|
+
stylingContainer.appendChild(cssFile);
|
|
422
|
+
}
|
|
423
|
+
})
|
|
424
|
+
.catch((err) => {
|
|
425
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @name setStreamLibrary
|
|
431
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
432
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
433
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
434
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
435
|
+
*/
|
|
436
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
437
|
+
if (window.emMessageBus) {
|
|
438
|
+
const sheet = document.createElement('style');
|
|
439
|
+
|
|
440
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
441
|
+
sheet.innerHTML = data;
|
|
442
|
+
if (stylingContainer) {
|
|
443
|
+
stylingContainer.appendChild(sheet);
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
384
449
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
385
450
|
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
386
451
|
|
|
@@ -388,38 +453,47 @@ const GeneralStylingWrapper = class {
|
|
|
388
453
|
constructor(hostRef) {
|
|
389
454
|
registerInstance(this, hostRef);
|
|
390
455
|
this.stylingAppends = false;
|
|
391
|
-
this.setClientStyling = () => {
|
|
392
|
-
let sheet = document.createElement('style');
|
|
393
|
-
sheet.innerHTML = this.clientStyling;
|
|
394
|
-
this.el.prepend(sheet);
|
|
395
|
-
};
|
|
396
|
-
this.setClientStylingURL = () => {
|
|
397
|
-
let url = new URL(this.clientStylingUrl);
|
|
398
|
-
let cssFile = document.createElement('style');
|
|
399
|
-
fetch(url.href)
|
|
400
|
-
.then((res) => res.text())
|
|
401
|
-
.then((data) => {
|
|
402
|
-
cssFile.innerHTML = data;
|
|
403
|
-
setTimeout(() => {
|
|
404
|
-
this.el.prepend(cssFile);
|
|
405
|
-
}, 1);
|
|
406
|
-
})
|
|
407
|
-
.catch((err) => {
|
|
408
|
-
console.log('error ', err);
|
|
409
|
-
});
|
|
410
|
-
};
|
|
411
456
|
this.clientStyling = '';
|
|
412
457
|
this.clientStylingUrl = '';
|
|
458
|
+
this.mbSource = undefined;
|
|
413
459
|
this.translationUrl = '';
|
|
414
460
|
this.targetTranslations = undefined;
|
|
415
461
|
}
|
|
462
|
+
componentDidLoad() {
|
|
463
|
+
if (this.el) {
|
|
464
|
+
if (window.emMessageBus != undefined) {
|
|
465
|
+
setStreamStyling(this.el, `${this.mbSource}.Style`);
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
if (this.clientStyling)
|
|
469
|
+
setClientStyling(this.el, this.clientStyling);
|
|
470
|
+
if (this.clientStylingUrl)
|
|
471
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
472
|
+
this.stylingAppends = true;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
disconnectedCallback() {
|
|
477
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
478
|
+
}
|
|
479
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
480
|
+
if (newValue != oldValue) {
|
|
481
|
+
setClientStyling(this.el, this.clientStyling);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
485
|
+
if (newValue != oldValue) {
|
|
486
|
+
if (this.clientStylingUrl)
|
|
487
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
416
490
|
componentDidRender() {
|
|
417
491
|
// start custom styling area
|
|
418
492
|
if (!this.stylingAppends) {
|
|
419
493
|
if (this.clientStyling)
|
|
420
|
-
this.
|
|
494
|
+
setClientStyling(this.el, this.clientStyling);
|
|
421
495
|
if (this.clientStylingUrl)
|
|
422
|
-
this.
|
|
496
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
423
497
|
this.stylingAppends = true;
|
|
424
498
|
}
|
|
425
499
|
// end custom styling area
|
|
@@ -433,9 +507,13 @@ const GeneralStylingWrapper = class {
|
|
|
433
507
|
return await Promise.all(promises);
|
|
434
508
|
}
|
|
435
509
|
render() {
|
|
436
|
-
return (h("div", { key: '
|
|
510
|
+
return (h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
|
|
437
511
|
}
|
|
438
512
|
get el() { return getElement(this); }
|
|
513
|
+
static get watchers() { return {
|
|
514
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
515
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
516
|
+
}; }
|
|
439
517
|
};
|
|
440
518
|
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
441
519
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fca048d8.js';
|
|
2
|
+
export { s as setNonce } from './index-fca048d8.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
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-assets-slider_3",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["bonus-elevate-shop-assets-slider_3",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[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"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'bonus-elevate-shop-item';
|
|
2
|
-
const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback:
|
|
2
|
+
const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -1191,6 +1191,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1191
1191
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
|
|
1192
1192
|
);
|
|
1193
1193
|
}
|
|
1194
|
+
const elm = hostRef.$hostElement$ ;
|
|
1194
1195
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1195
1196
|
const flags = hostRef.$flags$;
|
|
1196
1197
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -1200,6 +1201,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1200
1201
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
1201
1202
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1202
1203
|
if (instance) {
|
|
1204
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1205
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1206
|
+
if (watchMethods) {
|
|
1207
|
+
watchMethods.map((watchMethodName) => {
|
|
1208
|
+
try {
|
|
1209
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1210
|
+
} catch (e) {
|
|
1211
|
+
consoleError(e, elm);
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1203
1216
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1204
1217
|
scheduleUpdate(hostRef, false);
|
|
1205
1218
|
}
|
|
@@ -1211,7 +1224,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1211
1224
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1212
1225
|
var _a, _b;
|
|
1213
1226
|
const prototype = Cstr.prototype;
|
|
1214
|
-
if (cmpMeta.$members$ ||
|
|
1227
|
+
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
1228
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
1229
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1230
|
+
}
|
|
1215
1231
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1216
1232
|
members.map(([memberName, [memberFlags]]) => {
|
|
1217
1233
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
@@ -1293,6 +1309,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1293
1309
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1294
1310
|
}
|
|
1295
1311
|
if (!Cstr.isProxied) {
|
|
1312
|
+
{
|
|
1313
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1314
|
+
}
|
|
1296
1315
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1297
1316
|
Cstr.isProxied = true;
|
|
1298
1317
|
}
|
|
@@ -1308,6 +1327,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1308
1327
|
{
|
|
1309
1328
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1310
1329
|
}
|
|
1330
|
+
{
|
|
1331
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1332
|
+
}
|
|
1311
1333
|
endNewInstance();
|
|
1312
1334
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1313
1335
|
} else {
|
|
@@ -1428,6 +1450,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1428
1450
|
let hasSlotRelocation = false;
|
|
1429
1451
|
lazyBundles.map((lazyBundle) => {
|
|
1430
1452
|
lazyBundle[1].map((compactMeta) => {
|
|
1453
|
+
var _a2;
|
|
1431
1454
|
const cmpMeta = {
|
|
1432
1455
|
$flags$: compactMeta[0],
|
|
1433
1456
|
$tagName$: compactMeta[1],
|
|
@@ -1443,6 +1466,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1443
1466
|
{
|
|
1444
1467
|
cmpMeta.$attrsToReflect$ = [];
|
|
1445
1468
|
}
|
|
1469
|
+
{
|
|
1470
|
+
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1471
|
+
}
|
|
1446
1472
|
const tagName = cmpMeta.$tagName$;
|
|
1447
1473
|
const HostElement = class extends HTMLElement {
|
|
1448
1474
|
// StencilLazyHost
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-fca048d8.js';
|
|
2
|
+
export { s as setNonce } from './index-fca048d8.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
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-assets-slider_3",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["bonus-elevate-shop-assets-slider_3",[[1,"bonus-elevate-shop-item",{"endpoint":[513],"language":[513],"itemId":[1537,"item-id"],"elevateGift":[1040],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"isGiftNotFound":[32],"redeemErrorMsg":[32],"isRedeeming":[32]}],[0,"bonus-elevate-shop-assets-slider",{"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"itemsPerPage":[514,"items-per-page"],"sliderItems":[16],"activeIndex":[32]}],[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"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -45,6 +45,10 @@ export namespace Components {
|
|
|
45
45
|
* Currently selected language.
|
|
46
46
|
*/
|
|
47
47
|
"language": string;
|
|
48
|
+
/**
|
|
49
|
+
* Client custom styling via streamStyling
|
|
50
|
+
*/
|
|
51
|
+
"mbSource": string;
|
|
48
52
|
/**
|
|
49
53
|
* session
|
|
50
54
|
*/
|
|
@@ -134,6 +138,10 @@ declare namespace LocalJSX {
|
|
|
134
138
|
* Currently selected language.
|
|
135
139
|
*/
|
|
136
140
|
"language"?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Client custom styling via streamStyling
|
|
143
|
+
*/
|
|
144
|
+
"mbSource"?: string;
|
|
137
145
|
"onRedeemGiftButton"?: (event: BonusElevateShopItemCustomEvent<Object>) => void;
|
|
138
146
|
/**
|
|
139
147
|
* session
|