@everymatrix/casino-engagement-suite-container 1.46.0 → 1.46.1
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-container/casino-engagement-suite-container.esm.js +1 -1
- package/dist/casino-engagement-suite-container/p-29784f79.entry.js +1 -0
- package/dist/casino-engagement-suite-container/p-c59fc10e.js +2 -0
- package/dist/cjs/casino-engagement-suite-bar_13.cjs.entry.js +522 -395
- package/dist/cjs/casino-engagement-suite-container.cjs.js +2 -2
- package/dist/cjs/{index-e4164ba0.js → index-6902dbfc.js} +1 -42
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/casino-engagement-suite-container/casino-engagement-suite-container.js +2 -2
- package/dist/esm/casino-engagement-suite-bar_13.entry.js +522 -395
- package/dist/esm/casino-engagement-suite-container.js +3 -3
- package/dist/esm/{index-b81d346d.js → index-f24d73d3.js} +2 -42
- package/dist/esm/loader.js +3 -3
- package/package.json +2 -1
- package/dist/casino-engagement-suite-container/p-1754878b.js +0 -2
- package/dist/casino-engagement-suite-container/p-4781a905.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-
|
|
1
|
+
import{p as e,b as n}from"./p-c59fc10e.js";export{s as setNonce}from"./p-c59fc10e.js";import{g as i}from"./p-e1255160.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((async e=>(await i(),n([["p-29784f79",[[1,"casino-engagement-suite-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],orientation:[32],device:[32],showChallengesList:[32],showFreeSpinsList:[32],showJackpotsList:[32],showChallengeDetails:[32],showFreeSpinsDetails:[32],showJackpotDetails:[32],showLeaderboardWidget:[32],challengePercent:[32],remainingFreeSpins:[32],highlightChallenge:[32],limitStylingAppends:[32],activeWidget:[32],challenges:[32],inProgressChallenges:[32],jackpots:[32],freeSpins:[32],leaderboards:[32],gameSlug:[32],pausedChallengeIds:[32],isChallengeLabel:[32],isForfeitedSpinsLabel:[32],isForfeitedChallengeLabel:[32],isJoiningToChallenge:[32],selectedChallenge:[32],selectedJackpot:[32],selectedSpin:[32],selectedSpinId:[32],selectedChallengeId:[32],selectedJackpotId:[32],barHeight:[32],init:[64]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-challenges-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],challenge:[1040],inProgressChallenges:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],pausedChallengeIds:[1040],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32]},null,{challenge:["challengePropHandler"]}],[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],pausedChallengeIds:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32],activeTab:[32],historyLoading:[32],challengesHistory:[32],openedHistoryIds:[32]},[[8,"message","handleEvent"]],{challenges:["challengesPropHandler"]}],[1,"casino-engagement-suite-modal-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],device:[1],limitStylingAppends:[32],openModals:[32],rewardMessage:[32],hasError:[32],confirmationData:[32],winAmount:[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]],[1,"casino-engagement-suite-tournament",{language:[1],show:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],device:[1],leaderboardsInit:[16],tab:[32],locale:[32],tournamentItem:[32],tournamentList:[32],leaderboards:[32],isActionJoinPending:[32],isDialogOpen:[32],isShowInfo:[32],page:[32],tournamentInDialog:[32],dialog:[32],time:[32],newIdList:[32]},[[8,"message","handleEvent"]],{newIdList:["checkNewIdList"],tournamentList:["syncBarState"],show:["showPropWatcher"]}],[1,"casino-engagement-suite-bar",{activeWidget:[1537,"active-widget"],challengePercent:[1,"challenge-percent"],highlightChallenge:[4,"highlight-challenge"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],orientation:[1],device:[1],isChallengeLabel:[4,"is-challenge-label"],isForfeitedChallengeLabel:[4,"is-forfeited-challenge-label"],isSpinForfeitedLabel:[1028,"is-spin-forfeited-label"],language:[1],jackpots:[16],remainingFreeSpins:[1,"remaining-free-spins"],leaderboards:[16],limitStylingAppends:[32],activeJackpot:[32],leaderboardState:[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-free-spins-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],spin:[1040],inProgressChallenges:[16],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32],activeTab:[32],visibleGames:[32],tooltip:[32]}],[1,"casino-engagement-suite-free-spins-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],freeSpins:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32],newSpinIds:[32]},null,{freeSpins:["spinsPropHandler"]}],[1,"casino-engagement-suite-jackpot-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],jackpot:[16],jackpotChangeStatusRequest:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],limitStylingAppends:[32],timer:[32],disabledStatus:[32],activeTab:[32],visibleGames:[32],enabled:[32],balance:[32],winBalance:[32],showDetails:[32],jackpotEndTime:[32],tooltip:[32],partialWins:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{jackpot:["handleJackpotUpdate"]}],[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]},null,{jackpots:["jackpotsPropHandler"]}],[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],isLoading:[1028,"is-loading"],header:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],showAnimation:[4,"show-animation"],limitStylingAppends:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}],[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,c as i,g as n,H as a}from"./p-c59fc10e.js";function o(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(i[n[a]]=e[n[a]])}return i}"function"==typeof SuppressedError&&SuppressedError;const s={labels:[],rank:"-"},r=["en"],l={en:{new:"new",win:"win"}},p=(e,t)=>{const i=t;return l[void 0!==i&&r.includes(i)?i:"en"][e]},d=class{constructor(t){e(this,t),this.handleTileClick=e=>{const t=e.target.getAttribute("data-app");window.postMessage({type:`Bar${t}Click`}),this.activeWidget=t,"Jackpots"===t&&(this.activeJackpot=e.target.getAttribute("data-type"))},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.engagementSuiteBar.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.engagementSuiteBar.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.activeWidget=void 0,this.challengePercent=void 0,this.highlightChallenge=!1,this.clientStyling="",this.clientStylingUrl="",this.orientation="Landscape",this.device="Mobile",this.isChallengeLabel=!1,this.isForfeitedChallengeLabel=!1,this.isSpinForfeitedLabel=!1,this.language="en",this.jackpots=[],this.remainingFreeSpins=void 0,this.leaderboards=void 0,this.limitStylingAppends=!1,this.activeJackpot="",this.leaderboardState=s}handleEvent(e){const t=null==e?void 0:e.data,{type:i}=t,n=o(t,["type"]);"UpdateLeaderboardState"===i&&Object.keys(s).map((e=>{n[e]&&(this.leaderboardState=Object.assign(Object.assign({},this.leaderboardState),{[e]:n[e]}))}))}componentDidRender(){!this.limitStylingAppends&&this.engagementSuiteBar&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getChallengeTile(){return t("button",{class:"Tile Reward Challenges "+("Challenges"===this.activeWidget||this.highlightChallenge?"Active":""),"data-app":"Challenges",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.challengePercent),t("div",{class:"ChallengeLabel "+(this.isChallengeLabel&&!this.isForfeitedChallengeLabel?"ShowChallengeLabel":"")},t("span",null,p("new",this.language))),t("div",{class:"ForfeitLabel "+(this.isForfeitedChallengeLabel?"ShowForfeitChallengeLabel":"")}))}getFreeSpinsTile(){return t("button",{class:"Tile Reward FreeSpins "+("FreeSpins"===this.activeWidget?"Active":""),"data-app":"FreeSpins",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.remainingFreeSpins),t("div",{class:"ForfeitLabel "+(this.isSpinForfeitedLabel?"ShowForfeitLabel":"")},t("span",null)))}getJackpotClasses(e){return{Tile:!0,Jackpot:!0,Enabled:e.Enabled,Active:"Jackpots"===this.activeWidget&&this.activeJackpot===e.Type,[e.Type.charAt(0).toUpperCase()+e.Type.slice(1)]:!0}}getJackpotsTemplate(){return this.jackpots.map((e=>{const i=function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(e.Balance,e.Currency);return t("div",{class:this.getJackpotClasses(e),"data-app":"Jackpots","data-type":e.Type,onClick:this.handleTileClick},t("div",{class:"JackpotType"},e.Type),t("span",{class:"JackpotBalance"},i))}))}getLeaderboardsTile(){return t("button",{class:"Tile Reward Leaderboard "+("Leaderboards"===this.activeWidget?"Active":""),"data-app":"Leaderboards",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.leaderboardState.rank),t("div",{class:"LeaderboardLabels"},this.leaderboardState.labels.map((e=>t("div",{class:"LeaderboardLabel"},t("span",null,p(e,this.language)))))))}displayTilesInOneRow(){return this.jackpots.length+[this.leaderboards,this.challengePercent,this.remainingFreeSpins].filter((e=>!!e)).length<4}getTilesTemplate(){return this.displayTilesInOneRow()?t("div",{class:"EngagementSuiteContainer"},!!this.jackpots.length&&this.getJackpotsTemplate(),this.leaderboards&&this.getLeaderboardsTile(),this.challengePercent&&this.getChallengeTile(),this.remainingFreeSpins&&this.getFreeSpinsTile()):t("div",{class:"EngagementSuiteContainer"},t("div",{class:"Jackpots"},!!this.jackpots.length&&this.getJackpotsTemplate()),t("div",{class:"Rewards"},this.leaderboards&&this.getLeaderboardsTile(),this.challengePercent&&this.getChallengeTile(),this.remainingFreeSpins&&this.getFreeSpinsTile()))}render(){return t("div",{key:"e2530052e1c252ef9318a48c9f8ff28372620505",class:`CasinoEngagementSuiteBar ${this.orientation} ${this.device}`,ref:e=>this.engagementSuiteBar=e},this.getTilesTemplate())}};d.style=':host{display:block}*{box-sizing:border-box}button{touch-action:manipulation}.CasinoEngagementSuiteBar{height:100vh;background-color:var(--emw--color-background, #1E1638);color:var(--emw--color-typography, #FFF);display:flex;justify-content:center;position:relative;z-index:1}.CasinoEngagementSuiteBar .EngagementSuiteContainer{display:flex;align-items:center;gap:4px;scrollbar-gutter:stable;overflow-x:auto;padding:7px 9px 0;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar{width:3px;background:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{cursor:pointer;background-color:var(--emw--color-background-secondary, #251D3E);border-radius:var(--emw--border-radius-small, 4px);display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-x-small, 12px);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #FFF)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile.Active::before{background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #2D2545 82.77%)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 100%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{display:flex;gap:4px;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{padding:14px 4px;flex-direction:column}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotType{display:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotBalance{font-weight:var(--emw--font-weight-semibold, 600);line-height:12px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-typography, #fff)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled .JackpotBalance{font-weight:var(--emw--font-weight-extra-bold, 800)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{justify-content:space-between;padding:8px;border:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .RewardIcon{width:24px;height:24px;background-size:100%;background-position:center}.Tile.Leaderboard .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg")}.Tile.Leaderboard.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard-pressed.svg")}.Tile.Challenges .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge.svg")}.Tile.Challenges.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge-pressed.svg")}.Tile.Luckywheel .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel.svg")}.Tile.Luckywheel.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel-pressed.svg")}.Tile.FreeSpins .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins.svg")}.Tile.FreeSpins.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins-pressed.svg")}.ChallengeLabel{min-width:23px;height:11px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-4px;right:4px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:7px;line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ForfeitLabel{width:12px;height:12px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:50%;display:none;position:absolute;top:-6px;right:8px}.ShowChallengeLabel{display:inline-flex}.ShowForfeitLabel,.ShowForfeitChallengeLabel{display:inline-flex}.LeaderboardLabels{position:absolute;top:-4px;right:4px;display:flex;gap:4px}.LeaderboardLabel{min-width:23px;height:11px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:7px;line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.Landscape.CasinoEngagementSuiteBar{width:152px;padding-top:10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer{flex-direction:column}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{width:120px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{width:120px;height:40px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{flex-direction:column}.Portrait.CasinoEngagementSuiteBar{border-radius:0 0 var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px);height:auto;padding:3px 10px 10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer{padding:7px 0 0;gap:8px;flex-wrap:wrap}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards,.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots{gap:8px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{flex:1 1 0px;height:32px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{min-width:30%;padding:10px 4px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{min-width:20%;padding:4px 8px}.CasinoEngagementSuiteBar.Desktop.Landscape{width:252px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .EngagementSuiteContainer{gap:12px}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward{padding:8px 20px;height:64px;font-size:var(--emw--font-size-medium, 16px)}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward .RewardIcon{width:48px;height:48px}.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Tile{width:212px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot{padding-top:35px;min-height:133px;background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/jackpot-bg-stars.svg"), var(--emw--color-background-secondary, #251D3E)}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType{display:block;font-weight:var(--emw--font-weight-extra-bold, 800);margin-bottom:12px;text-transform:uppercase}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotBalance{font-size:var(--emw--size-large, 24px);line-height:24px}';const c=["en"],g={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",details:"Mission Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution",gameLimit:"Full game list in Terms and Conditions or \n Contact Support"}},h=(e,t)=>{const i=t;return g[void 0!==i&&c.includes(i)?i:"en"][e]};var u,m;function b(e,t){return`${t}${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}!function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(u||(u={})),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",e[e.Forfeited=5]="Forfeited"}(m||(m={}));const f=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),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.resetNewLabel(),this.close.emit()},this.handleBackClick=()=>{this.resetNewLabel(),this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.changeChallengeStatus=e=>{var t,i;const n=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(n))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:n}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:n,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:n}})},this.toggle=()=>{this.showDetails=!this.showDetails},this.clientStyling="",this.clientStylingUrl="",this.challenge=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.isJoiningToChallenge=void 0,this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1}challengePropHandler(e){!this.interval&&e&&(this.updateTimer(),this.startCountdown()),this.interval&&!e&&clearInterval(this.interval)}componentWillLoad(){this.challengePropHandler(this.challenge)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getActionsTemplate(){return t("header",{class:"ChallengeActions"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getChallengeHeader(){const e=this.challenge.ChallengePresentation.PresentationName,i=this.challenge.Status===m.InProgress||this.challenge.Status===m.PendingLevelReward,n=this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId),a=![m.Completed,m.Forfeited].includes(this.challenge.Status),o=this.challenge.Status!==m.Forfeited;return t("div",{class:"ChallengeDetailsHeader"},t("span",{class:"ChallengeName"},e),a?t("button",{onClick:this.changeChallengeStatus,class:`EngagementSuiteButton ${i?"Active":""}\n ${n?"Disabled":""}`,"data-id":this.challenge.Id},h(i?"unjoin":"join",this.language)):null,o?t("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},t("span",null,h("new",this.language))):null)}getChallengeCountdown(){return this.challenge.Status!==m.Forfeited?t("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer):null}getChallengeDetails(){const e=this.challenge.ChallengePresentation.Description,i=this.challenge.ChallengePresentation.Url,n=this.challenge.Games,a=this.challenge.TotalGamesCount>this.challenge.Games.length;return t("div",{class:"CollapseDetails "+(this.showDetails?"ShowDetails":"")},e&&t("div",{class:"ChallengeDescription"},e),i&&t("div",{class:"TC"},t("a",{href:i,target:"_blank"},h("tc",this.language))),(null==n?void 0:n.length)&&t("div",{class:"ChallengeGames"},n.map((e=>t("div",{class:"Game",key:e.CasinoGameId},t("img",{src:e.GameIcon,alt:e.GameName,onClick:this.onGameClick,class:e.GameSlug===this.gameSlug?"Disabled":"","data-slug":e.GameSlug})))),a&&t("div",{class:"GameLimitMessage"},t("span",null,h("gameLimit",this.language)))))}resetNewLabel(){this.resetNewChallengeLabel.emit(this.challenge.Id)}startCountdown(){this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.challenge.ExpirationTime).getTime()-(new Date).getTime();if(e<1)return clearInterval(this.interval),this.timer="",void(this.isExpiredChallenge=!0);const{days:t,hours:i,minutes:n,seconds:a}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${a}s`:`${t}d:${i}h:${n}m`}getLevelTarget(e){const i=b(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let n=`${h("place",this.language)} ${i}`;return 1===e.LevelTargetType?n+=` ${h("bet",this.language)}`:2===e.LevelTargetType&&(n+=` ${h("bets",this.language)} X ${e.TargetBetCount}`),t("span",{class:"ChallengeLevelTarget"},n)}getLevelBetRangesDetails(e){var i,n,a,o;if(0===e.LevelTargetType){const s=b(null===(i=e.BetRange)||void 0===i?void 0:i.MinBet,this.challenge.CurrencySymbol),r=b(null===(n=e.BetRange)||void 0===n?void 0:n.MaxBet,this.challenge.CurrencySymbol),l=e.LevelContributionPercent+"%",p=!!(null===(a=e.BetRange)||void 0===a?void 0:a.MinBet),d=!!(null===(o=e.BetRange)||void 0===o?void 0:o.MaxBet),c=100!==e.LevelContributionPercent;if(p||d||c)return t("div",{class:"ChallengeLevelBetDetails"},p&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,h("minBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},s)),d&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,h("maxBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},r)),c&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,h("contribution",this.language),": "),t("span",{class:"ChallengeLevelBetContribution"},l)))}}getChallengeLevels(){const e=this.pausedChallengeIds.includes(this.challenge.ChallengeId),i=t=>1===t.ProgressStatus&&!this.isExpiredChallenge&&!e;return t("div",{class:"ChallengeLevels"},this.challenge.LevelProgresses.map(((n,a)=>t("div",{class:"ChallengeLevelCard "+(i(n)?"InProgress":"")},t("casino-engagement-suite-progress-bar",{clientStylingUrl:this.clientStylingUrl,class:this.device,value:n.ProgressPercentage,"hide-percent":0===n.ProgressPercentage&&!i(n)||100===n.ProgressPercentage,disabled:this.isExpiredChallenge||e},t("span",{slot:"Title",class:"ChallengeLevelTitle"},t("span",null,"Level ",a+1,": "),this.getLevelTarget(n))),t("div",{class:"ChallengeRewardMessage"},t("div",{class:"EngagementSuiteIconButton Reward"}),t("span",null,h("win",this.language),": "),t("span",{class:"CustomRewardMessage"},n.CustomRewardMessage)),this.getLevelBetRangesDetails(n)))))}getToggleButton(){return t("div",{class:"ChallengeCollapseButton",onClick:this.toggle},t("span",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,h("details",this.language)))}render(){return t("div",{key:"0d845a9ff0cf10c942add6ab84bc0648b185fda6",class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{key:"7ae213adaac726bbf0a6eddef530ef9a120fda7a",class:"ChallengeDetails "+(this.challenge.IsNew?"IsNewChallenge":"")},this.getChallengeHeader(),this.getChallengeCountdown(),this.getToggleButton(),this.getChallengeDetails(),this.getChallengeLevels()))}get host(){return n(this)}static get watchers(){return{challenge:["challengePropHandler"]}}};var v,w,x,k;f.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Reward{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/reward.svg) no-repeat;min-width:16px;min-height:16px}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-23px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-word}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, 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}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, 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;border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.ChallengeCollapseButton{margin:24px 0 14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emw--color-typography, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);cursor:pointer}.CollapseDetails .ChallengeGames .GameLimitMessage{min-width:100%;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);background-color:var(--emw--color-background-transparency-30, rgba(64, 57, 86, 0.3));display:flex;align-items:center;justify-content:center;text-align:center}.CollapseDetails .ChallengeGames .GameLimitMessage span{color:var(--emw--color-secondary, #BBB9C3);white-space:pre-line}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-x-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:var(--emw--border-radius-large, 8px)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emw--color-typography, #FFF)}.ChallengeLevels .InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-large, 8px);padding:1px;background:var(--emw--engagement-suite-gradient-button, 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}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton.Reward,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton.Reward{min-width:24px;min-height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengeDetailsPopup.Tablet .EngagementSuiteButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}',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"}(v||(v={})),function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(w||(w={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(x||(x={})),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",e[e.Forfeited=5]="Forfeited"}(k||(k={}));const y=["en"],C={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",history:"History",level:"Level",status:"Status",time:"Time",loading:"Loading...",completed:"Completed",expired:"Expired",forfeited:"Forfeited",noHistory:"No missions’ history available (last 30 days)",freeSpins:"Free Spins",luckyWheel:"Lucky Wheel",leaderboard:"Leaderboard",mission:"Mission",missionHasBeenForfeited:"The mission has been canceled.",support:"Please, contact support."}},F=(e,t)=>{const i=t;return C[void 0!==i&&y.includes(i)?i:"en"][e]};function S(e){return S="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},S(e)}function L(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function E(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function B(e){E(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===S(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))}var D={};function T(){return D}var P={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function J(e,t,i){E(2,arguments);var n,a=function(e,t){return E(2,arguments),B(e).getTime()-B(t).getTime()}(e,t)/1e3;return((n=null==i?void 0:i.roundingMethod)?P[n]:P.trunc)(a)}function I(e){E(1,arguments);var t=B(e),i=t.getUTCDay(),n=(i<1?7:0)+i-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function M(e){E(1,arguments);var t=B(e),i=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var a=I(n),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var s=I(o);return t.getTime()>=a.getTime()?i+1:t.getTime()>=s.getTime()?i:i-1}function z(e,t){var i,n,a,o,s,r,l,p;E(1,arguments);var d=T(),c=L(null!==(i=null!==(n=null!==(a=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(s=t.locale)||void 0===s||null===(r=s.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==a?a:d.weekStartsOn)&&void 0!==n?n:null===(l=d.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=B(e),h=g.getUTCDay(),u=(h<c?7:0)+h-c;return g.setUTCDate(g.getUTCDate()-u),g.setUTCHours(0,0,0,0),g}function H(e,t){var i,n,a,o,s,r,l,p;E(1,arguments);var d=B(e),c=d.getUTCFullYear(),g=T(),h=L(null!==(i=null!==(n=null!==(a=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(s=t.locale)||void 0===s||null===(r=s.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==a?a:g.firstWeekContainsDate)&&void 0!==n?n:null===(l=g.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(c+1,0,h),u.setUTCHours(0,0,0,0);var m=z(u,t),b=new Date(0);b.setUTCFullYear(c,0,h),b.setUTCHours(0,0,0,0);var f=z(b,t);return d.getTime()>=m.getTime()?c+1:d.getTime()>=f.getTime()?c:c-1}function R(e,t){for(var i=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return i+n}const j=function(e,t){var i=e.getUTCFullYear(),n=i>0?i:1-i;return R("yy"===t?n%100:n,t.length)},W=function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):R(i+1,2)},A=function(e,t){return R(e.getUTCDate(),t.length)},O=function(e,t){return R(e.getUTCHours()%12||12,t.length)},N=function(e,t){return R(e.getUTCHours(),t.length)},G=function(e,t){return R(e.getUTCMinutes(),t.length)},$=function(e,t){return R(e.getUTCSeconds(),t.length)},U=function(e,t){var i=t.length,n=e.getUTCMilliseconds();return R(Math.floor(n*Math.pow(10,i-3)),t.length)};var _={G:function(e,t,i){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});default:return i.era(n,{width:"wide"})}},y:function(e,t,i){if("yo"===t){var n=e.getUTCFullYear();return i.ordinalNumber(n>0?n:1-n,{unit:"year"})}return j(e,t)},Y:function(e,t,i,n){var a=H(e,n),o=a>0?a:1-a;return"YY"===t?R(o%100,2):"Yo"===t?i.ordinalNumber(o,{unit:"year"}):R(o,t.length)},R:function(e,t){return R(M(e),t.length)},u:function(e,t){return R(e.getUTCFullYear(),t.length)},Q:function(e,t,i){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return R(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,i){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return R(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,i){var n=e.getUTCMonth();switch(t){case"M":case"MM":return W(e,t);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,i){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return R(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,i,n){var a=function(e,t){E(1,arguments);var i=B(e),n=z(i,t).getTime()-function(e,t){var i,n,a,o,s,r,l,p;E(1,arguments);var d=T(),c=L(null!==(i=null!==(n=null!==(a=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(s=t.locale)||void 0===s||null===(r=s.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==a?a:d.firstWeekContainsDate)&&void 0!==n?n:null===(l=d.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1),g=H(e,t),h=new Date(0);return h.setUTCFullYear(g,0,c),h.setUTCHours(0,0,0,0),z(h,t)}(i,t).getTime();return Math.round(n/6048e5)+1}(e,n);return"wo"===t?i.ordinalNumber(a,{unit:"week"}):R(a,t.length)},I:function(e,t,i){var n=function(e){E(1,arguments);var t=B(e),i=I(t).getTime()-function(e){E(1,arguments);var t=M(e),i=new Date(0);return i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0),I(i)}(t).getTime();return Math.round(i/6048e5)+1}(e);return"Io"===t?i.ordinalNumber(n,{unit:"week"}):R(n,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):A(e,t)},D:function(e,t,i){var n=function(e){E(1,arguments);var t=B(e),i=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime();return Math.floor((i-n)/864e5)+1}(e);return"Do"===t?i.ordinalNumber(n,{unit:"dayOfYear"}):R(n,t.length)},E:function(e,t,i){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,i,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return R(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,i,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return R(o,t.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,i){var n=e.getUTCDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return R(a,t.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,i){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,i){var n,a=e.getUTCHours();switch(n=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,i){var n,a=e.getUTCHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",t){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,i){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return O(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):N(e,t)},K:function(e,t,i){var n=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(n,{unit:"hour"}):R(n,t.length)},k:function(e,t,i){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?i.ordinalNumber(n,{unit:"hour"}):R(n,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):G(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):$(e,t)},S:function(e,t){return U(e,t)},X:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return Y(a);case"XXXX":case"XX":return Q(a);default:return Q(a,":")}},x:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return Y(a);case"xxxx":case"xx":return Q(a);default:return Q(a,":")}},O:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+q(a,":");default:return"GMT"+Q(a,":")}},z:function(e,t,i,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+q(a,":");default:return"GMT"+Q(a,":")}},t:function(e,t,i,n){return R(Math.floor((n._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,i,n){return R((n._originalDate||e).getTime(),t.length)}};function q(e,t){var i=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),o=n%60;if(0===o)return i+String(a);var s=t||"";return i+String(a)+s+R(o,2)}function Y(e,t){return e%60==0?(e>0?"-":"+")+R(Math.abs(e)/60,2):Q(e,t)}function Q(e,t){var i=t||"",n=e>0?"-":"+",a=Math.abs(e);return n+R(Math.floor(a/60),2)+i+R(a%60,2)}const X=_;var V=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},K=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Z={p:K,P:function(e,t){var i,n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return V(e,t);switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",V(a,t)).replace("{{time}}",K(o,t))}};const ee=Z;var te=["D","DD"],ie=["YY","YYYY"];function ne(e,t,i){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ae={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function oe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth;return e.formats[i]||e.formats[e.defaultWidth]}}var se,re={date:oe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:oe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:oe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},le={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function pe(e){return function(t,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=null!=i&&i.width?String(i.width):a;n=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,r=null!=i&&i.width?String(i.width):e.defaultWidth;n=e.values[r]||e.values[s]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function de(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,a=t.match(n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth]);if(!a)return null;var o,s=a[0],r=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e){for(var t=0;t<e.length;t++)if(e[t].test(s))return t}(r):function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t].test(s))return t}(r);return o=e.valueCallback?e.valueCallback(l):l,{value:o=i.valueCallback?i.valueCallback(o):o,rest:t.slice(s.length)}}}const ce={code:"en-US",formatDistance:function(e,t,i){var n,a=ae[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+n:n+" ago":n},formatLong:re,formatRelative:function(e){return le[e]},localize:{ordinalNumber:function(e){var t=Number(e),i=t%100;if(i>20||i<10)switch(i%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:pe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:pe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:pe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:pe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:pe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(se={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(se.matchPattern);if(!i)return null;var n=i[0],a=e.match(se.parsePattern);if(!a)return null;var o=se.valueCallback?se.valueCallback(a[0]):a[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(n.length)}}),era:de({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:de({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:de({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:de({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:de({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,he=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ue=/^'([^]*?)'?$/,me=/''/g,be=/[a-zA-Z]/;function fe(e,t,i){var n,a,o,s,r,l,p,d,c,g,h,u,m,b,f,v,w,x;E(2,arguments);var k=String(t),y=T(),C=null!==(n=null!==(a=null==i?void 0:i.locale)&&void 0!==a?a:y.locale)&&void 0!==n?n:ce,F=L(null!==(o=null!==(s=null!==(r=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(p=i.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:y.firstWeekContainsDate)&&void 0!==s?s:null===(c=y.locale)||void 0===c||null===(g=c.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==o?o:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=L(null!==(h=null!==(u=null!==(m=null!==(b=null==i?void 0:i.weekStartsOn)&&void 0!==b?b:null==i||null===(f=i.locale)||void 0===f||null===(v=f.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:y.weekStartsOn)&&void 0!==u?u:null===(w=y.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==h?h:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!C.localize)throw new RangeError("locale must contain localize property");if(!C.formatLong)throw new RangeError("locale must contain formatLong property");var P=B(e);if(!function(e){if(E(1,arguments),!function(e){return E(1,arguments),e instanceof Date||"object"===S(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=B(e);return!isNaN(Number(t))}(P))throw new RangeError("Invalid time value");var J=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(P),I=function(e,t){return E(2,arguments),function(e,t){E(2,arguments);var i=B(e).getTime(),n=L(t);return new Date(i+n)}(e,-L(t))}(P,J),M={firstWeekContainsDate:F,weekStartsOn:D,locale:C,_originalDate:P};return k.match(he).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,ee[t])(e,C.formatLong):e})).join("").match(ge).map((function(n){if("''"===n)return"'";var a,o,s=n[0];if("'"===s)return(o=(a=n).match(ue))?o[1].replace(me,"'"):a;var r=X[s];if(r)return null!=i&&i.useAdditionalWeekYearTokens||-1===ie.indexOf(n)||ne(n,t,String(e)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==te.indexOf(n))||ne(n,t,String(e)),r(I,n,C.localize,M);if(s.match(be))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return n})).join("")}function ve(e,t){E(2,arguments);var i=B(e),n=B(t);return i.getTime()<n.getTime()}const we=(e,i,n,a)=>0===e.length?t("p",{class:"HistoryEmptyMessage"},F("noHistory",a)):t("div",{class:"HistoryList"},e.map((e=>t("div",{key:e.ProgressId,class:"HistoryListItem "+(i.includes(e.ProgressId)?"Opened":"Closed")},t("header",{class:"HistoryListItemHeader","data-id":e.ProgressId,onClick:n},e.Name,t("button",{class:"EngagementSuiteIconButton ArrowDown"})),t("div",{class:"HistoryListItemBody"},t("div",null,e.Levels.map(((e,i)=>t("div",{class:"HistoryListItemLevelCard"},((e,i,n)=>t("div",{class:"HistoryLevelInfo"},t("span",{class:"Level"},`${F("level",n)} ${i+1}`),t("span",{class:"Status"},((e,t)=>{switch(e){case w.Completed:return F("completed",t);case w.Expired:return F("expired",t);case w.Forfeited:return F("forfeited",t);default:return e}})(e.Status,n)),t("span",{class:"Time"},fe(new Date(e.Time),"LLL d, yyyy HH:mm:ss"))))(e,i,a),(e=>!!e.Rewards&&e.Status===w.Completed)(e)&&((e,i)=>t("div",{class:"HistoryRewardsList"},t("div",{class:"EngagementSuiteIconButton CupRewardList"}),Object.values(e.Rewards).map((e=>((e,i)=>{const n=e.Type===v.Custom,a=n?e.RewardDescription:((e,t)=>{switch(e){case 0:return F("freeSpins",t);case 1:return F("luckyWheel",t);case 2:return F("leaderboard",t);case 3:return F("mission",t)}})(e.Type,i),o=n||e.IsRewarded;return t("div",{class:"HistoryRewardsItem "+(o||n?"IsRewarded":"IsNotRewarded")},t("span",{class:"HistoryRewardsItemName"},a),!n&&t("div",{class:"EngagementSuiteIconButton "+(o?"Check":"Close")}))})(e,i)))))(e,a)))))))))),xe=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),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.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),2===this.activeTab&&this.sendHistoryRequest()},this.toggleChallengeHistory=e=>{const t=e.currentTarget.getAttribute("data-id"),i=this.openedHistoryIds.findIndex((e=>e===t));i>-1?this.openedHistoryIds.splice(i,1):this.openedHistoryIds.push(t),this.openedHistoryIds=[...this.openedHistoryIds]},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1,this.resetNewChallengeLabel.emit("list")},this.handleChallengeClick=e=>{const t=e.currentTarget.getAttribute("data-id");window.postMessage({type:"ChallengeClick",id:t})},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.changeChallengeStatus=e=>{var t,i;e.stopPropagation();const n=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(n))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:n}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:n,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:n}})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.isJoiningToChallenge=void 0,this.inProgressChallenges=void 0,this.pausedChallengeIds=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.activeTab=1,this.historyLoading=!1,this.challengesHistory=void 0,this.openedHistoryIds=[]}handleEvent(e){const{type:t}=null==e?void 0:e.data;"ChallengesHistoryResponse"===t&&(this.openedHistoryIds=[],this.challengesHistory=e.data.data||[],this.historyLoading=!1),"BarChallengesClick"===t&&(this.activeTab=1,this.openedHistoryIds=[])}challengesPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.challengesPropHandler(this.challenges)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}sendHistoryRequest(){this.historyLoading=!0,window.postMessage({type:"ChallengesHistoryRequest"})}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.challenges.filter((e=>e.Status!==k.Expired)).reduce(((t,i)=>{const n=new Date(i.ExpirationTime).getTime()-e;let a="00h:00m:00s";if(n<1)this.removeChallenge(i.Id);else{const{days:e,hours:t,minutes:i,seconds:o}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};a="00"===e?`${t}h:${i}m:${o}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:a})}),{})}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===k.InProgress&&!this.pausedChallengeIds.includes(e.ChallengeId),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===k.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.ChallengeId)}isChallengeCompleted(e){return e.Status===k.Completed||e.Status===k.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===k.Completed)return 100;if(this.isChallengePaused(e)||e.Status===k.PendingLevelReward||e.Status===k.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===x.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===x.Fillup||e.ProgressStatus===x.Completed)).slice(-1)[0];return t?t.ProgressPercentage:i?i.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:i}=e,n=e.Status===k.InProgress||e.Status===k.PendingLevelReward;return t("div",{class:"ChallengeCardHeader"},t("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),e.Status!==k.Completed?t("button",{class:`${n?"EngagementSuiteButton Active":"EngagementSuiteButton"} ${this.isJoiningToChallenge||this.pausedChallengeIds.includes(e.ChallengeId)?"Disabled":""}`,onClick:this.changeChallengeStatus,"data-id":i},F(n?"unjoin":"join",this.language)):null)}getChallengeTemplate(e){const i=e.Status===k.Forfeited,n=this.getChallengeProgress(e),a=this.timers[e.Id],o=n>-1?t("casino-engagement-suite-progress-bar",{clientStylingUrl:this.clientStylingUrl,class:this.device,value:n,disabled:this.isChallengePaused(e)},t("span",{slot:"Title",class:"ChallengeCountdown"},a)):t("span",{class:"ChallengeCountdown"},a);return i?this.getForfeitedChallengeTemplate(e):t("div",{class:this.getChallengeClasses(e),onClick:this.handleChallengeClick,key:e.Id,"data-id":e.Id},this.getChallengeHeaderTemplate(e),o,t("div",{class:"ChallengeLabel "+(e.IsNew?"ShowChallengeLabel":"")},t("span",null,F("new",this.language))))}getForfeitedChallengeTemplate(e){return t("div",{class:"ChallengeCard ForfeitedChallengeCard"},t("div",{class:"ForfeitedChallengeName"},e.ChallengePresentation.PresentationName),t("div",{class:"ForfeitedChallengeInfo"},t("div",null,t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg",alt:"Forfeited"})),t("div",{class:"ForfeitedChallengeMessage"},t("div",null,F("missionHasBeenForfeited",this.language)),t("div",null,F("support",this.language)))))}getHeaderTemplate(){return t("header",{class:"ChallengesListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"ChallengesListPopupHeaderName"},F("missions",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTabTemplate(){return this.challenges.length?t("div",{class:"ChallengesListWrapper"},t("div",{class:"ChallengesList"},[...this.challenges].sort((e=>e.Status===k.InProgress?-1:0)).map((e=>this.getChallengeTemplate(e))))):t("div",{class:"ChallengesListEmpty"},t("h2",null,F("noMissions",this.language)),t("p",null,F("tryOtherGames",this.language)))}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),F("tooltip",this.language)))}getHistoryTabTemplate(){return t("div",{class:"HistoryWrapper"},t("div",{class:"HistoryCols"},t("div",{class:"HistoryColName Level"},F("level",this.language)),t("div",{class:"HistoryColName Status"},F("status",this.language)),t("div",{class:"HistoryColName Time"},F("time",this.language))),this.historyLoading?(e=this.language,t("div",{class:"HistoryLoader"},t("casino-engagement-suite-progress-bar",{indeterminate:!0}),t("span",null,F("loading",e)))):we(this.challengesHistory,this.openedHistoryIds,this.toggleChallengeHistory,this.language));var e}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabsWrapper"},t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},F("missions",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},F("history",this.language))))}getTabsContentTemplate(){return 1===this.activeTab?this.getListTabTemplate():this.getHistoryTabTemplate()}render(){return t("div",{key:"50b676f6394d813aa946ed1fd85e9612ba04a7a1",class:`ChallengesListPopup ${this.device}`},this.getHeaderTemplate(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{challenges:["challengesPropHandler"]}}};var ke,ye;function Ce(){return window.screen.orientation.type.includes("portrait")?"Portrait":"Landscape"}xe.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.CupRewardList{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg) no-repeat}.EngagementSuiteIconButton.Check{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.EngagementSuiteIconButton.ArrowDown{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesListPopupHeader .EngagementSuiteIconButton{cursor:pointer}.ChallengesListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:12px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.ChallengeCard.InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, 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}.ForfeitedChallengeCard{cursor:default}.ChallengeName,.ForfeitedChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.ForfeitedChallengeName,.ForfeitedChallengeMessage{color:var(--emw--color-gray-150, #8F8B9C)}.ForfeitedChallengeInfo{margin-top:14px;display:flex;gap:4px}.ForfeitedChallengeMessage{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:15px}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, 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}.EngagementSuiteButton.Active::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:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 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:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.EngagementSuiteTabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.EngagementSuiteTabsWrapper{padding:0 20px;margin:8px 0}.EngagementSuiteTabsWrapper .EngagementSuiteTabs{display:flex;position:relative}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-secondary, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-150, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .EngagementSuiteIconButton.ArrowDown{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .EngagementSuiteIconButton.ArrowDown{transition:transform 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:90px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:100px}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-gray-300, #666178)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Tablet .ChallengesListPopupHeader .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .ChallengesListPopupHeader .EngagementSuiteIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengesListEmpty,.ChallengesListPopup.Desktop .ChallengesListEmpty{padding:40px 65px}.ChallengesListPopup.Tablet .ChallengesListEmpty h2,.ChallengesListPopup.Desktop .ChallengesListEmpty h2{margin-bottom:32px;font-size:var(--emw--font-size-large-plus, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Tablet .ForfeitedChallengeName,.ChallengesListPopup.Desktop .ChallengeName,.ChallengesListPopup.Desktop .ForfeitedChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengesListPopup.Tablet .ForfeitedChallengeMessage,.ChallengesListPopup.Desktop .ForfeitedChallengeMessage{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteButton,.ChallengesListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengesListPopup.Tablet .EngagementSuiteTooltipBackdrop,.ChallengesListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.ChallengesListPopup.Tablet .EngagementSuiteTooltip,.ChallengesListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{cursor:pointer;padding:17px 5px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList{height:24px;flex-basis:24px}',function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(ke||(ke={})),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",e[e.Forfeited=5]="Forfeited"}(ye||(ye={}));const Fe="TARGET_MODAL",Se=class{constructor(t){e(this,t),this.openModal=i(this,"openModal",7),this.closeModal=i(this,"closeModal",7),this.handlePopupClose=(e,t)=>()=>{"showChallengesList"===e&&this.isForfeitedChallengeLabel&&(this.isForfeitedChallengeLabel=!1,this.setChallengePercent()),this[e]=!1,this[t]=!1,this.activeWidget=""},this.handleJackpotsPopupClose=()=>{this.showJackpotsList=!1,this.showJackpotDetails=!1,this.activeWidget=""},this.handleChallengePopupBack=()=>{this.showChallengeDetails=!1,this.showChallengesList=!0},this.handleFreeSpinsPopupBack=()=>{this.showFreeSpinsDetails=!1,this.showFreeSpinsList=!0},this.handleResetNewChallengeLabel=e=>{if(this.challenges){if("list"===e.detail)this.challenges.forEach((e=>e.IsNew=!1)),this.isChallengeLabel=!1;else{const t=this.challenges.find((t=>t.Id===e.detail));t&&(t.IsNew=!1)}this.challenges=[...this.challenges]}},this.handleJackpotPopupBack=()=>{this.showJackpotDetails=!1,this.showJackpotsList=!0},this.orientationChangeHandler=()=>{this.orientation=Ce(),this.barHeight=this.barWrapperEl.offsetHeight},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.jackpotChangeStatusRequest=e=>{e.stopPropagation();const t=e.currentTarget.getAttribute("data-id");if(this.jackpots=this.jackpots.map((e=>String(t)===String(e.JackpotId)?Object.assign(Object.assign({},e),{Pending:!0}):e)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}const i=this.jackpots.reduce(((e,t)=>(e[t.JackpotId]=t.Pending?!t.Enabled:t.Enabled,e)),{});window.postMessage({type:"JackpotChangeStatusRequest",data:i})},this.onLeaderboardsClose=()=>{this.showLeaderboardWidget=!1,this.activeWidget=""},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.orientation="Landscape",this.device="Mobile",this.showChallengesList=!1,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showFreeSpinsDetails=!1,this.showJackpotDetails=!1,this.showLeaderboardWidget=!1,this.challengePercent=void 0,this.remainingFreeSpins=void 0,this.highlightChallenge=!1,this.limitStylingAppends=!1,this.activeWidget=void 0,this.challenges=void 0,this.inProgressChallenges=void 0,this.jackpots=[],this.freeSpins=void 0,this.leaderboards=void 0,this.gameSlug="",this.pausedChallengeIds=[],this.isChallengeLabel=!1,this.isForfeitedSpinsLabel=!1,this.isForfeitedChallengeLabel=!1,this.isJoiningToChallenge=!1,this.selectedChallenge=void 0,this.selectedJackpot=void 0,this.selectedSpin=void 0,this.selectedSpinId=void 0,this.selectedChallengeId=void 0,this.selectedJackpotId=void 0,this.barHeight=0}handleEvent(e){var t;const i=null==e?void 0:e.data,{type:n}=i,a=o(i,["type"]);switch(n){case"ChallengeGrant":{const t=e.data.data.challengeProgressData[0],i=this.challenges.findIndex((e=>J(new Date(e.ExpirationTime),new Date(t.ExpirationTime))>0));i>-1?this.challenges.splice(i,0,t):this.challenges.push(t),this.challenges=[...this.challenges],this.isChallengeLabel=!0;break}case"CampaignGrant":this.grantFreeSpinCampaigns(e.data.data);break;case"ForfeitCampaign":{const t=e.data.data.toString();this.freeSpins.find((e=>e.Id===t)).IsForfeited=!0,this.freeSpins=[...this.freeSpins],this.isForfeitedSpinsLabel=!0,this.setRemainingFreeSpins();break}case"ChallengeForfeitNotification":{const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.ChallengeId===e.data.data.ChallengeId));i&&(i.Status=5,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))],this.challenges=[...this.challenges],this.isForfeitedChallengeLabel=!0,this.setSelectedChallenge(),this.setChallengePercent());break}case"ChallengeHasExpired":{const t=e.data.id,i=this.inProgressChallenges.findIndex((e=>e===t));i>-1&&this.inProgressChallenges.splice(i,1),this.setChallengePercent();break}case"FreeSpinHasExpired":this.setRemainingFreeSpins();break;case"BarLeaderboardsClick":this.showLeaderboardWidget=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.activeWidget="Leaderboards";break;case"BarChallengesClick":this.showChallengesList=!0,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="Challenges",this.isChallengeLabel=!1;break;case"BarFreeSpinsClick":this.showFreeSpinsList=!0,this.showChallengesList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.isForfeitedSpinsLabel=!1,this.activeWidget="FreeSpins";break;case"BarJackpotsClick":this.showJackpotsList=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="Jackpots";break;case"ChallengeClick":this.selectedChallengeId=e.data.id,this.selectedChallenge=this.challenges.find((e=>e.Id===this.selectedChallengeId)),this.isChallengeLabel=!1,this.showChallengesList=!1,this.showChallengeDetails=!0;break;case"FreeSpinClick":this.selectedSpinId=e.data.id,this.selectedSpin=this.freeSpins.find((e=>e.AwardBonusId===this.selectedSpinId)),this.isForfeitedSpinsLabel=!1,this.showFreeSpinsList=!1,this.showFreeSpinsDetails=!0;break;case"JackpotClick":this.selectedJackpotId=e.data.id,this.selectedJackpot=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId)),this.showJackpotsList=!1,this.showJackpotDetails=!0;break;case"UpdateChallengeProgress":this.updateChallengeProgress(e.data.data);break;case"UpdateFreeSpinsProgress":this.updateFreeSpinsProgress(e.data.data);break;case"ChallengeChangeStatusNotification":{const{IsEnabled:t,ChallengeId:i}=e.data.data;this.pausedChallengeIds=t||this.pausedChallengeIds.includes(i)?this.pausedChallengeIds.filter((e=>e!==i)):[...this.pausedChallengeIds,i];break}case"ShowChallengeRewardModal":{const{ChallengeId:e,LevelId:t,HasError:i,ProcessedRewards:n}=a.data,o={modalType:(null==n?void 0:n.length)?"REWARD_MODAL":"SUPPORT_MODAL",rewardMessage:this.getRewardMessage(e,t),hasError:i};this.openModal.emit(o);break}case"ShowConfirmationModal":this.openModal.emit({modalType:Fe,confirmationData:a});break;case"ChallengeJoinRequest":this.isJoiningToChallenge=!0;break;case"JoinChallengeResult":{const{Success:t,JoinId:i,UnjoinId:n}=e.data.data;if(t){i&&this.updateChallengeStatus(i,1,!0),n&&this.updateChallengeStatus(n,0,!1),this.challenges=[...this.challenges];const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));this.selectedChallenge=Object.assign({},e)}this.isJoiningToChallenge=!1,this.closeModal.emit(Fe),this.setChallengePercent();break}case"ShowJackpotRewardModal":{const{Amount:t,Currency:i}=e.data.data;this.openModal.emit({modalType:"JACKPOT_REWARD_MODAL",winAmount:{amount:t,currency:i}});break}case"UpdateJackpotBalance":this.updateJackpotBalance(e.data.data);break;case"UpdateJackpotStatus":this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":this.joinJackpotResult(e.data.data)}}componentDidLoad(){this.orientation=Ce(),this.device=function(){const e=navigator.userAgent.toLowerCase(),t=screen.availWidth,i=screen.availHeight;if(e.includes("iphone"))return"Mobile";if(e.includes("ipad"))return"Tablet";if(e.includes("android")){if(i>t&&t<800)return"Mobile";if(t>i&&i<800)return"Tablet"}return"Desktop"}(),window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),this.barHeight=this.barWrapperEl.offsetHeight}disconnectedCallback(){window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}async init(e){var t;this.challenges=e.challenges,this.inProgressChallenges=null===(t=e.challenges)||void 0===t?void 0:t.filter((e=>e.Status===ye.InProgress||e.Status===ye.PendingLevelReward)).map((e=>e.Id)),this.leaderboards=e.leaderboards,this.jackpots=e.jackpots||[],this.freeSpins=e.freeSpins,this.gameSlug=e.slug,this.setChallengePercent(),this.setChallengeLabel(),this.setRemainingFreeSpins(),this.setSpinsForfeitedLabel()}setChallengeLabel(){this.challenges&&(this.isChallengeLabel=!!this.challenges.filter((e=>e.IsNew)).length)}setSpinsForfeitedLabel(){var e;this.freeSpins&&(this.isForfeitedSpinsLabel=!!(null===(e=this.freeSpins)||void 0===e?void 0:e.filter((e=>e.IsForfeited)).length))}setChallengePercent(){if(!this.challenges)return;this.highlightChallenge=this.isForfeitedChallengeLabel;const e=this.challenges.find((e=>e.Status===ye.InProgress));if(e){const t=e.LevelProgresses.find((e=>e.ProgressStatus===ke.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===ke.Fillup||e.ProgressStatus===ke.Completed)).slice(-1)[0];this.highlightChallenge=e.LevelProgresses.every((e=>100===e.ProgressPercentage))||this.isForfeitedChallengeLabel,this.challengePercent=t?`${t.ProgressPercentage}%`:i?`${i.ProgressPercentage}%`:"0%"}else this.challengePercent="—"}setRemainingFreeSpins(){this.freeSpins&&(this.remainingFreeSpins=this.freeSpins.length?this.freeSpins.filter((e=>!e.IsForfeited)).reduce(((e,t)=>e+(t.NumberOfFreeSpins-t.NumberOfUsedFreeSpins)),0).toString():"—")}updateChallengeProgress(e){var t;const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.ChallengeId===e.ChallengeId));i&&(e.Status===ye.Completed&&(i.Status=e.Status,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))]),i.LevelProgresses=i.LevelProgresses.map((t=>{var i;const n=null===(i=e.Levels)||void 0===i?void 0:i.find((e=>e.LevelId===t.LevelId));return n?Object.assign(Object.assign({},t),{ProgressPercentage:n.ProgressPercentage,ProgressStatus:n.ProgressStatus}):t})),this.challenges=[...this.challenges]),this.setSelectedChallenge(),this.setChallengePercent()}setSelectedChallenge(){if(this.showChallengeDetails){const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));e&&(this.selectedChallenge=Object.assign({},e))}}updateFreeSpinsProgress(e){var t;const i=null===(t=this.freeSpins)||void 0===t?void 0:t.find((t=>t.AwardBonusId===e.AwardBonusId));if(i&&(i.NumberOfUsedFreeSpins=e.NumberOfUsedFreeSpins,i.VendorFreeSpinsRemainingCost=e.VendorFreeSpinsRemainingCost,this.freeSpins=[...this.freeSpins]),this.showFreeSpinsDetails&&this.selectedSpinId===e.AwardBonusId){const e=this.freeSpins.find((e=>e.AwardBonusId===this.selectedSpinId));e&&(this.selectedSpin=Object.assign({},e))}this.setRemainingFreeSpins()}updateChallengeStatus(e,t,i){var n;const a=null===(n=this.challenges)||void 0===n?void 0:n.find((t=>t.Id===e));a&&(a.Status=t,this.inProgressChallenges=i?[...this.inProgressChallenges,a.Id]:this.inProgressChallenges.filter((e=>e!==a.Id)))}updateJackpotBalance(e){if(this.jackpots=this.jackpots.map((t=>{const i=e.find((e=>e.JackpotId===t.JackpotId));return i?Object.assign(Object.assign({},t),{Balance:i.Balance,WinBalance:i.WinBalance}):t})),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}updateJackpotStatus(e){if(this.jackpots=this.jackpots.map((t=>String(t.JackpotId)===String(e.JackpotId)?Object.assign(Object.assign({},t),{IsClosed:e.IsClosed,JackpotEndTime:e.JackpotEndTime,Reason:e.Reason}):t)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}joinJackpotResult(e){if(e.Success){const t=Object.keys(e.JackpotIds);if(t.length>0&&(this.jackpots=this.jackpots.map((i=>{const n=t.find((e=>String(e)===String(i.JackpotId)));return n?Object.assign(Object.assign(Object.assign({},i),i.Enabled!==e.JackpotIds[n]&&{Pending:!1}),{Enabled:e.JackpotIds[n]}):i}))),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}}grantFreeSpinCampaigns(e){e.forEach((e=>{const t=this.freeSpins.findIndex((t=>J(new Date(t.ExpiryDate),new Date(e.ExpiryDate))>0));t>-1?this.freeSpins.splice(t,0,e):this.freeSpins.push(e),this.freeSpins=[...this.freeSpins]})),this.setRemainingFreeSpins()}getChallengesWidgets(){return t("div",null,t("div",{class:this.showChallengesList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-challenges-list",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onResetNewChallengeLabel:this.handleResetNewChallengeLabel,onClose:this.handlePopupClose("showChallengesList","showChallengeDetails"),challenges:this.challenges,inProgressChallenges:this.inProgressChallenges,isJoiningToChallenge:this.isJoiningToChallenge,pausedChallengeIds:this.pausedChallengeIds})),t("div",{class:this.showChallengeDetails?"Backdrop Opened":"Backdrop"},this.showChallengeDetails&&t("casino-engagement-suite-challenges-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onResetNewChallengeLabel:this.handleResetNewChallengeLabel,onBack:this.handleChallengePopupBack,onClose:this.handlePopupClose("showChallengesList","showChallengeDetails"),"game-slug":this.gameSlug,challenge:this.selectedChallenge,inProgressChallenges:this.inProgressChallenges,isJoiningToChallenge:this.isJoiningToChallenge,pausedChallengeIds:this.pausedChallengeIds})))}getLeaderboardsWidgets(){return t("div",{class:this.showLeaderboardWidget?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-tournament",{device:this.device,class:"CasinoEngagementSuiteDialog",leaderboardsInit:this.leaderboards,show:this.showLeaderboardWidget,onClose:this.onLeaderboardsClose}))}getFreeSpinWidgets(){return t("div",null,t("div",{class:this.showFreeSpinsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-free-spins-list",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),freeSpins:this.freeSpins})),t("div",{class:this.showFreeSpinsDetails?"Backdrop Opened":"Backdrop"},this.showFreeSpinsDetails&&t("casino-engagement-suite-free-spins-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleFreeSpinsPopupBack,onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),"game-slug":this.gameSlug,spin:this.selectedSpin})))}getJackpotsWidgets(){return t("div",null,t("div",{class:this.showJackpotsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-jackpots-list",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handleJackpotsPopupClose,jackpots:this.jackpots,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})),this.showJackpotDetails&&t("div",{class:"Backdrop Opened"},t("casino-engagement-suite-jackpot-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleJackpotPopupBack,onClose:this.handleJackpotsPopupClose,"game-slug":this.gameSlug,jackpot:this.selectedJackpot,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})))}getRewardMessage(e,t){var i,n,a,o;return(null===(o=null===(a=null===(n=null===(i=this.challenges)||void 0===i?void 0:i.find((t=>t.Id===e)))||void 0===n?void 0:n.LevelProgresses)||void 0===a?void 0:a.find((e=>e.LevelId===t)))||void 0===o?void 0:o.CustomRewardMessage)||""}render(){return t("div",{key:"677ecd024cb3f68d47a92a6fde92d8c827b3ddbb",class:`CasinoEngagementSuiteContainer ${this.device} ${this.orientation}`,style:{"--barHeight":`${this.barHeight}px`}},t("div",{key:"bd7a0ca1fad37a4067ea1a21741a46142eb4945c",class:"barWrapper",ref:e=>this.barWrapperEl=e},t("casino-engagement-suite-bar",{key:"6b084943b35f61ec15fdfa5d465974103c69ddba",clientStylingUrl:this.clientStylingUrl,orientation:this.orientation,device:this.device,"active-widget":this.activeWidget,"is-challenge-label":this.isChallengeLabel,"is-spin-forfeited-label":this.isForfeitedSpinsLabel,leaderboards:this.leaderboards,jackpots:this.jackpots,remainingFreeSpins:this.remainingFreeSpins,highlightChallenge:this.highlightChallenge,"challenge-percent":this.challengePercent,"is-forfeited-challenge-label":this.isForfeitedChallengeLabel})),this.challenges&&this.getChallengesWidgets(),this.freeSpins&&this.getFreeSpinWidgets(),!!this.jackpots.length&&this.getJackpotsWidgets(),this.leaderboards&&this.getLeaderboardsWidgets(),t("casino-engagement-suite-modal-container",{key:"40988693c63f8422b428eb2dd353dc355ffbd604",clientStylingUrl:this.clientStylingUrl,device:this.device,isJoiningToChallenge:this.isJoiningToChallenge}))}get host(){return n(this)}};Se.style=":host{display:inline-block;font-family:inherit}.Backdrop{padding:20px 20px 20px 172px;display:none;position:fixed;inset:0;height:100dvh;width:100vw}.Backdrop.Opened{display:block}.Backdrop .CasinoEngagementSuiteDialog{height:calc(100dvh - 40px);max-width:600px}.CasinoEngagementSuiteContainer.Portrait{width:100vw}.CasinoEngagementSuiteContainer.Portrait .Backdrop{padding:calc(var(--barHeight) + 12px) 0 20px}.CasinoEngagementSuiteContainer.Portrait .Backdrop .CasinoEngagementSuiteDialog{max-width:initial;padding:0 4px;margin:0 auto;height:calc(100dvh - (var(--barHeight) + 20px))}.CasinoEngagementSuiteContainer.Landscape.Mobile .CasinoEngagementSuiteDialog{max-width:366px}.CasinoEngagementSuiteContainer.Landscape.Desktop .Backdrop{padding-left:272px}";const Le=["en"],Ee={en:{freeSpins:"Free Spins",details:"Free Spins Details",tc:"Terms & Conditions",quantityGranted:"Quantity Granted",quantityLeft:"Quantity Left",valueGranted:"Value Granted",valueLeft:"Value Left",info:"Info",games:"Games",loadMore:"Load More"}},Be=(e,t)=>{const i=t;return Ee[void 0!==i&&Le.includes(i)?i:"en"][e]},De=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.maxVisibleGames=0,this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),this.visibleGames=[],this.maxVisibleGames=0},this.handleLoadMore=()=>{this.visibleGames=this.spin.GamesInfo.slice(0,this.visibleGames.length+this.maxVisibleGames)},this.toggleShowDetails=()=>{this.showDetails=!this.showDetails},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.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()},this.clientStyling="",this.clientStylingUrl="",this.spin=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.isJoiningToChallenge=void 0,this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.activeTab=1,this.visibleGames=[],this.tooltip=!1}componentWillLoad(){this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,t),this.visibleGames=this.spin.GamesInfo.slice(0,this.maxVisibleGames)}getActionsTemplate(){return t("header",{class:"FreeSpinsActions"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),"Mobile"!==this.device&&t("div",{class:"FreeSpinsPopupName"},Be("freeSpins",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getFreeSpinsHeader(){const{VendorName:e,NumberOfFreeSpins:i,NumberOfUsedFreeSpins:n}=this.spin;return t("div",{class:"FreeSpinsDetailsHeader"},t("span",{class:"FreeSpinsName"},e),t("div",{class:"FreeSpinsCounter"},t("div",{class:"FreeSpinsHighlightedCounter"},i-n),"/",i))}getFreeSpinsCountdown(){const e=this.isExpiredChallenge?"Expired":this.timer,{VendorFreeSpinsCost:i,VendorFreeSpinsRemainingCost:n,CurrencySymbol:a}=this.spin;return t("div",{class:"FreeSpinsCountdown "+(this.isExpiredChallenge?"Expired":"")},e,t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},a,n),"/",a,i))}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},Be("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},Be("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getSpinInfoTemplate():this.getGamesTemplate()}getSpinsDetailsTemplate(){return t("div",null,t("div",{class:"FreeSpinsDetailsButton",onClick:this.toggleShowDetails},t("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,Be("details",this.language))),this.showDetails&&t("p",{class:"FreeSpinsDescription"},this.spin.FreeSpinCampaignPresentation.Description))}getSpinInfoTemplate(){var e;const{NumberOfFreeSpins:i,NumberOfUsedFreeSpins:n,VendorFreeSpinsCost:a,CurrencySymbol:o,VendorFreeSpinsRemainingCost:s}=this.spin,r="GreenTube"===(null===(e=this.spin)||void 0===e?void 0:e.VendorName);return t("div",null,this.spin.FreeSpinCampaignPresentation.Description&&this.getSpinsDetailsTemplate(),t("div",{class:"FreeSpinsInfo"},t("div",{class:"FreeSpinsInfoItem"},Be("quantityGranted",this.language),": ",t("span",null,i)),t("div",{class:"FreeSpinsInfoItem"},Be("quantityLeft",this.language),": ",t("span",null,i-n)),t("div",{class:"FreeSpinsInfoItem"},Be("valueGranted",this.language),": ",t("span",null,o,a),r&&t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"})),t("div",{class:"FreeSpinsInfoItem"},Be("valueLeft",this.language),": ",t("span",null,o,s)),this.spin.FreeSpinCampaignPresentation.Url&&t("div",{class:"FreeSpinsInfoItem"},t("a",{class:"tc",href:this.spin.FreeSpinCampaignPresentation.Url,target:"_blank"},Be("tc",this.language)))))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),Be("tooltip",this.language))):""}getGamesTemplate(){const e=this.visibleGames.map((e=>t("div",{onClick:this.onGameClick,class:"FreeSpinsGamesListItem "+(e.GameSlug===this.gameSlug?"Disabled":""),key:e.CasinoGameId,"data-slug":e.GameSlug,style:{background:`center / cover url(${e.GameIcon}) no-repeat`},title:e.GameName})));return[t("div",{class:"FreeSpinsGamesListWrapper",ref:e=>this.gamesListWrapperEl=e},t("div",{class:"FreeSpinsGamesList"},e)),this.visibleGames.length<this.spin.GamesInfo.length?t("button",{class:"EngagementSuiteButton Active FreeSpinsGamesButton",onClick:this.handleLoadMore},Be("loadMore",this.language)):""]}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.spin.ExpiryDate).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:n,seconds:a}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${a}s`:`${t}d:${i}h:${n}m`}render(){return t("div",{key:"8e18e09a7a5ccced2b428a66536c95fb066a6104",class:`FreeSpinsDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{key:"0ff40b667483cea805a146aca78f0af18ec07a71",class:"FreeSpinsDetails"},this.getFreeSpinsHeader(),this.getFreeSpinsCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.getTooltipTemplate()))}get host(){return n(this)}};De.style=':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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.FreeSpinsDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.FreeSpinsDetailsPopup.Disabled .FreeSpinsDetailsHeader{opacity:0.5}.FreeSpinsDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.FreeSpinsDetailsPopup.Disabled .FreeSpinsInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsDetails{overflow:hidden;height:100%;display:flex;flex-direction:column}.FreeSpinsActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsActions .FreeSpinsPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px}.FreeSpinsInfo .EngagementSuiteIconButton{margin-left:5px;width:17px;height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.FreeSpinsDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.FreeSpinsDetails::-webkit-scrollbar{display:none}.FreeSpinsDetailsHeader{display:flex;justify-content:space-between;gap:12px;min-width:0;align-items:flex-end}.FreeSpinsDetailsHeader .FreeSpinsName{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-all;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, 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}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, 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;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.FreeSpinsCountdown{display:flex;justify-content:space-between;font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin:12px 0 24px;color:var(--emw--color-secondary, #BBB9C3)}.FreeSpinsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.FreeSpinsCounter{display:flex;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.FreeSpinsCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs{margin:20px 0 12px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.FreeSpinsInfoItem{display:flex;align-items:center;margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.FreeSpinsInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.FreeSpinsInfoItem .tc{color:var(--emw--color-contrast, #59D1FF)}.FreeSpinsDetailsButton{margin-bottom:14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.FreeSpinsDetailsButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.FreeSpinsDetailsButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.FreeSpinsDetailsButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.FreeSpinsDescription{margin-bottom:20px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-medium, 16px);line-height:17px}.FreeSpinsGamesListWrapper{overflow:auto;flex-grow:1}.FreeSpinsGamesList{display:flex;gap:10px;flex-wrap:wrap}.FreeSpinsGamesList .FreeSpinsGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.FreeSpinsGamesList .FreeSpinsGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ShowDetails{display:block}.FreeSpinsGamesButton{margin-top:12px;align-self:center;min-width:140px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsActions,.FreeSpinsDetailsPopup.Desktop .FreeSpinsActions{padding-top:16px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip{padding:24px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsDetails,.FreeSpinsDetailsPopup.Desktop .FreeSpinsDetails{padding:20px 24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsName,.FreeSpinsDetailsPopup.Desktop .FreeSpinsName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.FreeSpinsDetailsPopup.Tablet .FreeSpinsCountdown,.FreeSpinsDetailsPopup.Desktop .FreeSpinsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsCollapseButton,.FreeSpinsDetailsPopup.Desktop .FreeSpinsCollapseButton{margin-bottom:12px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteButton{min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsInfoItem,.FreeSpinsDetailsPopup.Desktop .FreeSpinsInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}';const Te=["en"],Pe={en:{freeSpins:"Free Spins",tooltip:"Spin the game reels without using your own money",noSpins:"No FreeSpins yet\n",tryOtherGames:"Try winning FreeSpins as rewards or playing other booster games",new:"new",forfeited:"The campaign has been canceled.",support:"Please, contact support."}},Je=(e,t)=>{const i=t;return Pe[void 0!==i&&Te.includes(i)?i:"en"][e]},Ie=class{constructor(t){e(this,t),this.close=i(this,"close",7),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.newSpinIds=[]},this.handleSpinClick=e=>{const t=e.currentTarget.getAttribute("data-id");window.postMessage({type:"FreeSpinClick",id:t}),this.newSpinIds=this.newSpinIds.filter((e=>e!==t))},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.freeSpins=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newSpinIds=[]}spinsPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.spinsPropHandler(this.freeSpins)}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.freeSpins.reduce(((t,i)=>{const n=new Date(i.ExpiryDate).getTime()-e;let a="00h:00m:00s";if(n<1)this.removeFreeSpin(i.AwardBonusId);else{const{days:e,hours:t,minutes:i,seconds:o}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};a="00"===e?`${t}h:${i}m:${o}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.AwardBonusId]:a})}),{})}removeFreeSpin(e){const t=this.freeSpins.findIndex((t=>t.AwardBonusId===e));t>-1&&(this.freeSpins.splice(t,1),window.postMessage({type:"FreeSpinHasExpired",awardBonusId:e}))}getFreeSpinClasses(e){return{FreeSpinsCard:!0,Forfeited:e.IsForfeited,FreeSpinsEmptyNumber:e.NumberOfFreeSpins===e.NumberOfUsedFreeSpins}}getChallengeHeaderTemplate(e){const{VendorName:i,NumberOfUsedFreeSpins:n,NumberOfFreeSpins:a,IsForfeited:o}=e,s=a-n;return t("div",{class:"FreeSpinsCardHeader"},t("div",{class:"FreeSpinsName "+(o?"Forfeited":"")},i),o?null:t("div",{class:"FreeSpinsCounter"},t("div",{class:s?"FreeSpinsHighlightedCounter":"FreeSpinsEmptyCounter"},s),"/",a))}getFreeSpinTemplate(e){const i=this.timers[e.AwardBonusId],{VendorFreeSpinsRemainingCost:n,VendorFreeSpinsCost:a,CurrencySymbol:o,IsForfeited:s}=e,r=this.newSpinIds.includes(e.AwardBonusId);return t("div",{class:this.getFreeSpinClasses(e),onClick:this.handleSpinClick,key:e.AwardBonusId,"data-id":e.AwardBonusId},s?null:t("div",{class:"SpinLabel "+(r?"ShowSpinLabel":"")},t("span",null,Je("new",this.language))),this.getChallengeHeaderTemplate(e),s?t("div",{class:"ForfeitedMessage"},t("div",null,Je("forfeited",this.language)),t("div",null,Je("support",this.language))):t("div",{class:"FreeSpinsCountdownWrapper"},t("span",{class:"FreeSpinsCountdown"},i),t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},o,n),"/",o,a)))}getHeaderTemplate(){return t("header",{class:"FreeSpinsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"FreeSpinsListPopupHeaderName"},Je("freeSpins",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){return this.freeSpins.length?t("div",{class:"FreeSpinsListWrapper"},t("div",{class:"FreeSpinsList"},this.freeSpins.map((e=>this.getFreeSpinTemplate(e))))):t("div",{class:"FreeSpinsListEmpty"},t("h2",null,Je("noSpins",this.language)),t("p",null,Je("tryOtherGames",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),Je("tooltip",this.language))):""}render(){return t("div",{key:"9c101942a2d381d77e82ec49a0f33bb34e5f5191",class:`FreeSpinsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{freeSpins:["spinsPropHandler"]}}};Ie.style=':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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.FreeSpinsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.FreeSpinsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.FreeSpinsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.FreeSpinsListWrapper::-webkit-scrollbar{display:none}.FreeSpinsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.FreeSpinsRowWrapper{display:flex;justify-content:space-between;min-width:0}.FreeSpinsCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.FreeSpinsCard.Forfeited{cursor:auto;pointer-events:none}.FreeSpinsCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px;flex:1;min-width:0;align-items:flex-end}.FreeSpinsName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.FreeSpinsName.Forfeited{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsCounter{display:flex;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsHighlightedCounter,.FreeSpinsEmptyCounter{font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.FreeSpinsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.FreeSpinsEmptyCounter{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsListEmpty{padding:20px 32px}.FreeSpinsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #FFFFFF)}.FreeSpinsListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3)}.FreeSpinsCountdownWrapper{display:flex;justify-content:space-between;align-items:flex-start}.FreeSpinsCountdown,.ForfeitedMessage{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ForfeitedMessage{line-height:1.2}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.SpinLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.SpinLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowSpinLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.FreeSpinsEmptyNumber .FreeSpinsName,.FreeSpinsEmptyNumber .FreeSpinsCountdown,.FreeSpinsEmptyNumber .FreeSpinsRemainCounter{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeader,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeader{padding-top:16px}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeaderName,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.FreeSpinsListPopup.Tablet .EngagementSuiteIconButton,.FreeSpinsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.FreeSpinsListPopup.Tablet .FreeSpinsList,.FreeSpinsListPopup.Desktop .FreeSpinsList{padding:20px 24px 0;row-gap:20px}.FreeSpinsListPopup.Tablet .ChallengeCardHeader,.FreeSpinsListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.FreeSpinsListPopup.Tablet .FreeSpinsName,.FreeSpinsListPopup.Desktop .FreeSpinsName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.FreeSpinsListPopup.Tablet .FreeSpinsCountdown,.FreeSpinsListPopup.Desktop .FreeSpinsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.FreeSpinsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.FreeSpinsListPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}';const Me=["en"],ze={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",betContribution:"Bet Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot is won!",loadMore:"Load More",jackpotDetails:"Jackpot Details",minBet:"Min Bet",maxBet:"Max Bet",Suspended:"Suspended",Closed:"Closed",betContributionTooltip:"A % of the bet that will be added to jackpot funds (current and next jackpot amounts).",operatorContributionTooltip:"This jackpot is covered by the casino.",partialWins:"Partial wins",gameLimit:"Full game list in Terms and Conditions \n or Contact Support"}},He=(e,t)=>{const i=t;return ze[void 0!==i&&Me.includes(i)?i:"en"][e]};function Re(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}const je=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.maxVisibleGames=0,this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),this.visibleGames=[],this.maxVisibleGames=0},this.handleLoadMore=()=>{this.visibleGames=this.jackpot.GamesInfo.slice(0,this.visibleGames.length+this.maxVisibleGames)},this.toggleShowDetails=()=>{this.showDetails=!this.showDetails},this.toggleTooltip=e=>{if(this.tooltip)this.tooltip="";else{const t=e.currentTarget.getAttribute("data-tooltip");this.tooltip=He(t,this.language)}},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.handleBackClick=()=>{this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.clientStyling="",this.clientStylingUrl="",this.jackpot=void 0,this.jackpotChangeStatusRequest=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.enabled=!1,this.balance=void 0,this.winBalance=void 0,this.showDetails=!1,this.jackpotEndTime="",this.tooltip="",this.partialWins=""}handleEvent(e){const{type:t,data:i}=null==e?void 0:e.data;switch(t){case"UpdateJackpotStatus":this.jackpot.JackpotId===e.data.data.JackpotId&&this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":i.Success&&this.jackpot.JackpotId in i.JackpotIds&&(this.enabled=this.jackpot.Enabled=i.JackpotIds[this.jackpot.JackpotId])}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames(),this.tooltip=""}componentWillLoad(){this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance,this.jackpotEndTime=this.jackpot.JackpotEndTime,this.disabledStatus=this.jackpot.Reason||"",this.partialWins=this.formatPartHits(this.jackpot.PartHits),this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}formatPartHits(e){return e.filter((e=>100!==e)).sort(((e,t)=>t-e)).map((e=>`${e}%`)).join(", ")}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,t),this.visibleGames=this.jackpot.GamesInfo.slice(0,this.maxVisibleGames)}updateJackpotStatus(e){e.IsClosed?(this.clearInterval(),this.disabledStatus=e.Reason,this.activeTab=1):(this.disabledStatus="",this.jackpotEndTime=e.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return t("div",{class:"JackpotDetailsNavigation"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),t("div",{class:"JackpotPopupName"},He("jackpots",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getJackpotBalance(){return Re(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{EngagementSuiteButton:!0,Active:this.enabled,Loading:this.jackpot.Pending}}getJackpotDetailsHeaderTemplate(){const e=ve(new Date(this.jackpot.JackpotEndTime),new Date)||!!this.disabledStatus;return t("div",{class:"JackpotDetailsHeader"},t("div",null,t("div",{class:"JackpotType"},this.jackpot.Type),t("div",{class:"JackpotBalance"},this.getJackpotBalance())),t("div",{class:"JackpotDetailsHeaderSecondCol"},t("button",{disabled:e,onClick:this.jackpotChangeStatusRequest,class:this.getJoinButtonClasses(),"data-id":this.jackpot.JackpotId},He(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&t("div",{class:"JackpotIsWon"},He("jackpotIsWon",this.language))))}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},He("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},He("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getJackpotInfoTemplate():this.getGamesTemplate()}getJackpotDetailsTemplate(){return t("div",null,t("div",{class:"JackpotDetailsButton",onClick:this.toggleShowDetails},t("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,He("jackpotDetails",this.language))),this.showDetails&&t("div",{class:"JackpotDetailsContent"},this.jackpot.Description&&t("p",{class:"JackpotDescription"},this.jackpot.Description),this.jackpot.JackpotRulesUrl&&t("a",{class:"TermsAndConditions",href:this.jackpot.JackpotRulesUrl,target:"_blank"},He("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var e,i,n,a;if(this.jackpot.BetLimits){const o=this.jackpot.Currency,s=Object.keys(this.jackpot.BetLimits),r=s.find((e=>e===o))||s[0],l=this.jackpot.BetLimits&&!!(null===(e=this.jackpot.BetLimits[r])||void 0===e?void 0:e.MinBet),p=this.jackpot.BetLimits&&!!(null===(i=this.jackpot.BetLimits[r])||void 0===i?void 0:i.MaxBet),d=Re(null===(n=this.jackpot.BetLimits[r])||void 0===n?void 0:n.MinBet,r),c=Re(null===(a=this.jackpot.BetLimits[r])||void 0===a?void 0:a.MaxBet,r);return t("div",null,l&&t("div",{class:"JackpotInfoItem"},He("minBet",this.language),": ",t("span",null,d)),p&&t("div",{class:"JackpotInfoItem"},He("maxBet",this.language),": ",t("span",null,c)))}}getPartialWins(){return t("div",{class:"JackpotInfoItem"},t("div",{class:"JackpotInfoItemProperty"},He("partialWins",this.language),": "),t("span",null,this.partialWins))}getJackpotInfoTemplate(){var e;return t("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),t("div",{class:"JackpotInfo"},"Static"!==this.jackpot.JackpotTypePresentation&&t("div",{class:"JackpotInfoItem"},He("betContribution",this.language),": ",t("span",null,+this.jackpot.ContributionPercent,"%"),t("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"betContributionTooltip",onClick:this.toggleTooltip})),t("div",{class:"JackpotInfoItem"},He("type",this.language),": ",t("span",null,this.jackpot.JackpotTypePresentation)),t("div",{class:"JackpotInfoItem"},He("winningProbability",this.language),": ",t("span",null,"1:",this.jackpot.Probability)),t("div",{class:"JackpotInfoItem"},He("operatorContribution",this.language),": ",t("span",null,+this.jackpot.OperatorContributionPercent,"%"),t("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"operatorContributionTooltip",onClick:this.toggleTooltip})),this.getBetLimitsRange(),(null===(e=this.jackpot.PartHits)||void 0===e?void 0:e.length)>1&&this.getPartialWins()))}getGamesTemplate(){const e=!!this.jackpot.TotalGamesCount&&this.jackpot.TotalGamesCount>this.jackpot.GamesInfo.length&&this.visibleGames.length===this.jackpot.GamesInfo.length,i=this.visibleGames.map((e=>t("div",{onClick:this.onGameClick,class:"JackpotGamesListItem "+(e.GameSlug===this.gameSlug?"Disabled":""),key:e.CasinoGameId,"data-slug":e.GameSlug,style:{background:`center / cover url(${e.GameIcon}) no-repeat`},title:e.GameName})));return[t("div",{class:"JackpotGamesListWrapper",ref:e=>this.gamesListWrapperEl=e},t("div",{class:"JackpotGamesList"},i),e&&t("div",{class:"GameLimitMessage"},He("gameLimit",this.language))),this.visibleGames.length<this.jackpot.GamesInfo.length?t("button",{class:"EngagementSuiteButton Active JackpotGamesButton",onClick:this.handleLoadMore},He("loadMore",this.language)):""]}getJackpotCountdown(){const e=He(this.disabledStatus,this.language)||this.timer;return t("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},e)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.jackpotEndTime).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:n,seconds:a}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${a}s`:`${t}d:${i}h:${n}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus||ve(new Date(this.jackpot.JackpotEndTime),new Date),[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return t("div",{key:"1566b4539220be1c5b5c72cf4a4288161b4a2537",class:this.getPopupClasses()},this.getTopNavigationTemplate(),t("div",{key:"1e8fa5324f9ee96905f56a46f53e9e147410719c",class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate()))}get host(){return n(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};je.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, 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}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, 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;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.EngagementSuiteButton.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF);text-transform:capitalize}.EngagementSuiteTabs{margin-top:20px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px;display:flex;align-items:center}.JackpotInfoItem .JackpotInfoItemProperty{align-self:flex-start;white-space:nowrap}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .EngagementSuiteIconButton.Help{margin-left:5px}.JackpotGamesListWrapper{margin-top:12px;overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg")}.JackpotDetailsButton .Open{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-contrast, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.GameLimitMessage{margin-top:14px;font-size:var(--emw--font-size-x-small, 12px);min-height:50px;border-radius:var(--emw--border-radius-x-small, 2px);background-color:var(--emw--color-background-transparency-30, rgba(64, 57, 86, 0.3));display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre-line;color:var(--emw--color-secondary, #BBB9C3)}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton{min-width:98px;min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton.JackpotGamesButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton.JackpotGamesButton{min-width:140px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.JackpotDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotGamesListWrapper,.JackpotDetailsPopup.Desktop .JackpotGamesListWrapper{margin-top:20px}.JackpotDetailsPopup.Tablet .GameLimitMessage,.JackpotDetailsPopup.Desktop .GameLimitMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:17px;min-height:60px;border-radius:var(--emw--border-radius-medium, 6px)}';const We=["en"],Ae={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",tooltip:"A payout that increases each time the game is played but the jackpot is not won",mega:"Mega",major:"Major",minor:"Minor",Suspended:"Suspended Jackpot",Closed:"Closed Jackpot",allJackpotsClosed:"Unfortunately, there are no available jackpots to join. Please, try again later.",jackpotIsWon:"Jackpot is won!",termsAndConditions:"Terms and Conditions",winningProbability:"Winning Probability",type:"Type",operatorContribution:"Operator Contribution",outdatedJackpotCountdown:"We are going to remove this Jackpot in 30 days",contributionTooltip:"This jackpot is covered by the casino."}},Oe=(e,t)=>{const i=t;return Ae[void 0!==i&&We.includes(i)?i:"en"][e]},Ne=class{constructor(t){e(this,t),this.close=i(this,"close",7),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=null},this.toggleTooltip=e=>{e.stopPropagation(),this.tooltip=this.tooltip?null:Oe(e.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=e=>{e.stopPropagation()},this.handleJackpotClick=e=>{const t=+e.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:t})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.jackpotChangeStatusRequest=void 0,this.tooltip=null,this.timers={},this.limitStylingAppends=!1}jackpotsPropHandler(e){!this.interval&&e.length&&this.startCountdown(),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.jackpots.reduce(((t,i)=>{const n=new Date(i.JackpotEndTime).getTime()-e;let a="00h:00m:00s";const{days:o,hours:s,minutes:r,seconds:l}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};return a="00"===o?`${s}h:${r}m:${l}s`:`${o}d:${s}h:${r}m`,Object.assign(Object.assign({},t),{[i.JackpotId]:a})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(e){return{JackpotCard:!0,JackpotCardClosed:e.IsClosed||ve(new Date(e.JackpotEndTime),new Date),InProgress:e.Enabled&&!e.IsClosed}}getJackpotHeaderTemplate(e){const i=!!e.WinBalance,n=Oe(e.Type,this.language),a=Oe(e.Reason,this.language),o=(null==e?void 0:e.IsClosed)?a:n,s=`JackpotBalance Jackpot${Oe(e.Type,this.language)}`,r=e.Enabled?"EngagementSuiteButton Active":"EngagementSuiteButton",l=Oe(e.Enabled?"unjoin":"join",this.language),p=e.Pending||(null==e?void 0:e.IsClosed)||ve(new Date(e.JackpotEndTime),new Date);return t("div",{class:"JackpotCardHeader"},t("div",{class:"JackpotTitle"},t("span",{class:"JackpotName"},o),t("span",{class:s},function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(e.Balance,e.Currency))),t("div",{class:"JackpotActions"},t("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":e.JackpotId,disabled:p},l)),i&&t("span",{class:"JackpotWon"},Oe("jackpotIsWon",this.language)))}getJackpotDescriptionTemplate(e){const i=+e.OperatorContributionPercent+"%",n=`1:${e.Probability}`,a=ve(new Date(e.JackpotEndTime),new Date)?Oe("outdatedJackpotCountdown",this.language):this.timers[e.JackpotId],o=Oe("operatorContribution",this.language),s=Oe("type",this.language),r=Oe("winningProbability",this.language);return t("div",{class:"JackpotCardDescription"},!e.IsClosed&&t("span",{class:"JackpotCountdown"},a),t("div",{class:"JackpotCardDescriptionBlock"},t("div",{class:"JackpotCardDescriptionRow"},t("span",null,o,":"),t("span",{class:"JackpotDescriptionValue"},i,t("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,n),this.renderDescriptionRowInfo(`${s}:`,e.JackpotTypePresentation),t("a",{href:e.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},Oe("termsAndConditions",this.language))))}renderDescriptionRowInfo(e,i){return t("div",{class:"JackpotCardDescriptionRow"},t("span",null,e),t("span",{class:"JackpotDescriptionValue"},i))}getJackpotTemplate(e){return t("div",{class:this.getJackpotClasses(e),onClick:this.handleJackpotClick,key:e.JackpotId,"data-id":e.JackpotId},this.getJackpotHeaderTemplate(e),this.getJackpotDescriptionTemplate(e))}getHeaderTemplate(){return t("header",{class:"JackpotsListPopupHeader"},t("button",{onClick:this.toggleTooltip,"data-tooltip":"tooltip",class:"EngagementSuiteIconButton Help"}),t("div",{class:"JackpotsListPopupHeaderName"},Oe("jackpots",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){const e=this.jackpots.every((e=>e.IsClosed));return this.jackpots.length?t("div",{class:"JackpotsListWrapper"},e&&t("div",{class:"JackpotsListClosed"},t("h2",null,Oe("allJackpotsClosed",this.language))),t("div",{class:"JackpotsList"},this.jackpots.map((e=>this.getJackpotTemplate(e))))):t("div",{class:"JackpotsListClosed"},t("h2",null,Oe("allJackpotsClosed",this.language)))}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return t("div",{key:"9fd4d384af0ee639e14925c797fe28bc71beb586",class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};Ne.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.JackpotsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.JackpotCard.InProgress::before{content:"";position:absolute;pointer-events:none;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, 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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-x-small, 12px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));position:absolute;right:0;bottom:-6px}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px;position:relative}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.JackpotMega{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%))}.JackpotMajor{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%))}.JackpotMinor{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%))}.JackpotBalance,.JackpotWon{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-bold, 700);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium-plus, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:var(--emw--font-weight-semibold, 600);margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, 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}.EngagementSuiteButton.Active::before{border-radius:99px}.EngagementSuiteButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);font-weight:var(--emw--font-weight-normal, 400)}.JackpotCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-bottom:12px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Mobile .JackpotCardDescriptionRow:nth-child(3){flex-basis:50%}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotsListPopup.Tablet .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotsListPopup.Tablet .EngagementSuiteButton,.JackpotsListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large-plus, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotsListPopup.Tablet .EngagementSuiteTooltip,.JackpotsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}';const Ge=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),this.handleCloseClick=()=>{this.isLoading||this.closeModal.emit(this.modalType)},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.clientStyling="",this.clientStylingUrl="",this.isOpen=void 0,this.isLoading=void 0,this.header=void 0,this.contentIcon=void 0,this.modalType=void 0,this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return t("div",{key:"570a2289e990efeae5cceac8bc2152cbb9bb5221",class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},t("div",{key:"9d40898f29b5a539907a7e50f3fdee02636aced6",class:"ModalWinAnimation"}),t("div",{key:"724ffe5cd946b40aa12f99ac926a6c832c1633da",class:"ModalContent GradientBorder"},t("div",{key:"14bb1463ba0b5e9cdb545a81c13873a3e124f4c3",class:"IconCloseContainer"},t("button",{key:"1640c3c0881c65199a26f3f2217610189d626f91",class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick})),this.contentIcon?t("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):null,t("div",{key:"c49ddc1152bb9c8af76ff11874816da8477ba821",class:"ModalHeader"},t("h1",{key:"08352f25028b0b08c2c1a77b91ea80cc968aa4e1"},this.header)),t("div",{key:"3420427d531aceb3861c1876394443ad664ff68b",class:"ModalBodyWrapper"},t("div",{key:"3e453586b727029f5fca9688b376d4b3e8298dbf",class:"ModalBody"},t("slot",{key:"0d82c3fa9b0faa9012005ccca85350313a684326",name:"body"})),t("div",{key:"9e7a078e4c912869f2e3573a533bb3cf82454a4c",class:"ModalFooter"},t("slot",{key:"df8e0568aeca79889cf8eb8f7fb33caf685b092e",name:"footer"})))))}get host(){return n(this)}};Ge.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 8px);width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:var(--emw--border-radius-large, 9px);background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const $e=["en"],Ue={en:{joinHeader:"Choose another mission?",desc:"Any progress on the current mission will be kept and you can rejoin the mission at any time.",joinQuestion:"Would you still like to join another mission?",joinConfirm:"Yes, join another mission",joinReject:"No, stay at this mission",unJoinHeader:"Quit Mission?",unJoinQuestion:"Would you still like to quit the mission?",unJoinConfirm:"Yes, I want to quit this mission",unJoinReject:"No, stay at this mission",join:"Unjoin",unJoin:"Unjoin",continue:"Continue",okContinue:"Ok, continue",won:"You won",supportInfo:"However, some rewards cannot be issued. Please, contact support.",noReward:"Reward cannot be issued",contactSupport:"Please contact support.",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!",jackpotWinInfo:"Please refresh game page or place any bet to update game balance"}},_e=(e,t)=>{const i=t;return Ue[void 0!==i&&$e.includes(i)?i:"en"][e]},qe=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),this.handleCloseClick=e=>{const t=e.currentTarget.getAttribute("data-type");this.closeModal.emit(t)},this.handleChallengeAttendance=()=>{window.postMessage({type:"ChallengeJoinRequest",data:this.confirmationData})},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.isModalOpen=e=>Boolean(this.openModals.find((t=>t===e))),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.isJoiningToChallenge=void 0,this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewardMessage="",this.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""}}openModalHandler(e){const{modalType:t,rewardMessage:i,hasError:n,confirmationData:a,winAmount:o}=e.detail;o&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+o.amount,currency:o.currency}:o),this.openModals=[...this.openModals,t],this.rewardMessage=i,this.hasError=n,a&&(this.confirmationData=a)}closeModalHandler(e){this.openModals=this.openModals.filter((t=>t!==e.detail))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){const{ProgressToActivate:e}=this.confirmationData||{};return t("div",{key:"e9a8acb94d06f7c7f551de2fa61d601d3a0eeac8",class:`ModalContainer ${this.device}`},t("casino-engagement-suite-modal",{key:"5d28d01520bb671c4c932b6e53d6b1075f9c3378",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",modalType:"REWARD_MODAL","show-animation":!0,device:this.device},t("div",{key:"6ef8750352a10fcbffbbe09c8bfba46b96c2098a",slot:"body"},t("div",{key:"c7b0c5c5202185a4001fbd23a60077e5b4484cfd"},_e("won",this.language)," ",t("span",{key:"a4635cada0b6b4bb54a73377fcd0165a12400c5f",class:"ModalReward"},this.rewardMessage)),this.hasError&&t("div",{key:"e06df98ca254006caf79ff443da7e7c4dc7c8e46",class:"SupportInfo"},_e("supportInfo",this.language))),t("div",{key:"434d5bf025fe0222f8d73d94e26bfe465492eacb",slot:"footer"},t("button",{key:"6927f9a1ee16c3b50abd62fe5bc736800b18d8f8",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},_e("continue",this.language)))),t("casino-engagement-suite-modal",{key:"802cb8c9e712f387f26ea4411f3bb0a1497fba80",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("JACKPOT_REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg","show-animation":!0,modalType:"JACKPOT_REWARD_MODAL",device:this.device},t("div",{key:"70fe768de685e857cdf3cc889ec9f7a841ed4c09",slot:"body"},t("div",{key:"bfafa6ea6d1d200d4c4c1a1e2a9d5bc43a0fbfa1",class:"JackpotWinText"},_e("jackpotWin",this.language)),t("div",{key:"62d3c8a92e0d0e0b2178087f421701a00b23bd32",class:"JackpotWinAmount"},(i=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(i)}`))),t("div",{key:"a062a76ba5d7d5ccb9defc85697b69d59ef1af5a",slot:"footer"},t("button",{key:"9fa028e9f0857539e66007b1ac5f5f005dd03267",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},_e("continue",this.language)),t("div",{key:"483eb12b73245887e6ebc251e2e93db7e6d7dbc3",class:"JackpotWinInfoText"},_e("jackpotWinInfo",this.language)))),t("casino-engagement-suite-modal",{key:"898dc39daf3ee36027a080364042e8653df9c390",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("TARGET_MODAL"),header:_e(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},t("div",{key:"08bcfbe6506982e393c92b0f776629dc336b751a",slot:"body"},t("div",{key:"58e20c9775e690344804f505ef30c5a4d59940ce",class:"LeftAlign"},_e("desc",this.language)),t("div",{key:"8081f426a1c5556b3d95e875da12e9fb214937db",class:"LeftAlignQuestion"},_e(e?"joinQuestion":"unJoinQuestion",this.language))),t("div",{key:"44614b02fd105bbe4a698460696a7842c85e3c49",slot:"footer",class:"ManyActions"},t("button",{key:"21b8b45fd8e28625d2ece9124bca65fb5429eb12",class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},_e(e?"joinConfirm":"unJoinConfirm",this.language)),t("button",{key:"e01e434afa2e1129c325042a37b1ac76be5a28c7",class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},t("div",{key:"622d587b43206691f4f67b7f13c18f4187560b15",class:"GradientText"},_e(e?"joinReject":"unJoinReject",this.language))))),t("casino-engagement-suite-modal",{key:"8310ae114d8eefd5d91fb07c5d7cca34c70bffa3",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("SUPPORT_MODAL"),header:_e("noReward",this.language),contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",modalType:"SUPPORT_MODAL",device:this.device},t("div",{key:"f6cc0be359c4cdbe0c2a3dd3ff3dbfb0841e65fe",slot:"body"},t("span",{key:"d4229846b65de554ba68c2c4545e2ac1fcc4fabe"},_e("contactSupport",this.language))),t("div",{key:"55a91614a32feca8f3ea613b2ea27bb0f37145e9",slot:"footer"},t("button",{key:"9ea26fa1b55d7fe1201e460c11ec46e8ea673240",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},_e("okContinue",this.language)))));var i}get host(){return n(this)}};qe.style=':host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);padding:0 12px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)) border-box;border:2px solid transparent}.GradientText{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF);word-break:break-word}.JackpotWinText{margin:0;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-medium, 16px);line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;background:var(--emw-linear-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-weight:var(--emw--font-weight-black, 900);font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotWinInfoText{padding:0 50px;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.SupportInfo{margin-top:20px}.ModalContainer.Mobile .ModalFooterButton,.ModalContainer.Mobile .ModalFooterButtonOutlined{font-size:var(--emw--font-size-small, 14px);min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.ModalContainer.Mobile .JackpotWinText{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ModalContainer.Mobile .JackpotWinInfoText{padding:0;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.LeftAlign,.LeftAlignQuestion{text-align:left;line-height:1.2}.LeftAlignQuestion{margin-top:20px}';const Ye=class{constructor(t){e(this,t),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.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1}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||this.indeterminate}}getProgressBarLineTemplate(){return t("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return t("div",{key:"ecce3a26a92d2e090c1db84bdc1bdbeb505080ed",class:this.getProgressBarClasses(),part:"ProgressBar"},t("div",{key:"649fe1103d222200f2a1ad3b5967e37da1f1ab3d",class:"ProgressBarInfo",part:"ProgressBarInfo"},t("slot",{key:"49dc180eedd823f0027f75099813fb9d91bcd938",name:"Title"},t("div",{key:"e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5"})),t("slot",{key:"3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e",name:"Percent"},t("div",{key:"6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad",class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),t("div",{key:"141106e77caad7b04bb199f911e87c0c6f0adc2d",class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return n(this)}};var Qe,Xe;Ye.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, 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-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}",function(e){e.info="info",e.leaderboard="leaderboard",e.games="games"}(Qe||(Qe={})),function(e){e.Starts="Starts",e.Ends="Ends"}(Xe||(Xe={}));const Ve=(e,t)=>(Object.keys(t).map((i=>{e=e.replace(`{${i}}`,t[i])})),e),Ke=Object.assign(Object.assign(Object.assign({Join:"Join",Unjoin:"Unjoin"},Qe),Xe),{TC:"Terms & Conditions",ScoreCriteria:"Score Criteria",MinimumBetCriteria:"Minimum bet criteria",Place:"place",Prizes:"Rewards",LeaderboardDetails:"Leaderboard Details",UnjoinDialog:{Title:"Quit Leaderboard?",Description:"Any progress on the current Leaderboard won’t be kept and you can not rejoin the Leaderboard any more. <br /><br />Would you still like to quit?",ButtonYes:"Yes, I want to quit leaderboard",ButtonNo:"No, Stay on the leaderboard"},WinDialog:{Tile:"Congratulations!",Description:"You won <span>{tournamentName}</span>!",ButtonContinue:"Continue"},NoLeaderboards:"No Leaderboards yet",NoLeaderboardsTip:"Try winning tickets to Leaderboards as rewards or launching other booster games",Leaderboards:"Leaderboards",TipPrize:"You took <span>{place}</span> place and win <span>{prize}</span>",Tip:"Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward."}),Ze=(...e)=>{let t=[];return e.map((e=>{switch(typeof e){case"string":t.push(e);break;case"object":Object.keys(e).map((i=>{e[i]&&t.push(i)}))}})),t.join(" ")};var et,tt,it;!function(e){e.list="list",e.item="item"}(et||(et={})),function(e){e.Running="Running",e.Unstarted="Unstarted",e.Closed="Closed",e.Closing="Closing"}(tt||(tt={})),function(e){e.unjoin="unjoin",e.tip="tip",e.gift="gift"}(it||(it={}));const nt=e=>[tt.Closed,tt.Closing].includes(e.state),at=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg"}),ot=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg"}),st=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg"}),rt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg"}),lt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg"}),pt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg"}),dt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg"}),ct=e=>{var{statedClasses:i,innerHTML:n}=e,a=o(e,["statedClasses","innerHTML"]);const{isHollow:s,isPending:r}=i;return t("button",Object.assign({class:Ze("GradientRoundedButton","GradientRounded",{Hollow:s||!1,Pending:r||!1})},a),t("span",null,n))};var gt;!function(e){e.normal="normal",e.unjoinYes="unjoinYes",e.unjoinNo="unjoinNo"}(gt||(gt={}));const ht=(e,t)=>{const{locale:i}=e,n={normal:{innerHTML:i.WinDialog.ButtonContinue},unjoinYes:{onClick:()=>e.actionJoin(e.dialog.data),innerHTML:i.UnjoinDialog.ButtonYes},unjoinNo:{statedClasses:{isHollow:!0},innerHTML:i.UnjoinDialog.ButtonNo}}[t];return ct({statedClasses:Object.assign({isPending:e.isActionJoinPending},n.statedClasses),onClick:()=>{var t;null===(t=n.onClick)||void 0===t||t.call(),e.closeDialog()},innerHTML:n.innerHTML})},ut={gift(e){const{name:i}=e.gifts[0],{locale:n}=e;return t("div",{class:"PageConfirmContainer"},t("div",{class:"PageConfirm"},t("div",null,dt),t("div",{class:"Title"},n.WinDialog.Tile),t("div",{class:"Description",innerHTML:Ve(n.WinDialog.Description,{tournamentName:i})}),t("div",{class:"PageConfirmButtonsGroup"},ht(e,gt.normal))))},unjoin(e){const{locale:i}=e;return t("div",{class:"DialogContentUnjoin"},t("div",{class:"DialogContentUnjoinTitle"},i.UnjoinDialog.Title),t("div",{class:"DialogContentUnjoinDescription",innerHTML:i.UnjoinDialog.Description}),ht(e,gt.unjoinYes),ht(e,gt.unjoinNo))}},mt=e=>{const t=["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime"],i={};return Object.keys(e).map((n=>{const a=e[n];i[n]="games"===n?a.items:t.includes(n)?new Date(a):a})),i},bt=e=>{const{left:i,middle:n,right:a}=e,o={left:i,middle:n,right:a};return t("div",{class:"WrapperBar"},Object.keys(o).map((e=>{return t("div",{class:"WrapperBar"+(i=e,i.split("").map(((e,t)=>0===t?e.toUpperCase():e)).join(""))},o[e]||"");var i})))};function ft(e){return e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(" at",",")}function vt(e,t){const i=new Date(e);return i.setSeconds(i.getSeconds()+t),i}function wt(e,t){const i=Math.abs(t.getTime()-e.getTime()),n=Math.floor(i/864e5),a=Math.floor(i%864e5/36e5),o=Math.floor(i%36e5/6e4);return`${String(n).padStart(2,"0")}d:${String(a).padStart(2,"0")}h:${String(o).padStart(2,"0")}m`}function xt(e,t){return(100*((new Date).getTime()-e.getTime())/(t.getTime()-e.getTime())).toFixed(0)}const kt=(e,i)=>t("section",{class:"TimeContainer"},t("div",{class:"Time"},i.playerEnrolled?[t("div",null,wt(vt(i.startTime,e.time),i.endTime)),t("div",null,ct({statedClasses:{isHollow:!0,isPendding:!1},innerHTML:`${xt(i.startTime,i.endTime)}%`}))]:[t("div",null,ft(i.startTime)),t("div",null,ft(i.endTime))]),t("casino-engagement-suite-progress-bar",{value:Number(xt(i.startTime,i.endTime)),"hide-percent":!0})),yt=e=>window.postMessage({type:"UpdateLeaderboardState",labels:e}),Ct=e=>window.postMessage({type:"UpdateTournamentsItemReq",id:e.id}),Ft=(e,t)=>window.postMessage({type:"UpdateLeaderboardsReq",id:e.id,query:t}),St=(e,t)=>{const{success:i}=t;if(i)switch(e.tournamentItem=Object.assign(Object.assign({},e.tournamentItem),{playerEnrolled:!e.tournamentItem.playerEnrolled}),e.page){case et.item:break;case et.list:Lt(e,e.tournamentItem)}e.nextPage&&(e.setPage(e.nextPage),e.nextPage=void 0),e.isActionJoinPending=!1},Lt=(e,t)=>{e.tournamentList=e.tournamentList.map((e=>e.id===t.id?mt(t):e))},Et={list(e){var i;if(!e.tournamentList)return e.tournamentList=null===(i=e.leaderboardsInit)||void 0===i?void 0:i.map((e=>mt(e))),t("general-animation-loading",null);const{locale:n}=e;if(e.tournamentList.length){const i=t=>{e.setPage(et.item,{tournament:t}),e.newIdList=e.newIdList.filter((e=>e!==t.id))};return Dt(e,t("div",{class:"Leaderboards Row"},e.tournamentList.map((n=>t("div",{class:Ze("LeaderboardsItem",n.playerEnrolled?" GradientRounded Hollow":""),onClick:()=>i(n)},t("div",{class:"LeaderboardsItemContainer"},Bt(e,n),kt(e,n)),t("div",{class:"LeaderboardLabels"},e.newIdList.includes(n.id)&&t("div",{class:"LeaderboardLabel"},t("span",null,"new"))))))))}return Dt(e,t("div",{class:"NoLeaderboards Row"},t("div",null,n.NoLeaderboards),t("div",null,n.NoLeaderboardsTip)))},item:e=>e.tournamentItem?Dt(e,[Bt(e,e.tournamentItem),(()=>{const{locale:i,tab:n}=e;return t("div",{class:"TabsContainer"},t("div",{class:"Tabs"},Object.keys(Qe).map((a=>t("div",{class:Ze({active:n===a}),onClick:()=>(t=>{switch(e.tab=t,t){case Qe.leaderboard:e.leaderboards=void 0,Ft(e.tournamentItem);break;case Qe.games:Ct(e.tournamentItem)}})(a)},i[a])))))})(),e.renders.tab[e.tab]()]):t("general-animation-loading",null)},Bt=(e,i)=>{const{locale:n}=e;return t("div",{class:"TitleContainer"},t("div",{class:"Title"},i.nameOrTitle),i.state!==tt.Closed&&t("div",null,ct({statedClasses:{isHollow:i.playerEnrolled,isPending:e.isActionJoinPending},onClick:t=>{t.stopPropagation(),(t=>{t.playerEnrolled?e.openDialog(it.unjoin,t):(e.actionJoin(t),e.tournamentItem=t)})(i)},innerHTML:i.playerEnrolled?n.Unjoin:n.Join})))},Dt=(e,i)=>{const{dialog:{isOpen:n}}=e,a=bt({right:t("span",{onClick:()=>e.closeDialog()},at)});return t("div",{class:`Wrapper ${e.device}`},t("div",{class:Ze("WrapperContent",{faded:n})},(()=>{const{left:i,middle:n}=(()=>{const{page:i,locale:n}=e;switch(i){case et.list:return{left:t("span",{onClick:()=>e.openDialog(it.tip)},ot),middle:n.Leaderboards};case et.item:return{left:t("span",{onClick:()=>e.setPage(et.list)},lt),middle:""}}})();return bt({left:i,middle:n,right:t("span",{onClick:()=>e.close.emit()},at)})})(),t("div",{class:"Root"},t("div",{class:"Main"},i))),t("div",{class:"WrapperUtil"},t("dialog",{open:n},t("div",{class:"GradientRounded Hollow"},a,n&&(()=>{switch(e.dialog.type){case it.unjoin:return e.renders.dialog.unjoin();case it.tip:return t("div",{class:"Tip"},e.locale.Tip);case it.gift:return e.renders.dialog.gift()}})()))))},Tt={info(e){var i,n;const{locale:a,tournamentItem:o,isShowInfo:s}=e;return t("div",{class:"InfoContainer"},kt(e,o),t("section",{class:"ShowInfo",onClick:()=>e.isShowInfo=!e.isShowInfo},t("p",null,t("span",null,s?rt:st),t("span",null,a.LeaderboardDetails))),s&&t("section",{class:"Info"},t("div",null,o.description),t("div",{class:"Criterias"},t("div",null,a.ScoreCriteria,": ",t("span",null,o.scoreCriteria)),t("div",null,a.MinimumBetCriteria,": ",t("span",null,o.minBetCount))),t("div",{class:"TC"},t("a",{href:o.termsUrl,target:"_blank"},a.TC))),nt(e.tournamentItem)&&(null===(i=e.leaderboards)||void 0===i?void 0:i.find((e=>e.isMe)))&&t("section",{class:"ResultPrize",innerHTML:Ve(a.TipPrize,Pt(null===(n=e.leaderboards)||void 0===n?void 0:n.find((e=>e.isMe))))}),t("section",{class:"Prizes"},t("div",{class:"PrizesHeader"},pt,t("span",{class:"PrizesText"},a.Prizes)),o.prizes.map(((e,i)=>t("div",{class:"Prize"},i+1," ",a.Place,": ",t("span",{class:"PrizeText"},e.name))))))},leaderboard:e=>e.leaderboards?e.leaderboards.length?t("table",{class:"Leaderboards"},e.leaderboards.map((e=>t("tr",{class:Ze({isMe:e.isMe})},t("td",{class:"LeaderboardRank"},t("span",null,e.rank)),t("td",{class:"LeaderboardName"},e.shortName),t("td",{class:"LeaderboardScore"},e.score),t("td",{class:"LeaderboardPrize"},e.prizeName))))):"":t("general-animation-loading",null),games(e){var i;return t("div",{class:"Games"},null===(i=e.tournamentItem.games)||void 0===i?void 0:i.map((e=>t("div",null,t("img",{src:e.defaultThumbnail,alt:""})))))}},Pt=e=>({prize:e.prizeName,place:e.rank}),Jt={dialog:ut,page:Et,tab:Tt};var It;"undefined"!=typeof window&&(customElements.define=(It=customElements.define,function(...e){try{return It.apply(this,e)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}),import("./p-fabbf1e1.js").then((({default:e})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",e.element)})));const Mt=class{handleEvent(e){var t,i;const n=e.data,{type:a}=n,s=o(n,["type"]);var r;null===(i=null===(r=this,t={UpdateLeaderboardsPlayerRes:e=>{const t=(e=>{let t;return e.map((e=>{var i;const n=null===(i=e.leaderBoard)||void 0===i?void 0:i.rank;n&&(t?n<t.leaderBoard.rank&&(t=e):t=e)})),t?`${t.leaderBoard.rank} / ${t.endRank}`:"-"})(e.data.items);window.postMessage({type:"UpdateLeaderboardState",rank:t})},UpdateLeaderboardStateReq:()=>{window.postMessage({type:"UpdateLeaderboardState",labels:["win","new"]})},UpdateTournamentsItemRes:e=>{const t=mt(e.data.item);r.tournamentItem=t,Lt(r,t)},UpdateLeaderboardsRes:e=>{r.leaderboards=(e=>{let{item:t,items:i}=e;return t?i.map((e=>t&&t.userID===e.userID?Object.assign(Object.assign({},e),{isMe:!0}):e)):i})(e.data)},JoinTournamentRes:e=>St(r,e),UnjoinTournamentRes:e=>St(r,e)})||void 0===t?void 0:t[a])||void 0===i||i.call(null,s)}checkNewIdList(){this.newIdList.length>0?this.addLabel("new"):this.removeLabel("new")}syncBarState(e,t){if(t){const a=(i=t,n=(e,t)=>e.id===t.id,e.filter((e=>!i.some((t=>n(e,t))))));this.newIdList=[...this.newIdList,...a.map((e=>e.id))]}else this.checkNewIdList(),this.gifts.length&&this.addLabel("win");var i,n}showPropWatcher(e,t){0==t&&1==e&&this.checkGift()}addLabel(e){this.labels.includes(e)||this.labels.push(e),yt(this.labels)}removeLabel(e){this.labels=this.labels.filter((t=>t!=e)),yt(this.labels)}setTimeInterval(){this.timeHolder=setInterval((()=>{this.time=this.tournamentList||this.tournamentItem?this.time+1:0}),1e3)}checkGift(){this.gifts.length?this.openDialog(it.gift,this.gifts[0],(()=>{this.dialog.type===it.gift&&(this.gifts=this.gifts.slice(1),setTimeout((()=>{this.checkGift()}),300))})):this.removeLabel("win")}connectedCallback(){this.setTimeInterval(),window.postMessage({type:"UpdateLeaderboardsPlayerReq"})}disconnectedCallback(){clearInterval(this.timeHolder)}actionJoin(e){if(!this.isActionJoinPending){this.isActionJoinPending=!0;try{e.playerEnrolled?(e=>{window.postMessage({type:"UnjoinTournamentReq",id:e.id})})(e):(e=>{var t,i;window.postMessage({type:"JoinTournamentReq",bonusCode:null===(i=null===(t=e.wallets)||void 0===t?void 0:t[0])||void 0===i?void 0:i.code})})(e)}catch(e){return void console.log("error",e)}}}setPage(e,t){e==et.item&&(this.tournamentItem=t.tournament,this.tournamentItem||Ct(t.tournament),nt(this.tournamentItem)&&Ft(this.tournamentItem)),this.tab=Qe.info,this.page=e}render(){return t(a,{key:"f9e9ea96e0fddd20d3f12141c7cf66588ab94ccd"},t("general-styling-wrapper",{key:"aea948ea6c8f8cc5e4aaea5812873d3fe7045568",clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,targetTranslations:Ke,translationUrl:this.translationUrl}),this.renders.page[this.page]())}openDialog(e,t,i){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!0,onClose:i,type:e,data:t})}closeDialog(){var e;null===(e=this.dialog.onClose)||void 0===e||e.call(this),this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1,onClose:void 0})}constructor(t){e(this,t),this.close=i(this,"close",7),this.gifts=[],this.labels=[],this.language="en",this.show=!1,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.device="Mobile",this.leaderboardsInit=void 0,this.tab=Qe.info,this.locale=Ke,this.tournamentItem=void 0,this.tournamentList=void 0,this.leaderboards=[],this.isActionJoinPending=!1,this.isDialogOpen=!1,this.isShowInfo=!1,this.page=et.list,this.tournamentInDialog=void 0,this.dialog={isOpen:!1,type:void 0,data:void 0,onClose:void 0},this.time=0,this.newIdList=[],this.renders={},Object.keys(Jt).forEach((e=>{this.renders[e]={},Object.keys(Jt[e]).forEach((t=>{this.renders[e][t]=Jt[e][t].bind(this,this)}))}))}static get watchers(){return{newIdList:["checkNewIdList"],tournamentList:["syncBarState"],show:["showPropWatcher"]}}};Mt.style='.Wrapper{height:100%;position:relative;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:24px;overflow-y:auto}.Wrapper.Mobile{border-radius:16px}.WrapperContent{padding-bottom:20px;transition:0.5s filter}.WrapperContent.faded{filter:brightness(53.3333333333%)}.Wrapper.Mobile .WrapperBar{padding:20px 8px 8px}.WrapperBar{display:flex;width:100%;padding:32px 20px 20px}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarMiddle{flex-grow:1;text-align:center;font-size:var(--emw--font-size-medium, 16px);line-height:16px;font-weight:500;color:var(--emw--color-secondary, rgb(187, 185, 195))}:host{display:block;font-size:var(--emw--font-size-x-small, 12px);font-family:Inter}.Row{margin:24px 0;padding:0 20px}.Row:first-child{margin:0}.LeaderboardsItem{position:relative;margin:10px 0;border:1px solid rgb(64, 57, 86);border-radius:16px}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.Info{margin:24px 0;padding:0 20px}.TimeContainer{margin:24px 0;padding:0 20px}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 12px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 12px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.ShowInfo{margin:24px 0;padding:0 20px;cursor:pointer;color:rgb(102, 97, 120)}.ShowInfo p{display:flex;gap:4px}.TitleContainer{display:flex;justify-content:space-between;margin:24px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat}.TitleContainer .GradientRoundedButton{width:120px}.TabsContainer{margin:24px 0;padding:0 20px;margin:0 20px;padding:0;border-bottom:1px solid #575757}.Tabs{display:flex;justify-content:space-between;justify-content:start;font-size:var(--emw--font-size-x-small, 12px);margin-bottom:-1px}.Tabs>div{padding:10px;color:rgb(102, 97, 120);cursor:pointer}.Tabs>div.active{color:var(--emw--color-typography, #FFF);border-bottom:2px solid var(--emw--color-typography, #FFF)}.Title{font-size:var(--emw--font-size-medium, 16px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:12px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:12px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:24px 0;padding:0 20px}.ResultPrize span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.Prizes{margin:24px 0;padding:0 20px}.Prizes .PrizesText{margin-left:3px;font-weight:600}.Prizes .PrizesHeader{align-items:center;display:flex}.Prizes .PrizesHeader img{width:12px}.Prizes .Prize{margin:8px 0}.Prizes .Prize .PrizeText{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards td{opacity:0.6;padding:20px 5px}.Leaderboards td:first-child{padding-left:20px}.Leaderboards td:last-child{padding-right:20px}.Leaderboards .LeaderboardName{color:var(--emw--color-typography, #FFF);opacity:1}.Leaderboards tr.isMe{background:rgba(0, 0, 0, 0.2)}.Leaderboards tr.isMe .LeaderboardRank span{padding:0px 3px;opacity:1;border:1px solid var(--emw--color-primary, rgb(255, 214, 47));border-radius:11px}.Leaderboards tr.isMe td{color:var(--emw--color-primary, rgb(255, 214, 47))}.LeaderboardLabels{position:absolute;top:-6px;right:18px;display:flex;gap:4px}.LeaderboardLabel{width:30px;height:15px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-3x-small, 7px);line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.Games{margin:24px 0;padding:0 20px;display:flex;flex-wrap:wrap;justify-content:space-evenly;gap:4px 7.25px}.Games img{width:60px}dialog{position:absolute;top:30px;width:100%;height:100%;background:transparent;border:0;padding:0;color:var(--emw--color-typography, #FFFFFF)}dialog>div{margin:32px;border-radius:8px;background:var(--emw--color-background, hsl(254, 44%, 15%));border:1px solid hsl(254, 20%, 28%);align-items:center}.DialogContentUnjoin{padding:32px;padding-top:10px;display:flex;gap:10px;flex-direction:column}.DialogContentUnjoinTitle{font-family:Montserrat;font-size:var(--emw--font-size-large, 20px);font-weight:600;line-height:24.38px;text-align:center}.DialogContentUnjoinDescription{color:var(--emw--color-secondary, rgb(187, 185, 195));margin-bottom:30px}.Tip{padding:32px;padding-top:10px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-small, 14px)}.PageConfirmContainer{text-align:center;width:80%;margin:0 auto}.PageConfirm{padding:40px 32px;display:flex;flex-direction:column;gap:20px}.PageConfirm .Title{font-size:var(--emw--font-size-large, 20px);text-align:center}.PageConfirm .Description{color:var(--emw--color-secondary, rgb(187, 185, 195));font-weight:400}.PageConfirm .Description span{color:var(--emw--color-typography, #FFF);font-weight:600}.PageConfirmButtonsGroup{width:150px;margin:0 auto;display:flex;flex-direction:column;gap:10px}.GradientRounded{display:block;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:rgb(30, 22, 56);position:relative;border-radius:16px}.GradientRounded.Hollow{background:rgb(30, 22, 56);color:#FFFFFF}.GradientRounded.Hollow::before{content:"";position:absolute;inset:0;border-radius:15px;border:1px solid transparent;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;-webkit-mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude}.GradientRoundedButton{border:none;padding:7px;height:32px;width:100%;font-size:var(--emw--font-size-small, 14px);font-weight:700;line-height:17.07px;text-align:center;transition:0.5s opacity;cursor:pointer}.GradientRoundedButton.Pending{cursor:not-allowed;opacity:0.3}.GradientRoundedButton.Hollow span{background:-webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}';const zt=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let n in t[e])i[e][n]=t[e][n]})),e(!0)}))})));e.push(n)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return n(this)}};zt.style=":host{display:block}";export{d as casino_engagement_suite_bar,f as casino_engagement_suite_challenges_details,xe as casino_engagement_suite_challenges_list,Se as casino_engagement_suite_container,De as casino_engagement_suite_free_spins_details,Ie as casino_engagement_suite_free_spins_list,je as casino_engagement_suite_jackpot_details,Ne as casino_engagement_suite_jackpots_list,Ge as casino_engagement_suite_modal,qe as casino_engagement_suite_modal_container,Ye as casino_engagement_suite_progress_bar,Mt as casino_engagement_suite_tournament,zt as general_styling_wrapper}
|