@everymatrix/bonus-elevate-levels 1.37.4 → 1.37.5

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"./p-b93c42e2.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((e=>l([["p-b4dbf9a0",[[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"]]],[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"]]],[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"./p-de8a59e4.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((e=>l([["p-806a8825",[[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"]]],[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"]]],[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)));
@@ -0,0 +1 @@
1
+ import{r as e,h as t,c as i,H as s,g as l}from"./p-de8a59e4.js";const n=["ro","en","fr","ar","hu","hr"],o={en:{seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set"},fr:{seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set"}},r=(e,t)=>{const i=t;return o[void 0!==i&&n.includes(i)?i:"en"][e]},h=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.translationUrl="",this.elevateLevels=[]}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=r("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(){return t("div",{class:"ElevateLevelContent"},t("elevate-levels-data",{scopeParams:this.elevateLevelParamProxy}),t("div",{class:"LevelContent"},this.elevateLevels?t("elevate-level-list",{language:this.language,selectedLevelId:this.selectedLevelId,levels:this.elevateLevels}):r("noLevelsSet",this.language),this.currentLevel&&t("elevate-level-presentation",{elevateLevel:this.currentLevel})),this.errorMessage&&t("div",null,this.errorMessage),t("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl}))}static get watchers(){return{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var a;h.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"}(a||(a={}));const d=class{constructor(t){var s;e(this,t),this.selectedLevelChanged=i(this,"selectedLevelChanged",7),this.isShowSliderButton=!1,this.offset=0,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))}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?a.slideToRight:a.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==a.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,null,this.levels&&[t("div",{class:`SliderButton LeftButton ${0==this.offset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(a.slideToRight)},t("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{class:"LevelItemsWrapper"},t("div",{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," ",r("points",this.language))))))),t("div",{class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(a.slideToLeft)},t("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"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(--emfe-w-color-gray-50, #f4f4f4);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(--emfe-w-color-gray-100, #767171);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(--emfe-w-color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";const v=class{constructor(t){e(this,t)}render(){return t(s,null,t("div",{class:"Row Desc"},t("h3",null,this.elevateLevel.presentation.displayName),t("p",null,t("span",{class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};v.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 c,p=(function(e,t){var i=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==i)return i;throw new Error("unable to locate global object")}();e.exports=t=i.fetch,i.fetch&&(t.default=i.fetch.bind(i)),t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response}(c={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},c.exports),c.exports);const g=class{constructor(t){e(this,t),this.elevateLevelsDataChange=i(this,"elevateLevelsDataChange",7)}async componentWillRender(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await p(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)}))}};g.style=":host{display:block}";const u=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",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)}))}}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[e]:{};for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{class:"StyleShell"},t("slot",{name:"mainContent"}))}get el(){return l(this)}};u.style=":host{display:block}";export{h as bonus_elevate_levels,d as elevate_level_list,v as elevate_level_presentation,g as elevate_levels_data,u as general_styling_wrapper}
@@ -0,0 +1 @@
1
+ let e,t,l,n=!1,o=!1,s=!1,r=!1,i=!1;const c="undefined"!=typeof window?window:{},f=c.document||{head:{}},u={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},a=e=>Promise.resolve(e),$=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),d=(e,t,l)=>{l&&l.map((([l,n,o])=>{const s=m(e,l),r=h(t,o),i=b(l);u.ael(s,n,r,i),(t.o=t.o||[]).push((()=>u.rel(s,n,r,i)))}))},h=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){ie(e)}},m=(e,t)=>8&t?c:e,b=e=>0!=(2&e),p=new WeakMap,y=e=>"sc-"+e.$,w={},g=e=>"object"==(e=typeof e)||"function"===e,v=(e,t,...l)=>{let n=null,o=null,s=!1,r=!1,i=[];const c=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?c(n):null!=n&&"boolean"!=typeof n&&((s="function"!=typeof e&&!g(n))&&(n+=""),s&&r?i[i.length-1].h+=n:i.push(s?S(null,n):n),r=s)};if(c(l),t){t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const f=S(e,null);return f.m=t,i.length>0&&(f.p=i),f.g=o,f},S=(e,t)=>({t:0,v:e,h:t,S:null,p:null,m:null,g:null}),j={},k=(e,t,l,n,o,s)=>{if(l!==n){let r=re(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,o=M(l),s=M(n);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 l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("ref"===t)n&&n(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=g(n);if((r||i&&null!==n)&&!o)try{if(e.tagName.includes("-"))e[t]=n;else{let o=null==n?"":n;"list"===t?r=!1:null!=l&&e[t]==o||(e[t]=o)}}catch(e){}null==n||!1===n?!1===n&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,n=!0===n?"":n)}else t="-"===t[2]?t.slice(3):re(c,i)?i.slice(2):i[2]+t.slice(3),l&&u.rel(e,t,l,!1),n&&u.ael(e,t,n,!1)}},O=/\s/,M=e=>e?e.split(O):[],R=(e,t,l,n)=>{const o=11===t.S.nodeType&&t.S.host?t.S.host:t.S,s=e&&e.m||w,r=t.m||w;for(n in s)n in r||k(o,n,s[n],void 0,l,t.t);for(n in r)k(o,n,s[n],r[n],l,t.t)},C=(o,i,c,u)=>{let a,$,d,h=i.p[c],m=0;if(n||(s=!0,"slot"===h.v&&(e&&u.classList.add(e+"-s"),h.t|=h.p?2:1)),null!==h.h)a=h.S=f.createTextNode(h.h);else if(1&h.t)a=h.S=f.createTextNode("");else{if(r||(r="svg"===h.v),a=h.S=f.createElementNS(r?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&h.t?"slot-fb":h.v),r&&"foreignObject"===h.v&&(r=!1),R(null,h,r),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),h.p)for(m=0;m<h.p.length;++m)$=C(o,h,m,a),$&&a.appendChild($);"svg"===h.v?r=!1:"foreignObject"===a.tagName&&(r=!0)}return a["s-hn"]=l,3&h.t&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=h.g||"",d=o&&o.p&&o.p[c],d&&d.v===h.v&&o.S&&T(o.S,!1)),a},T=(e,t)=>{u.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==l&&o["s-ol"]&&(E(o).insertBefore(o,W(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&T(o,t)}u.t&=-2},x=(e,t,n,o,s,r)=>{let i,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===l&&(c=c.shadowRoot);s<=r;++s)o[s]&&(i=C(null,n,s,e),i&&(o[s].S=i,c.insertBefore(i,W(t))))},N=(e,t,l,n,s)=>{for(;t<=l;++t)(n=e[t])&&(s=n.S,D(n),o=!0,s["s-ol"]?s["s-ol"].remove():T(s,!0),s.remove())},P=(e,t)=>e.v===t.v&&("slot"!==e.v||e.g===t.g),W=e=>e&&e["s-ol"]||e,E=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,L=(e,t)=>{const l=t.S=e.S,n=e.p,o=t.p,s=t.v,i=t.h;let c;null===i?(r="svg"===s||"foreignObject"!==s&&r,"slot"===s||R(e,t,r),null!==n&&null!==o?((e,t,l,n)=>{let o,s=0,r=0,i=t.length-1,c=t[0],f=t[i],u=n.length-1,a=n[0],$=n[u];for(;s<=i&&r<=u;)null==c?c=t[++s]:null==f?f=t[--i]:null==a?a=n[++r]:null==$?$=n[--u]:P(c,a)?(L(c,a),c=t[++s],a=n[++r]):P(f,$)?(L(f,$),f=t[--i],$=n[--u]):P(c,$)?("slot"!==c.v&&"slot"!==$.v||T(c.S.parentNode,!1),L(c,$),e.insertBefore(c.S,f.S.nextSibling),c=t[++s],$=n[--u]):P(f,a)?("slot"!==c.v&&"slot"!==$.v||T(f.S.parentNode,!1),L(f,a),e.insertBefore(f.S,c.S),f=t[--i],a=n[++r]):(o=C(t&&t[r],l,r,e),a=n[++r],o&&E(c.S).insertBefore(o,W(c.S)));s>i?x(e,null==n[u+1]?null:n[u+1].S,l,n,r,u):r>u&&N(t,s,i)})(l,n,t,o):null!==o?(null!==e.h&&(l.textContent=""),x(l,null,t,o,0,o.length-1)):null!==n&&N(n,0,n.length-1),r&&"svg"===s&&(r=!1)):(c=l["s-cr"])?c.parentNode.textContent=i:e.h!==i&&(l.data=i)},A=e=>{let t,l,n,o,s,r,i=e.childNodes;for(l=0,n=i.length;l<n;l++)if(t=i[l],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<n;o++)if(r=i[o].nodeType,i[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===r&&s===i[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===r||3===r&&""!==i[o].textContent.trim()){t.hidden=!0;break}A(t)}},H=[],U=e=>{let t,l,n,s,r,i,c=0,f=e.childNodes,u=f.length;for(;c<u;c++){if(t=f[c],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,s=t["s-sn"],i=n.length-1;i>=0;i--)l=n[i],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(q(l,s)?(r=H.find((e=>e.j===l)),o=!0,l["s-sn"]=l["s-sn"]||s,r?r.k=t:H.push({k:t,j:l}),l["s-sr"]&&H.map((e=>{q(e.j,l["s-sn"])&&(r=H.find((e=>e.j===l)),r&&!e.k&&(e.k=r.k))}))):H.some((e=>e.j===l))||H.push({j:l}));1===t.nodeType&&U(t)}},q=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,D=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(D)},F=e=>ne(e).O,V=(e,t,l)=>{const n=F(e);return{emit:e=>_(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},_=(e,t,l)=>{const n=u.ce(t,l);return e.dispatchEvent(n),n},z=(e,t)=>{t&&!e.M&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.M=t)))},B=(e,t)=>{if(e.t|=16,!(4&e.t))return z(e,e.R),pe((()=>G(e,t)));e.t|=512},G=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>X(l,e,t))),e.u=null),n=X(l,"componentWillLoad")),n=Y(n,(()=>X(l,"componentWillRender"))),Y(n,(()=>I(e,l,t)))},I=async(e,t,l)=>{const n=e.O,o=n["s-rc"];l&&(e=>{const t=e.C,l=e.O,n=t.t,o=((e,t)=>{let l=y(t),n=ue.get(l);if(e=11===e.nodeType?e:f,n)if("string"==typeof n){let t,o=p.get(e=e.head||e);o||p.set(e,o=new Set),o.has(l)||(t=f.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link")),o&&o.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return l})(l.shadowRoot?l.shadowRoot:l.getRootNode(),t);10&n&&(l["s-sc"]=o,l.classList.add(o+"-h"))})(e);J(e,t),o&&(o.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>K(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},J=(r,i)=>{try{i=i.render&&i.render(),r.t&=-17,r.t|=2,((r,i)=>{const c=r.O,a=r.C,$=r.T||S(null,null),d=(e=>e&&e.v===j)(i)?i:v(null,null,i);if(l=c.tagName,a.N&&(d.m=d.m||{},a.N.map((([e,t])=>d.m[t]=c[e]))),d.v=null,d.t|=4,r.T=d,d.S=$.S=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],n=0!=(1&a.t),o=!1,L($,d),u.t|=1,s){let e,t,l,n,o,s;U(d.S);let r=0;for(;r<H.length;r++)e=H[r],t=e.j,t["s-ol"]||(l=f.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(r=0;r<H.length;r++)if(e=H[r],t=e.j,e.k){for(n=e.k.parentNode,o=e.k.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(s=l["s-nr"],s&&s["s-sn"]===t["s-sn"]&&n===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&n!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&A(d.S),u.t&=-2,H.length=0})(r,i)}catch(e){ie(e,r.O)}return null},K=e=>{const t=e.O,l=e.R;X(e.i,"componentDidRender"),64&e.t||(e.t|=64,Z(t),e.P(t),l||Q()),e.M&&(e.M(),e.M=void 0),512&e.t&&be((()=>B(e,!1))),e.t&=-517},Q=()=>{Z(f.documentElement),be((()=>_(c,"appload",{detail:{namespace:"bonus-elevate-levels"}})))},X=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){ie(e)}},Y=(e,t)=>e&&e.then?e.then(t):t(),Z=e=>e.classList.add("hydrated"),ee=(e,t,l)=>{if(t.W){e.watchers&&(t.L=e.watchers);const n=Object.entries(t.W),o=e.prototype;if(n.map((([e,[n]])=>{(31&n||2&l&&32&n)&&Object.defineProperty(o,e,{get(){return((e,t)=>ne(this).A.get(t))(0,e)},set(l){((e,t,l,n)=>{const o=ne(e),s=o.O,r=o.A.get(t),i=o.t,c=o.i;if(l=((e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,n.W[t][0]),(!(8&i)||void 0===r)&&l!==r&&(!Number.isNaN(r)||!Number.isNaN(l))&&(o.A.set(t,l),c)){if(n.L&&128&i){const e=n.L[t];e&&e.map((e=>{try{c[e](l,r,t)}catch(e){ie(e,s)}}))}2==(18&i)&&B(o,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;o.attributeChangedCallback=function(e,t,n){u.jmp((()=>{const t=l.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const o=n[1]||e;return l.set(o,e),512&n[0]&&t.N.push([e,o]),o}))}}return e},te=(e,t={})=>{const l=[],n=t.exclude||[],o=c.customElements,s=f.head,r=s.querySelector("meta[charset]"),i=f.createElement("style"),a=[];let h,m=!0;Object.assign(u,t),u.l=new URL(t.resourcesUrl||"./",f.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],$:t[1],W:t[2],H:t[3]};s.W=t[2],s.H=t[3],s.N=[],s.L={};const r=s.$,i=class extends HTMLElement{constructor(e){super(e),se(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?a.push(this):u.jmp((()=>(e=>{if(0==(1&u.t)){const t=ne(e),l=t.C,n=()=>{};if(1&t.t)d(e,t,l.H);else{t.t|=1,12&l.t&&(e=>{const t=e["s-cr"]=f.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let l=e;for(;l=l.parentNode||l.host;)if(l["s-p"]){z(t,t.R=l);break}}l.W&&Object.entries(l.W).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=fe(l)).then){const e=()=>{};o=await o,e()}o.isProxied||(l.L=o.watchers,ee(o,l,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){ie(e)}t.t&=-9,t.t|=128,e()}if(o.style){let e=o.style;const t=y(l);if(!ue.has(t)){const n=()=>{};((e,t,l)=>{let n=ue.get(e);$&&l?(n=n||new CSSStyleSheet,n.replace(t)):n=t,ue.set(e,n)})(t,e,!!(1&l.t)),n()}}}const s=t.R,r=()=>B(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,l)}n()}})(this)))}disconnectedCallback(){u.jmp((()=>(()=>{if(0==(1&u.t)){const e=ne(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return ne(this).U}};s.q=e[0],n.includes(r)||o.get(r)||(l.push(r),o.define(r,ee(i,s,1)))}))})),i.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),s.insertBefore(i,r?r.nextSibling:s.firstChild),m=!1,a.length?a.map((e=>e.connectedCallback())):u.jmp((()=>h=setTimeout(Q,30)))},le=new WeakMap,ne=e=>le.get(e),oe=(e,t)=>le.set(t.i=e,t),se=(e,t)=>{const l={t:0,O:e,C:t,A:new Map};return l.U=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],d(e,l,t.H),le.set(e,l)},re=(e,t)=>t in e,ie=(e,t)=>(0,console.error)(e,t),ce=new Map,fe=e=>{const t=e.$.replace(/-/g,"_"),l=e.q,n=ce.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(ce.set(l,e),e[t])),ie)},ue=new Map,ae=[],$e=[],de=(e,t)=>l=>{e.push(l),i||(i=!0,t&&4&u.t?be(me):u.raf(me))},he=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ie(e)}e.length=0},me=()=>{he(ae),he($e),(i=ae.length>0)&&u.raf(me)},be=e=>a().then(e),pe=de($e,!0);export{j as H,te as b,V as c,F as g,v as h,a as p,oe as r}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-3c66cec7.js');
3
+ const index = require('./index-5ab5af9f.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3c66cec7.js');
5
+ const index = require('./index-5ab5af9f.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu', 'hr'];
@@ -71,6 +71,9 @@ const BonusElevateLevels = class {
71
71
  this.currentLevel = Object.assign({}, currentLevel);
72
72
  }
73
73
  }
74
+ onSessionOrEndpointChange() {
75
+ this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
76
+ }
74
77
  elevateLevelsDataChangeHandler(event) {
75
78
  if (!event.detail) {
76
79
  return;
@@ -102,11 +105,13 @@ const BonusElevateLevels = class {
102
105
  render() {
103
106
  return (index.h("div", { class: "ElevateLevelContent" }, index.h("elevate-levels-data", { scopeParams: this.elevateLevelParamProxy }), index.h("div", { class: "LevelContent" }, this.elevateLevels ?
104
107
  index.h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
105
- index.h("elevate-level-presentation", { elevateLevel: this.currentLevel }), index.h("div", { class: "tc", onClick: this.onTCClick }, translate('termsAndConditions', this.language), ' ')), this.errorMessage && index.h("div", null, this.errorMessage), index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
108
+ index.h("elevate-level-presentation", { elevateLevel: this.currentLevel })), this.errorMessage && index.h("div", null, this.errorMessage), index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
106
109
  }
107
110
  static get watchers() { return {
108
111
  "selectedLevelId": ["selectedLevelIdChangedHandler"],
109
- "elevateLevels": ["selectedLevelIdChangedHandler"]
112
+ "elevateLevels": ["selectedLevelIdChangedHandler"],
113
+ "endpoint": ["onSessionOrEndpointChange"],
114
+ "language": ["onSessionOrEndpointChange"]
110
115
  }; }
111
116
  };
112
117
  BonusElevateLevels.style = bonusElevateLevelsCss;
@@ -295,7 +300,7 @@ const ElevateLevelsData = class {
295
300
  index.registerInstance(this, hostRef);
296
301
  this.elevateLevelsDataChange = index.createEvent(this, "elevateLevelsDataChange", 7);
297
302
  }
298
- async componentWillLoad() {
303
+ async componentWillRender() {
299
304
  //load data
300
305
  if (!this.scopeParams.endpoint) {
301
306
  return;
@@ -1025,6 +1025,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
1025
1025
  promise = safeCall(instance, 'componentWillLoad');
1026
1026
  }
1027
1027
  }
1028
+ {
1029
+ promise = then(promise, () => safeCall(instance, 'componentWillRender'));
1030
+ }
1028
1031
  endSchedule();
1029
1032
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1030
1033
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3c66cec7.js');
5
+ const index = require('./index-5ab5af9f.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -36,6 +36,9 @@ export class BonusElevateLevels {
36
36
  this.currentLevel = Object.assign({}, currentLevel);
37
37
  }
38
38
  }
39
+ onSessionOrEndpointChange() {
40
+ this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
41
+ }
39
42
  elevateLevelsDataChangeHandler(event) {
40
43
  if (!event.detail) {
41
44
  return;
@@ -71,10 +74,7 @@ export class BonusElevateLevels {
71
74
  this.elevateLevels ?
72
75
  h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language),
73
76
  this.currentLevel &&
74
- h("elevate-level-presentation", { elevateLevel: this.currentLevel }),
75
- h("div", { class: "tc", onClick: this.onTCClick },
76
- translate('termsAndConditions', this.language),
77
- ' ')),
77
+ h("elevate-level-presentation", { elevateLevel: this.currentLevel })),
78
78
  this.errorMessage && h("div", null, this.errorMessage),
79
79
  h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
80
80
  }
@@ -223,6 +223,12 @@ export class BonusElevateLevels {
223
223
  }, {
224
224
  "propName": "elevateLevels",
225
225
  "methodName": "selectedLevelIdChangedHandler"
226
+ }, {
227
+ "propName": "endpoint",
228
+ "methodName": "onSessionOrEndpointChange"
229
+ }, {
230
+ "propName": "language",
231
+ "methodName": "onSessionOrEndpointChange"
226
232
  }]; }
227
233
  static get listeners() { return [{
228
234
  "name": "selectedLevelChanged",
@@ -2,7 +2,7 @@ import { Component, Event, Prop } from '@stencil/core';
2
2
  import "@everymatrix/general-styling-wrapper";
3
3
  import fetch from "node-fetch";
4
4
  export class ElevateLevelsData {
5
- async componentWillLoad() {
5
+ async componentWillRender() {
6
6
  //load data
7
7
  if (!this.scopeParams.endpoint) {
8
8
  return;
@@ -45,6 +45,9 @@ const BonusElevateLevels$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
45
45
  this.currentLevel = Object.assign({}, currentLevel);
46
46
  }
47
47
  }
48
+ onSessionOrEndpointChange() {
49
+ this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
50
+ }
48
51
  elevateLevelsDataChangeHandler(event) {
49
52
  if (!event.detail) {
50
53
  return;
@@ -76,11 +79,13 @@ const BonusElevateLevels$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
76
79
  render() {
77
80
  return (h("div", { class: "ElevateLevelContent" }, h("elevate-levels-data", { scopeParams: this.elevateLevelParamProxy }), h("div", { class: "LevelContent" }, this.elevateLevels ?
78
81
  h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
79
- h("elevate-level-presentation", { elevateLevel: this.currentLevel }), h("div", { class: "tc", onClick: this.onTCClick }, translate('termsAndConditions', this.language), ' ')), this.errorMessage && h("div", null, this.errorMessage), h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
82
+ h("elevate-level-presentation", { elevateLevel: this.currentLevel })), this.errorMessage && h("div", null, this.errorMessage), h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
80
83
  }
81
84
  static get watchers() { return {
82
85
  "selectedLevelId": ["selectedLevelIdChangedHandler"],
83
- "elevateLevels": ["selectedLevelIdChangedHandler"]
86
+ "elevateLevels": ["selectedLevelIdChangedHandler"],
87
+ "endpoint": ["onSessionOrEndpointChange"],
88
+ "language": ["onSessionOrEndpointChange"]
84
89
  }; }
85
90
  static get style() { return bonusElevateLevelsCss; }
86
91
  }, [1, "bonus-elevate-levels", {
@@ -49,7 +49,7 @@ const ElevateLevelsData = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
49
49
  this.__registerHost();
50
50
  this.elevateLevelsDataChange = createEvent(this, "elevateLevelsDataChange", 7);
51
51
  }
52
- async componentWillLoad() {
52
+ async componentWillRender() {
53
53
  //load data
54
54
  if (!this.scopeParams.endpoint) {
55
55
  return;
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-2cb5433a.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-8f57d3b4.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-2cb5433a.js';
1
+ import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-8f57d3b4.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu', 'hr'];
@@ -67,6 +67,9 @@ const BonusElevateLevels = class {
67
67
  this.currentLevel = Object.assign({}, currentLevel);
68
68
  }
69
69
  }
70
+ onSessionOrEndpointChange() {
71
+ this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
72
+ }
70
73
  elevateLevelsDataChangeHandler(event) {
71
74
  if (!event.detail) {
72
75
  return;
@@ -98,11 +101,13 @@ const BonusElevateLevels = class {
98
101
  render() {
99
102
  return (h("div", { class: "ElevateLevelContent" }, h("elevate-levels-data", { scopeParams: this.elevateLevelParamProxy }), h("div", { class: "LevelContent" }, this.elevateLevels ?
100
103
  h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
101
- h("elevate-level-presentation", { elevateLevel: this.currentLevel }), h("div", { class: "tc", onClick: this.onTCClick }, translate('termsAndConditions', this.language), ' ')), this.errorMessage && h("div", null, this.errorMessage), h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
104
+ h("elevate-level-presentation", { elevateLevel: this.currentLevel })), this.errorMessage && h("div", null, this.errorMessage), h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
102
105
  }
103
106
  static get watchers() { return {
104
107
  "selectedLevelId": ["selectedLevelIdChangedHandler"],
105
- "elevateLevels": ["selectedLevelIdChangedHandler"]
108
+ "elevateLevels": ["selectedLevelIdChangedHandler"],
109
+ "endpoint": ["onSessionOrEndpointChange"],
110
+ "language": ["onSessionOrEndpointChange"]
106
111
  }; }
107
112
  };
108
113
  BonusElevateLevels.style = bonusElevateLevelsCss;
@@ -291,7 +296,7 @@ const ElevateLevelsData = class {
291
296
  registerInstance(this, hostRef);
292
297
  this.elevateLevelsDataChange = createEvent(this, "elevateLevelsDataChange", 7);
293
298
  }
294
- async componentWillLoad() {
299
+ async componentWillRender() {
295
300
  //load data
296
301
  if (!this.scopeParams.endpoint) {
297
302
  return;
@@ -1003,6 +1003,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
1003
1003
  promise = safeCall(instance, 'componentWillLoad');
1004
1004
  }
1005
1005
  }
1006
+ {
1007
+ promise = then(promise, () => safeCall(instance, 'componentWillRender'));
1008
+ }
1006
1009
  endSchedule();
1007
1010
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
1008
1011
  };
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-2cb5433a.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-8f57d3b4.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -41,6 +41,7 @@ export declare class BonusElevateLevels {
41
41
  errorMessage: string;
42
42
  selectedLevelChangedHandler(event: CustomEvent): void;
43
43
  selectedLevelIdChangedHandler(): void;
44
+ onSessionOrEndpointChange(): void;
44
45
  elevateLevelsDataChangeHandler(event: CustomEvent): void;
45
46
  onTCClick(): void;
46
47
  componentWillLoad(): void;
@@ -6,5 +6,5 @@ export declare class ElevateLevelsData {
6
6
  */
7
7
  scopeParams: any;
8
8
  elevateLevelsDataChange: EventEmitter;
9
- componentWillLoad(): Promise<void>;
9
+ componentWillRender(): Promise<void>;
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-elevate-levels",
3
- "version": "1.37.4",
3
+ "version": "1.37.5",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,h as t,c as i,H as s,g as l}from"./p-b93c42e2.js";const n=["ro","en","fr","ar","hu","hr"],o={en:{seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set"},fr:{seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set"}},r=(e,t)=>{const i=t;return o[void 0!==i&&n.includes(i)?i:"en"][e]},h=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.translationUrl="",this.elevateLevels=[]}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)}}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=r("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(){return t("div",{class:"ElevateLevelContent"},t("elevate-levels-data",{scopeParams:this.elevateLevelParamProxy}),t("div",{class:"LevelContent"},this.elevateLevels?t("elevate-level-list",{language:this.language,selectedLevelId:this.selectedLevelId,levels:this.elevateLevels}):r("noLevelsSet",this.language),this.currentLevel&&t("elevate-level-presentation",{elevateLevel:this.currentLevel}),t("div",{class:"tc",onClick:this.onTCClick},r("termsAndConditions",this.language)," ")),this.errorMessage&&t("div",null,this.errorMessage),t("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl}))}static get watchers(){return{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"]}}};var a;h.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"}(a||(a={}));const d=class{constructor(t){var s;e(this,t),this.selectedLevelChanged=i(this,"selectedLevelChanged",7),this.isShowSliderButton=!1,this.offset=0,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))}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?a.slideToRight:a.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==a.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,null,this.levels&&[t("div",{class:`SliderButton LeftButton ${0==this.offset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(a.slideToRight)},t("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{class:"LevelItemsWrapper"},t("div",{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," ",r("points",this.language))))))),t("div",{class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(a.slideToLeft)},t("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"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(--emfe-w-color-gray-50, #f4f4f4);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(--emfe-w-color-gray-100, #767171);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(--emfe-w-color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";const v=class{constructor(t){e(this,t)}render(){return t(s,null,t("div",{class:"Row Desc"},t("h3",null,this.elevateLevel.presentation.displayName),t("p",null,t("span",{class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};v.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 c,p=(function(e,t){var i=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==i)return i;throw new Error("unable to locate global object")}();e.exports=t=i.fetch,i.fetch&&(t.default=i.fetch.bind(i)),t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response}(c={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},c.exports),c.exports);const u=class{constructor(t){e(this,t),this.elevateLevelsDataChange=i(this,"elevateLevelsDataChange",7)}async componentWillLoad(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await p(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)}))}};u.style=":host{display:block}";const g=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",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)}))}}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[e]:{};for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{class:"StyleShell"},t("slot",{name:"mainContent"}))}get el(){return l(this)}};g.style=":host{display:block}";export{h as bonus_elevate_levels,d as elevate_level_list,v as elevate_level_presentation,u as elevate_levels_data,g as general_styling_wrapper}
@@ -1 +0,0 @@
1
- let e,t,l,n=!1,o=!1,s=!1,r=!1,i=!1;const c="undefined"!=typeof window?window:{},f=c.document||{head:{}},u={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},a=e=>Promise.resolve(e),$=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),d=(e,t,l)=>{l&&l.map((([l,n,o])=>{const s=b(e,l),r=h(t,o),i=m(l);u.ael(s,n,r,i),(t.o=t.o||[]).push((()=>u.rel(s,n,r,i)))}))},h=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){ie(e)}},b=(e,t)=>8&t?c:e,m=e=>0!=(2&e),y=new WeakMap,p=e=>"sc-"+e.$,w={},g=e=>"object"==(e=typeof e)||"function"===e,v=(e,t,...l)=>{let n=null,o=null,s=!1,r=!1,i=[];const c=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?c(n):null!=n&&"boolean"!=typeof n&&((s="function"!=typeof e&&!g(n))&&(n+=""),s&&r?i[i.length-1].h+=n:i.push(s?S(null,n):n),r=s)};if(c(l),t){t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const f=S(e,null);return f.m=t,i.length>0&&(f.p=i),f.g=o,f},S=(e,t)=>({t:0,v:e,h:t,S:null,p:null,m:null,g:null}),j={},k=(e,t,l,n,o,s)=>{if(l!==n){let r=re(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,o=M(l),s=M(n);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 l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("ref"===t)n&&n(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=g(n);if((r||i&&null!==n)&&!o)try{if(e.tagName.includes("-"))e[t]=n;else{let o=null==n?"":n;"list"===t?r=!1:null!=l&&e[t]==o||(e[t]=o)}}catch(e){}null==n||!1===n?!1===n&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,n=!0===n?"":n)}else t="-"===t[2]?t.slice(3):re(c,i)?i.slice(2):i[2]+t.slice(3),l&&u.rel(e,t,l,!1),n&&u.ael(e,t,n,!1)}},O=/\s/,M=e=>e?e.split(O):[],C=(e,t,l,n)=>{const o=11===t.S.nodeType&&t.S.host?t.S.host:t.S,s=e&&e.m||w,r=t.m||w;for(n in s)n in r||k(o,n,s[n],void 0,l,t.t);for(n in r)k(o,n,s[n],r[n],l,t.t)},R=(o,i,c,u)=>{let a,$,d,h=i.p[c],b=0;if(n||(s=!0,"slot"===h.v&&(e&&u.classList.add(e+"-s"),h.t|=h.p?2:1)),null!==h.h)a=h.S=f.createTextNode(h.h);else if(1&h.t)a=h.S=f.createTextNode("");else{if(r||(r="svg"===h.v),a=h.S=f.createElementNS(r?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&h.t?"slot-fb":h.v),r&&"foreignObject"===h.v&&(r=!1),C(null,h,r),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),h.p)for(b=0;b<h.p.length;++b)$=R(o,h,b,a),$&&a.appendChild($);"svg"===h.v?r=!1:"foreignObject"===a.tagName&&(r=!0)}return a["s-hn"]=l,3&h.t&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=h.g||"",d=o&&o.p&&o.p[c],d&&d.v===h.v&&o.S&&T(o.S,!1)),a},T=(e,t)=>{u.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==l&&o["s-ol"]&&(L(o).insertBefore(o,E(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&T(o,t)}u.t&=-2},x=(e,t,n,o,s,r)=>{let i,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===l&&(c=c.shadowRoot);s<=r;++s)o[s]&&(i=R(null,n,s,e),i&&(o[s].S=i,c.insertBefore(i,E(t))))},N=(e,t,l,n,s)=>{for(;t<=l;++t)(n=e[t])&&(s=n.S,D(n),o=!0,s["s-ol"]?s["s-ol"].remove():T(s,!0),s.remove())},P=(e,t)=>e.v===t.v&&("slot"!==e.v||e.g===t.g),E=e=>e&&e["s-ol"]||e,L=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const l=t.S=e.S,n=e.p,o=t.p,s=t.v,i=t.h;let c;null===i?(r="svg"===s||"foreignObject"!==s&&r,"slot"===s||C(e,t,r),null!==n&&null!==o?((e,t,l,n)=>{let o,s=0,r=0,i=t.length-1,c=t[0],f=t[i],u=n.length-1,a=n[0],$=n[u];for(;s<=i&&r<=u;)null==c?c=t[++s]:null==f?f=t[--i]:null==a?a=n[++r]:null==$?$=n[--u]:P(c,a)?(W(c,a),c=t[++s],a=n[++r]):P(f,$)?(W(f,$),f=t[--i],$=n[--u]):P(c,$)?("slot"!==c.v&&"slot"!==$.v||T(c.S.parentNode,!1),W(c,$),e.insertBefore(c.S,f.S.nextSibling),c=t[++s],$=n[--u]):P(f,a)?("slot"!==c.v&&"slot"!==$.v||T(f.S.parentNode,!1),W(f,a),e.insertBefore(f.S,c.S),f=t[--i],a=n[++r]):(o=R(t&&t[r],l,r,e),a=n[++r],o&&L(c.S).insertBefore(o,E(c.S)));s>i?x(e,null==n[u+1]?null:n[u+1].S,l,n,r,u):r>u&&N(t,s,i)})(l,n,t,o):null!==o?(null!==e.h&&(l.textContent=""),x(l,null,t,o,0,o.length-1)):null!==n&&N(n,0,n.length-1),r&&"svg"===s&&(r=!1)):(c=l["s-cr"])?c.parentNode.textContent=i:e.h!==i&&(l.data=i)},A=e=>{let t,l,n,o,s,r,i=e.childNodes;for(l=0,n=i.length;l<n;l++)if(t=i[l],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<n;o++)if(r=i[o].nodeType,i[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===r&&s===i[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===r||3===r&&""!==i[o].textContent.trim()){t.hidden=!0;break}A(t)}},H=[],U=e=>{let t,l,n,s,r,i,c=0,f=e.childNodes,u=f.length;for(;c<u;c++){if(t=f[c],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,s=t["s-sn"],i=n.length-1;i>=0;i--)l=n[i],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(q(l,s)?(r=H.find((e=>e.j===l)),o=!0,l["s-sn"]=l["s-sn"]||s,r?r.k=t:H.push({k:t,j:l}),l["s-sr"]&&H.map((e=>{q(e.j,l["s-sn"])&&(r=H.find((e=>e.j===l)),r&&!e.k&&(e.k=r.k))}))):H.some((e=>e.j===l))||H.push({j:l}));1===t.nodeType&&U(t)}},q=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,D=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(D)},F=e=>ne(e).O,V=(e,t,l)=>{const n=F(e);return{emit:e=>_(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},_=(e,t,l)=>{const n=u.ce(t,l);return e.dispatchEvent(n),n},z=(e,t)=>{t&&!e.M&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.M=t)))},B=(e,t)=>{if(e.t|=16,!(4&e.t))return z(e,e.C),ye((()=>G(e,t)));e.t|=512},G=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>X(l,e,t))),e.u=null),n=X(l,"componentWillLoad")),Y(n,(()=>I(e,l,t)))},I=async(e,t,l)=>{const n=e.O,o=n["s-rc"];l&&(e=>{const t=e.R,l=e.O,n=t.t,o=((e,t)=>{let l=p(t),n=ue.get(l);if(e=11===e.nodeType?e:f,n)if("string"==typeof n){let t,o=y.get(e=e.head||e);o||y.set(e,o=new Set),o.has(l)||(t=f.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link")),o&&o.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return l})(l.shadowRoot?l.shadowRoot:l.getRootNode(),t);10&n&&(l["s-sc"]=o,l.classList.add(o+"-h"))})(e);J(e,t),o&&(o.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>K(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},J=(r,i)=>{try{i=i.render&&i.render(),r.t&=-17,r.t|=2,((r,i)=>{const c=r.O,a=r.R,$=r.T||S(null,null),d=(e=>e&&e.v===j)(i)?i:v(null,null,i);if(l=c.tagName,a.N&&(d.m=d.m||{},a.N.map((([e,t])=>d.m[t]=c[e]))),d.v=null,d.t|=4,r.T=d,d.S=$.S=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],n=0!=(1&a.t),o=!1,W($,d),u.t|=1,s){let e,t,l,n,o,s;U(d.S);let r=0;for(;r<H.length;r++)e=H[r],t=e.j,t["s-ol"]||(l=f.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(r=0;r<H.length;r++)if(e=H[r],t=e.j,e.k){for(n=e.k.parentNode,o=e.k.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(s=l["s-nr"],s&&s["s-sn"]===t["s-sn"]&&n===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&n!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&A(d.S),u.t&=-2,H.length=0})(r,i)}catch(e){ie(e,r.O)}return null},K=e=>{const t=e.O,l=e.C;X(e.i,"componentDidRender"),64&e.t||(e.t|=64,Z(t),e.P(t),l||Q()),e.M&&(e.M(),e.M=void 0),512&e.t&&me((()=>B(e,!1))),e.t&=-517},Q=()=>{Z(f.documentElement),me((()=>_(c,"appload",{detail:{namespace:"bonus-elevate-levels"}})))},X=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){ie(e)}},Y=(e,t)=>e&&e.then?e.then(t):t(),Z=e=>e.classList.add("hydrated"),ee=(e,t,l)=>{if(t.L){e.watchers&&(t.W=e.watchers);const n=Object.entries(t.L),o=e.prototype;if(n.map((([e,[n]])=>{(31&n||2&l&&32&n)&&Object.defineProperty(o,e,{get(){return((e,t)=>ne(this).A.get(t))(0,e)},set(l){((e,t,l,n)=>{const o=ne(e),s=o.O,r=o.A.get(t),i=o.t,c=o.i;if(l=((e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,n.L[t][0]),(!(8&i)||void 0===r)&&l!==r&&(!Number.isNaN(r)||!Number.isNaN(l))&&(o.A.set(t,l),c)){if(n.W&&128&i){const e=n.W[t];e&&e.map((e=>{try{c[e](l,r,t)}catch(e){ie(e,s)}}))}2==(18&i)&&B(o,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;o.attributeChangedCallback=function(e,t,n){u.jmp((()=>{const t=l.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const o=n[1]||e;return l.set(o,e),512&n[0]&&t.N.push([e,o]),o}))}}return e},te=(e,t={})=>{const l=[],n=t.exclude||[],o=c.customElements,s=f.head,r=s.querySelector("meta[charset]"),i=f.createElement("style"),a=[];let h,b=!0;Object.assign(u,t),u.l=new URL(t.resourcesUrl||"./",f.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],$:t[1],L:t[2],H:t[3]};s.L=t[2],s.H=t[3],s.N=[],s.W={};const r=s.$,i=class extends HTMLElement{constructor(e){super(e),se(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),b?a.push(this):u.jmp((()=>(e=>{if(0==(1&u.t)){const t=ne(e),l=t.R,n=()=>{};if(1&t.t)d(e,t,l.H);else{t.t|=1,12&l.t&&(e=>{const t=e["s-cr"]=f.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let l=e;for(;l=l.parentNode||l.host;)if(l["s-p"]){z(t,t.C=l);break}}l.L&&Object.entries(l.L).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=fe(l)).then){const e=()=>{};o=await o,e()}o.isProxied||(l.W=o.watchers,ee(o,l,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){ie(e)}t.t&=-9,t.t|=128,e()}if(o.style){let e=o.style;const t=p(l);if(!ue.has(t)){const n=()=>{};((e,t,l)=>{let n=ue.get(e);$&&l?(n=n||new CSSStyleSheet,n.replace(t)):n=t,ue.set(e,n)})(t,e,!!(1&l.t)),n()}}}const s=t.C,r=()=>B(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,l)}n()}})(this)))}disconnectedCallback(){u.jmp((()=>(()=>{if(0==(1&u.t)){const e=ne(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return ne(this).U}};s.q=e[0],n.includes(r)||o.get(r)||(l.push(r),o.define(r,ee(i,s,1)))}))})),i.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),s.insertBefore(i,r?r.nextSibling:s.firstChild),b=!1,a.length?a.map((e=>e.connectedCallback())):u.jmp((()=>h=setTimeout(Q,30)))},le=new WeakMap,ne=e=>le.get(e),oe=(e,t)=>le.set(t.i=e,t),se=(e,t)=>{const l={t:0,O:e,R:t,A:new Map};return l.U=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],d(e,l,t.H),le.set(e,l)},re=(e,t)=>t in e,ie=(e,t)=>(0,console.error)(e,t),ce=new Map,fe=e=>{const t=e.$.replace(/-/g,"_"),l=e.q,n=ce.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(ce.set(l,e),e[t])),ie)},ue=new Map,ae=[],$e=[],de=(e,t)=>l=>{e.push(l),i||(i=!0,t&&4&u.t?me(be):u.raf(be))},he=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ie(e)}e.length=0},be=()=>{he(ae),he($e),(i=ae.length>0)&&u.raf(be)},me=e=>a().then(e),ye=de($e,!0);export{j as H,te as b,V as c,F as g,v as h,a as p,oe as r}