@everymatrix/bonus-elevate-levels 1.69.2 → 1.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{p as e,b as l}from"./index-96423025.js";export{s as setNonce}from"./index-96423025.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((async e=>(await t(),l([["bonus-elevate-levels_5",[[1,"bonus-elevate-levels",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],endpoint:[513],language:[513],translationUrl:[513,"translation-url"],selectedLevelId:[1537,"selected-level-id"],showDefault:[4,"show-default"],elevateLevelParamProxy:[32],elevateLevels:[32],currentLevel:[32],errorMessage:[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{levels:[16],language:[1],selectedLevelId:[1537,"selected-level-id"],isShowSliderButton:[32],touchPosStart:[32],touchPosEnd:[32],offset:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{selectedLevelId:["levelsChangedHandler"]}],[0,"elevate-level-presentation",{elevateLevel:[16]}],[0,"elevate-levels-data",{scopeParams:[1544,"scope-params"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],e))));
1
+ import{p as e,b as l}from"./index-422aaa76.js";export{s as setNonce}from"./index-422aaa76.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((async e=>(await t(),l([["bonus-elevate-levels_5",[[1,"bonus-elevate-levels",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],endpoint:[513],language:[513],translationUrl:[513,"translation-url"],selectedLevelId:[1537,"selected-level-id"],showDefault:[4,"show-default"],elevateLevelParamProxy:[32],elevateLevels:[32],currentLevel:[32],errorMessage:[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{levels:[16],language:[1],selectedLevelId:[1537,"selected-level-id"],isShowSliderButton:[32],touchPosStart:[32],touchPosEnd:[32],offset:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{selectedLevelId:["levelsChangedHandler"]}],[0,"elevate-level-presentation",{elevateLevel:[16]}],[0,"elevate-levels-data",{scopeParams:[1544,"scope-params"]}],[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 +1 @@
1
- import{r as e,h as t,c as i,H as s,g as l}from"./index-96423025.js";const o=["ro","en","fr","hr","tr"],n={en:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},fr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set",points:"Points"},ro:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},tr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"}},a=(e,t)=>{const i=t;return n[void 0!==i&&(o.includes(i)||n[i])?i:"en"][e]},r=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.endpoint=void 0,this.language="en",this.translationUrl="",this.selectedLevelId=void 0,this.showDefault=void 0,this.elevateLevelParamProxy=void 0,this.elevateLevels=[],this.currentLevel=void 0,this.errorMessage=void 0}selectedLevelChangedHandler(e){e.detail&&(this.currentLevel=Object.assign({},e.detail.level))}selectedLevelIdChangedHandler(){if(this.selectedLevelId&&this.elevateLevels){const e=this.elevateLevels.filter((e=>e.id==this.selectedLevelId))[0];this.currentLevel=Object.assign({},e)}}onSessionOrEndpointChange(){this.elevateLevelParamProxy=Object.assign(Object.assign({},this.elevateLevelParamProxy),{endpoint:this.endpoint,language:this.language})}elevateLevelsDataChangeHandler(e){e.detail&&(e.detail.currentLevel&&(this.currentLevel=Object.assign({},e.detail.currentLevel)),e.detail.elevateLevels&&(this.elevateLevels=[...e.detail.elevateLevels]),e.detail.clearError&&(this.errorMessage=null),e.detail.errorMessage&&e.detail.errorMessage.errorWhenLoadElevateLevels&&(this.errorMessage=a("loadElevateLevelErrorMessage",this.language)))}onTCClick(){window.postMessage({type:"termAndConditionClicked"},window.location.href)}componentWillLoad(){this.elevateLevelParamProxy={endpoint:this.endpoint,language:this.language,selectedLevelId:this.selectedLevelId,showDefault:this.showDefault}}render(){var e;return t("div",{key:"327b5cd6a3bc756ce0696a0f2a4081f35bad7316",class:"ElevateLevelContent"},t("elevate-levels-data",{key:"cf1ab9a55cdaf9eba688bd524cb4a83d63563e77",scopeParams:this.elevateLevelParamProxy}),t("div",{key:"9c85b9a805712db07c7c99ac2db843062997f667",class:"LevelContent"},(null===(e=this.elevateLevels)||void 0===e?void 0:e.length)?t("elevate-level-list",{language:this.language,selectedLevelId:this.selectedLevelId,levels:this.elevateLevels}):a("noLevelsSet",this.language),this.currentLevel&&t("elevate-level-presentation",{key:"57ea5391608a7c4c4f7eb7f130a8c9f982fe5045",elevateLevel:this.currentLevel})),this.errorMessage&&t("div",{key:"46121a28053608f8e9632a8a3976c0b33c4d5e72"},this.errorMessage),t("general-styling-wrapper",{key:"bdbaeee850d2ad84bf26fa81979ae662469a8b41",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl}))}static get watchers(){return{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var d;r.style=":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}",function(e){e[e.slideToRight=1]="slideToRight",e[e.slideToLeft=-1]="slideToLeft"}(d||(d={}));const h=class{constructor(t){var s;e(this,t),this.selectedLevelChanged=i(this,"selectedLevelChanged",7),this.minOffset=0,this.isMobile=!!((s=window.navigator.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.levels=void 0,this.language=void 0,this.selectedLevelId=void 0,this.isShowSliderButton=!1,this.touchPosStart=void 0,this.touchPosEnd=void 0,this.offset=0}onLevelClicked(e){this.selectedLevelChanged.emit({level:e}),this.selectedLevelId=e.id}levelsChangedHandler(){this.initOffsetOfLevelItems()}initOffsetOfLevelItems(){if(!this.levels||0==this.levels.length||!this.selectedLevelId)return;const e=this.levels.findIndex((e=>this.selectedLevelId==e.id));if(this.onLevelClicked(this.levels[-1==e?0:e]),this.levels.length<=this.moveCountForOneTouch)return;let t=Math.floor((-1==e?1:e+1)/this.moveCountForOneTouch)*this.moveCountForOneTouch*this.childElementWidth*-1;this.offset=t<=this.minOffset?this.minOffset:t>=0?0:t}onTouchStart(e){this.touchPosStart={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}onTouchMove(e){this.touchPosEnd={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};const t=this.touchPosEnd.clientX-this.touchPosStart.clientX,i=this.touchPosEnd.clientY-this.touchPosStart.clientY;Math.abs(t)>Math.abs(i)&&this.slideTo(t>0?d.slideToRight:d.slideToLeft)}slideTo(e){let t=this.levelsElement.offsetLeft+this.childElementWidth*this.moveCountForOneTouch*e;if(t%this.childElementWidth!=0){const i=Math.floor(t/this.childElementWidth)*this.childElementWidth,s=Math.ceil(t/this.childElementWidth)*this.childElementWidth;t=e==d.slideToRight?i:s}this.offset=t<this.minOffset?this.minOffset:t>=0?0:t}initLevelSlider(){var e;if(!(null===(e=this.levelsElement)||void 0===e?void 0:e.firstElementChild))return void console.log("Widget[elevate-level-list] DOM is not ready.");this.isShowSliderButton=!this.isMobile&&this.levelsElement.clientWidth>this.levelsElement.parentElement.clientWidth,this.minOffset=this.levelsElement.parentElement.clientWidth-this.levelsElement.clientWidth,this.childElementWidth=this.levelsElement.firstElementChild.clientWidth,this.moveCountForOneTouch=Math.ceil(this.levelsElement.parentElement.clientWidth/this.childElementWidth)-1;const t=this.levelsElement.childElementCount;this.childElementWidth+=(this.levelsElement.clientWidth-this.childElementWidth*t)/(t-1)}debounce(e,t){{let i;return()=>{clearTimeout(i),i=setTimeout((()=>{e()}),t)}}}handleResize(){this.debounce(this.initLevelSlider.bind(this),200)()}componentDidRender(){this.host.componentOnReady().then((()=>{this.initLevelSlider()}))}render(){return t(s,{key:"d88d3434af89a0f8fd20a97735121fdf297905ab"},this.levels&&[t("div",{key:"cff36ba584e2474a65a1b95545b00937ecd06c8c",class:`SliderButton LeftButton ${0==this.offset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(d.slideToRight)},t("svg",{key:"640b4dd9b26b4097d15623f3e9c6b14b9a60b37e",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"0a50ffc9319ad33ed61e4696c37a0bfe6090518c","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"314c5b4c5bbc0d50041a66fdf474441ea418345a",class:"LevelItemsWrapper"},t("div",{key:"ff1fb084aeb20319c36a3420e9eb8693ea81b144",style:{left:`${this.offset}px`},class:"LevelItems "+(this.isMobile?"Mobile":""),id:"levelItems",ref:e=>{this.levelsElement=e}},this.levels.map(((e,i)=>t("div",{class:"Item "+(this.selectedLevelId==e.id?"Active":""),onClick:this.onLevelClicked.bind(this,e)},t("img",{alt:`Presentation Icon for ${e.presentation.displayName}`,class:"LevelImg",src:e.presentation.asset}),t("span",{class:"LevelName",title:e.presentation.displayName},e.presentation.displayName),t("span",{class:"LevelPoints"},0==i?"":">",e.firstEntryPoints," ",a("points",this.language))))))),t("div",{key:"8dae638ca436c7e747a0f737028588ee5d040edd",class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(d.slideToLeft)},t("svg",{key:"bba16b49668567aaa41beedd9ea461d256c6812d",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"36a0b6f3ffe8b50ebea9a4ec1c01e3341c440949","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))])}get host(){return l(this)}static get watchers(){return{selectedLevelId:["levelsChangedHandler"]}}};h.style="elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emw--color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emw--color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emw--color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";const c=class{constructor(t){e(this,t),this.elevateLevel=void 0}render(){return t(s,{key:"16d128717e716f7ca7d3bb77fc3a2e67209318b6"},t("div",{key:"658657abdfc64844bd2af40562efe40385e1735a",class:"Row Desc"},t("h3",{key:"ec5871c2f810c8c120bf99510717381175bc1ef4"},this.elevateLevel.presentation.displayName),t("p",{key:"865915c6eea90295238fb47eaa91c8f968199ca5"},t("span",{key:"2b90c6c5d6957b73fc4a0f53d53da0ca023a4f0a",class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};c.style=":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";var v,f,p,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},g={exports:{}};v=g,f=g.exports,p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==b)return b;throw new Error("unable to locate global object")}(),v.exports=f=p.fetch,p.fetch&&(f.default=p.fetch.bind(p)),f.Headers=p.Headers,f.Request=p.Request,f.Response=p.Response;const u=g.exports,m=class{constructor(t){e(this,t),this.elevateLevelsDataChange=i(this,"elevateLevelsDataChange",7),this.scopeParams=void 0}async componentWillRender(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await u(e.href).then((e=>e.json())).then((e=>{const t=e.data.sort(((e,t)=>e.firstEntryPoints<t.firstEntryPoints?-1:1));let i=this.scopeParams.selectedLevelId;if(!i&&this.scopeParams.showDefault&&t.length>0&&(i=t[0].id),i){const e=t.filter((e=>e.id==i))[0];this.elevateLevelsDataChange.emit({currentLevel:e})}this.elevateLevelsDataChange.emit({clearError:!0}),this.elevateLevelsDataChange.emit({elevateLevels:t})})).catch((e=>{this.elevateLevelsDataChange.emit({errorMessage:{type:"errorWhenLoadElevateLevels",err:e}}),console.error(e)}))}};m.style=":host{display:block}";const w=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 s=(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((s=>{i.en[s]&&(i[e][s]=i[e][s]||i.en[s],"object"==typeof t[e][s]?Object.keys(t[e][s]).forEach((l=>{i[e][s][l]=t[e][s][l]})):i[e][s]=t[e][s])}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(s)}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 l(this)}};w.style=":host{display:block}";export{r as bonus_elevate_levels,h as elevate_level_list,c as elevate_level_presentation,m as elevate_levels_data,w as general_styling_wrapper}
1
+ import{r as e,h as t,c as i,H as s,g as l}from"./index-422aaa76.js";const n=["ro","en","fr","hr","tr"],o={en:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},fr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set",points:"Points"},ro:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},tr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"}},a=(e,t)=>{const i=t;return o[void 0!==i&&(n.includes(i)||o[i])?i:"en"][e]},r=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.endpoint=void 0,this.language="en",this.translationUrl="",this.selectedLevelId=void 0,this.showDefault=void 0,this.elevateLevelParamProxy=void 0,this.elevateLevels=[],this.currentLevel=void 0,this.errorMessage=void 0}selectedLevelChangedHandler(e){e.detail&&(this.currentLevel=Object.assign({},e.detail.level))}selectedLevelIdChangedHandler(){if(this.selectedLevelId&&this.elevateLevels){const e=this.elevateLevels.filter((e=>e.id==this.selectedLevelId))[0];this.currentLevel=Object.assign({},e)}}onSessionOrEndpointChange(){this.elevateLevelParamProxy=Object.assign(Object.assign({},this.elevateLevelParamProxy),{endpoint:this.endpoint,language:this.language})}elevateLevelsDataChangeHandler(e){e.detail&&(e.detail.currentLevel&&(this.currentLevel=Object.assign({},e.detail.currentLevel)),e.detail.elevateLevels&&(this.elevateLevels=[...e.detail.elevateLevels]),e.detail.clearError&&(this.errorMessage=null),e.detail.errorMessage&&e.detail.errorMessage.errorWhenLoadElevateLevels&&(this.errorMessage=a("loadElevateLevelErrorMessage",this.language)))}onTCClick(){window.postMessage({type:"termAndConditionClicked"},window.location.href)}componentWillLoad(){this.elevateLevelParamProxy={endpoint:this.endpoint,language:this.language,selectedLevelId:this.selectedLevelId,showDefault:this.showDefault}}render(){var e;return t("div",{key:"6bc46c87633a9a295108e50886096f67dd35d44a",class:"ElevateLevelContent"},t("elevate-levels-data",{key:"902d2796991a8acf293761255ab10f2cee54a92e",scopeParams:this.elevateLevelParamProxy}),t("div",{key:"7e47a25dce1d0fba40e3e432dd9c805aa5bbe308",class:"LevelContent"},(null===(e=this.elevateLevels)||void 0===e?void 0:e.length)?t("elevate-level-list",{language:this.language,selectedLevelId:this.selectedLevelId,levels:this.elevateLevels}):a("noLevelsSet",this.language),this.currentLevel&&t("elevate-level-presentation",{key:"dcfad9aa4422545fa74a7b8b957eb72001506046",elevateLevel:this.currentLevel})),this.errorMessage&&t("div",{key:"7e2741168e50a1ee2adebe39c2c3433b5c9bf7ca"},this.errorMessage),t("general-styling-wrapper",{key:"74cae021838f61964a519c2f200cfbb1f8470778",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl,mbSource:this.mbSource}))}static get watchers(){return{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var h;r.style=":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}",function(e){e[e.slideToRight=1]="slideToRight",e[e.slideToLeft=-1]="slideToLeft"}(h||(h={}));const d=class{constructor(t){var s;e(this,t),this.selectedLevelChanged=i(this,"selectedLevelChanged",7),this.minOffset=0,this.isMobile=!!((s=window.navigator.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.levels=void 0,this.language=void 0,this.selectedLevelId=void 0,this.isShowSliderButton=!1,this.touchPosStart=void 0,this.touchPosEnd=void 0,this.offset=0}onLevelClicked(e){this.selectedLevelChanged.emit({level:e}),this.selectedLevelId=e.id}levelsChangedHandler(){this.initOffsetOfLevelItems()}initOffsetOfLevelItems(){if(!this.levels||0==this.levels.length||!this.selectedLevelId)return;const e=this.levels.findIndex((e=>this.selectedLevelId==e.id));if(this.onLevelClicked(this.levels[-1==e?0:e]),this.levels.length<=this.moveCountForOneTouch)return;let t=Math.floor((-1==e?1:e+1)/this.moveCountForOneTouch)*this.moveCountForOneTouch*this.childElementWidth*-1;this.offset=t<=this.minOffset?this.minOffset:t>=0?0:t}onTouchStart(e){this.touchPosStart={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}onTouchMove(e){this.touchPosEnd={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};const t=this.touchPosEnd.clientX-this.touchPosStart.clientX,i=this.touchPosEnd.clientY-this.touchPosStart.clientY;Math.abs(t)>Math.abs(i)&&this.slideTo(t>0?h.slideToRight:h.slideToLeft)}slideTo(e){let t=this.levelsElement.offsetLeft+this.childElementWidth*this.moveCountForOneTouch*e;if(t%this.childElementWidth!=0){const i=Math.floor(t/this.childElementWidth)*this.childElementWidth,s=Math.ceil(t/this.childElementWidth)*this.childElementWidth;t=e==h.slideToRight?i:s}this.offset=t<this.minOffset?this.minOffset:t>=0?0:t}initLevelSlider(){var e;if(!(null===(e=this.levelsElement)||void 0===e?void 0:e.firstElementChild))return void console.log("Widget[elevate-level-list] DOM is not ready.");this.isShowSliderButton=!this.isMobile&&this.levelsElement.clientWidth>this.levelsElement.parentElement.clientWidth,this.minOffset=this.levelsElement.parentElement.clientWidth-this.levelsElement.clientWidth,this.childElementWidth=this.levelsElement.firstElementChild.clientWidth,this.moveCountForOneTouch=Math.ceil(this.levelsElement.parentElement.clientWidth/this.childElementWidth)-1;const t=this.levelsElement.childElementCount;this.childElementWidth+=(this.levelsElement.clientWidth-this.childElementWidth*t)/(t-1)}debounce(e,t){{let i;return()=>{clearTimeout(i),i=setTimeout((()=>{e()}),t)}}}handleResize(){this.debounce(this.initLevelSlider.bind(this),200)()}componentDidRender(){this.host.componentOnReady().then((()=>{this.initLevelSlider()}))}render(){return t(s,{key:"d88d3434af89a0f8fd20a97735121fdf297905ab"},this.levels&&[t("div",{key:"cff36ba584e2474a65a1b95545b00937ecd06c8c",class:`SliderButton LeftButton ${0==this.offset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(h.slideToRight)},t("svg",{key:"640b4dd9b26b4097d15623f3e9c6b14b9a60b37e",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"0a50ffc9319ad33ed61e4696c37a0bfe6090518c","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"314c5b4c5bbc0d50041a66fdf474441ea418345a",class:"LevelItemsWrapper"},t("div",{key:"ff1fb084aeb20319c36a3420e9eb8693ea81b144",style:{left:`${this.offset}px`},class:"LevelItems "+(this.isMobile?"Mobile":""),id:"levelItems",ref:e=>{this.levelsElement=e}},this.levels.map(((e,i)=>t("div",{class:"Item "+(this.selectedLevelId==e.id?"Active":""),onClick:this.onLevelClicked.bind(this,e)},t("img",{alt:`Presentation Icon for ${e.presentation.displayName}`,class:"LevelImg",src:e.presentation.asset}),t("span",{class:"LevelName",title:e.presentation.displayName},e.presentation.displayName),t("span",{class:"LevelPoints"},0==i?"":">",e.firstEntryPoints," ",a("points",this.language))))))),t("div",{key:"8dae638ca436c7e747a0f737028588ee5d040edd",class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(h.slideToLeft)},t("svg",{key:"bba16b49668567aaa41beedd9ea461d256c6812d",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"36a0b6f3ffe8b50ebea9a4ec1c01e3341c440949","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))])}get host(){return l(this)}static get watchers(){return{selectedLevelId:["levelsChangedHandler"]}}};d.style="elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emw--color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emw--color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emw--color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";const c=class{constructor(t){e(this,t),this.elevateLevel=void 0}render(){return t(s,{key:"16d128717e716f7ca7d3bb77fc3a2e67209318b6"},t("div",{key:"658657abdfc64844bd2af40562efe40385e1735a",class:"Row Desc"},t("h3",{key:"ec5871c2f810c8c120bf99510717381175bc1ef4"},this.elevateLevel.presentation.displayName),t("p",{key:"865915c6eea90295238fb47eaa91c8f968199ca5"},t("span",{key:"2b90c6c5d6957b73fc4a0f53d53da0ca023a4f0a",class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};c.style=":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";var v,f,p,g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},b={exports:{}};v=b,f=b.exports,p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==g)return g;throw new Error("unable to locate global object")}(),v.exports=f=p.fetch,p.fetch&&(f.default=p.fetch.bind(p)),f.Headers=p.Headers,f.Request=p.Request,f.Response=p.Response;const u=b.exports,m=class{constructor(t){e(this,t),this.elevateLevelsDataChange=i(this,"elevateLevelsDataChange",7),this.scopeParams=void 0}async componentWillRender(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await u(e.href).then((e=>e.json())).then((e=>{const t=e.data.sort(((e,t)=>e.firstEntryPoints<t.firstEntryPoints?-1:1));let i=this.scopeParams.selectedLevelId;if(!i&&this.scopeParams.showDefault&&t.length>0&&(i=t[0].id),i){const e=t.filter((e=>e.id==i))[0];this.elevateLevelsDataChange.emit({currentLevel:e})}this.elevateLevelsDataChange.emit({clearError:!0}),this.elevateLevelsDataChange.emit({elevateLevels:t})})).catch((e=>{this.elevateLevelsDataChange.emit({errorMessage:{type:"errorWhenLoadElevateLevels",err:e}}),console.error(e)}))}};function w(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function y(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)}))}m.style=":host{display:block}";const L=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&&w(this.el,this.clientStyling),this.clientStylingUrl&&y(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&w(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&y(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&w(this.el,this.clientStyling),this.clientStylingUrl&&y(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(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((s=>{i.en[s]&&(i[e][s]=i[e][s]||i.en[s],"object"==typeof t[e][s]?Object.keys(t[e][s]).forEach((l=>{i[e][s][l]=t[e][s][l]})):i[e][s]=t[e][s])}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(s)}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 l(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};L.style=":host{display:block}";export{r as bonus_elevate_levels,d as elevate_level_list,c as elevate_level_presentation,m as elevate_levels_data,L as general_styling_wrapper}
@@ -0,0 +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),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(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,R,x,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&&!j(o))&&(o+=""),i&&r?c[c.length-1].i+=o:c.push(i?L(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(" "))}}const u=L(e,null);return u.u=t,c.length>0&&(u.h=c),u.p=l,u.m=s,u},L=(e,t)=>({o:0,v:e,i:t,$:null,h:null,u:null,p:null,m:null}),N={},W=e=>n(e).$hostElement$,D=(e,t,n)=>{const o=W(e);return{emit:e=>H(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},H=(e,t,n)=>{const o=a.ce(t,n);return e.dispatchEvent(o),o},U=new WeakMap,F=e=>"sc-"+e.S,q=(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=V(n),s=V(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=j(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(_);t=t.replace(z,""),n&&a.rel(e,t,n,l),o&&a.ael(e,t,o,l)}}},G=/\s/,V=e=>e?e.split(G):[],_="Capture",z=RegExp(_+"$"),B=(e,t,n)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,l=e&&e.u||S,s=t.u||S;for(const e of I(Object.keys(l)))e in s||q(o,e,l[e],void 0,n,t.o);for(const e of I(Object.keys(s)))q(o,e,l[e],s[e],n,t.o)};function I(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var J=!1,K=!1,Q=!1,X=!1,Y=(e,t,n,o)=>{var l;const s=t.h[n];let i,r,c,f=0;if(J||(Q=!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(X||(X="svg"===s.v),i=s.$=u.createElementNS(X?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!J&&2&s.o?"slot-fb":s.v),X&&"foreignObject"===s.v&&(X=!1),B(null,s,X),null!=M&&i["s-si"]!==M&&i.classList.add(i["s-si"]=M),s.h)for(f=0;f<s.h.length;++f)r=Y(e,s,f,i),r&&i.appendChild(r);"svg"===s.v?X=!1:"foreignObject"===i.tagName&&(X=!0)}return i["s-hn"]=x,3&s.o&&(i["s-sr"]=!0,i["s-cr"]=R,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.$&&Z(e.$,!1)),i},Z=(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"]!==x&&o["s-ol"]&&(ae(le(o),o,oe(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Q=!0),t&&Z(o,t)}a.o&=-2},ee=(e,t,n,o,l,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===x&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=Y(null,n,l,e),i&&(o[l].$=i,ae(r,i,oe(t))))},te=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.$;ue(t),e&&(K=!0,e["s-ol"]?e["s-ol"].remove():Z(e,!0),e.remove())}}},ne=(e,t,n=!1)=>e.v===t.v&&("slot"===e.v?e.m===t.m:!!n||e.p===t.p),oe=e=>e&&e["s-ol"]||e,le=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,se=(e,t,n=!1)=>{const o=t.$=e.$,l=e.h,s=t.h,i=t.v,r=t.i;let c;null===r?(X="svg"===i||"foreignObject"!==i&&X,("slot"!==i||J)&&B(e,t,X),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(ne(d,m,l))se(d,m,l),d=t[++r],m=o[++c];else if(ne(h,v,l))se(h,v,l),h=t[--a],v=o[--p];else if(ne(d,v,l))"slot"!==d.v&&"slot"!==v.v||Z(d.$.parentNode,!1),se(d,v,l),ae(e,d.$,h.$.nextSibling),d=t[++r],v=o[--p];else if(ne(h,m,l))"slot"!==d.v&&"slot"!==v.v||Z(h.$.parentNode,!1),se(h,m,l),ae(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=Y(t&&t[c],n,f,e):(se(i,m,l),t[f]=void 0,s=i.$),m=o[++c]):(s=Y(t&&t[c],n,c,e),m=o[++c]),s&&ae(le(d.$),s,oe(d.$))}r>a?ee(e,null==o[p+1]?null:o[p+1].$,n,o,c,p):c>p&&te(t,r,a)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),ee(o,null,t,s,0,s.length-1)):null!==l&&te(l,0,l.length-1),X&&"svg"===i&&(X=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:e.i!==r&&(o.data=r)},ie=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}}ie(e)}},re=[],ce=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(fe(t,e)){let n=re.find((e=>e.j===t));K=!0,t["s-sn"]=t["s-sn"]||e,n?(n.j["s-sh"]=l["s-hn"],n.k=l):(t["s-sh"]=l["s-hn"],re.push({k:l,j:t})),t["s-sr"]&&re.map((e=>{fe(e.j,t["s-sn"])&&(n=re.find((e=>e.j===t)),n&&!e.k&&(e.k=n.k))}))}else re.some((e=>e.j===t))||re.push({j:t})}1===l.nodeType&&ce(l)}},fe=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,ue=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(ue)},ae=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),de=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},he=(e,t)=>{if(e.o|=16,!(4&e.o))return de(e,e.C),g((()=>pe(e,t)));e.o|=512},pe=(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&&(e.o|=256,e.M&&(e.M.map((([e,t])=>ge(n,e,t))),e.M=void 0),o=ge(n,"componentWillLoad")),o=me(o,(()=>ge(n,"componentWillRender"))),me(o,(()=>ye(e,n,t)))},me=(e,t)=>ve(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ve=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ye=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.R,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=F(t),l=r.get(o);if(e=11===e.nodeType?e:u,l)if("string"==typeof l){let s,i=U.get(e=e.head||e);if(i||U.set(e,i=new Set),!i.has(o)){{s=u.createElement("style"),s.innerHTML=l;const t=null!=(n=a.P)?n:k(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);$e(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>be(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},$e=(e,t,n,o)=>{try{t=t.render&&t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{var o,l,s,i;const r=e.$hostElement$,c=e.R,f=e.T||L(null,null),d=(e=>e&&e.v===N)(t)?t:A(null,null,t);if(x=r.tagName,c.A&&(d.u=d.u||{},c.A.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.T=d,d.$=f.$=r.shadowRoot||r,M=r["s-sc"],J=!!(1&c.o),R=r["s-cr"],K=!1,se(f,d,n),a.o|=1,Q){ce(d.$);for(const e of re){const t=e.j;if(!t["s-ol"]){const e=u.createTextNode("");e["s-nr"]=t,ae(t.parentNode,t["s-ol"]=e,t)}}for(const e of re){const t=e.j,r=e.k;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),ae(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)}}K&&ie(d.$),a.o&=-2,re.length=0,R=void 0})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},be=e=>{const t=e.$hostElement$,n=e.t,o=e.C;ge(n,"componentDidRender"),64&e.o||(e.o|=64,Se(t),ge(n,"componentDidLoad"),e.L(t),o||we()),e.O&&(e.O(),e.O=void 0),512&e.o&&w((()=>he(e,!1))),e.o&=-517},we=()=>{Se(u.documentElement),w((()=>H(f,"appload",{detail:{namespace:"bonus-elevate-levels"}})))},ge=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},Se=e=>e.classList.add("hydrated"),je=(e,t,o)=>{var l,i;const r=e.prototype;if(t.N||t.W||e.watchers){e.watchers&&!t.W&&(t.W=e.watchers);const c=Object.entries(null!=(l=t.N)?l:{});if(c.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).D.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.S}" 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.D.get(t),f=i.o,u=i.t;if(o=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(o,l.N[t][0]),(!(8&f)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.D.set(t,o),u)){if(l.W&&128&f){const e=l.W[t];e&&e.map((e=>{try{u[e](o,c,t)}catch(e){s(e,r)}}))}2==(18&f)&&he(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.W)?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.W)?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.A)||l.push([e,s])),s}))]))}}return e},ke=e=>{ge(e,"disconnectedCallback")},Oe=(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 S=!1;if(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],S:o[1],N:o[2],H:o[3]};4&c.o&&(S=!0),c.N=o[2],c.H=o[3],c.A=[],c.W=null!=(l=o[4])?l:{};const f=c.S,v=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,R:n,D:new Map};o.U=new Promise((e=>o.L=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.S}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Ee(this,e,c.H)),w&&(clearTimeout(w),w=null),g?b.push(this):a.jmp((()=>(e=>{if(!(1&a.o)){const t=n(e),o=t.R,l=()=>{};if(1&t.o)Ee(e,t,o.H),(null==t?void 0:t.t)||(null==t?void 0:t.U)&&t.U.then((()=>{}));else{t.o|=1,12&o.o&&(e=>{const t=e["s-cr"]=u.createComment("");t["s-cn"]=!0,ae(e,t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){de(t,t.C=n);break}}o.N&&Object.entries(o.N).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.F){const e=(e=>{const t=e.S.replace(/-/g,"_"),n=e.F;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.S}#${t.q}" was not found`);o.isProxied||(n.W=o.watchers,je(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()}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=F(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=()=>he(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);e.G&&(e.G.map((e=>e())),e.G=void 0),(null==e?void 0:e.t)?ke(e.t):(null==e?void 0:e.U)&&e.U.then((()=>ke(e.t)))}})()))}componentOnReady(){return n(this).U}};c.F=e[0],p.includes(f)||m.get(f)||(d.push(f),m.define(f,je(v,c,1)))}))})),d.length>0&&(S&&($.textContent+=c),$.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(l=a.P)?l:k(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(we,30)))},Ee=(e,t,n)=>{n&&n.map((([n,o,l])=>{const s=Me(e,n),i=Ce(t,l),r=Re(n);a.ael(s,o,i,r),(t.G=t.G||[]).push((()=>a.rel(s,o,i,r)))}))},Ce=(e,t)=>n=>{var o;try{256&e.o?null==(o=e.t)||o[t](n):(e.M=e.M||[]).push([t,n])}catch(e){s(e)}},Me=(e,t)=>8&t?f:e,Re=e=>({passive:!!(1&e),capture:!!(2&e)}),xe=e=>a.P=e;export{N as H,Oe as b,D as c,W as g,A as h,d as p,o as r,xe as s}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-4009ecdf.js');
5
+ const index = require('./index-129a8e19.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-levels_5.cjs",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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-levels_5.cjs",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-4009ecdf.js');
5
+ const index = require('./index-129a8e19.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr', 'tr'];
@@ -61,6 +61,7 @@ const BonusElevateLevels = class {
61
61
  index.registerInstance(this, hostRef);
62
62
  this.clientStyling = '';
63
63
  this.clientStylingUrl = '';
64
+ this.mbSource = undefined;
64
65
  this.endpoint = undefined;
65
66
  this.language = 'en';
66
67
  this.translationUrl = '';
@@ -117,9 +118,9 @@ const BonusElevateLevels = class {
117
118
  }
118
119
  render() {
119
120
  var _a;
120
- return (index.h("div", { key: '327b5cd6a3bc756ce0696a0f2a4081f35bad7316', class: "ElevateLevelContent" }, index.h("elevate-levels-data", { key: 'cf1ab9a55cdaf9eba688bd524cb4a83d63563e77', scopeParams: this.elevateLevelParamProxy }), index.h("div", { key: '9c85b9a805712db07c7c99ac2db843062997f667', class: "LevelContent" }, ((_a = this.elevateLevels) === null || _a === void 0 ? void 0 : _a.length) ?
121
+ return (index.h("div", { key: '6bc46c87633a9a295108e50886096f67dd35d44a', class: "ElevateLevelContent" }, index.h("elevate-levels-data", { key: '902d2796991a8acf293761255ab10f2cee54a92e', scopeParams: this.elevateLevelParamProxy }), index.h("div", { key: '7e47a25dce1d0fba40e3e432dd9c805aa5bbe308', class: "LevelContent" }, ((_a = this.elevateLevels) === null || _a === void 0 ? void 0 : _a.length) ?
121
122
  index.h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
122
- index.h("elevate-level-presentation", { key: '57ea5391608a7c4c4f7eb7f130a8c9f982fe5045', elevateLevel: this.currentLevel })), this.errorMessage && index.h("div", { key: '46121a28053608f8e9632a8a3976c0b33c4d5e72' }, this.errorMessage), index.h("general-styling-wrapper", { key: 'bdbaeee850d2ad84bf26fa81979ae662469a8b41', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
123
+ index.h("elevate-level-presentation", { key: 'dcfad9aa4422545fa74a7b8b957eb72001506046', elevateLevel: this.currentLevel })), this.errorMessage && index.h("div", { key: '7e2741168e50a1ee2adebe39c2c3433b5c9bf7ca' }, this.errorMessage), index.h("general-styling-wrapper", { key: '74cae021838f61964a519c2f200cfbb1f8470778', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource })));
123
124
  }
124
125
  static get watchers() { return {
125
126
  "selectedLevelId": ["selectedLevelIdChangedHandler"],
@@ -384,6 +385,63 @@ const mergeTranslations = (url, target) => {
384
385
  });
385
386
  };
386
387
 
388
+ /**
389
+ * @name setClientStyling
390
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
391
+ * @param {HTMLElement} stylingContainer The reference element of the widget
392
+ * @param {string} clientStyling The style content
393
+ */
394
+ function setClientStyling(stylingContainer, clientStyling) {
395
+ if (stylingContainer) {
396
+ const sheet = document.createElement('style');
397
+ sheet.innerHTML = clientStyling;
398
+ stylingContainer.appendChild(sheet);
399
+ }
400
+ }
401
+
402
+ /**
403
+ * @name setClientStylingURL
404
+ * @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
405
+ * @param {HTMLElement} stylingContainer The reference element of the widget
406
+ * @param {string} clientStylingUrl The URL of the style content
407
+ */
408
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
409
+ const url = new URL(clientStylingUrl);
410
+
411
+ fetch(url.href)
412
+ .then((res) => res.text())
413
+ .then((data) => {
414
+ const cssFile = document.createElement('style');
415
+ cssFile.innerHTML = data;
416
+ if (stylingContainer) {
417
+ stylingContainer.appendChild(cssFile);
418
+ }
419
+ })
420
+ .catch((err) => {
421
+ console.error('There was an error while trying to load client styling from URL', err);
422
+ });
423
+ }
424
+
425
+ /**
426
+ * @name setStreamLibrary
427
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
428
+ * @param {HTMLElement} stylingContainer The highest element of the widget
429
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
430
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
431
+ */
432
+ function setStreamStyling(stylingContainer, domain, subscription) {
433
+ if (window.emMessageBus) {
434
+ const sheet = document.createElement('style');
435
+
436
+ window.emMessageBus.subscribe(domain, (data) => {
437
+ sheet.innerHTML = data;
438
+ if (stylingContainer) {
439
+ stylingContainer.appendChild(sheet);
440
+ }
441
+ });
442
+ }
443
+ }
444
+
387
445
  const generalStylingWrapperCss = ":host{display:block}";
388
446
  const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
389
447
 
@@ -391,38 +449,47 @@ const GeneralStylingWrapper = class {
391
449
  constructor(hostRef) {
392
450
  index.registerInstance(this, hostRef);
393
451
  this.stylingAppends = false;
394
- this.setClientStyling = () => {
395
- let sheet = document.createElement('style');
396
- sheet.innerHTML = this.clientStyling;
397
- this.el.prepend(sheet);
398
- };
399
- this.setClientStylingURL = () => {
400
- let url = new URL(this.clientStylingUrl);
401
- let cssFile = document.createElement('style');
402
- fetch(url.href)
403
- .then((res) => res.text())
404
- .then((data) => {
405
- cssFile.innerHTML = data;
406
- setTimeout(() => {
407
- this.el.prepend(cssFile);
408
- }, 1);
409
- })
410
- .catch((err) => {
411
- console.log('error ', err);
412
- });
413
- };
414
452
  this.clientStyling = '';
415
453
  this.clientStylingUrl = '';
454
+ this.mbSource = undefined;
416
455
  this.translationUrl = '';
417
456
  this.targetTranslations = undefined;
418
457
  }
458
+ componentDidLoad() {
459
+ if (this.el) {
460
+ if (window.emMessageBus != undefined) {
461
+ setStreamStyling(this.el, `${this.mbSource}.Style`);
462
+ }
463
+ else {
464
+ if (this.clientStyling)
465
+ setClientStyling(this.el, this.clientStyling);
466
+ if (this.clientStylingUrl)
467
+ setClientStylingURL(this.el, this.clientStylingUrl);
468
+ this.stylingAppends = true;
469
+ }
470
+ }
471
+ }
472
+ disconnectedCallback() {
473
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
474
+ }
475
+ handleClientStylingChange(newValue, oldValue) {
476
+ if (newValue != oldValue) {
477
+ setClientStyling(this.el, this.clientStyling);
478
+ }
479
+ }
480
+ handleClientStylingUrlChange(newValue, oldValue) {
481
+ if (newValue != oldValue) {
482
+ if (this.clientStylingUrl)
483
+ setClientStylingURL(this.el, this.clientStylingUrl);
484
+ }
485
+ }
419
486
  componentDidRender() {
420
487
  // start custom styling area
421
488
  if (!this.stylingAppends) {
422
489
  if (this.clientStyling)
423
- this.setClientStyling();
490
+ setClientStyling(this.el, this.clientStyling);
424
491
  if (this.clientStylingUrl)
425
- this.setClientStylingURL();
492
+ setClientStylingURL(this.el, this.clientStylingUrl);
426
493
  this.stylingAppends = true;
427
494
  }
428
495
  // end custom styling area
@@ -436,9 +503,13 @@ const GeneralStylingWrapper = class {
436
503
  return await Promise.all(promises);
437
504
  }
438
505
  render() {
439
- return (index.h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, index.h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
506
+ return (index.h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, index.h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
440
507
  }
441
508
  get el() { return index.getElement(this); }
509
+ static get watchers() { return {
510
+ "clientStyling": ["handleClientStylingChange"],
511
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
512
+ }; }
442
513
  };
443
514
  GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
444
515
 
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'bonus-elevate-levels';
24
- const BUILD = /* bonus-elevate-levels */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, 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: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* bonus-elevate-levels */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, 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: false, 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
@@ -1142,6 +1142,9 @@ var postUpdateComponent = (hostRef) => {
1142
1142
  {
1143
1143
  addHydratedFlag(elm);
1144
1144
  }
1145
+ {
1146
+ safeCall(instance, "componentDidLoad");
1147
+ }
1145
1148
  endPostUpdate();
1146
1149
  {
1147
1150
  hostRef.$onReadyResolve$(elm);
@@ -1414,6 +1417,9 @@ var setContentReference = (elm) => {
1414
1417
  insertBefore(elm, contentRefElm, elm.firstChild);
1415
1418
  };
1416
1419
  var disconnectInstance = (instance) => {
1420
+ {
1421
+ safeCall(instance, "disconnectedCallback");
1422
+ }
1417
1423
  };
1418
1424
  var disconnectedCallback = async (elm) => {
1419
1425
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1424,8 +1430,10 @@ var disconnectedCallback = async (elm) => {
1424
1430
  hostRef.$rmListeners$ = void 0;
1425
1431
  }
1426
1432
  }
1427
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1428
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1433
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1434
+ disconnectInstance(hostRef.$lazyInstance$);
1435
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1436
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1429
1437
  }
1430
1438
  }
1431
1439
  };
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-4009ecdf.js');
5
+ const index = require('./index-129a8e19.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-levels_5.cjs",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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-levels_5.cjs",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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;
@@ -4,6 +4,7 @@ export class BonusElevateLevels {
4
4
  constructor() {
5
5
  this.clientStyling = '';
6
6
  this.clientStylingUrl = '';
7
+ this.mbSource = undefined;
7
8
  this.endpoint = undefined;
8
9
  this.language = 'en';
9
10
  this.translationUrl = '';
@@ -60,9 +61,9 @@ export class BonusElevateLevels {
60
61
  }
61
62
  render() {
62
63
  var _a;
63
- return (h("div", { key: '327b5cd6a3bc756ce0696a0f2a4081f35bad7316', class: "ElevateLevelContent" }, h("elevate-levels-data", { key: 'cf1ab9a55cdaf9eba688bd524cb4a83d63563e77', scopeParams: this.elevateLevelParamProxy }), h("div", { key: '9c85b9a805712db07c7c99ac2db843062997f667', class: "LevelContent" }, ((_a = this.elevateLevels) === null || _a === void 0 ? void 0 : _a.length) ?
64
+ return (h("div", { key: '6bc46c87633a9a295108e50886096f67dd35d44a', class: "ElevateLevelContent" }, h("elevate-levels-data", { key: '902d2796991a8acf293761255ab10f2cee54a92e', scopeParams: this.elevateLevelParamProxy }), h("div", { key: '7e47a25dce1d0fba40e3e432dd9c805aa5bbe308', class: "LevelContent" }, ((_a = this.elevateLevels) === null || _a === void 0 ? void 0 : _a.length) ?
64
65
  h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
65
- h("elevate-level-presentation", { key: '57ea5391608a7c4c4f7eb7f130a8c9f982fe5045', elevateLevel: this.currentLevel })), this.errorMessage && h("div", { key: '46121a28053608f8e9632a8a3976c0b33c4d5e72' }, this.errorMessage), h("general-styling-wrapper", { key: 'bdbaeee850d2ad84bf26fa81979ae662469a8b41', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
66
+ h("elevate-level-presentation", { key: 'dcfad9aa4422545fa74a7b8b957eb72001506046', elevateLevel: this.currentLevel })), this.errorMessage && h("div", { key: '7e2741168e50a1ee2adebe39c2c3433b5c9bf7ca' }, this.errorMessage), h("general-styling-wrapper", { key: '74cae021838f61964a519c2f200cfbb1f8470778', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource })));
66
67
  }
67
68
  static get is() { return "bonus-elevate-levels"; }
68
69
  static get encapsulation() { return "shadow"; }
@@ -114,6 +115,23 @@ export class BonusElevateLevels {
114
115
  "reflect": true,
115
116
  "defaultValue": "''"
116
117
  },
118
+ "mbSource": {
119
+ "type": "string",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "string",
123
+ "resolved": "string",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "Client custom styling via streamStyling"
131
+ },
132
+ "attribute": "mb-source",
133
+ "reflect": true
134
+ },
117
135
  "endpoint": {
118
136
  "type": "string",
119
137
  "mutable": false,
@@ -11,6 +11,7 @@ const meta = {
11
11
  translationUrl: "",
12
12
  selectedLevelId: "",
13
13
  showDefault: "",
14
+ mbSource: "",
14
15
  },
15
16
  argTypes: {
16
17
  clientStyling: { control: 'text', description: '' },
@@ -20,18 +21,20 @@ const meta = {
20
21
  translationUrl: { control: 'text', description: '' },
21
22
  selectedLevelId: { control: 'text', description: '' },
22
23
  showDefault: { control: 'text', description: '' },
24
+ mbSource: { control: 'text', description: '' },
23
25
  },
24
26
  };
25
27
  export default meta;
26
28
  const Template = (args) => {
27
29
  return html `<bonus-elevate-levels
28
- clientStyling="${args.clientStyling}"
29
- clientStylingUrl="${args.clientStylingUrl}"
30
+ client-styling="${args.clientStyling}"
31
+ client-styling-url="${args.clientStylingUrl}"
30
32
  endpoint="${args.endpoint}"
31
33
  language="${args.language}"
32
- translationUrl="${args.translationUrl}"
33
- selectedLevelId="${args.selectedLevelId}"
34
+ translation-url="${args.translationUrl}"
35
+ selectedLevel-id="${args.selectedLevelId}"
34
36
  showDefault="${args.showDefault}"
37
+ mb-source="${args.mbSource}"
35
38
  ></bonus-elevate-levels>`;
36
39
  };
37
40
  export const Default = Template.bind({});
@@ -43,4 +46,5 @@ Default.args = {
43
46
  translationUrl: "",
44
47
  selectedLevelId: "",
45
48
  showDefault: "",
49
+ mbSource: "",
46
50
  };
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-96423025.js';
2
- export { s as setNonce } from './index-96423025.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-422aaa76.js';
2
+ export { s as setNonce } from './index-422aaa76.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-levels_5",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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-levels_5",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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,4 +1,4 @@
1
- import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-96423025.js';
1
+ import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-422aaa76.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr', 'tr'];
@@ -57,6 +57,7 @@ const BonusElevateLevels = class {
57
57
  registerInstance(this, hostRef);
58
58
  this.clientStyling = '';
59
59
  this.clientStylingUrl = '';
60
+ this.mbSource = undefined;
60
61
  this.endpoint = undefined;
61
62
  this.language = 'en';
62
63
  this.translationUrl = '';
@@ -113,9 +114,9 @@ const BonusElevateLevels = class {
113
114
  }
114
115
  render() {
115
116
  var _a;
116
- return (h("div", { key: '327b5cd6a3bc756ce0696a0f2a4081f35bad7316', class: "ElevateLevelContent" }, h("elevate-levels-data", { key: 'cf1ab9a55cdaf9eba688bd524cb4a83d63563e77', scopeParams: this.elevateLevelParamProxy }), h("div", { key: '9c85b9a805712db07c7c99ac2db843062997f667', class: "LevelContent" }, ((_a = this.elevateLevels) === null || _a === void 0 ? void 0 : _a.length) ?
117
+ return (h("div", { key: '6bc46c87633a9a295108e50886096f67dd35d44a', class: "ElevateLevelContent" }, h("elevate-levels-data", { key: '902d2796991a8acf293761255ab10f2cee54a92e', scopeParams: this.elevateLevelParamProxy }), h("div", { key: '7e47a25dce1d0fba40e3e432dd9c805aa5bbe308', class: "LevelContent" }, ((_a = this.elevateLevels) === null || _a === void 0 ? void 0 : _a.length) ?
117
118
  h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
118
- h("elevate-level-presentation", { key: '57ea5391608a7c4c4f7eb7f130a8c9f982fe5045', elevateLevel: this.currentLevel })), this.errorMessage && h("div", { key: '46121a28053608f8e9632a8a3976c0b33c4d5e72' }, this.errorMessage), h("general-styling-wrapper", { key: 'bdbaeee850d2ad84bf26fa81979ae662469a8b41', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
119
+ h("elevate-level-presentation", { key: 'dcfad9aa4422545fa74a7b8b957eb72001506046', elevateLevel: this.currentLevel })), this.errorMessage && h("div", { key: '7e2741168e50a1ee2adebe39c2c3433b5c9bf7ca' }, this.errorMessage), h("general-styling-wrapper", { key: '74cae021838f61964a519c2f200cfbb1f8470778', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource })));
119
120
  }
120
121
  static get watchers() { return {
121
122
  "selectedLevelId": ["selectedLevelIdChangedHandler"],
@@ -380,6 +381,63 @@ const mergeTranslations = (url, target) => {
380
381
  });
381
382
  };
382
383
 
384
+ /**
385
+ * @name setClientStyling
386
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
387
+ * @param {HTMLElement} stylingContainer The reference element of the widget
388
+ * @param {string} clientStyling The style content
389
+ */
390
+ function setClientStyling(stylingContainer, clientStyling) {
391
+ if (stylingContainer) {
392
+ const sheet = document.createElement('style');
393
+ sheet.innerHTML = clientStyling;
394
+ stylingContainer.appendChild(sheet);
395
+ }
396
+ }
397
+
398
+ /**
399
+ * @name setClientStylingURL
400
+ * @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
401
+ * @param {HTMLElement} stylingContainer The reference element of the widget
402
+ * @param {string} clientStylingUrl The URL of the style content
403
+ */
404
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
405
+ const url = new URL(clientStylingUrl);
406
+
407
+ fetch(url.href)
408
+ .then((res) => res.text())
409
+ .then((data) => {
410
+ const cssFile = document.createElement('style');
411
+ cssFile.innerHTML = data;
412
+ if (stylingContainer) {
413
+ stylingContainer.appendChild(cssFile);
414
+ }
415
+ })
416
+ .catch((err) => {
417
+ console.error('There was an error while trying to load client styling from URL', err);
418
+ });
419
+ }
420
+
421
+ /**
422
+ * @name setStreamLibrary
423
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
424
+ * @param {HTMLElement} stylingContainer The highest element of the widget
425
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
426
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
427
+ */
428
+ function setStreamStyling(stylingContainer, domain, subscription) {
429
+ if (window.emMessageBus) {
430
+ const sheet = document.createElement('style');
431
+
432
+ window.emMessageBus.subscribe(domain, (data) => {
433
+ sheet.innerHTML = data;
434
+ if (stylingContainer) {
435
+ stylingContainer.appendChild(sheet);
436
+ }
437
+ });
438
+ }
439
+ }
440
+
383
441
  const generalStylingWrapperCss = ":host{display:block}";
384
442
  const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
385
443
 
@@ -387,38 +445,47 @@ const GeneralStylingWrapper = class {
387
445
  constructor(hostRef) {
388
446
  registerInstance(this, hostRef);
389
447
  this.stylingAppends = false;
390
- this.setClientStyling = () => {
391
- let sheet = document.createElement('style');
392
- sheet.innerHTML = this.clientStyling;
393
- this.el.prepend(sheet);
394
- };
395
- this.setClientStylingURL = () => {
396
- let url = new URL(this.clientStylingUrl);
397
- let cssFile = document.createElement('style');
398
- fetch(url.href)
399
- .then((res) => res.text())
400
- .then((data) => {
401
- cssFile.innerHTML = data;
402
- setTimeout(() => {
403
- this.el.prepend(cssFile);
404
- }, 1);
405
- })
406
- .catch((err) => {
407
- console.log('error ', err);
408
- });
409
- };
410
448
  this.clientStyling = '';
411
449
  this.clientStylingUrl = '';
450
+ this.mbSource = undefined;
412
451
  this.translationUrl = '';
413
452
  this.targetTranslations = undefined;
414
453
  }
454
+ componentDidLoad() {
455
+ if (this.el) {
456
+ if (window.emMessageBus != undefined) {
457
+ setStreamStyling(this.el, `${this.mbSource}.Style`);
458
+ }
459
+ else {
460
+ if (this.clientStyling)
461
+ setClientStyling(this.el, this.clientStyling);
462
+ if (this.clientStylingUrl)
463
+ setClientStylingURL(this.el, this.clientStylingUrl);
464
+ this.stylingAppends = true;
465
+ }
466
+ }
467
+ }
468
+ disconnectedCallback() {
469
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
470
+ }
471
+ handleClientStylingChange(newValue, oldValue) {
472
+ if (newValue != oldValue) {
473
+ setClientStyling(this.el, this.clientStyling);
474
+ }
475
+ }
476
+ handleClientStylingUrlChange(newValue, oldValue) {
477
+ if (newValue != oldValue) {
478
+ if (this.clientStylingUrl)
479
+ setClientStylingURL(this.el, this.clientStylingUrl);
480
+ }
481
+ }
415
482
  componentDidRender() {
416
483
  // start custom styling area
417
484
  if (!this.stylingAppends) {
418
485
  if (this.clientStyling)
419
- this.setClientStyling();
486
+ setClientStyling(this.el, this.clientStyling);
420
487
  if (this.clientStylingUrl)
421
- this.setClientStylingURL();
488
+ setClientStylingURL(this.el, this.clientStylingUrl);
422
489
  this.stylingAppends = true;
423
490
  }
424
491
  // end custom styling area
@@ -432,9 +499,13 @@ const GeneralStylingWrapper = class {
432
499
  return await Promise.all(promises);
433
500
  }
434
501
  render() {
435
- return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
502
+ return (h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
436
503
  }
437
504
  get el() { return getElement(this); }
505
+ static get watchers() { return {
506
+ "clientStyling": ["handleClientStylingChange"],
507
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
508
+ }; }
438
509
  };
439
510
  GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
440
511
 
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'bonus-elevate-levels';
2
- const BUILD = /* bonus-elevate-levels */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, 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: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* bonus-elevate-levels */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, 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: false, 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
@@ -1120,6 +1120,9 @@ var postUpdateComponent = (hostRef) => {
1120
1120
  {
1121
1121
  addHydratedFlag(elm);
1122
1122
  }
1123
+ {
1124
+ safeCall(instance, "componentDidLoad");
1125
+ }
1123
1126
  endPostUpdate();
1124
1127
  {
1125
1128
  hostRef.$onReadyResolve$(elm);
@@ -1392,6 +1395,9 @@ var setContentReference = (elm) => {
1392
1395
  insertBefore(elm, contentRefElm, elm.firstChild);
1393
1396
  };
1394
1397
  var disconnectInstance = (instance) => {
1398
+ {
1399
+ safeCall(instance, "disconnectedCallback");
1400
+ }
1395
1401
  };
1396
1402
  var disconnectedCallback = async (elm) => {
1397
1403
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1402,8 +1408,10 @@ var disconnectedCallback = async (elm) => {
1402
1408
  hostRef.$rmListeners$ = void 0;
1403
1409
  }
1404
1410
  }
1405
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1406
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1411
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1412
+ disconnectInstance(hostRef.$lazyInstance$);
1413
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1414
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1407
1415
  }
1408
1416
  }
1409
1417
  };
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-96423025.js';
2
- export { s as setNonce } from './index-96423025.js';
1
+ import { b as bootstrapLazy } from './index-422aaa76.js';
2
+ export { s as setNonce } from './index-422aaa76.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-levels_5",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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-levels_5",[[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[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 };
@@ -8,6 +8,8 @@ export declare class BonusElevateLevels {
8
8
  * Client custom styling via url
9
9
  */
10
10
  clientStylingUrl: string;
11
+ /** Client custom styling via streamStyling */
12
+ mbSource: string;
11
13
  /**
12
14
  * Endpoint URL for the source of data
13
15
  */
@@ -25,6 +25,10 @@ export namespace Components {
25
25
  * Language of the widget
26
26
  */
27
27
  "language": string;
28
+ /**
29
+ * Client custom styling via streamStyling
30
+ */
31
+ "mbSource": string;
28
32
  /**
29
33
  * Level id to find the level info, then show in view
30
34
  */
@@ -145,6 +149,10 @@ declare namespace LocalJSX {
145
149
  * Language of the widget
146
150
  */
147
151
  "language"?: string;
152
+ /**
153
+ * Client custom styling via streamStyling
154
+ */
155
+ "mbSource"?: string;
148
156
  /**
149
157
  * Level id to find the level info, then show in view
150
158
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-elevate-levels",
3
- "version": "1.69.2",
3
+ "version": "1.70.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(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={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{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.l?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=>h().then(e),g=y(v,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],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,R,x,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 l=null,o=null,s=null,i=!1,r=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!j(l))&&(l+=""),i&&r?c[c.length-1].i+=l:c.push(i?N(null,l):l),r=i)};if(f(n),t){t.key&&(o=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(" "))}}const u=N(e,null);return u.u=t,c.length>0&&(u.h=c),u.p=o,u.m=s,u},N=(e,t)=>({l:0,v:e,i:t,$:null,h:null,u:null,p:null,m:null}),W={},H=e=>n(e).$hostElement$,L=(e,t,n)=>{const l=H(e);return{emit:e=>U(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},U=(e,t,n)=>{const l=a.ce(t,n);return e.dispatchEvent(l),l},D=new WeakMap,F=e=>"sc-"+e.S,q=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=V(n),s=V(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(f,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(_);t=t.replace(z,""),n&&a.rel(e,t,n,o),l&&a.ael(e,t,l,o)}}},G=/\s/,V=e=>e?e.split(G):[],_="Capture",z=RegExp(_+"$"),B=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of I(Object.keys(o)))e in s||q(l,e,o[e],void 0,n,t.l);for(const e of I(Object.keys(s)))q(l,e,o[e],s[e],n,t.l)};function I(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var J=!1,K=!1,Q=!1,X=!1,Y=(e,t,n,l)=>{var o;const s=t.h[n];let i,r,c,f=0;if(J||(Q=!0,"slot"===s.v&&(M&&l.classList.add(M+"-s"),s.l|=s.h?2:1)),null!==s.i)i=s.$=u.createTextNode(s.i);else if(1&s.l)i=s.$=u.createTextNode("");else{if(X||(X="svg"===s.v),i=s.$=u.createElementNS(X?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!J&&2&s.l?"slot-fb":s.v),X&&"foreignObject"===s.v&&(X=!1),B(null,s,X),null!=M&&i["s-si"]!==M&&i.classList.add(i["s-si"]=M),s.h)for(f=0;f<s.h.length;++f)r=Y(e,s,f,i),r&&i.appendChild(r);"svg"===s.v?X=!1:"foreignObject"===i.tagName&&(X=!0)}return i["s-hn"]=x,3&s.l&&(i["s-sr"]=!0,i["s-cr"]=R,i["s-sn"]=s.m||"",i["s-rf"]=null==(o=s.u)?void 0:o.ref,c=e&&e.h&&e.h[n],c&&c.v===s.v&&e.$&&Z(e.$,!1)),i},Z=(e,t)=>{a.l|=1;const n=Array.from(e.childNodes);for(let e=n.length-1;e>=0;e--){const l=n[e];l["s-hn"]!==x&&l["s-ol"]&&(ae(oe(l),l,le(l)),l["s-ol"].remove(),l["s-ol"]=void 0,l["s-sh"]=void 0,Q=!0),t&&Z(l,t)}a.l&=-2},ee=(e,t,n,l,o,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===x&&(r=r.shadowRoot);o<=s;++o)l[o]&&(i=Y(null,n,o,e),i&&(l[o].$=i,ae(r,i,le(t))))},te=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;ue(t),e&&(K=!0,e["s-ol"]?e["s-ol"].remove():Z(e,!0),e.remove())}}},ne=(e,t,n=!1)=>e.v===t.v&&("slot"===e.v?e.m===t.m:!!n||e.p===t.p),le=e=>e&&e["s-ol"]||e,oe=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,se=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,i=t.v,r=t.i;let c;null===r?(X="svg"===i||"foreignObject"!==i&&X,("slot"!==i||J)&&B(e,t,X),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=t.length-1,h=t[0],d=t[a],p=l.length-1,m=l[0],v=l[p];for(;r<=a&&c<=p;)if(null==h)h=t[++r];else if(null==d)d=t[--a];else if(null==m)m=l[++c];else if(null==v)v=l[--p];else if(ne(h,m,o))se(h,m,o),h=t[++r],m=l[++c];else if(ne(d,v,o))se(d,v,o),d=t[--a],v=l[--p];else if(ne(h,v,o))"slot"!==h.v&&"slot"!==v.v||Z(h.$.parentNode,!1),se(h,v,o),ae(e,h.$,d.$.nextSibling),h=t[++r],v=l[--p];else if(ne(d,m,o))"slot"!==h.v&&"slot"!==v.v||Z(d.$.parentNode,!1),se(d,m,o),ae(e,d.$,h.$),d=t[--a],m=l[++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=Y(t&&t[c],n,f,e):(se(i,m,o),t[f]=void 0,s=i.$),m=l[++c]):(s=Y(t&&t[c],n,c,e),m=l[++c]),s&&ae(oe(h.$),s,le(h.$))}r>a?ee(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&te(t,r,a)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),ee(l,null,t,s,0,s.length-1)):null!==o&&te(o,0,o.length-1),X&&"svg"===i&&(X=!1)):(c=l["s-cr"])?c.parentNode.textContent=r:e.i!==r&&(l.data=r)},ie=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 l of t)if(l!==e)if(l["s-hn"]!==e["s-hn"]||""!==n){if(1===l.nodeType&&(n===l.getAttribute("slot")||n===l["s-sn"])||3===l.nodeType&&n===l["s-sn"]){e.hidden=!0;break}}else if(1===l.nodeType||3===l.nodeType&&""!==l.textContent.trim()){e.hidden=!0;break}}ie(e)}},re=[],ce=e=>{let t,n,l;for(const o of e.childNodes){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){n=t.parentNode.childNodes;const e=o["s-sn"];for(l=n.length-1;l>=0;l--)if(t=n[l],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(fe(t,e)){let n=re.find((e=>e.j===t));K=!0,t["s-sn"]=t["s-sn"]||e,n?(n.j["s-sh"]=o["s-hn"],n.k=o):(t["s-sh"]=o["s-hn"],re.push({k:o,j:t})),t["s-sr"]&&re.map((e=>{fe(e.j,t["s-sn"])&&(n=re.find((e=>e.j===t)),n&&!e.k&&(e.k=n.k))}))}else re.some((e=>e.j===t))||re.push({j:t})}1===o.nodeType&&ce(o)}},fe=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,ue=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(ue)},ae=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),he=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},de=(e,t)=>{if(e.l|=16,!(4&e.l))return he(e,e.C),g((()=>pe(e,t)));e.l|=512},pe=(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 l;return t&&(e.l|=256,e.M&&(e.M.map((([e,t])=>ge(n,e,t))),e.M=void 0),l=ge(n,"componentWillLoad")),l=me(l,(()=>ge(n,"componentWillRender"))),me(l,(()=>ye(e,n,t)))},me=(e,t)=>ve(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ve=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ye=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.R,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=F(t),o=r.get(l);if(e=11===e.nodeType?e:u,o)if("string"==typeof o){let s,i=D.get(e=e.head||e);if(i||D.set(e,i=new Set),!i.has(l)){{s=u.createElement("style"),s.innerHTML=o;const t=null!=(n=a.P)?n:k(u);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),i&&i.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);$e(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>be(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},$e=(e,t,n,l)=>{try{t=t.render&&t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{var l,o,s,i;const r=e.$hostElement$,c=e.R,f=e.T||N(null,null),h=(e=>e&&e.v===W)(t)?t:A(null,null,t);if(x=r.tagName,c.A&&(h.u=h.u||{},c.A.map((([e,t])=>h.u[t]=r[e]))),n&&h.u)for(const e of Object.keys(h.u))r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(h.u[e]=r[e]);if(h.v=null,h.l|=4,e.T=h,h.$=f.$=r.shadowRoot||r,M=r["s-sc"],J=!!(1&c.l),R=r["s-cr"],K=!1,se(f,h,n),a.l|=1,Q){ce(h.$);for(const e of re){const t=e.j;if(!t["s-ol"]){const e=u.createTextNode("");e["s-nr"]=t,ae(t.parentNode,t["s-ol"]=e,t)}}for(const e of re){const t=e.j,r=e.k;if(r){const e=r.parentNode;let n=r.nextSibling;{let s=null==(l=t["s-ol"])?void 0:l.previousSibling;for(;s;){let l=null!=(o=s["s-nr"])?o:null;if(l&&l["s-sn"]===t["s-sn"]&&e===l.parentNode){for(l=l.nextSibling;l===t||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){n=l;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),ae(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)}}K&&ie(h.$),a.l&=-2,re.length=0,R=void 0})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},be=e=>{const t=e.$hostElement$,n=e.C;ge(e.t,"componentDidRender"),64&e.l||(e.l|=64,Se(t),e.N(t),n||we()),e.O&&(e.O(),e.O=void 0),512&e.l&&w((()=>de(e,!1))),e.l&=-517},we=()=>{Se(u.documentElement),w((()=>U(f,"appload",{detail:{namespace:"bonus-elevate-levels"}})))},ge=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},Se=e=>e.classList.add("hydrated"),je=(e,t,l)=>{var o,i;const r=e.prototype;if(t.W||t.H||e.watchers){e.watchers&&!t.H&&(t.H=e.watchers);const c=Object.entries(null!=(o=t.W)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).L.get(t))(0,e)},set(l){((e,t,l,o)=>{const i=n(e);if(!i)throw Error(`Couldn't find host element for "${o.S}" 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.l,u=i.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,o.W[t][0]),(!(8&f)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(i.L.set(t,l),u)){if(o.H&&128&f){const e=o.H[t];e&&e.map((e=>{try{u[e](l,c,t)}catch(e){s(e,r)}}))}2==(18&f)&&de(i,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;r.attributeChangedCallback=function(e,o,s){a.jmp((()=>{var i;const c=l.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 l=n(this),r=null==l?void 0:l.l;if(r&&!(8&r)&&128&r&&s!==o){const n=l.t,r=null==(i=t.H)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=t.H)?i:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.A)||o.push([e,s])),s}))]))}}return e},ke=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=f.customElements,v=u.head,y=v.querySelector("meta[charset]"),$=u.createElement("style"),b=[];let w,g=!0;Object.assign(a,l),a.o=new URL(l.resourcesUrl||"./",u.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],S:l[1],W:l[2],U:l[3]};4&c.l&&(S=!0),c.W=l[2],c.U=l[3],c.A=[],c.H=null!=(o=l[4])?o:{};const f=c.S,v=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,R:n,L:new Map};l.D=new Promise((e=>l.N=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Oe(this,e,c.U)),w&&(clearTimeout(w),w=null),g?b.push(this):a.jmp((()=>(e=>{if(!(1&a.l)){const t=n(e),l=t.R,o=()=>{};if(1&t.l)Oe(e,t,l.U),(null==t?void 0:t.t)||(null==t?void 0:t.D)&&t.D.then((()=>{}));else{t.l|=1,12&l.l&&(e=>{const t=e["s-cr"]=u.createComment("");t["s-cn"]=!0,ae(e,t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){he(t,t.C=n);break}}l.W&&Object.entries(l.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.F){const e=(e=>{const t=e.S.replace(/-/g,"_"),n=e.F;if(!n)return;const l=i.get(n);return l?l[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=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.S}#${t.q}" was not found`);l.isProxied||(n.H=l.watchers,je(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=F(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.C,c=()=>de(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.l)){const e=n(this);e.G&&(e.G.map((e=>e())),e.G=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.D)&&e.D.then((()=>{}))}})()))}componentOnReady(){return n(this).D}};c.F=e[0],p.includes(f)||m.get(f)||(h.push(f),m.define(f,je(v,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=a.P)?o:k(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(we,30)))},Oe=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=Ce(e,n),i=Ee(t,o),r=Me(n);a.ael(s,l,i,r),(t.G=t.G||[]).push((()=>a.rel(s,l,i,r)))}))},Ee=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.M=e.M||[]).push([t,n])}catch(e){s(e)}},Ce=(e,t)=>8&t?f:e,Me=e=>({passive:!!(1&e),capture:!!(2&e)}),Re=e=>a.P=e;export{W as H,ke as b,L as c,H as g,A as h,h as p,l as r,Re as s}