@everymatrix/casino-engagement-suite-challenges-list 1.37.2 → 1.37.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.esm.js +1 -1
- package/dist/casino-engagement-suite-challenges-list/p-dc1fea86.entry.js +1 -0
- package/dist/casino-engagement-suite-challenges-list/p-fad4589e.js +1 -0
- package/dist/cjs/casino-engagement-suite-challenges-list.cjs.js +2 -2
- package/dist/cjs/{casino-engagement-suite-challenges-list.cjs.entry.js → casino-engagement-suite-challenges-list_2.cjs.entry.js} +74 -5
- package/dist/cjs/{index-3a49c469.js → index-0a011384.js} +33 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.js +5 -5
- package/dist/components/casino-engagement-suite-challenges-list.js +10 -5
- package/dist/components/casino-engagement-suite-progress-bar.js +6 -0
- package/dist/components/casino-engagement-suite-progress-bar2.js +94 -0
- package/dist/esm/casino-engagement-suite-challenges-list.js +2 -2
- package/dist/esm/{casino-engagement-suite-challenges-list.entry.js → casino-engagement-suite-challenges-list_2.entry.js} +74 -6
- package/dist/esm/{index-620b70a4.js → index-ddf7e990.js} +33 -1
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.d.ts +4 -4
- package/dist/types/components.d.ts +2 -2
- package/dist/types/models/challenge.d.ts +5 -1
- package/package.json +1 -1
- package/dist/casino-engagement-suite-challenges-list/p-99835b31.entry.js +0 -1
- package/dist/casino-engagement-suite-challenges-list/p-ad0147d6.js +0 -1
package/dist/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-
|
|
1
|
+
import{p as e,b as n}from"./p-fad4589e.js";(()=>{const n=import.meta.url,l={};return""!==n&&(l.resourcesUrl=new URL(".",n).href),e(l)})().then((e=>n([["p-dc1fea86",[[1,"casino-engagement-suite-challenges-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],challenges:[1040],isJoiningToChallenge:[1028,"is-joining-to-challenge"],inProgressChallenges:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32],newChallengeIds:[32],pausedChallengeIds:[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,g as o}from"./p-fad4589e.js";var n,i;!function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(n||(n={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(i||(i={}));const a=["en"],l={en:{challenges:"Challenges",join:"Join",unjoin:"Unjoin",new:"new",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward"}},r=(e,t)=>{const s=t;return l[void 0!==s&&a.includes(s)?s:"en"][e]};function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function g(e){p(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===h(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function d(e,t){return p(2,arguments),g(e).getTime()-g(t).getTime()}var c={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function u(e){return e?c[e]:c.trunc}const C=class{constructor(s){e(this,s),this.close=t(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newChallengeIds=[],this.pausedChallengeIds=[],this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.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.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1,this.newChallengeIds=[]},this.handleChallengeClick=e=>{const t=e.currentTarget.getAttribute("data-id");window.postMessage({type:"ChallengeClick",id:t}),this.newChallengeIds=this.newChallengeIds.filter((e=>e!==t))},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.changeChallengeStatus=e=>{var t,s;e.stopPropagation();const o=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(o))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:o}):(null===(s=this.inProgressChallenges)||void 0===s?void 0:s.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:o,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:o}})}}challengesPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}handleEvent(e){switch(e.data.type){case"ChallengeGrant":{const t=e.data.data.challengeProgressData[0],s=this.challenges.findIndex((e=>function(e,t,s){p(2,arguments);var o=d(e,t)/1e3;return u(null==s?void 0:s.roundingMethod)(o)}(new Date(e.ExpirationTime),new Date(t.ExpirationTime))>0));s>-1?this.challenges.splice(s,0,t):this.challenges.unshift(t),this.challenges=[...this.challenges],this.newChallengeIds.push(t.Id),window.postMessage({type:"UpdateChallenges"});break}case"ChallengeChangeStatusNotification":{const t=e.data.data.ChallengeId;e.data.data.IsEnabled?this.pausedChallengeIds=this.pausedChallengeIds.filter((e=>e!==t)):this.pausedChallengeIds.push(t);break}}}componentWillLoad(){var e;this.challengesPropHandler(this.challenges),(null===(e=this.challenges)||void 0===e?void 0:e.length)&&(this.newChallengeIds=this.challenges.filter((e=>e.IsNew)).map((e=>e.Id)))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.challenges.filter((e=>e.Status!==i.Expired)).reduce(((t,s)=>{const o=new Date(s.ExpirationTime).getTime()-e;let n="00h:00m:00s";if(o<1)this.removeChallenge(s.Id);else{const{days:e,hours:t,minutes:s,seconds:i}={days:String(Math.floor(o/864e5)).padStart(2,"0"),hours:String(Math.floor(o%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(o%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(o%6e4/1e3)).padStart(2,"0")};n="00"===e?`${t}h:${s}m:${i}s`:`${e}d:${t}h:${s}m`}return Object.assign(Object.assign({},t),{[s.Id]:n})}),{})}removeChallenge(e){const t=this.challenges.findIndex((t=>t.Id===e));t>-1&&(this.challenges.splice(t,1),window.postMessage({type:"ChallengeHasExpired",id:e}))}getChallengeClasses(e){return{ChallengeCard:!0,InProgress:e.Status===i.InProgress&&!this.pausedChallengeIds.includes(e.Id),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===i.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.Id)}isChallengeCompleted(e){return e.Status===i.Completed||e.Status===i.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===i.Completed)return 100;if(this.isChallengePaused(e)||e.Status===i.PendingLevelReward||e.Status===i.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===n.InProgress));return t?t.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:t}=e;return s("div",{class:"ChallengeCardHeader"},s("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),s("button",{class:`${e.Status===i.InProgress?"ChallengeJoinButton Joined":"ChallengeJoinButton"} ${this.isJoiningToChallenge?"Disabled":""}`,onClick:this.changeChallengeStatus,"data-id":t},r(e.Status===i.InProgress?"unjoin":"join",this.language)))}getChallengeTemplate(e){const t=this.getChallengeProgress(e),o=this.timers[e.Id],n=this.newChallengeIds.includes(e.Id),i=t>-1?s("casino-engagement-suite-progress-bar",{class:this.device,value:t,disabled:this.isChallengePaused(e)},s("span",{slot:"Title",class:"ChallengeCountdown"},o)):s("span",{class:"ChallengeCountdown"},o);return s("div",{class:this.getChallengeClasses(e),onClick:this.handleChallengeClick,key:e.Id,"data-id":e.Id},this.getChallengeHeaderTemplate(e),i,s("div",{class:"ChallengeLabel "+(n?"ShowChallengeLabel":"")},s("span",null,r("new",this.language))))}getHeaderTemplate(){return s("header",{class:"ChallengesListPopupHeader"},s("button",{onClick:this.showTooltip,class:"ChallengesIconButton"},s("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),s("div",{class:"ChallengesListPopupHeaderName"},r("challenges",this.language)),s("button",{class:"ChallengesIconButton",onClick:this.handleCloseClick},s("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close challenges list"})))}getListTemplate(){return this.challenges.length?s("div",{class:"ChallengesListWrapper"},s("div",{class:"ChallengesList"},this.challenges.map((e=>this.getChallengeTemplate(e))))):s("div",{class:"ChallengesListEmpty"},s("h2",null,r("noChallenges",this.language)),s("p",null,r("tryOtherGames",this.language)))}getTooltipTemplate(){return s("div",{class:"ChallengesTooltipBackdrop"},s("div",{class:"ChallengesTooltip"},s("button",{class:"ChallengesIconButton",onClick:this.hideTooltip},s("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),r("tooltip",this.language)))}render(){return s("div",{class:`ChallengesListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return o(this)}static get watchers(){return{challenges:["challengesPropHandler"]}}};C.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesIconButton{width:16px;height:16px;cursor:pointer}.ChallengesListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.ChallengeJoinButton.Joined::before,.ChallengeCard.InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:20px;line-height:24px;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:12px;line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:10px;line-height:10px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengesTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.ChallengesTooltipBackdrop .ChallengesTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.ChallengesTooltipBackdrop .ChallengesTooltip .ChallengesIconButton{top:12px;right:6px;position:absolute}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:16px;line-height:16px}.ChallengesListPopup.Tablet .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengesListPopup.Tablet .ChallengeJoinButton,.ChallengesListPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:14px;line-height:14px}.ChallengesListPopup.Tablet .ChallengesTooltip,.ChallengesListPopup.Desktop .ChallengesTooltip{padding:60px 65px;font-size:16px;line-height:20px}.ChallengesListPopup.Tablet .ChallengesTooltip .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesTooltip .ChallengesIconButton{top:24px;right:24px}';const b=class{constructor(t){e(this,t),this.value=0,this.disabled=!1,this.hidePercent=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.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.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent}}render(){return s("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},s("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},s("slot",{name:"Title"},s("div",null)),s("slot",{name:"Percent"},s("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),s("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},s("div",{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})))}get host(){return o(this)}};b.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";export{C as casino_engagement_suite_challenges_list,b as casino_engagement_suite_progress_bar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",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)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),r=(e,t,n)=>{n&&n.map((([n,l,s])=>{const i=u(e,n),c=a(t,s),r=f(n);o.ael(i,l,c,r),(t.o=t.o||[]).push((()=>o.rel(i,l,c,r)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){J(e)}},u=(e,t)=>8&t?l:e,f=e=>0!=(2&e),d=new WeakMap,h=e=>"sc-"+e.h,y={},$=e=>"object"==(e=typeof e)||"function"===e,m=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,c=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!$(l))&&(l+=""),o&&i?c[c.length-1].$+=l:c.push(o?p(null,l):l),i=o)};if(r(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=p(e,null);return a.m=t,c.length>0&&(a.p=c),a.g=s,a},p=(e,t)=>({t:0,S:e,$:t,k:null,p:null,m:null,g:null}),b={},w=(e,t,n,s,i,c)=>{if(n!==s){let r=I(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,l=S(n),o=S(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)s&&null!=s[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in s)n&&s[t]===n[t]||(t.includes("-")?e.style.setProperty(t,s[t]):e.style[t]=s[t])}else if("key"===t);else if(r||"o"!==t[0]||"n"!==t[1]){const l=$(s);if((r||l&&null!==s)&&!i)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?r=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||i)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):I(l,a)?a.slice(2):a[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},g=/\s/,S=e=>e?e.split(g):[],k=(e,t,n,l)=>{const s=11===t.k.nodeType&&t.k.host?t.k.host:t.k,o=e&&e.m||y,i=t.m||y;for(l in o)l in i||w(s,l,o[l],void 0,n,t.t);for(l in i)w(s,l,o[l],i[l],n,t.t)},j=(t,n,l)=>{let o,i,c=n.p[l],r=0;if(null!==c.$)o=c.k=s.createTextNode(c.$);else if(o=c.k=s.createElement(c.S),k(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.p)for(r=0;r<c.p.length;++r)i=j(t,c,r),i&&o.appendChild(i);return o},v=(e,n,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=j(null,l,o),c&&(s[o].k=c,r.insertBefore(c,n)))},M=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.k.remove()},C=(e,t)=>e.S===t.S&&e.g===t.g,O=(e,t)=>{const n=t.k=e.k,l=e.p,s=t.p,o=t.$;null===o?("slot"===t.S||k(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o,i=0,c=0,r=0,a=0,u=t.length-1,f=t[0],d=t[u],h=l.length-1,y=l[0],$=l[h];for(;i<=u&&c<=h;)if(null==f)f=t[++i];else if(null==d)d=t[--u];else if(null==y)y=l[++c];else if(null==$)$=l[--h];else if(C(f,y))O(f,y),f=t[++i],y=l[++c];else if(C(d,$))O(d,$),d=t[--u],$=l[--h];else if(C(f,$))O(f,$),e.insertBefore(f.k,d.k.nextSibling),f=t[++i],$=l[--h];else if(C(d,y))O(d,y),e.insertBefore(d.k,f.k),d=t[--u],y=l[++c];else{for(r=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].g&&t[a].g===y.g){r=a;break}r>=0?(o=t[r],o.S!==y.S?s=j(t&&t[c],n,r):(O(o,y),t[r]=void 0,s=o.k),y=l[++c]):(s=j(t&&t[c],n,c),y=l[++c]),s&&f.k.parentNode.insertBefore(s,f.k)}i>u?v(e,null==l[h+1]?null:l[h+1].k,n,l,c,h):c>h&&M(t,i,u)})(n,l,t,s):null!==s?(null!==e.$&&(n.textContent=""),v(n,null,t,s,0,s.length-1)):null!==l&&M(l,0,l.length-1)):e.$!==o&&(n.data=o)},P=e=>z(e).j,x=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},L=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},N=(e,t)=>{if(e.t|=16,!(4&e.t))return L(e,e.M),se((()=>R(e,t)));e.t|=512},R=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>U(n,e,t))),e.u=null),l=U(n,"componentWillLoad")),q(l,(()=>T(e,n,t)))},T=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.C,n=e.j,l=t.t,o=((e,t)=>{let n=h(t),l=X.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=d.get(e=e.head||e);o||d.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);W(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>A(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},W=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.C,i=n.O||p(null,null),c=(e=>e&&e.S===b)(l)?l:m(null,null,l);t=s.tagName,o.P&&(c.m=c.m||{},o.P.map((([e,t])=>c.m[t]=s[e]))),c.S=null,c.t|=4,n.O=c,c.k=i.k=s.shadowRoot||s,e=s["s-sc"],O(i,c)})(n,l)}catch(e){J(e,n.j)}return null},A=e=>{const t=e.j,n=e.M;U(e.i,"componentDidRender"),64&e.t||(e.t|=64,D(t),e.L(t),n||F()),e.v&&(e.v(),e.v=void 0),512&e.t&&le((()=>N(e,!1))),e.t&=-517},F=()=>{D(s.documentElement),le((()=>E(l,"appload",{detail:{namespace:"casino-engagement-suite-challenges-list"}})))},U=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){J(e)}},q=(e,t)=>e&&e.then?e.then(t):t(),D=e=>e.classList.add("hydrated"),H=(e,t,n)=>{if(t.N){e.watchers&&(t.R=e.watchers);const l=Object.entries(t.N),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>z(this).T.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=z(e),o=s.j,i=s.T.get(t),c=s.t,r=s.i;if(n=((e,t)=>null==e||$(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.T.set(t,n),r)){if(l.R&&128&c){const e=l.R[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){J(e,o)}}))}2==(18&c)&&N(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.P.push([e,s]),s}))}}return e},V=(e,t={})=>{const n=[],i=t.exclude||[],a=l.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),y=[];let $,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],h:t[1],N:t[2],W:t[3]};l.N=t[2],l.W=t[3],l.P=[],l.R={};const s=l.h,u=class extends HTMLElement{constructor(e){super(e),G(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){$&&(clearTimeout($),$=null),m?y.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=z(e),n=t.C,l=()=>{};if(1&t.t)r(e,t,n.W);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){L(t,t.M=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.R=s.watchers,H(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){J(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=h(n);if(!X.has(t)){const l=()=>{};((e,t,n)=>{let l=X.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,X.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>N(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{if(0==(1&o.t)){const e=z(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),U(t,"disconnectedCallback")}})()))}componentOnReady(){return z(this).A}};l.F=e[0],i.includes(s)||a.get(s)||(n.push(s),a.define(s,H(u,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),m=!1,y.length?y.map((e=>e.connectedCallback())):o.jmp((()=>$=setTimeout(F,30)))},_=new WeakMap,z=e=>_.get(e),B=(e,t)=>_.set(t.i=e,t),G=(e,t)=>{const n={t:0,j:e,C:t,T:new Map};return n.A=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],r(e,n,t.W),_.set(e,n)},I=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),K=new Map,Q=e=>{const t=e.h.replace(/-/g,"_"),n=e.F,l=K.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(K.set(n,e),e[t])),J)},X=new Map,Y=[],Z=[],ee=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?le(ne):o.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){J(e)}e.length=0},ne=()=>{te(Y),te(Z),(n=Y.length>0)&&o.raf(ne)},le=e=>i().then(e),se=ee(Z,!0);export{V as b,x as c,P as g,m as h,i as p,B as r}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-0a011384.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["casino-engagement-suite-challenges-
|
|
18
|
+
return index.bootstrapLazy([["casino-engagement-suite-challenges-list_2.cjs",[[1,"casino-engagement-suite-challenges-list",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"challenges":[1040],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"inProgressChallenges":[1040],"tooltip":[32],"timers":[32],"limitStylingAppends":[32],"newChallengeIds":[32],"pausedChallengeIds":[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
require('@everymatrix/casino-engagement-suite-progress-bar');
|
|
5
|
+
const index = require('./index-0a011384.js');
|
|
7
6
|
|
|
8
7
|
var ChallengeLevelProgressStatus;
|
|
9
8
|
(function (ChallengeLevelProgressStatus) {
|
|
@@ -232,7 +231,7 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
232
231
|
this.newChallengeIds = [];
|
|
233
232
|
};
|
|
234
233
|
this.handleChallengeClick = (ev) => {
|
|
235
|
-
const id =
|
|
234
|
+
const id = ev.currentTarget.getAttribute('data-id');
|
|
236
235
|
window.postMessage({ type: 'ChallengeClick', id });
|
|
237
236
|
this.newChallengeIds = this.newChallengeIds.filter(item => item !== id);
|
|
238
237
|
};
|
|
@@ -245,7 +244,7 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
245
244
|
this.changeChallengeStatus = (e) => {
|
|
246
245
|
var _a, _b;
|
|
247
246
|
e.stopPropagation();
|
|
248
|
-
const id =
|
|
247
|
+
const id = e.currentTarget.getAttribute('data-id');
|
|
249
248
|
if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
|
|
250
249
|
window.postMessage({
|
|
251
250
|
type: 'ShowConfirmationModal',
|
|
@@ -282,7 +281,7 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
282
281
|
const type = e.data.type;
|
|
283
282
|
switch (type) {
|
|
284
283
|
case 'ChallengeGrant': {
|
|
285
|
-
const newChallenge = e.data.data;
|
|
284
|
+
const newChallenge = e.data.data.challengeProgressData[0];
|
|
286
285
|
const index = this.challenges.findIndex(challenge => differenceInSeconds(new Date(challenge.ExpirationTime), new Date(newChallenge.ExpirationTime)) > 0);
|
|
287
286
|
if (index > -1) {
|
|
288
287
|
this.challenges.splice(index, 0, newChallenge);
|
|
@@ -441,4 +440,74 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
441
440
|
};
|
|
442
441
|
CasinoEngagementSuiteChallengesList.style = casinoEngagementSuiteChallengesListCss;
|
|
443
442
|
|
|
443
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
444
|
+
|
|
445
|
+
const CasinoEngagementSuiteProgressBar = class {
|
|
446
|
+
constructor(hostRef) {
|
|
447
|
+
index.registerInstance(this, hostRef);
|
|
448
|
+
/**
|
|
449
|
+
* Value for the widget
|
|
450
|
+
*/
|
|
451
|
+
this.value = 0;
|
|
452
|
+
/**
|
|
453
|
+
* Shows disabled styles
|
|
454
|
+
*/
|
|
455
|
+
this.disabled = false;
|
|
456
|
+
/**
|
|
457
|
+
* Hide percent value
|
|
458
|
+
*/
|
|
459
|
+
this.hidePercent = false;
|
|
460
|
+
/**
|
|
461
|
+
* Client custom styling via string
|
|
462
|
+
*/
|
|
463
|
+
this.clientStyling = '';
|
|
464
|
+
/**
|
|
465
|
+
* Client custom styling via url
|
|
466
|
+
*/
|
|
467
|
+
this.clientStylingUrl = '';
|
|
468
|
+
this.limitStylingAppends = false;
|
|
469
|
+
this.setClientStyling = () => {
|
|
470
|
+
let sheet = document.createElement('style');
|
|
471
|
+
sheet.innerHTML = this.clientStyling;
|
|
472
|
+
this.host.prepend(sheet);
|
|
473
|
+
};
|
|
474
|
+
this.setClientStylingURL = () => {
|
|
475
|
+
let url = new URL(this.clientStylingUrl);
|
|
476
|
+
let cssFile = document.createElement('style');
|
|
477
|
+
fetch(url.href)
|
|
478
|
+
.then((res) => res.text())
|
|
479
|
+
.then((data) => {
|
|
480
|
+
cssFile.innerHTML = data;
|
|
481
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
482
|
+
})
|
|
483
|
+
.catch((err) => {
|
|
484
|
+
console.log('Error ', err);
|
|
485
|
+
});
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
componentDidRender() {
|
|
489
|
+
if (!this.limitStylingAppends && this.host) {
|
|
490
|
+
if (this.clientStyling)
|
|
491
|
+
this.setClientStyling();
|
|
492
|
+
if (this.clientStylingUrl)
|
|
493
|
+
this.setClientStylingURL();
|
|
494
|
+
this.limitStylingAppends = true;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
getProgressBarClasses() {
|
|
498
|
+
return {
|
|
499
|
+
ProgressBar: true,
|
|
500
|
+
Completed: this.value === 100,
|
|
501
|
+
Disabled: this.disabled,
|
|
502
|
+
HidePercent: this.hidePercent
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
render() {
|
|
506
|
+
return index.h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { name: "Title" }, index.h("div", null)), index.h("slot", { name: "Percent" }, index.h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
|
|
507
|
+
}
|
|
508
|
+
get host() { return index.getElement(this); }
|
|
509
|
+
};
|
|
510
|
+
CasinoEngagementSuiteProgressBar.style = casinoEngagementSuiteProgressBarCss;
|
|
511
|
+
|
|
444
512
|
exports.casino_engagement_suite_challenges_list = CasinoEngagementSuiteChallengesList;
|
|
513
|
+
exports.casino_engagement_suite_progress_bar = CasinoEngagementSuiteProgressBar;
|
|
@@ -279,6 +279,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
279
279
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
280
280
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
281
281
|
}
|
|
282
|
+
else if (memberName === 'style') {
|
|
283
|
+
// update style attribute, css properties and values
|
|
284
|
+
{
|
|
285
|
+
for (const prop in oldValue) {
|
|
286
|
+
if (!newValue || newValue[prop] == null) {
|
|
287
|
+
if (prop.includes('-')) {
|
|
288
|
+
elm.style.removeProperty(prop);
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
elm.style[prop] = '';
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
for (const prop in newValue) {
|
|
297
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
298
|
+
if (prop.includes('-')) {
|
|
299
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
elm.style[prop] = newValue[prop];
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
282
307
|
else if (memberName === 'key')
|
|
283
308
|
;
|
|
284
309
|
else if ((!isProp ) &&
|
|
@@ -547,11 +572,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
547
572
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
548
573
|
const oldChildren = oldVNode.$children$;
|
|
549
574
|
const newChildren = newVNode.$children$;
|
|
575
|
+
const tag = newVNode.$tag$;
|
|
550
576
|
const text = newVNode.$text$;
|
|
551
577
|
if (text === null) {
|
|
552
578
|
// element node
|
|
553
579
|
{
|
|
554
|
-
|
|
580
|
+
if (tag === 'slot')
|
|
581
|
+
;
|
|
582
|
+
else {
|
|
555
583
|
// either this is the first render of an element OR it's an update
|
|
556
584
|
// AND we already know it's possible it could have changed
|
|
557
585
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
@@ -824,6 +852,10 @@ const parsePropertyValue = (propValue, propType) => {
|
|
|
824
852
|
// but we'll cheat here and say that the string "false" is the boolean false
|
|
825
853
|
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
826
854
|
}
|
|
855
|
+
if (propType & 2 /* Number */) {
|
|
856
|
+
// force it to be a number
|
|
857
|
+
return parseFloat(propValue);
|
|
858
|
+
}
|
|
827
859
|
if (propType & 1 /* String */) {
|
|
828
860
|
// could have been passed as a number or boolean
|
|
829
861
|
// but we still want it as a string
|
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-0a011384.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["casino-engagement-suite-challenges-
|
|
17
|
+
return index.bootstrapLazy([["casino-engagement-suite-challenges-list_2.cjs",[[1,"casino-engagement-suite-challenges-list",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"challenges":[1040],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"inProgressChallenges":[1040],"tooltip":[32],"timers":[32],"limitStylingAppends":[32],"newChallengeIds":[32],"pausedChallengeIds":[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
"version": "2.15.2",
|
|
8
8
|
"typescriptVersion": "4.5.4"
|
|
9
9
|
},
|
|
10
|
-
"collections": [
|
|
10
|
+
"collections": [
|
|
11
|
+
{
|
|
12
|
+
"name": "@everymatrix/casino-engagement-suite-progress-bar",
|
|
13
|
+
"tags": [
|
|
14
|
+
"casino-engagement-suite-progress-bar"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
11
18
|
"bundles": []
|
|
12
19
|
}
|
|
@@ -54,7 +54,7 @@ export class CasinoEngagementSuiteChallengesList {
|
|
|
54
54
|
this.newChallengeIds = [];
|
|
55
55
|
};
|
|
56
56
|
this.handleChallengeClick = (ev) => {
|
|
57
|
-
const id =
|
|
57
|
+
const id = ev.currentTarget.getAttribute('data-id');
|
|
58
58
|
window.postMessage({ type: 'ChallengeClick', id });
|
|
59
59
|
this.newChallengeIds = this.newChallengeIds.filter(item => item !== id);
|
|
60
60
|
};
|
|
@@ -67,7 +67,7 @@ export class CasinoEngagementSuiteChallengesList {
|
|
|
67
67
|
this.changeChallengeStatus = (e) => {
|
|
68
68
|
var _a, _b;
|
|
69
69
|
e.stopPropagation();
|
|
70
|
-
const id =
|
|
70
|
+
const id = e.currentTarget.getAttribute('data-id');
|
|
71
71
|
if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
|
|
72
72
|
window.postMessage({
|
|
73
73
|
type: 'ShowConfirmationModal',
|
|
@@ -104,7 +104,7 @@ export class CasinoEngagementSuiteChallengesList {
|
|
|
104
104
|
const type = e.data.type;
|
|
105
105
|
switch (type) {
|
|
106
106
|
case 'ChallengeGrant': {
|
|
107
|
-
const newChallenge = e.data.data;
|
|
107
|
+
const newChallenge = e.data.data.challengeProgressData[0];
|
|
108
108
|
const index = this.challenges.findIndex(challenge => differenceInSeconds(new Date(challenge.ExpirationTime), new Date(newChallenge.ExpirationTime)) > 0);
|
|
109
109
|
if (index > -1) {
|
|
110
110
|
this.challenges.splice(index, 0, newChallenge);
|
|
@@ -404,8 +404,8 @@ export class CasinoEngagementSuiteChallengesList {
|
|
|
404
404
|
"type": "unknown",
|
|
405
405
|
"mutable": true,
|
|
406
406
|
"complexType": {
|
|
407
|
-
"original": "Array<
|
|
408
|
-
"resolved": "
|
|
407
|
+
"original": "Array<string>",
|
|
408
|
+
"resolved": "string[]",
|
|
409
409
|
"references": {
|
|
410
410
|
"Array": {
|
|
411
411
|
"location": "global"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import '
|
|
2
|
+
import { d as defineCustomElement$2 } from './casino-engagement-suite-progress-bar2.js';
|
|
3
3
|
|
|
4
4
|
var ChallengeLevelProgressStatus;
|
|
5
5
|
(function (ChallengeLevelProgressStatus) {
|
|
@@ -230,7 +230,7 @@ const CasinoEngagementSuiteChallengesList$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
230
230
|
this.newChallengeIds = [];
|
|
231
231
|
};
|
|
232
232
|
this.handleChallengeClick = (ev) => {
|
|
233
|
-
const id =
|
|
233
|
+
const id = ev.currentTarget.getAttribute('data-id');
|
|
234
234
|
window.postMessage({ type: 'ChallengeClick', id });
|
|
235
235
|
this.newChallengeIds = this.newChallengeIds.filter(item => item !== id);
|
|
236
236
|
};
|
|
@@ -243,7 +243,7 @@ const CasinoEngagementSuiteChallengesList$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
243
243
|
this.changeChallengeStatus = (e) => {
|
|
244
244
|
var _a, _b;
|
|
245
245
|
e.stopPropagation();
|
|
246
|
-
const id =
|
|
246
|
+
const id = e.currentTarget.getAttribute('data-id');
|
|
247
247
|
if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
|
|
248
248
|
window.postMessage({
|
|
249
249
|
type: 'ShowConfirmationModal',
|
|
@@ -280,7 +280,7 @@ const CasinoEngagementSuiteChallengesList$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
280
280
|
const type = e.data.type;
|
|
281
281
|
switch (type) {
|
|
282
282
|
case 'ChallengeGrant': {
|
|
283
|
-
const newChallenge = e.data.data;
|
|
283
|
+
const newChallenge = e.data.data.challengeProgressData[0];
|
|
284
284
|
const index = this.challenges.findIndex(challenge => differenceInSeconds(new Date(challenge.ExpirationTime), new Date(newChallenge.ExpirationTime)) > 0);
|
|
285
285
|
if (index > -1) {
|
|
286
286
|
this.challenges.splice(index, 0, newChallenge);
|
|
@@ -455,13 +455,18 @@ function defineCustomElement$1() {
|
|
|
455
455
|
if (typeof customElements === "undefined") {
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
|
-
const components = ["casino-engagement-suite-challenges-list"];
|
|
458
|
+
const components = ["casino-engagement-suite-challenges-list", "casino-engagement-suite-progress-bar"];
|
|
459
459
|
components.forEach(tagName => { switch (tagName) {
|
|
460
460
|
case "casino-engagement-suite-challenges-list":
|
|
461
461
|
if (!customElements.get(tagName)) {
|
|
462
462
|
customElements.define(tagName, CasinoEngagementSuiteChallengesList$1);
|
|
463
463
|
}
|
|
464
464
|
break;
|
|
465
|
+
case "casino-engagement-suite-progress-bar":
|
|
466
|
+
if (!customElements.get(tagName)) {
|
|
467
|
+
defineCustomElement$2();
|
|
468
|
+
}
|
|
469
|
+
break;
|
|
465
470
|
} });
|
|
466
471
|
}
|
|
467
472
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { C as CasinoEngagementSuiteProgressBar$1, d as defineCustomElement$1 } from './casino-engagement-suite-progress-bar2.js';
|
|
2
|
+
|
|
3
|
+
const CasinoEngagementSuiteProgressBar = CasinoEngagementSuiteProgressBar$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { CasinoEngagementSuiteProgressBar, defineCustomElement };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
4
|
+
|
|
5
|
+
const CasinoEngagementSuiteProgressBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* Value for the widget
|
|
12
|
+
*/
|
|
13
|
+
this.value = 0;
|
|
14
|
+
/**
|
|
15
|
+
* Shows disabled styles
|
|
16
|
+
*/
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
/**
|
|
19
|
+
* Hide percent value
|
|
20
|
+
*/
|
|
21
|
+
this.hidePercent = false;
|
|
22
|
+
/**
|
|
23
|
+
* Client custom styling via string
|
|
24
|
+
*/
|
|
25
|
+
this.clientStyling = '';
|
|
26
|
+
/**
|
|
27
|
+
* Client custom styling via url
|
|
28
|
+
*/
|
|
29
|
+
this.clientStylingUrl = '';
|
|
30
|
+
this.limitStylingAppends = false;
|
|
31
|
+
this.setClientStyling = () => {
|
|
32
|
+
let sheet = document.createElement('style');
|
|
33
|
+
sheet.innerHTML = this.clientStyling;
|
|
34
|
+
this.host.prepend(sheet);
|
|
35
|
+
};
|
|
36
|
+
this.setClientStylingURL = () => {
|
|
37
|
+
let url = new URL(this.clientStylingUrl);
|
|
38
|
+
let cssFile = document.createElement('style');
|
|
39
|
+
fetch(url.href)
|
|
40
|
+
.then((res) => res.text())
|
|
41
|
+
.then((data) => {
|
|
42
|
+
cssFile.innerHTML = data;
|
|
43
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
44
|
+
})
|
|
45
|
+
.catch((err) => {
|
|
46
|
+
console.log('Error ', err);
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
componentDidRender() {
|
|
51
|
+
if (!this.limitStylingAppends && this.host) {
|
|
52
|
+
if (this.clientStyling)
|
|
53
|
+
this.setClientStyling();
|
|
54
|
+
if (this.clientStylingUrl)
|
|
55
|
+
this.setClientStylingURL();
|
|
56
|
+
this.limitStylingAppends = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
getProgressBarClasses() {
|
|
60
|
+
return {
|
|
61
|
+
ProgressBar: true,
|
|
62
|
+
Completed: this.value === 100,
|
|
63
|
+
Disabled: this.disabled,
|
|
64
|
+
HidePercent: this.hidePercent
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
|
|
69
|
+
}
|
|
70
|
+
get host() { return this; }
|
|
71
|
+
static get style() { return casinoEngagementSuiteProgressBarCss; }
|
|
72
|
+
}, [1, "casino-engagement-suite-progress-bar", {
|
|
73
|
+
"value": [2],
|
|
74
|
+
"disabled": [4],
|
|
75
|
+
"hidePercent": [4, "hide-percent"],
|
|
76
|
+
"clientStyling": [513, "client-styling"],
|
|
77
|
+
"clientStylingUrl": [513, "client-styling-url"],
|
|
78
|
+
"limitStylingAppends": [32]
|
|
79
|
+
}]);
|
|
80
|
+
function defineCustomElement() {
|
|
81
|
+
if (typeof customElements === "undefined") {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const components = ["casino-engagement-suite-progress-bar"];
|
|
85
|
+
components.forEach(tagName => { switch (tagName) {
|
|
86
|
+
case "casino-engagement-suite-progress-bar":
|
|
87
|
+
if (!customElements.get(tagName)) {
|
|
88
|
+
customElements.define(tagName, CasinoEngagementSuiteProgressBar);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
} });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { CasinoEngagementSuiteProgressBar as C, defineCustomElement as d };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-ddf7e990.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["casino-engagement-suite-challenges-
|
|
16
|
+
return bootstrapLazy([["casino-engagement-suite-challenges-list_2",[[1,"casino-engagement-suite-challenges-list",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"challenges":[1040],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"inProgressChallenges":[1040],"tooltip":[32],"timers":[32],"limitStylingAppends":[32],"newChallengeIds":[32],"pausedChallengeIds":[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import '@everymatrix/casino-engagement-suite-progress-bar';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-ddf7e990.js';
|
|
3
2
|
|
|
4
3
|
var ChallengeLevelProgressStatus;
|
|
5
4
|
(function (ChallengeLevelProgressStatus) {
|
|
@@ -228,7 +227,7 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
228
227
|
this.newChallengeIds = [];
|
|
229
228
|
};
|
|
230
229
|
this.handleChallengeClick = (ev) => {
|
|
231
|
-
const id =
|
|
230
|
+
const id = ev.currentTarget.getAttribute('data-id');
|
|
232
231
|
window.postMessage({ type: 'ChallengeClick', id });
|
|
233
232
|
this.newChallengeIds = this.newChallengeIds.filter(item => item !== id);
|
|
234
233
|
};
|
|
@@ -241,7 +240,7 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
241
240
|
this.changeChallengeStatus = (e) => {
|
|
242
241
|
var _a, _b;
|
|
243
242
|
e.stopPropagation();
|
|
244
|
-
const id =
|
|
243
|
+
const id = e.currentTarget.getAttribute('data-id');
|
|
245
244
|
if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
|
|
246
245
|
window.postMessage({
|
|
247
246
|
type: 'ShowConfirmationModal',
|
|
@@ -278,7 +277,7 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
278
277
|
const type = e.data.type;
|
|
279
278
|
switch (type) {
|
|
280
279
|
case 'ChallengeGrant': {
|
|
281
|
-
const newChallenge = e.data.data;
|
|
280
|
+
const newChallenge = e.data.data.challengeProgressData[0];
|
|
282
281
|
const index = this.challenges.findIndex(challenge => differenceInSeconds(new Date(challenge.ExpirationTime), new Date(newChallenge.ExpirationTime)) > 0);
|
|
283
282
|
if (index > -1) {
|
|
284
283
|
this.challenges.splice(index, 0, newChallenge);
|
|
@@ -437,4 +436,73 @@ const CasinoEngagementSuiteChallengesList = class {
|
|
|
437
436
|
};
|
|
438
437
|
CasinoEngagementSuiteChallengesList.style = casinoEngagementSuiteChallengesListCss;
|
|
439
438
|
|
|
440
|
-
|
|
439
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
440
|
+
|
|
441
|
+
const CasinoEngagementSuiteProgressBar = class {
|
|
442
|
+
constructor(hostRef) {
|
|
443
|
+
registerInstance(this, hostRef);
|
|
444
|
+
/**
|
|
445
|
+
* Value for the widget
|
|
446
|
+
*/
|
|
447
|
+
this.value = 0;
|
|
448
|
+
/**
|
|
449
|
+
* Shows disabled styles
|
|
450
|
+
*/
|
|
451
|
+
this.disabled = false;
|
|
452
|
+
/**
|
|
453
|
+
* Hide percent value
|
|
454
|
+
*/
|
|
455
|
+
this.hidePercent = false;
|
|
456
|
+
/**
|
|
457
|
+
* Client custom styling via string
|
|
458
|
+
*/
|
|
459
|
+
this.clientStyling = '';
|
|
460
|
+
/**
|
|
461
|
+
* Client custom styling via url
|
|
462
|
+
*/
|
|
463
|
+
this.clientStylingUrl = '';
|
|
464
|
+
this.limitStylingAppends = false;
|
|
465
|
+
this.setClientStyling = () => {
|
|
466
|
+
let sheet = document.createElement('style');
|
|
467
|
+
sheet.innerHTML = this.clientStyling;
|
|
468
|
+
this.host.prepend(sheet);
|
|
469
|
+
};
|
|
470
|
+
this.setClientStylingURL = () => {
|
|
471
|
+
let url = new URL(this.clientStylingUrl);
|
|
472
|
+
let cssFile = document.createElement('style');
|
|
473
|
+
fetch(url.href)
|
|
474
|
+
.then((res) => res.text())
|
|
475
|
+
.then((data) => {
|
|
476
|
+
cssFile.innerHTML = data;
|
|
477
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
478
|
+
})
|
|
479
|
+
.catch((err) => {
|
|
480
|
+
console.log('Error ', err);
|
|
481
|
+
});
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
componentDidRender() {
|
|
485
|
+
if (!this.limitStylingAppends && this.host) {
|
|
486
|
+
if (this.clientStyling)
|
|
487
|
+
this.setClientStyling();
|
|
488
|
+
if (this.clientStylingUrl)
|
|
489
|
+
this.setClientStylingURL();
|
|
490
|
+
this.limitStylingAppends = true;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
getProgressBarClasses() {
|
|
494
|
+
return {
|
|
495
|
+
ProgressBar: true,
|
|
496
|
+
Completed: this.value === 100,
|
|
497
|
+
Disabled: this.disabled,
|
|
498
|
+
HidePercent: this.hidePercent
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
render() {
|
|
502
|
+
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
|
|
503
|
+
}
|
|
504
|
+
get host() { return getElement(this); }
|
|
505
|
+
};
|
|
506
|
+
CasinoEngagementSuiteProgressBar.style = casinoEngagementSuiteProgressBarCss;
|
|
507
|
+
|
|
508
|
+
export { CasinoEngagementSuiteChallengesList as casino_engagement_suite_challenges_list, CasinoEngagementSuiteProgressBar as casino_engagement_suite_progress_bar };
|
|
@@ -257,6 +257,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
257
257
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
258
258
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
259
259
|
}
|
|
260
|
+
else if (memberName === 'style') {
|
|
261
|
+
// update style attribute, css properties and values
|
|
262
|
+
{
|
|
263
|
+
for (const prop in oldValue) {
|
|
264
|
+
if (!newValue || newValue[prop] == null) {
|
|
265
|
+
if (prop.includes('-')) {
|
|
266
|
+
elm.style.removeProperty(prop);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
elm.style[prop] = '';
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
for (const prop in newValue) {
|
|
275
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
276
|
+
if (prop.includes('-')) {
|
|
277
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
elm.style[prop] = newValue[prop];
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
260
285
|
else if (memberName === 'key')
|
|
261
286
|
;
|
|
262
287
|
else if ((!isProp ) &&
|
|
@@ -525,11 +550,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
525
550
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
526
551
|
const oldChildren = oldVNode.$children$;
|
|
527
552
|
const newChildren = newVNode.$children$;
|
|
553
|
+
const tag = newVNode.$tag$;
|
|
528
554
|
const text = newVNode.$text$;
|
|
529
555
|
if (text === null) {
|
|
530
556
|
// element node
|
|
531
557
|
{
|
|
532
|
-
|
|
558
|
+
if (tag === 'slot')
|
|
559
|
+
;
|
|
560
|
+
else {
|
|
533
561
|
// either this is the first render of an element OR it's an update
|
|
534
562
|
// AND we already know it's possible it could have changed
|
|
535
563
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
@@ -802,6 +830,10 @@ const parsePropertyValue = (propValue, propType) => {
|
|
|
802
830
|
// but we'll cheat here and say that the string "false" is the boolean false
|
|
803
831
|
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
804
832
|
}
|
|
833
|
+
if (propType & 2 /* Number */) {
|
|
834
|
+
// force it to be a number
|
|
835
|
+
return parseFloat(propValue);
|
|
836
|
+
}
|
|
805
837
|
if (propType & 1 /* String */) {
|
|
806
838
|
// could have been passed as a number or boolean
|
|
807
839
|
// but we still want it as a string
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-ddf7e990.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["casino-engagement-suite-challenges-
|
|
13
|
+
return bootstrapLazy([["casino-engagement-suite-challenges-list_2",[[1,"casino-engagement-suite-challenges-list",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"challenges":[1040],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"inProgressChallenges":[1040],"tooltip":[32],"timers":[32],"limitStylingAppends":[32],"newChallengeIds":[32],"pausedChallengeIds":[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -29,13 +29,13 @@ export declare class CasinoEngagementSuiteChallengesList {
|
|
|
29
29
|
/**
|
|
30
30
|
*Active challenges
|
|
31
31
|
*/
|
|
32
|
-
inProgressChallenges: Array<
|
|
32
|
+
inProgressChallenges: Array<string>;
|
|
33
33
|
close: EventEmitter<void>;
|
|
34
34
|
tooltip: boolean;
|
|
35
35
|
timers: Record<string, string>;
|
|
36
36
|
private limitStylingAppends;
|
|
37
|
-
newChallengeIds:
|
|
38
|
-
pausedChallengeIds:
|
|
37
|
+
newChallengeIds: string[];
|
|
38
|
+
pausedChallengeIds: string[];
|
|
39
39
|
host: HTMLElement;
|
|
40
40
|
challengesPropHandler(value: Array<Challenge>): void;
|
|
41
41
|
handleEvent(e: any): void;
|
|
@@ -51,7 +51,7 @@ export declare class CasinoEngagementSuiteChallengesList {
|
|
|
51
51
|
handleChallengeClick: (ev: MouseEvent) => void;
|
|
52
52
|
showTooltip: () => void;
|
|
53
53
|
hideTooltip: () => void;
|
|
54
|
-
removeChallenge(id:
|
|
54
|
+
removeChallenge(id: string): void;
|
|
55
55
|
getChallengeClasses(challenge: Challenge): {
|
|
56
56
|
ChallengeCard: boolean;
|
|
57
57
|
InProgress: boolean;
|
|
@@ -27,7 +27,7 @@ export namespace Components {
|
|
|
27
27
|
/**
|
|
28
28
|
* Active challenges
|
|
29
29
|
*/
|
|
30
|
-
"inProgressChallenges": Array<
|
|
30
|
+
"inProgressChallenges": Array<string>;
|
|
31
31
|
/**
|
|
32
32
|
* Is joining to challenge
|
|
33
33
|
*/
|
|
@@ -70,7 +70,7 @@ declare namespace LocalJSX {
|
|
|
70
70
|
/**
|
|
71
71
|
* Active challenges
|
|
72
72
|
*/
|
|
73
|
-
"inProgressChallenges"?: Array<
|
|
73
|
+
"inProgressChallenges"?: Array<string>;
|
|
74
74
|
/**
|
|
75
75
|
* Is joining to challenge
|
|
76
76
|
*/
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export interface ChallengeGrantMessage {
|
|
2
|
+
challengeProgressData: Array<Challenge>;
|
|
3
|
+
errorMessage?: string;
|
|
4
|
+
}
|
|
1
5
|
export interface ChallengePresentation {
|
|
2
6
|
Description: string;
|
|
3
7
|
PresentationName: string;
|
|
@@ -53,7 +57,7 @@ export interface Challenge {
|
|
|
53
57
|
DomainId: number;
|
|
54
58
|
ExpirationTime: string;
|
|
55
59
|
Games: Array<Game>;
|
|
56
|
-
Id:
|
|
60
|
+
Id: string;
|
|
57
61
|
LevelProgresses: Array<LevelProgress>;
|
|
58
62
|
Status: ChallengeProgressStatus;
|
|
59
63
|
IsNew: boolean;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as n,g as s}from"./p-ad0147d6.js";import"@everymatrix/casino-engagement-suite-progress-bar";var o,i;!function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(o||(o={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(i||(i={}));const l=["en"],a={en:{challenges:"Challenges",join:"Join",unjoin:"Unjoin",new:"new",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward"}},r=(e,t)=>{const n=t;return a[void 0!==n&&l.includes(n)?n:"en"][e]};function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function g(e){p(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===h(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function d(e,t){return p(2,arguments),g(e).getTime()-g(t).getTime()}var c={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function u(e){return e?c[e]:c.trunc}const C=class{constructor(n){e(this,n),this.close=t(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newChallengeIds=[],this.pausedChallengeIds=[],this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.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.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1,this.newChallengeIds=[]},this.handleChallengeClick=e=>{const t=+e.currentTarget.getAttribute("data-id");window.postMessage({type:"ChallengeClick",id:t}),this.newChallengeIds=this.newChallengeIds.filter((e=>e!==t))},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.changeChallengeStatus=e=>{var t,n;e.stopPropagation();const s=+e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(s))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:s}):(null===(n=this.inProgressChallenges)||void 0===n?void 0:n.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:s,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:s}})}}challengesPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}handleEvent(e){switch(e.data.type){case"ChallengeGrant":{const t=e.data.data,n=this.challenges.findIndex((e=>function(e,t,n){p(2,arguments);var s=d(e,t)/1e3;return u(null==n?void 0:n.roundingMethod)(s)}(new Date(e.ExpirationTime),new Date(t.ExpirationTime))>0));n>-1?this.challenges.splice(n,0,t):this.challenges.unshift(t),this.challenges=[...this.challenges],this.newChallengeIds.push(t.Id),window.postMessage({type:"UpdateChallenges"});break}case"ChallengeChangeStatusNotification":{const t=e.data.data.ChallengeId;e.data.data.IsEnabled?this.pausedChallengeIds=this.pausedChallengeIds.filter((e=>e!==t)):this.pausedChallengeIds.push(t);break}}}componentWillLoad(){var e;this.challengesPropHandler(this.challenges),(null===(e=this.challenges)||void 0===e?void 0:e.length)&&(this.newChallengeIds=this.challenges.filter((e=>e.IsNew)).map((e=>e.Id)))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.challenges.filter((e=>e.Status!==i.Expired)).reduce(((t,n)=>{const s=new Date(n.ExpirationTime).getTime()-e;let o="00h:00m:00s";if(s<1)this.removeChallenge(n.Id);else{const{days:e,hours:t,minutes:n,seconds:i}={days:String(Math.floor(s/864e5)).padStart(2,"0"),hours:String(Math.floor(s%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(s%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(s%6e4/1e3)).padStart(2,"0")};o="00"===e?`${t}h:${n}m:${i}s`:`${e}d:${t}h:${n}m`}return Object.assign(Object.assign({},t),{[n.Id]:o})}),{})}removeChallenge(e){const t=this.challenges.findIndex((t=>t.Id===e));t>-1&&(this.challenges.splice(t,1),window.postMessage({type:"ChallengeHasExpired",id:e}))}getChallengeClasses(e){return{ChallengeCard:!0,InProgress:e.Status===i.InProgress&&!this.pausedChallengeIds.includes(e.Id),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===i.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.Id)}isChallengeCompleted(e){return e.Status===i.Completed||e.Status===i.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===i.Completed)return 100;if(this.isChallengePaused(e)||e.Status===i.PendingLevelReward||e.Status===i.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===o.InProgress));return t?t.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:t}=e;return n("div",{class:"ChallengeCardHeader"},n("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),n("button",{class:`${e.Status===i.InProgress?"ChallengeJoinButton Joined":"ChallengeJoinButton"} ${this.isJoiningToChallenge?"Disabled":""}`,onClick:this.changeChallengeStatus,"data-id":t},r(e.Status===i.InProgress?"unjoin":"join",this.language)))}getChallengeTemplate(e){const t=this.getChallengeProgress(e),s=this.timers[e.Id],o=this.newChallengeIds.includes(e.Id),i=t>-1?n("casino-engagement-suite-progress-bar",{class:this.device,value:t,disabled:this.isChallengePaused(e)},n("span",{slot:"Title",class:"ChallengeCountdown"},s)):n("span",{class:"ChallengeCountdown"},s);return n("div",{class:this.getChallengeClasses(e),onClick:this.handleChallengeClick,key:e.Id,"data-id":e.Id},this.getChallengeHeaderTemplate(e),i,n("div",{class:"ChallengeLabel "+(o?"ShowChallengeLabel":"")},n("span",null,r("new",this.language))))}getHeaderTemplate(){return n("header",{class:"ChallengesListPopupHeader"},n("button",{onClick:this.showTooltip,class:"ChallengesIconButton"},n("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),n("div",{class:"ChallengesListPopupHeaderName"},r("challenges",this.language)),n("button",{class:"ChallengesIconButton",onClick:this.handleCloseClick},n("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close challenges list"})))}getListTemplate(){return this.challenges.length?n("div",{class:"ChallengesListWrapper"},n("div",{class:"ChallengesList"},this.challenges.map((e=>this.getChallengeTemplate(e))))):n("div",{class:"ChallengesListEmpty"},n("h2",null,r("noChallenges",this.language)),n("p",null,r("tryOtherGames",this.language)))}getTooltipTemplate(){return n("div",{class:"ChallengesTooltipBackdrop"},n("div",{class:"ChallengesTooltip"},n("button",{class:"ChallengesIconButton",onClick:this.hideTooltip},n("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),r("tooltip",this.language)))}render(){return n("div",{class:`ChallengesListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return s(this)}static get watchers(){return{challenges:["challengesPropHandler"]}}};C.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesIconButton{width:16px;height:16px;cursor:pointer}.ChallengesListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.ChallengeJoinButton.Joined::before,.ChallengeCard.InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:20px;line-height:24px;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:12px;line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:10px;line-height:10px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengesTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.ChallengesTooltipBackdrop .ChallengesTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.ChallengesTooltipBackdrop .ChallengesTooltip .ChallengesIconButton{top:12px;right:6px;position:absolute}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:16px;line-height:16px}.ChallengesListPopup.Tablet .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengesListPopup.Tablet .ChallengeJoinButton,.ChallengesListPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:14px;line-height:14px}.ChallengesListPopup.Tablet .ChallengesTooltip,.ChallengesListPopup.Desktop .ChallengesTooltip{padding:60px 65px;font-size:16px;line-height:20px}.ChallengesListPopup.Tablet .ChallengesTooltip .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesTooltip .ChallengesIconButton{top:24px;right:24px}';export{C as casino_engagement_suite_challenges_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",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)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),r=(e,t,n)=>{n&&n.map((([n,l,s])=>{const i=a(e,n),c=u(t,s),r=f(n);o.ael(i,l,c,r),(t.o=t.o||[]).push((()=>o.rel(i,l,c,r)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){J(e)}},a=(e,t)=>8&t?l:e,f=e=>0!=(2&e),d=new WeakMap,h=e=>"sc-"+e.h,$={},y=e=>"object"==(e=typeof e)||"function"===e,m=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,c=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!y(l))&&(l+=""),o&&i?c[c.length-1].$+=l:c.push(o?p(null,l):l),i=o)};if(r(n),t){t.key&&(s=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=p(e,null);return u.m=t,c.length>0&&(u.p=c),u.g=s,u},p=(e,t)=>({t:0,S:e,$:t,k:null,p:null,m:null,g:null}),b={},w=(e,t,n,s,i,c)=>{if(n!==s){let r=I(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=S(n),o=S(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("key"===t);else if(r||"o"!==t[0]||"n"!==t[1]){const l=y(s);if((r||l&&null!==s)&&!i)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?r=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||i)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):I(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},g=/\s/,S=e=>e?e.split(g):[],k=(e,t,n,l)=>{const s=11===t.k.nodeType&&t.k.host?t.k.host:t.k,o=e&&e.m||$,i=t.m||$;for(l in o)l in i||w(s,l,o[l],void 0,n,t.t);for(l in i)w(s,l,o[l],i[l],n,t.t)},j=(t,n,l)=>{let o,i,c=n.p[l],r=0;if(null!==c.$)o=c.k=s.createTextNode(c.$);else if(o=c.k=s.createElement(c.S),k(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.p)for(r=0;r<c.p.length;++r)i=j(t,c,r),i&&o.appendChild(i);return o},v=(e,n,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=j(null,l,o),c&&(s[o].k=c,r.insertBefore(c,n)))},M=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.k.remove()},C=(e,t)=>e.S===t.S&&e.g===t.g,O=(e,t)=>{const n=t.k=e.k,l=e.p,s=t.p,o=t.$;null===o?(k(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o,i=0,c=0,r=0,u=0,a=t.length-1,f=t[0],d=t[a],h=l.length-1,$=l[0],y=l[h];for(;i<=a&&c<=h;)if(null==f)f=t[++i];else if(null==d)d=t[--a];else if(null==$)$=l[++c];else if(null==y)y=l[--h];else if(C(f,$))O(f,$),f=t[++i],$=l[++c];else if(C(d,y))O(d,y),d=t[--a],y=l[--h];else if(C(f,y))O(f,y),e.insertBefore(f.k,d.k.nextSibling),f=t[++i],y=l[--h];else if(C(d,$))O(d,$),e.insertBefore(d.k,f.k),d=t[--a],$=l[++c];else{for(r=-1,u=i;u<=a;++u)if(t[u]&&null!==t[u].g&&t[u].g===$.g){r=u;break}r>=0?(o=t[r],o.S!==$.S?s=j(t&&t[c],n,r):(O(o,$),t[r]=void 0,s=o.k),$=l[++c]):(s=j(t&&t[c],n,c),$=l[++c]),s&&f.k.parentNode.insertBefore(s,f.k)}i>a?v(e,null==l[h+1]?null:l[h+1].k,n,l,c,h):c>h&&M(t,i,a)})(n,l,t,s):null!==s?(null!==e.$&&(n.textContent=""),v(n,null,t,s,0,s.length-1)):null!==l&&M(l,0,l.length-1)):e.$!==o&&(n.data=o)},P=e=>z(e).j,x=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},L=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},N=(e,t)=>{if(e.t|=16,!(4&e.t))return L(e,e.M),se((()=>R(e,t)));e.t|=512},R=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>q(n,e,t))),e.u=null),l=q(n,"componentWillLoad")),D(l,(()=>T(e,n,t)))},T=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.C,n=e.j,l=t.t,o=((e,t)=>{let n=h(t),l=X.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=d.get(e=e.head||e);o||d.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);W(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>A(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},W=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.C,i=n.O||p(null,null),c=(e=>e&&e.S===b)(l)?l:m(null,null,l);t=s.tagName,o.P&&(c.m=c.m||{},o.P.map((([e,t])=>c.m[t]=s[e]))),c.S=null,c.t|=4,n.O=c,c.k=i.k=s.shadowRoot||s,e=s["s-sc"],O(i,c)})(n,l)}catch(e){J(e,n.j)}return null},A=e=>{const t=e.j,n=e.M;q(e.i,"componentDidRender"),64&e.t||(e.t|=64,F(t),e.L(t),n||U()),e.v&&(e.v(),e.v=void 0),512&e.t&&le((()=>N(e,!1))),e.t&=-517},U=()=>{F(s.documentElement),le((()=>E(l,"appload",{detail:{namespace:"casino-engagement-suite-challenges-list"}})))},q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){J(e)}},D=(e,t)=>e&&e.then?e.then(t):t(),F=e=>e.classList.add("hydrated"),H=(e,t,n)=>{if(t.N){e.watchers&&(t.R=e.watchers);const l=Object.entries(t.N),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>z(this).T.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=z(e),o=s.j,i=s.T.get(t),c=s.t,r=s.i;if(n=((e,t)=>null==e||y(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.N[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.T.set(t,n),r)){if(l.R&&128&c){const e=l.R[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){J(e,o)}}))}2==(18&c)&&N(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.P.push([e,s]),s}))}}return e},V=(e,t={})=>{const n=[],i=t.exclude||[],u=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let y,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],h:t[1],N:t[2],W:t[3]};l.N=t[2],l.W=t[3],l.P=[],l.R={};const s=l.h,a=class extends HTMLElement{constructor(e){super(e),G(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),m?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=z(e),n=t.C,l=()=>{};if(1&t.t)r(e,t,n.W);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){L(t,t.M=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.R=s.watchers,H(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){J(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=h(n);if(!X.has(t)){const l=()=>{};((e,t,n)=>{let l=X.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,X.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>N(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{if(0==(1&o.t)){const e=z(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),q(t,"disconnectedCallback")}})()))}componentOnReady(){return z(this).A}};l.U=e[0],i.includes(s)||u.get(s)||(n.push(s),u.define(s,H(a,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),a.insertBefore(d,f?f.nextSibling:a.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>y=setTimeout(U,30)))},_=new WeakMap,z=e=>_.get(e),B=(e,t)=>_.set(t.i=e,t),G=(e,t)=>{const n={t:0,j:e,C:t,T:new Map};return n.A=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],r(e,n,t.W),_.set(e,n)},I=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),K=new Map,Q=e=>{const t=e.h.replace(/-/g,"_"),n=e.U,l=K.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(K.set(n,e),e[t])),J)},X=new Map,Y=[],Z=[],ee=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?le(ne):o.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){J(e)}e.length=0},ne=()=>{te(Y),te(Z),(n=Y.length>0)&&o.raf(ne)},le=e=>i().then(e),se=ee(Z,!0);export{V as b,x as c,P as g,m as h,i as p,B as r}
|