@everymatrix/casino-challenge-card 1.77.3 → 1.77.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.
- package/dist/casino-challenge-card/casino-challenge-card-1c0b899b.js +1 -0
- package/dist/casino-challenge-card/casino-challenge-card.entry.js +1 -1
- package/dist/casino-challenge-card/casino-challenge-card.esm.js +1 -1
- package/dist/casino-challenge-card/index-d72835d2.js +2 -0
- package/dist/casino-challenge-card/index.esm.js +1 -1
- package/dist/cjs/{casino-challenge-card-db07db21.js → casino-challenge-card-e1c638cc.js} +7 -2
- package/dist/cjs/casino-challenge-card.cjs.entry.js +2 -2
- package/dist/cjs/casino-challenge-card.cjs.js +1 -1
- package/dist/cjs/{index-062e337e.js → index-4b50b479.js} +18 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/casino-challenge-card/casino-challenge-card.js +23 -1
- package/dist/esm/{casino-challenge-card-3bea297c.js → casino-challenge-card-1c0b899b.js} +7 -2
- package/dist/esm/casino-challenge-card.entry.js +2 -2
- package/dist/esm/casino-challenge-card.js +2 -2
- package/dist/esm/{index-fae081c3.js → index-d72835d2.js} +18 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/casino-challenge-card/casino-challenge-card.d.ts +2 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/casino-challenge-card/casino-challenge-card-3bea297c.js +0 -1
- package/dist/casino-challenge-card/index-fae081c3.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as n}from"./index-d72835d2.js";const i=["ro","en","fr","ar","hr"],a={en:{totalLevels:"Total levels:",level1:"Level 1:",get:"Get:",endsIn:"Ends In",expired:"Expired",viewDetails:"View details",placeBetsOf:"Place bets of",place:"Place",bet:"bet",bets:"bets",minBet:"min bet"},ro:{totalLevels:"Niveluri totale:",level1:"Nivel 1:",get:"Obține:",endsIn:"Se termină în",expired:"Expirat",viewDetails:"Vezi detalii",placeBetsOf:"Plasează pariuri de",place:"Plasare",bet:"pariu",bets:"pariuri",minBet:"pariu minim"},fr:{totalLevels:"Niveaux totaux :",level1:"Niveau 1 :",get:"Obtenir :",endsIn:"Se termine dans",expired:"Expiré",viewDetails:"Voir les détails",placeBetsOf:"Placez des paris de",place:"Placer",bet:"pari",bets:"paris",minBet:"mise minimale"},ar:{totalLevels:"إجمالي المستويات:",level1:"المستوى 1:",get:"احصل على:",endsIn:"ينتهي في",expired:"منتهي الصلاحية",viewDetails:"عرض التفاصيل",placeBetsOf:"قم بوضع رهانات بقيمة",place:"ضع",bet:"رهان",bets:"رهانات",minBet:"الحد الأدنى للرهان"},hr:{totalLevels:"Ukupno razina:",level1:"Razina 1:",get:"Dobiti:",endsIn:"Završava za",expired:"Isteklo",viewDetails:"Pogledaj detalje",placeBetsOf:"Postavite oklade od",place:"Postavi",bet:"kladnja",bets:"kladnje",minBet:"minimalna oklada"}},o=(e,t)=>{const n=t;return a[void 0!==n&&i.includes(n)?n:"en"][e]};var r,s,l,d,c,h;function p(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function v(e,t){const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function u(e,t){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{n.innerHTML=t,e&&e.appendChild(n)}))}}!function(e){e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize"}(r||(r={})),function(e){e[e.Single=0]="Single",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly"}(s||(s={})),function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(l||(l={})),function(e){e[e.Setup=0]="Setup",e[e.Active=1]="Active",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted"}(d||(d={})),function(e){e[e.GameLaunch=0]="GameLaunch",e[e.Reward=1]="Reward",e[e.Manual=2]="Manual"}(c||(c={})),function(e){e[e.Period=0]="Period",e[e.Date=1]="Date"}(h||(h={}));const b=class{constructor(n){e(this,n),this.timerExpired=t(this,"timerExpired",7),this.calculateTargetValue=(e,t)=>{var n;if(!e)return"";const i=(null===(n=e.BetRange)||void 0===n?void 0:n.MinBet)?`, ${o("minBet",this.language)} ${t+e.BetRange.MinBet}`:"";switch(e.LevelTargetType){case r.Accumulative:return`${o("placeBetsOf",this.language)} ${t+e.DisplayCurrencyTargetTurnover+i}`;case r.SingleBet:return`${o("place",this.language)} ${t+e.TargetTurnover} ${o("bet",this.language)}`;case r.MultipleOneBetSize:return`${o("place",this.language)} ${e.TargetBetCount} ${o("bets",this.language)+i}`}},this.onMouseEnterHandler=(e,t)=>{t.scrollWidth>t.clientWidth&&(this.tooltipIndex=e)},this.onMouseLeaveHandler=()=>{this.tooltipIndex=null},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.challenge=void 0,this.tooltipIndex=null,this.timeLeft=void 0}get infoItems(){var e,t,n,i;const a=null===(e=this.challenge)||void 0===e?void 0:e.LevelProgresses.find((e=>0===e.OrderNumber));if(a){const e=null===(t=a.Rewards)||void 0===t?void 0:t.slice(0,2).map((e=>e.RewardDescription)).join(" + ");return[{lable:o("totalLevels",this.language),value:null===(n=this.challenge.LevelProgresses)||void 0===n?void 0:n.length},{lable:o("level1",this.language),value:this.calculateTargetValue(a,null===(i=this.challenge)||void 0===i?void 0:i.CurrencySymbol)},{lable:o("get",this.language),value:e}]}return[]}handleClientStylingChange(e,t){e!=t&&p(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&v(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&u(this.stylingContainer,`${this.mbSource}.Style`)}connectedCallback(){this.timerId=setInterval((()=>{this.updateTime()}),1e3)}componentWillLoad(){this.translationUrl&&(async e=>{if(e)try{const n=await fetch(e);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const i=await n.json();t=i,Object.keys(t).forEach((e=>{for(let n in t[e])a[e][n]=t[e][n]}))}catch(e){console.error("Failed to fetch or parse translations from URL:",e)}var t})(this.translationUrl),this.updateTime()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&u(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&p(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&v(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearInterval(this.timerId)}updateTime(){var e;this.timeLeft=function(e){const t=new Date;let n=new Date(e).getTime()-t.getTime();if(n<=0)return;const i=Math.floor(n/864e5);n-=864e5*i;const a=Math.floor(n/36e5);n-=36e5*a;const o=Math.floor(n/6e4);n-=6e4*o;const r=Math.floor(n/1e3),s=e=>e.toString().padStart(2,"0");return`${s(i)} : ${s(a)} : ${s(o)} : ${s(r)}`}(null===(e=this.challenge)||void 0===e?void 0:e.ExpirationTime),!this.timeLeft&&this.timerExpired&&(clearInterval(this.timerId),this.timerExpired.emit(this.challenge.Id))}renderInfoItem(e,t){return n("div",{class:"info-item",onMouseEnter:e=>this.onMouseEnterHandler(t,e.currentTarget),onMouseLeave:this.onMouseLeaveHandler},n("span",{class:"info-item__label"},e.lable),e.value,this.tooltipIndex===t&&n("div",{class:"info-item__tooltip"},e.value))}renderCardBadge(){return n("div",{class:"card__badge"},this.timeLeft?[o("endsIn",this.language)," - ",n("span",null,this.timeLeft)]:o("expired",this.language))}render(){var e,t,i,a;return n("div",{key:"5df3a2d368e6057d1b47cf5d4766126406c4afc8",ref:e=>this.stylingContainer=e},n("div",{key:"de708f82c0fbe5324419fafcb395f115c020d021",class:"card"},n("img",{key:"209c1f05bb70c3182b4ff6211e7c9398999b30fc",class:"card__image",src:null===(t=null===(e=this.challenge)||void 0===e?void 0:e.ChallengePresentation)||void 0===t?void 0:t.Url}),this.renderCardBadge(),n("div",{key:"aa3a5f3eee8bdb7c2606bc8a232c441ff4a22006",class:"card__content"},n("h1",{key:"524933e67d8eac476d678aee9f2643b6ac1449ff",class:"card__title"},null===(a=null===(i=this.challenge)||void 0===i?void 0:i.ChallengePresentation)||void 0===a?void 0:a.PresentationName),this.infoItems.map(((e,t)=>this.renderInfoItem(e,t))),n("button",{key:"52fec7d22602a2757c1a36238fb0b797f6bb4306",class:"card__button"},o("viewDetails",this.language)))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};b.style='.card {\n width: 308px;\n border-radius: 16px;\n border: 2px solid var(--emw--button-border-color, rgba(221, 255, 207, 0.1019607843));\n background-color: var(--emw--color-background, #141515);\n box-sizing: border-box;\n position: relative;\n}\n@container challenge-list (max-width: 576px) {\n .card {\n width: 100%;\n }\n}\n.card:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.card__image {\n width: 100%;\n height: 200px;\n border-radius: 16px 16px 0 0;\n}\n@container challenge-list (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__title {\n color: var(--emw--color-white, #FFFFFF);\n font-size: var(--emw--font-size-medium, 16px);\n margin: 0 0 10px;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n margin-top: 20px;\n width: 100%;\n height: 34px;\n background: transparent;\n text-transform: uppercase;\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-secondary, #e9931e);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__badge {\n position: absolute;\n background: white;\n top: 6px;\n right: 6px;\n border-radius: 30px;\n padding: 2px 12px;\n line-height: 22px;\n font-weight: var(--emw--font-weight-medium, 500);\n font-size: var(--emw--font-size-x-small, 12px);\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\n backdrop-filter: blur(20px);\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n\n.info-item {\n line-height: 24px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-primary, #1dbf51);\n}\n@container challenge-list (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item__label {\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n color: var(--emw--color-gray-150, #C8D6CE);\n}\n.info-item__tooltip {\n position: absolute;\n line-height: 22px;\n padding: 8px 12px;\n border-radius: 8px;\n opacity: 1;\n z-index: 200;\n white-space: nowrap;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n color: var(--emw--color-white, #FFFFFF);\n background-color: var(--emw--color-background-secondary, #1B1C2B);\n}\n.info-item__tooltip::before {\n content: "";\n position: absolute;\n top: -5px;\n left: 50%;\n transform: translateX(-50%);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid var(--emw--color-background-secondary, #1B1C2B);\n width: 0;\n height: 0;\n z-index: 201;\n}';export{b as C}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as casino_challenge_card}from"./casino-challenge-card-
|
|
1
|
+
export{C as casino_challenge_card}from"./casino-challenge-card-1c0b899b.js";import"./index-d72835d2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as
|
|
1
|
+
import{p as n,b as l}from"./index-d72835d2.js";export{s as setNonce}from"./index-d72835d2.js";import{g as e}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,e={};return""!==l&&(e.resourcesUrl=new URL(".",l).href),n(e)})().then((async n=>(await e(),l([["casino-challenge-card",[[1,"casino-challenge-card",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],challenge:[16],tooltipIndex:[32],timeLeft:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],n))));
|
|
@@ -0,0 +1,2 @@
|
|
|
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),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={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})(),m=!1,p=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(p),b(y),(m=p.length>0)&&f.raf(w)},v=e=>h().then(e),g=$(y,!0),S={},k=e=>"object"==(e=typeof e)||"function"===e;function j(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:()=>C,map:()=>E,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function E(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 C(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.m=o,u},T=(e,t)=>({l:0,p:e,i:t,$:null,h:null,u:null,m:null}),A={},N=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>U(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},U=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},W=new WeakMap,D=e=>"sc-"+e.v,F=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},H=/\s/,q=e=>e?e.split(H):[],G="Capture",V=RegExp(G+"$"),_=(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 z(Object.keys(o)))e in s||F(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))F(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.p),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=I(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},J=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=I(null,n,o),r&&(l[o].$=r,Z(i,r,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Y(t),e&&e.remove()}}},Q=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),X=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(_(e,t,B),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],m=l.length-1,p=l[0],y=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(Q(h,p,o))X(h,p,o),h=t[++i],p=l[++c];else if(Q(d,y,o))X(d,y,o),d=t[--f],y=l[--m];else if(Q(h,y,o))X(h,y,o),Z(e,h.$,d.$.nextSibling),h=t[++i],y=l[--m];else if(Q(d,p,o))X(d,p,o),Z(e,d.$,h.$),d=t[--f],p=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===p.m){u=a;break}u>=0?(r=t[u],r.p!==p.p?s=I(t&&t[c],n,u):(X(r,p,o),t[u]=void 0,s=r.$),p=l[++c]):(s=I(t&&t[c],n,c),p=l[++c]),s&&Z(h.$.parentNode,s,h.$)}i>f?J(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&K(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),J(l,null,t,s,0,s.length-1)):null!==o&&K(o,0,o.length-1)):e.i!==r&&(l.data=r)},Y=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Y)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},te=(e,t)=>{if(e.l|=16,!(4&e.l))return ee(e,e.k),g((()=>ne(e,t)));e.l|=512},ne=(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&&(l=ue(n,"componentWillLoad")),le(l,(()=>se(e,n,t)))},le=(e,t)=>oe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),oe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,se=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=D(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=W.get(e=e.head||e);if(r||W.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:j(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.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);re(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ie(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},re=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.j,s=e.C||T(null,null),r=(e=>e&&e.p===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.p=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],X(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.t,l=e.k;64&e.l||(e.l|=64,ae(t),ue(n,"componentDidLoad"),e.P(t),l||ce()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>te(e,!1))),e.l&=-517},ce=()=>{ae(a.documentElement),v((()=>U(u,"appload",{detail:{namespace:"casino-challenge-card"}})))},ue=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ae=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||k(e)?e:1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&te(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.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!=(r=t.R)?r:{}),...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.M)||o.push([e,s])),s}))]))}}return e},he=e=>{ue(e,"connectedCallback")},de=e=>{ue(e,"disconnectedCallback")},me=(e,l={})=>{var o;const h=[],m=l.exclude||[],p=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,T:new Map};l.N=new Promise((e=>l.P=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.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.j,o=()=>{};if(1&t.l)(null==t?void 0:t.t)?he(t.t):(null==t?void 0:t.N)&&t.N.then((()=>he(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.k=n);break}}l.L&&Object.entries(l.L).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.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.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.v}#${t.W}" was not found`);l.isProxied||(n.R=l.watchers,fe(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(),he(t.t)}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=D(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,c=()=>te(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?de(e.t):(null==e?void 0:e.N)&&e.N.then((()=>de(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],m.includes(u)||p.get(u)||(h.push(u),p.define(u,fe(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ce,30)))},pe=e=>f.O=e;export{me as b,N as c,R as h,h as p,l as r,pe as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CasinoChallengeCard}from"./casino-challenge-card-
|
|
1
|
+
export{C as CasinoChallengeCard}from"./casino-challenge-card-1c0b899b.js";import"./index-d72835d2.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-4b50b479.js');
|
|
4
4
|
|
|
5
5
|
const DEFAULT_LANGUAGE = 'en';
|
|
6
6
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
@@ -220,6 +220,7 @@ const CasinoChallengeCardStyle0 = casinoChallengeCardCss;
|
|
|
220
220
|
const CasinoChallengeCard = class {
|
|
221
221
|
constructor(hostRef) {
|
|
222
222
|
index.registerInstance(this, hostRef);
|
|
223
|
+
this.timerExpired = index.createEvent(this, "timerExpired", 7);
|
|
223
224
|
this.calculateTargetValue = (level, currencySymbol) => {
|
|
224
225
|
var _a;
|
|
225
226
|
if (!level)
|
|
@@ -320,6 +321,10 @@ const CasinoChallengeCard = class {
|
|
|
320
321
|
updateTime() {
|
|
321
322
|
var _a;
|
|
322
323
|
this.timeLeft = getTimeLeft((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ExpirationTime);
|
|
324
|
+
if (!this.timeLeft && this.timerExpired) {
|
|
325
|
+
clearInterval(this.timerId);
|
|
326
|
+
this.timerExpired.emit(this.challenge.Id);
|
|
327
|
+
}
|
|
323
328
|
}
|
|
324
329
|
renderInfoItem(item, index$1) {
|
|
325
330
|
return (index.h("div", { class: "info-item", onMouseEnter: (e) => this.onMouseEnterHandler(index$1, e.currentTarget), onMouseLeave: this.onMouseLeaveHandler }, index.h("span", { class: "info-item__label" }, item.lable), item.value, this.tooltipIndex === index$1 && index.h("div", { class: "info-item__tooltip" }, item.value)));
|
|
@@ -331,7 +336,7 @@ const CasinoChallengeCard = class {
|
|
|
331
336
|
}
|
|
332
337
|
render() {
|
|
333
338
|
var _a, _b, _c, _d;
|
|
334
|
-
return (index.h("div", { key: '
|
|
339
|
+
return (index.h("div", { key: '5df3a2d368e6057d1b47cf5d4766126406c4afc8', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: 'de708f82c0fbe5324419fafcb395f115c020d021', class: "card" }, index.h("img", { key: '209c1f05bb70c3182b4ff6211e7c9398999b30fc', class: "card__image", src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.Url }), this.renderCardBadge(), index.h("div", { key: 'aa3a5f3eee8bdb7c2606bc8a232c441ff4a22006', class: "card__content" }, index.h("h1", { key: '524933e67d8eac476d678aee9f2643b6ac1449ff', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.PresentationName), this.infoItems.map((x, index) => this.renderInfoItem(x, index)), index.h("button", { key: '52fec7d22602a2757c1a36238fb0b797f6bb4306', class: "card__button" }, translate('viewDetails', this.language))))));
|
|
335
340
|
}
|
|
336
341
|
static get watchers() { return {
|
|
337
342
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoChallengeCard = require('./casino-challenge-card-
|
|
6
|
-
require('./index-
|
|
5
|
+
const casinoChallengeCard = require('./casino-challenge-card-e1c638cc.js');
|
|
6
|
+
require('./index-4b50b479.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'casino-challenge-card';
|
|
24
|
-
const BUILD = /* casino-challenge-card */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event:
|
|
24
|
+
const BUILD = /* casino-challenge-card */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -302,6 +302,22 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
302
302
|
}
|
|
303
303
|
return propValue;
|
|
304
304
|
};
|
|
305
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
306
|
+
|
|
307
|
+
// src/runtime/event-emitter.ts
|
|
308
|
+
var createEvent = (ref, name, flags) => {
|
|
309
|
+
const elm = getElement(ref);
|
|
310
|
+
return {
|
|
311
|
+
emit: (detail) => {
|
|
312
|
+
return emitEvent(elm, name, {
|
|
313
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
314
|
+
composed: !!(flags & 2 /* Composed */),
|
|
315
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
316
|
+
detail
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
};
|
|
305
321
|
var emitEvent = (elm, name, opts) => {
|
|
306
322
|
const ev = plt.ce(name, opts);
|
|
307
323
|
elm.dispatchEvent(ev);
|
|
@@ -1197,6 +1213,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1197
1213
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1198
1214
|
|
|
1199
1215
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1216
|
+
exports.createEvent = createEvent;
|
|
1200
1217
|
exports.h = h;
|
|
1201
1218
|
exports.promiseResolve = promiseResolve;
|
|
1202
1219
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoChallengeCard = require('./casino-challenge-card-
|
|
6
|
-
require('./index-
|
|
5
|
+
const casinoChallengeCard = require('./casino-challenge-card-e1c638cc.js');
|
|
6
|
+
require('./index-4b50b479.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4b50b479.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
@@ -105,6 +105,10 @@ export class CasinoChallengeCard {
|
|
|
105
105
|
updateTime() {
|
|
106
106
|
var _a;
|
|
107
107
|
this.timeLeft = getTimeLeft((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ExpirationTime);
|
|
108
|
+
if (!this.timeLeft && this.timerExpired) {
|
|
109
|
+
clearInterval(this.timerId);
|
|
110
|
+
this.timerExpired.emit(this.challenge.Id);
|
|
111
|
+
}
|
|
108
112
|
}
|
|
109
113
|
renderInfoItem(item, index) {
|
|
110
114
|
return (h("div", { class: "info-item", onMouseEnter: (e) => this.onMouseEnterHandler(index, e.currentTarget), onMouseLeave: this.onMouseLeaveHandler }, h("span", { class: "info-item__label" }, item.lable), item.value, this.tooltipIndex === index && h("div", { class: "info-item__tooltip" }, item.value)));
|
|
@@ -116,7 +120,7 @@ export class CasinoChallengeCard {
|
|
|
116
120
|
}
|
|
117
121
|
render() {
|
|
118
122
|
var _a, _b, _c, _d;
|
|
119
|
-
return (h("div", { key: '
|
|
123
|
+
return (h("div", { key: '5df3a2d368e6057d1b47cf5d4766126406c4afc8', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'de708f82c0fbe5324419fafcb395f115c020d021', class: "card" }, h("img", { key: '209c1f05bb70c3182b4ff6211e7c9398999b30fc', class: "card__image", src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.Url }), this.renderCardBadge(), h("div", { key: 'aa3a5f3eee8bdb7c2606bc8a232c441ff4a22006', class: "card__content" }, h("h1", { key: '524933e67d8eac476d678aee9f2643b6ac1449ff', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.PresentationName), this.infoItems.map((x, index) => this.renderInfoItem(x, index)), h("button", { key: '52fec7d22602a2757c1a36238fb0b797f6bb4306', class: "card__button" }, translate('viewDetails', this.language))))));
|
|
120
124
|
}
|
|
121
125
|
static get is() { return "casino-challenge-card"; }
|
|
122
126
|
static get encapsulation() { return "shadow"; }
|
|
@@ -248,6 +252,24 @@ export class CasinoChallengeCard {
|
|
|
248
252
|
"timeLeft": {}
|
|
249
253
|
};
|
|
250
254
|
}
|
|
255
|
+
static get events() {
|
|
256
|
+
return [{
|
|
257
|
+
"method": "timerExpired",
|
|
258
|
+
"name": "timerExpired",
|
|
259
|
+
"bubbles": true,
|
|
260
|
+
"cancelable": true,
|
|
261
|
+
"composed": true,
|
|
262
|
+
"docs": {
|
|
263
|
+
"tags": [],
|
|
264
|
+
"text": ""
|
|
265
|
+
},
|
|
266
|
+
"complexType": {
|
|
267
|
+
"original": "any",
|
|
268
|
+
"resolved": "any",
|
|
269
|
+
"references": {}
|
|
270
|
+
}
|
|
271
|
+
}];
|
|
272
|
+
}
|
|
251
273
|
static get watchers() {
|
|
252
274
|
return [{
|
|
253
275
|
"propName": "clientStyling",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-d72835d2.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
@@ -218,6 +218,7 @@ const CasinoChallengeCardStyle0 = casinoChallengeCardCss;
|
|
|
218
218
|
const CasinoChallengeCard = class {
|
|
219
219
|
constructor(hostRef) {
|
|
220
220
|
registerInstance(this, hostRef);
|
|
221
|
+
this.timerExpired = createEvent(this, "timerExpired", 7);
|
|
221
222
|
this.calculateTargetValue = (level, currencySymbol) => {
|
|
222
223
|
var _a;
|
|
223
224
|
if (!level)
|
|
@@ -318,6 +319,10 @@ const CasinoChallengeCard = class {
|
|
|
318
319
|
updateTime() {
|
|
319
320
|
var _a;
|
|
320
321
|
this.timeLeft = getTimeLeft((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ExpirationTime);
|
|
322
|
+
if (!this.timeLeft && this.timerExpired) {
|
|
323
|
+
clearInterval(this.timerId);
|
|
324
|
+
this.timerExpired.emit(this.challenge.Id);
|
|
325
|
+
}
|
|
321
326
|
}
|
|
322
327
|
renderInfoItem(item, index) {
|
|
323
328
|
return (h("div", { class: "info-item", onMouseEnter: (e) => this.onMouseEnterHandler(index, e.currentTarget), onMouseLeave: this.onMouseLeaveHandler }, h("span", { class: "info-item__label" }, item.lable), item.value, this.tooltipIndex === index && h("div", { class: "info-item__tooltip" }, item.value)));
|
|
@@ -329,7 +334,7 @@ const CasinoChallengeCard = class {
|
|
|
329
334
|
}
|
|
330
335
|
render() {
|
|
331
336
|
var _a, _b, _c, _d;
|
|
332
|
-
return (h("div", { key: '
|
|
337
|
+
return (h("div", { key: '5df3a2d368e6057d1b47cf5d4766126406c4afc8', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'de708f82c0fbe5324419fafcb395f115c020d021', class: "card" }, h("img", { key: '209c1f05bb70c3182b4ff6211e7c9398999b30fc', class: "card__image", src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.Url }), this.renderCardBadge(), h("div", { key: 'aa3a5f3eee8bdb7c2606bc8a232c441ff4a22006', class: "card__content" }, h("h1", { key: '524933e67d8eac476d678aee9f2643b6ac1449ff', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.PresentationName), this.infoItems.map((x, index) => this.renderInfoItem(x, index)), h("button", { key: '52fec7d22602a2757c1a36238fb0b797f6bb4306', class: "card__button" }, translate('viewDetails', this.language))))));
|
|
333
338
|
}
|
|
334
339
|
static get watchers() { return {
|
|
335
340
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as casino_challenge_card } from './casino-challenge-card-
|
|
2
|
-
import './index-
|
|
1
|
+
export { C as casino_challenge_card } from './casino-challenge-card-1c0b899b.js';
|
|
2
|
+
import './index-d72835d2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-d72835d2.js';
|
|
2
|
+
export { s as setNonce } from './index-d72835d2.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'casino-challenge-card';
|
|
2
|
-
const BUILD = /* casino-challenge-card */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event:
|
|
2
|
+
const BUILD = /* casino-challenge-card */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -280,6 +280,22 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
280
280
|
}
|
|
281
281
|
return propValue;
|
|
282
282
|
};
|
|
283
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
284
|
+
|
|
285
|
+
// src/runtime/event-emitter.ts
|
|
286
|
+
var createEvent = (ref, name, flags) => {
|
|
287
|
+
const elm = getElement(ref);
|
|
288
|
+
return {
|
|
289
|
+
emit: (detail) => {
|
|
290
|
+
return emitEvent(elm, name, {
|
|
291
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
292
|
+
composed: !!(flags & 2 /* Composed */),
|
|
293
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
294
|
+
detail
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
};
|
|
283
299
|
var emitEvent = (elm, name, opts) => {
|
|
284
300
|
const ev = plt.ce(name, opts);
|
|
285
301
|
elm.dispatchEvent(ev);
|
|
@@ -1174,4 +1190,4 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1174
1190
|
// src/runtime/nonce.ts
|
|
1175
1191
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1176
1192
|
|
|
1177
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1193
|
+
export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CasinoChallengeCard } from './casino-challenge-card-
|
|
2
|
-
import './index-
|
|
1
|
+
export { C as CasinoChallengeCard } from './casino-challenge-card-1c0b899b.js';
|
|
2
|
+
import './index-d72835d2.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-d72835d2.js';
|
|
2
|
+
export { s as setNonce } from './index-d72835d2.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
1
2
|
import { IChallenge } from '../../utils/types';
|
|
2
3
|
export declare class CasinoChallengeCard {
|
|
3
4
|
/**
|
|
@@ -26,6 +27,7 @@ export declare class CasinoChallengeCard {
|
|
|
26
27
|
challenge: IChallenge;
|
|
27
28
|
tooltipIndex: number;
|
|
28
29
|
timeLeft: string;
|
|
30
|
+
timerExpired: EventEmitter;
|
|
29
31
|
private stylingContainer;
|
|
30
32
|
private stylingSubscription;
|
|
31
33
|
private timerId;
|
|
@@ -35,8 +35,23 @@ export namespace Components {
|
|
|
35
35
|
"translationUrl": string;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
export interface CasinoChallengeCardCustomEvent<T> extends CustomEvent<T> {
|
|
39
|
+
detail: T;
|
|
40
|
+
target: HTMLCasinoChallengeCardElement;
|
|
41
|
+
}
|
|
38
42
|
declare global {
|
|
43
|
+
interface HTMLCasinoChallengeCardElementEventMap {
|
|
44
|
+
"timerExpired": any;
|
|
45
|
+
}
|
|
39
46
|
interface HTMLCasinoChallengeCardElement extends Components.CasinoChallengeCard, HTMLStencilElement {
|
|
47
|
+
addEventListener<K extends keyof HTMLCasinoChallengeCardElementEventMap>(type: K, listener: (this: HTMLCasinoChallengeCardElement, ev: CasinoChallengeCardCustomEvent<HTMLCasinoChallengeCardElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
48
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
49
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
50
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
51
|
+
removeEventListener<K extends keyof HTMLCasinoChallengeCardElementEventMap>(type: K, listener: (this: HTMLCasinoChallengeCardElement, ev: CasinoChallengeCardCustomEvent<HTMLCasinoChallengeCardElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
52
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
53
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
54
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
40
55
|
}
|
|
41
56
|
var HTMLCasinoChallengeCardElement: {
|
|
42
57
|
prototype: HTMLCasinoChallengeCardElement;
|
|
@@ -68,6 +83,7 @@ declare namespace LocalJSX {
|
|
|
68
83
|
* Client custom styling via message bus
|
|
69
84
|
*/
|
|
70
85
|
"mbSource"?: string;
|
|
86
|
+
"onTimerExpired"?: (event: CasinoChallengeCardCustomEvent<any>) => void;
|
|
71
87
|
/**
|
|
72
88
|
* Client custom translation via json file url
|
|
73
89
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t}from"./index-fae081c3.js";const n=["ro","en","fr","ar","hr"],i={en:{totalLevels:"Total levels:",level1:"Level 1:",get:"Get:",endsIn:"Ends In",expired:"Expired",viewDetails:"View details",placeBetsOf:"Place bets of",place:"Place",bet:"bet",bets:"bets",minBet:"min bet"},ro:{totalLevels:"Niveluri totale:",level1:"Nivel 1:",get:"Obține:",endsIn:"Se termină în",expired:"Expirat",viewDetails:"Vezi detalii",placeBetsOf:"Plasează pariuri de",place:"Plasare",bet:"pariu",bets:"pariuri",minBet:"pariu minim"},fr:{totalLevels:"Niveaux totaux :",level1:"Niveau 1 :",get:"Obtenir :",endsIn:"Se termine dans",expired:"Expiré",viewDetails:"Voir les détails",placeBetsOf:"Placez des paris de",place:"Placer",bet:"pari",bets:"paris",minBet:"mise minimale"},ar:{totalLevels:"إجمالي المستويات:",level1:"المستوى 1:",get:"احصل على:",endsIn:"ينتهي في",expired:"منتهي الصلاحية",viewDetails:"عرض التفاصيل",placeBetsOf:"قم بوضع رهانات بقيمة",place:"ضع",bet:"رهان",bets:"رهانات",minBet:"الحد الأدنى للرهان"},hr:{totalLevels:"Ukupno razina:",level1:"Razina 1:",get:"Dobiti:",endsIn:"Završava za",expired:"Isteklo",viewDetails:"Pogledaj detalje",placeBetsOf:"Postavite oklade od",place:"Postavi",bet:"kladnja",bets:"kladnje",minBet:"minimalna oklada"}},a=(e,t)=>{const a=t;return i[void 0!==a&&n.includes(a)?a:"en"][e]};var o,r,l,s,d,c;function h(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function p(e,t){const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function v(e,t){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{n.innerHTML=t,e&&e.appendChild(n)}))}}!function(e){e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize"}(o||(o={})),function(e){e[e.Single=0]="Single",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly"}(r||(r={})),function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(l||(l={})),function(e){e[e.Setup=0]="Setup",e[e.Active=1]="Active",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted"}(s||(s={})),function(e){e[e.GameLaunch=0]="GameLaunch",e[e.Reward=1]="Reward",e[e.Manual=2]="Manual"}(d||(d={})),function(e){e[e.Period=0]="Period",e[e.Date=1]="Date"}(c||(c={}));const u=class{constructor(t){e(this,t),this.calculateTargetValue=(e,t)=>{var n;if(!e)return"";const i=(null===(n=e.BetRange)||void 0===n?void 0:n.MinBet)?`, ${a("minBet",this.language)} ${t+e.BetRange.MinBet}`:"";switch(e.LevelTargetType){case o.Accumulative:return`${a("placeBetsOf",this.language)} ${t+e.DisplayCurrencyTargetTurnover+i}`;case o.SingleBet:return`${a("place",this.language)} ${t+e.TargetTurnover} ${a("bet",this.language)}`;case o.MultipleOneBetSize:return`${a("place",this.language)} ${e.TargetBetCount} ${a("bets",this.language)+i}`}},this.onMouseEnterHandler=(e,t)=>{t.scrollWidth>t.clientWidth&&(this.tooltipIndex=e)},this.onMouseLeaveHandler=()=>{this.tooltipIndex=null},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.challenge=void 0,this.tooltipIndex=null,this.timeLeft=void 0}get infoItems(){var e,t,n,i;const o=null===(e=this.challenge)||void 0===e?void 0:e.LevelProgresses.find((e=>0===e.OrderNumber));if(o){const e=null===(t=o.Rewards)||void 0===t?void 0:t.slice(0,2).map((e=>e.RewardDescription)).join(" + ");return[{lable:a("totalLevels",this.language),value:null===(n=this.challenge.LevelProgresses)||void 0===n?void 0:n.length},{lable:a("level1",this.language),value:this.calculateTargetValue(o,null===(i=this.challenge)||void 0===i?void 0:i.CurrencySymbol)},{lable:a("get",this.language),value:e}]}return[]}handleClientStylingChange(e,t){e!=t&&h(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&p(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&v(this.stylingContainer,`${this.mbSource}.Style`)}connectedCallback(){this.timerId=setInterval((()=>{this.updateTime()}),1e3)}componentWillLoad(){this.translationUrl&&(async e=>{if(e)try{const n=await fetch(e);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const a=await n.json();t=a,Object.keys(t).forEach((e=>{for(let n in t[e])i[e][n]=t[e][n]}))}catch(e){console.error("Failed to fetch or parse translations from URL:",e)}var t})(this.translationUrl),this.updateTime()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&v(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&h(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&p(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearInterval(this.timerId)}updateTime(){var e;this.timeLeft=function(e){const t=new Date;let n=new Date(e).getTime()-t.getTime();if(n<=0)return;const i=Math.floor(n/864e5);n-=864e5*i;const a=Math.floor(n/36e5);n-=36e5*a;const o=Math.floor(n/6e4);n-=6e4*o;const r=Math.floor(n/1e3),l=e=>e.toString().padStart(2,"0");return`${l(i)} : ${l(a)} : ${l(o)} : ${l(r)}`}(null===(e=this.challenge)||void 0===e?void 0:e.ExpirationTime)}renderInfoItem(e,n){return t("div",{class:"info-item",onMouseEnter:e=>this.onMouseEnterHandler(n,e.currentTarget),onMouseLeave:this.onMouseLeaveHandler},t("span",{class:"info-item__label"},e.lable),e.value,this.tooltipIndex===n&&t("div",{class:"info-item__tooltip"},e.value))}renderCardBadge(){return t("div",{class:"card__badge"},this.timeLeft?[a("endsIn",this.language)," - ",t("span",null,this.timeLeft)]:a("expired",this.language))}render(){var e,n,i,o;return t("div",{key:"7850e9e8d1e03657399dcf310fa45dc8ce22e331",ref:e=>this.stylingContainer=e},t("div",{key:"19ffacd7740531cc92296f13763f4b918d682501",class:"card"},t("img",{key:"2f62d4103601c176182a2959943bf2508ba0fa94",class:"card__image",src:null===(n=null===(e=this.challenge)||void 0===e?void 0:e.ChallengePresentation)||void 0===n?void 0:n.Url}),this.renderCardBadge(),t("div",{key:"8b250b1329890bcc600cdcbf5064bca28988393f",class:"card__content"},t("h1",{key:"de11a9bda74d8e6a0c445fbb0dd54fc5442230a5",class:"card__title"},null===(o=null===(i=this.challenge)||void 0===i?void 0:i.ChallengePresentation)||void 0===o?void 0:o.PresentationName),this.infoItems.map(((e,t)=>this.renderInfoItem(e,t))),t("button",{key:"f9d554499a8810224817ce0dcf51c2326e74ad8c",class:"card__button"},a("viewDetails",this.language)))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};u.style='.card {\n width: 308px;\n border-radius: 16px;\n border: 2px solid var(--emw--button-border-color, rgba(221, 255, 207, 0.1019607843));\n background-color: var(--emw--color-background, #141515);\n box-sizing: border-box;\n position: relative;\n}\n@container challenge-list (max-width: 576px) {\n .card {\n width: 100%;\n }\n}\n.card:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.card__image {\n width: 100%;\n height: 200px;\n border-radius: 16px 16px 0 0;\n}\n@container challenge-list (max-width: 576px) {\n .card__image {\n height: 224px;\n }\n}\n.card__title {\n color: var(--emw--color-white, #FFFFFF);\n font-size: var(--emw--font-size-medium, 16px);\n margin: 0 0 10px;\n}\n.card__content {\n padding: 20px;\n}\n.card__button {\n margin-top: 20px;\n width: 100%;\n height: 34px;\n background: transparent;\n text-transform: uppercase;\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-secondary, #e9931e);\n}\n.card__button:hover {\n border-color: var(--emw--color-secondary, #e9931e);\n cursor: pointer;\n}\n.card__badge {\n position: absolute;\n background: white;\n top: 6px;\n right: 6px;\n border-radius: 30px;\n padding: 2px 12px;\n line-height: 22px;\n font-weight: var(--emw--font-weight-medium, 500);\n font-size: var(--emw--font-size-x-small, 12px);\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\n backdrop-filter: blur(20px);\n}\n.card__badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n\n.info-item {\n line-height: 24px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-primary, #1dbf51);\n}\n@container challenge-list (min-width: 576px) {\n .info-item {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n}\n.info-item__label {\n font-weight: var(--emw--font-weight-medium, 500);\n margin-right: 3px;\n color: var(--emw--color-gray-150, #C8D6CE);\n}\n.info-item__tooltip {\n position: absolute;\n line-height: 22px;\n padding: 8px 12px;\n border-radius: 8px;\n opacity: 1;\n z-index: 200;\n white-space: nowrap;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n color: var(--emw--color-white, #FFFFFF);\n background-color: var(--emw--color-background-secondary, #1B1C2B);\n}\n.info-item__tooltip::before {\n content: "";\n position: absolute;\n top: -5px;\n left: 50%;\n transform: translateX(-50%);\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid var(--emw--color-background-secondary, #1B1C2B);\n width: 0;\n height: 0;\n z-index: 201;\n}';export{u as C}
|
|
@@ -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),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={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=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?v(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{w(m),w(y),(p=m.length>0)&&f.raf(b)},v=e=>h().then(e),g=$(y,!0),S={},k=e=>"object"==(e=typeof e)||"function"===e;function j(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:()=>C,map:()=>E,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function E(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 C(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},N=new WeakMap,U=e=>"sc-"+e.v,W=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=F(n),s=F(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(H);t=t.replace(q,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},D=/\s/,F=e=>e?e.split(D):[],H="Capture",q=RegExp(H+"$"),G=(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 V(Object.keys(o)))e in s||W(l,e,o[e],void 0,n,t.l);for(const e of V(Object.keys(s)))W(l,e,o[e],s[e],n,t.l)};function V(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var _=!1,z=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),G(null,l,_),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=z(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},B=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=z(null,n,o),r&&(l[o].$=r,X(i,r,t)))},I=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Q(t),e&&e.remove()}}},J=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),K=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(G(e,t,_),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(J(h,m,o))K(h,m,o),h=t[++i],m=l[++c];else if(J(d,y,o))K(d,y,o),d=t[--f],y=l[--p];else if(J(h,y,o))K(h,y,o),X(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(J(d,m,o))K(d,m,o),X(e,d.$,h.$),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=z(t&&t[c],n,u):(K(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=z(t&&t[c],n,c),m=l[++c]),s&&X(h.$.parentNode,s,h.$)}i>f?B(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&I(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),B(l,null,t,s,0,s.length-1)):null!==o&&I(o,0,o.length-1)):e.i!==r&&(l.data=r)},Q=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Q)},X=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Z=(e,t)=>{if(e.l|=16,!(4&e.l))return Y(e,e.k),g((()=>ee(e,t)));e.l|=512},ee=(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&&(l=ie(n,"componentWillLoad")),te(l,(()=>le(e,n,t)))},te=(e,t)=>ne(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ne=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=U(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=N.get(e=e.head||e);if(r||N.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:j(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.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);oe(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},oe=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.j,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],K(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.t,l=e.k;64&e.l||(e.l|=64,ce(t),ie(n,"componentDidLoad"),e.P(t),l||re()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>Z(e,!1))),e.l&=-517},re=()=>{ce(a.documentElement),v((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"casino-challenge-card"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ce=e=>e.classList.add("hydrated"),ue=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||k(e)?e:1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&Z(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.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!=(r=t.R)?r:{}),...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.M)||o.push([e,s])),s}))]))}}return e},ae=e=>{ie(e,"connectedCallback")},fe=e=>{ie(e,"disconnectedCallback")},he=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,T:new Map};l.N=new Promise((e=>l.P=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.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.j,o=()=>{};if(1&t.l)(null==t?void 0:t.t)?ae(t.t):(null==t?void 0:t.N)&&t.N.then((()=>ae(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(t,t.k=n);break}}l.L&&Object.entries(l.L).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.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.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.v}#${t.W}" was not found`);l.isProxied||(n.R=l.watchers,ue(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(),ae(t.t)}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=U(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,c=()=>Z(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?fe(e.t):(null==e?void 0:e.N)&&e.N.then((()=>fe(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ue(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(re,30)))},de=e=>f.O=e;export{he as b,R as h,h as p,l as r,de as s}
|