@everymatrix/player-challenges 0.1.15 → 0.1.18

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.
Files changed (79) hide show
  1. package/components/{ArrowLeftIcon-De_oE6VJ.js → ArrowLeftIcon-DorWQbN-.js} +1 -1
  2. package/components/{ArrowLeftIcon-D0LpsufV.cjs → ArrowLeftIcon-f3IOpYNO.cjs} +1 -1
  3. package/components/{Badge-r78wWqnE.cjs → Badge-BDyFx08l.cjs} +4 -4
  4. package/components/{Badge-C2_vCRtE.js → Badge-t5ERZxvC.js} +27 -27
  5. package/components/{Button-CU8n8iLn.cjs → Button-CUICdAqJ.cjs} +1 -1
  6. package/components/{Button-CqWi35Id.js → Button-DgtpbC5z.js} +1 -1
  7. package/components/{ChallengeBanner-oDSEjGGf.js → ChallengeBanner-DSarDh3k.js} +31 -29
  8. package/components/{ChallengeBanner-CBWAGiMi.cjs → ChallengeBanner-uzrRUAwa.cjs} +2 -2
  9. package/components/{ChallengeBreadcrumbs-0C1qzQmn.js → ChallengeBreadcrumbs-DHNKXK43.js} +2 -2
  10. package/components/{ChallengeBreadcrumbs-B1QPZ9Ub.cjs → ChallengeBreadcrumbs-DwyCD4n7.cjs} +1 -1
  11. package/components/{ChallengeCard-3915Vdd8.cjs → ChallengeCard-BuDYjnna.cjs} +1 -1
  12. package/components/{ChallengeCard-yUSt6Ocz.js → ChallengeCard-SkQ_xfqo.js} +6 -6
  13. package/components/{ChallengeClaimCode-D-skzCq6.js → ChallengeClaimCode-DiJqww5t.js} +2 -2
  14. package/components/{ChallengeClaimCode-BUD6Bszw.cjs → ChallengeClaimCode-zgBFr-2W.cjs} +1 -1
  15. package/components/{ChallengeDetails-D74Ki1Uz.cjs → ChallengeDetails-D1h6ITwb.cjs} +1 -1
  16. package/components/{ChallengeDetails-C5WUrhPo.js → ChallengeDetails-DMdkjCMC.js} +2 -2
  17. package/components/{ChallengeEvents-CXxvU73L.js → ChallengeEvents-B6l3iUIf.js} +1 -1
  18. package/components/{ChallengeEvents-U5YbNMZ6.cjs → ChallengeEvents-D5kenBIc.cjs} +1 -1
  19. package/components/ChallengeGames-CZu1MzPA.cjs +11 -0
  20. package/components/{ChallengeGames-CLISWWUl.js → ChallengeGames-CjLLzYVy.js} +57 -56
  21. package/components/{ChallengeHistory-BveIKX6m.js → ChallengeHistory-8LPDK1aA.js} +10 -10
  22. package/components/ChallengeHistory-CHK2Q13H.cjs +1 -0
  23. package/components/ChallengeLevels-CCZGLr9f.cjs +8 -0
  24. package/components/{ChallengeLevels-EESudJez.js → ChallengeLevels-s9abBMuq.js} +84 -84
  25. package/components/ChallengeList-CK16hckg.cjs +20 -0
  26. package/components/{ChallengeList-P4I4Dp10.js → ChallengeList-D6_LjVsa.js} +429 -424
  27. package/components/{ChallengeProgress-BxkeK6qN.js → ChallengeProgress-BFAihSd8.js} +11 -11
  28. package/components/{ChallengeProgress-BpkQJwJK.cjs → ChallengeProgress-F4DvqxcC.cjs} +1 -1
  29. package/components/{ChallengeProgressItem-DHghH0Re.js → ChallengeProgressItem-BHk-1FKU.js} +3 -3
  30. package/components/{ChallengeProgressItem-YsHk5ITp.cjs → ChallengeProgressItem-DrMZEU3z.cjs} +2 -2
  31. package/components/{ChallengeRules-D7Q6JUd5.js → ChallengeRules-CIINsSVb.js} +2 -2
  32. package/components/{ChallengeRules-CoGa-G4a.cjs → ChallengeRules-D5vuaTVl.cjs} +1 -1
  33. package/components/ChallengeSummary-BhoNxD8d.cjs +1 -0
  34. package/components/ChallengeSummary-sGIfhmFq.js +213 -0
  35. package/components/ChallengeTabContent-CYsszYCj.js +795 -0
  36. package/components/ChallengeTabContent-CftvI5C6.cjs +12 -0
  37. package/components/{ChallengeTabPanel-Rci3HLu2.js → ChallengeTabPanel-CdcGT_LI.js} +5 -5
  38. package/components/{ChallengeTabPanel-wgd02Iii.cjs → ChallengeTabPanel-ChsZw13b.cjs} +1 -1
  39. package/components/ChallengeTabSkeleton-CDYom40f.cjs +15 -0
  40. package/components/{ChallengeTabSkeleton-B-MQHvwC.js → ChallengeTabSkeleton-CuRzH3G_.js} +33 -32
  41. package/components/ChallengeTabs-Dcgam5G5.cjs +14 -0
  42. package/components/{ChallengeTabs-nR_tQGbd.js → ChallengeTabs-TgwP2u9F.js} +2256 -2245
  43. package/components/{CheckIcon-D4lHKEA2.js → CheckIcon-B82NDFTL.js} +1 -1
  44. package/components/{CheckIcon-CxbYr1xp.cjs → CheckIcon-BqS1Tdfu.cjs} +1 -1
  45. package/components/{ChevronIcon-CRAlhZkw.js → ChevronIcon-C0yjiiug.js} +1 -1
  46. package/components/{ChevronIcon-BAMpEJGd.cjs → ChevronIcon-zvGKIAT7.cjs} +1 -1
  47. package/components/{ExistIcon-Dto-bbDy.cjs → ExistIcon-DifozqZH.cjs} +1 -1
  48. package/components/{ExistIcon-MA116zUI.js → ExistIcon-Y3lLvkAJ.js} +1 -1
  49. package/components/{GiftIcon-Cd5b3K-t.cjs → GiftIcon-Bd4y8-Fm.cjs} +1 -1
  50. package/components/{GiftIcon-Co84y9Go.js → GiftIcon-CY_-XK0b.js} +1 -1
  51. package/components/{LinkIcon-Bwgy8Luj.cjs → LinkIcon-Bttg6ZAz.cjs} +1 -1
  52. package/components/{LinkIcon-pV2v0CrL.js → LinkIcon-CLHvOQ2s.js} +1 -1
  53. package/components/{LockIcon-BYYuZI1_.cjs → LockIcon-BgDxb03o.cjs} +1 -1
  54. package/components/{LockIcon-CzobKbeF.js → LockIcon-gAFRYl52.js} +1 -1
  55. package/components/Pagination-4P-rWszf.cjs +12 -0
  56. package/components/Pagination-CbvI_9SC.js +123 -0
  57. package/components/PlayerChallenges-CaUu7idr.js +417 -0
  58. package/components/PlayerChallenges-CtnY-k5K.cjs +1 -0
  59. package/components/{StarIcon-D_ixyTtO.js → StarIcon-CbfuCfUA.js} +1 -1
  60. package/components/{StarIcon-tdfCGCXl.cjs → StarIcon-DE0r6703.cjs} +1 -1
  61. package/components/{TargetIcon-Cw-ZoTaW.js → TargetIcon-BVhRYDcS.js} +1 -1
  62. package/components/{TargetIcon-BGcVQbCs.cjs → TargetIcon-DDclkkVP.cjs} +1 -1
  63. package/esnext/player-challenges.cjs +1 -1
  64. package/esnext/player-challenges.js +2 -2
  65. package/package.json +1 -1
  66. package/components/ChallengeGames-BVIMhW8b.cjs +0 -11
  67. package/components/ChallengeHistory-DDWHc60D.cjs +0 -1
  68. package/components/ChallengeLevels-Dqz1Jroz.cjs +0 -8
  69. package/components/ChallengeList-Bby_g4Z8.cjs +0 -20
  70. package/components/ChallengeSummary-Bu4cCk0T.js +0 -222
  71. package/components/ChallengeSummary-CcneZ-_H.cjs +0 -1
  72. package/components/ChallengeTabContent--jk6IZ9p.js +0 -794
  73. package/components/ChallengeTabContent-D3ghO0QX.cjs +0 -12
  74. package/components/ChallengeTabSkeleton-CuGIFm8O.cjs +0 -15
  75. package/components/ChallengeTabs-BtbgPMyA.cjs +0 -14
  76. package/components/Pagination-BgeAkkYm.js +0 -130
  77. package/components/Pagination-vup1vCrG.cjs +0 -12
  78. package/components/PlayerChallenges-C703Qu2L.cjs +0 -1
  79. package/components/PlayerChallenges-htqi9P1E.js +0 -395
@@ -1,12 +0,0 @@
1
- typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-BtbgPMyA.cjs"),Ye=require("./ChevronIcon-BAMpEJGd.cjs"),Je=require("./GiftIcon-Cd5b3K-t.cjs"),Xe=require("./LinkIcon-Bwgy8Luj.cjs"),Ze=require("./Pagination-vup1vCrG.cjs"),Qe=require("./ChallengeList-Bby_g4Z8.cjs"),We={en:{applyCode:"Apply Code",claimCodeTitle:"Enter the secret code to unlock hidden quests and rewards.",claimCodeRuleText:"3-30 characters, no spaces",claimCodePlaceholder:"e.g. CHALLENGES",claimCodeAnonymous:"You must be logged in to claim a code."},tr:{applyCode:"Kodu Uygula",claimCodeTitle:"Gizli görevlerin ve ödüllerin kilidini açmak için gizli kodu girin.",claimCodeRuleText:"3-30 karakter, boşluk yok",claimCodePlaceholder:"örn. CHALLENGES",claimCodeAnonymous:"Bir kod talep etmek için giriş yapmalısınız."},da:{applyCode:"Anvend kode",claimCodeTitle:"Indtast den hemmelige kode for at låse skjulte missioner og belønninger op.",claimCodeRuleText:"3-30 tegn, ingen mellemrum",claimCodePlaceholder:"f.eks. CHALLENGES",claimCodeAnonymous:"Du skal være logget ind for at kræve en kode."},de:{applyCode:"Code anwenden",claimCodeTitle:"Gib den Geheimcode ein, um versteckte Aufgaben und Belohnungen freizuschalten.",claimCodeRuleText:"3-30 Zeichen, keine Leerzeichen",claimCodePlaceholder:"z.B. CHALLENGES",claimCodeAnonymous:"Du musst eingeloggt sein, um einen Code einzulösen."},nl:{applyCode:"Code toepassen",claimCodeTitle:"Voer de geheime code in om verborgen missies en beloningen te ontgrendelen.",claimCodeRuleText:"3-30 tekens, geen spaties",claimCodePlaceholder:"bijv. CHALLENGES",claimCodeAnonymous:"Je moet ingelogd zijn om een code te claimen."},fr:{applyCode:"Appliquer le code",claimCodeTitle:"Entrez le code secret pour débloquer des quêtes cachées et des récompenses.",claimCodeRuleText:"3-30 caractères, sans espace",claimCodePlaceholder:"ex. CHALLENGES",claimCodeAnonymous:"Vous devez être connecté pour réclamer un code."},hu:{applyCode:"Kód alkalmazása",claimCodeTitle:"Add meg a titkos kódot a rejtett küldetések és jutalmak feloldásához.",claimCodeRuleText:"3-30 karakter, szóköz nélkül",claimCodePlaceholder:"pl. CHALLENGES",claimCodeAnonymous:"Be kell jelentked a kód igényléséhez."}},$e=3,ze=30,et=/^[\x21-\x7E]+$/,tt=200;var lt=e.from_html('<div class="challenge-claim-code__container svelte-1hz4cfc"><p class="challenge-claim-code__title svelte-1hz4cfc"> </p> <div class="challenge-claim-code__content svelte-1hz4cfc"><input id="challenge-claim-code-input" name="claimCode" type="text"/> <p> </p></div> <button class="challenge-claim-code__button svelte-1hz4cfc"> </button></div>'),rt=e.from_html('<p class="challenge-claim-code__anonymous svelte-1hz4cfc"> </p>'),st=e.from_html("<div><!></div>");const nt={hash:"svelte-1hz4cfc",code:`.challenge-claim-code.svelte-1hz4cfc {width:100%;display:flex;justify-content:center;margin-top:100px;.challenge-claim-code__container:where(.svelte-1hz4cfc) {width:281px;display:flex;justify-content:center;flex-direction:column;gap:28px;.challenge-claim-code__title:where(.svelte-1hz4cfc) {font-size:16px;font-weight:400;line-height:24px;color:var(--text-subtle, rgba(255, 255, 255, 1));text-align:center;margin:0;}.challenge-claim-code__content:where(.svelte-1hz4cfc) {display:flex;align-items:center;text-align:center;flex-direction:column;gap:12px;width:100%;.challenge-claim-code__input:where(.svelte-1hz4cfc) {box-sizing:border-box;border-radius:6px;border:1px solid var(--input-element-border-hover, rgba(251, 251, 251, 0.05));background-color:var(--bg-overlay-neutral-level-3, rgba(251, 251, 251, 0.15));color:var(--input-element-text-active, rgba(255, 255, 255, 1));font-size:14px;font-weight:400;padding:12px 16px;line-height:125%;width:100%;text-align:center;text-transform:uppercase;}.challenge-claim-code__input:where(.svelte-1hz4cfc)::placeholder {color:var(--input-element-text-disable, rgba(251, 251, 251, 0.25));}.challenge-claim-code__input:where(.svelte-1hz4cfc):focus {outline:none;}.challenge-claim-code__input.errored:where(.svelte-1hz4cfc) {border-color:var(--semantic-error-500, rgba(235, 0, 0, 1));}.challenge-claim-code__rule:where(.svelte-1hz4cfc) {font-weight:400;font-size:12px;line-height:24px;color:var(--text-subtle, rgba(255, 255, 255, 1));width:100%;margin:0;}.challenge-claim-code__rule.errored:where(.svelte-1hz4cfc) {color:var(--semantic-error-500, rgba(235, 0, 0, 1));}}.challenge-claim-code__button:where(.svelte-1hz4cfc) {background-color:var(--button-primary-bg-default, rgba(255, 204, 0, 1));display:flex;flex-direction:row;justify-content:center;align-items:center;padding:8px 16px;height:33px;border-radius:6px;border:none;font-weight:700;font-size:12px;}.challenge-claim-code__button:where(.svelte-1hz4cfc):disabled {opacity:50%;cursor:not-allowed;}.challenge-claim-code__button:where(.svelte-1hz4cfc):hover {background-color:var(--button-primary-bg-hover, rgba(199, 158, 0, 1));}}.challenge-claim-code__anonymous:where(.svelte-1hz4cfc) {margin:0;text-align:center;font-size:13px;color:var(--text-subtle, rgba(251, 251, 251, 0.5));}}
2
- @media (max-width: 767px) {.challenge-claim-code.svelte-1hz4cfc {margin-top:20px;}
3
- }.challenge-claim-code.anonymous.svelte-1hz4cfc {padding:32px 12px;text-align:center;margin:0;}`};function fe(i,t){e.push(t,!0),e.append_styles(i,nt);const r=()=>e.store_get(e.$format,"$_",o),[o,E]=e.setup_stores(),g=e.prop(t,"endpoint",7),c=e.prop(t,"userSession",7),p=e.prop(t,"locale",7,"en"),m=e.prop(t,"translationUrl",7),b=e.prop(t,"domainId",7);e.untrack(()=>e.initI18n(p(),We)),e.user_pre_effect(()=>{m()&&e.loadTranslationUrl(m(),"challenge-claim-code")}),e.user_effect(()=>{e.setLocale(p()||"en")});let h=e.state(""),f=e.state(null),u=e.state(!1),x=e.state(!1),C;const P=n=>n.length>=$e&&n.length<=ze&&et.test(n),U=e.user_derived(()=>P(e.get(h))),S=e.user_derived(()=>e.get(x)||!!e.get(f)),I=e.user_derived(()=>!!g()&&!!c()&&!!b()),R=e.user_derived(()=>e.get(U)&&!e.get(u)&&e.get(I)),M=e.user_derived(()=>!c()),G=n=>{e.set(h,n.target.value,!0),e.set(f,null),clearTimeout(C),C=setTimeout(()=>{e.set(x,!!e.get(h)&&!P(e.get(h)),!0)},tt)},q=async()=>{if(e.get(R)){e.set(u,!0),e.set(f,null);try{await e.grantChallengeByCode({endpoint:g(),domainId:b(),sessionId:c(),code:e.get(h)}),e.set(h,""),e.set(x,!1),e.sendChallengeActionSuccess(e.ChallengeAction.Claim)}catch(n){const w=n instanceof e.ChallengeApiError?n.errorCode:null,l=n instanceof Error?n.message:String(n);e.set(f,l,!0),e.sendChallengeActionFail(e.ChallengeAction.Claim,l,w??void 0)}finally{e.set(u,!1)}}};e.onDestroy(()=>clearTimeout(C));var F={get endpoint(){return g()},set endpoint(n){g(n),e.flushSync()},get userSession(){return c()},set userSession(n){c(n),e.flushSync()},get locale(){return p()},set locale(n="en"){p(n),e.flushSync()},get translationUrl(){return m()},set translationUrl(n){m(n),e.flushSync()},get domainId(){return b()},set domainId(n){b(n),e.flushSync()}},T=st();let s;var V=e.child(T);{var K=n=>{var w=lt(),l=e.child(w),a=e.child(l,!0);e.reset(l);var _=e.sibling(l,2),d=e.child(_);e.remove_input_defaults(d);let D;var v=e.sibling(d,2);let k;var H=e.child(v,!0);e.reset(v),e.reset(_);var z=e.sibling(_,2),X=e.child(z,!0);e.reset(z),e.reset(w),e.template_effect((j,ee,Z,ne)=>{e.set_text(a,j),D=e.set_class(d,1,"challenge-claim-code__input svelte-1hz4cfc",null,D,{errored:e.get(S)}),e.set_value(d,e.get(h)),e.set_attribute(d,"maxlength",ze),e.set_attribute(d,"placeholder",ee),e.set_attribute(d,"aria-invalid",e.get(S)),k=e.set_class(v,1,"challenge-claim-code__rule svelte-1hz4cfc",null,k,{errored:e.get(S)}),e.set_text(H,Z),z.disabled=!e.get(R),e.set_text(X,ne)},[()=>r()("claimCodeTitle"),()=>r()("claimCodePlaceholder"),()=>e.get(f)??r()("claimCodeRuleText"),()=>r()("applyCode")]),e.delegated("input",d,G),e.delegated("keydown",d,j=>j.key==="Enter"&&q()),e.delegated("click",z,q),e.append(n,w)},Y=n=>{var w=rt(),l=e.child(w,!0);e.reset(w),e.template_effect(a=>e.set_text(l,a),[()=>r()("claimCodeAnonymous")]),e.append(n,w)};e.if_block(V,n=>{e.get(M)?n(Y,-1):n(K)})}e.reset(T),e.template_effect(()=>s=e.set_class(T,1,"challenge-claim-code svelte-1hz4cfc",null,s,{anonymous:e.get(M)})),e.append(i,T);var J=e.pop(F);return E(),J}e.delegate(["input","keydown","click"]);e.create_custom_element(fe,{endpoint:{},userSession:{},locale:{},translationUrl:{},domainId:{}},[],[],{mode:"open"});if(typeof window<"u"){let i=function(t){return function(...r){try{return t.apply(this,r)}catch(o){if(o instanceof DOMException&&o.message.includes("has already been used with this registry")||o instanceof Error&&o.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw o}}};customElements.define=i(customElements.define),Promise.resolve().then(()=>require("./ChallengeClaimCode-BUD6Bszw.cjs")).then(t=>{const r=t.default||t;customElements.get("challenge-claim-code")||customElements.define("challenge-claim-code",r.element||r)}).catch(t=>{console.error("BOOT ERROR:",t)})}const ot={en:{historyEmptyTitle:"No challenge history yet",historyEmptyDescription:"Completed and expired challenges will show up here.",historyAnonymous:"Log in to view your history."},tr:{historyEmptyTitle:"Henüz hiçbir görev geçmişi yok",historyEmptyDescription:"Tamamlanan ve süresi dolan görevler burada görünecek.",historyAnonymous:"Geçmişinizi görmek için giriş yapın."},da:{historyEmptyTitle:"Ingen udfordringshistorik endnu",historyEmptyDescription:"Fuldførte og udløbne udfordringer vil blive vist her.",historyAnonymous:"Log ind for at se din historik."},de:{historyEmptyTitle:"Noch keine Herausforderungshistorie",historyEmptyDescription:"Abgeschlossene und abgelaufene Herausforderungen werden hier angezeigt.",historyAnonymous:"Melden Sie sich an, um Ihre Historie anzuzeigen."},nl:{historyEmptyTitle:"Nog geen uitdaginggeschiedenis",historyEmptyDescription:"Voltooide en verlopen uitdagingen verschijnen hier.",historyAnonymous:"Log in om uw geschiedenis te bekijken."},fr:{historyEmptyTitle:"Aucun historique de défi pour le moment",historyEmptyDescription:"Les défis terminés et expirés apparaîtront ici.",historyAnonymous:"Connectez-vous pour voir votre historique."},hu:{historyEmptyTitle:"Még nincs kihívási előzmény",historyEmptyDescription:"Befejezett és lejárt kihívások itt jelennek meg.",historyAnonymous:"Jelentkezzen be, hogy lássa az előzményeit."}},ve={[e.ChallengeHistoryLevelStatus.Completed]:"completed",[e.ChallengeHistoryLevelStatus.Expired]:"expired",[e.ChallengeHistoryLevelStatus.Forfeited]:"forfeited"},at=i=>e.formatDisplayDate(i,"DD/MM/YY HH:mm"),se=i=>i.Status===e.ChallengeHistoryLevelStatus.Completed,it=i=>{const t=i.Levels??[];if(!t.length)return null;if(t.every(se))return e.ChallengeHistoryLevelStatus.Completed;const r=t[t.length-1];return se(r)?t.filter(o=>!se(o)).pop()?.Status??e.ChallengeHistoryLevelStatus.Completed:r.Status},ct=i=>Object.values(i??{}).map(t=>t?.RewardDescription).filter(t=>!!t);var dt=e.from_html('<p class="challenge-history__anonymous svelte-or1pjf"> </p>'),gt=e.from_html('<div class="challenge-history__skeleton svelte-or1pjf"></div>'),ht=e.from_html('<div class="challenge-history__empty svelte-or1pjf"><b class="svelte-or1pjf"> </b> <span class="svelte-or1pjf"> </span></div>'),ut=e.from_html("<span> </span>"),pt=e.from_html('<a target="_blank" rel="noopener noreferrer" class="challenge-history__terms--link svelte-or1pjf"> <!></a>'),mt=e.from_html('<div><span class="challenge-history__level-item--icon svelte-or1pjf"><!></span> <span class="challenge-history__level--info-value svelte-or1pjf"> </span></div>'),vt=e.from_html('<tr class="svelte-or1pjf"><td class="svelte-or1pjf"><div class="challenge-history__level-item svelte-or1pjf"><span class="challenge-history__level-item--name svelte-or1pjf"> </span> <!></div></td><td class="svelte-or1pjf"><span> </span></td><td class="svelte-or1pjf"> </td></tr>'),ft=e.from_html('<div class="challenge-history__details-expanded svelte-or1pjf"><!> <div class="svelte-or1pjf"><table class="challenge-history__level-table svelte-or1pjf"><thead class="challenge-history__level-table-header svelte-or1pjf"><tr class="svelte-or1pjf"><th class="svelte-or1pjf"> </th><th class="svelte-or1pjf"> </th><th class="svelte-or1pjf"> </th></tr></thead><tbody class="challenge-history__level-table-body svelte-or1pjf"></tbody></table></div></div>'),_t=e.from_html('<div class="challenge-history__row svelte-or1pjf"><button type="button"><span class="challenge-history__item--name svelte-or1pjf"> </span> <span class="challenge-history__item--action svelte-or1pjf"><!> <span><!></span></span></button> <!></div>'),yt=e.from_html("<!> <!>",1),bt=e.from_html("<div><!></div>");const xt={hash:"svelte-or1pjf",code:`.challenge-history.svelte-or1pjf {padding:10px 0;display:flex;flex-direction:column;gap:12px;}.challenge-history__row.svelte-or1pjf {display:flex;flex-direction:column;}.challenge-history__skeleton.svelte-or1pjf {height:60px;border-radius:12px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));
4
- animation: svelte-or1pjf-challenge-history-pulse 1.2s ease-in-out infinite;}
5
-
6
- @keyframes svelte-or1pjf-challenge-history-pulse {
7
- 50% {
8
- opacity: 0.5;
9
- }
10
- }.challenge-history__anonymous.svelte-or1pjf,
11
- .challenge-history__empty.svelte-or1pjf {margin:0;text-align:center;font-size:13px;color:var(--text-subtle, rgba(251, 251, 251, 0.5));}.challenge-history__item.svelte-or1pjf {width:100%;color:var(--text-default, rgba(255, 255, 255, 1));font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));border-radius:12px;padding:20px 12px;border:0;text-align:left;&:focus {outline:none;}}.challenge-history__item.expanded.svelte-or1pjf {border-radius:12px 12px 0 0;padding-bottom:8px;}.challenge-history__item--name.svelte-or1pjf {flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.challenge-history__item--action.svelte-or1pjf {display:flex;align-items:center;gap:8px;flex-shrink:0;}.challenge-history__item--status.svelte-or1pjf {border-radius:14px;padding:2px 10px;background:var(--tags-live-bg, rgba(30, 162, 0, 1));color:var(--secondary-0, rgba(255, 255, 255, 1));font-weight:700;font-size:10px;}.challenge-history__item--status.failed.svelte-or1pjf {background:var(--tags-ended-bg, rgba(170, 0, 0, 1));}.challenge-history__item--status[data-status='forfeited'].svelte-or1pjf {background:var(--tags-forfeited-bg, var(--tags-ended-bg, rgba(170, 0, 0, 1)));}.challenge-history__view-details-icon.svelte-or1pjf {display:flex;transition:transform 0.2s ease;fill:var(--icon-default, rgba(255, 255, 255, 1));color:var(--icon-default, rgba(255, 255, 255, 1));}.challenge-history__view-details-icon.expanded.svelte-or1pjf {transform:rotate(180deg);}.challenge-history__details-expanded.svelte-or1pjf {background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));border-radius:0 0 12px 12px;padding:0 20px 12px 12px;color:var(--text-default, rgba(255, 255, 255, 1));font-size:12px;font-weight:400;display:flex;flex-direction:column;gap:9px;.challenge-history__terms--link:where(.svelte-or1pjf) {color:var(--semantic-info-400, rgba(0, 156, 245, 1));font-size:10px;font-weight:500;}.challenge-history__level-status:where(.svelte-or1pjf) {font-weight:400;font-size:12px;line-height:12px;}.challenge-history__level-status.failed:where(.svelte-or1pjf) {color:var(--icon-error, rgba(235, 0, 0, 1));}.challenge-history__level-status.completed:where(.svelte-or1pjf) {color:var(--icon-success, rgba(50, 242, 0, 1));}.challenge-history__level-table:where(.svelte-or1pjf) {width:100%;border-collapse:separate;border-spacing:0;text-align:left;thead:where(.svelte-or1pjf) {background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));}.challenge-history__level-table-header:where(.svelte-or1pjf) {th:where(.svelte-or1pjf) {color:var(--text-super-subtle, rgba(251, 251, 251, 0.5));font-weight:700;font-size:10px;text-transform:uppercase;padding:6px 20px;border-bottom:1px solid var(--border-default, rgba(251, 251, 251, 0.15));text-align:left;}th:where(.svelte-or1pjf):first-child {border-radius:4px 0 0 0;}th:where(.svelte-or1pjf):last-child {border-radius:0 4px 0 0;}}}.challenge-history__level-table-body:where(.svelte-or1pjf) {td:where(.svelte-or1pjf) {color:var(--text-default, rgba(255, 255, 255, 1));font-weight:400;font-size:12px;padding:10px 20px;border-bottom:1px solid var(--border-default, rgba(251, 251, 251, 0.15));text-align:left;vertical-align:top;}}.challenge-history__level-reward:where(.svelte-or1pjf) {display:flex;align-items:center;gap:4px;color:var(--text-brand, rgba(255, 204, 0, 1));margin-top:8px;}.challenge-history__level-item--icon:where(.svelte-or1pjf) {display:flex;align-items:center;flex-shrink:0;color:var(--text-brand, rgba(255, 204, 0, 1));}.challenge-history__level-reward.failed:where(.svelte-or1pjf) {color:var(--text-super-subtle, rgba(251, 251, 251, 0.5));}}.challenge-history.anonymous.svelte-or1pjf {padding:32px 12px;text-align:center;margin:0;}`};function _e(i,t){e.push(t,!0),e.append_styles(i,xt);const r=()=>e.store_get(e.$format,"$_",o),[o,E]=e.setup_stores(),g=e.prop(t,"userSession",7),c=e.prop(t,"locale",7,"en"),p=e.prop(t,"translationUrl",7),m=e.prop(t,"endpoint",7),b=e.prop(t,"domainId",7),h=e.prop(t,"userId",7),f=e.prop(t,"isMobile",7,!0),u=e.prop(t,"limit",7,e.LIMIT_ITEMS_DEFAULT);e.untrack(()=>e.initI18n(c(),ot)),e.user_pre_effect(()=>{p()&&e.loadTranslationUrl(p(),"challenge-history")}),e.user_effect(()=>{e.setLocale(c()||"en")});let x=e.state(e.proxy([])),C=e.state(0),P=e.state(0),U=e.state(!1),S=e.state(e.proxy([]));const I=e.user_derived(()=>Number(u())||e.LIMIT_ITEMS_DEFAULT),R=e.user_derived(()=>!g()&&!h()),M=[0,1,2,3],G=async l=>{e.set(U,!0);try{const a=await e.getChallengeHistory({endpoint:m(),domainId:b(),userId:h(),sessionId:g(),locale:c(),pageNumber:Math.floor(l/e.get(I)),pageSize:e.get(I),isFutureAvailable:!0});e.set(x,a.Data??[],!0),e.set(C,a.TotalItem??e.get(x).length,!0),e.set(P,l,!0),e.set(S,[],!0)}catch(a){console.error("challenge-history: failed to load history",a),e.set(x,[],!0),e.set(C,0)}finally{e.set(U,!1)}};e.user_effect(()=>{const l={endpoint:m(),domainId:b(),userId:h(),userSession:g(),locale:c(),pageSize:e.get(I)};!l.endpoint||!l.userId||G(0)});const q=l=>{e.set(S,e.get(S).includes(l)?e.get(S).filter(a=>a!==l):[...e.get(S),l],!0)};var F={get userSession(){return g()},set userSession(l){g(l),e.flushSync()},get locale(){return c()},set locale(l="en"){c(l),e.flushSync()},get translationUrl(){return p()},set translationUrl(l){p(l),e.flushSync()},get endpoint(){return m()},set endpoint(l){m(l),e.flushSync()},get domainId(){return b()},set domainId(l){b(l),e.flushSync()},get userId(){return h()},set userId(l){h(l),e.flushSync()},get isMobile(){return f()},set isMobile(l=!0){f(l),e.flushSync()},get limit(){return u()},set limit(l=e.LIMIT_ITEMS_DEFAULT){u(l),e.flushSync()}},T=bt();let s;var V=e.child(T);{var K=l=>{var a=dt(),_=e.child(a,!0);e.reset(a),e.template_effect(d=>e.set_text(_,d),[()=>r()("historyAnonymous")]),e.append(l,a)},Y=l=>{var a=e.comment(),_=e.first_child(a);e.each(_,16,()=>M,d=>d,(d,D)=>{var v=gt();e.append(d,v)}),e.append(l,a)},J=l=>{var a=ht(),_=e.child(a),d=e.child(_,!0);e.reset(_);var D=e.sibling(_,2),v=e.child(D,!0);e.reset(D),e.reset(a),e.template_effect((k,H)=>{e.set_text(d,k),e.set_text(v,H)},[()=>r()("historyEmptyTitle"),()=>r()("historyEmptyDescription")]),e.append(l,a)},n=l=>{var a=yt(),_=e.first_child(a);e.each(_,17,()=>e.get(x),v=>v.ProgressId,(v,k)=>{const H=e.user_derived(()=>e.get(S).includes(e.get(k).ProgressId)),z=e.user_derived(()=>it(e.get(k)));var X=_t(),j=e.child(X);let ee;var Z=e.child(j),ne=e.child(Z,!0);e.reset(Z);var ye=e.sibling(Z,2),be=e.child(ye);{var Ae=O=>{var L=ut();let Q;var ae=e.child(L,!0);e.reset(L),e.template_effect(te=>{Q=e.set_class(L,1,"challenge-history__item--status svelte-or1pjf",null,Q,{failed:e.get(z)!==e.ChallengeHistoryLevelStatus.Completed}),e.set_attribute(L,"data-status",ve[e.get(z)]),e.set_text(ae,te)},[()=>r()(ve[e.get(z)])]),e.append(O,L)};e.if_block(be,O=>{e.get(z)!==null&&O(Ae)})}var oe=e.sibling(be,2);let xe;var Me=e.child(oe);Ye.ChevronIcon(Me,{size:15}),e.reset(oe),e.reset(ye),e.reset(j);var De=e.sibling(j,2);{var He=O=>{var L=ft(),Q=e.child(L);{var ae=A=>{var y=pt(),N=e.child(y),le=e.sibling(N);Xe.LinkIcon(le,{}),e.reset(y),e.template_effect(W=>{e.set_attribute(y,"href",e.get(k).TermsAndConditionsUrl),e.set_text(N,`${W??""} `)},[()=>r()("termsAndConditions")]),e.append(A,y)};e.if_block(Q,A=>{e.get(k).TermsAndConditionsUrl&&A(ae)})}var te=e.sibling(Q,2),Ce=e.child(te),ie=e.child(Ce),we=e.child(ie),ce=e.child(we),Ne=e.child(ce,!0);e.reset(ce);var de=e.sibling(ce),Pe=e.child(de,!0);e.reset(de);var Se=e.sibling(de),Ue=e.child(Se,!0);e.reset(Se),e.reset(we),e.reset(ie);var ke=e.sibling(ie);e.each(ke,21,()=>e.get(k).Levels??[],A=>A.OrderNumber,(A,y)=>{const N=e.user_derived(()=>se(e.get(y))),le=e.user_derived(()=>ct(e.get(y).Rewards));var W=vt(),ge=e.child(W),Te=e.child(ge),he=e.child(Te),Re=e.child(he);e.reset(he);var Oe=e.sibling(he,2);{var Ge=$=>{var B=mt();let re;var me=e.child(B),Fe=e.child(me);Je.GiftIcon(Fe,{}),e.reset(me);var Ie=e.sibling(me,2),Ve=e.child(Ie,!0);e.reset(Ie),e.reset(B),e.template_effect(Ke=>{re=e.set_class(B,1,"challenge-history__level-reward svelte-or1pjf",null,re,{failed:!e.get(N)}),e.set_text(Ve,Ke)},[()=>e.get(y).CustomRewardMessage||e.get(le).join(" + ")]),e.append($,B)};e.if_block(Oe,$=>{(e.get(y).CustomRewardMessage||e.get(le).length)&&$(Ge)})}e.reset(Te),e.reset(ge);var ue=e.sibling(ge),pe=e.child(ue);let je;var qe=e.child(pe,!0);e.reset(pe),e.reset(ue);var Ee=e.sibling(ue),Be=e.child(Ee,!0);e.reset(Ee),e.reset(W),e.template_effect(($,B,re)=>{e.set_text(Re,`${$??""}
12
- ${e.get(y).OrderNumber+1}`),je=e.set_class(pe,1,"challenge-history__level-status svelte-or1pjf",null,je,{failed:!e.get(N),completed:e.get(N)}),e.set_text(qe,B),e.set_text(Be,re)},[()=>r()("level"),()=>r()(ve[e.get(y).Status]),()=>at(e.get(y).Time)]),e.append(A,W)}),e.reset(ke),e.reset(Ce),e.reset(te),e.reset(L),e.template_effect((A,y,N)=>{e.set_text(Ne,A),e.set_text(Pe,y),e.set_text(Ue,N)},[()=>r()("level"),()=>r()("status"),()=>r()("time")]),e.append(O,L)};e.if_block(De,O=>{e.get(H)&&O(He)})}e.reset(X),e.template_effect(()=>{ee=e.set_class(j,1,"challenge-history__item svelte-or1pjf",null,ee,{expanded:e.get(H)}),e.set_attribute(j,"aria-expanded",e.get(H)),e.set_text(ne,e.get(k).Name),xe=e.set_class(oe,1,"challenge-history__view-details-icon svelte-or1pjf",null,xe,{expanded:e.get(H)})}),e.delegated("click",j,()=>q(e.get(k).ProgressId)),e.append(v,X)});var d=e.sibling(_,2);{var D=v=>{Ze.Pagination(v,{get offset(){return e.get(P)},get limit(){return e.get(I)},get total(){return e.get(C)},get locale(){return c()},get isMobile(){return f()},onPageChange:G})};e.if_block(d,v=>{e.get(C)>e.get(I)&&v(D)})}e.append(l,a)};e.if_block(V,l=>{e.get(R)?l(K):e.get(U)?l(Y,1):e.get(x).length?l(n,-1):l(J,2)})}e.reset(T),e.template_effect(()=>s=e.set_class(T,1,"challenge-history svelte-or1pjf",null,s,{anonymous:e.get(R)})),e.append(i,T);var w=e.pop(F);return E(),w}e.delegate(["click"]);e.create_custom_element(_e,{userSession:{},locale:{},translationUrl:{},endpoint:{},domainId:{},userId:{},isMobile:{},limit:{}},[],[],{mode:"open"});if(typeof window<"u"){let i=function(t){return function(...r){try{return t.apply(this,r)}catch(o){if(o instanceof DOMException&&o.message.includes("has already been used with this registry")||o instanceof Error&&o.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw o}}};customElements.define=i(customElements.define),Promise.resolve().then(()=>require("./ChallengeHistory-DDWHc60D.cjs")).then(t=>{const r=t.default||t;customElements.get("challenge-history")||customElements.define("challenge-history",r.element||r)}).catch(t=>{console.error("BOOT ERROR:",t)})}var Ct=e.from_html('<div class="player-challenges__tab-content svelte-kfnpxs"><!></div>');const wt={hash:"svelte-kfnpxs",code:".player-challenges__tab-content.svelte-kfnpxs {width:100%;}"};function Le(i,t){e.push(t,!0),e.append_styles(i,wt);const r=e.prop(t,"activeTab",7),o=e.prop(t,"challenges",7),E=e.prop(t,"endpoint",7),g=e.prop(t,"userSession",7),c=e.prop(t,"userId",7),p=e.prop(t,"domainId",7),m=e.prop(t,"locale",7),b=e.prop(t,"historyLimit",7,10),h=e.prop(t,"onViewDetails",7),f=e.prop(t,"isMobile",7),u=e.user_derived(()=>e.CHALLENGES_TAB_LIST_KIND[r()]),x=e.user_derived(()=>!g()&&!c()),C=e.user_derived(()=>e.get(u)?o().getState(e.get(u)):void 0),P=e.user_derived(()=>{switch(r()){case e.ChallengesTab.Promo:return o().promoChallenges;case e.ChallengesTab.Active:return o().activeChallenges;case e.ChallengesTab.Pending:return o().pendingChallenges;default:return[]}}),U=()=>{e.get(u)&&o().loadMore(e.get(u),e.get(x))},S=s=>{e.get(u)&&o().loadPage(e.get(u),e.get(x),Math.floor(s/e.LIMIT_DEFAULT))},I=()=>{e.get(u)&&o().load(e.get(u),e.get(x))};var R={get activeTab(){return r()},set activeTab(s){r(s),e.flushSync()},get challenges(){return o()},set challenges(s){o(s),e.flushSync()},get endpoint(){return E()},set endpoint(s){E(s),e.flushSync()},get userSession(){return g()},set userSession(s){g(s),e.flushSync()},get userId(){return c()},set userId(s){c(s),e.flushSync()},get domainId(){return p()},set domainId(s){p(s),e.flushSync()},get locale(){return m()},set locale(s){m(s),e.flushSync()},get historyLimit(){return b()},set historyLimit(s=10){b(s),e.flushSync()},get onViewDetails(){return h()},set onViewDetails(s){h(s),e.flushSync()},get isMobile(){return f()},set isMobile(s){f(s),e.flushSync()}},M=Ct(),G=e.child(M);{var q=s=>{fe(s,{get endpoint(){return E()},get userSession(){return g()},get domainId(){return p()},get locale(){return m()}})},F=s=>{_e(s,{get endpoint(){return E()},get userSession(){return g()},get userId(){return c()},get domainId(){return p()},get locale(){return m()},get limit(){return b()},get isMobile(){return f()}})},T=s=>{{let V=e.user_derived(()=>e.get(C)?.loading??!1),K=e.user_derived(()=>e.get(C)?.hasMore??!1),Y=e.user_derived(()=>r()===e.ChallengesTab.Promo),J=e.user_derived(()=>r()===e.ChallengesTab.Pending),n=e.user_derived(()=>e.get(C)?.totalCount??0),w=e.user_derived(()=>(e.get(C)?.pageNumber??e.PAGE_NUMBER_DEFAULT)*e.LIMIT_DEFAULT);Qe.ChallengeList(s,{get challenges(){return e.get(P)},get loading(){return e.get(V)},get hasMore(){return e.get(K)},get pausedChallengeIds(){return o().pausedChallengeIds},get isPromo(){return e.get(Y)},get isPending(){return e.get(J)},get total(){return e.get(n)},get pageSize(){return e.LIMIT_DEFAULT},get offset(){return e.get(w)},onPageChange:S,onLoadMore:U,onStatusChange:(l,a)=>o().patchProgress(l,{Status:a}),onClaimed:I,get onViewDetails(){return h()},get endpoint(){return E()},get userSession(){return g()},get userId(){return c()},get domainId(){return p()},get locale(){return m()},get isMobile(){return f()}})}};e.if_block(G,s=>{r()===e.ChallengesTab.Code?s(q):r()===e.ChallengesTab.Finished?s(F,1):s(T,-1)})}return e.reset(M),e.append(i,M),e.pop(R)}e.create_custom_element(Le,{activeTab:{},challenges:{},endpoint:{},userSession:{},userId:{},domainId:{},locale:{},historyLimit:{},onViewDetails:{},isMobile:{}},[],[],{mode:"open"});exports.ChallengeClaimCode=fe;exports.ChallengeHistory=_e;exports.ChallengeTabContent=Le;
@@ -1,15 +0,0 @@
1
- typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-BtbgPMyA.cjs");var S=e.from_html('<span class="challenge-details__skeleton--tab svelte-133gc1o"><span class="challenge-details__skeleton--box svelte-133gc1o"></span></span>'),A=e.from_html('<div class="challenge-details__skeleton--tabs svelte-133gc1o"></div>'),C=e.from_html('<span class="challenge-details__skeleton--box challenge-details__skeleton--game svelte-133gc1o"></span>'),L=e.from_html('<div class="challenge-details__skeleton--games svelte-133gc1o"></div>'),R=e.from_html('<span class="challenge-details__skeleton--box challenge-details__skeleton--line svelte-133gc1o"></span>'),D=e.from_html('<div class="challenge-details__skeleton--events svelte-133gc1o"></div>'),O=e.from_html('<div class="challenge-details__skeleton--rules-item svelte-133gc1o"><span class="challenge-details__skeleton--box challenge-details__skeleton--line short svelte-133gc1o"></span> <span class="challenge-details__skeleton--box challenge-details__skeleton--line svelte-133gc1o"></span></div>'),M=e.from_html('<div class="challenge-details__skeleton--rules svelte-133gc1o"><span class="challenge-details__skeleton--box challenge-details__skeleton--rules-description svelte-133gc1o"></span> <span class="challenge-details__skeleton--box challenge-details__skeleton--rules-link svelte-133gc1o"></span> <span class="challenge-details__skeleton--box challenge-details__skeleton--line svelte-133gc1o"></span> <span class="challenge-details__skeleton--box challenge-details__skeleton--rules-button svelte-133gc1o"></span> <div class="challenge-details__skeleton--rules-details svelte-133gc1o"></div></div>'),W=e.from_html('<span class="challenge-details__skeleton--box challenge-details__skeleton--level-node svelte-133gc1o"></span> <span class="challenge-details__skeleton--box challenge-details__skeleton--level-card svelte-133gc1o"></span>',1),j=e.from_html('<div class="challenge-details__skeleton--levels svelte-133gc1o"></div>'),G=e.from_html('<div class="challenge-details__skeleton svelte-133gc1o" aria-busy="true" aria-live="polite"><!> <!></div>');const H={hash:"svelte-133gc1o",code:`.challenge-details__skeleton.svelte-133gc1o {display:flex;flex-direction:column;width:100%;.challenge-details__skeleton--box:where(.svelte-133gc1o) {display:block;width:100%;border-radius:6px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));
2
- animation: svelte-133gc1o-challenge-details-skeleton-pulse 1.2s ease-in-out infinite;}.challenge-details__skeleton--tabs:where(.svelte-133gc1o) {display:flex;flex-direction:row;justify-content:center;align-items:center;border-bottom:1px solid var(--border-default, rgba(251, 251, 251, 0.15));}.challenge-details__skeleton--tab:where(.svelte-133gc1o) {box-sizing:border-box;flex-grow:1;height:36px;padding:12px 10px;display:flex;justify-content:center;}.challenge-details__skeleton--tab:where(.svelte-133gc1o) .challenge-details__skeleton--box:where(.svelte-133gc1o) {width:100%;max-width:72px;height:12px;}.challenge-details__skeleton--events:where(.svelte-133gc1o) {display:flex;flex-direction:column;gap:22px;padding:12px 0;}.challenge-details__skeleton--line:where(.svelte-133gc1o) {height:18px;}.challenge-details__skeleton--line.short:where(.svelte-133gc1o) {width:35%;}.challenge-details__skeleton--events:where(.svelte-133gc1o) .challenge-details__skeleton--line:where(.svelte-133gc1o):nth-child(2n) {width:78%;}.challenge-details__skeleton--events:where(.svelte-133gc1o) .challenge-details__skeleton--line:where(.svelte-133gc1o):nth-child(3n) {width:62%;}.challenge-details__skeleton--rules:where(.svelte-133gc1o) {display:flex;flex-direction:column;align-items:flex-start;padding:0 12px;}.challenge-details__skeleton--rules-description:where(.svelte-133gc1o) {height:54px;}.challenge-details__skeleton--rules-link:where(.svelte-133gc1o) {width:180px;height:18px;margin:32px 0;}.challenge-details__skeleton--rules-button:where(.svelte-133gc1o) {width:140px;height:15px;margin:14px 0;}.challenge-details__skeleton--rules-details:where(.svelte-133gc1o) {display:flex;flex-direction:column;gap:18px;width:100%;}.challenge-details__skeleton--rules-item:where(.svelte-133gc1o) {display:flex;flex-direction:column;gap:4px;width:100%;}.challenge-details__skeleton--levels:where(.svelte-133gc1o) {display:grid;grid-template-columns:auto 1fr;column-gap:12px;row-gap:var(--challenge-levels-row-gap, 16px);align-items:stretch;padding-top:12px;}.challenge-details__skeleton--level-node:where(.svelte-133gc1o) {width:32px;height:32px;border-radius:50%;align-self:start;}.challenge-details__skeleton--level-card:where(.svelte-133gc1o) {height:106px;}.challenge-details__skeleton--games:where(.svelte-133gc1o) {display:grid;grid-template-columns:repeat(5, 1fr);gap:8px;padding-top:12px;}.challenge-details__skeleton--game:where(.svelte-133gc1o) {width:100%;height:auto;aspect-ratio:1 / 1;}
3
-
4
- @media (max-width: 767px) {.challenge-details__skeleton--games:where(.svelte-133gc1o) {grid-template-columns:repeat(3, 1fr);}
5
- }}
6
-
7
- @keyframes svelte-133gc1o-challenge-details-skeleton-pulse {
8
- 50% {
9
- opacity: 0.5;
10
- }
11
- }
12
-
13
- @media (prefers-reduced-motion: reduce) {.challenge-details__skeleton.svelte-133gc1o .challenge-details__skeleton--box:where(.svelte-133gc1o) {
14
- animation: none;}
15
- }`};function h(d,i){e.push(i,!0),e.append_styles(d,H);const n=e.prop(i,"activeTab",7),c=e.prop(i,"showTabs",7,!0),_=3,v=3,p=4,x=3,k=10;var m={get activeTab(){return n()},set activeTab(l){n(l),e.flushSync()},get showTabs(){return c()},set showTabs(l=!0){c(l),e.flushSync()}},r=G(),g=e.child(r);{var b=l=>{var s=A();e.each(s,21,()=>Array(_),e.index,(t,o)=>{var a=S();e.append(t,a)}),e.reset(s),e.append(l,s)};e.if_block(g,l=>{c()&&l(b)})}var u=e.sibling(g,2);{var f=l=>{var s=L();e.each(s,21,()=>Array(k),e.index,(t,o)=>{var a=C();e.append(t,a)}),e.reset(s),e.append(l,s)},w=l=>{var s=D();e.each(s,21,()=>Array(p),e.index,(t,o)=>{var a=R();e.append(t,a)}),e.reset(s),e.append(l,s)},y=l=>{var s=M(),t=e.sibling(e.child(s),8);e.each(t,21,()=>Array(x),e.index,(o,a)=>{var E=O();e.append(o,E)}),e.reset(t),e.reset(s),e.append(l,s)},T=l=>{var s=j();e.each(s,21,()=>Array(v),e.index,(t,o)=>{var a=W();e.next(2),e.append(t,a)}),e.reset(s),e.append(l,s)};e.if_block(u,l=>{n()===e.ChallengeDetailsTab.Games?l(f):n()===e.ChallengeDetailsTab.Events?l(w,1):n()===e.ChallengeDetailsTab.Rules?l(y,2):l(T,-1)})}return e.reset(r),e.append(d,r),e.pop(m)}e.create_custom_element(h,{activeTab:{},showTabs:{}},[],[],{mode:"open"});exports.ChallengeTabSkeleton=h;
@@ -1,14 +0,0 @@
1
- typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const To="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(To);const Co=1,Ao=2,Ts=4,Io=8,Po=16,Oo=1,$o=4,No=8,Mo=16,Ho=1,Do=2,Cs="[",ci="[!",Zi="[?",hi="]",tn={},ge=Symbol("uninitialized"),Bo="http://www.w3.org/1999/xhtml",As=!1;var Is=Array.isArray,Lo=Array.prototype.indexOf,Jn=Array.prototype.includes,hr=Array.from,Qn=Object.keys,Pn=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,Ro=Object.getOwnPropertyDescriptors,Fo=Object.prototype,ko=Array.prototype,Ps=Object.getPrototypeOf,Ji=Object.isExtensible;const bt=()=>{};function Os(e){for(var t=0;t<e.length;t++)e[t]()}function $s(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const ye=2,nn=4,Dn=8,Ns=1<<24,Ze=16,Ye=32,at=64,Fr=128,Ve=512,me=1024,pe=2048,Ke=4096,Pe=8192,ke=16384,zt=32768,kr=1<<25,rn=65536,Kn=1<<17,Go=1<<18,Yt=1<<19,Ms=1<<20,rt=1<<25,jt=65536,er=1<<21,en=1<<22,It=1<<23,Cn=Symbol("$state"),Hs=Symbol("legacy props"),Uo=Symbol(""),Ds=Symbol("attributes"),Gr=Symbol("class"),Ur=Symbol("style"),jr=Symbol("text"),Bs=Symbol("form reset"),Bn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ls=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),dr=3,Ln=8;function Rs(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function jo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Vo(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function zo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Yo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Xo(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Wo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qo(){throw new Error("https://svelte.dev/e/hydration_failed")}function Zo(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Jo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qo(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ko(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function eu(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function tu(){console.warn("https://svelte.dev/e/derived_inert")}function pr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function nu(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let te=!1;function gt(e){te=e}let K;function Me(e){if(e===null)throw pr(),tn;return K=e}function vr(){return Me(ut(K))}function On(e){if(te){if(ut(K)!==null)throw pr(),tn;K=e}}function Fs(e=1){if(te){for(var t=e,n=K;t--;)n=ut(n);K=n}}function tr(e=!0){for(var t=0,n=K;;){if(n.nodeType===Ln){var r=n.data;if(r===hi){if(t===0)return n;t-=1}else(r===Cs||r===ci||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ut(n);e&&n.remove(),n=i}}function ks(e){if(!e||e.nodeType!==Ln)throw pr(),tn;return e.data}function Gs(e){return e===this.v}function Us(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function js(e){return!Us(e,this.v)}let ru=!1,xe=null;function sn(e){xe=e}function gr(e,t=!1,n){xe={p:xe,i:!1,c:null,e:null,s:e,x:null,r:V,l:null}}function mr(e){var t=xe,n=t.e;if(n!==null){t.e=null;for(var r of n)da(r)}return e!==void 0&&(t.x=e),t.i=!0,xe=t.p,e??{}}function Vs(){return!0}let Dt=[];function zs(){var e=Dt;Dt=[],Os(e)}function mt(e){if(Dt.length===0&&!An){var t=Dt;queueMicrotask(()=>{t===Dt&&zs()})}Dt.push(e)}function iu(){for(;Dt.length>0;)zs()}function Ys(e){var t=V;if(t===null)return Z.f|=It,e;if(!(t.f&zt)&&!(t.f&nn))throw e;Tt(e,t)}function Tt(e,t){if(!(t!==null&&t.f&ke)){for(;t!==null;){if(t.f&Fr){if(!(t.f&zt))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const su=-7169;function fe(e,t){e.f=e.f&su|t}function di(e){e.f&Ve||e.deps===null?fe(e,me):fe(e,Ke)}function Xs(e){if(e!==null)for(const t of e)!(t.f&ye)||!(t.f&jt)||(t.f^=jt,Xs(t.deps))}function Ws(e,t,n){e.f&pe?t.add(e):e.f&Ke&&n.add(e),Xs(e.deps),fe(e,me)}function pi(e,t,n){if(e==null)return t(void 0),n&&n(void 0),bt;const r=$t(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const Jt=[];function au(e,t){return{subscribe:_r(e,t).subscribe}}function _r(e,t=bt){let n=null;const r=new Set;function i(o){if(Us(e,o)&&(e=o,n)){const u=!Jt.length;for(const l of r)l[1](),Jt.push(l,e);if(u){for(let l=0;l<Jt.length;l+=2)Jt[l][0](Jt[l+1]);Jt.length=0}}}function s(o){i(o(e))}function a(o,u=bt){const l=[o,u];return r.add(l),r.size===1&&(n=t(i,s)||bt),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:a}}function dn(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return au(n,(a,o)=>{let u=!1;const l=[];let f=0,c=bt;const h=()=>{if(f)return;c();const g=t(r?l[0]:l,a,o);s?a(g):c=typeof g=="function"?g:bt},d=i.map((g,_)=>pi(g,m=>{l[_]=m,f&=~(1<<_),u&&h()},()=>{f|=1<<_}));return u=!0,h(),function(){Os(d),c(),u=!1}})}function ou(e){let t;return pi(e,n=>t=n)(),t}let Gn=!1,Vr=Symbol("unmounted");function vi(e,t,n){const r=n[t]??={store:null,source:yi(void 0),unsubscribe:bt};if(r.store!==e&&!(Vr in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=bt;else{var i=!0;r.unsubscribe=pi(e,s=>{i?r.source.v=s:ie(r.source,s)}),i=!1}return e&&Vr in n?ou(e):B(r.source)}function gi(){const e={};function t(){ca(()=>{for(var n in e)e[n].unsubscribe();Pn(e,Vr,{enumerable:!1,value:!0})})}return[e,t]}function uu(e){var t=Gn;try{return Gn=!1,[e(),Gn]}finally{Gn=t}}let Qi=!1;function lu(){Qi||(Qi=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Bs]?.()})},{capture:!0}))}function br(e){var t=Z,n=V;Xe(null),ot(null);try{return e()}finally{Xe(t),ot(n)}}function fu(e){let t=0,n=Vt(0),r;return()=>{Si()&&(B(n),Ci(()=>(t===0&&(r=$t(()=>e(()=>In(n)))),t+=1,()=>{mt(()=>{t-=1,t===0&&(r?.(),r=void 0,In(n))})})))}}var cu=rn|Yt;function hu(e,t,n,r){new du(e,t,n,r)}class du{parent;is_pending=!1;transform_error;#e;#t=te?K:null;#n;#o;#i;#a=null;#r=null;#u=null;#s=null;#v=0;#l=0;#f=!1;#h=new Set;#g=new Set;#c=null;#_=fu(()=>(this.#c=Vt(this.#v),()=>{this.#c=null}));constructor(t,n,r,i){this.#e=t,this.#n=n,this.#o=s=>{var a=V;a.b=this,a.f|=Fr,r(s)},this.parent=V.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#i=Ii(()=>{if(te){const s=this.#t;vr();const a=s.data===ci;if(s.data.startsWith(Zi)){const u=JSON.parse(s.data.slice(Zi.length));this.#b(u)}else a?this.#w():this.#m()}else this.#d()},cu),te&&(this.#e=K)}#m(){try{this.#a=Ue(()=>this.#o(this.#e))}catch(t){this.error(t)}}#b(t){const n=this.#n.failed,{reset:r,invoke_onerror:i}=this.#y(t);mt(i),n&&(this.#u=Ue(()=>{n(this.#e,()=>t,()=>r)}))}#y(t){var n=!1,r=!1;const i=()=>{if(n){nu();return}n=!0,r&&eu(),this.#u!==null&&Ft(this.#u,()=>{this.#u=null}),this.#p(()=>{this.#d()})};return{reset:i,invoke_onerror:()=>{try{r=!0,this.#n.onerror?.(t,i),r=!1}catch(a){Tt(a,this.#i&&this.#i.parent)}}}}#w(){const t=this.#n.pending;t&&(this.is_pending=!0,this.#r=Ue(()=>t(this.#e)),mt(()=>{var n=this.#s=document.createDocumentFragment(),r=ze();n.append(r),this.#a=this.#p(()=>Ue(()=>this.#o(r))),this.#l===0&&(this.#e.before(n),this.#s=null,Ft(this.#r,()=>{this.#r=null}),this.#E(ee))}))}#d(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#v=0,this.#a=Ue(()=>{this.#o(this.#e)}),this.#l>0){var t=this.#s=document.createDocumentFragment();Oi(this.#a,t);const n=this.#n.pending;this.#r=Ue(()=>n(this.#e))}else this.#E(ee)}catch(n){this.error(n)}}#E(t){this.is_pending=!1,t.transfer_effects(this.#h,this.#g)}defer_effect(t){Ws(t,this.#h,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#p(t){var n=V,r=Z,i=xe;ot(this.#i),Xe(this.#i),sn(this.#i.ctx);try{return yt.ensure(),t()}catch(s){return Ys(s),null}finally{ot(n),Xe(r),sn(i)}}#x(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#x(t,n);return}this.#l+=t,this.#l===0&&(this.#E(n),this.#r&&Ft(this.#r,()=>{this.#r=null}),this.#s&&(this.#e.before(this.#s),this.#s=null))}update_pending_count(t,n){this.#x(t,n),this.#v+=t,!(!this.#c||this.#f)&&(this.#f=!0,mt(()=>{this.#f=!1,this.#c&&an(this.#c,this.#v)}))}get_effect_pending(){return this.#_(),B(this.#c)}error(t){if(!this.#n.onerror&&!this.#n.failed)throw t;ee?.is_fork?(this.#a&&ee.skip_effect(this.#a),this.#r&&ee.skip_effect(this.#r),this.#u&&ee.skip_effect(this.#u),ee.oncommit(()=>{this.#S(t)})):this.#S(t)}#S(t){this.#a&&(Oe(this.#a),this.#a=null),this.#r&&(Oe(this.#r),this.#r=null),this.#u&&(Oe(this.#u),this.#u=null),te&&(Me(this.#t),Fs(),Me(tr()));let n=this.#n.failed;const r=i=>{const{reset:s,invoke_onerror:a}=this.#y(i);a(),n&&(this.#u=this.#p(()=>{try{return Ue(()=>{var o=V;o.b=this,o.f|=Fr,n(this.#e,()=>i,()=>s)})}catch(o){return Tt(o,this.#i.parent),null}}))};mt(()=>{var i;try{i=this.transform_error(t)}catch(s){Tt(s,this.#i&&this.#i.parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(r,s=>Tt(s,this.#i&&this.#i.parent)):r(i)})}}function pu(e,t,n,r){const i=$n;var s=e.filter(d=>!d.settled),a=t.map(i);if(n.length===0&&s.length===0){r(a);return}var o=V,u=vu(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function f(d){if(!(o.f&ke)){u();try{r([...a,...d])}catch(g){Tt(g,o)}nr()}}var c=qs();if(n.length===0){l.then(()=>f([])).finally(c);return}function h(){Promise.all(n.map(d=>gu(d))).then(f).catch(d=>Tt(d,o)).finally(c)}l?l.then(()=>{u(),h(),nr()}):h()}function vu(){var e=V,t=Z,n=xe,r=ee;return function(s=!0){ot(e),Xe(t),sn(n),s&&!(e.f&ke)&&(r?.activate(),r?.apply())}}function nr(e=!0){ot(null),Xe(null),sn(null),e&&ee?.deactivate()}function qs(){var e=V,t=e.b,n=ee,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function $n(e){var t=ye|pe;return V!==null&&(V.f|=Yt),{ctx:xe,deps:null,effects:null,equals:Gs,f:t,fn:e,reactions:null,rv:0,v:ge,wv:0,parent:V,ac:null}}const En=Symbol("obsolete");function gu(e,t,n){let r=V;r===null&&jo();var i=void 0,s=Vt(ge),a=!Z,o=new Set;return Au(()=>{var u=V,l=$s();i=l.promise;try{Promise.resolve(e()).then(l.resolve,d=>{d!==Bn&&l.reject(d)}).finally(nr)}catch(d){l.reject(d),nr()}var f=ee;if(a){if(u.f&zt)var c=qs();if(r.b?.is_rendered())f.async_deriveds.get(u)?.reject(En);else for(const d of o.values())d.reject(En);o.add(l),f.async_deriveds.set(u,l)}const h=(d,g=void 0)=>{c?.(),o.delete(l),g!==En&&(f.activate(),g?(s.f|=It,an(s,g)):(s.f&It&&(s.f^=It),an(s,d)),f.deactivate())};l.promise.then(h,d=>h(null,d||"unknown"))}),ca(()=>{for(const u of o)u.reject(En)}),new Promise(u=>{function l(f){function c(){f===i?u(s):l(i)}f.then(c,c)}l(i)})}function rr(e){const t=$n(e);return _a(t),t}function Zs(e){const t=$n(e);return t.equals=js,t}function mu(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Oe(t[n])}}function mi(e){var t,n=V,r=e.parent;if(!wt&&r!==null&&e.v!==ge&&r.f&(ke|Pe))return tu(),e.v;ot(r);try{e.f&=~jt,mu(e),t=wa(e)}finally{ot(n)}return t}function Js(e){var t=mi(e);if(!e.equals(t)&&(e.wv=ya(),(!ee?.is_fork||e.deps===null)&&(ee!==null?(ee.capture(e,t,!0),zr?.capture(e,t,!0)):e.v=t,e.deps===null))){fe(e,me);return}wt||(Je!==null?(Si()||ee?.is_fork)&&Je.set(e,t):di(e))}function _u(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&br(()=>{t.ac.abort(Bn),t.ac=null}),t.fn!==null&&(t.teardown=bt),Nn(t,0),Pi(t))}function Qs(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&on(t)}let Ir=null,Qt=null,ee=null,zr=null,Je=null,Yr=null,An=!1,Pr=!1,Kt=null,zn=null;var Ki=0;let bu=1;class yt{id=bu++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#o=new Set;#i=new Set;#a=0;#r=new Map;#u=null;#s=[];#v=[];#l=new Set;#f=new Set;#h=new Map;#g=new Set;is_fork=!1;#c=!1;constructor(){Qt===null?Ir=Qt=this:(Qt.#n=this,this.#t=Qt),Qt=this}#_(){if(this.is_fork)return!0;for(const r of this.#r.keys()){for(var t=r,n=!1;t.parent!==null;){if(this.#h.has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#g.delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=this.#h.get(t);if(r){this.#h.delete(t);for(var i of r.d)fe(i,pe),n(i);for(i of r.m)fe(i,Ke),n(i)}this.#g.add(t)}#m(){this.#e=!0,Ki++>1e3&&(this.#p(),yu());for(const u of this.#l)this.#f.delete(u),fe(u,pe),this.schedule(u);for(const u of this.#f)fe(u,Ke),this.schedule(u);const t=this.#s;this.#s=[],this.apply();var n=Kt=[],r=[],i=zn=[];for(const u of t)try{this.#b(u,n,r)}catch(l){throw ta(u),this.#_()||this.discard(),l}if(ee=null,i.length>0){var s=yt.ensure();for(const u of i)s.schedule(u)}if(Kt=null,zn=null,this.#_()){this.#d(r),this.#d(n);for(const[u,l]of this.#h)ea(u,l);i.length>0&&ee.#m();return}const a=this.#y();if(a){this.#d(r),this.#d(n),a.#w(this);return}this.#l.clear(),this.#f.clear();for(const u of this.#o)u(this);this.#o.clear(),zr=this,es(r),es(n),zr=null,this.#u?.resolve();var o=ee;if(this.#a===0&&(this.#s.length===0||o!==null)&&this.#p(),this.#s.length>0)if(o!==null){const u=o;u.#s.push(...this.#s.filter(l=>!u.#s.includes(l)))}else o=this;o!==null&&o.#m()}#b(t,n,r){t.f^=me;for(var i=t.first;i!==null;){var s=i.f,a=(s&(Ye|at))!==0,o=a&&(s&me)!==0,u=o||(s&Pe)!==0||this.#h.has(i);if(!u&&i.fn!==null){a?i.f^=me:s&nn?n.push(i):Rn(i)&&(s&Ze&&this.#f.add(i),on(i));var l=i.first;if(l!==null){i=l;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}}#y(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=t.#t}return null}#w(t){for(const[r,i]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,i);for(const[r,i]of t.async_deriveds){const s=this.async_deriveds.get(r);s&&i.promise.then(s.resolve).catch(s.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#l,t.#f);const n=r=>{var i=r.reactions;if(i!==null&&!(r.f&ye&&!(r.f&(pe|Ke))))for(const o of i){var s=o.f;if(s&ye)n(o);else{var a=o;s&(en|Ze)&&!this.async_deriveds.has(a)&&(this.#f.delete(a),fe(a,pe),this.schedule(a))}}};for(const r of this.current.keys())n(r);this.oncommit(()=>t.discard()),t.#p(),ee=this,this.#m()}#d(t){for(var n=0;n<t.length;n+=1)Ws(t[n],this.#l,this.#f)}capture(t,n,r=!1){t.v!==ge&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&It||(this.current.set(t,[n,r]),Je?.set(t,n)),this.is_fork||(t.v=n)}activate(){ee=this}deactivate(){ee=null,Je=null}flush(){try{Pr=!0,ee=this,this.#m()}finally{Ki=0,Yr=null,Kt=null,zn=null,Pr=!1,ee=null,Je=null,Rt.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear();for(const t of this.async_deriveds.values())t.reject(En);this.#p(),this.#u?.resolve()}register_created_effect(t){this.#v.push(t)}#E(){for(let c=Ir;c!==null;c=c.#n){var t=c.id<this.id,n=[];for(const[h,[d,g]]of this.current){if(c.current.has(h)){var r=c.current.get(h)[0];if(t&&d!==r)c.current.set(h,[d,g]);else continue}n.push(h)}if(t)for(const[h,d]of this.async_deriveds){const g=c.async_deriveds.get(h);g&&d.promise.then(g.resolve).catch(g.reject)}var i=[...c.current.keys()].filter(h=>!c.current.get(h)[1]);if(!(!c.#e||i.length===0)){var s=i.filter(h=>!this.current.has(h));if(s.length===0)t&&c.discard();else if(n.length>0){if(t)for(const h of this.#g)c.unskip_effect(h,d=>{d.f&(Ze|en)?c.schedule(d):c.#d([d])});c.activate();var a=new Set,o=new Map;for(var u of n)Ks(u,s,a,o);o=new Map;var l=[...c.current].filter(([h,d])=>{const g=this.current.get(h);return g?g[0]!==d[0]||g[1]!==d[1]:!0}).map(([h])=>h);if(l.length>0)for(const h of this.#v)!(h.f&(ke|Pe|Kn))&&_i(h,l,o)&&(h.f&(en|Ze)?(fe(h,pe),c.schedule(h)):c.#l.add(h));if(c.#s.length>0&&!c.#c){c.apply();for(var f of c.#s)c.#b(f,[],[]);c.#s=[]}c.deactivate()}}}}increment(t,n){if(this.#a+=1,t){let r=this.#r.get(n)??0;this.#r.set(n,r+1)}}decrement(t,n){if(this.#a-=1,t){let r=this.#r.get(n)??0;r===1?this.#r.delete(n):this.#r.set(n,r-1)}this.#c||(this.#c=!0,mt(()=>{this.#c=!1,this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)this.#l.add(r);for(const r of n)this.#f.add(r);t.clear(),n.clear()}oncommit(t){this.#o.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#u??=$s()).promise}static ensure(){if(ee===null){const t=ee=new yt;!Pr&&!An&&mt(()=>{t.#e||t.flush()})}return ee}apply(){{Je=null;return}}schedule(t){if(Yr=t,t.b?.is_pending&&t.f&(nn|Dn|Ns)&&!(t.f&zt)){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Kt!==null&&n===V&&(Z===null||!(Z.f&ye)))return;if(r&(at|Ye)){if(!(r&me))return;n.f^=me}}this.#s.push(n)}#p(){if(this.linked){var t=this.#t,n=this.#n;t===null?Ir=n:t.#n=n,n===null?Qt=t:n.#t=t,this.linked=!1}}}function _t(e){var t=An;An=!0;try{for(var n;;){if(iu(),ee===null)return n;ee.flush()}}finally{An=t}}function yu(){try{Wo()}catch(e){Tt(e,Yr)}}let vt=null;function es(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(ke|Pe))&&Rn(r)&&(vt=new Set,on(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&va(r),vt?.size>0)){Rt.clear();for(const i of vt){if(i.f&(ke|Pe))continue;const s=[i];let a=i.parent;for(;a!==null;)vt.has(a)&&(vt.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const u=s[o];u.f&(ke|Pe)||on(u)}}vt.clear()}}vt=null}}function Ks(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;s&ye?Ks(i,t,n,r):s&(en|Ze)&&!(s&pe)&&_i(i,t,r)&&(fe(i,pe),bi(i))}}function _i(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Jn.call(t,i))return!0;if(i.f&ye&&_i(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function bi(e){ee.schedule(e)}function ea(e,t){if(!(e.f&Ye&&e.f&me)){e.f&pe?t.d.push(e):e.f&Ke&&t.m.push(e),fe(e,me);for(var n=e.first;n!==null;)ea(n,t),n=n.next}}function ta(e){fe(e,me);for(var t=e.first;t!==null;)ta(t),t=t.next}let ir=new Set;const Rt=new Map;let na=!1;function Vt(e,t){var n={f:0,v:e,reactions:null,equals:Gs,rv:0,wv:0};return n}function Ie(e,t){const n=Vt(e);return _a(n),n}function yi(e,t=!1,n=!0){const r=Vt(e);return t||(r.equals=js),r}function ie(e,t,n=!1){Z!==null&&(!Qe||Z.f&Kn)&&Vs()&&Z.f&(ye|Ze|en|Kn)&&(it===null||!it.has(e))&&Ko();let r=n?Fe(t):t;return an(e,r,zn)}function an(e,t,n=null){if(!e.equals(t)){Rt.set(e,wt?t:e.v);var r=yt.ensure();if(r.capture(e,t),e.f&ye){const i=e;e.f&pe&&mi(i),Je===null&&di(i)}e.wv=ya(),ra(e,pe,n),V!==null&&V.f&me&&!(V.f&(Ye|at))&&(Ge===null?Ou([e]):Ge.push(e)),!r.is_fork&&ir.size>0&&!na&&Eu()}return t}function Eu(){na=!1;for(const e of ir){e.f&me&&fe(e,Ke);let t;try{t=Rn(e)}catch{t=!0}t&&on(e)}ir.clear()}function In(e){ie(e,e.v+1)}function ra(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var a=r[s],o=a.f,u=(o&pe)===0;if(u&&fe(a,t),o&Kn)ir.add(a);else if(o&ye){var l=a;Je?.delete(l),o&jt||(o&Ve&&(V===null||!(V.f&er))&&(a.f|=jt),ra(l,Ke,n))}else if(u){var f=a;o&Ze&&vt!==null&&vt.add(f),n!==null?n.push(f):bi(f)}}}function Fe(e){if(typeof e!="object"||e===null||Cn in e)return e;const t=Ps(e);if(t!==Fo&&t!==ko)return e;var n=new Map,r=Is(e),i=Ie(0),s=kt,a=o=>{if(kt===s)return o();var u=Z,l=kt;Xe(null),rs(s);var f=o();return Xe(u),rs(l),f};return r&&n.set("length",Ie(e.length)),new Proxy(e,{defineProperty(o,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Jo();var f=n.get(u);return f===void 0?a(()=>{var c=Ie(l.value);return n.set(u,c),c}):ie(f,l.value,!0),!0},deleteProperty(o,u){var l=n.get(u);if(l===void 0){if(u in o){const f=a(()=>Ie(ge));n.set(u,f),In(i)}}else ie(l,ge),In(i);return!0},get(o,u,l){if(u===Cn)return e;var f=n.get(u),c=u in o;if(f===void 0&&(!c||Lt(o,u)?.writable)&&(f=a(()=>{var d=Fe(c?o[u]:ge),g=Ie(d);return g}),n.set(u,f)),f!==void 0){var h=B(f);return h===ge?void 0:h}return Reflect.get(o,u,l)},getOwnPropertyDescriptor(o,u){var l=Reflect.getOwnPropertyDescriptor(o,u);if(l&&"value"in l){var f=n.get(u);f&&(l.value=B(f))}else if(l===void 0){var c=n.get(u),h=c?.v;if(c!==void 0&&h!==ge)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(o,u){if(u===Cn)return!0;var l=n.get(u),f=l!==void 0&&l.v!==ge||Reflect.has(o,u);if(l!==void 0||V!==null&&(!f||Lt(o,u)?.writable)){l===void 0&&(l=a(()=>{var h=f?Fe(o[u]):ge,d=Ie(h);return d}),n.set(u,l));var c=B(l);if(c===ge)return!1}return f},set(o,u,l,f){var c=n.get(u),h=u in o;if(r&&u==="length")for(var d=l;d<c.v;d+=1){var g=n.get(d+"");g!==void 0?ie(g,ge):d in o&&(g=a(()=>Ie(ge)),n.set(d+"",g))}if(c===void 0)(!h||Lt(o,u)?.writable)&&(c=a(()=>Ie(void 0)),ie(c,Fe(l)),n.set(u,c));else{h=c.v!==ge;var _=a(()=>Fe(l));ie(c,_)}var m=Reflect.getOwnPropertyDescriptor(o,u);if(m?.set&&m.set.call(f,l),!h){if(r&&typeof u=="string"){var $=n.get("length"),U=Number(u);Number.isInteger(U)&&U>=$.v&&ie($,U+1)}In(i)}return!0},ownKeys(o){B(i);var u=Reflect.ownKeys(o).filter(c=>{var h=n.get(c);return h===void 0||h.v!==ge});for(var[l,f]of n)f.v!==ge&&!(l in o)&&u.push(l);return u},setPrototypeOf(){Qo()}})}var ts,ia,sa,aa;function Xr(){if(ts===void 0){ts=window,ia=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;sa=Lt(t,"firstChild").get,aa=Lt(t,"nextSibling").get,Ji(e)&&(e[Gr]=void 0,e[Ds]=null,e[Ur]=void 0,e.__e=void 0),Ji(n)&&(n[jr]=void 0)}}function ze(e=""){return document.createTextNode(e)}function Et(e){return sa.call(e)}function ut(e){return aa.call(e)}function Ei(e,t){if(!te)return Et(e);var n=Et(K);if(n===null)n=K.appendChild(ze());else if(t&&n.nodeType!==dr){var r=ze();return n?.before(r),Me(r),r}return t&&xi(n),Me(n),n}function wu(e,t=!1){if(!te){var n=Et(e);return n instanceof Comment&&n.data===""?ut(n):n}if(t){if(K?.nodeType!==dr){var r=ze();return K?.before(r),Me(r),r}xi(K)}return K}function oa(e,t=1,n=!1){let r=te?K:e;for(var i;t--;)i=r,r=ut(r);if(!te)return r;if(n){if(r?.nodeType!==dr){var s=ze();return r===null?i?.after(s):r.before(s),Me(s),s}xi(r)}return Me(r),r}function ua(e){e.textContent=""}function la(){return!1}function wi(e,t,n){return document.createElement(e)}function xi(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===dr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function fa(e){V===null&&(Z===null&&Xo(),Yo()),wt&&zo()}function xu(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function et(e,t){var n=V;n!==null&&n.f&Pe&&(e|=Pe);var r={ctx:xe,deps:null,nodes:null,f:e|pe|Ve,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};ee?.register_created_effect(r);var i=r;if(e&nn)Kt!==null?Kt.push(r):yt.ensure().schedule(r);else if(t!==null){try{on(r)}catch(a){throw Oe(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&Yt)&&(i=i.first,e&Ze&&e&rn&&i!==null&&(i.f|=rn))}if(i!==null&&(i.parent=n,n!==null&&xu(i,n),Z!==null&&Z.f&ye&&!(e&at))){var s=Z;(s.effects??=[]).push(i)}return r}function Si(){return Z!==null&&!Qe}function ca(e){const t=et(Dn,null);return fe(t,me),t.teardown=e,t}function ha(e){fa();var t=V.f,n=!Z&&(t&Ye)!==0&&xe!==null&&!xe.i;if(n){var r=xe;(r.e??=[]).push(e)}else return da(e)}function da(e){return et(nn|Ms,e)}function Su(e){return fa(),et(Dn|Ms,e)}function Tu(e){yt.ensure();const t=et(at|Yt,e);return()=>{Oe(t)}}function Cu(e){yt.ensure();const t=et(at|Yt,e);return(n={})=>new Promise(r=>{n.outro?Ft(t,()=>{Oe(t),r(void 0)}):(Oe(t),r(void 0))})}function Ti(e){return et(nn,e)}function Au(e){return et(en|Yt,e)}function Ci(e,t=0){return et(Dn|t,e)}function Ai(e,t=[],n=[],r=[]){pu(r,t,n,i=>{et(Dn,()=>{e(...i.map(B))})})}function Ii(e,t=0){var n=et(Ze|t,e);return n}function Ue(e){return et(Ye|Yt,e)}function pa(e){var t=e.teardown;if(t!==null){const n=wt,r=Z;ns(!0),Xe(null);try{t.call(null)}finally{ns(n),Xe(r)}}}function Pi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&br(()=>{i.abort(Bn)});var r=n.next;n.f&at?n.parent=null:Oe(n,t),n=r}}function Iu(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ye||Oe(t),t=n}}function Oe(e,t=!0){var n=!1;(t||e.f&Go)&&e.nodes!==null&&e.nodes.end!==null&&(Pu(e.nodes.start,e.nodes.end),n=!0),e.f|=kr,Pi(e,t&&!n),Nn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();pa(e),e.f^=kr,e.f|=ke;var i=e.parent;i!==null&&i.first!==null&&va(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Pu(e,t){for(;e!==null;){var n=e===t?null:ut(e);e.remove(),e=n}}function va(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ft(e,t,n=!0){var r=[];ga(e,r,!0);var i=()=>{n&&Oe(e),t&&t()},s=r.length;if(s>0){var a=()=>--s||i();for(var o of r)o.out(a)}else i()}function ga(e,t,n){if(!(e.f&Pe)){e.f^=Pe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next;if(!(i.f&at)){var a=(i.f&rn)!==0||(i.f&Ye)!==0&&(e.f&Ze)!==0;ga(i,t,a?n:!1)}i=s}}}function sr(e){ma(e,!0)}function ma(e,t){if(e.f&Pe){e.f^=Pe,e.f&me||(fe(e,pe),yt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&rn)!==0||(n.f&Ye)!==0;ma(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Oi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:ut(n);t.append(n),n=i}}let Yn=!1,wt=!1;function ns(e){wt=e}let Z=null,Qe=!1;function Xe(e){Z=e}let V=null;function ot(e){V=e}let it=null;function _a(e){Z!==null&&(it??=new Set).add(e)}let Ne=null,Re=0,Ge=null;function Ou(e){Ge=e}let ba=1,Bt=0,kt=Bt;function rs(e){kt=e}function ya(){return++ba}function Rn(e){var t=e.f;if(t&pe)return!0;if(t&ye&&(e.f&=~jt),t&Ke){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Rn(s)&&Js(s),s.wv>e.wv)return!0}t&Ve&&Je===null&&fe(e,me)}return!1}function Ea(e,t,n=!0){var r=e.reactions;if(r!==null&&!(it!==null&&it.has(e)))for(var i=0;i<r.length;i++){var s=r[i];s.f&ye?Ea(s,t,!1):t===s&&(n?fe(s,pe):s.f&me&&fe(s,Ke),bi(s))}}function wa(e){var t=Ne,n=Re,r=Ge,i=Z,s=it,a=xe,o=Qe,u=kt,l=e.f;Ne=null,Re=0,Ge=null,Z=l&(Ye|at)?null:e,it=null,sn(e.ctx),Qe=!1,kt=++Bt,e.ac!==null&&(br(()=>{e.ac.abort(Bn)}),e.ac=null);try{e.f|=er;var f=e.fn,c=f();e.f|=zt;var h=e.deps,d=ee?.is_fork;if(Ne!==null){var g;if(d||Nn(e,Re),h!==null&&Re>0)for(h.length=Re+Ne.length,g=0;g<Ne.length;g++)h[Re+g]=Ne[g];else e.deps=h=Ne;if(Si()&&e.f&Ve)for(g=Re;g<h.length;g++)(h[g].reactions??=[]).push(e)}else!d&&h!==null&&Re<h.length&&(Nn(e,Re),h.length=Re);if(Vs()&&Ge!==null&&!Qe&&h!==null&&!(e.f&(ye|Ke|pe)))for(g=0;g<Ge.length;g++)Ea(Ge[g],e);if(i!==null&&i!==e){if(Bt++,i.deps!==null)for(let _=0;_<n;_+=1)i.deps[_].rv=Bt;if(t!==null)for(const _ of t)_.rv=Bt;Ge!==null&&(r===null?r=Ge:r.push(...Ge))}return e.f&It&&(e.f^=It),c}catch(_){return Ys(_)}finally{e.f^=er,Ne=t,Re=n,Ge=r,Z=i,it=s,sn(a),Qe=o,kt=u}}function $u(e,t){let n=t.reactions;if(n!==null){var r=Lo.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&ye&&(Ne===null||!Jn.call(Ne,t))){var s=t;s.f&Ve&&(s.f^=Ve,s.f&=~jt),s.v!==ge&&di(s),s.ac!==null&&br(()=>{s.ac.abort(Bn),s.ac=null,fe(s,pe)}),_u(s),Nn(s,0)}}function Nn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)$u(e,n[r])}function on(e){var t=e.f;if(!(t&ke)){fe(e,me);var n=V,r=Yn;V=e,Yn=(t&(Ye|at))===0;try{t&(Ze|Ns)?Iu(e):Pi(e),pa(e);var i=wa(e);e.teardown=typeof i=="function"?i:null,e.wv=ba;var s;As&&ru&&e.f&pe&&e.deps}finally{Yn=r,V=n}}}function B(e){var t=e.f,n=(t&ye)!==0;if(Z!==null&&!Qe){var r=V!==null&&(V.f&ke)!==0;if(!r&&(it===null||!it.has(e))){var i=Z.deps;if(Z.f&er)e.rv<Bt&&(e.rv=Bt,Ne===null&&i!==null&&i[Re]===e?Re++:Ne===null?Ne=[e]:Ne.push(e));else{Z.deps??=[],Jn.call(Z.deps,e)||Z.deps.push(e);var s=e.reactions;s===null?e.reactions=[Z]:Jn.call(s,Z)||s.push(Z)}}}if(wt&&Rt.has(e))return Rt.get(e);if(n){var a=e;if(wt){var o=a.v;return(!(a.f&me)&&a.reactions!==null||Sa(a))&&(o=mi(a)),Rt.set(a,o),o}var u=(a.f&Ve)===0&&!Qe&&Z!==null&&(Yn||(Z.f&Ve)!==0),l=(a.f&zt)===0;Rn(a)&&(u&&(a.f|=Ve),Js(a)),u&&!l&&(Qs(a),xa(a))}if(Je?.has(e))return Je.get(e);if(e.f&It)throw e.v;return e.v}function xa(e){if(e.f|=Ve,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),t.f&ye&&!(t.f&Ve)&&(Qs(t),xa(t))}function Sa(e){if(e.v===ge)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Rt.has(t)||t.f&ye&&Sa(t))return!0;return!1}function $t(e){var t=Qe;try{return Qe=!0,e()}finally{Qe=t}}const wn=Symbol("events"),Ta=new Set,Wr=new Set;function $i(e,t,n){(t[wn]??={})[e]=n}function Ni(e){for(var t=0;t<e.length;t++)Ta.add(e[t]);for(var n of Wr)n(e)}let is=null;function ss(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;is=e;var a=0,o=is===e&&e[wn];if(o){var u=i.indexOf(o);if(u!==-1&&(t===document||t===window)){e[wn]=t;return}var l=i.indexOf(t);if(l===-1)return;u<=l&&(a=u)}if(s=i[a]||e.target,s!==t){Pn(e,"currentTarget",{configurable:!0,get(){return s||n}});var f=Z,c=V;Xe(null),ot(null);try{for(var h,d=[];s!==null&&s!==t;){try{var g=s[wn]?.[r];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(_){h?d.push(_):h=_}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(h){for(let _ of d)queueMicrotask(()=>{throw _});throw h}}finally{e[wn]=t,delete e.currentTarget,Xe(f),ot(c)}}}const Nu=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Mu(e){return Nu?.createHTML(e)??e}function Ca(e){var t=wi("template");return t.innerHTML=Mu(e.replaceAll("<!>","<!---->")),t.content}function Pt(e,t){var n=V;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function pn(e,t){var n=(t&Ho)!==0,r=(t&Do)!==0,i,s=!e.startsWith("<!>");return()=>{if(te)return Pt(K,null),K;i===void 0&&(i=Ca(s?e:"<!>"+e),n||(i=Et(i)));var a=r||ia?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Et(a),u=a.lastChild;Pt(o,u)}else Pt(a,a);return a}}function Hu(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,s;return()=>{if(te)return Pt(K,null),K;if(!s){var a=Ca(i),o=Et(a);s=Et(o)}var u=s.cloneNode(!0);return Pt(u,u),u}}function Du(e,t){return Hu(e,t,"svg")}function Bu(){if(te)return Pt(K,null),K;var e=document.createDocumentFragment(),t=document.createComment(""),n=ze();return e.append(t,n),Pt(t,n),e}function Gt(e,t){if(te){var n=V;(!(n.f&zt)||n.nodes.end===null)&&(n.nodes.end=K),vr();return}e!==null&&e.before(t)}const Lu=["touchstart","touchmove"];function Ru(e){return Lu.includes(e)}function Mi(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[jr]??=e.nodeValue)&&(e[jr]=n,e.nodeValue=`${n}`)}function Aa(e,t){return Ia(e,t)}function Fu(e,t){Xr(),t.intro=t.intro??!1;const n=t.target,r=te,i=K;try{for(var s=Et(n);s&&(s.nodeType!==Ln||s.data!==Cs);)s=ut(s);if(!s)throw tn;gt(!0),Me(s);const a=Ia(e,{...t,anchor:s});return gt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==tn&&console.warn("Failed to hydrate: ",a),t.recover===!1&&qo(),Xr(),ua(n),gt(!1),Aa(e,t)}finally{gt(r),Me(i)}}const Un=new Map;function Ia(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:o}){Xr();var u=void 0,l=Cu(()=>{var f=n??t.appendChild(ze());hu(f,{pending:()=>{}},d=>{gr({});var g=xe;if(s&&(g.c=s),i&&(r.$$events=i),te&&Pt(d,null),u=e(d,r)||{},te&&(V.nodes.end=K,K===null||K.nodeType!==Ln||K.data!==hi))throw pr(),tn;mr()},o);var c=new Set,h=d=>{for(var g=0;g<d.length;g++){var _=d[g];if(!c.has(_)){c.add(_);var m=Ru(_);for(const O of[t,document]){var $=Un.get(O);$===void 0&&($=new Map,Un.set(O,$));var U=$.get(_);U===void 0?(O.addEventListener(_,ss,{passive:m}),$.set(_,1)):$.set(_,U+1)}}}};return h(hr(Ta)),Wr.add(h),()=>{for(var d of c)for(const m of[t,document]){var g=Un.get(m),_=g.get(d);--_==0?(m.removeEventListener(d,ss),g.delete(d),g.size===0&&Un.delete(m)):g.set(d,_)}Wr.delete(h),f!==n&&f.parentNode?.removeChild(f)}});return qr.set(u,l),u}let qr=new WeakMap;function ku(e,t){const n=qr.get(e);return n?(qr.delete(e),n(t)):Promise.resolve()}class Gu{anchor;#e=new Map;#t=new Map;#n=new Map;#o=new Set;#i=!0;constructor(t,n=!0){this.anchor=t,this.#i=n}#a=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#t.get(n);if(r)sr(r),this.#o.delete(n);else{var i=this.#n.get(n);i&&(sr(i.effect),this.#t.set(n,i.effect),this.#n.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#n.get(a);o&&(Oe(o.effect),this.#n.delete(a))}for(const[s,a]of this.#t){if(s===n||this.#o.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var l=document.createDocumentFragment();Oi(a,l),l.append(ze()),this.#n.set(s,{effect:a,fragment:l})}else Oe(a);this.#o.delete(s),this.#t.delete(s)};this.#i||!r?(this.#o.add(s),Ft(a,o,!1)):o()}}};#r=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#n)n.includes(r)||(Oe(i.effect),this.#n.delete(r))};ensure(t,n){var r=ee,i=la();if(n&&!this.#t.has(t)&&!this.#n.has(t))if(i){var s=document.createDocumentFragment(),a=ze();s.append(a),this.#n.set(t,{effect:Ue(()=>n(a)),fragment:s})}else this.#t.set(t,Ue(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,u]of this.#t)o===t?r.unskip_effect(u):r.skip_effect(u);for(const[o,u]of this.#n)o===t?r.unskip_effect(u.effect):r.skip_effect(u.effect);r.oncommit(this.#a),r.ondiscard(this.#r)}else te&&(this.anchor=K),this.#a(r)}}function Uu(e){xe===null&&Rs(),ha(()=>{const t=$t(e);if(typeof t=="function")return t})}function ju(e){xe===null&&Rs(),Uu(()=>()=>$t(e))}function Pa(e,t,n=!1){var r;te&&(r=K,vr());var i=new Gu(e),s=n?rn:0;function a(o,u){if(te){var l=ks(r);if(o!==parseInt(l.substring(1))){var f=tr();Me(f),i.anchor=f,gt(!1),i.ensure(o,u),gt(!0);return}}i.ensure(o,u)}Ii(()=>{var o=!1;t((u,l=0)=>{o=!0,a(l,u)}),o||a(-1,null)},s)}function Oa(e,t){return t}function Vu(e,t,n){for(var r=[],i=t.length,s,a=t.length,o=0;o<i;o++){let c=t[o];Ft(c,()=>{if(s){if(s.pending.delete(c),s.done.add(c),s.pending.size===0){var h=e.outrogroups;Zr(e,hr(s.done)),h.delete(s),h.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var u=r.length===0&&n!==null&&e.pending.size===0;if(u){var l=n,f=l.parentNode;ua(f),f.append(l),e.items.clear()}Zr(e,t,!u)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Zr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const a of e.pending.values())for(const o of a)r.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=rt;const a=document.createDocumentFragment();Oi(s,a)}else Oe(t[i],n)}}var as;function Hi(e,t,n,r,i,s=null){var a=e,o=new Map,u=(t&Ts)!==0;if(u){var l=e;a=te?Me(Et(l)):l.appendChild(ze())}te&&vr();var f=null,c=Zs(()=>{var O=n();return Is(O)?O:O==null?[]:hr(O)}),h,d=new Map,g=!0;function _(O){U.effect.f&ke||(U.pending.delete(O),U.fallback=f,zu(U,h,a,t,r),f!==null&&(h.length===0?f.f&rt?(f.f^=rt,xn(f,null,a)):sr(f):Ft(f,()=>{f=null})))}function m(O){U.pending.delete(O)}var $=Ii(()=>{h=B(c);var O=h.length;let L=!1;if(te){var Y=ks(a)===ci;Y!==(O===0)&&(a=tr(),Me(a),gt(!1),L=!0)}for(var H=new Set,T=ee,p=la(),C=0;C<O;C+=1){te&&K.nodeType===Ln&&K.data===hi&&(a=K,L=!0,gt(!1));var E=h[C],b=r(E,C),M=g?null:o.get(b);M?(M.v&&an(M.v,E),M.i&&an(M.i,C),p&&T.unskip_effect(M.e)):(M=Yu(o,g?a:as??=ze(),E,b,C,i,t,n),g||(M.e.f|=rt),o.set(b,M)),H.add(b)}if(O===0&&s&&!f&&(g?f=Ue(()=>s(a)):(f=Ue(()=>s(as??=ze())),f.f|=rt)),O>H.size&&Vo(),te&&O>0&&Me(tr()),!g)if(d.set(T,H),p){for(const[X,P]of o)H.has(X)||T.skip_effect(P.e);T.oncommit(_),T.ondiscard(m)}else _(T);L&&gt(!0),B(c)}),U={effect:$,items:o,pending:d,outrogroups:null,fallback:f};g=!1,te&&(a=K)}function bn(e){for(;e!==null&&!(e.f&Ye);)e=e.next;return e}function zu(e,t,n,r,i){var s=(r&Io)!==0,a=t.length,o=e.items,u=bn(e.effect.first),l,f=null,c,h=[],d=[],g,_,m,$;if(s)for($=0;$<a;$+=1)g=t[$],_=i(g,$),m=o.get(_).e,m.f&rt||(m.nodes?.a?.measure(),(c??=new Set).add(m));for($=0;$<a;$+=1){if(g=t[$],_=i(g,$),m=o.get(_).e,e.outrogroups!==null)for(const E of e.outrogroups)E.pending.delete(m),E.done.delete(m);if(m.f&Pe&&(sr(m),s&&(m.nodes?.a?.unfix(),(c??=new Set).delete(m))),m.f&rt)if(m.f^=rt,m===u)xn(m,null,n);else{var U=f?f.next:u;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),St(e,f,m),St(e,m,U),xn(m,U,n),f=m,h=[],d=[],u=bn(f.next);continue}if(m!==u){if(l!==void 0&&l.has(m)){if(h.length<d.length){var O=d[0],L;f=O.prev;var Y=h[0],H=h[h.length-1];for(L=0;L<h.length;L+=1)xn(h[L],O,n);for(L=0;L<d.length;L+=1)l.delete(d[L]);St(e,Y.prev,H.next),St(e,f,Y),St(e,H,O),u=O,f=H,$-=1,h=[],d=[]}else l.delete(m),xn(m,u,n),St(e,m.prev,m.next),St(e,m,f===null?e.effect.first:f.next),St(e,f,m),f=m;continue}for(h=[],d=[];u!==null&&u!==m;)(l??=new Set).add(u),d.push(u),u=bn(u.next);if(u===null)continue}m.f&rt||h.push(m),f=m,u=bn(m.next)}if(e.outrogroups!==null){for(const E of e.outrogroups)E.pending.size===0&&(Zr(e,hr(E.done)),e.outrogroups?.delete(E));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||l!==void 0){var T=[];if(l!==void 0)for(m of l)m.f&Pe||T.push(m);for(;u!==null;)!(u.f&Pe)&&u!==e.fallback&&T.push(u),u=bn(u.next);var p=T.length;if(p>0){var C=r&Ts&&a===0?n:null;if(s){for($=0;$<p;$+=1)T[$].nodes?.a?.measure();for($=0;$<p;$+=1)T[$].nodes?.a?.fix()}Vu(e,T,C)}}s&&mt(()=>{if(c!==void 0)for(m of c)m.nodes?.a?.apply()})}function Yu(e,t,n,r,i,s,a,o){var u=a&Co?a&Po?Vt(n):yi(n,!1,!1):null,l=a&Ao?Vt(i):null;return{v:u,i:l,e:Ue(()=>(s(t,u??n,l??i,o),()=>{e.delete(r)}))}}function xn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&!(t.f&rt)?t.nodes.start:n;r!==null;){var a=ut(r);if(s.before(r),r===i)return;r=a}}function St(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Di(e,t){Ti(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=wi("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function $a(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$a(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xu(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$a(e))&&(r&&(r+=" "),r+=t);return r}function Wu(e){return typeof e=="object"?Xu(e):e??""}const os=[...`
3
- \r\f \v\uFEFF`];function qu(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,a=0;(a=r.indexOf(i,a))>=0;){var o=a+s;(a===0||os.includes(r[a-1]))&&(o===r.length||os.includes(r[o]))?r=(a===0?"":r.substring(0,a))+r.substring(o+1):a=o}}return r===""?null:r}function Zu(e,t){return e==null?null:String(e)}function Bi(e,t,n,r,i,s){var a=e[Gr];if(te||a!==n||a===void 0){var o=qu(n,r,s);(!te||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e[Gr]=n}else if(s&&i!==s)for(var u in s){var l=!!s[u];(i==null||l!==!!i[u])&&e.classList.toggle(u,l)}return s}function Ju(e,t,n,r){var i=e[Ur];if(te||i!==t){var s=Zu(t);(!te||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[Ur]=t}return r}const Qu=Symbol("is custom element"),Ku=Symbol("is html"),el=Ls?"link":"LINK",tl=Ls?"progress":"PROGRESS";function nl(e){if(te){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;ar(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var i=e.checked;ar(e,"checked",null),e.checked=i}}};e[Bs]=n,mt(n),lu()}}function rl(e,t){var n=Na(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==tl)||(e.value=t??"")}function ar(e,t,n,r){var i=Na(e);te&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===el)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Uo]=n),n==null?e.removeAttribute(t):typeof n!="string"&&il(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Na(e){return e[Ds]??={[Qu]:e.nodeName.includes("-"),[Ku]:e.namespaceURI===Bo}}var us=new Map;function il(e){var t=e.getAttribute("is")||e.nodeName,n=us.get(t);if(n)return n;us.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Ro(i);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.push(a);i=Ps(i)}return n}class Li{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(t){this.#n=t}observe(t,n){var r=this.#e.get(t)||new Set;return r.add(n),this.#e.set(t,r),this.#o().observe(t,this.#n),()=>{var i=this.#e.get(t);i.delete(n),i.size===0&&(this.#e.delete(t),this.#t.unobserve(t))}}#o(){return this.#t??(this.#t=new ResizeObserver(t=>{for(var n of t){Li.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}}))}}var sl=new Li({box:"border-box"});function al(e,t,n){var r=sl.observe(e,()=>n(e[t]));Ti(()=>($t(()=>n(e[t])),r))}function Or(e,t){return e===t||e?.[Cn]===t}function ol(e={},t,n,r){var i=xe.r,s=V;return Ti(()=>{var a,o;return Ci(()=>{a=o,o=r?.()||[],$t(()=>{Or(n(...o),e)||(t(e,...o),a&&Or(n(...a),e)&&t(null,...a))})}),()=>{let u=s;for(;u!==i&&u.parent!==null&&u.parent.f&kr;)u=u.parent;const l=()=>{o&&Or(n(...o),e)&&t(null,...o)},f=u.teardown;u.teardown=()=>{l(),f?.()}}}),e}function Ct(e,t,n,r){var i=!0,s=(n&No)!==0,a=(n&Mo)!==0,o=r,u=!0,l=void 0,f=()=>a&&i?(l??=$n(r),B(l)):(u&&(u=!1,o=a?$t(r):r),o);let c;if(s){var h=Cn in e||Hs in e;c=Lt(e,t)?.set??(h&&t in e?L=>e[t]=L:void 0)}var d,g=!1;s?[d,g]=uu(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=f(),c&&(Zo(),c(d)));var _;if(_=()=>{var L=e[t];return L===void 0?f():(u=!0,L)},!(n&$o))return _;if(c){var m=e.$$legacy;return function(L,Y){return arguments.length>0?((!Y||m||g)&&c(Y?_():L),L):_()}}var $=!1,U=(n&Oo?$n:Zs)(()=>($=!1,_()));s&&B(U);var O=V;return function(L,Y){if(arguments.length>0){const H=Y?B(U):s?Fe(L):L;return ie(U,H),$=!0,o!==void 0&&(o=H),L}return wt&&$||O.f&ke?U.v:B(U)}}function ul(e){return new ll(e)}class ll{#e;#t;constructor(t){var n=new Map,r=(s,a)=>{var o=yi(a,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return B(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===Hs?!0:(B(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return ie(n.get(a)??r(a,o),o),Reflect.set(s,a,o)}});this.#t=(t.hydrate?Fu:Aa)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&_t(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||Pn(this,s,{get(){return this.#t[s]},set(a){this.#t[s]=a},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{ku(this.#t)}}$set(t){this.#t.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#t.$destroy()}}let Ma;typeof HTMLElement=="function"&&(Ma=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const a=wi("slot");i!=="default"&&(a.name=i),Gt(s,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=fl(this);for(const i of this.$$s)i in r&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),n.default=!0):n[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=Xn(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=ul({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=Tu(()=>{Ci(()=>{this.$$r=!0;for(const i of Qn(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Xn(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const a=this.$$c.$on(i,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xn(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Qn(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Xn(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function fl(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Ri(e,t,n,r,i,s){let a=class extends Ma{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Qn(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Qn(t).forEach(o=>{Pn(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(u){u=Xn(o,u,t),this.$$d[o]=u;var l=this.$$c;if(l){var f=Lt(l,o)?.get;f?l[o]=u:l.$set({[o]:u})}}})}),r.forEach(o=>{Pn(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}const He=(e,t)=>{window.postMessage({...t,type:`Challenges:${e}`},window.location.href)},cl=e=>{He("TabClicked",{tabName:e})},hl=(e,t,n)=>{He("OptInClicked",{id:e,name:t,status:n})},dl=(e,t,n)=>{He("OptOutClicked",{id:e,name:t,status:n})},pl=(e,t,n)=>{He("ViewDetailClicked",{id:e,name:t,status:n})},vl=(e,t,n,r)=>{He("DetailTabClicked",{id:e,name:t,status:n,tabName:r})},gl=e=>{He("DetailPageOpen",{isOpen:e})},ml=(e,t,n)=>{He("PauseClicked",{id:e,name:t,status:n})},_l=(e,t,n)=>{He("ResumeClicked",{id:e,name:t,status:n})},Jr=e=>{He("ActionSuccess",{action:e})},Qr=(e,t,n)=>{He("ActionFail",{action:e,errorMessage:t,errorCode:n})},bl=(e,t,n,r)=>{He("GameLaunch",{gameId:e.CasinoGameId,ClientCompatibility:e.ClientCompatibility,GameId:e.GameId,GameName:e.GameName,GameLaunchUrl:e.GameLaunchUrl,RestrictedCountries:e.RestrictedCountries,Vendor:e.Vendor,challengeId:t,challengeName:n,challengeStatus:r})},yl=(e,t,n)=>{He("GoToDeposit",{id:e,name:t,status:n})},Ha=()=>{He("LoginClicked")},El=e=>{He("PromoClicked",{promoType:e})},wl="Challenges:OptoutConfirmed";var Sn=(e=>(e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize",e[e.BetMultiplier=3]="BetMultiplier",e))(Sn||{}),Tn=(e=>(e[e.Single=0]="Single",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly",e))(Tn||{}),Kr=(e=>(e[e.Draft=0]="Draft",e[e.Enabled=1]="Enabled",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted",e))(Kr||{}),j=(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",e[e.Awaiting=6]="Awaiting",e[e.Paused=7]="Paused",e))(j||{}),Da=(e=>(e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited",e))(Da||{}),st=(e=>(e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed",e))(st||{}),Wn=(e=>(e[e.RealCash=0]="RealCash",e[e.BonusMoney=1]="BonusMoney",e[e.Mixed=2]="Mixed",e))(Wn||{}),yr=(e=>(e[e.GameLaunch=0]="GameLaunch",e[e.Reward=1]="Reward",e[e.Manual=2]="Manual",e[e.Claim=3]="Claim",e[e.Event=4]="Event",e[e.Deposit=5]="Deposit",e[e.ClaimByButton=6]="ClaimByButton",e))(yr||{}),or=(e=>(e[e.Casino=0]="Casino",e[e.Any=1]="Any",e[e.Sportsbook=2]="Sportsbook",e))(or||{}),Ht=(e=>(e.OptIn="optIn",e.OptOut="optOut",e.Pause="pause",e.Resume="resume",e.Claim="claim",e))(Ht||{});const un=0,Er=20,xl=10,Sl=7,Tl=4;class Ba extends Error{constructor(t,n){super(n??"Challenge API Error"),this.errorCode=t,this.name="ChallengeApiError"}}const Cl=(e,t)=>new URL(`${e}/challenge/${t}`),tt=async(e,t,n,r=i=>i?.ErrorMessage??null)=>{const s=await(await fetch(Cl(e,t).href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).json();if(!s?.Success)throw new Ba(s?.ErrorCode??null,r(s));return s},Fi=({domainId:e,locale:t="en",pageNumber:n=un,pageSize:r=Er,sessionId:i,isFutureAvailable:s=!1})=>({DomainId:String(e),PlayerLanguage:t,PageNumber:n,PageSize:r,...i&&{PlayerSession:i,IsFutureAvailable:s}}),La=({domainId:e,locale:t="en",pageNumber:n=un,pageSize:r=Er,challengeId:i,sessionId:s})=>({DomainId:String(e),PlayerLanguage:t,PageNumber:n,PageSize:r,ChallengeId:i,...s&&{PlayerSession:s}}),$r=e=>tt(e.endpoint,"GetChallengesInfo",Fi(e)),Al=async({challengeId:e,...t})=>{const n={...La({...t,challengeId:e})};return(await tt(t.endpoint,"GetChallengesInfo",n)).Data?.[0]},Il=e=>tt(e.endpoint,"DisplayableWidgetChallenges",Fi({...e,isFutureAvailable:e.isFutureAvailable??!0})),Pl=async({challengeId:e,...t})=>{const n={...La({...t,challengeId:e})};return(await tt(t.endpoint,"DisplayableWidgetChallenges",n)).Data?.[0]},Ra=({userId:e,...t})=>{const n={...Fi(t),...e&&{UserId:String(e)}};return tt(t.endpoint,"PlayerHistory",n)},Ol=({domainId:e,code:t,sessionId:n,endpoint:r})=>{const i={DomainId:String(e),ActivationCode:t,PlayerSession:n};return tt(r,"GrantChallengeByCode",i)},$l=async({challengeId:e,sessionId:t,endpoint:n})=>{const r={ChallengeId:e,...t&&{PlayerSession:t}};return(await tt(n,"GetChallengeGames",r)).ChallengeGames},Nl=({endpoint:e,domainId:t,sessionId:n,userId:r,progressTo:i,isPause:s=!1})=>{const a={DomainId:String(t),...n&&{PlayerSession:n},...r&&{InternalUserId:String(r)},...s?{ProgressToDeactivate:i}:{ProgressToActivate:i}};return tt(e,"ChangeProgressStatus",a)},Ml=({endpoint:e,domainId:t,challengeProgressId:n})=>{const r={DomainId:String(t),ChallengeProgressId:n};return tt(e,"ChangeProgressIsNewStatus",r)},Hl=({endpoint:e,domainId:t,sessionId:n,userId:r,challengeId:i})=>{const s={DomainId:String(t),...n&&{PlayerSession:n},ChallengeId:i,OperatorUserId:String(r)};return tt(e,"ChallengeForfeit",s,a=>a?.Message??a?.ErrorMessage??null)},Dl=({endpoint:e,domainId:t,sessionId:n,challengeId:r})=>{const i={DomainId:String(t),...n&&{PlayerSession:n},ChallengeId:r};return tt(e,"ChallengePlayerClaimByButtonGrant",i)};var ki=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ei={exports:{}};/** @license
4
- * eventsource.js
5
- * Available under MIT License (MIT)
6
- * https://github.com/Yaffle/EventSource/
7
- */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,s=n.XMLHttpRequest,a=n.XDomainRequest,o=n.ActiveXObject,u=n.EventSource,l=n.document,f=n.Promise,c=n.fetch,h=n.Response,d=n.TextDecoder,g=n.TextEncoder,_=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(v){l.readyState="complete"},!1)),s==null&&o!=null&&(s=function(){return new o("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(v){function A(){}return A.prototype=v,new A}),Date.now||(Date.now=function(){return new Date().getTime()}),_==null){var m=c;c=function(v,A){var N=A.signal;return m(v,{headers:A.headers,credentials:A.credentials,cache:A.cache}).then(function(S){var k=S.body.getReader();return N._reader=k,N._aborted&&N._reader.cancel(),{status:S.status,statusText:S.statusText,headers:S.headers,body:{getReader:function(){return k}}}})},_=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function $(){this.bitsNeeded=0,this.codePoint=0}$.prototype.decode=function(v){function A(ne,re,G){if(G===1)return ne>=128>>re&&ne<<re<=2047;if(G===2)return ne>=2048>>re&&ne<<re<=55295||ne>=57344>>re&&ne<<re<=65535;if(G===3)return ne>=65536>>re&&ne<<re<=1114111;throw new Error}function N(ne,re){if(ne===6*1)return re>>6>15?3:re>31?2:1;if(ne===6*2)return re>15?3:2;if(ne===6*3)return 3;throw new Error}for(var S=65533,k="",D=this.bitsNeeded,z=this.codePoint,oe=0;oe<v.length;oe+=1){var J=v[oe];D!==0&&(J<128||J>191||!A(z<<6|J&63,D-6,N(D,z)))&&(D=0,z=S,k+=String.fromCharCode(z)),D===0?(J>=0&&J<=127?(D=0,z=J):J>=192&&J<=223?(D=6*1,z=J&31):J>=224&&J<=239?(D=6*2,z=J&15):J>=240&&J<=247?(D=6*3,z=J&7):(D=0,z=S),D!==0&&!A(z,D,N(D,z))&&(D=0,z=S)):(D-=6,z=z<<6|J&63),D===0&&(z<=65535?k+=String.fromCharCode(z):(k+=String.fromCharCode(55296+(z-65535-1>>10)),k+=String.fromCharCode(56320+(z-65535-1&1023))))}return this.bitsNeeded=D,this.codePoint=z,k};var U=function(){try{return new d().decode(new g().encode("test"),{stream:!0})==="test"}catch(v){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+v)}return!1};(d==null||g==null||!U())&&(d=$);var O=function(){};function L(v){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=O,this.onload=O,this.onerror=O,this.onreadystatechange=O,this._contentType="",this._xhr=v,this._sendTimeout=0,this._abort=O}L.prototype.open=function(v,A){this._abort(!0);var N=this,S=this._xhr,k=1,D=0;this._abort=function(G){N._sendTimeout!==0&&(i(N._sendTimeout),N._sendTimeout=0),(k===1||k===2||k===3)&&(k=4,S.onload=O,S.onerror=O,S.onabort=O,S.onprogress=O,S.onreadystatechange=O,S.abort(),D!==0&&(i(D),D=0),G||(N.readyState=4,N.onabort(null),N.onreadystatechange())),k=0};var z=function(){if(k===1){var G=0,ue="",ct=void 0;if("contentType"in S)G=200,ue="OK",ct=S.contentType;else try{G=S.status,ue=S.statusText,ct=S.getResponseHeader("Content-Type")}catch{G=0,ue="",ct=void 0}G!==0&&(k=2,N.readyState=2,N.status=G,N.statusText=ue,N._contentType=ct,N.onreadystatechange())}},oe=function(){if(z(),k===2||k===3){k=3;var G="";try{G=S.responseText}catch{}N.readyState=3,N.responseText=G,N.onprogress()}},J=function(G,ue){if((ue==null||ue.preventDefault==null)&&(ue={preventDefault:O}),oe(),k===1||k===2||k===3){if(k=4,D!==0&&(i(D),D=0),N.readyState=4,G==="load")N.onload(ue);else if(G==="error")N.onerror(ue);else if(G==="abort")N.onabort(ue);else throw new TypeError;N.onreadystatechange()}},ne=function(G){S!=null&&(S.readyState===4?(!("onload"in S)||!("onerror"in S)||!("onabort"in S))&&J(S.responseText===""?"error":"load",G):S.readyState===3?"onprogress"in S||oe():S.readyState===2&&z())},re=function(){D=r(function(){re()},500),S.readyState===3&&oe()};"onload"in S&&(S.onload=function(G){J("load",G)}),"onerror"in S&&(S.onerror=function(G){J("error",G)}),"onabort"in S&&(S.onabort=function(G){J("abort",G)}),"onprogress"in S&&(S.onprogress=oe),"onreadystatechange"in S&&(S.onreadystatechange=function(G){ne(G)}),("contentType"in S||!("ontimeout"in s.prototype))&&(A+=(A.indexOf("?")===-1?"?":"&")+"padding=true"),S.open(v,A,!0),"readyState"in S&&(D=r(function(){re()},0))},L.prototype.abort=function(){this._abort(!1)},L.prototype.getResponseHeader=function(v){return this._contentType},L.prototype.setRequestHeader=function(v,A){var N=this._xhr;"setRequestHeader"in N&&N.setRequestHeader(v,A)},L.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},L.prototype.send=function(){if((!("ontimeout"in s.prototype)||!("sendAsBinary"in s.prototype)&&!("mozAnon"in s.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var v=this;v._sendTimeout=r(function(){v._sendTimeout=0,v.send()},4);return}var A=this._xhr;"withCredentials"in A&&(A.withCredentials=this.withCredentials);try{A.send(void 0)}catch(N){throw N}};function Y(v){return v.replace(/[A-Z]/g,function(A){return String.fromCharCode(A.charCodeAt(0)+32)})}function H(v){for(var A=Object.create(null),N=v.split(`\r
8
- `),S=0;S<N.length;S+=1){var k=N[S],D=k.split(": "),z=D.shift(),oe=D.join(": ");A[Y(z)]=oe}this._map=A}H.prototype.get=function(v){return this._map[Y(v)]},s!=null&&s.HEADERS_RECEIVED==null&&(s.HEADERS_RECEIVED=2);function T(){}T.prototype.open=function(v,A,N,S,k,D,z){v.open("GET",k);var oe=0;v.onprogress=function(){var ne=v.responseText,re=ne.slice(oe);oe+=re.length,N(re)},v.onerror=function(ne){ne.preventDefault(),S(new Error("NetworkError"))},v.onload=function(){S(null)},v.onabort=function(){S(null)},v.onreadystatechange=function(){if(v.readyState===s.HEADERS_RECEIVED){var ne=v.status,re=v.statusText,G=v.getResponseHeader("Content-Type"),ue=v.getAllResponseHeaders();A(ne,re,G,new H(ue))}},v.withCredentials=D;for(var J in z)Object.prototype.hasOwnProperty.call(z,J)&&v.setRequestHeader(J,z[J]);return v.send(),v};function p(v){this._headers=v}p.prototype.get=function(v){return this._headers.get(v)};function C(){}C.prototype.open=function(v,A,N,S,k,D,z){var oe=null,J=new _,ne=J.signal,re=new d;return c(k,{headers:z,credentials:D?"include":"same-origin",signal:ne,cache:"no-store"}).then(function(G){return oe=G.body.getReader(),A(G.status,G.statusText,G.headers.get("Content-Type"),new p(G.headers)),new f(function(ue,ct){var mn=function(){oe.read().then(function(De){if(De.done)ue(void 0);else{var Se=re.decode(De.value,{stream:!0});N(Se),mn()}}).catch(function(De){ct(De)})};mn()})}).catch(function(G){if(G.name!=="AbortError")return G}).then(function(G){S(G)}),{abort:function(){oe?.cancel(),J.abort()}}};function E(){this._listeners=Object.create(null)}function b(v){r(function(){throw v},0)}E.prototype.dispatchEvent=function(v){v.target=this;var A=this._listeners[v.type];if(A!=null)for(var N=A.length,S=0;S<N;S+=1){var k=A[S];try{typeof k.handleEvent=="function"?k.handleEvent(v):k.call(this,v)}catch(D){b(D)}}},E.prototype.addEventListener=function(v,A){v=String(v);var N=this._listeners,S=N[v];S==null&&(S=[],N[v]=S);for(var k=!1,D=0;D<S.length;D+=1)S[D]===A&&(k=!0);k||S.push(A)},E.prototype.removeEventListener=function(v,A){v=String(v);var N=this._listeners,S=N[v];if(S!=null){for(var k=[],D=0;D<S.length;D+=1)S[D]!==A&&k.push(S[D]);k.length===0?delete N[v]:N[v]=k}};function M(v){this.type=v,this.target=void 0}function X(v,A){M.call(this,v),this.data=A.data,this.lastEventId=A.lastEventId}X.prototype=Object.create(M.prototype);function P(v,A){M.call(this,v),this.status=A.status,this.statusText=A.statusText,this.headers=A.headers}P.prototype=Object.create(M.prototype);function x(v,A){M.call(this,v),this.error=A.error}x.prototype=Object.create(M.prototype);var y=-1,I=0,w=1,R=2,F=-1,W=0,se=1,ce=2,_e=3,$e=/^text\/event\-stream(;.*)?$/i,xt=1e3,lt=18e6,ft=function(v,A){var N=v==null?A:parseInt(v,10);return N!==N&&(N=A),We(N)},We=function(v){return Math.min(Math.max(v,xt),lt)},he=function(v,A,N){try{typeof A=="function"&&A.call(v,N)}catch(S){b(S)}};function de(v,A){E.call(this),A=A||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,wo(this,v,A)}function Nt(){return s!=null&&"withCredentials"in s.prototype||a==null?new s:new a}var Wt=c!=null&&h!=null&&"body"in h.prototype;function wo(v,A,N){A=String(A);var S=!!N.withCredentials,k=N.lastEventIdQueryParameterName||"lastEventId",D=We(1e3),z=ft(N.heartbeatTimeout,45e3),oe="",J=D,ne=!1,re=0,G=N.headers||{},ue=N.Transport,ct=Wt&&ue==null?void 0:new L(ue!=null?new ue:Nt()),mn=ue!=null&&typeof ue!="string"?new ue:ct==null?new C:new T,De=void 0,Se=0,qe=y,qt="",Fn="",ht="",kn="",Te=W,Cr=0,Mt=0,xo=function(be,ve,Be,Le){if(qe===I)if(be===200&&Be!=null&&$e.test(Be)){qe=w,ne=Date.now(),J=D,v.readyState=w;var Ce=new P("open",{status:be,statusText:ve,headers:Le});v.dispatchEvent(Ce),he(v,v.onopen,Ce)}else{var Ee="";be!==200?(ve&&(ve=ve.replace(/\s+/g," ")),Ee="EventSource's response has a status "+be+" "+ve+" that is not 200. Aborting the connection."):Ee="EventSource's response has a Content-Type specifying an unsupported type: "+(Be==null?"-":Be.replace(/\s+/g," "))+". Aborting the connection.",Ar();var Ce=new P("error",{status:be,statusText:ve,headers:Le});v.dispatchEvent(Ce),he(v,v.onerror,Ce),console.error(Ee)}},So=function(be){if(qe===w){for(var ve=-1,Be=0;Be<be.length;Be+=1){var Le=be.charCodeAt(Be);(Le===10||Le===13)&&(ve=Be)}var Ce=(ve!==-1?kn:"")+be.slice(0,ve+1);kn=(ve===-1?kn:"")+be.slice(ve+1),be!==""&&(ne=Date.now(),re+=be.length);for(var Ee=0;Ee<Ce.length;Ee+=1){var Le=Ce.charCodeAt(Ee);if(Te===F&&Le===10)Te=W;else if(Te===F&&(Te=W),Le===13||Le===10){if(Te!==W){Te===se&&(Mt=Ee+1);var dt=Ce.slice(Cr,Mt-1),pt=Ce.slice(Mt+(Mt<Ee&&Ce.charCodeAt(Mt)===32?1:0),Ee);dt==="data"?(qt+=`
9
- `,qt+=pt):dt==="id"?Fn=pt:dt==="event"?ht=pt:dt==="retry"?(D=ft(pt,D),J=D):dt==="heartbeatTimeout"&&(z=ft(pt,z),Se!==0&&(i(Se),Se=r(function(){_n()},z)))}if(Te===W){if(qt!==""){oe=Fn,ht===""&&(ht="message");var Zt=new X(ht,{data:qt.slice(1),lastEventId:Fn});if(v.dispatchEvent(Zt),ht==="open"?he(v,v.onopen,Zt):ht==="message"?he(v,v.onmessage,Zt):ht==="error"&&he(v,v.onerror,Zt),qe===R)return}qt="",ht=""}Te=Le===13?F:W}else Te===W&&(Cr=Ee,Te=se),Te===se?Le===58&&(Mt=Ee+1,Te=ce):Te===ce&&(Te=_e)}}},qi=function(be){if(qe===w||qe===I){qe=y,Se!==0&&(i(Se),Se=0),Se=r(function(){_n()},J),J=We(Math.min(D*16,J*2)),v.readyState=I;var ve=new x("error",{error:be});v.dispatchEvent(ve),he(v,v.onerror,ve),be!=null&&console.error(be)}},Ar=function(){qe=R,De!=null&&(De.abort(),De=void 0),Se!==0&&(i(Se),Se=0),v.readyState=R},_n=function(){if(Se=0,qe!==y){if(!ne&&De!=null)qi(new Error("No activity within "+z+" milliseconds. "+(qe===I?"No response received.":re+" chars received.")+" Reconnecting.")),De!=null&&(De.abort(),De=void 0);else{var be=Math.max((ne||Date.now())+z-Date.now(),1);ne=!1,Se=r(function(){_n()},be)}return}ne=!1,re=0,Se=r(function(){_n()},z),qe=I,qt="",ht="",Fn=oe,kn="",Cr=0,Mt=0,Te=W;var ve=A;if(A.slice(0,5)!=="data:"&&A.slice(0,5)!=="blob:"&&oe!==""){var Be=A.indexOf("?");ve=Be===-1?A:A.slice(0,Be+1)+A.slice(Be+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(pt,Zt){return Zt===k?"":pt}),ve+=(A.indexOf("?")===-1?"?":"&")+k+"="+encodeURIComponent(oe)}var Le=v.withCredentials,Ce={};Ce.Accept="text/event-stream";var Ee=v.headers;if(Ee!=null)for(var dt in Ee)Object.prototype.hasOwnProperty.call(Ee,dt)&&(Ce[dt]=Ee[dt]);try{De=mn.open(ct,xo,So,qi,ve,Le,Ce)}catch(pt){throw Ar(),pt}};v.url=A,v.readyState=I,v.withCredentials=S,v.headers=G,v._close=Ar,_n()}de.prototype=Object.create(E.prototype),de.prototype.CONNECTING=I,de.prototype.OPEN=w,de.prototype.CLOSED=R,de.prototype.close=function(){this._close()},de.CONNECTING=I,de.OPEN=w,de.CLOSED=R,de.prototype.withCredentials=void 0;var Wi=u;s!=null&&(u==null||!("withCredentials"in u.prototype))&&(Wi=de),function(v){{var A=v(t);A!==void 0&&(e.exports=A)}}(function(v){v.EventSourcePolyfill=de,v.NativeEventSource=u,v.EventSource=Wi})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ki:globalThis)})(ei,ei.exports);var ls=ei.exports;const fs=(e,t)=>{try{return JSON.parse(e?.data)}catch(n){console.error(`Exception when parsing challenges ${t} live update`,n);return}},Bl=e=>{const{endpoint:t,userId:n,sessionId:r,onNewProgress:i,onSessionExpired:s,onChallengeEnabledChange:a,onProgressForfeited:o}=e;let u,l;const f=()=>{u?.close(),l?.close(),u=void 0,l=void 0};return typeof EventSource>"u"||!t?{close:f}:(n&&r&&(u=new ls.EventSourcePolyfill(`${t}/v2/player/${n}/information/updates`,{headers:{"X-SessionId":r}}),u.addEventListener("message",c=>{const h=fs(c,"player");if(!h)return;if(h.type==="SESSION_EXPIRATION"){f(),s?.();return}const d=h.body;if(d?.messageType==="newProgressNotification"){const g=d.challengeProgress;g&&String(g.InternalUserId)===String(n)&&i?.(g)}})),l=new ls.EventSourcePolyfill(`${t}/v1/encoder/challenges/*/update`),l.addEventListener("message",c=>{const d=fs(c,"status")?.data;if(d)switch(d.messageType){case"disabledChallengeNotification":a?.(String(d.challengeId),!1);break;case"enabledChallengeNotification":a?.(String(d.challengeId),!0);break;case"forfeitedChallengeProgressNotification":o?.(String(d.challengeProgressId));break}}),{close:f})},Ll=(e,t=!1)=>{if(typeof e=="boolean")return e;if(e==null)return t;if(typeof e=="number")return e!==0;const n=String(e).trim().toLowerCase();return n===""?!0:n!=="false"&&n!=="0"},Rl=(e,t)=>{if(e==null||e==="")return t;const n=Number(e);return Number.isFinite(n)?n:t};var Fa={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ki,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",u="hour",l="day",f="week",c="month",h="quarter",d="year",g="date",_="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,U={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var x=["th","st","nd","rd"],y=P%100;return"["+P+(x[(y-20)%10]||x[y]||x[0])+"]"}},O=function(P,x,y){var I=String(P);return!I||I.length>=x?P:""+Array(x+1-I.length).join(y)+P},L={s:O,z:function(P){var x=-P.utcOffset(),y=Math.abs(x),I=Math.floor(y/60),w=y%60;return(x<=0?"+":"-")+O(I,2,"0")+":"+O(w,2,"0")},m:function P(x,y){if(x.date()<y.date())return-P(y,x);var I=12*(y.year()-x.year())+(y.month()-x.month()),w=x.clone().add(I,c),R=y-w<0,F=x.clone().add(I+(R?-1:1),c);return+(-(I+(y-w)/(R?w-F:F-w))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:c,y:d,w:f,d:l,D:g,h:u,m:o,s:a,ms:s,Q:h}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},Y="en",H={};H[Y]=U;var T="$isDayjsObject",p=function(P){return P instanceof M||!(!P||!P[T])},C=function P(x,y,I){var w;if(!x)return Y;if(typeof x=="string"){var R=x.toLowerCase();H[R]&&(w=R),y&&(H[R]=y,w=R);var F=x.split("-");if(!w&&F.length>1)return P(F[0])}else{var W=x.name;H[W]=x,w=W}return!I&&w&&(Y=w),w||!I&&Y},E=function(P,x){if(p(P))return P.clone();var y=typeof x=="object"?x:{};return y.date=P,y.args=arguments,new M(y)},b=L;b.l=C,b.i=p,b.w=function(P,x){return E(P,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var M=function(){function P(y){this.$L=C(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[T]=!0}var x=P.prototype;return x.parse=function(y){this.$d=function(I){var w=I.date,R=I.utc;if(w===null)return new Date(NaN);if(b.u(w))return new Date;if(w instanceof Date)return new Date(w);if(typeof w=="string"&&!/Z$/i.test(w)){var F=w.match(m);if(F){var W=F[2]-1||0,se=(F[7]||"0").substring(0,3);return R?new Date(Date.UTC(F[1],W,F[3]||1,F[4]||0,F[5]||0,F[6]||0,se)):new Date(F[1],W,F[3]||1,F[4]||0,F[5]||0,F[6]||0,se)}}return new Date(w)}(y),this.init()},x.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},x.$utils=function(){return b},x.isValid=function(){return this.$d.toString()!==_},x.isSame=function(y,I){var w=E(y);return this.startOf(I)<=w&&w<=this.endOf(I)},x.isAfter=function(y,I){return E(y)<this.startOf(I)},x.isBefore=function(y,I){return this.endOf(I)<E(y)},x.$g=function(y,I,w){return b.u(y)?this[I]:this.set(w,y)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(y,I){var w=this,R=!!b.u(I)||I,F=b.p(y),W=function(We,he){var de=b.w(w.$u?Date.UTC(w.$y,he,We):new Date(w.$y,he,We),w);return R?de:de.endOf(l)},se=function(We,he){return b.w(w.toDate()[We].apply(w.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(he)),w)},ce=this.$W,_e=this.$M,$e=this.$D,xt="set"+(this.$u?"UTC":"");switch(F){case d:return R?W(1,0):W(31,11);case c:return R?W(1,_e):W(0,_e+1);case f:var lt=this.$locale().weekStart||0,ft=(ce<lt?ce+7:ce)-lt;return W(R?$e-ft:$e+(6-ft),_e);case l:case g:return se(xt+"Hours",0);case u:return se(xt+"Minutes",1);case o:return se(xt+"Seconds",2);case a:return se(xt+"Milliseconds",3);default:return this.clone()}},x.endOf=function(y){return this.startOf(y,!1)},x.$set=function(y,I){var w,R=b.p(y),F="set"+(this.$u?"UTC":""),W=(w={},w[l]=F+"Date",w[g]=F+"Date",w[c]=F+"Month",w[d]=F+"FullYear",w[u]=F+"Hours",w[o]=F+"Minutes",w[a]=F+"Seconds",w[s]=F+"Milliseconds",w)[R],se=R===l?this.$D+(I-this.$W):I;if(R===c||R===d){var ce=this.clone().set(g,1);ce.$d[W](se),ce.init(),this.$d=ce.set(g,Math.min(this.$D,ce.daysInMonth())).$d}else W&&this.$d[W](se);return this.init(),this},x.set=function(y,I){return this.clone().$set(y,I)},x.get=function(y){return this[b.p(y)]()},x.add=function(y,I){var w,R=this;y=Number(y);var F=b.p(I),W=function(_e){var $e=E(R);return b.w($e.date($e.date()+Math.round(_e*y)),R)};if(F===c)return this.set(c,this.$M+y);if(F===d)return this.set(d,this.$y+y);if(F===l)return W(1);if(F===f)return W(7);var se=(w={},w[o]=r,w[u]=i,w[a]=n,w)[F]||1,ce=this.$d.getTime()+y*se;return b.w(ce,this)},x.subtract=function(y,I){return this.add(-1*y,I)},x.format=function(y){var I=this,w=this.$locale();if(!this.isValid())return w.invalidDate||_;var R=y||"YYYY-MM-DDTHH:mm:ssZ",F=b.z(this),W=this.$H,se=this.$m,ce=this.$M,_e=w.weekdays,$e=w.months,xt=w.meridiem,lt=function(he,de,Nt,Wt){return he&&(he[de]||he(I,R))||Nt[de].slice(0,Wt)},ft=function(he){return b.s(W%12||12,he,"0")},We=xt||function(he,de,Nt){var Wt=he<12?"AM":"PM";return Nt?Wt.toLowerCase():Wt};return R.replace($,function(he,de){return de||function(Nt){switch(Nt){case"YY":return String(I.$y).slice(-2);case"YYYY":return b.s(I.$y,4,"0");case"M":return ce+1;case"MM":return b.s(ce+1,2,"0");case"MMM":return lt(w.monthsShort,ce,$e,3);case"MMMM":return lt($e,ce);case"D":return I.$D;case"DD":return b.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return lt(w.weekdaysMin,I.$W,_e,2);case"ddd":return lt(w.weekdaysShort,I.$W,_e,3);case"dddd":return _e[I.$W];case"H":return String(W);case"HH":return b.s(W,2,"0");case"h":return ft(1);case"hh":return ft(2);case"a":return We(W,se,!0);case"A":return We(W,se,!1);case"m":return String(se);case"mm":return b.s(se,2,"0");case"s":return String(I.$s);case"ss":return b.s(I.$s,2,"0");case"SSS":return b.s(I.$ms,3,"0");case"Z":return F}return null}(he)||F.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(y,I,w){var R,F=this,W=b.p(I),se=E(y),ce=(se.utcOffset()-this.utcOffset())*r,_e=this-se,$e=function(){return b.m(F,se)};switch(W){case d:R=$e()/12;break;case c:R=$e();break;case h:R=$e()/3;break;case f:R=(_e-ce)/6048e5;break;case l:R=(_e-ce)/864e5;break;case u:R=_e/i;break;case o:R=_e/r;break;case a:R=_e/n;break;default:R=_e}return w?R:b.a(R)},x.daysInMonth=function(){return this.endOf(c).$D},x.$locale=function(){return H[this.$L]},x.locale=function(y,I){if(!y)return this.$L;var w=this.clone(),R=C(y,I,!0);return R&&(w.$L=R),w},x.clone=function(){return b.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},P}(),X=M.prototype;return E.prototype=X,[["$ms",s],["$s",a],["$m",o],["$H",u],["$W",l],["$M",c],["$y",d],["$D",g]].forEach(function(P){X[P[1]]=function(x){return this.$g(x,P[0],P[1])}}),E.extend=function(P,x){return P.$i||(P(x,M,E),P.$i=!0),E},E.locale=C,E.isDayjs=p,E.unix=function(P){return E(1e3*P)},E.en=H[Y],E.Ls=H,E.p={},E})})(Fa);var Fl=Fa.exports;const Ut=Gi(Fl);var ka={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ki,function(){var n,r,i=1e3,s=6e4,a=36e5,o=864e5,u=31536e6,l=2628e6,f=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,c=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,h={years:u,months:l,days:o,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},d=function(H){return H instanceof L},g=function(H,T,p){return new L(H,p,T.$l)},_=function(H){return r.p(H)+"s"},m=function(H){return H<0},$=function(H){return m(H)?Math.ceil(H):Math.floor(H)},U=function(H){return Math.abs(H)},O=function(H,T){return H?m(H)?{negative:!0,format:""+U(H)+T}:{negative:!1,format:""+H+T}:{negative:!1,format:""}},L=function(){function H(p,C,E){var b=this;if(this.$d={},this.$l=E,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),C)return g(p*h[_(C)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach(function(P){b.$d[_(P)]=p[P]}),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(f);if(M){var X=M.slice(2).map(function(P){return P!=null?Number(P):0});return this.$d.years=X[0],this.$d.months=X[1],this.$d.weeks=X[2],this.$d.days=X[3],this.$d.hours=X[4],this.$d.minutes=X[5],this.$d.seconds=X[6],this.calMilliseconds(),this}}return this}var T=H.prototype;return T.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce(function(C,E){return C+(p.$d[E]||0)*h[E]},0)},T.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=$(p/u),p%=u,this.$d.months=$(p/l),p%=l,this.$d.days=$(p/o),p%=o,this.$d.hours=$(p/a),p%=a,this.$d.minutes=$(p/s),p%=s,this.$d.seconds=$(p/i),p%=i,this.$d.milliseconds=p},T.toISOString=function(){var p=O(this.$d.years,"Y"),C=O(this.$d.months,"M"),E=+this.$d.days||0;this.$d.weeks&&(E+=7*this.$d.weeks);var b=O(E,"D"),M=O(this.$d.hours,"H"),X=O(this.$d.minutes,"M"),P=this.$d.seconds||0;this.$d.milliseconds&&(P+=this.$d.milliseconds/1e3,P=Math.round(1e3*P)/1e3);var x=O(P,"S"),y=p.negative||C.negative||b.negative||M.negative||X.negative||x.negative,I=M.format||X.format||x.format?"T":"",w=(y?"-":"")+"P"+p.format+C.format+b.format+I+M.format+X.format+x.format;return w==="P"||w==="-P"?"P0D":w},T.toJSON=function(){return this.toISOString()},T.format=function(p){var C=p||"YYYY-MM-DDTHH:mm:ss",E={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return C.replace(c,function(b,M){return M||String(E[b])})},T.as=function(p){return this.$ms/h[_(p)]},T.get=function(p){var C=this.$ms,E=_(p);return E==="milliseconds"?C%=1e3:C=E==="weeks"?$(C/h[E]):this.$d[E],C||0},T.add=function(p,C,E){var b;return b=C?p*h[_(C)]:d(p)?p.$ms:g(p,this).$ms,g(this.$ms+b*(E?-1:1),this)},T.subtract=function(p,C){return this.add(p,C,!0)},T.locale=function(p){var C=this.clone();return C.$l=p,C},T.clone=function(){return g(this.$ms,this)},T.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},T.valueOf=function(){return this.asMilliseconds()},T.milliseconds=function(){return this.get("milliseconds")},T.asMilliseconds=function(){return this.as("milliseconds")},T.seconds=function(){return this.get("seconds")},T.asSeconds=function(){return this.as("seconds")},T.minutes=function(){return this.get("minutes")},T.asMinutes=function(){return this.as("minutes")},T.hours=function(){return this.get("hours")},T.asHours=function(){return this.as("hours")},T.days=function(){return this.get("days")},T.asDays=function(){return this.as("days")},T.weeks=function(){return this.get("weeks")},T.asWeeks=function(){return this.as("weeks")},T.months=function(){return this.get("months")},T.asMonths=function(){return this.as("months")},T.years=function(){return this.get("years")},T.asYears=function(){return this.as("years")},H}(),Y=function(H,T,p){return H.add(T.years()*p,"y").add(T.months()*p,"M").add(T.days()*p,"d").add(T.hours()*p,"h").add(T.minutes()*p,"m").add(T.seconds()*p,"s").add(T.milliseconds()*p,"ms")};return function(H,T,p){n=p,r=p().$utils(),p.duration=function(b,M){var X=p.locale();return g(b,{$l:X},M)},p.isDuration=d;var C=T.prototype.add,E=T.prototype.subtract;T.prototype.add=function(b,M){return d(b)?Y(this,b,1):C.bind(this)(b,M)},T.prototype.subtract=function(b,M){return d(b)?Y(this,b,-1):E.bind(this)(b,M)}}})})(ka);var kl=ka.exports;const Gl=Gi(kl);Ut.extend(Gl);const Ul=e=>e.toString().padStart(2,"0"),cs=(e,t=Ut().valueOf())=>{const n=Ut(e).valueOf()-t;if(n<=0)return null;const r=Ut.duration(n);return[Math.floor(r.asDays()),r.hours(),r.minutes(),r.seconds()].map(Ul).join(" : ")},Ga=(e,t="DD/MM/YYYY")=>Ut(e).format(t),jl=(e,t,n=Ut().valueOf())=>{if(!t)return null;switch(e){case j.Expired:case j.Forfeited:case j.Completed:return{date:Ga(t)};case j.Started:return{label:"startsIn",countdownTime:cs(t,n)};default:return{label:"endsIn",countdownTime:cs(t,n)}}},Vl=(e,t=!1)=>{if(t)return"new";switch(e){case j.Started:case j.Awaiting:return"scheduled";case j.InProgress:case j.PendingLevelReward:return"ongoing";case j.Paused:return"paused";case j.Completed:return"completed";case j.Expired:return"expired";case j.Forfeited:return"rejected";default:return e}},Ua=-1,ja=(e,t=[])=>e.Status===j.Started&&(e.LevelProgresses?.[0]?.ProgressPercentage??0)>0||t.includes(e.ChallengeId),zl=(e,t=[])=>{if(e.Status===j.Completed)return 100;if(!(ja(e,t)||e.Status===j.PendingLevelReward||e.Status===j.InProgress))return Ua;const r=e.LevelProgresses??[],i=r.find(a=>a.ProgressStatus===st.InProgress);return i?i.ProgressPercentage:r.filter(a=>a.ProgressStatus===st.Fillup||a.ProgressStatus===st.Completed).at(-1)?.ProgressPercentage??0},Va=e=>j[e.Status]??"",Ui=(e,t)=>!!e.Triggers?.includes(t),ji=e=>Ui(e,yr.Deposit),za=e=>!ji(e)&&Ui(e,yr.ClaimByButton),Yl=e=>!ji(e)&&!za(e)&&Ui(e,yr.GameLaunch),Nr={kind:"viewDetails",labelKey:"viewDetails",variant:"secondary"},Xl={kind:"login",labelKey:"login",variant:"primary"},Wl=(e,t={})=>{const{isPromo:n=!1,isPaused:r=!1,isAuthorized:i=!1}=t;if(!i)return Xl;if(r||ja(e,[])||e.Status===j.Expired)return Nr;if(n)return ji(e)?{kind:"deposit",labelKey:"deposit",variant:"primary"}:za(e)?{kind:"claim",labelKey:"claim",variant:"primary"}:Yl(e)?{kind:"launchGame",labelKey:"launchGame",variant:"primary"}:Nr;switch(e.Status){case j.Started:return{kind:"optIn",labelKey:"optIn",variant:"primary"};case j.Paused:return{kind:"resume",labelKey:"resume",variant:"accent"};case j.InProgress:case j.PendingLevelReward:return{kind:"pause",labelKey:"pause",variant:"secondary"};default:return Nr}};var ql=function(t){return Zl(t)&&!Jl(t)};function Zl(e){return!!e&&typeof e=="object"}function Jl(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||ef(e)}var Ql=typeof Symbol=="function"&&Symbol.for,Kl=Ql?Symbol.for("react.element"):60103;function ef(e){return e.$$typeof===Kl}function tf(e){return Array.isArray(e)?[]:{}}function Mn(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ln(tf(e),e,t):e}function nf(e,t,n){return e.concat(t).map(function(r){return Mn(r,n)})}function rf(e,t){if(!t.customMerge)return ln;var n=t.customMerge(e);return typeof n=="function"?n:ln}function sf(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function hs(e){return Object.keys(e).concat(sf(e))}function Ya(e,t){try{return t in e}catch{return!1}}function af(e,t){return Ya(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function of(e,t,n){var r={};return n.isMergeableObject(e)&&hs(e).forEach(function(i){r[i]=Mn(e[i],n)}),hs(t).forEach(function(i){af(e,i)||(Ya(e,i)&&n.isMergeableObject(t[i])?r[i]=rf(i,n)(e[i],t[i],n):r[i]=Mn(t[i],n))}),r}function ln(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||nf,n.isMergeableObject=n.isMergeableObject||ql,n.cloneUnlessOtherwiseSpecified=Mn;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):of(e,t,n):Mn(t,n)}ln.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return ln(r,i,n)},{})};var uf=ln,lf=uf;const ff=Gi(lf);var ti=function(e,t){return ti=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ti(e,t)};function wr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ti(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var nt=function(){return nt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},nt.apply(this,arguments)};function cf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Mr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function Hr(e,t){var n=t&&t.cache?t.cache:_f,r=t&&t.serializer?t.serializer:gf,i=t&&t.strategy?t.strategy:pf;return i(e,{cache:n,serializer:r})}function hf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function df(e,t,n,r){var i=hf(r)?r:n(r),s=t.get(i);return typeof s>"u"&&(s=e.call(this,r),t.set(i,s)),s}function Xa(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),s=t.get(i);return typeof s>"u"&&(s=e.apply(this,r),t.set(i,s)),s}function Wa(e,t,n,r,i){return n.bind(t,e,r,i)}function pf(e,t){var n=e.length===1?df:Xa;return Wa(e,this,n,t.cache.create(),t.serializer)}function vf(e,t){return Wa(e,this,Xa,t.cache.create(),t.serializer)}var gf=function(){return JSON.stringify(arguments)},mf=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),_f={create:function(){return new mf}},Dr={variadic:vf},ur=function(){return ur=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ur.apply(this,arguments)};var q;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(q||(q={}));var ae;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(ae||(ae={}));var fn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(fn||(fn={}));function ds(e){return e.type===ae.literal}function bf(e){return e.type===ae.argument}function qa(e){return e.type===ae.number}function Za(e){return e.type===ae.date}function Ja(e){return e.type===ae.time}function Qa(e){return e.type===ae.select}function Ka(e){return e.type===ae.plural}function yf(e){return e.type===ae.pound}function eo(e){return e.type===ae.tag}function to(e){return!!(e&&typeof e=="object"&&e.type===fn.number)}function ni(e){return!!(e&&typeof e=="object"&&e.type===fn.dateTime)}var no=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ef=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function wf(e){var t={};return e.replace(Ef,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var le=function(){return le=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},le.apply(this,arguments)};var xf=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Sf(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(xf).filter(function(h){return h.length>0}),n=[],r=0,i=t;r<i.length;r++){var s=i[r],a=s.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var o=a[0],u=a.slice(1),l=0,f=u;l<f.length;l++){var c=f[l];if(c.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function Tf(e){return e.replace(/^(.*?)-/,"")}var ps=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,ro=/^(@+)?(\+|#+)?[rs]?$/g,Cf=/(\*)(0+)|(#+)(0+)|(0+)/g,io=/^(0+)$/;function vs(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(ro,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function so(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Af(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!io.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function gs(e){var t={},n=so(e);return n||t}function If(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Tf(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=le(le(le({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return le(le({},u),gs(l))},{}));continue;case"engineering":t=le(le(le({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return le(le({},u),gs(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Cf,function(u,l,f,c,h,d){if(l)t.minimumIntegerDigits=f.length;else{if(c&&h)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(io.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ps.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ps,function(u,l,f,c,h,d){return f==="*"?t.minimumFractionDigits=l.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:h&&d?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+d.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var s=i.options[0];s==="w"?t=le(le({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=le(le({},t),vs(s)));continue}if(ro.test(i.stem)){t=le(le({},t),vs(i.stem));continue}var a=so(i.stem);a&&(t=le(le({},t),a));var o=Af(i.stem);o&&(t=le(le({},t),o))}return t}var jn={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Pf(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var s=0;r+1<e.length&&e.charAt(r+1)===i;)s++,r++;var a=1+(s&1),o=s<2?1:3+(s>>1),u="a",l=Of(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)n+=u;for(;a-- >0;)n=l+n}else i==="J"?n+="H":n+=i}return n}function Of(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=jn[r||""]||jn[n||""]||jn["".concat(n,"-001")]||jn["001"];return i[0]}var Br,$f=new RegExp("^".concat(no.source,"*")),Nf=new RegExp("".concat(no.source,"*$"));function Q(e,t){return{start:e,end:t}}var Mf=!!String.prototype.startsWith&&"_a".startsWith("a",1),Hf=!!String.fromCodePoint,Df=!!Object.fromEntries,Bf=!!String.prototype.codePointAt,Lf=!!String.prototype.trimStart,Rf=!!String.prototype.trimEnd,Ff=!!Number.isSafeInteger,kf=Ff?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ri=!0;try{var Gf=oo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ri=((Br=Gf.exec("a"))===null||Br===void 0?void 0:Br[0])==="a"}catch{ri=!1}var ms=Mf?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},ii=Hf?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,s=0,a;i>s;){if(a=t[s++],a>1114111)throw RangeError(a+" is not a valid code point");r+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return r},_s=Df?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var s=i[r],a=s[0],o=s[1];n[a]=o}return n},ao=Bf?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),s;return i<55296||i>56319||n+1===r||(s=t.charCodeAt(n+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},Uf=Lf?function(t){return t.trimStart()}:function(t){return t.replace($f,"")},jf=Rf?function(t){return t.trimEnd()}:function(t){return t.replace(Nf,"")};function oo(e,t){return new RegExp(e,t)}var si;if(ri){var bs=oo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");si=function(t,n){var r;bs.lastIndex=n;var i=bs.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else si=function(t,n){for(var r=[];;){var i=ao(t,n);if(i===void 0||uo(i)||Xf(i))break;r.push(i),n+=i>=65536?2:1}return ii.apply(void 0,r)};var Vf=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var s=this.char();if(s===123){var a=this.parseArgument(t,r);if(a.err)return a;i.push(a.val)}else{if(s===125&&t>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:ae.pound,location:Q(o,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(q.UNMATCHED_CLOSING_TAG,Q(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&ai(this.peek()||0)){var a=this.parseTag(t,n);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,n);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ae.literal,value:"<".concat(i,"/>"),location:Q(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,n,!0);if(s.err)return s;var a=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ai(this.char()))return this.error(q.INVALID_TAG,Q(o,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(q.UNMATCHED_CLOSING_TAG,Q(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ae.tag,value:i,children:a,location:Q(r,this.clonePosition())},err:null}:this.error(q.INVALID_TAG,Q(o,this.clonePosition())))}else return this.error(q.UNCLOSED_TAG,Q(r,this.clonePosition()))}else return this.error(q.INVALID_TAG,Q(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Yf(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var s=this.tryParseQuote(n);if(s){i+=s;continue}var a=this.tryParseUnquoted(t,n);if(a){i+=a;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=Q(r,this.clonePosition());return{val:{type:ae.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!zf(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return ii.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),ii(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(q.EMPTY_ARGUMENT,Q(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(q.MALFORMED_ARGUMENT,Q(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ae.argument,value:i,location:Q(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(q.MALFORMED_ARGUMENT,Q(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=si(this.message,n),i=n+r.length;this.bumpTo(i);var s=this.clonePosition(),a=Q(t,s);return{value:r,location:a}},e.prototype.parseArgumentOptions=function(t,n,r,i){var s,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(q.EXPECT_ARGUMENT_TYPE,Q(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var h=jf(c.val);if(h.length===0)return this.error(q.EXPECT_ARGUMENT_STYLE,Q(this.clonePosition(),this.clonePosition()));var d=Q(f,this.clonePosition());l={style:h,styleLocation:d}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var _=Q(i,this.clonePosition());if(l&&ms(l?.style,"::",0)){var m=Uf(l.style.slice(2));if(o==="number"){var c=this.parseNumberSkeletonFromString(m,l.styleLocation);return c.err?c:{val:{type:ae.number,value:r,location:_,style:c.val},err:null}}else{if(m.length===0)return this.error(q.EXPECT_DATE_TIME_SKELETON,_);var $=m;this.locale&&($=Pf(m,this.locale));var h={type:fn.dateTime,pattern:$,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?wf($):{}},U=o==="date"?ae.date:ae.time;return{val:{type:U,value:r,location:_,style:h},err:null}}}return{val:{type:o==="number"?ae.number:o==="date"?ae.date:ae.time,value:r,location:_,style:(s=l?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS,Q(O,ur({},O)));this.bumpSpace();var L=this.parseIdentifierIfPossible(),Y=0;if(o!=="select"&&L.value==="offset"){if(!this.bumpIf(":"))return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),L=this.parseIdentifierIfPossible(),Y=c.val}var H=this.tryParsePluralOrSelectOptions(t,o,n,L);if(H.err)return H;var g=this.tryParseArgumentClose(i);if(g.err)return g;var T=Q(i,this.clonePosition());return o==="select"?{val:{type:ae.select,value:r,options:_s(H.val),location:T},err:null}:{val:{type:ae.plural,value:r,options:_s(H.val),offset:Y,pluralType:o==="plural"?"cardinal":"ordinal",location:T},err:null}}default:return this.error(q.INVALID_ARGUMENT_TYPE,Q(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Q(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=Sf(t)}catch{return this.error(q.INVALID_NUMBER_SKELETON,n)}return{val:{type:fn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?If(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var s,a=!1,o=[],u=new Set,l=i.value,f=i.location;;){if(l.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR,q.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=Q(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?q.DUPLICATE_SELECT_ARGUMENT_SELECTOR:q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);l==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Q(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,n,r);if(g.err)return g;var _=this.tryParseArgumentClose(d);if(_.err)return _;o.push([l,{value:g.val,location:Q(d,this.clonePosition())}]),u.add(l),this.bumpSpace(),s=this.parseIdentifierIfPossible(),l=s.value,f=s.location}return o.length===0?this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR:q.EXPECT_PLURAL_ARGUMENT_SELECTOR,Q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(q.MISSING_OTHER_CLAUSE,Q(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var s=!1,a=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)s=!0,a=a*10+(o-48),this.bump();else break}var u=Q(i,this.clonePosition());return s?(a*=r,kf(a)?{val:a,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=ao(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(ms(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&uo(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function ai(e){return e>=97&&e<=122||e>=65&&e<=90}function zf(e){return ai(e)||e===47}function Yf(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function uo(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Xf(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function oi(e){e.forEach(function(t){if(delete t.location,Qa(t)||Ka(t))for(var n in t.options)delete t.options[n].location,oi(t.options[n].value);else qa(t)&&to(t.style)||(Za(t)||Ja(t))&&ni(t.style)?delete t.style.location:eo(t)&&oi(t.children)})}function Wf(e,t){t===void 0&&(t={}),t=ur({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Vf(e,t).parse();if(n.err){var r=SyntaxError(q[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||oi(n.val),n.val}var cn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(cn||(cn={}));var xr=function(e){wr(t,e);function t(n,r,i){var s=e.call(this,n)||this;return s.code=r,s.originalMessage=i,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ys=function(e){wr(t,e);function t(n,r,i,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),cn.INVALID_VALUE,s)||this}return t}(xr),qf=function(e){wr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),cn.INVALID_VALUE,i)||this}return t}(xr),Zf=function(e){wr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),cn.MISSING_VALUE,r)||this}return t}(xr),Ae;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ae||(Ae={}));function Jf(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ae.literal||n.type!==Ae.literal?t.push(n):r.value+=n.value,t},[])}function Qf(e){return typeof e=="function"}function qn(e,t,n,r,i,s,a){if(e.length===1&&ds(e[0]))return[{type:Ae.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var f=l[u];if(ds(f)){o.push({type:Ae.literal,value:f.value});continue}if(yf(f)){typeof s=="number"&&o.push({type:Ae.literal,value:n.getNumberFormat(t).format(s)});continue}var c=f.value;if(!(i&&c in i))throw new Zf(c,a);var h=i[c];if(bf(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),o.push({type:typeof h=="string"?Ae.literal:Ae.object,value:h});continue}if(Za(f)){var d=typeof f.style=="string"?r.date[f.style]:ni(f.style)?f.style.parsedOptions:void 0;o.push({type:Ae.literal,value:n.getDateTimeFormat(t,d).format(h)});continue}if(Ja(f)){var d=typeof f.style=="string"?r.time[f.style]:ni(f.style)?f.style.parsedOptions:r.time.medium;o.push({type:Ae.literal,value:n.getDateTimeFormat(t,d).format(h)});continue}if(qa(f)){var d=typeof f.style=="string"?r.number[f.style]:to(f.style)?f.style.parsedOptions:void 0;d&&d.scale&&(h=h*(d.scale||1)),o.push({type:Ae.literal,value:n.getNumberFormat(t,d).format(h)});continue}if(eo(f)){var g=f.children,_=f.value,m=i[_];if(!Qf(m))throw new qf(_,"function",a);var $=qn(g,t,n,r,i,s),U=m($.map(function(Y){return Y.value}));Array.isArray(U)||(U=[U]),o.push.apply(o,U.map(function(Y){return{type:typeof Y=="string"?Ae.literal:Ae.object,value:Y}}))}if(Qa(f)){var O=f.options[h]||f.options.other;if(!O)throw new ys(f.value,h,Object.keys(f.options),a);o.push.apply(o,qn(O.value,t,n,r,i));continue}if(Ka(f)){var O=f.options["=".concat(h)];if(!O){if(!Intl.PluralRules)throw new xr(`Intl.PluralRules is not available in this environment.
10
- Try polyfilling it using "@formatjs/intl-pluralrules"
11
- `,cn.MISSING_INTL_API,a);var L=n.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));O=f.options[L]||f.options.other}if(!O)throw new ys(f.value,h,Object.keys(f.options),a);o.push.apply(o,qn(O.value,t,n,r,i,h-(f.offset||0)));continue}}return Jf(o)}function Kf(e,t){return t?nt(nt(nt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=nt(nt({},e[r]),t[r]||{}),n},{})):e}function ec(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Kf(e[r],t[r]),n},nt({},e)):e}function Lr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function tc(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Hr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Mr([void 0],n,!1)))},{cache:Lr(e.number),strategy:Dr.variadic}),getDateTimeFormat:Hr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Mr([void 0],n,!1)))},{cache:Lr(e.dateTime),strategy:Dr.variadic}),getPluralRules:Hr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Mr([void 0],n,!1)))},{cache:Lr(e.pluralRules),strategy:Dr.variadic})}}var nc=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=s.formatToParts(u);if(l.length===1)return l[0].value;var f=l.reduce(function(c,h){return!c.length||h.type!==Ae.literal||typeof c[c.length-1]!="string"?c.push(h.value):c[c.length-1]+=h.value,c},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return qn(s.ast,s.locales,s.formatters,s.formats,u,void 0,s.message)},this.resolvedOptions=function(){var u;return{locale:((u=s.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var o=cf(a,["formatters"]);this.ast=e.__parse(t,nt(nt({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=ec(e.formats,r),this.formatters=i&&i.formatters||tc(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Wf,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function rc(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const s=n.slice(i,n.length).join(".");if(s in r){r=r[s];break}}r=r[n[i]]}else r=void 0;return r}const At={},ic=(e,t,n)=>n&&(t in At||(At[t]={}),e in At[t]||(At[t][e]=n),n),lo=(e,t)=>{if(t==null)return;if(t in At&&e in At[t])return At[t][e];const n=Sr(t);for(let r=0;r<n.length;r++){const i=n[r],s=ac(i,e);if(s)return ic(e,t,s)}};let Vi;const vn=_r({});function sc(e){return Vi[e]||null}function fo(e){return e in Vi}function ac(e,t){if(!fo(e))return null;const n=sc(e);return rc(n,t)}function oc(e){if(e==null)return;const t=Sr(e);for(let n=0;n<t.length;n++){const r=t[n];if(fo(r))return r}}function co(e,...t){delete At[e],vn.update(n=>(n[e]=ff.all([n[e]||{},...t]),n))}dn([vn],([e])=>Object.keys(e));vn.subscribe(e=>Vi=e);const Zn={};function uc(e,t){Zn[e].delete(t),Zn[e].size===0&&delete Zn[e]}function ho(e){return Zn[e]}function lc(e){return Sr(e).map(t=>{const n=ho(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function ui(e){return e==null?!1:Sr(e).some(t=>{var n;return(n=ho(t))==null?void 0:n.size})}function fc(e,t){return Promise.all(t.map(r=>(uc(e,r),r().then(i=>i.default||i)))).then(r=>co(e,...r))}const yn={};function po(e){if(!ui(e))return e in yn?yn[e]:Promise.resolve();const t=lc(e);return yn[e]=Promise.all(t.map(([n,r])=>fc(n,r))).then(()=>{if(ui(e))return po(e);delete yn[e]}),yn[e]}const cc={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},hc={fallbackLocale:null,loadingDelay:200,formats:cc,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},dc=hc;function hn(){return dc}const Rr=_r(!1);var pc=Object.defineProperty,vc=Object.defineProperties,gc=Object.getOwnPropertyDescriptors,Es=Object.getOwnPropertySymbols,mc=Object.prototype.hasOwnProperty,_c=Object.prototype.propertyIsEnumerable,ws=(e,t,n)=>t in e?pc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bc=(e,t)=>{for(var n in t||(t={}))mc.call(t,n)&&ws(e,n,t[n]);if(Es)for(var n of Es(t))_c.call(t,n)&&ws(e,n,t[n]);return e},yc=(e,t)=>vc(e,gc(t));let li;const lr=_r(null);function xs(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function Sr(e,t=hn().fallbackLocale){const n=xs(e);return t?[...new Set([...n,...xs(t)])]:n}function Xt(){return li??void 0}lr.subscribe(e=>{li=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Ec=e=>{if(e&&oc(e)&&ui(e)){const{loadingDelay:t}=hn();let n;return typeof window<"u"&&Xt()!=null&&t?n=window.setTimeout(()=>Rr.set(!0),t):Rr.set(!0),po(e).then(()=>{lr.set(e)}).finally(()=>{clearTimeout(n),Rr.set(!1)})}return lr.set(e)},Ot=yc(bc({},lr),{set:Ec}),Tr=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var wc=Object.defineProperty,fr=Object.getOwnPropertySymbols,vo=Object.prototype.hasOwnProperty,go=Object.prototype.propertyIsEnumerable,Ss=(e,t,n)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zi=(e,t)=>{for(var n in t||(t={}))vo.call(t,n)&&Ss(e,n,t[n]);if(fr)for(var n of fr(t))go.call(t,n)&&Ss(e,n,t[n]);return e},gn=(e,t)=>{var n={};for(var r in e)vo.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fr)for(var r of fr(e))t.indexOf(r)<0&&go.call(e,r)&&(n[r]=e[r]);return n};const Hn=(e,t)=>{const{formats:n}=hn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},xc=Tr(e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Hn("number",r)),new Intl.NumberFormat(n,i)}),Sc=Tr(e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Hn("date",r):Object.keys(i).length===0&&(i=Hn("date","short")),new Intl.DateTimeFormat(n,i)}),Tc=Tr(e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Hn("time",r):Object.keys(i).length===0&&(i=Hn("time","short")),new Intl.DateTimeFormat(n,i)}),Cc=(e={})=>{var t=e,{locale:n=Xt()}=t,r=gn(t,["locale"]);return xc(zi({locale:n},r))},Ac=(e={})=>{var t=e,{locale:n=Xt()}=t,r=gn(t,["locale"]);return Sc(zi({locale:n},r))},Ic=(e={})=>{var t=e,{locale:n=Xt()}=t,r=gn(t,["locale"]);return Tc(zi({locale:n},r))},Pc=Tr((e,t=Xt())=>new nc(e,t,hn().formats,{ignoreTag:hn().ignoreTag})),Oc=(e,t={})=>{var n,r,i,s;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:o,locale:u=Xt(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=lo(e,u);if(!f)f=(s=(i=(r=(n=hn()).handleMissingMessage)==null?void 0:r.call(n,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?s:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!o)return f;let c=f;try{c=Pc(f,u).format(o)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return c},$c=(e,t)=>Ic(t).format(e),Nc=(e,t)=>Ac(t).format(e),Mc=(e,t)=>Cc(t).format(e),Hc=(e,t=Xt())=>lo(e,t),Yi=dn([Ot,vn],()=>Oc);dn([Ot],()=>$c);dn([Ot],()=>Nc);dn([Ot],()=>Mc);dn([Ot,vn],()=>Hc);const Dc={en:{new:"New",scheduled:"Scheduled",onGoing:"Ongoing",paused:"Paused",completed:"Completed",expired:"Expired",rejected:"Rejected",failed:"Failed",forfeited:"Forfeited",endsIn:"Ends in",startsIn:"Starts in",promo:"Promo",active:"Active",claim:"Claim",pending:"Pending",finished:"Finished",optIn:"Opt In",login:"Login",resume:"Resume",pause:"Pause",levels:"Levels",level:"Level",events:"Events",rules:"Rules",games:"Games",status:"Status",time:"Time",viewDetails:"View Details",details:"Details",get:"Get",Condition:"Condition",termsAndConditions:"Terms & Conditions",allChallenges:"All Challenges",all:"All",placeBetsOf:"Place bets of",place:"Place",bet:"bet",bets:"bets",betTime:"time",betTimes:"times",minBet:"min bet",winStakeRatio:"Win/stake ratio"},tr:{new:"Yeni",scheduled:"Planlandı",onGoing:"Devam Ediyor",paused:"Duraklatıldı",completed:"Tamamlandı",expired:"Süresi Doldu",rejected:"Reddedildi",failed:"Başarısız",forfeited:"Vazgeçildi",endsIn:"Bitiş",startsIn:"Başlangıç",promo:"Promosyon",active:"Aktif",claim:"Al",pending:"Beklemede",finished:"Bitti",optIn:"Katıl",login:"Giriş Yap",resume:"Devam Et",pause:"Duraklat",levels:"Seviyeler",level:"Seviye",events:"Etkinlikler",rules:"Kurallar",games:"Oyunlar",viewDetails:"Detayları Gör",details:"Detayları",get:"Al",Condition:"Koşul",termsAndConditions:"Şartlar ve Koşullar",allChallenges:"Tüm Meydan Okumalar",all:"Tümü"},da:{new:"Ny",scheduled:"Planlagt",onGoing:"I gang",paused:"Sat på pause",completed:"Gennemført",expired:"Udløbet",rejected:"Afvist",failed:"Mislykket",forfeited:"Opgivet",endsIn:"Slutter om",startsIn:"Starter om",promo:"Promo",active:"Aktiv",claim:"Hent",pending:"Afventer",finished:"Færdig",optIn:"Tilmeld",login:"Log ind",resume:"Fortsæt",pause:"Pause",levels:"Niveauer",level:"Niveau",events:"Begivenheder",rules:"Regler",games:"Spil",viewDetails:"Se detaljer",details:"Detaljer",get:"Få",Condition:"Betingelse",termsAndConditions:"Vilkår og betingelser",allChallenges:"Alle udfordringer",all:"Alle"},de:{new:"Neu",scheduled:"Geplant",onGoing:"Läuft",paused:"Pausiert",completed:"Abgeschlossen",expired:"Abgelaufen",rejected:"Abgelehnt",failed:"Fehlgeschlagen",forfeited:"Aufgegeben",endsIn:"Endet in",startsIn:"Startet in",promo:"Promo",active:"Aktiv",claim:"Abholen",pending:"Ausstehend",finished:"Beendet",optIn:"Teilnehmen",login:"Anmelden",resume:"Fortsetzen",pause:"Pausieren",levels:"Stufen",level:"Stufe",events:"Events",rules:"Regeln",games:"Spiele",viewDetails:"Details anzeigen",details:"Details",get:"Erhalten",Condition:"Bedingung",termsAndConditions:"Allgemeine Geschäftsbedingungen",allChallenges:"Alle Challenges",all:"Alle"},nl:{new:"Nieuw",scheduled:"Gepland",onGoing:"Bezig",paused:"Gepauzeerd",completed:"Voltooid",expired:"Verlopen",rejected:"Afgewezen",failed:"Mislukt",forfeited:"Opgegeven",endsIn:"Eindigt over",startsIn:"Begint over",promo:"Promo",active:"Actief",claim:"Ophalen",pending:"In afwachting",finished:"Voltooid",optIn:"Deelnemen",login:"Inloggen",resume:"Hervatten",pause:"Pauzeren",levels:"Niveaus",level:"Niveau",events:"Evenementen",rules:"Regels",games:"Spellen",viewDetails:"Details bekijken",details:"Details",get:"Ontvang",Condition:"Voorwaarde",termsAndConditions:"Algemene voorwaarden",allChallenges:"Alle Challenges",all:"Alle"},fr:{new:"Nouveau",scheduled:"Planifié",onGoing:"En cours",paused:"En pause",completed:"Terminé",expired:"Expiré",rejected:"Rejeté",failed:"Échoué",forfeited:"Abandonné",endsIn:"Se termine dans",startsIn:"Commence dans",promo:"Promo",active:"Actif",claim:"Réclamer",pending:"En attente",finished:"Terminé",optIn:"Participer",login:"Connexion",resume:"Reprendre",pause:"Pause",levels:"Niveaux",level:"Niveau",events:"Événements",rules:"Règles",games:"Jeux",viewDetails:"Voir les détails",details:"Détails",get:"Obtenir",Condition:"Condition",termsAndConditions:"Conditions générales",allChallenges:"Tous les challenges",all:"Tous"},hu:{new:"Új",scheduled:"Ütemezett",onGoing:"Folyamatban",paused:"Szüneteltetve",completed:"Befejezve",expired:"Lejárt",rejected:"Elutasítva",failed:"Sikertelen",forfeited:"Feladva",endsIn:"Vége:",startsIn:"Kezdés:",promo:"Promóció",active:"Aktív",claim:"Átvétel",pending:"Függőben",finished:"Befejezve",optIn:"Csatlakozás",login:"Bejelentkezés",resume:"Folytatás",pause:"Szünet",levels:"Szintek",level:"Szint",events:"Események",rules:"Szabályok",games:"Játékok",viewDetails:"Részletek megtekintése",details:"Részletek",get:"Megszerez",Condition:"Feltétel",termsAndConditions:"Felhasználási feltételek",allChallenges:"Összes kihívás",all:"Összes"}},Bc=({withLocale:e,translations:t})=>{Ot.subscribe(n=>{n==null&&(vn.set(t),Ot.set(e))})},Lc=(e,t)=>{co(e,t)},Rc=e=>{Ot.set(e)},fi=e=>{Object.entries(e).forEach(([t,n])=>{Lc(t,n)})},Fc=(e,...t)=>{Bc({withLocale:e,translations:{}}),fi(Dc),t.forEach(fi)},kc=(e,t)=>{const n=new URL(e,window.location.href);fetch(n.href).then(r=>r.json()).then(r=>fi(r)).catch(r=>{console.log(`${t} translation url err:`,r)})},Gc=[j.Started,j.InProgress,j.PendingLevelReward,j.Completed],cr=e=>Gc.includes(e),Xi=e=>e.ProgressStatus===st.Completed,Uc=(e,t)=>Xi(e)?!1:e.ProgressStatus===st.InProgress&&cr(t),jc=(e,t)=>Xi(e)&&cr(t)?"completed":Uc(e,t)?"current":e.ProgressStatus===st.InProgress&&!cr(t)?"locked-in-progress":"locked",Vc=e=>e?e.CustomRewardMessage?e.CustomRewardMessage:(e.Rewards??[]).map(t=>t?.RewardDescription).filter(t=>!!t).join(" + "):"",zc=(e,t,n)=>{if(!e)return"";const r=s=>`${t}${s}`,i=s=>s?`, ${n("minBet")} ${r(s)}`:"";switch(e.LevelTargetType){case Sn.Accumulative:return`${n("placeBetsOf")} ${r(e.DisplayCurrencyTargetTurnover)}${i(e.BetRange?.MinBet)}`;case Sn.SingleBet:return`${n("place")} ${r(e.DisplayCurrencyTargetTurnover)} ${n("bet")}`;case Sn.MultipleOneBetSize:return`${n("place")} ${e.TargetBetCount} ${n("bets")}${i(e.DisplayCurrencyTargetTurnover)}`;case Sn.BetMultiplier:{const s=`${e.TargetBetCount} ${n(e.TargetBetCount===1?"betTime":"betTimes")}`;return`${n("winStakeRatio")} x${e.Multiplier} ${s}${i(e.BetRange?.MinBet)}`}default:return""}},Yc=[j.InProgress,j.PendingLevelReward,j.Paused,j.Completed,j.Expired,j.Forfeited,j.Paused],mo=e=>Yc.includes(e.Status),Xc=e=>e.ProgressStatus===st.Fillup||e.ProgressStatus===st.Completed,_o=e=>{if(!e.length)return 0;const t=e.findIndex(n=>n.ProgressStatus===st.InProgress);return t>=0?t+1:Math.min(e.filter(Xc).length+1,e.length)},Wc=e=>{const t=e.LevelProgresses??[];if(t.length)return mo(e)?t[_o(t)-1]:t[0]},qc=e=>e!=="history",Vn=()=>({loading:!1,error:void 0,pageNumber:un,hasMore:!1,totalCount:0}),Zc=e=>{let t=Ie(Fe([])),n=Ie(Fe([])),r=Ie(Fe([])),i=Ie(Fe([])),s=Ie(Fe([]));const a=Fe({promo:Vn(),active:Vn(),pending:Vn(),history:Vn()}),o=p=>a[p];let u;const l=p=>{switch(p){case"promo":return B(t);case"pending":return B(r);default:return B(n)}},f=(p,C)=>{ie(p==="promo"?t:p==="pending"?r:n,C,!0)},c=p=>{ie(t,p(B(t)),!0),ie(n,p(B(n)),!0),ie(r,p(B(r)),!0)},h=(p,C)=>{c(E=>E.map(b=>b.Id===p?{...b,...C}:b))},d=(p,C)=>{c(E=>E.map(b=>b.ChallengeId===p?{...b,...C}:b))},g=p=>{if(p)return[...B(n),...B(r),...B(t)].find(C=>C.ChallengeId===p)},_=p=>{c(C=>C.filter(E=>E.Id!==p))},m=async(p,C,E)=>{const{endpoint:b,domainId:M,userSession:X,userId:P,locale:x,pageSize:y=Er}=e();if(!b)throw new Error("challenges: endpoint is missing. Please provide a valid endpoint URL.");const I={endpoint:b,domainId:M,sessionId:X,locale:x,pageNumber:E,pageSize:y};if(C)return $r({endpoint:b,domainId:M,locale:x,pageNumber:E,pageSize:y});switch(p){case"promo":return Il(I);case"pending":return $r({...I,isFutureAvailable:!0});case"history":return Ra({...I,userId:P??"",isFutureAvailable:!0});default:return $r({...I,isFutureAvailable:!1})}},$=(p,C,E)=>{const b=a[p];if(b.pageNumber=C.PageNumber??un,!qc(p)){const P=C.Data??[];ie(i,E?[...B(i),...P]:P,!0),b.totalCount=C.TotalItem??B(i).length,b.hasMore=B(i).length<b.totalCount;return}const M=C.Data??[],X=E?[...l(p),...M]:M;f(p,X),b.totalCount=C.TotalCount??X.length,b.hasMore=X.length<b.totalCount},U=async(p,C,{append:E=!1,page:b}={})=>{const M=a[p];M.loading=!0,M.error=void 0;try{const X=b??(E?M.pageNumber+1:un),P=await m(p,C,X);$(p,P,E)}catch(X){M.error=X,e().onError?.(X)}finally{M.loading=!1}},O=(p,C)=>{const E=a[p];return E.hasMore&&!E.loading?U(p,C,{append:!0}):Promise.resolve()},L=(p,C,E)=>a[p].loading?Promise.resolve():U(p,C,{page:E}),Y=(p,C)=>{const E=B(s).includes(p);C&&!E?ie(s,[...B(s),p],!0):!C&&E&&ie(s,B(s).filter(b=>b!==p),!0)},H=()=>{const{endpoint:p,userId:C,userSession:E,liveUpdates:b=!0}=e();!b||u||(u=Bl({endpoint:p,userId:C,sessionId:E,onNewProgress:M=>{M.Status===j.Started?ie(n,[M,...B(n)],!0):M.Status===j.Awaiting&&ie(r,[M,...B(r)],!0)},onSessionExpired:()=>T(),onChallengeEnabledChange:(M,X)=>{Y(M,!X),d(M,{ChallengeStatus:X?Kr.Enabled:Kr.Paused})},onProgressForfeited:M=>{h(M,{Status:j.Forfeited})}}))},T=()=>{u?.close(),u=void 0};return{get promoChallenges(){return B(t)},get activeChallenges(){return B(n)},get pendingChallenges(){return B(r)},get playerHistory(){return B(i)},get pausedChallengeIds(){return B(s)},getState:o,getList:l,findChallenge:g,load:U,loadMore:O,loadPage:L,setPaused:Y,patchProgress:h,patchChallenge:d,removeProgress:_,connect:H,disconnect:T}},Jc=e=>{let t=Ie(!1);const n=async(s,a,o)=>{const{endpoint:u,domainId:l,userSession:f,userId:c,onStatusChange:h}=e();ie(t,!0);try{await Nl({endpoint:u,domainId:l,sessionId:f,userId:c??"",progressTo:s.Id,isPause:a}),h?.(s.Id,a?j.Paused:j.InProgress),Jr(o)}catch(d){Qr(o,d instanceof Error?d.message:String(d))}finally{ie(t,!1)}},r=async s=>{const{endpoint:a,domainId:o,userSession:u,onClaimed:l}=e();ie(t,!0);try{await Dl({endpoint:a,domainId:o,sessionId:u,challengeId:s.Id}),l?.(s.ChallengeId),Jr(Ht.Claim)}catch(f){Qr(Ht.Claim,f instanceof Error?f.message:String(f))}finally{ie(t,!1)}};return{get loading(){return B(t)},run:(s,a)=>{const o=a.ChallengeId,u=a.ChallengePresentation?.PresentationName??"",l=Va(a);switch(s){case"login":Ha();break;case"deposit":yl(o,u,l);break;case"claim":r(a);break;case"optIn":hl(o,u,l),n(a,!1,Ht.OptIn);break;case"resume":_l(o,u,l),n(a,!1,Ht.Resume);break;case"pause":ml(o,u,l),n(a,!0,Ht.Pause);break}}}},we={Promo:0,Active:1,Pending:2,Finished:3,Code:4},Qc=e=>{const t=Number(e);return Object.values(we).includes(t)?t:void 0},Kc={[we.Promo]:"promo",[we.Active]:"active",[we.Pending]:"pending",[we.Finished]:"finished",[we.Code]:"claim"},eh={[we.Promo]:"promo",[we.Active]:"active",[we.Pending]:"pending",[we.Finished]:"history",[we.Code]:void 0};var th=pn('<span class="player-challenges__tab-dot svelte-1jf237k" aria-hidden="true"></span>'),nh=pn('<button type="button" role="tab"> <!></button>'),rh=pn('<div class="player-challenges__tabs svelte-1jf237k" role="tablist"></div>');const ih={hash:"svelte-1jf237k",code:`.player-challenges__tabs.svelte-1jf237k {box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:6px 8px;gap:4px;background:var(--bg-overlay-neutral-level-2, rgba(251, 251, 251, 0.1));border:1px solid var(--border-subtle, rgba(251, 251, 251, 0.05));border-radius:100px;width:fit-content;max-width:100%;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar {display:none;}}.player-challenges__tab.svelte-1jf237k {box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;padding:6px 47px;border:0;border-radius:36px;background:transparent;color:var(--text-subtle, rgba(223, 227, 232, 1));font-size:10px;font-weight:500;white-space:nowrap;cursor:pointer;line-height:145%;appearance:none;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;&:focus-visible {outline:none;}&.active {background:var(--tabs-bg-selected, rgba(251, 251, 251, 0.2));color:var(--text-default, rgba(223, 227, 232, 1));}&:hover:not(.active) {background:var(--bg-tabs-hover, rgba(251, 251, 251, 0.1));}}.player-challenges__tab-dot.svelte-1jf237k {width:6px;height:6px;border-radius:50%;flex-shrink:0;background:var(--semantic-success-400, rgba(45, 223, 0, 1));}
12
-
13
- @media (max-width: 767px) {.player-challenges__tabs.svelte-1jf237k {width:100%;justify-content:flex-start;gap:2px;padding:6px 8px;}.player-challenges__tab.svelte-1jf237k {flex:1 0 auto;justify-content:center;padding:6px 12px;}
14
- }`};function bo(e,t){gr(t,!0),Di(e,ih);const n=()=>vi(Yi,"$_",r),[r,i]=gi(),s=Ct(t,"activeTab",7),a=Ct(t,"onTabChange",7),o=Ct(t,"notifyTabs",23,()=>[]),u=Ct(t,"showTabDot",7,!1),l=rr(()=>[{id:we.Promo,label:n()("promo")},{id:we.Active,label:n()("active")},{id:we.Code,label:n()("claim")},{id:we.Pending,label:n()("pending")},{id:we.Finished,label:n()("finished")}]);var f={get activeTab(){return s()},set activeTab(d){s(d),_t()},get onTabChange(){return a()},set onTabChange(d){a(d),_t()},get notifyTabs(){return o()},set notifyTabs(d=[]){o(d),_t()},get showTabDot(){return u()},set showTabDot(d=!1){u(d),_t()}},c=rh();Hi(c,21,()=>B(l),d=>d.id,(d,g)=>{var _=nh();let m;var $=Ei(_),U=oa($);{var O=Y=>{var H=th();Gt(Y,H)},L=rr(()=>u()&&o().includes(B(g).id));Pa(U,Y=>{B(L)&&Y(O)})}On(_),Ai(()=>{m=Bi(_,1,"player-challenges__tab svelte-1jf237k",null,m,{active:s()===B(g).id}),ar(_,"aria-selected",s()===B(g).id),Mi($,`${B(g).label??""} `)}),$i("click",_,()=>a()?.(B(g).id)),Gt(d,_)}),On(c),Gt(e,c);var h=mr(f);return i(),h}Ni(["click"]);Ri(bo,{activeTab:{},onTabChange:{},notifyTabs:{},showTabDot:{}},[],[],{mode:"open"});const je={Levels:"levels",Games:"games",Events:"events",Rules:"rules"},sh=e=>{const t=String(e??"").toLowerCase();return Object.values(je).includes(t)?t:void 0},yo=e=>{switch(e){case or.Casino:return[je.Levels,je.Games,je.Rules];case or.Sportsbook:return[je.Levels,je.Events,je.Rules];default:return[]}},ah=e=>[e.Discipline?.Name,e.Location?.Name,e.Template?.Name,e.Tournament?.Name,e.Event?.Name].filter(Boolean).join(", "),oh=e=>[...e??[]].sort((t,n)=>t.OrderNumber-n.OrderNumber),uh=e=>{switch(e){case Wn.RealCash:return"contributionTypeRealMoney";case Wn.BonusMoney:return"contributionTypeBonusMoney";case Wn.Mixed:return"contributionTypeMixed";default:return}},lh=e=>e?"contributeToOne":"contributeToAll",fh=e=>{switch(e){case Tn.Single:return"recurrenceSingle";case Tn.Daily:return"recurrenceDaily";case Tn.Weekly:return"recurrenceWeekly";case Tn.Monthly:return"recurrenceMonthly";default:return}};var ch=pn('<button type="button"> </button>'),hh=pn('<div class="challenge-details__tabs svelte-lloeg4"></div>');const dh={hash:"svelte-lloeg4",code:".challenge-details__tabs.svelte-lloeg4 {border:none;border-bottom:1px solid var(--border-default, rgba(251, 251, 251, 0.15));display:flex;flex-direction:row;justify-content:center;align-items:center;background-color:transparent;}.challenge-details__tab.svelte-lloeg4 {border:none;padding:12px 10px;gap:10px;height:36px;position:relative;flex:none;order:1;flex-grow:1;color:var(--text-super-subtle, rgba(251, 251, 251, 0.5));font-size:12px;font-weight:700;background-color:transparent;text-transform:uppercase;&.active {color:var(--text-brand, rgba(255, 204, 0, 1));&::after {content:'';position:absolute;left:0;right:0;bottom:-3px;height:2px;background:var(--pagination-bg-selected, rgba(255, 204, 0, 1));}}}"};function Eo(e,t){gr(t,!0),Di(e,dh);const n=()=>vi(Yi,"$_",r),[r,i]=gi(),s=Ct(t,"challengeItem",7),a=Ct(t,"activeTab",15),o=Ct(t,"onTabChange",7),u={[je.Levels]:"levels",[je.Games]:"games",[je.Events]:"events",[je.Rules]:"rules"},l=rr(()=>yo(s().ContributedFrom).map(d=>({id:d,label:n()(u[d])})));var f={get challengeItem(){return s()},set challengeItem(d){s(d),_t()},get activeTab(){return a()},set activeTab(d){a(d),_t()},get onTabChange(){return o()},set onTabChange(d){o(d),_t()}},c=hh();Hi(c,21,()=>B(l),Oa,(d,g)=>{var _=ch();let m;var $=Ei(_,!0);On(_),Ai(()=>{m=Bi(_,1,"challenge-details__tab svelte-lloeg4",null,m,{active:a()===B(g).id}),Mi($,B(g).label)}),$i("click",_,()=>o()?.(B(g).id)),Gt(d,_)}),On(c),Gt(e,c);var h=mr(f);return i(),h}Ni(["click"]);Ri(Eo,{challengeItem:{},activeTab:{},onTabChange:{}},[],[],{mode:"open"});exports.$format=Yi;exports.CHALLENGES_TAB_LIST_KIND=eh;exports.CHALLENGES_TAB_NAMES=Kc;exports.ChallengeAction=Ht;exports.ChallengeApiError=Ba;exports.ChallengeDetailsTab=je;exports.ChallengeHistoryLevelStatus=Da;exports.ChallengeProgressStatus=j;exports.ChallengeTabs=Eo;exports.ChallengeTabs$1=bo;exports.ChallengesTab=we;exports.ContributedFrom=or;exports.LIMIT_DEFAULT=Er;exports.LIMIT_ITEMS_DEFAULT=xl;exports.NO_PROGRESS=Ua;exports.OPT_OUT_CONFIRMED_MESSAGE=wl;exports.PAGE_NUMBER_DEFAULT=un;exports.PAGINATION_VISIBLE_PAGE=Sl;exports.PAGINATION_VISIBLE_PAGE_MOBILE=Tl;exports.append=Gt;exports.append_styles=Di;exports.bind_element_size=al;exports.bind_this=ol;exports.child=Ei;exports.clsx=Wu;exports.comment=Bu;exports.createChallengeActions=Jc;exports.createChallengesData=Zc;exports.create_custom_element=Ri;exports.dayjs=Ut;exports.delegate=Ni;exports.delegated=$i;exports.each=Hi;exports.first_child=wu;exports.flushSync=_t;exports.formatDisplayDate=Ga;exports.from_html=pn;exports.from_svg=Du;exports.get=B;exports.getAvailableTabs=yo;exports.getBadgeContent=jl;exports.getChallengeAction=Wl;exports.getChallengeById=Al;exports.getChallengeGames=$l;exports.getChallengeHistory=Ra;exports.getChallengeProgress=zl;exports.getChallengeStatusName=Va;exports.getContributeToKey=lh;exports.getContributionTypeKey=uh;exports.getCurrentLevelNumber=_o;exports.getDisplayLevel=Wc;exports.getEventRuleName=ah;exports.getLevelCondition=zc;exports.getLevelDisplayStatus=jc;exports.getLevelRewardText=Vc;exports.getPromoChallengeById=Pl;exports.getRecurrenceKey=fh;exports.grantChallengeByCode=Ol;exports.if_block=Pa;exports.index=Oa;exports.initI18n=Fc;exports.isChallengeActive=cr;exports.isLevelCompleted=Xi;exports.isOptedIn=mo;exports.loadTranslationUrl=kc;exports.mapChallengeStatus=Vl;exports.next=Fs;exports.onDestroy=ju;exports.optOutChallenge=Hl;exports.pop=mr;exports.prop=Ct;exports.proxy=Fe;exports.push=gr;exports.remove_input_defaults=nl;exports.reset=On;exports.sendChallengeActionFail=Qr;exports.sendChallengeActionSuccess=Jr;exports.sendChallengeDetailPageOpen=gl;exports.sendChallengeDetailTabClicked=vl;exports.sendChallengeLoginClicked=Ha;exports.sendChallengeTabClicked=cl;exports.sendChallengeViewDetailClicked=pl;exports.sendGameClicked=bl;exports.sendOptOutClicked=dl;exports.sendPromoChallengeClicked=El;exports.set=ie;exports.setLocale=Rc;exports.set_attribute=ar;exports.set_class=Bi;exports.set_style=Ju;exports.set_text=Mi;exports.set_value=rl;exports.setup_stores=gi;exports.sibling=oa;exports.sortEventRules=oh;exports.state=Ie;exports.store_get=vi;exports.template_effect=Ai;exports.toBoolean=Ll;exports.toChallengeDetailsTab=sh;exports.toChallengesTab=Qc;exports.toNumber=Rl;exports.untrack=$t;exports.updateChallengeIsNewStatus=Ml;exports.user_derived=rr;exports.user_effect=ha;exports.user_pre_effect=Su;