@everymatrix/loyalty-shop 0.2.9 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{LoyaltyPagination-Cw2snZwZ.js → LoyaltyPagination-BNBJcXKk.js} +1993 -2000
- package/components/{LoyaltyPagination-CyjgdUPo.js → LoyaltyPagination-BP3AxeDj.js} +465 -470
- package/components/LoyaltyPagination-BpErkHgK.cjs +14 -0
- package/components/LoyaltyPagination-CnoIs1uw.cjs +14 -0
- package/components/{LoyaltyPointsCard-njx77PMq.cjs → LoyaltyPointsCard-C16D2R5K.cjs} +1 -1
- package/components/{LoyaltyPointsCard-Xb627em8.cjs → LoyaltyPointsCard-C5qTjR-v.cjs} +1 -1
- package/components/{LoyaltyPointsCard-CFk3DpjI.js → LoyaltyPointsCard-DmE0ayL6.js} +1 -1
- package/components/{LoyaltyPointsCard-DTOQlcMH.js → LoyaltyPointsCard-Dz8Tgtc6.js} +1 -1
- package/components/{LoyaltyShop-BKubFlFr.js → LoyaltyShop-BR3Bcw_U.js} +7 -7
- package/components/{LoyaltyShop-D_Oyu_cp.cjs → LoyaltyShop-Bvon_isa.cjs} +5 -5
- package/components/{LoyaltyShop-8d3N_F-0.cjs → LoyaltyShop-C4Jmxgps.cjs} +5 -5
- package/components/{LoyaltyShop-Dfybp9ut.js → LoyaltyShop-FyZaT4Go.js} +7 -7
- package/components/{LoyaltyShopItem-DEz9OVzD.cjs → LoyaltyShopItem-C8gpofzS.cjs} +1 -1
- package/components/{LoyaltyShopItem-BXrrNl9f.js → LoyaltyShopItem-D_INMfUe.js} +3 -3
- package/components/{LoyaltyShopItem-CqY63kaT.js → LoyaltyShopItem-DkUT2Hhc.js} +3 -3
- package/components/{LoyaltyShopItem-CGOptttz.cjs → LoyaltyShopItem-Dy7fBUI9.cjs} +1 -1
- package/es2015/loyalty-shop.cjs +1 -1
- package/es2015/loyalty-shop.js +2 -2
- package/esnext/loyalty-shop.cjs +1 -1
- package/esnext/loyalty-shop.js +2 -2
- package/package.json +1 -1
- package/components/LoyaltyPagination-B7JqsoUi.cjs +0 -14
- package/components/LoyaltyPagination-BRav_RW5.cjs +0 -14
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const js="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(js);const Vs=1,Xs=2,ai=4,Ws=8,Ys=16,zs=1,qs=2,oi="[",cn="[!",Bn="[?",dn="]",Xe={},J=Symbol("uninitialized"),Zs="http://www.w3.org/1999/xhtml",ui=!1;var li=Array.isArray,Js=Array.prototype.indexOf,Ut=Array.prototype.includes,br=Array.from,or=Object.keys,vt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,Qs=Object.getOwnPropertyDescriptors,Ks=Object.prototype,ea=Array.prototype,fi=Object.getPrototypeOf,Cn=Object.isExtensible;const Be=()=>{};function hi(e){for(var t=0;t<e.length;t++)e[t]()}function ci(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const te=2,_t=4,Xt=8,di=1<<24,ye=16,Te=32,Ce=64,jr=128,pn=256,we=512,Q=1024,F=2048,de=4096,se=8192,K=16384,st=32768,Ft=1<<25,mt=65536,ur=1<<17,ta=1<<18,at=1<<19,pi=1<<20,Me=1<<25,lr=1<<21,ct=1<<22,Ve=1<<23,Kt=Symbol("$state"),vi=Symbol("component"),ra=Symbol("legacy props"),na=Symbol(""),_i=Symbol("attributes"),Vr=Symbol("class"),ia=Symbol("style"),Xr=Symbol("text"),Wt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},sa=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),yr=3,Yt=8;function aa(){console.warn("https://svelte.dev/e/derived_inert")}function Er(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function oa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let C=!1;function Le(e){C=e}let B;function fe(e){if(e===null)throw Er(),Xe;return B=e}function xr(){return fe(Ie(B))}function fr(e){if(C){if(Ie(B)!==null)throw Er(),Xe;B=e}}function ua(e=1){if(C){for(var t=e,r=B;t--;)r=Ie(r);B=r}}function hr(e=!0){for(var t=0,r=B;;){if(r.nodeType===Yt){var n=r.data;if(n===dn){if(t===0)return r;t-=1}else(n===oi||n===cn||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=Ie(r);e&&r.remove(),r=i}}function vn(e){if(!e||e.nodeType!==Yt)throw Er(),Xe;return e.data}function mi(e){return e===this.v}function gi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function bi(e){return!gi(e,this.v)}function la(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function fa(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ha(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ca(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function da(e){throw new Error("https://svelte.dev/e/effect_orphan")}function pa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function va(){throw new Error("https://svelte.dev/e/hydration_failed")}function _a(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ma(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ga(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ba(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}let ya=!1,ae=null;function gt(e){ae=e}function wr(e,t=!1,r){ae={p:ae,i:!1,c:null,e:null,s:e,x:null,r:O,l:null}}function Tr(e){var t=ae,r=t.e;if(r!==null){t.e=null;for(var n of r)Ui(n)}return e!==void 0&&(t.x=e),t.i=!0,ae=t.p,_n(e)}function _n(e={}){return vt(e,vi,{value:!0}),e}function yi(){return!0}let et=[];function Ei(){var e=et;et=[],hi(e)}function ke(e){if(et.length===0&&!Bt){var t=et;queueMicrotask(()=>{t===et&&Ei()})}et.push(e)}function Ea(){for(;et.length>0;)Ei()}const xa=-7169;function q(e,t){e.f=e.f&xa|t}function mn(e){e.f&we||e.deps===null?q(e,Q):q(e,de)}function xi(e,t){e.f&F?t.set(e,F):e.f&de&&t.get(e)!==F&&t.set(e,de),q(e,Q)}function Sr(e){var t=M,r=O;ge(null),Ne(null);try{return e()}finally{ge(t),Ne(r)}}function wa(e,t,r,n){const i=Ar;var s=e.filter(d=>!d.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var o=O,u=Ta(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function f(d){if(!(o.f&K)){u();try{n([...a,...d])}catch(p){Ae(p,o)}cr()}}var h=wi();if(r.length===0){l.then(()=>f([])).finally(h);return}function c(){Promise.all(r.map(d=>Sa(d))).then(f).catch(d=>Ae(d,o)).finally(h)}l?l.then(()=>{if(o.f&K){h();return}u(),c(),cr()}):c()}function Ta(){var e=O,t=M,r=ae,n=$;return function(s=!0){Ne(e),ge(t),gt(r),s&&!(e.f&K)&&(n?.activate(),n?.apply())}}function cr(e=!0){Ne(null),ge(null),gt(null),e&&$?.deactivate()}function wi(){var e=O,t=e.b,r=$,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}function Ar(e){var t=te|F;return O!==null&&(O.f|=at),{ctx:ae,deps:null,effects:null,equals:mi,f:t,fn:e,reactions:null,rv:0,v:J,wv:0,parent:O,ac:null}}const It=Symbol("obsolete");function Sa(e,t,r){let n=O;n===null&&la();var i=void 0,s=it(J),a=!M,o=new Set;return Ra(()=>{var u=O,l=ci();i=l.promise;try{Promise.resolve(e()).then(l.resolve,d=>{d!==Wt&&l.reject(d)}).finally(cr)}catch(d){l.reject(d),cr()}var f=$;if(a){if(u.f&st)var h=wi();if(n.b?.is_rendered())f.async_deriveds.get(u)?.reject(It);else for(const d of o.values())d.reject(It);o.add(l),f.async_deriveds.set(u,l)}const c=(d,p=void 0)=>{h?.(),o.delete(l),p!==It&&(f.activate(),p?(s.f|=Ve,bt(s,p)):(s.f&Ve&&(s.f^=Ve),bt(s,d)),f.deactivate())};l.promise.then(c,d=>c(null,d||"unknown"))}),Di(()=>{for(const u of o)u.reject(It)}),new Promise(u=>{function l(f){function h(){f===i?u(s):l(i)}f.then(h,h)}l(i)})}function Je(e){const t=Ar(e);return Xi(t),t}function Aa(e){const t=Ar(e);return t.equals=bi,t}function Ha(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)oe(t[r])}}function gn(e){var t,r=O,n=e.parent;if(!De&&n!==null&&e.v!==J&&n.f&(K|se))return aa(),e.v;Ne(n);try{Ha(e),t=qi(e)}finally{Ne(r)}return t}function Ti(e){var t=gn(e);if(!e.equals(t)&&(e.wv=Yi(),(!$?.is_fork||e.deps===null)&&($!==null?($.capture(e,t,!0),dt?.capture(e,t,!0)):e.v=t,e.deps===null))){q(e,Q);return}De||(Ee!==null?(Tn()||$?.is_fork)&&Ee.set(e,t):mn(e))}function Ma(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Sr(()=>{t.ac.abort(Wt),t.ac=null}),t.fn!==null&&(t.teardown=Be),kt(t,0),Hn(t))}function Si(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&yt(t)}let Ir=null,ut=null,$=null,dt=null,Ee=null,Wr=null,Bt=!1,$r=!1,Ct=null,er=null;var Rn=0;let Oa=1;class Re{id=Oa++;started=!1;linked=!0;prev=null;next=null;async_deriveds=new Map;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#o=new Map;#n=null;#i=[];#a=[];#s=new Map;#u=new Map;#d=new Set;is_fork=!1;#l=!1;constructor(){ut===null?Ir=ut=this:(ut.next=this,this.prev=ut),ut=this}#v(){if(this.is_fork)return!0;for(const t of this.#o.keys())if(!this.#m(t))return!0;return!1}#m(t){for(var r=t;r!==null;r=r.parent)if(this.#u.has(r))return!0;return!1}skip_effect(t){this.#u.has(t)||this.#u.set(t,{d:[],m:[]}),this.#d.delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=this.#u.get(t);if(n){this.#u.delete(t);for(var i of n.d)q(i,F),r(i);for(i of n.m)q(i,de),r(i)}this.#d.add(t)}#f(){var t=[];for(const s of this.#i)if(!(s.f&K||!(s.f&(F|de)))){for(var r=s,n=!1;r.parent!==null;){r=r.parent;var i=r.f;if(i&(Ce|Te)){if(!(i&Q)){n=!0;break}r.f^=Q}}n||t.push(r)}return this.#i=[],t}#_(){this.started=!0;for(const[o,u]of this.#s)q(o,u),this.schedule(o);this.apply();for(var t=Ct=[],r=[],n=er=[];this.#i.length>0;){Rn++>1e3&&(this.#c(),Pa());for(const o of this.#f())try{this.#g(o,t,r)}catch(u){throw Mi(o),this.#v()||this.discard(),u}}if($=null,n.length>0){var i=Re.ensure();for(const o of n)i.schedule(o)}if(Ct=null,er=null,this.#v()){this.#p(r),this.#p(t);for(const[o,u]of this.#u)Hi(o,u);n.length>0&&$.#_();return}const s=this.#y();if(s){this.#p(r),this.#p(t),s.#h(this);return}this.#s.clear();for(const o of this.#e)o(this);this.#e.clear(),dt=this,Dn(r),Dn(t),dt=null,this.#n?.resolve();var a=$;this.#r===0&&(this.#i.length===0||a!==null)&&this.#c(),a!==null&&(Oe.clear(),a.#_())}#g(t,r,n){t.f^=Q;for(var i=t.first;i!==null;){var s=i.f,a=(s&(Te|Ce))!==0,o=a&&(s&Q)!==0,u=o||(s&se)!==0||this.#u.has(i);if(!u&&i.fn!==null){a?i.f^=Q:s&_t?r.push(i):zt(i)&&(s&ye&&this.add_dirty_reaction(i,de),yt(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.prev;t!==null;t=t.prev)if(!t.is_fork&&this.#b(t))return t;return null}#b(t){for(const[r,[,n]]of this.current)if(!n&&t.current.has(r))return!0;return!1}#h(t){for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const s=this.async_deriveds.get(n);s&&i.promise.then(s.resolve).catch(s.reject)}t.async_deriveds.clear(),this.transfer_reactions(t.#s);const r=n=>{var i=n.reactions;if(i!==null&&!(n.f&te&&!(n.f&(F|de))))for(const o of i){var s=o.f;if(s&te)r(o);else{var a=o;s&(ct|ye)&&!this.async_deriveds.has(a)&&(this.#s.delete(a),q(a,F),this.schedule(a))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#c(),$=this,this.#_()}#p(t){for(var r=0;r<t.length;r+=1)xi(t[r],this.#s)}capture(t,r,n=!1){t.v!==J&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&Ve||(this.current.set(t,[r,n]),Ee?.set(t,r)),this.is_fork||(t.v=r)}activate(){$=this}deactivate(){$=null,Ee=null}flush(){try{$r=!0,$=this,this.#_()}finally{Rn=0,Wr=null,Ct=null,er=null,$r=!1,$=null,Ee=null,Oe.clear()}}discard(){for(const t of this.#t)t(this);this.#t.clear();for(const t of this.async_deriveds.values())t.reject(It);this.#c(),this.#n?.resolve()}register_created_effect(t){this.#a.push(t)}#E(){for(let h=Ir;h!==null;h=h.next){var t=h.id<this.id,r=[];for(const[c,[d,p]]of this.current){if(h.current.has(c)){var n=h.current.get(c)[0];if(t&&d!==n)h.current.set(c,[d,p]);else continue}r.push(c)}if(t)for(const[c,d]of this.async_deriveds){const p=h.async_deriveds.get(c);p&&d.promise.then(p.resolve).catch(p.reject)}var i=[...h.current.keys()].filter(c=>!h.current.get(c)[1]);if(!(!h.started||i.length===0)){var s=i.filter(c=>!this.current.has(c));if(s.length===0)t&&h.discard();else if(r.length>0){if(t)for(const c of this.#d)h.unskip_effect(c,d=>{d.f&(ye|ct)?h.schedule(d):h.#p([d])});h.activate();var a=new Set,o=new Map;for(var u of r)Ai(u,s,a,o);o=new Map;var l=[...h.current].filter(([c,d])=>{const p=this.current.get(c);return p?p[0]!==d[0]||p[1]!==d[1]:!0}).map(([c])=>c);if(l.length>0)for(const c of this.#a)!(c.f&(K|se|ur))&&bn(c,l,o)&&(c.f&(ct|ye)?(q(c,F),h.schedule(c)):h.add_dirty_reaction(c,F));if(h.#i.length>0&&!h.#l){h.apply();for(var f of h.#f())h.#g(f,[],[])}h.deactivate()}}}}increment(t,r){if(this.#r+=1,t){let n=this.#o.get(r)??0;this.#o.set(r,n+1)}}decrement(t,r){if(this.#r-=1,t){let n=this.#o.get(r)??0;n===1?this.#o.delete(r):this.#o.set(r,n-1)}this.#l||(this.#l=!0,ke(()=>{this.#l=!1,this.linked&&this.flush()}))}transfer_reactions(t){for(const[r,n]of t)this.add_dirty_reaction(r,n);t.clear()}add_dirty_reaction(t,r){(r===F||this.#s.get(t)!==F)&&this.#s.set(t,r)}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#n??=ci()).promise}static ensure(){if($===null){const t=$=new Re;!$r&&!Bt&&ke(()=>{t.started||t.flush()})}return $}apply(){{Ee=null;return}}schedule(t){if(Wr=t,t.b?.is_pending&&t.f&(_t|Xt|di)&&!(t.f&st)){t.b.defer_effect(t);return}this.#i.push(t)}#c(){if(this.linked){var t=this.prev,r=this.next;t===null?Ir=r:t.next=r,r===null?ut=t:r.prev=t,this.linked=!1}}}function ce(e){var t=Bt,r=dt;dt=null,Bt=!0;try{for(var n;;){if(Ea(),$===null)return n;$.flush()}}finally{Bt=t,dt=r}}function Pa(){try{pa()}catch(e){Ae(e,Wr)}}let $e=null;function Dn(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if(!(n.f&(K|se))&&zt(n)&&($e=new Set,yt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&ki(n),$e?.size>0)){Oe.clear();for(const i of $e){if(i.f&(K|se))continue;const s=[i];let a=i.parent;for(;a!==null;)$e.has(a)&&($e.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const u=s[o];u.f&(K|se)||yt(u)}}$e.clear()}}$e=null}}function Ai(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;s&te?Ai(i,t,r,n):s&(ct|ye)&&!(s&F)&&bn(i,t,n)&&(q(i,F),yn(i))}}function bn(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(Ut.call(t,i))return!0;if(i.f&te&&bn(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function yn(e){$.schedule(e)}function Hi(e,t){if(!(e.f&Te&&e.f&Q)){e.f&F?t.d.push(e):e.f&de&&t.m.push(e),q(e,Q);for(var r=e.first;r!==null;)Hi(r,t),r=r.next}}function Mi(e){q(e,Q);for(var t=e.first;t!==null;)Mi(t),t=t.next}let dr=new Set;const Oe=new Map;let Oi=!1;function it(e,t){var r={f:0,v:e,reactions:null,equals:mi,rv:0,wv:0};return r}function ee(e,t){const r=it(e);return Xi(r),r}function En(e,t=!1,r=!0){const n=it(e);return t||(n.equals=bi),n}function z(e,t,r=!1){M!==null&&(!xe||M.f&ur)&&yi()&&M.f&(te|ye|ct|ur)&&(Pe===null||!Pe.has(e))&&ga();let n=r?ft(t):t;return bt(e,n,er)}var Qe=null,Yr=0;function bt(e,t,r=null){if(!e.equals(t)){De?Oe.set(e,t):Oe.has(e)||Oe.set(e,e.v);var n=Re.ensure();if(n.capture(e,t),e.f&te){const i=e;e.f&F&&gn(i),Ee===null&&mn(i)}e.wv=Yi(),Qe=null,Yr=0,Pi(e,F,r),Qe=null,O!==null&&O.f&Q&&!(O.f&(Te|Ce))&&(ve===null?Fa([e]):ve.push(e)),!n.is_fork&&dr.size>0&&!Oi&&Na()}return t}function Na(){Oi=!1;for(const e of dr){e.f&Q&&q(e,de);let t;try{t=zt(e)}catch{t=!0}t&&yt(e)}dr.clear()}function Rt(e){z(e,e.v+1)}function Pi(e,t,r){var n=e.reactions;if(n!==null){var i=n.length;if(Yr+=i,Yr>1e5&&Qe===null&&(Qe=new Set),Qe!==null){if(Qe.has(e))return;Qe.add(e)}for(var s=0;s<i;s++){var a=n[s],o=a.f,u=(o&F)===0;if(u&&q(a,t),o&ur)dr.add(a);else if(o&te){var l=a;Ee?.delete(l),Pi(l,de,r)}else if(u){var f=a;o&ye&&$e!==null&&$e.add(f),r!==null?r.push(f):yn(f)}}}}function ft(e){if(typeof e!="object"||e===null||Kt in e||vi in e)return e;const t=fi(e);if(t!==Ks&&t!==ea)return e;var r=new Map,n=li(e),i=ee(0),s=nt,a=o=>{if(nt===s)return o();var u=M,l=nt;ge(null),Gn(s);var f=o();return ge(u),Gn(l),f};return n&&r.set("length",ee(e.length)),new Proxy(e,{defineProperty(o,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&_a();var f=r.get(u);return f===void 0?a(()=>{var h=ee(l.value);return r.set(u,h),h}):z(f,l.value,!0),!0},deleteProperty(o,u){var l=r.get(u);if(l===void 0){if(u in o){const f=a(()=>ee(J));r.set(u,f),Rt(i)}}else z(l,J),Rt(i);return!0},get(o,u,l){if(u===Kt)return e;var f=r.get(u),h=u in o;if(f===void 0&&(!h||ht(o,u)?.writable)&&(f=a(()=>{var d=ft(h?o[u]:J),p=ee(d);return p}),r.set(u,f)),f!==void 0){var c=w(f);return c===J?void 0:c}return Reflect.get(o,u,l)},getOwnPropertyDescriptor(o,u){this.has?.(o,u);var l=Reflect.getOwnPropertyDescriptor(o,u),f=r.get(u);if(f!==void 0){var h=w(f);if(h===J)return;if(l&&"value"in l)l.value=h;else return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(o,u){if(u===Kt)return!0;var l=r.get(u),f=l!==void 0&&l.v!==J||Reflect.has(o,u);if(l!==void 0||(O!==null||M!==null)&&(!f||ht(o,u)?.writable)){l===void 0&&(l=a(()=>{var c=f?ft(o[u]):J,d=ee(c);return d}),r.set(u,l));var h=w(l);if(h===J)return!1}return f},set(o,u,l,f){var h=r.get(u),c=u in o;if(n&&u==="length")for(var d=l;d<h.v;d+=1){var p=r.get(d+"");p!==void 0?z(p,J):d in o&&(p=a(()=>ee(J)),r.set(d+"",p))}if(h===void 0)(!c||ht(o,u)?.writable)&&(h=a(()=>ee(void 0)),z(h,ft(l)),r.set(u,h));else{c=h.v!==J;var E=a(()=>ft(l));z(h,E)}var m=Reflect.getOwnPropertyDescriptor(o,u);if(m?.set&&m.set.call(f,l),!c){if(n&&typeof u=="string"){var S=r.get("length"),L=Number(u);Number.isInteger(L)&&L>=S.v&&z(S,L+1)}Rt(i)}return!0},ownKeys(o){w(i);var u=Reflect.ownKeys(o).filter(h=>{var c=r.get(h);return c===void 0||c.v!==J});for(var[l,f]of r)f.v!==J&&!(l in o)&&u.push(l);return u},setPrototypeOf(){ma()}})}var Un,Ni,Ii,$i;function zr(){if(Un===void 0){Un=window,Ni=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Ii=ht(t,"firstChild").get,$i=ht(t,"nextSibling").get,Cn(e)&&(e[Vr]=void 0,e[_i]=null,e[ia]=void 0,e.__e=void 0),Cn(r)&&(r[Xr]=void 0)}}function me(e=""){return document.createTextNode(e)}function We(e){return Ii.call(e)}function Ie(e){return $i.call(e)}function pr(e,t){if(!C)return We(e);var r=We(B);if(r===null)r=B.appendChild(me());else if(t&&r.nodeType!==yr){var n=me();return r?.before(n),fe(n),n}return t&&wn(r),fe(r),r}function Li(e,t=!1){if(!C){var r=We(e);return r instanceof Comment&&r.data===""?Ie(r):r}if(t){if(B?.nodeType!==yr){var n=me();return B?.before(n),fe(n),n}wn(B)}return B}function tr(e,t=!1){if(!C)return We(e);var r=pr(e,t);return fr(e),r}function qr(e,t=1,r=!1){let n=C?B:e;for(var i;t--;)i=n,n=Ie(n);if(!C)return n;if(r){if(n?.nodeType!==yr){var s=me();return n===null?i?.after(s):n.before(s),fe(s),s}wn(n)}return fe(n),n}function Bi(e){e.textContent=""}function Ci(){return!1}function xn(e,t,r){return r?document.createElement(e,{is:r}):document.createElement(e)}function wn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===yr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Ia(e){var t=O;if(t===null)return M.f|=Ve,e;if(!(t.f&st)&&!(t.f&_t))throw e;Ae(e,t)}function Ae(e,t){if(e===Xe)throw e;if(!(t!==null&&t.f&K)){for(;t!==null;){if(t.f&jr&&!(t.f&(K|Ft))){if(!(t.f&st))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}function Ri(e){O===null&&(M===null&&da(),ca()),De&&ha()}function $a(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Se(e,t){var r=O;r!==null&&r.f&se&&(e|=se);var n={ctx:ae,deps:null,nodes:null,f:e|F|we,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};$?.register_created_effect(n);var i=n;if(e&_t)Ct!==null?Ct.push(n):Re.ensure().schedule(n);else if(t!==null){try{yt(n)}catch(a){throw oe(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&at)&&(i=i.first,e&ye&&e&mt&&i!==null&&(i.f|=mt))}if(i!==null&&(i.parent=r,r!==null&&$a(i,r),M!==null&&M.f&te&&!(e&Ce))){var s=M;(s.effects??=[]).push(i)}return n}function Tn(){return M!==null&&!xe}function Di(e){const t=Se(Xt,null);return q(t,Q),t.teardown=e,t}function Gt(e){Ri();var t=O.f,r=!M&&(t&Te)!==0&&ae!==null&&!ae.i;if(r){var n=ae;(n.e??=[]).push(e)}else return Ui(e)}function Ui(e){return Se(_t|pi,e)}function La(e){return Ri(),Se(Xt|pi,e)}function Ba(e){Re.ensure();const t=Se(Ce|at,e);return()=>{oe(t)}}function Ca(e){Re.ensure();const t=Se(Ce|at,e);return(r={})=>new Promise(n=>{r.outro?rt(t,()=>{oe(t),n(void 0)}):(oe(t),n(void 0))})}function Fi(e){return Se(_t,e)}function Ra(e){return Se(ct|at,e)}function Sn(e,t=0){return Se(Xt|t,e)}function Zr(e,t=[],r=[],n=[]){wa(n,t,r,i=>{Se(Xt,()=>{e(...i.map(w))})})}function An(e,t=0){var r=Se(ye|t,e);return r}function _e(e){return Se(Te|at,e)}function Gi(e){var t=e.teardown;if(t!==null){const r=De,n=M;Fn(!0),ge(null);try{t.call(null)}catch(i){Ae(i,e.parent)}finally{Fn(r),ge(n)}}}function Hn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Sr(()=>{i.abort(Wt)});var n=r.next;r.f&Ce?r.parent=null:oe(r,t),r=n}}function Da(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Te||oe(t),t=r}}function oe(e,t=!0){var r=!1;(t||e.f&ta)&&e.nodes!==null&&e.nodes.end!==null&&(Ua(e.nodes.start,e.nodes.end),r=!0),e.f|=Ft,Hn(e,t&&!r),kt(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Gi(e),e.f^=Ft,e.f|=K;var i=e.parent;i!==null&&i.first!==null&&ki(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ua(e,t){for(;e!==null;){var r=e===t?null:Ie(e);e.remove(),e=r}}function ki(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function rt(e,t,r=!0){var n=[];e.f|=pn,ji(e,n,!0);var i=()=>{r&&oe(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function ji(e,t,r){if(!(e.f&se)){e.f^=se;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next;if(!(i.f&Ce)){var a=(i.f&mt)!==0||(i.f&Te)!==0&&(e.f&ye)!==0;ji(i,t,a?r:!1)}i=s}}}function vr(e){e.f&=~pn,Vi(e,!0)}function Vi(e,t){if(!(e.f&pn)&&e.f&se){e.f^=se,e.f&Q||(q(e,F),Re.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&mt)!==0||(r.f&Te)!==0;Vi(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Mn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:Ie(r);t.append(r),r=i}}let De=!1;function Fn(e){De=e}let M=null,xe=!1;function ge(e){M=e}let O=null;function Ne(e){O=e}let Pe=null;function Xi(e){M!==null&&(M.f&lr||M.f&te)&&(Pe??=new Set).add(e)}let le=null,he=0,ve=null;function Fa(e){ve=e}let Wi=1,tt=0,nt=tt;function Gn(e){nt=e}function Yi(){return++Wi}function zt(e){var t=e.f;if(t&F)return!0;if(t&de){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(zt(s)&&Ti(s),s.wv>e.wv)return!0}t&we&&Ee===null&&q(e,Q)}return!1}function zi(e,t,r=!0){var n=e.reactions;if(n!==null&&!(Pe!==null&&Pe.has(e)))for(var i=0;i<n.length;i++){var s=n[i];s.f&te?zi(s,t,!1):t===s&&(r?q(s,F):s.f&Q&&q(s,de),yn(s))}}function qi(e){var t=le,r=he,n=ve,i=M,s=Pe,a=ae,o=xe,u=nt,l=e.f;le=null,he=0,ve=null,M=l&(Te|Ce)?null:e,Pe=null,gt(e.ctx),xe=!1,nt=++tt,e.ac!==null&&(Sr(()=>{e.ac.abort(Wt)}),e.ac=null);try{e.f|=lr;var f=e.fn,h=f();e.f|=st;var c=kn(e);if(yi()&&ve!==null&&!xe&&c!==null&&!(e.f&(te|de|F)))for(var d=0;d<ve.length;d++)zi(ve[d],e);if(i!==null&&i!==e){if(tt++,i.deps!==null)for(let p=0;p<r;p+=1)i.deps[p].rv=tt;if(t!==null)for(const p of t)p.rv=tt;ve!==null&&(n===null?n=ve:n.push(...ve))}return e.f&Ve&&(e.f^=Ve),h}catch(p){return kn(e),Ia(p)}finally{e.f^=lr,le=t,he=r,ve=n,M=i,Pe=s,gt(a),xe=o,nt=u}}function kn(e){var t=e.deps,r=$?.is_fork;if(le!==null){var n;if(r||kt(e,he),t!==null&&he>0)for(t.length=he+le.length,n=0;n<le.length;n++)t[he+n]=le[n];else e.deps=t=le;if(Tn()&&e.f&we)for(n=he;n<t.length;n++)(t[n].reactions??=[]).push(e)}else!r&&t!==null&&he<t.length&&(kt(e,he),t.length=he);return t}function Ga(e,t){let r=t.reactions;if(r!==null){var n=Js.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&t.f&te&&(le===null||!Ut.call(le,t))){var s=t;s.f&we&&(s.f^=we),s.v!==J&&mn(s),s.ac!==null&&Sr(()=>{s.ac.abort(Wt),s.ac=null,q(s,F)}),Ma(s),kt(s,0)}}function kt(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ga(e,r[n])}function yt(e){var t=e.f;if(!(t&K)){q(e,Q);var r=O;O=e;try{t&(ye|di)?Da(e):Hn(e),Gi(e);var n=qi(e);e.teardown=typeof n=="function"?n:null,e.wv=Wi;var i;ui&&ya&&e.f&F&&e.deps}finally{O=r}}}async function ka(){await Promise.resolve(),ce()}function w(e){var t=e.f,r=(t&te)!==0;if(M!==null&&!xe){var n=O!==null&&(O.f&K)!==0;if(!n&&(Pe===null||!Pe.has(e))){var i=M.deps;if(M.f&lr)e.rv<tt&&(e.rv=tt,le===null&&i!==null&&i[he]===e?he++:le===null?le=[e]:le.push(e));else{M.deps??=[],Ut.call(M.deps,e)||M.deps.push(e);var s=e.reactions;s===null?e.reactions=[M]:Ut.call(s,M)||s.push(M)}}}if(De&&Oe.has(e))return Oe.get(e);if(r){var a=e;if(De){var o=a.v;return(!(a.f&Q)&&a.reactions!==null||Ji(a))&&(o=gn(a)),Oe.set(a,o),o}var u=(a.f&we)===0&&!xe&&M!==null&&(M.f&we)!==0,l=(a.f&st)===0;zt(a)&&(u&&(a.f|=we),Ti(a)),u&&!l&&(Si(a),Zi(a))}if(Ee?.has(e))return Ee.get(e);if(e.f&Ve)throw e.v;return e.v}function Zi(e){if(e.f|=we,e.deps!==null)for(const r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:Ut.call(t,e)||t.push(e),r.f&te&&!(r.f&we)&&(Si(r),Zi(r))}}function Ji(e){if(e.v===J)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Oe.has(t)||t.f&te&&Ji(t))return!0;return!1}function On(e){var t=xe;try{return xe=!0,e()}finally{xe=t}}const $t=Symbol("events"),Qi=new Set,Jr=new Set;function rr(e,t,r){(t[$t]??={})[e]=r}function Ki(e){for(var t=0;t<e.length;t++)Qi.add(e[t]);for(var r of Jr)r(e)}let Lr=null,Br=!1;function jn(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Lr=e,Br||(Br=!0,setTimeout(()=>{Br=!1,Lr=null}));var a=0,o=Lr===e&&e[$t];if(o){var u=i.indexOf(o);if(u!==-1&&(t===document||t===window)){e[$t]=t;return}var l=i.indexOf(t);if(l===-1)return;u<=l&&(a=u)}if(s=i[a]||e.target,s!==t){vt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=M,h=O;ge(null),Ne(null);try{for(var c,d=[];s!==null&&s!==t;){try{var p=s[$t]?.[n];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(E){c?d.push(E):c=E}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(c){for(let E of d)queueMicrotask(()=>{throw E});throw c}}finally{e[$t]=t,delete e.currentTarget,ge(f),Ne(h)}}}const ja=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Va(e){return ja?.createHTML(e)??e}function Xa(e){var t=xn("template");return t.innerHTML=Va(e.replaceAll("<!>","<!---->")),t.content}function pt(e,t){var r=O;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function qt(e,t){var r=(t&zs)!==0,n=(t&qs)!==0,i,s=!e.startsWith("<!>");return()=>{if(C)return pt(B,null),B;i===void 0&&(i=Xa(s?e:"<!>"+e),r||(i=We(i)));var a=n||Ni?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=We(a),u=a.lastChild;pt(o,u)}else pt(a,a);return a}}function es(){if(C)return pt(B,null),B;var e=document.createDocumentFragment(),t=document.createComment(""),r=me();return e.append(t,r),pt(t,r),e}function Ke(e,t){if(C){var r=O;(!(r.f&st)||r.nodes.end===null)&&(r.nodes.end=B),xr();return}e!==null&&e.before(t)}const Wa=["touchstart","touchmove"];function Ya(e){return Wa.includes(e)}function za(e){let t=0,r=it(0),n;return()=>{Tn()&&(w(r),Sn(()=>(t===0&&(n=On(()=>e(()=>Rt(r)))),t+=1,()=>{ke(()=>{t-=1,t===0&&(n?.(),n=void 0,Rt(r))})})))}}var qa=mt|at;function Za(e,t,r,n){new Ja(e,t,r,n)}class Ja{parent;is_pending=!1;transform_error;#e;#t=C?B:null;#r;#o;#n;#i=null;#a=null;#s=null;#u=null;#d=0;#l=0;#v=!1;#m=new Map;#f=null;#_=za(()=>(this.#f=it(this.#d),()=>{this.#f=null}));constructor(t,r,n,i){this.#e=t,this.#r=r,this.#o=s=>{var a=O;a.b=this,a.f|=jr,n(s)},this.parent=O.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#n=An(()=>{if(C){const s=vn(this.#t);xr();const a=s===cn;if(s.startsWith(Bn)){const u=JSON.parse(s.slice(Bn.length));this.#y(u)}else a?this.#p():this.#g()}else this.#E()},qa),C&&(this.#e=B)}#g(){try{this.#i=_e(()=>this.#o(this.#e))}catch(t){this.error(t)}}#y(t){const r=this.#r.failed,{reset:n,invoke_onerror:i}=this.#b(t);ke(i),r&&(this.#s=_e(()=>{r(this.#e,()=>t,()=>n)}))}#b(t){var r=!1,n=!1;const i=()=>{if(!this.#h()){if(r){oa();return}r=!0,n&&ba(),this.#s!==null&&rt(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#E()})}};return{reset:i,invoke_onerror:()=>{if(!this.#h())try{n=!0,this.#r.onerror?.(t,i),n=!1}catch(a){Ae(a,this.#n&&this.#n.parent)}}}}#h(){return(this.#n.f&(K|Ft))!==0}#p(){const t=this.#r.pending;t&&(this.is_pending=!0,this.#a=_e(()=>t(this.#e)),ke(()=>{if(!this.#h()){var r=this.#u=document.createDocumentFragment(),n=me(),i=!1;if(r.append(n),this.#i=this.#x(()=>{try{return _e(()=>this.#o(n))}catch(s){try{this.error(s),i=!0}catch(a){Ae(a,this.#n.parent)}return null}}),this.#i===null){this.#u=null,i&&this.#c($);return}this.#l===0&&(this.#e.before(r),this.#u=null,rt(this.#a,()=>{this.#a=null}),this.#c($))}}))}#E(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#d=0,this.#i=_e(()=>{this.#o(this.#e)}),this.#l>0){var t=this.#u=document.createDocumentFragment();Mn(this.#i,t);const r=this.#r.pending;this.#a=_e(()=>r(this.#e))}else this.#c($)}catch(r){this.error(r)}}#c(t){this.is_pending=!1,t.transfer_reactions(this.#m)}defer_effect(t){xi(t,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#x(t){var r=O,n=M,i=ae;Ne(this.#n),ge(this.#n),gt(this.#n.ctx);try{return Re.ensure(),t()}finally{Ne(r),ge(n),gt(i)}}#w(t,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#w(t,r);return}this.#l+=t,this.#l===0&&(this.#c(r),this.#a&&rt(this.#a,()=>{this.#a=null}),this.#u&&(this.#e.before(this.#u),this.#u=null))}update_pending_count(t,r){this.#w(t,r),this.#d+=t,!(!this.#f||this.#v)&&(this.#v=!0,ke(()=>{this.#v=!1,this.#f&&bt(this.#f,this.#d)}))}get_effect_pending(){return this.#_(),w(this.#f)}error(t){if(t===Xe||!this.#r.onerror&&!this.#r.failed)throw t;$?.is_fork?(this.#i&&$.skip_effect(this.#i),this.#a&&$.skip_effect(this.#a),this.#s&&$.skip_effect(this.#s),$.oncommit(()=>{this.#h()||this.#T(t)})):this.#T(t)}#T(t){this.#i&&(oe(this.#i),this.#i=null),this.#a&&(oe(this.#a),this.#a=null),this.#s&&(oe(this.#s),this.#s=null),C&&(fe(this.#t),ua(),fe(hr()));let r=this.#r.failed;const n=i=>{if(this.#h())return;const{reset:s,invoke_onerror:a}=this.#b(i);a(),r&&!this.#h()&&(this.#s=this.#x(()=>{try{return _e(()=>{var o=O;o.b=this,o.f|=jr,r(this.#e,()=>i,()=>s)})}catch(o){return Ae(o,this.#n.parent),null}}))};ke(()=>{if(!this.#h()){var i;try{i=this.transform_error(t)}catch(s){Ae(s,this.#n&&this.#n.parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(n,s=>Ae(s,this.#n&&this.#n.parent)):n(i)}})}}function nr(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Xr]??=e.nodeValue)&&(e[Xr]=r,e.nodeValue=`${r}`)}function ts(e,t){return rs(e,t)}function Qa(e,t){zr(),t.intro=t.intro??!1;const r=t.target,n=C,i=B;try{for(var s=We(r);s&&(s.nodeType!==Yt||s.data!==oi);)s=Ie(s);if(!s)throw Xe;Le(!0),fe(s);const a=rs(e,{...t,anchor:s});return Le(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Xe&&console.warn("Failed to hydrate: ",a),t.recover===!1&&va(),zr(),Bi(r),Le(!1),ts(e,t)}finally{Le(n),fe(i)}}const Jt=new Map;function rs(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:o}){zr();var u=void 0,l=Ca(()=>{var f=r??t.appendChild(me());Za(f,{pending:()=>{}},d=>{wr({});var p=ae;if(s&&(p.c=s),i&&(n.$$events=i),C&&pt(d,null),u=e(d,n)||_n(),C&&(O.nodes.end=B,B===null||B.nodeType!==Yt||B.data!==dn))throw Er(),Xe;Tr()},o);var h=new Set,c=d=>{for(var p=0;p<d.length;p++){var E=d[p];if(!h.has(E)){h.add(E);var m=Ya(E);for(const N of[t,document]){var S=Jt.get(N);S===void 0&&(S=new Map,Jt.set(N,S));var L=S.get(E);L===void 0?(N.addEventListener(E,jn,{passive:m}),S.set(E,1)):S.set(E,L+1)}}}};return c(br(Qi)),Jr.add(c),()=>{for(var d of h)for(const m of[t,document]){var p=Jt.get(m),E=p.get(d);--E==0?(m.removeEventListener(d,jn),p.delete(d),p.size===0&&Jt.delete(m)):p.set(d,E)}Jr.delete(c),f!==r&&f.parentNode?.removeChild(f)}});return Qr.set(u,l),u}let Qr=new WeakMap;function Ka(e,t){const r=Qr.get(e);return r?(Qr.delete(e),r(t)):Promise.resolve()}class eo{anchor;#e=new Map;#t=new Map;#r=new Map;#o=new Set;#n=!0;constructor(t,r=!0){this.anchor=t,this.#n=r}#i=t=>{if(this.#e.has(t)){var r=this.#e.get(t),n=this.#t.get(r);if(n)vr(n),this.#o.delete(r);else{var i=this.#r.get(r);i&&(vr(i.effect),this.#t.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#r.get(a);o&&(oe(o.effect),this.#r.delete(a))}for(const[s,a]of this.#t){if(s===r||this.#o.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var l=document.createDocumentFragment();Mn(a,l),l.append(me()),this.#r.set(s,{effect:a,fragment:l})}else oe(a);this.#o.delete(s),this.#t.delete(s)};this.#n||!n?(this.#o.add(s),rt(a,o,!1)):o()}}};#a=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(oe(i.effect),this.#r.delete(n))};ensure(t,r){var n=$,i=Ci();if(r&&!this.#t.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),a=me();s.append(a),this.#r.set(t,{effect:_e(()=>r(a)),fragment:s})}else this.#t.set(t,_e(()=>r(this.anchor)));if(this.#e.set(n,t),i){for(const[o,u]of this.#t)o===t?n.unskip_effect(u):n.skip_effect(u);for(const[o,u]of this.#r)o===t?n.unskip_effect(u.effect):n.skip_effect(u.effect);n.oncommit(this.#i),n.ondiscard(this.#a)}else C&&(this.anchor=B),this.#i(n)}}function Kr(e,t,r=!1){var n;C&&(n=B,xr());var i=new eo(e),s=r?mt:0;function a(o,u){if(C){var l=vn(n);if(o!==parseInt(l.substring(1))){var f=hr();fe(f),i.anchor=f,Le(!1),i.ensure(o,u),Le(!0);return}}i.ensure(o,u)}An(()=>{var o=!1;t((u,l=0)=>{o=!0,a(l,u)}),o||a(-1,null)},s)}function ns(e,t){return t}function to(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let h=t[o];rt(h,()=>{if(s){if(s.pending.delete(h),s.done.add(h),s.pending.size===0){var c=e.outrogroups;en(e,br(s.done)),c.delete(s),c.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var u=n.length===0&&r!==null&&e.pending.size===0;if(u){var l=r,f=l.parentNode;Bi(f),f.append(l),e.items.clear()}en(e,t,!u)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function en(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const o of a)n.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];if(n?.has(s)){s.f|=Me;const a=document.createDocumentFragment();Mn(s,a)}else oe(t[i],r)}}var Vn;function is(e,t,r,n,i,s=null){var a=e,o=new Map,u=(t&ai)!==0;if(u){var l=e;a=C?fe(We(l)):l.appendChild(me())}C&&xr();var f=null,h=Aa(()=>{var L=r();return li(L)?L:L==null?[]:br(L)}),c=new Map,d=!0;function p(L){if(!(S.effect.f&K)){S.pending.delete(L);var N=w(h);S.fallback=f,ro(S,N,a,t,n),f!==null&&(N.length===0?f.f&Me?(f.f^=Me,Lt(f,null,a)):vr(f):rt(f,()=>{f=null}))}}function E(L){S.pending.delete(L)}var m=An(()=>{var L=w(h),N=L.length;let X=!1;if(C){var Z=vn(a)===cn;Z!==(N===0)&&(a=hr(),fe(a),Le(!1),X=!0)}for(var D=new Set,Y=$,pe=Ci(),re=0;re<N;re+=1){C&&B.nodeType===Yt&&B.data===dn&&(a=B,X=!0,Le(!1));var b=L[re],T=n(b,re),k=d?null:o.get(T);k?(k.v&&bt(k.v,b),k.i&&bt(k.i,re),pe&&Y.unskip_effect(k.e)):(k=no(o,d?a:Vn??=me(),b,T,re,i,t,r),d||(k.e.f|=Me),o.set(T,k)),D.add(T)}if(N===0&&s&&!f&&(d?f=_e(()=>s(a)):(f=_e(()=>s(Vn??=me())),f.f|=Me)),N>D.size&&fa(),C&&N>0&&fe(hr()),!d)if(c.set(Y,D),pe){for(const[ze,x]of o)D.has(ze)||Y.skip_effect(x.e);Y.oncommit(p),Y.ondiscard(E)}else p(Y);X&&Le(!0),w(h)}),S={effect:m,items:o,pending:c,outrogroups:null,fallback:f};d=!1,C&&(a=B)}function Pt(e){for(;e!==null&&!(e.f&Te);)e=e.next;return e}function ro(e,t,r,n,i){var s=(n&Ws)!==0,a=t.length,o=e.items,u=Pt(e.effect.first),l,f=null,h,c=[],d=[],p,E,m,S;if(s)for(S=0;S<a;S+=1)p=t[S],E=i(p,S),m=o.get(E).e,m.f&Me||(m.nodes?.a?.measure(),(h??=new Set).add(m));for(S=0;S<a;S+=1){if(p=t[S],E=i(p,S),m=o.get(E).e,e.outrogroups!==null)for(const b of e.outrogroups)b.pending.delete(m),b.done.delete(m);if(m.f&se&&(vr(m),s&&(m.nodes?.a?.unfix(),(h??=new Set).delete(m))),m.f&Me)if(m.f^=Me,m===u)Lt(m,null,r);else{var L=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),Ge(e,f,m),Ge(e,m,L),Lt(m,L,r),f=m,c=[],d=[],u=Pt(f.next);continue}if(m!==u){if(l!==void 0&&l.has(m)){if(c.length<d.length){var N=d[0],X;f=N.prev;var Z=c[0],D=c[c.length-1];for(X=0;X<c.length;X+=1)Lt(c[X],N,r);for(X=0;X<d.length;X+=1)l.delete(d[X]);Ge(e,Z.prev,D.next),Ge(e,f,Z),Ge(e,D,N),u=N,f=D,S-=1,c=[],d=[]}else l.delete(m),Lt(m,u,r),Ge(e,m.prev,m.next),Ge(e,m,f===null?e.effect.first:f.next),Ge(e,f,m),f=m;continue}for(c=[],d=[];u!==null&&u!==m;)(l??=new Set).add(u),d.push(u),u=Pt(u.next);if(u===null)continue}m.f&Me||c.push(m),f=m,u=Pt(m.next)}if(e.outrogroups!==null){for(const b of e.outrogroups)b.pending.size===0&&(en(e,br(b.done)),e.outrogroups?.delete(b));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||l!==void 0){var Y=[];if(l!==void 0)for(m of l)m.f&se||Y.push(m);for(;u!==null;)!(u.f&se)&&u!==e.fallback&&Y.push(u),u=Pt(u.next);var pe=Y.length;if(pe>0){var re=n&ai&&a===0?r:null;if(s){for(S=0;S<pe;S+=1)Y[S].nodes?.a?.measure();for(S=0;S<pe;S+=1)Y[S].nodes?.a?.fix()}to(e,Y,re)}}s&&ke(()=>{if(h!==void 0)for(m of h)m.nodes?.a?.apply()})}function no(e,t,r,n,i,s,a,o){var u=a&Vs?a&Ys?it(r):En(r,!1,!1):null,l=a&Xs?it(i):null;return{v:u,i:l,e:_e(()=>(s(t,u??r,l??i,o),()=>{e.delete(n)}))}}function Lt(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&!(t.f&Me)?t.nodes.start:r;n!==null;){var a=Ie(n);if(s.before(n),n===i)return;n=a}}function Ge(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function ss(e,t){Fi(()=>{e=O?.parent?.nodes?.start??e;var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=xn("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}const Xn=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function io(e,t,r){var n=e==null?"":""+e;if(r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,a=0;(a=n.indexOf(i,a))>=0;){var o=a+s;(a===0||Xn.includes(n[a-1]))&&(o===n.length||Xn.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function as(e,t,r,n,i,s){var a=e[Vr];if(C||a!==r||a===void 0){var o=io(r,n,s);(!C||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e[Vr]=r}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}const so=Symbol("is custom element"),ao=Symbol("is html"),oo=sa?"link":"LINK";function uo(e,t,r,n){var i=lo(e);if(!(C&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===oo))){var s=i[t];s!==(i[t]=r)&&(t==="loading"&&(e[na]=r),r==null?e.removeAttribute(t):typeof r!="string"&&fo(e).has(t)?e[t]=r:C&&(typeof r=="number"||typeof r=="boolean")&&s===String(r)||e.setAttribute(t,r))}}function lo(e){return e[_i]??={[so]:e.nodeName.includes("-"),[ao]:e.namespaceURI===Zs}}var Wn=new Map;function fo(e){var t=e.getAttribute("is")||e.nodeName,r=Wn.get(t);if(r)return r;Wn.set(t,r=new Set);for(var n,i=e,s=Element.prototype;s!==i;){n=Qs(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);i=fi(i)}return r}function Cr(e,t){return e===t||e?.[Kt]===t}function ho(e=_n(),t,r,n){var i=ae.r,s=O;return Fi(()=>{var a,o;return Sn(()=>{a=o,o=[],On(()=>{Cr(r(...o),e)||(t(e,...o),a&&Cr(r(...a),e)&&t(null,...a))})}),()=>{let u=s;for(;u!==i&&u.parent!==null&&u.parent.f&Ft;)u=u.parent;const l=()=>{o&&Cr(r(...o),e)&&t(null,...o)},f=u.teardown;u.teardown=()=>{l(),f?.()}}}),e}function Pn(e,t,r){if(e==null)return t(void 0),r&&r(void 0),Be;const n=On(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const lt=[];function co(e,t){return{subscribe:Hr(e,t).subscribe}}function Hr(e,t=Be){let r=null;const n=new Set;function i(o){if(gi(e,o)&&(e=o,r)){const u=!lt.length;for(const l of n)l[1](),lt.push(l,e);if(u){for(let l=0;l<lt.length;l+=2)lt[l][0](lt[l+1]);lt.length=0}}}function s(o){i(o(e))}function a(o,u=Be){const l=[o,u];return n.add(l),n.size===1&&(r=t(i,s)||Be),o(e),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:a}}function St(e,t,r){const n=!Array.isArray(e),i=n?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return co(r,(a,o)=>{let u=!1;const l=[];let f=0,h=Be;const c=()=>{if(f)return;h();const p=t(n?l[0]:l,a,o);s?a(p):h=typeof p=="function"?p:Be},d=i.map((p,E)=>Pn(p,m=>{l[E]=m,f&=~(1<<E),u&&c()},()=>{f|=1<<E}));return u=!0,c(),function(){hi(d),h(),u=!1}})}function po(e){let t;return Pn(e,r=>t=r)(),t}let tn=Symbol("unmounted");function os(e,t,r){const n=r[t]??={store:null,source:En(void 0),unsubscribe:Be};if(n.store!==e&&!(tn in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=Be;else{var i=!0;n.unsubscribe=Pn(e,s=>{i?n.source.v=s:z(n.source,s)}),i=!1}return e&&tn in r?po(e):w(n.source)}function us(){const e={};function t(){Di(()=>{for(var r in e)e[r].unsubscribe();vt(e,tn,{enumerable:!1,value:!0})})}return[e,t]}function be(e,t,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;o=e[t],o===void 0&&n!==void 0&&(o=a());var u;u=()=>{var c=e[t];return c===void 0?a():(s=!0,c)};var l=!1,f=Ar(()=>(l=!1,u())),h=O;return function(c,d){if(arguments.length>0){const p=d?w(f):c;return z(f,p),l=!0,i!==void 0&&(i=p),c}return De&&l||h.f&K?f.v:w(f)}}function vo(e){return new _o(e)}class _o{#e;#t;constructor(t){var r=new Map,n=(s,a)=>{var o=En(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return w(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===ra?!0:(w(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return z(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#t=(t.hydrate?Qa:ts)(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)&&ce(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||vt(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=()=>{Ka(this.#t)}}$set(t){this.#t.$set(t)}$on(t,r){this.#e[t]=this.#e[t]||[];const n=(...i)=>r.call(this,...i);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let ls;typeof HTMLElement=="function"&&(ls=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const a=xn("slot");i!=="default"&&(a.name=i),Ke(s,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=mo(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=ir(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=vo({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Ba(()=>{Sn(()=>{this.$$r=!0;for(const i of or(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=ir(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,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=ir(e,r,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 or(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function ir(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="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 mo(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Nn(e,t,r,n,i,s){let a=class extends ls{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return or(t).map(o=>(t[o].attribute||o).toLowerCase())}};return or(t).forEach(o=>{vt(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(u){u=ir(o,u,t),this.$$d[o]=u;var l=this.$$c;if(l){var f=ht(l,o)?.get;f?l[o]=u:l.$set({[o]:u})}}})}),n.forEach(o=>{vt(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}class fs extends Error{constructor(t,r){super(r),this.code=t,this.name="ElevateApiError"}}const go=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/playerInfo?language=${e.locale??""}`),r=new Headers({"Content-Type":"application/json"});e.userSession&&r.append("X-SessionId",e.userSession);const i=await(await fetch(t.href,{method:"GET",headers:r})).json();if(!i.success)throw new fs(i.errorCode,i.errorMessage);return i.data},bo=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/levels?language=${e.locale??""}`);return(await(await fetch(t.href,{method:"GET"})).json()).data},yo={REDEEM_REWARD_CONFIRMED:"Loyalty:RedeemRewardConfirmed",BACK_BUTTON_CLICKED:"Loyalty:BackButtonClicked"},Eo="shop",xo=10,hs=12,wo="DD/MM/YYYY HH:mm:ss",cs=e=>{const t=new Headers({"Content-Type":"application/json"});return e&&t.append("X-SessionId",e),t},To=async(e,t=0,r=hs)=>{const n=new URL(`${e.apiEndpoint}/elevate/shop`);return n.searchParams.set("language",e.locale??""),n.searchParams.set("pagination",`offset=${t},limit=${r}`),await(await fetch(n.href,{method:"GET",headers:cs(e.userSession)})).json()},So=async(e,t)=>{const r=new URL(`${e.apiEndpoint}/elevate/shop`);return r.searchParams.set("language",e.locale??""),r.searchParams.set("filter",`id=${t}`),(await(await fetch(r.href,{method:"GET",headers:cs(e.userSession)})).json()).data?.[0]},Ao=async(e,t)=>{const r=new URL(`${e.apiEndpoint}/elevate/redeem`),n=new Headers({"Content-Type":"application/json-patch+json"});e.userSession&&n.append("X-SessionId",e.userSession);const s=await(await fetch(r.href,{method:"PUT",headers:n,body:JSON.stringify({giftID:t})})).json();if(!s.success)throw new fs(s.errorCode??"",s.errorMessage??"Redeem failed")},Ho=(e,t)=>{const r=[...e].sort((i,s)=>i.firstEntryPoints>s.firstEntryPoints?1:-1);let n=0;return r.forEach((i,s)=>{t>i.firstEntryPoints&&(n=s)}),n};var Mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ps={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Mo,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",a="second",o="minute",u="hour",l="day",f="week",h="month",c="quarter",d="year",p="date",E="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,L={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(x){var g=["th","st","nd","rd"],v=x%100;return"["+x+(g[(v-20)%10]||g[v]||g[0])+"]"}},N=function(x,g,v){var y=String(x);return!y||y.length>=g?x:""+Array(g+1-y.length).join(v)+x},X={s:N,z:function(x){var g=-x.utcOffset(),v=Math.abs(g),y=Math.floor(v/60),_=v%60;return(g<=0?"+":"-")+N(y,2,"0")+":"+N(_,2,"0")},m:function x(g,v){if(g.date()<v.date())return-x(v,g);var y=12*(v.year()-g.year())+(v.month()-g.month()),_=g.clone().add(y,h),A=v-_<0,H=g.clone().add(y+(A?-1:1),h);return+(-(y+(v-_)/(A?_-H:H-_))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:h,y:d,w:f,d:l,D:p,h:u,m:o,s:a,ms:s,Q:c}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},Z="en",D={};D[Z]=L;var Y="$isDayjsObject",pe=function(x){return x instanceof k||!(!x||!x[Y])},re=function x(g,v,y){var _;if(!g)return Z;if(typeof g=="string"){var A=g.toLowerCase();D[A]&&(_=A),v&&(D[A]=v,_=A);var H=g.split("-");if(!_&&H.length>1)return x(H[0])}else{var R=g.name;D[R]=g,_=R}return!y&&_&&(Z=_),_||!y&&Z},b=function(x,g){if(pe(x))return x.clone();var v=typeof g=="object"?g:{};return v.date=x,v.args=arguments,new k(v)},T=X;T.l=re,T.i=pe,T.w=function(x,g){return b(x,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var k=function(){function x(v){this.$L=re(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[Y]=!0}var g=x.prototype;return g.parse=function(v){this.$d=function(y){var _=y.date,A=y.utc;if(_===null)return new Date(NaN);if(T.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var H=_.match(m);if(H){var R=H[2]-1||0,j=(H[7]||"0").substring(0,3);return A?new Date(Date.UTC(H[1],R,H[3]||1,H[4]||0,H[5]||0,H[6]||0,j)):new Date(H[1],R,H[3]||1,H[4]||0,H[5]||0,H[6]||0,j)}}return new Date(_)}(v),this.init()},g.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},g.$utils=function(){return T},g.isValid=function(){return this.$d.toString()!==E},g.isSame=function(v,y){var _=b(v);return this.startOf(y)<=_&&_<=this.endOf(y)},g.isAfter=function(v,y){return b(v)<this.startOf(y)},g.isBefore=function(v,y){return this.endOf(y)<b(v)},g.$g=function(v,y,_){return T.u(v)?this[y]:this.set(_,v)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(v,y){var _=this,A=!!T.u(y)||y,H=T.p(v),R=function(Ze,ue){var Fe=T.w(_.$u?Date.UTC(_.$y,ue,Ze):new Date(_.$y,ue,Ze),_);return A?Fe:Fe.endOf(l)},j=function(Ze,ue){return T.w(_.toDate()[Ze].apply(_.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ue)),_)},U=this.$W,V=this.$M,ne=this.$D,Ue="set"+(this.$u?"UTC":"");switch(H){case d:return A?R(1,0):R(31,11);case h:return A?R(1,V):R(0,V+1);case f:var qe=this.$locale().weekStart||0,Mt=(U<qe?U+7:U)-qe;return R(A?ne-Mt:ne+(6-Mt),V);case l:case p:return j(Ue+"Hours",0);case u:return j(Ue+"Minutes",1);case o:return j(Ue+"Seconds",2);case a:return j(Ue+"Milliseconds",3);default:return this.clone()}},g.endOf=function(v){return this.startOf(v,!1)},g.$set=function(v,y){var _,A=T.p(v),H="set"+(this.$u?"UTC":""),R=(_={},_[l]=H+"Date",_[p]=H+"Date",_[h]=H+"Month",_[d]=H+"FullYear",_[u]=H+"Hours",_[o]=H+"Minutes",_[a]=H+"Seconds",_[s]=H+"Milliseconds",_)[A],j=A===l?this.$D+(y-this.$W):y;if(A===h||A===d){var U=this.clone().set(p,1);U.$d[R](j),U.init(),this.$d=U.set(p,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](j);return this.init(),this},g.set=function(v,y){return this.clone().$set(v,y)},g.get=function(v){return this[T.p(v)]()},g.add=function(v,y){var _,A=this;v=Number(v);var H=T.p(y),R=function(V){var ne=b(A);return T.w(ne.date(ne.date()+Math.round(V*v)),A)};if(H===h)return this.set(h,this.$M+v);if(H===d)return this.set(d,this.$y+v);if(H===l)return R(1);if(H===f)return R(7);var j=(_={},_[o]=n,_[u]=i,_[a]=r,_)[H]||1,U=this.$d.getTime()+v*j;return T.w(U,this)},g.subtract=function(v,y){return this.add(-1*v,y)},g.format=function(v){var y=this,_=this.$locale();if(!this.isValid())return _.invalidDate||E;var A=v||"YYYY-MM-DDTHH:mm:ssZ",H=T.z(this),R=this.$H,j=this.$m,U=this.$M,V=_.weekdays,ne=_.months,Ue=_.meridiem,qe=function(ue,Fe,Ot,Zt){return ue&&(ue[Fe]||ue(y,A))||Ot[Fe].slice(0,Zt)},Mt=function(ue){return T.s(R%12||12,ue,"0")},Ze=Ue||function(ue,Fe,Ot){var Zt=ue<12?"AM":"PM";return Ot?Zt.toLowerCase():Zt};return A.replace(S,function(ue,Fe){return Fe||function(Ot){switch(Ot){case"YY":return String(y.$y).slice(-2);case"YYYY":return T.s(y.$y,4,"0");case"M":return U+1;case"MM":return T.s(U+1,2,"0");case"MMM":return qe(_.monthsShort,U,ne,3);case"MMMM":return qe(ne,U);case"D":return y.$D;case"DD":return T.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return qe(_.weekdaysMin,y.$W,V,2);case"ddd":return qe(_.weekdaysShort,y.$W,V,3);case"dddd":return V[y.$W];case"H":return String(R);case"HH":return T.s(R,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return Ze(R,j,!0);case"A":return Ze(R,j,!1);case"m":return String(j);case"mm":return T.s(j,2,"0");case"s":return String(y.$s);case"ss":return T.s(y.$s,2,"0");case"SSS":return T.s(y.$ms,3,"0");case"Z":return H}return null}(ue)||H.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(v,y,_){var A,H=this,R=T.p(y),j=b(v),U=(j.utcOffset()-this.utcOffset())*n,V=this-j,ne=function(){return T.m(H,j)};switch(R){case d:A=ne()/12;break;case h:A=ne();break;case c:A=ne()/3;break;case f:A=(V-U)/6048e5;break;case l:A=(V-U)/864e5;break;case u:A=V/i;break;case o:A=V/n;break;case a:A=V/r;break;default:A=V}return _?A:T.a(A)},g.daysInMonth=function(){return this.endOf(h).$D},g.$locale=function(){return D[this.$L]},g.locale=function(v,y){if(!v)return this.$L;var _=this.clone(),A=re(v,y,!0);return A&&(_.$L=A),_},g.clone=function(){return T.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},x}(),ze=k.prototype;return b.prototype=ze,[["$ms",s],["$s",a],["$m",o],["$H",u],["$W",l],["$M",h],["$y",d],["$D",p]].forEach(function(x){ze[x[1]]=function(g){return this.$g(g,x[0],x[1])}}),b.extend=function(x,g){return x.$i||(x(g,k,b),x.$i=!0),b},b.locale=re,b.isDayjs=pe,b.unix=function(x){return b(1e3*x)},b.en=D[Z],b.Ls=D,b.p={},b})})(ps);var Oo=ps.exports;const Po=ds(Oo),No=(e,t="DD/MM/YYYY")=>{const r=Po(e);return r.isValid()?r.format(t):""},Io=(e,t)=>{window.postMessage({type:"Loyalty:RewardItemClicked",name:e,id:t},window.location.href)},$o=(e,t)=>{window.postMessage({type:"Loyalty:RedeemRewardRequested",name:e,id:t},window.location.href)},Lo=e=>{window.postMessage({type:"Loyalty:RedeemRewardSuccess",itemId:e},window.location.href)},Bo=(e,t)=>{window.postMessage({type:"Loyalty:RedeemRewardFailed",itemId:e,res:t},window.location.href)},Co=()=>{window.dispatchEvent(new CustomEvent("redeemRewardButton"))};var Ro=function(t){return Do(t)&&!Uo(t)};function Do(e){return!!e&&typeof e=="object"}function Uo(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||ko(e)}var Fo=typeof Symbol=="function"&&Symbol.for,Go=Fo?Symbol.for("react.element"):60103;function ko(e){return e.$$typeof===Go}function jo(e){return Array.isArray(e)?[]:{}}function jt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Et(jo(e),e,t):e}function Vo(e,t,r){return e.concat(t).map(function(n){return jt(n,r)})}function Xo(e,t){if(!t.customMerge)return Et;var r=t.customMerge(e);return typeof r=="function"?r:Et}function Wo(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Yn(e){return Object.keys(e).concat(Wo(e))}function vs(e,t){try{return t in e}catch{return!1}}function Yo(e,t){return vs(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function zo(e,t,r){var n={};return r.isMergeableObject(e)&&Yn(e).forEach(function(i){n[i]=jt(e[i],r)}),Yn(t).forEach(function(i){Yo(e,i)||(vs(e,i)&&r.isMergeableObject(t[i])?n[i]=Xo(i,r)(e[i],t[i],r):n[i]=jt(t[i],r))}),n}function Et(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Vo,r.isMergeableObject=r.isMergeableObject||Ro,r.cloneUnlessOtherwiseSpecified=jt;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):zo(e,t,r):jt(t,r)}Et.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Et(n,i,r)},{})};var qo=Et,Zo=qo;const Jo=ds(Zo);var rn=function(e,t){return rn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},rn(e,t)};function Mr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rn(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var He=function(){return He=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},He.apply(this,arguments)};function Qo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Rr(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}function Dr(e,t){var r=t&&t.cache?t.cache:su,n=t&&t.serializer?t.serializer:nu,i=t&&t.strategy?t.strategy:tu;return i(e,{cache:r,serializer:n})}function Ko(e){return e==null||typeof e=="number"||typeof e=="boolean"}function eu(e,t,r,n){var i=Ko(n)?n:r(n),s=t.get(i);return typeof s>"u"&&(s=e.call(this,n),t.set(i,s)),s}function _s(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return typeof s>"u"&&(s=e.apply(this,n),t.set(i,s)),s}function ms(e,t,r,n,i){return r.bind(t,e,n,i)}function tu(e,t){var r=e.length===1?eu:_s;return ms(e,this,r,t.cache.create(),t.serializer)}function ru(e,t){return ms(e,this,_s,t.cache.create(),t.serializer)}var nu=function(){return JSON.stringify(arguments)},iu=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,r){this.cache[t]=r},e}(),su={create:function(){return new iu}},Ur={variadic:ru},_r=function(){return _r=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},_r.apply(this,arguments)};var P;(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"})(P||(P={}));var G;(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"})(G||(G={}));var xt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(xt||(xt={}));function zn(e){return e.type===G.literal}function au(e){return e.type===G.argument}function gs(e){return e.type===G.number}function bs(e){return e.type===G.date}function ys(e){return e.type===G.time}function Es(e){return e.type===G.select}function xs(e){return e.type===G.plural}function ou(e){return e.type===G.pound}function ws(e){return e.type===G.tag}function Ts(e){return!!(e&&typeof e=="object"&&e.type===xt.number)}function nn(e){return!!(e&&typeof e=="object"&&e.type===xt.dateTime)}var Ss=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,uu=/(?:[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 lu(e){var t={};return e.replace(uu,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===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"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-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=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-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"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-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"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<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 W=function(){return W=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},W.apply(this,arguments)};var fu=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function hu(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(fu).filter(function(c){return c.length>0}),r=[],n=0,i=t;n<i.length;n++){var s=i[n],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 h=f[l];if(h.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:u})}return r}function cu(e){return e.replace(/^(.*?)-/,"")}var qn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,As=/^(@+)?(\+|#+)?[rs]?$/g,du=/(\*)(0+)|(#+)(0+)|(0+)/g,Hs=/^(0+)$/;function Zn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(As,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function Ms(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 pu(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 r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Hs.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Jn(e){var t={},r=Ms(e);return r||t}function vu(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];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=cu(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=W(W(W({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return W(W({},u),Jn(l))},{}));continue;case"engineering":t=W(W(W({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return W(W({},u),Jn(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(du,function(u,l,f,h,c,d){if(l)t.minimumIntegerDigits=f.length;else{if(h&&c)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(Hs.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(qn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(qn,function(u,l,f,h,c,d){return f==="*"?t.minimumFractionDigits=l.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:c&&d?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+d.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var s=i.options[0];s==="w"?t=W(W({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=W(W({},t),Zn(s)));continue}if(As.test(i.stem)){t=W(W({},t),Zn(i.stem));continue}var a=Ms(i.stem);a&&(t=W(W({},t),a));var o=pu(i.stem);o&&(t=W(W({},t),o))}return t}var Qt={"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 _u(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var s=0;n+1<e.length&&e.charAt(n+1)===i;)s++,n++;var a=1+(s&1),o=s<2?1:3+(s>>1),u="a",l=mu(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)r+=u;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function mu(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 r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Qt[n||""]||Qt[r||""]||Qt["".concat(r,"-001")]||Qt["001"];return i[0]}var Fr,gu=new RegExp("^".concat(Ss.source,"*")),bu=new RegExp("".concat(Ss.source,"*$"));function I(e,t){return{start:e,end:t}}var yu=!!String.prototype.startsWith&&"_a".startsWith("a",1),Eu=!!String.fromCodePoint,xu=!!Object.fromEntries,wu=!!String.prototype.codePointAt,Tu=!!String.prototype.trimStart,Su=!!String.prototype.trimEnd,Au=!!Number.isSafeInteger,Hu=Au?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},sn=!0;try{var Mu=Ps("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");sn=((Fr=Mu.exec("a"))===null||Fr===void 0?void 0:Fr[0])==="a"}catch{sn=!1}var Qn=yu?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},an=Eu?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,s=0,a;i>s;){if(a=t[s++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Kn=xu?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var s=i[n],a=s[0],o=s[1];r[a]=o}return r},Os=wu?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),s;return i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},Ou=Tu?function(t){return t.trimStart()}:function(t){return t.replace(gu,"")},Pu=Su?function(t){return t.trimEnd()}:function(t){return t.replace(bu,"")};function Ps(e,t){return new RegExp(e,t)}var on;if(sn){var ei=Ps("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");on=function(t,r){var n;ei.lastIndex=r;var i=ei.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else on=function(t,r){for(var n=[];;){var i=Os(t,r);if(i===void 0||Ns(i)||Lu(i))break;n.push(i),r+=i>=65536?2:1}return an.apply(void 0,n)};var Nu=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.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,r,n){for(var i=[];!this.isEOF();){var s=this.char();if(s===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(s===125&&t>0)break;if(s===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:G.pound,location:I(o,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(P.UNMATCHED_CLOSING_TAG,I(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&un(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:G.literal,value:"<".concat(i,"/>"),location:I(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,r,!0);if(s.err)return s;var a=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!un(this.char()))return this.error(P.INVALID_TAG,I(o,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(P.UNMATCHED_CLOSING_TAG,I(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:G.tag,value:i,children:a,location:I(n,this.clonePosition())},err:null}:this.error(P.INVALID_TAG,I(o,this.clonePosition())))}else return this.error(P.UNCLOSED_TAG,I(n,this.clonePosition()))}else return this.error(P.INVALID_TAG,I(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&$u(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var s=this.tryParseQuote(r);if(s){i+=s;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=I(n,this.clonePosition());return{val:{type:G.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Iu(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 r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return an.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),an(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,I(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(P.EMPTY_ARGUMENT,I(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(P.MALFORMED_ARGUMENT,I(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,I(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:G.argument,value:i,location:I(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,I(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(P.MALFORMED_ARGUMENT,I(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=on(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),a=I(t,s);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(P.EXPECT_ARGUMENT_TYPE,I(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var c=Pu(h.val);if(c.length===0)return this.error(P.EXPECT_ARGUMENT_STYLE,I(this.clonePosition(),this.clonePosition()));var d=I(f,this.clonePosition());l={style:c,styleLocation:d}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var E=I(i,this.clonePosition());if(l&&Qn(l?.style,"::",0)){var m=Ou(l.style.slice(2));if(o==="number"){var h=this.parseNumberSkeletonFromString(m,l.styleLocation);return h.err?h:{val:{type:G.number,value:n,location:E,style:h.val},err:null}}else{if(m.length===0)return this.error(P.EXPECT_DATE_TIME_SKELETON,E);var S=m;this.locale&&(S=_u(m,this.locale));var c={type:xt.dateTime,pattern:S,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?lu(S):{}},L=o==="date"?G.date:G.time;return{val:{type:L,value:n,location:E,style:c},err:null}}}return{val:{type:o==="number"?G.number:o==="date"?G.date:G.time,value:n,location:E,style:(s=l?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var N=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(P.EXPECT_SELECT_ARGUMENT_OPTIONS,I(N,_r({},N)));this.bumpSpace();var X=this.parseIdentifierIfPossible(),Z=0;if(o!=="select"&&X.value==="offset"){if(!this.bumpIf(":"))return this.error(P.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,I(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(P.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,P.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),X=this.parseIdentifierIfPossible(),Z=h.val}var D=this.tryParsePluralOrSelectOptions(t,o,r,X);if(D.err)return D;var p=this.tryParseArgumentClose(i);if(p.err)return p;var Y=I(i,this.clonePosition());return o==="select"?{val:{type:G.select,value:n,options:Kn(D.val),location:Y},err:null}:{val:{type:G.plural,value:n,options:Kn(D.val),offset:Z,pluralType:o==="plural"?"cardinal":"ordinal",location:Y},err:null}}default:return this.error(P.INVALID_ARGUMENT_TYPE,I(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,I(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(P.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,I(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(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=hu(t)}catch{return this.error(P.INVALID_NUMBER_SKELETON,r)}return{val:{type:xt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?vu(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,a=!1,o=[],u=new Set,l=i.value,f=i.location;;){if(l.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(P.EXPECT_PLURAL_ARGUMENT_SELECTOR,P.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;f=I(h,this.clonePosition()),l=this.message.slice(h.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?P.DUPLICATE_SELECT_ARGUMENT_SELECTOR:P.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);l==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?P.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:P.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,I(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,r,n);if(p.err)return p;var E=this.tryParseArgumentClose(d);if(E.err)return E;o.push([l,{value:p.val,location:I(d,this.clonePosition())}]),u.add(l),this.bumpSpace(),s=this.parseIdentifierIfPossible(),l=s.value,f=s.location}return o.length===0?this.error(r==="select"?P.EXPECT_SELECT_ARGUMENT_SELECTOR:P.EXPECT_PLURAL_ARGUMENT_SELECTOR,I(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(P.MISSING_OTHER_CLAUSE,I(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-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=I(i,this.clonePosition());return s?(a*=n,Hu(a)?{val:a,err:null}:this.error(r,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 r=Os(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},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(Qn(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!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 r=this.offset();if(r===t)break;if(r>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()&&Ns(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function un(e){return e>=97&&e<=122||e>=65&&e<=90}function Iu(e){return un(e)||e===47}function $u(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 Ns(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Lu(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 ln(e){e.forEach(function(t){if(delete t.location,Es(t)||xs(t))for(var r in t.options)delete t.options[r].location,ln(t.options[r].value);else gs(t)&&Ts(t.style)||(bs(t)||ys(t))&&nn(t.style)?delete t.style.location:ws(t)&&ln(t.children)})}function Bu(e,t){t===void 0&&(t={}),t=_r({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Nu(e,t).parse();if(r.err){var n=SyntaxError(P[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||ln(r.val),r.val}var wt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(wt||(wt={}));var Or=function(e){Mr(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.code=n,s.originalMessage=i,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ti=function(e){Mr(t,e);function t(r,n,i,s){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),wt.INVALID_VALUE,s)||this}return t}(Or),Cu=function(e){Mr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),wt.INVALID_VALUE,i)||this}return t}(Or),Ru=function(e){Mr(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),wt.MISSING_VALUE,n)||this}return t}(Or),ie;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ie||(ie={}));function Du(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==ie.literal||r.type!==ie.literal?t.push(r):n.value+=r.value,t},[])}function Uu(e){return typeof e=="function"}function sr(e,t,r,n,i,s,a){if(e.length===1&&zn(e[0]))return[{type:ie.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var f=l[u];if(zn(f)){o.push({type:ie.literal,value:f.value});continue}if(ou(f)){typeof s=="number"&&o.push({type:ie.literal,value:r.getNumberFormat(t).format(s)});continue}var h=f.value;if(!(i&&h in i))throw new Ru(h,a);var c=i[h];if(au(f)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),o.push({type:typeof c=="string"?ie.literal:ie.object,value:c});continue}if(bs(f)){var d=typeof f.style=="string"?n.date[f.style]:nn(f.style)?f.style.parsedOptions:void 0;o.push({type:ie.literal,value:r.getDateTimeFormat(t,d).format(c)});continue}if(ys(f)){var d=typeof f.style=="string"?n.time[f.style]:nn(f.style)?f.style.parsedOptions:n.time.medium;o.push({type:ie.literal,value:r.getDateTimeFormat(t,d).format(c)});continue}if(gs(f)){var d=typeof f.style=="string"?n.number[f.style]:Ts(f.style)?f.style.parsedOptions:void 0;d&&d.scale&&(c=c*(d.scale||1)),o.push({type:ie.literal,value:r.getNumberFormat(t,d).format(c)});continue}if(ws(f)){var p=f.children,E=f.value,m=i[E];if(!Uu(m))throw new Cu(E,"function",a);var S=sr(p,t,r,n,i,s),L=m(S.map(function(Z){return Z.value}));Array.isArray(L)||(L=[L]),o.push.apply(o,L.map(function(Z){return{type:typeof Z=="string"?ie.literal:ie.object,value:Z}}))}if(Es(f)){var N=f.options[c]||f.options.other;if(!N)throw new ti(f.value,c,Object.keys(f.options),a);o.push.apply(o,sr(N.value,t,r,n,i));continue}if(xs(f)){var N=f.options["=".concat(c)];if(!N){if(!Intl.PluralRules)throw new Or(`Intl.PluralRules is not available in this environment.
|
|
4
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
5
|
+
`,wt.MISSING_INTL_API,a);var X=r.getPluralRules(t,{type:f.pluralType}).select(c-(f.offset||0));N=f.options[X]||f.options.other}if(!N)throw new ti(f.value,c,Object.keys(f.options),a);o.push.apply(o,sr(N.value,t,r,n,i,c-(f.offset||0)));continue}}return Du(o)}function Fu(e,t){return t?He(He(He({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=He(He({},e[n]),t[n]||{}),r},{})):e}function Gu(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Fu(e[n],t[n]),r},He({},e)):e}function Gr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function ku(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Dr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,Rr([void 0],r,!1)))},{cache:Gr(e.number),strategy:Ur.variadic}),getDateTimeFormat:Dr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,Rr([void 0],r,!1)))},{cache:Gr(e.dateTime),strategy:Ur.variadic}),getPluralRules:Dr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,Rr([void 0],r,!1)))},{cache:Gr(e.pluralRules),strategy:Ur.variadic})}}var ju=function(){function e(t,r,n,i){r===void 0&&(r=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(h,c){return!h.length||c.type!==ie.literal||typeof h[h.length-1]!="string"?h.push(c.value):h[h.length-1]+=c.value,h},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return sr(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=r,this.resolvedLocale=e.resolveLocale(r),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=Qo(a,["formatters"]);this.ast=e.__parse(t,He(He({},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=Gu(e.formats,n),this.formatters=i&&i.formatters||ku(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 r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Bu,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 Vu(e,t){if(t==null)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let i=0;i<r.length;i++)if(typeof n=="object"){if(i>0){const s=r.slice(i,r.length).join(".");if(s in n){n=n[s];break}}n=n[r[i]]}else n=void 0;return n}const je={},Xu=(e,t,r)=>r&&(t in je||(je[t]={}),e in je[t]||(je[t][e]=r),r),Is=(e,t)=>{if(t==null)return;if(t in je&&e in je[t])return je[t][e];const r=Pr(t);for(let n=0;n<r.length;n++){const i=r[n],s=Yu(i,e);if(s)return Xu(e,t,s)}};let In;const At=Hr({});function Wu(e){return In[e]||null}function $s(e){return e in In}function Yu(e,t){if(!$s(e))return null;const r=Wu(e);return Vu(r,t)}function zu(e){if(e==null)return;const t=Pr(e);for(let r=0;r<t.length;r++){const n=t[r];if($s(n))return n}}function Ls(e,...t){delete je[e],At.update(r=>(r[e]=Jo.all([r[e]||{},...t]),r))}St([At],([e])=>Object.keys(e));At.subscribe(e=>In=e);const ar={};function qu(e,t){ar[e].delete(t),ar[e].size===0&&delete ar[e]}function Bs(e){return ar[e]}function Zu(e){return Pr(e).map(t=>{const r=Bs(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function fn(e){return e==null?!1:Pr(e).some(t=>{var r;return(r=Bs(t))==null?void 0:r.size})}function Ju(e,t){return Promise.all(t.map(n=>(qu(e,n),n().then(i=>i.default||i)))).then(n=>Ls(e,...n))}const Nt={};function Cs(e){if(!fn(e))return e in Nt?Nt[e]:Promise.resolve();const t=Zu(e);return Nt[e]=Promise.all(t.map(([r,n])=>Ju(r,n))).then(()=>{if(fn(e))return Cs(e);delete Nt[e]}),Nt[e]}const Qu={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"}}},Ku={fallbackLocale:null,loadingDelay:200,formats:Qu,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},el=Ku;function Tt(){return el}const kr=Hr(!1);var tl=Object.defineProperty,rl=Object.defineProperties,nl=Object.getOwnPropertyDescriptors,ri=Object.getOwnPropertySymbols,il=Object.prototype.hasOwnProperty,sl=Object.prototype.propertyIsEnumerable,ni=(e,t,r)=>t in e?tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,al=(e,t)=>{for(var r in t||(t={}))il.call(t,r)&&ni(e,r,t[r]);if(ri)for(var r of ri(t))sl.call(t,r)&&ni(e,r,t[r]);return e},ol=(e,t)=>rl(e,nl(t));let hn;const mr=Hr(null);function ii(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function Pr(e,t=Tt().fallbackLocale){const r=ii(e);return t?[...new Set([...r,...ii(t)])]:r}function ot(){return hn??void 0}mr.subscribe(e=>{hn=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const ul=e=>{if(e&&zu(e)&&fn(e)){const{loadingDelay:t}=Tt();let r;return typeof window<"u"&&ot()!=null&&t?r=window.setTimeout(()=>kr.set(!0),t):kr.set(!0),Cs(e).then(()=>{mr.set(e)}).finally(()=>{clearTimeout(r),kr.set(!1)})}return mr.set(e)},Ye=ol(al({},mr),{set:ul}),Nr=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var ll=Object.defineProperty,gr=Object.getOwnPropertySymbols,Rs=Object.prototype.hasOwnProperty,Ds=Object.prototype.propertyIsEnumerable,si=(e,t,r)=>t in e?ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$n=(e,t)=>{for(var r in t||(t={}))Rs.call(t,r)&&si(e,r,t[r]);if(gr)for(var r of gr(t))Ds.call(t,r)&&si(e,r,t[r]);return e},Ht=(e,t)=>{var r={};for(var n in e)Rs.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gr)for(var n of gr(e))t.indexOf(n)<0&&Ds.call(e,n)&&(r[n]=e[n]);return r};const Vt=(e,t)=>{const{formats:r}=Tt();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},fl=Nr(e=>{var t=e,{locale:r,format:n}=t,i=Ht(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Vt("number",n)),new Intl.NumberFormat(r,i)}),hl=Nr(e=>{var t=e,{locale:r,format:n}=t,i=Ht(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Vt("date",n):Object.keys(i).length===0&&(i=Vt("date","short")),new Intl.DateTimeFormat(r,i)}),cl=Nr(e=>{var t=e,{locale:r,format:n}=t,i=Ht(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Vt("time",n):Object.keys(i).length===0&&(i=Vt("time","short")),new Intl.DateTimeFormat(r,i)}),dl=(e={})=>{var t=e,{locale:r=ot()}=t,n=Ht(t,["locale"]);return fl($n({locale:r},n))},pl=(e={})=>{var t=e,{locale:r=ot()}=t,n=Ht(t,["locale"]);return hl($n({locale:r},n))},vl=(e={})=>{var t=e,{locale:r=ot()}=t,n=Ht(t,["locale"]);return cl($n({locale:r},n))},_l=Nr((e,t=ot())=>new ju(e,t,Tt().formats,{ignoreTag:Tt().ignoreTag})),ml=(e,t={})=>{var r,n,i,s;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:o,locale:u=ot(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Is(e,u);if(!f)f=(s=(i=(n=(r=Tt()).handleMissingMessage)==null?void 0:n.call(r,{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 h=f;try{h=_l(f,u).format(o)}catch(c){c instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,c.message)}return h},gl=(e,t)=>vl(t).format(e),bl=(e,t)=>pl(t).format(e),yl=(e,t)=>dl(t).format(e),El=(e,t=ot())=>Is(e,t),Us=St([Ye,At],()=>ml);St([Ye],()=>gl);St([Ye],()=>bl);St([Ye],()=>yl);St([Ye,At],()=>El);function Fs({withLocale:e,translations:t}){Ye.subscribe(r=>{r==null&&(At.set(t),Ye.set(e))})}function Gs(e,t){Ls(e,t)}function xl(e){Ye.set(e)}const wl=e=>{let t=ee(void 0),r=ee(void 0),n=ee(void 0),i=ee(void 0),s=ee(!1),a=ee(void 0);const o=async()=>{const{apiEndpoint:u,userSession:l,locale:f,loadLevels:h,onLevelLoaded:c}=e();if(!(!u||!l)){z(s,!0),z(a,void 0);try{const d=[go({apiEndpoint:u,userSession:l,locale:f}).then(p=>{const E=p.level;E.name=E.presentation?.displayName||E.name,E.spendablePoints=p.spendableWallet?.total.points||0,z(t,E,!0),z(n,p.loyaltyWallet?.total,!0),z(i,p.spendableWallet?.total,!0),c?.({elevateLevel:E}),c?.({elevateLevelWalletTotal:p.spendableWallet?.total,loyaltyWalletTotal:p.loyaltyWallet?.total})})];h&&d.push(bo({apiEndpoint:u,userSession:l,locale:f}).then(p=>{z(r,p,!0)})),await Promise.all(d),await ka(),w(r)&&w(t)&&c?.({calculatedLevelFlag:Ho(w(r),w(t).loyaltyPoints??0)})}catch(d){z(a,d,!0),console.error("Failed to load elevate info:",d)}finally{z(s,!1)}}};return Gt(()=>{const{apiEndpoint:u,userSession:l,locale:f,loadLevels:h}=e();o()}),Gt(()=>{const u=()=>{o()};return window.addEventListener("redeemRewardButton",u),()=>window.removeEventListener("redeemRewardButton",u)}),{get playerElevateLevel(){return w(t)},get levels(){return w(r)},get loyaltyWalletTotal(){return w(n)},get spendableWalletTotal(){return w(i)},get loading(){return w(s)},get error(){return w(a)},reload:o}},Tl={en:{prev:"Previous",next:"Next"},tr:{prev:"Önceki",next:"Sonraki"},da:{prev:"Forrige",next:"Næste"},de:{prev:"Zurück",next:"Weiter"},nl:{prev:"Vorige",next:"Volgende"},fr:{prev:"Précédent",next:"Suivant"},hu:{prev:"Előző",next:"Következő"}},Dt=10,Sl=7,Al=4;var Hl=qt('<span class="loyalty-pagination__ellipsis" aria-hidden="true">...</span>'),Ml=qt('<button type="button"> </button>'),Ol=qt('<div class="loyalty-pagination__pages"><button class="loyalty-pagination__btn loyalty-pagination__btn--prev" type="button"> </button> <!> <button class="loyalty-pagination__btn loyalty-pagination__btn--next" type="button"> </button></div>'),Pl=qt('<div class="loyalty-pagination"><!></div>');const Nl={hash:"svelte-1op0ean",code:`.loyalty-pagination {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;box-sizing:border-box;width:100%;}
|
|
6
|
+
|
|
7
|
+
@media (min-width: 768px) {.loyalty-pagination {width:auto;margin-left:auto;justify-content:flex-end;padding-right:10px;}.loyalty-pagination__pages {justify-content:flex-end;}
|
|
8
|
+
}.loyalty-pagination__pages {display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:flex-start;}.loyalty-pagination__ellipsis {display:inline-flex;align-items:center;justify-content:center;color:var(--text-default, #dfe3e8);font-size:13px;width:24px;}.loyalty-pagination__btn {min-width:30px;height:30px;padding:4px 8px;border:none;border-radius:4px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));color:var(--text-subtle, #dfe3e8);font-size:13px;font-weight:400;cursor:pointer;}.loyalty-pagination__btn--active {background:var(--accent, #ffcc00);color:var(--text-on-color, #261d00);}.loyalty-pagination__btn:disabled {cursor:default;color:var(--text-muted, rgba(251, 251, 251, 0.15));}.loyalty-pagination__btn--prev,
|
|
9
|
+
.loyalty-pagination__btn--next {width:95px;}
|
|
10
|
+
|
|
11
|
+
@media (max-width: 767px) {.loyalty-pagination__btn--prev,
|
|
12
|
+
.loyalty-pagination__btn--next {width:90px;}
|
|
13
|
+
}.loyalty-pagination__btn--prev:not(:disabled),
|
|
14
|
+
.loyalty-pagination__btn--next:not(:disabled) {color:var(--text-default, #dfe3e8);}`};function Ln(e,t){wr(t,!0),ss(e,Nl);const r=()=>os(Us,"$_",n),[n,i]=us(),s=be(t,"offset",7,0),a=be(t,"limit",7,Dt),o=be(t,"total",7,0),u=be(t,"onPageChange",7,b=>{}),l=be(t,"locale",7,"en");Fs({withLocale:l(),translations:{}}),Object.entries(Tl).forEach(([b,T])=>{Gs(b,T)}),Gt(()=>{xl(l()??"en")});const f=Je(()=>Number(s())||0),h=Je(()=>Number(a())||Dt),c=Je(()=>Number(o())||0),d=Je(()=>Math.max(1,Math.ceil(w(c)/Math.max(1,w(h))))),p=Je(()=>w(h)>0?Math.floor(w(f)/w(h)):0);let E=ee(!1);Gt(()=>{const b=window.matchMedia("(max-width: 767px)"),T=k=>{z(E,k.matches,!0)};return z(E,b.matches,!0),b.addEventListener("change",T),()=>b.removeEventListener("change",T)});const m=(b,T,k)=>b<=(k?Al:Sl)?Array.from({length:b},(v,y)=>y):T<=1||T>=b-2?[0,1,"ellipsis",b-2,b-1]:[0,"ellipsis",T,"ellipsis",b-1],S=Je(()=>m(w(d),w(p),w(E))),L=b=>u()(b*w(h)),N=()=>u()(Math.max(0,w(p)-1)*w(h)),X=()=>u()(Math.min(w(d)-1,w(p)+1)*w(h));var Z={get offset(){return s()},set offset(b=0){s(b),ce()},get limit(){return a()},set limit(b=Dt){a(b),ce()},get total(){return o()},set total(b=0){o(b),ce()},get onPageChange(){return u()},set onPageChange(b=T=>{}){u(b),ce()},get locale(){return l()},set locale(b="en"){l(b),ce()}},D=Pl(),Y=pr(D);{var pe=b=>{var T=Ol(),k=pr(T),ze=tr(k,!0),x=qr(k,2);is(x,17,()=>w(S),ns,(y,_)=>{var A=es(),H=Li(A);{var R=U=>{var V=Hl();Ke(U,V)},j=U=>{var V=Ml();let ne;var Ue=tr(V,!0);Zr(()=>{ne=as(V,1,"loyalty-pagination__btn",null,ne,{"loyalty-pagination__btn--active":w(_)===w(p)}),nr(Ue,w(_)+1)}),rr("click",V,()=>L(w(_))),Ke(U,V)};Kr(H,U=>{w(_)==="ellipsis"?U(R):U(j,-1)})}Ke(y,A)});var g=qr(x,2),v=tr(g,!0);fr(T),Zr((y,_)=>{k.disabled=w(p)<=0,nr(ze,y),g.disabled=w(p)>=w(d)-1,nr(v,_)},[()=>r()("prev"),()=>r()("next")]),rr("click",k,N),rr("click",g,X),Ke(b,T)};Kr(Y,b=>{w(d)>1&&b(pe)})}fr(D),Ke(e,D);var re=Tr(Z);return i(),re}Ki(["click"]);Nn(Ln,{offset:{},limit:{},total:{},onPageChange:{},locale:{}},[],[],{mode:"open"});function ks(e,t){wr(t,!0);let r=be(t,"offset",7,0),n=be(t,"limit",7,Dt),i=be(t,"total",7,0),s=be(t,"onPageChange"),a=be(t,"locale",7,"en");var o={get offset(){return r()},set offset(u=0){r(u),ce()},get limit(){return n()},set limit(u=Dt){n(u),ce()},get total(){return i()},set total(u=0){i(u),ce()},get onPageChange(){return s()},set onPageChange(u){s(u),ce()},get locale(){return a()},set locale(u="en"){a(u),ce()}};return Ln(e,{get offset(){return r()},get limit(){return n()},get total(){return i()},get onPageChange(){return s()},get locale(){return a()}}),Tr(o)}customElements.define("loyalty-pagination",Nn(ks,{offset:{},limit:{},total:{},onPageChange:{},locale:{}},[],[]));const Il=Object.freeze(Object.defineProperty({__proto__:null,default:ks},Symbol.toStringTag,{value:"Module"}));exports.$format=Us;exports.DATE_FORMATS=wo;exports.EVENT_TYPES=yo;exports.ITEMS_LIMIT_DEFAULT=hs;exports.LoyaltyPagination=Ln;exports.LoyaltyPagination_ce=Il;exports.MOBILE_LOAD_ITEMS=xo;exports.SOURCE=Eo;exports.addNewMessages=Gs;exports.append=Ke;exports.append_styles=ss;exports.bind_this=ho;exports.child=pr;exports.comment=es;exports.createElevateData=wl;exports.create_custom_element=Nn;exports.delegate=Ki;exports.delegated=rr;exports.dispatchRedeemRewardButton=Co;exports.each=is;exports.fetchShopItem=So;exports.fetchShopRewards=To;exports.first_child=Li;exports.flushSync=ce;exports.formatDate=No;exports.from_html=qt;exports.get=w;exports.if_block=Kr;exports.index=ns;exports.only_child=tr;exports.pop=Tr;exports.prop=be;exports.proxy=ft;exports.push=wr;exports.redeemReward=Ao;exports.reset=fr;exports.sendRedeemRewardFailed=Bo;exports.sendRedeemRewardRequested=$o;exports.sendRedeemRewardSuccess=Lo;exports.sendRewardItemClicked=Io;exports.set=z;exports.set_attribute=uo;exports.set_class=as;exports.set_text=nr;exports.setupI18n=Fs;exports.setup_stores=us;exports.sibling=qr;exports.state=ee;exports.store_get=os;exports.template_effect=Zr;exports.user_derived=Je;exports.user_effect=Gt;exports.user_pre_effect=La;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-
|
|
1
|
+
typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-BpErkHgK.cjs"),N={en:{tokens:"Tokens",tokenBalance:"Token Balance",requestRakeback:"Request Rakeback",pointsToExpire:"{points} Tokens to expire on {date}"},tr:{tokens:"Tokens",tokenBalance:"Token Bakiyesi",requestRakeback:"Rakeback Talebi",pointsToExpire:"{date} tarihinde {points} Tokens sona erecek"},da:{tokens:"Tokens",tokenBalance:"Tokenbalance",requestRakeback:"Anmod om Rakeback",pointsToExpire:"{points} Tokens udløber den {date}"},de:{tokens:"Token",tokenBalance:"Token-Guthaben",requestRakeback:"Rakeback anfordern",pointsToExpire:"{points} Token verfallen am {date}"},nl:{tokens:"Tokens",tokenBalance:"Tokensaldo",requestRakeback:"Rakeback aanvragen",pointsToExpire:"{points} Tokens verlopen op {date}"},fr:{tokens:"Jetons",tokenBalance:"Solde de jetons",requestRakeback:"Demander un Rakeback",pointsToExpire:"{points} jetons expirent le {date}"},hu:{tokens:"Tokenek",tokenBalance:"Token egyenleg",requestRakeback:"Rakeback igénylése",pointsToExpire:"{points} token lejár ekkor: {date}"}};var H=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description"></span></div></div></div>'),I=e.from_html('<span class="loyalty-points__expiry"> </span>'),W=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__amount"> </span> <span class="loyalty-points__description"> </span> <!></div></div></div>');const G={hash:"svelte-1hsy08w",code:`.loyalty-points {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton {display:block;border-radius:6px;background:linear-gradient(
|
|
2
2
|
90deg,
|
|
3
3
|
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
4
|
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-CnoIs1uw.cjs"),N={en:{tokens:"Tokens",tokenBalance:"Token Balance",requestRakeback:"Request Rakeback",pointsToExpire:"{points} Tokens to expire on {date}"},tr:{tokens:"Tokens",tokenBalance:"Token Bakiyesi",requestRakeback:"Rakeback Talebi",pointsToExpire:"{date} tarihinde {points} Tokens sona erecek"},da:{tokens:"Tokens",tokenBalance:"Tokenbalance",requestRakeback:"Anmod om Rakeback",pointsToExpire:"{points} Tokens udløber den {date}"},de:{tokens:"Token",tokenBalance:"Token-Guthaben",requestRakeback:"Rakeback anfordern",pointsToExpire:"{points} Token verfallen am {date}"},nl:{tokens:"Tokens",tokenBalance:"Tokensaldo",requestRakeback:"Rakeback aanvragen",pointsToExpire:"{points} Tokens verlopen op {date}"},fr:{tokens:"Jetons",tokenBalance:"Solde de jetons",requestRakeback:"Demander un Rakeback",pointsToExpire:"{points} jetons expirent le {date}"},hu:{tokens:"Tokenek",tokenBalance:"Token egyenleg",requestRakeback:"Rakeback igénylése",pointsToExpire:"{points} token lejár ekkor: {date}"}};var H=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description"></span></div></div></div>'),I=e.from_html('<span class="loyalty-points__expiry"> </span>'),W=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__amount"> </span> <span class="loyalty-points__description"> </span> <!></div></div></div>');const G={hash:"svelte-1hsy08w",code:`.loyalty-points {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton {display:block;border-radius:6px;background:linear-gradient(
|
|
2
2
|
90deg,
|
|
3
3
|
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
4
|
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as O, p as P, a as ae, b as s, s as ne, d as oe, e as se, f as ie, g as le, i as z, h as f, j as C, D as T, k as i, l as re, m as o, u as k, n as E, o as S, q as A, r as F, t as M, v as R, w, x as de, $ as pe, y as ce } from "./LoyaltyPagination-
|
|
1
|
+
import { c as O, p as P, a as ae, b as s, s as ne, d as oe, e as se, f as ie, g as le, i as z, h as f, j as C, D as T, k as i, l as re, m as o, u as k, n as E, o as S, q as A, r as F, t as M, v as R, w, x as de, $ as pe, y as ce } from "./LoyaltyPagination-BNBJcXKk.js";
|
|
2
2
|
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as M, p as O, a as ae, b as s, s as ne, d as oe, e as se, f as ie, g as le, i as j, h as b, j as P, D as m, k as i, l as re, m as n, u as c, n as T, o as L, q as z, r as h, t as A, v as E, w as S, x as de, $ as pe, y as ce } from "./LoyaltyPagination-
|
|
1
|
+
import { c as M, p as O, a as ae, b as s, s as ne, d as oe, e as se, f as ie, g as le, i as j, h as b, j as P, D as m, k as i, l as re, m as n, u as c, n as T, o as L, q as z, r as h, t as A, v as E, w as S, x as de, $ as pe, y as ce } from "./LoyaltyPagination-BP3AxeDj.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -14,8 +14,8 @@ var X = (h, a, s) => new Promise((l, k) => {
|
|
|
14
14
|
}, p = (i) => i.done ? l(i.value) : Promise.resolve(i.value).then(u, c);
|
|
15
15
|
p((s = s.apply(h, a)).next());
|
|
16
16
|
});
|
|
17
|
-
import { z as Ze, c as fe, p as be, a as Je, b, s as We, d as le, A as f, B as de, P as ue, E as z, m as t, F as d, C as Ye, H as ce, S as Ge, i as $, h as I, j as _e, Q as T, R as Qe, u as pe, I as Xe, J as $e, K as et, L as tt, w as C, k as _, l as nt, n as me, r as H, T as ge, U as at, o as P, t as he, v as K, g as ot, q as U, x as st, $ as it, V as rt, O as ye, M as ee, W as lt, X as dt, N as ut, Y as ct } from "./LoyaltyPagination-
|
|
18
|
-
import { L as pt } from "./LoyaltyShopItem-
|
|
17
|
+
import { z as Ze, c as fe, p as be, a as Je, b, s as We, d as le, A as f, B as de, P as ue, E as z, m as t, F as d, C as Ye, H as ce, S as Ge, i as $, h as I, j as _e, Q as T, R as Qe, u as pe, I as Xe, J as $e, K as et, L as tt, w as C, k as _, l as nt, n as me, r as H, T as ge, U as at, o as P, t as he, v as K, g as ot, q as U, x as st, $ as it, V as rt, O as ye, M as ee, W as lt, X as dt, N as ut, Y as ct } from "./LoyaltyPagination-BNBJcXKk.js";
|
|
18
|
+
import { L as pt } from "./LoyaltyShopItem-DkUT2Hhc.js";
|
|
19
19
|
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
20
20
|
}, globalThis.customElements = { define() {
|
|
21
21
|
}, get() {
|
|
@@ -33,7 +33,7 @@ if (typeof window != "undefined") {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
customElements.define = h(customElements.define), import("./LoyaltyPagination-
|
|
36
|
+
customElements.define = h(customElements.define), import("./LoyaltyPagination-BNBJcXKk.js").then((a) => a.Z).then((a) => {
|
|
37
37
|
const s = a.default || a;
|
|
38
38
|
customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", s.element || s);
|
|
39
39
|
}).catch((a) => {
|
|
@@ -52,7 +52,7 @@ if (typeof window != "undefined") {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
-
customElements.define = h(customElements.define), import("./LoyaltyShopItem-
|
|
55
|
+
customElements.define = h(customElements.define), import("./LoyaltyShopItem-DkUT2Hhc.js").then((a) => a.a).then((a) => {
|
|
56
56
|
const s = a.default || a;
|
|
57
57
|
customElements.get("loyalty-shop-item") || customElements.define("loyalty-shop-item", s.element || s);
|
|
58
58
|
}).catch((a) => {
|
|
@@ -120,7 +120,7 @@ const mt = {
|
|
|
120
120
|
var ht = C('<div class="loyalty-shop__item loyalty-shop__item--skeleton"><div class="loyalty-shop__item-image skeleton-box"></div> <div class="loyalty-shop__item-title skeleton-line"></div> <div class="loyalty-shop__item-points skeleton-line skeleton-line--short"></div> <div class="loyalty-shop__item-button-skeleton skeleton-box"></div></div>'), yt = C('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton"></div>'), ft = C('<div class="loyalty-shop__unavailable"> </div>'), bt = C('<div><div role="button" tabindex="0" class="loyalty-shop__item-image-container"><img class="loyalty-shop__item-image"/></div> <span class="loyalty-shop__item-title"> </span> <span class="loyalty-shop__item-points"> </span> <button class="loyalty-shop__item-button" type="button"> </button></div>'), _t = C('<div class="load-more-sentinel" aria-hidden="true"></div>'), vt = C('<div class="loyalty-shop__grid"></div> <!> <!>', 1), kt = C('<div class="loyalty-shop"><!></div>');
|
|
121
121
|
const wt = {
|
|
122
122
|
hash: "svelte-1f1q033",
|
|
123
|
-
code: `.loyalty-shop {padding:16px;border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));background-color:var(--app-container-bg-default, #022652);width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;}.loyalty-shop__unavailable {color:var(--text-subtle, #dfe3e8);font-size:14px;padding:24px 0;text-align:center;}.loyalty-shop__grid {display:grid;gap:16px;grid-template-columns:repeat(2, 1fr);margin:0;}.loyalty-shop__item {display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:10px;border:1px solid var(--border-default, rgba(251, 251, 251, 0.15));background-color:var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1));}.loyalty-shop__item--unavailable {opacity:1;}.loyalty-shop__item-image {width:100%;height:
|
|
123
|
+
code: `.loyalty-shop {padding:16px;border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));background-color:var(--app-container-bg-default, #022652);width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;}.loyalty-shop__unavailable {color:var(--text-subtle, #dfe3e8);font-size:14px;padding:24px 0;text-align:center;}.loyalty-shop__grid {display:grid;gap:16px;grid-template-columns:repeat(2, 1fr);margin:0;}.loyalty-shop__item {display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:10px;border:1px solid var(--border-default, rgba(251, 251, 251, 0.15));background-color:var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1));}.loyalty-shop__item--unavailable {opacity:1;}.loyalty-shop__item-image {display:block;width:100%;height:auto;aspect-ratio:9 / 10;object-fit:cover;border-radius:6px;}.loyalty-shop__item-title {color:var(--text-default, #ffffff);font-size:12px;font-weight:400;}.loyalty-shop__item-points {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-shop__item-button {margin-top:auto;width:100%;height:37px;padding:8px 16px;border:none;border-radius:6px;background:var(--button-primary-bg-default, #ffcc00);color:var(--button-primary-text-default, #261d00);font-size:12px;font-weight:400;cursor:pointer;}.loyalty-shop__item-button:disabled {opacity:0.4;cursor:default;}.loyalty-shop-container {display:flex;flex-direction:column;gap:12px;}.skeleton-box {background:linear-gradient(
|
|
124
124
|
90deg,
|
|
125
125
|
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
126
126
|
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
@@ -132,7 +132,7 @@ const wt = {
|
|
|
132
132
|
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
133
133
|
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
134
134
|
);background-size:200% 100%;
|
|
135
|
-
animation: shimmer 3s linear infinite;}.skeleton-line--short {width:40%;}.loyalty-shop__item--skeleton {display:flex;flex-direction:column;}.loyalty-shop__item--skeleton .loyalty-shop__item-image {width:100%;height:
|
|
135
|
+
animation: shimmer 3s linear infinite;}.skeleton-line--short {width:40%;}.loyalty-shop__item--skeleton {display:flex;flex-direction:column;}.loyalty-shop__item--skeleton .loyalty-shop__item-image {width:100%;height:auto;aspect-ratio:9 / 10;border-radius:6px;}.loyalty-shop__item--skeleton .loyalty-shop__item-title {width:90%;}.loyalty-shop__item--skeleton .loyalty-shop__item-points {width:40%;}.loyalty-shop__item-button-skeleton {margin-top:auto;width:100%;height:40px;border-radius:6px;}.loyalty-shop__item-image-container {cursor:pointer;}
|
|
136
136
|
|
|
137
137
|
@keyframes shimmer {
|
|
138
138
|
0% {
|
|
@@ -144,7 +144,7 @@ const wt = {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
@media (min-width: 768px) {.loyalty-shop__grid {grid-template-columns:repeat(4, 1fr);justify-content:start;margin:0;}.loyalty-shop__item {width:100%;height:100%;box-sizing:border-box;}
|
|
147
|
+
@media (min-width: 768px) {.loyalty-shop__grid {grid-template-columns:repeat(4, 1fr);justify-content:start;margin:0;}.loyalty-shop__item {width:100%;height:100%;box-sizing:border-box;}
|
|
148
148
|
}`
|
|
149
149
|
};
|
|
150
150
|
function ve(h, a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=(m,o,i)=>new Promise((l,f)=>{var d=r=>{try{
|
|
1
|
+
var j=(m,o,i)=>new Promise((l,f)=>{var d=r=>{try{p(i.next(r))}catch(_){f(_)}},c=r=>{try{p(i.throw(r))}catch(_){f(_)}},p=r=>r.done?l(r.value):Promise.resolve(r.value).then(d,c);p((i=i.apply(m,o)).next())});typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-BpErkHgK.cjs"),ve=require("./LoyaltyShopItem-C8gpofzS.cjs");if(typeof window!="undefined"){let m=function(o){return function(...i){try{return o.apply(this,i)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l instanceof Error&&l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=m(customElements.define),Promise.resolve().then(()=>require("./LoyaltyPagination-BpErkHgK.cjs")).then(o=>o.LoyaltyPagination_ce).then(o=>{const i=o.default||o;customElements.get("loyalty-pagination")||customElements.define("loyalty-pagination",i.element||i)}).catch(o=>{console.error("BOOT ERROR:",o)})}if(typeof window!="undefined"){let m=function(o){return function(...i){try{return o.apply(this,i)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l instanceof Error&&l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=m(customElements.define),Promise.resolve().then(()=>require("./LoyaltyShopItem-C8gpofzS.cjs")).then(o=>o.LoyaltyShopItem_ce).then(o=>{const i=o.default||o;customElements.get("loyalty-shop-item")||customElements.define("loyalty-shop-item",i.element||i)}).catch(o=>{console.error("BOOT ERROR:",o)})}const ke={en:{loading:"Loading…",noContent:"There are no bonus items available for redemption.",networkProblem:"Network problem. Please reload.",tokens:"Tokens",buyNow:"Buy Now",generalError:"Something went wrong... Please try again."},tr:{loading:"Yükleniyor…",noContent:"Kullanılabilir bonus öğesi bulunmamaktadır.",networkProblem:"Ağ sorunu. Lütfen yeniden yükleyin.",tokens:"Tokens",buyNow:"Satın Al",generalError:"Bir sorun oluştu, lütfen tekrar deneyin."},da:{loading:"Indlæser…",noContent:"Der er ingen bonusgenstande tilgængelige til indløsning.",networkProblem:"Netværksproblem. Genindlæs venligst siden.",tokens:"Tokens",buyNow:"Køb nu",generalError:"Noget gik galt. Prøv venligst igen."},de:{loading:"Wird geladen…",noContent:"Es sind keine Bonusartikel zum Einlösen verfügbar.",networkProblem:"Netzwerkproblem. Bitte lade die Seite neu.",tokens:"Token",buyNow:"Jetzt kaufen",generalError:"Etwas ist schiefgelaufen. Bitte versuche es erneut."},nl:{loading:"Laden…",noContent:"Er zijn geen bonusitems beschikbaar om in te wisselen.",networkProblem:"Netwerkprobleem. Laad de pagina opnieuw.",tokens:"Tokens",buyNow:"Nu kopen",generalError:"Er is iets misgegaan. Probeer het opnieuw."},fr:{loading:"Chargement…",noContent:"Aucun bonus n'est disponible pour être échangé.",networkProblem:"Problème de réseau. Veuillez recharger la page.",tokens:"Jetons",buyNow:"Acheter",generalError:"Une erreur s'est produite. Veuillez réessayer."},hu:{loading:"Betöltés…",noContent:"Nincsenek beváltható bónuszok.",networkProblem:"Hálózati probléma. Kérjük, töltsd újra az oldalt.",tokens:"Tokenek",buyNow:"Vásárlás",generalError:"Hiba történt. Kérjük, próbáld újra."}},Ee="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='800px'%20height='800px'%20viewBox='0%200%20120%20120'%20fill='none'%3e%3crect%20width='120'%20height='120'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M33.2503%2038.4816C33.2603%2037.0472%2034.4199%2035.8864%2035.8543%2035.875H83.1463C84.5848%2035.875%2085.7503%2037.0431%2085.7503%2038.4816V80.5184C85.7403%2081.9528%2084.5807%2083.1136%2083.1463%2083.125H35.8543C34.4158%2083.1236%2033.2503%2081.957%2033.2503%2080.5184V38.4816ZM80.5006%2041.1251H38.5006V77.8751L62.8921%2053.4783C63.9172%2052.4536%2065.5788%2052.4536%2066.6039%2053.4783L80.5006%2067.4013V41.1251ZM43.75%2051.6249C43.75%2054.5244%2046.1005%2056.8749%2049%2056.8749C51.8995%2056.8749%2054.25%2054.5244%2054.25%2051.6249C54.25%2048.7254%2051.8995%2046.3749%2049%2046.3749C46.1005%2046.3749%2043.75%2048.7254%2043.75%2051.6249Z'%20fill='%23687787'/%3e%3c/svg%3e";var we=e.from_html('<div class="loyalty-shop__item loyalty-shop__item--skeleton"><div class="loyalty-shop__item-image skeleton-box"></div> <div class="loyalty-shop__item-title skeleton-line"></div> <div class="loyalty-shop__item-points skeleton-line skeleton-line--short"></div> <div class="loyalty-shop__item-button-skeleton skeleton-box"></div></div>'),xe=e.from_html('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton"></div>'),Se=e.from_html('<div class="loyalty-shop__unavailable"> </div>'),Ie=e.from_html('<div><div role="button" tabindex="0" class="loyalty-shop__item-image-container"><img class="loyalty-shop__item-image"/></div> <span class="loyalty-shop__item-title"> </span> <span class="loyalty-shop__item-points"> </span> <button class="loyalty-shop__item-button" type="button"> </button></div>'),Le=e.from_html('<div class="load-more-sentinel" aria-hidden="true"></div>'),Te=e.from_html('<div class="loyalty-shop__grid"></div> <!> <!>',1),Me=e.from_html('<div class="loyalty-shop"><!></div>');const Ce={hash:"svelte-1f1q033",code:`.loyalty-shop {padding:16px;border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));background-color:var(--app-container-bg-default, #022652);width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;}.loyalty-shop__unavailable {color:var(--text-subtle, #dfe3e8);font-size:14px;padding:24px 0;text-align:center;}.loyalty-shop__grid {display:grid;gap:16px;grid-template-columns:repeat(2, 1fr);margin:0;}.loyalty-shop__item {display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:10px;border:1px solid var(--border-default, rgba(251, 251, 251, 0.15));background-color:var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1));}.loyalty-shop__item--unavailable {opacity:1;}.loyalty-shop__item-image {display:block;width:100%;height:auto;aspect-ratio:9 / 10;object-fit:cover;border-radius:6px;}.loyalty-shop__item-title {color:var(--text-default, #ffffff);font-size:12px;font-weight:400;}.loyalty-shop__item-points {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-shop__item-button {margin-top:auto;width:100%;height:37px;padding:8px 16px;border:none;border-radius:6px;background:var(--button-primary-bg-default, #ffcc00);color:var(--button-primary-text-default, #261d00);font-size:12px;font-weight:400;cursor:pointer;}.loyalty-shop__item-button:disabled {opacity:0.4;cursor:default;}.loyalty-shop-container {display:flex;flex-direction:column;gap:12px;}.skeleton-box {background:linear-gradient(
|
|
2
2
|
90deg,
|
|
3
3
|
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
4
|
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
@@ -10,7 +10,7 @@ var j=(m,o,i)=>new Promise((l,f)=>{var d=r=>{try{c(i.next(r))}catch(_){f(_)}},p=
|
|
|
10
10
|
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
11
11
|
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
12
12
|
);background-size:200% 100%;
|
|
13
|
-
animation: shimmer 3s linear infinite;}.skeleton-line--short {width:40%;}.loyalty-shop__item--skeleton {display:flex;flex-direction:column;}.loyalty-shop__item--skeleton .loyalty-shop__item-image {width:100%;height:
|
|
13
|
+
animation: shimmer 3s linear infinite;}.skeleton-line--short {width:40%;}.loyalty-shop__item--skeleton {display:flex;flex-direction:column;}.loyalty-shop__item--skeleton .loyalty-shop__item-image {width:100%;height:auto;aspect-ratio:9 / 10;border-radius:6px;}.loyalty-shop__item--skeleton .loyalty-shop__item-title {width:90%;}.loyalty-shop__item--skeleton .loyalty-shop__item-points {width:40%;}.loyalty-shop__item-button-skeleton {margin-top:auto;width:100%;height:40px;border-radius:6px;}.loyalty-shop__item-image-container {cursor:pointer;}
|
|
14
14
|
|
|
15
15
|
@keyframes shimmer {
|
|
16
16
|
0% {
|
|
@@ -22,6 +22,6 @@ var j=(m,o,i)=>new Promise((l,f)=>{var d=r=>{try{c(i.next(r))}catch(_){f(_)}},p=
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
@media (min-width: 768px) {.loyalty-shop__grid {grid-template-columns:repeat(4, 1fr);justify-content:start;margin:0;}.loyalty-shop__item {width:100%;height:100%;box-sizing:border-box;}
|
|
26
|
-
}`};function F(m,o){e.push(o,!0),e.append_styles(m,Ce);const i=()=>e.store_get(e.$format,"$_",l),[l,f]=e.setup_stores(),d=e.prop(o,"apiEndpoint",7,""),
|
|
27
|
-
${B!=null?B:""}`),A.disabled=_e,e.set_text(he,be)},[()=>!U(e.get(
|
|
25
|
+
@media (min-width: 768px) {.loyalty-shop__grid {grid-template-columns:repeat(4, 1fr);justify-content:start;margin:0;}.loyalty-shop__item {width:100%;height:100%;box-sizing:border-box;}
|
|
26
|
+
}`};function F(m,o){e.push(o,!0),e.append_styles(m,Ce);const i=()=>e.store_get(e.$format,"$_",l),[l,f]=e.setup_stores(),d=e.prop(o,"apiEndpoint",7,""),c=e.prop(o,"userSession",7,""),p=e.prop(o,"locale",7,""),r=e.prop(o,"limitItem",7,e.ITEMS_LIMIT_DEFAULT),_=e.prop(o,"translationUrl");e.setupI18n({withLocale:p(),translations:{}});const G=()=>j(this,null,function*(){try{const t=new URL(_(),window.location.href),n=yield fetch(t.href);if(!n.ok)throw new Error("Failed to fetch translations");const a=yield n.json();Object.entries(a).forEach(([s,y])=>{e.addNewMessages(s,y)})}catch(t){console.error("loyalty shop translation url err:",t)}});Object.entries(ke).forEach(([t,n])=>{e.addNewMessages(t,n)});let h=e.state(e.proxy([])),E=e.state(void 0),L=e.state(0),v=e.state(0),w=e.state(e.proxy(e.MOBILE_LOAD_ITEMS)),N=e.state(!1),O=e.state(!1),S=e.state(void 0),k=e.state(!1),T=e.state(void 0),M=0;const Q=e.user_derived(()=>typeof r()=="number"?r():parseInt(r(),e.ITEMS_LIMIT_DEFAULT)||e.ITEMS_LIMIT_DEFAULT),q=()=>{if(!d()||!c())return;e.set(N,!0),e.set(O,!1);const t=++M,n=e.get(k)&&e.get(v)>0;e.fetchShopRewards({apiEndpoint:d(),userSession:c(),locale:p()},e.get(v),e.get(w)).then(a=>{var y,b;if(t!==M)return;const s=(y=a.data)!=null?y:[];e.set(L,(b=a.total)!=null?b:0,!0),n?e.set(h,[...e.get(h),...s],!0):e.set(h,s,!0)}).catch(a=>{t===M&&(e.set(O,!0),console.error("Failed to load shop rewards:",a))}).finally(()=>{t===M&&e.set(N,!1)})};e.user_effect(()=>{d(),c(),p(),e.get(v),e.get(w),q()}),e.user_effect(()=>{const t=window.matchMedia("(max-width: 767px)"),n=a=>{e.set(k,a.matches,!0)};return e.set(k,t.matches,!0),t.addEventListener("change",n),()=>t.removeEventListener("change",n)}),e.user_effect(()=>{e.set(w,e.get(k)?e.MOBILE_LOAD_ITEMS:e.get(Q),!0)}),e.user_effect(()=>{if(!e.get(k)||!e.get(T))return;const t=new IntersectionObserver(n=>{n.some(a=>a.isIntersecting)&&e.get(h).length<e.get(L)&&e.set(v,e.get(v)+e.get(w))},{rootMargin:"200px"});return t.observe(e.get(T)),()=>t.disconnect()}),e.user_pre_effect(()=>{_()&&G()});const X=t=>{var n,a,s;return(s=(a=(n=t.presentation)==null?void 0:n.assets)==null?void 0:a[0])!=null?s:Ee},P=t=>{var n,a,s;return(s=(a=t.displayName)!=null?a:(n=t.presentation)==null?void 0:n.displayName)!=null?s:""},U=t=>t.available==="true",$=t=>{e.get(S)||!U(t)||e.sendRedeemRewardRequested(P(t),t.id)},ee=t=>j(this,null,function*(){if(!(!d()||e.get(S))){e.set(S,t,!0);try{yield e.redeemReward({apiEndpoint:d(),userSession:c()},t),e.sendRedeemRewardSuccess(t),e.dispatchRedeemRewardButton(),q()}catch(n){e.sendRedeemRewardFailed(t,n)}finally{e.set(S,void 0)}}});e.user_effect(()=>{const t=n=>{var b;const{type:a,id:s,source:y}=(b=n.data)!=null?b:{};switch(a){case e.EVENT_TYPES.REDEEM_REWARD_CONFIRMED:if(e.get(E))break;s&&e.get(h).some(I=>I.id===s)&&ee(s);break;case e.EVENT_TYPES.BACK_BUTTON_CLICKED:y===e.SOURCE&&e.set(E,void 0);break}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const te=()=>e.get(h).length?i()("generalError"):i()("noContent"),ne=t=>{e.set(v,t,!0)},oe=t=>{e.sendRewardItemClicked(t.displayName||t.presentation.displayName,t.id)},V=t=>{e.set(E,t,!0),oe(t)},ae=t=>n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),V(t))};var ie={get apiEndpoint(){return d()},set apiEndpoint(t=""){d(t),e.flushSync()},get userSession(){return c()},set userSession(t=""){c(t),e.flushSync()},get locale(){return p()},set locale(t=""){p(t),e.flushSync()},get limitItem(){return r()},set limitItem(t=e.ITEMS_LIMIT_DEFAULT){r(t),e.flushSync()},get translationUrl(){return _()},set translationUrl(t){_(t),e.flushSync()}},D=Me(),re=e.child(D);{var se=t=>{ve.LoyaltyShopItem(t,{get itemId(){return e.get(E).id},get elevateReward(){return e.get(E)},get apiEndpoint(){return d()},get userSession(){return c()},get locale(){return p()}})},le=t=>{var n=xe();e.each(n,21,()=>Array(e.get(w)),e.index,(a,s,y,b)=>{var I=we();e.append(a,I)}),e.reset(n),e.append(t,n)},de=t=>{var n=Se(),a=e.only_child(n,!0);e.template_effect(s=>e.set_text(a,s),[()=>te()]),e.append(t,n)},ce=t=>{var n=Te(),a=e.first_child(n);e.each(a,21,()=>e.get(h),g=>g.id,(g,u)=>{var x=Ie();let H;var C=e.child(x),ue=e.user_derived(()=>ae(e.get(u))),K=e.only_child(C),Y=e.sibling(C,2),ge=e.only_child(Y,!0),Z=e.sibling(Y,2),me=e.only_child(Z),A=e.sibling(Z,2),he=e.only_child(A,!0);e.reset(x),e.template_effect((z,R,ye,fe,B,_e,be)=>{var J;H=e.set_class(x,1,"loyalty-shop__item",null,H,{"loyalty-shop__item--unavailable":z}),e.set_attribute(K,"src",R),e.set_attribute(K,"alt",ye),e.set_text(ge,fe),e.set_text(me,`${(J=e.get(u).points)!=null?J:""}
|
|
27
|
+
${B!=null?B:""}`),A.disabled=_e,e.set_text(he,be)},[()=>!U(e.get(u)),()=>X(e.get(u)),()=>P(e.get(u)),()=>P(e.get(u)),()=>i()("tokens"),()=>!U(e.get(u))||e.get(S)===e.get(u).id,()=>i()("buyNow")]),e.delegated("click",C,()=>V(e.get(u))),e.delegated("keydown",C,function(...z){var R;(R=e.get(ue))==null||R.apply(this,z)}),e.delegated("click",A,()=>$(e.get(u))),e.append(g,x)}),e.reset(a);var s=e.sibling(a,2);{var y=g=>{e.LoyaltyPagination(g,{get offset(){return e.get(v)},get limit(){return e.get(w)},get total(){return e.get(L)},onPageChange:ne,get locale(){return p()}})};e.if_block(s,g=>{e.get(k)||g(y)})}var b=e.sibling(s,2);{var I=g=>{var u=Le();e.bind_this(u,x=>e.set(T,x),()=>e.get(T)),e.append(g,u)};e.if_block(b,g=>{e.get(k)&&e.get(h).length<e.get(L)&&g(I)})}e.append(t,n)};e.if_block(re,t=>{e.get(E)?t(se):e.get(N)&&e.get(h).length===0?t(le,1):!e.get(h).length||e.get(O)?t(de,2):t(ce,-1)})}e.reset(D),e.append(m,D);var pe=e.pop(ie);return f(),pe}e.delegate(["click","keydown"]);e.create_custom_element(F,{apiEndpoint:{},userSession:{},locale:{},limitItem:{},translationUrl:{}},[],[],{mode:"open"});function W(m,o){e.push(o,!0);let i=e.prop(o,"apiEndpoint",7,""),l=e.prop(o,"userSession",7,""),f=e.prop(o,"locale",7,""),d=e.prop(o,"limitItem",7,e.ITEMS_LIMIT_DEFAULT),c=e.prop(o,"translationUrl");var p={get apiEndpoint(){return i()},set apiEndpoint(r=""){i(r),e.flushSync()},get userSession(){return l()},set userSession(r=""){l(r),e.flushSync()},get locale(){return f()},set locale(r=""){f(r),e.flushSync()},get limitItem(){return d()},set limitItem(r=e.ITEMS_LIMIT_DEFAULT){d(r),e.flushSync()},get translationUrl(){return c()},set translationUrl(r){c(r),e.flushSync()}};return F(m,{get apiEndpoint(){return i()},get userSession(){return l()},get locale(){return f()},get limitItem(){return d()},get translationUrl(){return c()}}),e.pop(p)}customElements.define("loyalty-shop",e.create_custom_element(W,{apiEndpoint:{},userSession:{},locale:{},limitItem:{},translationUrl:{}},[],[]));const Re=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));exports.LoyaltyShop=F;exports.LoyaltyShop_ce=Re;
|