@everymatrix/loyalty-level 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/LoyaltyLevel-DREpdTjL.cjs +5 -0
- package/components/LoyaltyLevel-DnkEmYTH.js +6420 -0
- package/package.json +29 -0
- package/svelte/loyalty-level.js +5586 -0
- package/wc/loyalty-level.cjs +1 -0
- package/wc/loyalty-level.js +14 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const Os="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Os);let Er=!1,Ms=!1;function Cs(){Er=!0}Cs();const Rs=1,$s=2,Qn=4,Ds=8,Us=16,Fs=1,Gs=2,Jn="[",xr="[!",ln="]",at={},j=Symbol(),ks="http://www.w3.org/1999/xhtml",jr=!1;var Kn=Array.isArray,js=Array.prototype.indexOf,wr=Array.from,cr=Object.keys,kt=Object.defineProperty,Et=Object.getOwnPropertyDescriptor,Vs=Object.getOwnPropertyDescriptors,Xs=Object.prototype,Ws=Array.prototype,ei=Object.getPrototypeOf,An=Object.isExtensible;const Xe=()=>{};function ti(e){for(var t=0;t<e.length;t++)e[t]()}function ri(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const X=2,dr=4,Tr=8,ni=1<<24,De=16,Ue=32,Qe=64,un=128,ce=512,z=1024,ee=2048,Fe=4096,ae=8192,We=16384,Sr=32768,xt=65536,Hn=1<<17,ii=1<<18,ft=1<<19,zs=1<<20,Me=1<<25,ot=32768,Vr=1<<21,fn=1<<22,ze=1<<23,lr=Symbol("$state"),qs=Symbol("legacy props"),Zs=Symbol(""),bt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},hn=3,ht=8;function Ys(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Js(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ks(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ea(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ta(){throw new Error("https://svelte.dev/e/hydration_failed")}function ra(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function na(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ia(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function sa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Wt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function aa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let P=!1;function Ce(e){P=e}let A;function J(e){if(e===null)throw Wt(),at;return A=e}function wt(){return J(ye(A))}function I(e){if(P){if(ye(A)!==null)throw Wt(),at;A=e}}function oa(e=1){if(P){for(var t=e,r=A;t--;)r=ye(r);A=r}}function vr(e=!0){for(var t=0,r=A;;){if(r.nodeType===ht){var n=r.data;if(n===ln){if(t===0)return r;t-=1}else(n===Jn||n===xr)&&(t+=1)}var i=ye(r);e&&r.remove(),r=i}}function si(e){if(!e||e.nodeType!==ht)throw Wt(),at;return e.data}function ai(e){return e===this.v}function oi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function li(e){return!oi(e,this.v)}let V=null;function Tt(e){V=e}function cn(e,t=!1,r){V={p:V,i:!1,c:null,e:null,s:e,x:null,l:Er&&!t?{s:null,u:null,$:[]}:null}}function dn(e){var t=V,r=t.e;if(r!==null){t.e=null;for(var n of r)Ni(n)}return t.i=!0,V=t.p,{}}function zt(){return!Er||V!==null&&V.l===null}let tt=[];function ui(){var e=tt;tt=[],ti(e)}function qt(e){if(tt.length===0&&!Ft){var t=tt;queueMicrotask(()=>{t===tt&&ui()})}tt.push(e)}function la(){for(;tt.length>0;)ui()}function fi(e){var t=H;if(t===null)return w.f|=ze,e;if(t.f&Sr)St(e,t);else{if(!(t.f&un))throw e;t.b.error(e)}}function St(e,t){for(;t!==null;){if(t.f&un)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const ua=-7169;function G(e,t){e.f=e.f&ua|t}function vn(e){e.f&ce||e.deps===null?G(e,z):G(e,Fe)}function hi(e){if(e!==null)for(const t of e)!(t.f&X)||!(t.f&ot)||(t.f^=ot,hi(t.deps))}function ci(e,t,r){e.f&ee?t.add(e):e.f&Fe&&r.add(e),hi(e.deps),G(e,z)}const ir=new Set;let D=null,_e=null,fe=[],Ar=null,Xr=!1,Ft=!1;class me{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#s=0;#a=null;#i=new Set;#n=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){fe=[],this.apply();var r=[],n=[];for(const i of t)this.#o(i,r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#l(n),this.#l(r)):(D=null,Ln(n),Ln(r),this.#a?.resolve()),_e=null}#o(t,r,n){t.f^=z;for(var i=t.first,s=null;i!==null;){var a=i.f,o=(a&(Ue|Qe))!==0,l=o&&(a&z)!==0,u=l||(a&ae)!==0||this.skipped_effects.has(i);if(!u&&i.fn!==null){o?i.f^=z:s!==null&&a&(dr|Tr|ni)?s.b.defer_effect(i):a&dr?r.push(i):Zt(i)&&(a&De&&this.#i.add(i),jt(i));var f=i.first;if(f!==null){i=f;continue}}var c=i.parent;for(i=i.next;i===null&&c!==null;)c===s&&(s=null),i=c.next,c=c.parent}}#l(t){for(var r=0;r<t.length;r+=1)ci(t[r],this.#i,this.#n)}capture(t,r){r!==j&&!this.previous.has(t)&&this.previous.set(t,r),t.f&ze||(this.current.set(t,t.v),_e?.set(t,t.v))}activate(){D=this,this.apply()}deactivate(){D===this&&(D=null,_e=null)}flush(){if(this.activate(),fe.length>0){if(vi(),D!==null&&D!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#t)t(this);this.#t.clear()}#u(){if(this.#s===0){for(const t of this.#e)t();this.#e.clear()}this.#r===0&&this.#f()}#f(){if(ir.size>1){this.previous.clear();var t=_e,r=!0;for(const i of ir){if(i===this){r=!1;continue}const s=[];for(const[o,l]of this.current){if(i.current.has(o))if(r&&l!==i.current.get(o))i.current.set(o,l);else continue;s.push(o)}if(s.length===0)continue;const a=[...i.current.keys()].filter(o=>!this.current.has(o));if(a.length>0){var n=fe;fe=[];const o=new Set,l=new Map;for(const u of s)pi(u,a,o,l);if(fe.length>0){D=i,i.apply();for(const u of fe)i.#o(u,[],[]);i.deactivate()}fe=n}}D=null,_e=t}this.committed=!0,ir.delete(this)}increment(t){this.#r+=1,t&&(this.#s+=1)}decrement(t){this.#r-=1,t&&(this.#s-=1),this.revive()}revive(){for(const t of this.#i)this.#n.delete(t),G(t,ee),$e(t);for(const t of this.#n)G(t,Fe),$e(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#a??=ri()).promise}static ensure(){if(D===null){const t=D=new me;ir.add(D),Ft||me.enqueue(()=>{D===t&&t.flush()})}return D}static enqueue(t){qt(t)}apply(){}}function di(e){var t=Ft;Ft=!0;try{for(var r;;){if(la(),fe.length===0&&(D?.flush(),fe.length===0))return Ar=null,r;vi()}}finally{Ft=t}}function vi(){var e=it;Xr=!0;var t=null;try{var r=0;for(_r(!0);fe.length>0;){var n=me.ensure();if(r++>1e3){var i,s;fa()}n.process(fe),qe.clear()}}finally{Xr=!1,_r(e),Ar=null}}function fa(){try{ea()}catch(e){St(e,Ar)}}let Ie=null;function Ln(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if(!(n.f&(We|ae))&&Zt(n)&&(Ie=new Set,jt(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?Mi(n):n.fn=null),Ie?.size>0)){qe.clear();for(const i of Ie){if(i.f&(We|ae))continue;const s=[i];let a=i.parent;for(;a!==null;)Ie.has(a)&&(Ie.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];l.f&(We|ae)||jt(l)}}Ie.clear()}}Ie=null}}function pi(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&X?pi(i,t,r,n):s&(fn|De)&&!(s&ee)&&_i(i,t,n)&&(G(i,ee),$e(i))}}function _i(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(t.includes(i))return!0;if(i.f&X&&_i(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function $e(e){for(var t=Ar=e;t.parent!==null;){t=t.parent;var r=t.f;if(Xr&&t===H&&r&De&&!(r&ii))return;if(r&(Qe|Ue)){if(!(r&z))return;t.f^=z}}fe.push(t)}function ha(e){let t=0,r=lt(0),n;return()=>{gn()&&(d(r),bn(()=>(t===0&&(n=xn(()=>e(()=>Gt(r)))),t+=1,()=>{qt(()=>{t-=1,t===0&&(n?.(),n=void 0,Gt(r))})})))}}var ca=xt|ft|un;function da(e,t,r){new va(e,t,r)}class va{parent;is_pending=!1;#e;#t=P?A:null;#r;#s;#a;#i=null;#n=null;#o=null;#l=null;#u=null;#f=0;#h=0;#d=!1;#v=new Set;#p=new Set;#c=null;#y=ha(()=>(this.#c=lt(this.#f),()=>{this.#c=null}));constructor(t,r,n){this.#e=t,this.#r=r,this.#s=n,this.parent=H.b,this.is_pending=!!this.#r.pending,this.#a=yn(()=>{if(H.b=this,P){const s=this.#t;wt(),s.nodeType===ht&&s.data===xr?this.#x():(this.#E(),this.#h===0&&(this.is_pending=!1))}else{var i=this.#g();try{this.#i=he(()=>n(i))}catch(s){this.error(s)}this.#h>0?this.#m():this.is_pending=!1}return()=>{this.#u?.remove()}},ca),P&&(this.#e=A)}#E(){try{this.#i=he(()=>this.#s(this.#e))}catch(t){this.error(t)}}#x(){const t=this.#r.pending;t&&(this.#n=he(()=>t(this.#e)),me.enqueue(()=>{var r=this.#g();this.#i=this.#_(()=>(me.ensure(),he(()=>this.#s(r)))),this.#h>0?this.#m():(nt(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#g(){var t=this.#e;return this.is_pending&&(this.#u=de(),this.#e.before(this.#u),t=this.#u),t}defer_effect(t){ci(t,this.#v,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#_(t){var r=H,n=w,i=V;Ae(this.#a),re(this.#a),Tt(this.#a.ctx);try{return t()}catch(s){return fi(s),null}finally{Ae(r),re(n),Tt(i)}}#m(){const t=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#u),$i(this.#i,this.#l)),this.#n===null&&(this.#n=he(()=>t(this.#e)))}#b(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t);return}if(this.#h+=t,this.#h===0){this.is_pending=!1;for(const r of this.#v)G(r,ee),$e(r);for(const r of this.#p)G(r,Fe),$e(r);this.#v.clear(),this.#p.clear(),this.#n&&nt(this.#n,()=>{this.#n=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(t){this.#b(t),this.#f+=t,this.#c&&At(this.#c,this.#f)}get_effect_pending(){return this.#y(),d(this.#c)}error(t){var r=this.#r.onerror;let n=this.#r.failed;if(this.#d||!r&&!n)throw t;this.#i&&(K(this.#i),this.#i=null),this.#n&&(K(this.#n),this.#n=null),this.#o&&(K(this.#o),this.#o=null),P&&(J(this.#t),oa(),J(vr()));var i=!1,s=!1;const a=()=>{if(i){aa();return}i=!0,s&&sa(),me.ensure(),this.#f=0,this.#o!==null&&nt(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#d=!1,he(()=>this.#s(this.#e)))),this.#h>0?this.#m():this.is_pending=!1};var o=w;try{re(null),s=!0,r?.(t,a),s=!1}catch(l){St(l,this.#a&&this.#a.parent)}finally{re(o)}n&&qt(()=>{this.#o=this.#_(()=>{me.ensure(),this.#d=!0;try{return he(()=>{n(this.#e,()=>t,()=>a)})}catch(l){return St(l,this.#a.parent),null}finally{this.#d=!1}})})}}function pa(e,t,r,n){const i=zt()?pn:mi;if(r.length===0&&e.length===0){n(t.map(i));return}var s=D,a=H,o=_a();function l(){Promise.all(r.map(u=>ma(u))).then(u=>{o();try{n([...t.map(i),...u])}catch(f){a.f&We||St(f,a)}s?.deactivate(),pr()}).catch(u=>{St(u,a)})}e.length>0?Promise.all(e).then(()=>{o();try{return l()}finally{s?.deactivate(),pr()}}):l()}function _a(){var e=H,t=w,r=V,n=D;return function(s=!0){Ae(e),re(t),Tt(r),s&&n?.activate()}}function pr(){Ae(null),re(null),Tt(null)}function pn(e){var t=X|ee,r=w!==null&&w.f&X?w:null;return H!==null&&(H.f|=ft),{ctx:V,deps:null,effects:null,equals:ai,f:t,fn:e,reactions:null,rv:0,v:j,wv:0,parent:r??H,ac:null}}function ma(e,t,r){let n=H;n===null&&Ys();var i=n.b,s=void 0,a=lt(j),o=!w,l=new Map;return Sa(()=>{var u=ri();s=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).then(()=>{f===D&&f.committed&&f.deactivate(),pr()})}catch(v){u.reject(v),pr()}var f=D;if(o){var c=i.is_rendered();i.update_pending_count(1),f.increment(c),l.get(f)?.reject(bt),l.delete(f),l.set(f,u)}const h=(v,_=void 0)=>{if(f.activate(),_)_!==bt&&(a.f|=ze,At(a,_));else{a.f&ze&&(a.f^=ze),At(a,v);for(const[b,p]of l){if(l.delete(b),b===f)break;p.reject(bt)}}o&&(i.update_pending_count(-1),f.decrement(c))};u.promise.then(h,v=>h(null,v||"unknown"))}),Pi(()=>{for(const u of l.values())u.reject(bt)}),new Promise(u=>{function f(c){function h(){c===s?u(a):f(s)}c.then(h,h)}f(s)})}function Ee(e){const t=pn(e);return Di(t),t}function mi(e){const t=pn(e);return t.equals=li,t}function gi(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)K(t[r])}}function ga(e){for(var t=e.parent;t!==null;){if(!(t.f&X))return t.f&We?null:t;t=t.parent}return null}function _n(e){var t,r=H;Ae(ga(e));try{e.f&=~ot,gi(e),t=ki(e)}finally{Ae(r)}return t}function bi(e){var t=_n(e);if(!e.equals(t)&&(e.wv=Fi(),(!D?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){G(e,z);return}ut||(_e!==null?(gn()||D?.is_fork)&&_e.set(e,t):vn(e))}let Wr=new Set;const qe=new Map;let yi=!1;function lt(e,t){var r={f:0,v:e,reactions:null,equals:ai,rv:0,wv:0};return r}function F(e,t){const r=lt(e);return Di(r),r}function mn(e,t=!1,r=!0){const n=lt(e);return t||(n.equals=li),Er&&r&&V!==null&&V.l!==null&&(V.l.s??=[]).push(n),n}function N(e,t,r=!1){w!==null&&(!be||w.f&Hn)&&zt()&&w.f&(X|De|fn|Hn)&&!Re?.includes(e)&&ia();let n=r?yt(t):t;return At(e,n)}function At(e,t){if(!e.equals(t)){var r=e.v;ut?qe.set(e,t):qe.set(e,r),e.v=t;var n=me.ensure();if(n.capture(e,r),e.f&X){const i=e;e.f&ee&&_n(i),vn(i)}e.wv=Fi(),Ei(e,ee),zt()&&H!==null&&H.f&z&&!(H.f&(Ue|Qe))&&(ue===null?Ha([e]):ue.push(e)),!n.is_fork&&Wr.size>0&&!yi&&ba()}return t}function ba(){yi=!1;var e=it;_r(!0);const t=Array.from(Wr);try{for(const r of t)r.f&z&&G(r,Fe),Zt(r)&&jt(r)}finally{_r(e)}Wr.clear()}function Gt(e){N(e,e.v+1)}function Ei(e,t){var r=e.reactions;if(r!==null)for(var n=zt(),i=r.length,s=0;s<i;s++){var a=r[s],o=a.f;if(!(!n&&a===H)){var l=(o&ee)===0;if(l&&G(a,t),o&X){var u=a;_e?.delete(u),o&ot||(o&ce&&(a.f|=ot),Ei(u,Fe))}else l&&(o&De&&Ie!==null&&Ie.add(a),$e(a))}}}function yt(e){if(typeof e!="object"||e===null||lr in e)return e;const t=ei(e);if(t!==Xs&&t!==Ws)return e;var r=new Map,n=Kn(e),i=F(0),s=st,a=o=>{if(st===s)return o();var l=w,u=st;re(null),Bn(s);var f=o();return re(l),Bn(u),f};return n&&r.set("length",F(e.length)),new Proxy(e,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ra();var f=r.get(l);return f===void 0?f=a(()=>{var c=F(u.value);return r.set(l,c),c}):N(f,u.value,!0),!0},deleteProperty(o,l){var u=r.get(l);if(u===void 0){if(l in o){const f=a(()=>F(j));r.set(l,f),Gt(i)}}else N(u,j),Gt(i);return!0},get(o,l,u){if(l===lr)return e;var f=r.get(l),c=l in o;if(f===void 0&&(!c||Et(o,l)?.writable)&&(f=a(()=>{var v=yt(c?o[l]:j),_=F(v);return _}),r.set(l,f)),f!==void 0){var h=d(f);return h===j?void 0:h}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var f=r.get(l);f&&(u.value=d(f))}else if(u===void 0){var c=r.get(l),h=c?.v;if(c!==void 0&&h!==j)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(o,l){if(l===lr)return!0;var u=r.get(l),f=u!==void 0&&u.v!==j||Reflect.has(o,l);if(u!==void 0||H!==null&&(!f||Et(o,l)?.writable)){u===void 0&&(u=a(()=>{var h=f?yt(o[l]):j,v=F(h);return v}),r.set(l,u));var c=d(u);if(c===j)return!1}return f},set(o,l,u,f){var c=r.get(l),h=l in o;if(n&&l==="length")for(var v=u;v<c.v;v+=1){var _=r.get(v+"");_!==void 0?N(_,j):v in o&&(_=a(()=>F(j)),r.set(v+"",_))}if(c===void 0)(!h||Et(o,l)?.writable)&&(c=a(()=>F(void 0)),N(c,yt(u)),r.set(l,c));else{h=c.v!==j;var b=a(()=>yt(u));N(c,b)}var p=Reflect.getOwnPropertyDescriptor(o,l);if(p?.set&&p.set.call(f,u),!h){if(n&&typeof l=="string"){var g=r.get("length"),L=Number(l);Number.isInteger(L)&&L>=g.v&&N(g,L+1)}Gt(i)}return!0},ownKeys(o){d(i);var l=Reflect.ownKeys(o).filter(c=>{var h=r.get(c);return h===void 0||h.v!==j});for(var[u,f]of r)f.v!==j&&!(u in o)&&l.push(u);return l},setPrototypeOf(){na()}})}var Pn,xi,wi,Ti;function zr(){if(Pn===void 0){Pn=window,xi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;wi=Et(t,"firstChild").get,Ti=Et(t,"nextSibling").get,An(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),An(r)&&(r.__t=void 0)}}function de(e=""){return document.createTextNode(e)}function ge(e){return wi.call(e)}function ye(e){return Ti.call(e)}function M(e,t){if(!P)return ge(e);var r=ge(A);if(r===null)r=A.appendChild(de());else if(t&&r.nodeType!==hn){var n=de();return r?.before(n),J(n),n}return J(r),r}function Si(e,t=!1){if(!P){var r=ge(e);return r instanceof Comment&&r.data===""?ye(r):r}if(t&&A?.nodeType!==hn){var n=de();return A?.before(n),J(n),n}return A}function Y(e,t=1,r=!1){let n=P?A:e;for(var i;t--;)i=n,n=ye(n);if(!P)return n;if(r&&n?.nodeType!==hn){var s=de();return n===null?i?.after(s):n.before(s),J(s),s}return J(n),n}function Ai(e){e.textContent=""}function Hi(){return!1}function Li(e){var t=w,r=H;re(null),Ae(null);try{return e()}finally{re(t),Ae(r)}}function ya(e){H===null&&(w===null&&Ks(),Js()),ut&&Qs()}function Ea(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function He(e,t,r){var n=H;n!==null&&n.f&ae&&(e|=ae);var i={ctx:V,deps:null,nodes:null,f:e|ee|ce,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{jt(i),i.f|=Sr}catch(o){throw K(i),o}else t!==null&&$e(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&!(s.f&ft)&&(s=s.first,e&De&&e&xt&&s!==null&&(s.f|=xt)),s!==null&&(s.parent=n,n!==null&&Ea(s,n),w!==null&&w.f&X&&!(e&Qe))){var a=w;(a.effects??=[]).push(s)}return i}function gn(){return w!==null&&!be}function Pi(e){const t=He(Tr,null,!1);return G(t,z),t.teardown=e,t}function we(e){ya();var t=H.f,r=!w&&(t&Ue)!==0&&(t&Sr)===0;if(r){var n=V;(n.e??=[]).push(e)}else return Ni(e)}function Ni(e){return He(dr|zs,e,!1)}function xa(e){me.ensure();const t=He(Qe|ft,e,!0);return()=>{K(t)}}function wa(e){me.ensure();const t=He(Qe|ft,e,!0);return(r={})=>new Promise(n=>{r.outro?nt(t,()=>{K(t),n(void 0)}):(K(t),n(void 0))})}function Ta(e){return He(dr,e,!1)}function Sa(e){return He(fn|ft,e,!0)}function bn(e,t=0){return He(Tr|t,e,!0)}function Oe(e,t=[],r=[],n=[]){pa(n,t,r,i=>{He(Tr,()=>e(...i.map(d)),!0)})}function yn(e,t=0){var r=He(De|t,e,!0);return r}function he(e){return He(Ue|ft,e,!0)}function Bi(e){var t=e.teardown;if(t!==null){const r=ut,n=w;Nn(!0),re(null);try{t.call(null)}finally{Nn(r),re(n)}}}function Ii(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Li(()=>{i.abort(bt)});var n=r.next;r.f&Qe?r.parent=null:K(r,t),r=n}}function Aa(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Ue||K(t),t=r}}function K(e,t=!0){var r=!1;(t||e.f&ii)&&e.nodes!==null&&e.nodes.end!==null&&(Oi(e.nodes.start,e.nodes.end),r=!0),Ii(e,t&&!r),mr(e,0),G(e,We);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Bi(e);var i=e.parent;i!==null&&i.first!==null&&Mi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Oi(e,t){for(;e!==null;){var r=e===t?null:ye(e);e.remove(),e=r}}function Mi(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 nt(e,t,r=!0){var n=[];Ci(e,n,!0);var i=()=>{r&&K(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function Ci(e,t,r){if(!(e.f&ae)){e.f^=ae;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,a=(i.f&xt)!==0||(i.f&Ue)!==0&&(e.f&De)!==0;Ci(i,t,a?r:!1),i=s}}}function En(e){Ri(e,!0)}function Ri(e,t){if(e.f&ae){e.f^=ae,e.f&z||(G(e,ee),$e(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&xt)!==0||(r.f&Ue)!==0;Ri(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 $i(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:ye(r);t.append(r),r=i}}let it=!1;function _r(e){it=e}let ut=!1;function Nn(e){ut=e}let w=null,be=!1;function re(e){w=e}let H=null;function Ae(e){H=e}let Re=null;function Di(e){w!==null&&(Re===null?Re=[e]:Re.push(e))}let te=null,se=0,ue=null;function Ha(e){ue=e}let Ui=1,rt=0,st=rt;function Bn(e){st=e}function Fi(){return++Ui}function Zt(e){var t=e.f;if(t&ee)return!0;if(t&X&&(e.f&=~ot),t&Fe){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Zt(s)&&bi(s),s.wv>e.wv)return!0}t&ce&&_e===null&&G(e,z)}return!1}function Gi(e,t,r=!0){var n=e.reactions;if(n!==null&&!Re?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];s.f&X?Gi(s,t,!1):t===s&&(r?G(s,ee):s.f&z&&G(s,Fe),$e(s))}}function ki(e){var t=te,r=se,n=ue,i=w,s=Re,a=V,o=be,l=st,u=e.f;te=null,se=0,ue=null,w=u&(Ue|Qe)?null:e,Re=null,Tt(e.ctx),be=!1,st=++rt,e.ac!==null&&(Li(()=>{e.ac.abort(bt)}),e.ac=null);try{e.f|=Vr;var f=e.fn,c=f(),h=e.deps;if(te!==null){var v;if(mr(e,se),h!==null&&se>0)for(h.length=se+te.length,v=0;v<te.length;v++)h[se+v]=te[v];else e.deps=h=te;if(gn()&&e.f&ce)for(v=se;v<h.length;v++)(h[v].reactions??=[]).push(e)}else h!==null&&se<h.length&&(mr(e,se),h.length=se);if(zt()&&ue!==null&&!be&&h!==null&&!(e.f&(X|Fe|ee)))for(v=0;v<ue.length;v++)Gi(ue[v],e);if(i!==null&&i!==e){if(rt++,i.deps!==null)for(let _=0;_<r;_+=1)i.deps[_].rv=rt;if(t!==null)for(const _ of t)_.rv=rt;ue!==null&&(n===null?n=ue:n.push(...ue))}return e.f&ze&&(e.f^=ze),c}catch(_){return fi(_)}finally{e.f^=Vr,te=t,se=r,ue=n,w=i,Re=s,Tt(a),be=o,st=l}}function La(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&X&&(te===null||!te.includes(t))){var s=t;s.f&ce&&(s.f^=ce,s.f&=~ot),vn(s),gi(s),mr(s,0)}}function mr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)La(e,r[n])}function jt(e){var t=e.f;if(!(t&We)){G(e,z);var r=H,n=it;H=e,it=!0;try{t&(De|ni)?Aa(e):Ii(e),Bi(e);var i=ki(e);e.teardown=typeof i=="function"?i:null,e.wv=Ui;var s;jr&&Ms&&e.f&ee&&e.deps}finally{it=n,H=r}}}async function Pa(){await Promise.resolve(),di()}function d(e){var t=e.f,r=(t&X)!==0;if(w!==null&&!be){var n=H!==null&&(H.f&We)!==0;if(!n&&!Re?.includes(e)){var i=w.deps;if(w.f&Vr)e.rv<rt&&(e.rv=rt,te===null&&i!==null&&i[se]===e?se++:te===null?te=[e]:te.push(e));else{(w.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[w]:s.includes(w)||s.push(w)}}}if(ut&&qe.has(e))return qe.get(e);if(r){var a=e;if(ut){var o=a.v;return(!(a.f&z)&&a.reactions!==null||Vi(a))&&(o=_n(a)),qe.set(a,o),o}var l=(a.f&ce)===0&&!be&&w!==null&&(it||(w.f&ce)!==0),u=a.deps===null;Zt(a)&&(l&&(a.f|=ce),bi(a)),l&&!u&&ji(a)}if(_e?.has(e))return _e.get(e);if(e.f&ze)throw e.v;return e.v}function ji(e){if(e.deps!==null){e.f|=ce;for(const t of e.deps)(t.reactions??=[]).push(e),t.f&X&&!(t.f&ce)&&ji(t)}}function Vi(e){if(e.v===j)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(qe.has(t)||t.f&X&&Vi(t))return!0;return!1}function xn(e){var t=be;try{return be=!0,e()}finally{be=t}}const Xi=new Set,qr=new Set;function Wi(e){for(var t=0;t<e.length;t++)Xi.add(e[t]);for(var r of qr)r(e)}let In=null;function sr(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;In=e;var a=0,o=In===e&&e.__root;if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||e.target,s!==t){kt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=w,c=H;re(null),Ae(null);try{for(var h,v=[];s!==null;){var _=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+n];b!=null&&(!s.disabled||e.target===s)&&b.call(s,e)}catch(p){h?v.push(p):h=p}if(e.cancelBubble||_===t||_===null)break;s=_}if(h){for(let p of v)queueMicrotask(()=>{throw p});throw h}}finally{e.__root=t,delete e.currentTarget,re(f),Ae(c)}}}function zi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Ze(e,t){var r=H;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function ne(e,t){var r=(t&Fs)!==0,n=(t&Gs)!==0,i,s=!e.startsWith("<!>");return()=>{if(P)return Ze(A,null),A;i===void 0&&(i=zi(s?e:"<!>"+e),r||(i=ge(i)));var a=n||xi?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=ge(a),l=a.lastChild;Ze(o,l)}else Ze(a,a);return a}}function Na(){if(P)return Ze(A,null),A;var e=document.createDocumentFragment(),t=document.createComment(""),r=de();return e.append(t,r),Ze(t,r),e}function W(e,t){if(P){var r=H;(!(r.f&Sr)||r.nodes.end===null)&&(r.nodes.end=A),wt();return}e!==null&&e.before(t)}const Ba=["touchstart","touchmove"];function Ia(e){return Ba.includes(e)}function xe(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function qi(e,t){return Zi(e,t)}function Oa(e,t){zr(),t.intro=t.intro??!1;const r=t.target,n=P,i=A;try{for(var s=ge(r);s&&(s.nodeType!==ht||s.data!==Jn);)s=ye(s);if(!s)throw at;Ce(!0),J(s);const a=Zi(e,{...t,anchor:s});return Ce(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==at&&console.warn("Failed to hydrate: ",a),t.recover===!1&&ta(),zr(),Ai(r),Ce(!1),qi(e,t)}finally{Ce(n),J(i)}}const mt=new Map;function Zi(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0}){zr();var o=new Set,l=c=>{for(var h=0;h<c.length;h++){var v=c[h];if(!o.has(v)){o.add(v);var _=Ia(v);t.addEventListener(v,sr,{passive:_});var b=mt.get(v);b===void 0?(document.addEventListener(v,sr,{passive:_}),mt.set(v,1)):mt.set(v,b+1)}}};l(wr(Xi)),qr.add(l);var u=void 0,f=wa(()=>{var c=r??t.appendChild(de());return da(c,{pending:()=>{}},h=>{if(s){cn({});var v=V;v.c=s}if(i&&(n.$$events=i),P&&Ze(h,null),u=e(h,n)||{},P&&(H.nodes.end=A,A===null||A.nodeType!==ht||A.data!==ln))throw Wt(),at;s&&dn()}),()=>{for(var h of o){t.removeEventListener(h,sr);var v=mt.get(h);--v===0?(document.removeEventListener(h,sr),mt.delete(h)):mt.set(h,v)}qr.delete(l),c!==r&&c.parentNode?.removeChild(c)}});return Zr.set(u,f),u}let Zr=new WeakMap;function Ma(e,t){const r=Zr.get(e);return r?(Zr.delete(e),r(t)):Promise.resolve()}class Ca{anchor;#e=new Map;#t=new Map;#r=new Map;#s=new Set;#a=!0;constructor(t,r=!0){this.anchor=t,this.#a=r}#i=()=>{var t=D;if(this.#e.has(t)){var r=this.#e.get(t),n=this.#t.get(r);if(n)En(n),this.#s.delete(r);else{var i=this.#r.get(r);i&&(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&&(K(o.effect),this.#r.delete(a))}for(const[s,a]of this.#t){if(s===r||this.#s.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var u=document.createDocumentFragment();$i(a,u),u.append(de()),this.#r.set(s,{effect:a,fragment:u})}else K(a);this.#s.delete(s),this.#t.delete(s)};this.#a||!n?(this.#s.add(s),nt(a,o,!1)):o()}}};#n=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(K(i.effect),this.#r.delete(n))};ensure(t,r){var n=D,i=Hi();if(r&&!this.#t.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),a=de();s.append(a),this.#r.set(t,{effect:he(()=>r(a)),fragment:s})}else this.#t.set(t,he(()=>r(this.anchor)));if(this.#e.set(n,t),i){for(const[o,l]of this.#t)o===t?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[o,l]of this.#r)o===t?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#i),n.ondiscard(this.#n)}else P&&(this.anchor=A),this.#i()}}function pe(e,t,r=!1){P&&wt();var n=new Ca(e),i=r?xt:0;function s(a,o){if(P){const u=si(e)===xr;if(a===u){var l=vr();J(l),n.anchor=l,Ce(!1),n.ensure(a,o),Ce(!0);return}}n.ensure(a,o)}yn(()=>{var a=!1;t((o,l=!0)=>{a=!0,s(l,o)}),a||s(!1,null)},i)}function Ra(e,t){return t}function $a(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let c=t[o];nt(c,()=>{if(s){if(s.pending.delete(c),s.done.add(c),s.pending.size===0){var h=e.outrogroups;Yr(wr(s.done)),h.delete(s),h.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&r!==null;if(l){var u=r,f=u.parentNode;Ai(f),f.append(u),e.items.clear()}Yr(t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Yr(e,t=!0){for(var r=0;r<e.length;r++)K(e[r],t)}var On;function Yi(e,t,r,n,i,s=null){var a=e,o=new Map,l=(t&Qn)!==0;if(l){var u=e;a=P?J(ge(u)):u.appendChild(de())}P&&wt();var f=null,c=mi(()=>{var g=r();return Kn(g)?g:g==null?[]:wr(g)}),h,v=!0;function _(){p.fallback=f,Da(p,h,a,t,n),f!==null&&(h.length===0?f.f&Me?(f.f^=Me,Ut(f,null,a)):En(f):nt(f,()=>{f=null}))}var b=yn(()=>{h=d(c);var g=h.length;let L=!1;if(P){var O=si(a)===xr;O!==(g===0)&&(a=vr(),J(a),Ce(!1),L=!0)}for(var C=new Set,y=D,E=Hi(),B=0;B<g;B+=1){P&&A.nodeType===ht&&A.data===ln&&(a=A,L=!0,Ce(!1));var oe=h[B],le=n(oe,B),R=v?null:o.get(le);R?(R.v&&At(R.v,oe),R.i&&At(R.i,B),E&&y.skipped_effects.delete(R.e)):(R=Ua(o,v?a:On??=de(),oe,le,B,i,t,r),v||(R.e.f|=Me),o.set(le,R)),C.add(le)}if(g===0&&s&&!f&&(v?f=he(()=>s(a)):(f=he(()=>s(On??=de())),f.f|=Me)),P&&g>0&&J(vr()),!v)if(E){for(const[Ge,Le]of o)C.has(Ge)||y.skipped_effects.add(Le.e);y.oncommit(_),y.ondiscard(()=>{})}else _();L&&Ce(!0),d(c)}),p={effect:b,items:o,outrogroups:null,fallback:f};v=!1,P&&(a=A)}function Da(e,t,r,n,i){var s=(n&Ds)!==0,a=t.length,o=e.items,l=e.effect.first,u,f=null,c,h=[],v=[],_,b,p,g;if(s)for(g=0;g<a;g+=1)_=t[g],b=i(_,g),p=o.get(b).e,p.f&Me||(p.nodes?.a?.measure(),(c??=new Set).add(p));for(g=0;g<a;g+=1){if(_=t[g],b=i(_,g),p=o.get(b).e,e.outrogroups!==null)for(const R of e.outrogroups)R.pending.delete(p),R.done.delete(p);if(p.f&Me)if(p.f^=Me,p===l)Ut(p,null,r);else{var L=f?f.next:l;p===e.effect.last&&(e.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),je(e,f,p),je(e,p,L),Ut(p,L,r),f=p,h=[],v=[],l=f.next;continue}if(p.f&ae&&(En(p),s&&(p.nodes?.a?.unfix(),(c??=new Set).delete(p))),p!==l){if(u!==void 0&&u.has(p)){if(h.length<v.length){var O=v[0],C;f=O.prev;var y=h[0],E=h[h.length-1];for(C=0;C<h.length;C+=1)Ut(h[C],O,r);for(C=0;C<v.length;C+=1)u.delete(v[C]);je(e,y.prev,E.next),je(e,f,y),je(e,E,O),l=O,f=E,g-=1,h=[],v=[]}else u.delete(p),Ut(p,l,r),je(e,p.prev,p.next),je(e,p,f===null?e.effect.first:f.next),je(e,f,p),f=p;continue}for(h=[],v=[];l!==null&&l!==p;)(u??=new Set).add(l),v.push(l),l=l.next;if(l===null)continue}p.f&Me||h.push(p),f=p,l=p.next}if(e.outrogroups!==null){for(const R of e.outrogroups)R.pending.size===0&&(Yr(wr(R.done)),e.outrogroups?.delete(R));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var B=[];if(u!==void 0)for(p of u)p.f&ae||B.push(p);for(;l!==null;)!(l.f&ae)&&l!==e.fallback&&B.push(l),l=l.next;var oe=B.length;if(oe>0){var le=n&Qn&&a===0?r:null;if(s){for(g=0;g<oe;g+=1)B[g].nodes?.a?.measure();for(g=0;g<oe;g+=1)B[g].nodes?.a?.fix()}$a(e,B,le)}}s&&qt(()=>{if(c!==void 0)for(p of c)p.nodes?.a?.apply()})}function Ua(e,t,r,n,i,s,a,o){var l=a&Rs?a&Us?lt(r):mn(r,!1,!1):null,u=a&$s?lt(i):null;return{v:l,i:u,e:he(()=>(s(t,l??r,u??i,o),()=>{e.delete(n)}))}}function Ut(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=ye(n);if(s.before(n),n===i)return;n=a}}function je(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Mn(e,t,r=!1,n=!1,i=!1){var s=e,a="";Oe(()=>{var o=H;if(a===(a=t()??"")){P&&wt();return}if(o.nodes!==null&&(Oi(o.nodes.start,o.nodes.end),o.nodes=null),a!==""){if(P){A.data;for(var l=wt(),u=l;l!==null&&(l.nodeType!==ht||l.data!=="");)u=l,l=ye(l);if(l===null)throw Wt(),at;Ze(A,u),s=J(l);return}var f=a+"";r?f=`<svg>${f}</svg>`:n&&(f=`<math>${f}</math>`);var c=zi(f);if((r||n)&&(c=ge(c)),Ze(ge(c),c.lastChild),r||n)for(;ge(c);)s.before(ge(c));else s.before(c)}})}const Cn=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function Fa(e,t,r){var n=e==null?"":""+e;if(r){for(var i in 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||Cn.includes(n[a-1]))&&(o===n.length||Cn.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function Qi(e,t,r,n,i,s){var a=e.__className;if(P||a!==r||a===void 0){var o=Fa(r,n,s);(!P||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=r}else if(s&&i!==s)for(var l in s){var u=!!s[l];(i==null||u!==!!i[l])&&e.classList.toggle(l,u)}return s}const Ga=Symbol("is custom element"),ka=Symbol("is html");function ar(e,t,r,n){var i=ja(e);P&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Zs]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Va(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ja(e){return e.__attributes??={[Ga]:e.nodeName.includes("-"),[ka]:e.namespaceURI===ks}}var Rn=new Map;function Va(e){var t=e.getAttribute("is")||e.nodeName,r=Rn.get(t);if(r)return r;Rn.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=Vs(i);for(var a in n)n[a].set&&r.push(a);i=ei(i)}return r}function $n(e,t){return e===t||e?.[lr]===t}function Xa(e={},t,r,n){return Ta(()=>{var i,s;return bn(()=>{i=s,s=[],xn(()=>{e!==r(...s)&&(t(e,...s),i&&$n(r(...i),e)&&t(null,...i))})}),()=>{qt(()=>{s&&$n(r(...s),e)&&t(null,...s)})}}),e}function wn(e,t,r){if(e==null)return t(void 0),r&&r(void 0),Xe;const n=xn(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const gt=[];function Wa(e,t){return{subscribe:Hr(e,t).subscribe}}function Hr(e,t=Xe){let r=null;const n=new Set;function i(o){if(oi(e,o)&&(e=o,r)){const l=!gt.length;for(const u of n)u[1](),gt.push(u,e);if(l){for(let u=0;u<gt.length;u+=2)gt[u][0](gt[u+1]);gt.length=0}}}function s(o){i(o(e))}function a(o,l=Xe){const u=[o,l];return n.add(u),n.size===1&&(r=t(i,s)||Xe),o(e),()=>{n.delete(u),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:a}}function Bt(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 Wa(r,(a,o)=>{let l=!1;const u=[];let f=0,c=Xe;const h=()=>{if(f)return;c();const _=t(n?u[0]:u,a,o);s?a(_):c=typeof _=="function"?_:Xe},v=i.map((_,b)=>wn(_,p=>{u[b]=p,f&=~(1<<b),l&&h()},()=>{f|=1<<b}));return l=!0,h(),function(){ti(v),c(),l=!1}})}function za(e){let t;return wn(e,r=>t=r)(),t}let Qr=Symbol();function Ji(e,t,r){const n=r[t]??={store:null,source:mn(void 0),unsubscribe:Xe};if(n.store!==e&&!(Qr in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=Xe;else{var i=!0;n.unsubscribe=wn(e,s=>{i?n.source.v=s:N(n.source,s)}),i=!1}return e&&Qr in r?za(e):d(n.source)}function Ki(){const e={};function t(){Pi(()=>{for(var r in e)e[r].unsubscribe();kt(e,Qr,{enumerable:!1,value:!0})})}return[e,t]}function Te(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 l;return l=()=>{var u=e[t];return u===void 0?a():(s=!0,u)},l}function qa(e){return new Za(e)}class Za{#e;#t;constructor(t){var r=new Map,n=(s,a)=>{var o=mn(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return d(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===qs?!0:(d(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return N(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#t=(t.hydrate?Oa:qi)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&di(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||kt(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=()=>{Ma(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 es;typeof HTMLElement=="function"&&(es=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}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 e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),W(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=Ya(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=ur(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=qa({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=xa(()=>{bn(()=>{this.$$r=!0;for(const n of cr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=ur(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=ur(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 cr(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function ur(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 Ya(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Qa(e,t,r,n,i,s){let a=class extends es{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return cr(t).map(o=>(t[o].attribute||o).toLowerCase())}};return cr(t).forEach(o=>{kt(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=ur(o,l,t),this.$$d[o]=l;var u=this.$$c;if(u){var f=Et(u,o)?.get;f?u[o]=l:u.$set({[o]:l})}}})}),n.forEach(o=>{kt(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}class Ja extends Error{constructor(t,r){super(r),this.code=t,this.name="ElevateApiError"}}const Ka=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 Ja(i.errorCode,i.errorMessage);return i.data},eo=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/levels?language=${e.locale??""}`);return(await(await fetch(t.href,{method:"GET"})).json()).data},Rr=10,to=(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},ro=e=>{window.postMessage({type:"GamificationXpUpdated",points:e},window.location.href)},no=e=>{let t=F(void 0),r=F(void 0),n=F(void 0),i=F(void 0),s=F(!1),a=F(void 0);const o=async()=>{const{apiEndpoint:l,userSession:u,locale:f,loadLevels:c,onLevelLoaded:h}=e();if(!(!l||!u)){N(s,!0),N(a,void 0);try{const v=[Ka({apiEndpoint:l,userSession:u,locale:f}).then(_=>{ro(_.level?.loyaltyPoints);const b=_.level;b.name=b.presentation?.displayName||b.name,b.spendablePoints=_.spendableWallet?.total.points||0,N(t,b,!0),N(n,_.loyaltyWallet?.total,!0),N(i,_.spendableWallet?.total,!0),h?.({elevateLevel:b}),h?.({elevateLevelWalletTotal:_.spendableWallet?.total,loyaltyWalletTotal:_.loyaltyWallet?.total})})];c&&v.push(eo({apiEndpoint:l,userSession:u,locale:f}).then(_=>{N(r,_,!0)})),await Promise.all(v),await Pa(),d(r)&&d(t)&&h?.({calculatedLevelFlag:to(d(r),d(t).loyaltyPoints??0)})}catch(v){N(a,v,!0),console.error("Failed to load elevate info:",v)}finally{N(s,!1)}}};return we(()=>{const{apiEndpoint:l,userSession:u,locale:f,loadLevels:c}=e();o()}),we(()=>{const l=()=>{o()};return window.addEventListener("redeemRewardButton",l),()=>window.removeEventListener("redeemRewardButton",l)}),{get playerElevateLevel(){return d(t)},get levels(){return d(r)},get loyaltyWalletTotal(){return d(n)},get spendableWalletTotal(){return d(i)},get loading(){return d(s)},get error(){return d(a)},reload:o}};function io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var so=function(t){return ao(t)&&!oo(t)};function ao(e){return!!e&&typeof e=="object"}function oo(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||fo(e)}var lo=typeof Symbol=="function"&&Symbol.for,uo=lo?Symbol.for("react.element"):60103;function fo(e){return e.$$typeof===uo}function ho(e){return Array.isArray(e)?[]:{}}function Vt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ht(ho(e),e,t):e}function co(e,t,r){return e.concat(t).map(function(n){return Vt(n,r)})}function vo(e,t){if(!t.customMerge)return Ht;var r=t.customMerge(e);return typeof r=="function"?r:Ht}function po(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Dn(e){return Object.keys(e).concat(po(e))}function ts(e,t){try{return t in e}catch{return!1}}function _o(e,t){return ts(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function mo(e,t,r){var n={};return r.isMergeableObject(e)&&Dn(e).forEach(function(i){n[i]=Vt(e[i],r)}),Dn(t).forEach(function(i){_o(e,i)||(ts(e,i)&&r.isMergeableObject(t[i])?n[i]=vo(i,r)(e[i],t[i],r):n[i]=Vt(t[i],r))}),n}function Ht(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||co,r.isMergeableObject=r.isMergeableObject||so,r.cloneUnlessOtherwiseSpecified=Vt;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):mo(e,t,r):Vt(t,r)}Ht.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Ht(n,i,r)},{})};var go=Ht,bo=go;const yo=io(bo);var Jr=function(e,t){return Jr=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])},Jr(e,t)};function Lr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Se=function(){return Se=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},Se.apply(this,arguments)};function Eo(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 $r(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:Lo,n=t&&t.serializer?t.serializer:Ao,i=t&&t.strategy?t.strategy:To;return i(e,{cache:r,serializer:n})}function xo(e){return e==null||typeof e=="number"||typeof e=="boolean"}function wo(e,t,r,n){var i=xo(n)?n:r(n),s=t.get(i);return typeof s>"u"&&(s=e.call(this,n),t.set(i,s)),s}function rs(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 ns(e,t,r,n,i){return r.bind(t,e,n,i)}function To(e,t){var r=e.length===1?wo:rs;return ns(e,this,r,t.cache.create(),t.serializer)}function So(e,t){return ns(e,this,rs,t.cache.create(),t.serializer)}var Ao=function(){return JSON.stringify(arguments)},Ho=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}(),Lo={create:function(){return new Ho}},Ur={variadic:So},gr=function(){return gr=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},gr.apply(this,arguments)};var x;(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"})(x||(x={}));var $;(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"})($||($={}));var Lt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Lt||(Lt={}));function Un(e){return e.type===$.literal}function Po(e){return e.type===$.argument}function is(e){return e.type===$.number}function ss(e){return e.type===$.date}function as(e){return e.type===$.time}function os(e){return e.type===$.select}function ls(e){return e.type===$.plural}function No(e){return e.type===$.pound}function us(e){return e.type===$.tag}function fs(e){return!!(e&&typeof e=="object"&&e.type===Lt.number)}function Kr(e){return!!(e&&typeof e=="object"&&e.type===Lt.dateTime)}var hs=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Bo=/(?:[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 Io(e){var t={};return e.replace(Bo,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 U=function(){return U=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},U.apply(this,arguments)};var Oo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Mo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Oo).filter(function(h){return h.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],l=a.slice(1),u=0,f=l;u<f.length;u++){var c=f[u];if(c.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:l})}return r}function Co(e){return e.replace(/^(.*?)-/,"")}var Fn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,cs=/^(@+)?(\+|#+)?[rs]?$/g,Ro=/(\*)(0+)|(#+)(0+)|(0+)/g,ds=/^(0+)$/;function Gn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(cs,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 vs(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 $o(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)),!ds.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function kn(e){var t={},r=vs(e);return r||t}function Do(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=Co(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=U(U(U({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return U(U({},l),kn(u))},{}));continue;case"engineering":t=U(U(U({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return U(U({},l),kn(u))},{}));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(Ro,function(l,u,f,c,h,v){if(u)t.minimumIntegerDigits=f.length;else{if(c&&h)throw new Error("We currently do not support maximum integer digits");if(v)throw new Error("We currently do not support exact integer digits")}return""});continue}if(ds.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Fn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Fn,function(l,u,f,c,h,v){return f==="*"?t.minimumFractionDigits=u.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:h&&v?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+v.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var s=i.options[0];s==="w"?t=U(U({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=U(U({},t),Gn(s)));continue}if(cs.test(i.stem)){t=U(U({},t),Gn(i.stem));continue}var a=vs(i.stem);a&&(t=U(U({},t),a));var o=$o(i.stem);o&&(t=U(U({},t),o))}return t}var or={"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 Uo(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),l="a",u=Fo(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)r+=l;for(;a-- >0;)r=u+r}else i==="J"?r+="H":r+=i}return r}function Fo(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=or[n||""]||or[r||""]||or["".concat(r,"-001")]||or["001"];return i[0]}var Fr,Go=new RegExp("^".concat(hs.source,"*")),ko=new RegExp("".concat(hs.source,"*$"));function S(e,t){return{start:e,end:t}}var jo=!!String.prototype.startsWith&&"_a".startsWith("a",1),Vo=!!String.fromCodePoint,Xo=!!Object.fromEntries,Wo=!!String.prototype.codePointAt,zo=!!String.prototype.trimStart,qo=!!String.prototype.trimEnd,Zo=!!Number.isSafeInteger,Yo=Zo?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},en=!0;try{var Qo=_s("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");en=((Fr=Qo.exec("a"))===null||Fr===void 0?void 0:Fr[0])==="a"}catch{en=!1}var jn=jo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},tn=Vo?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},Vn=Xo?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},ps=Wo?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}},Jo=zo?function(t){return t.trimStart()}:function(t){return t.replace(Go,"")},Ko=qo?function(t){return t.trimEnd()}:function(t){return t.replace(ko,"")};function _s(e,t){return new RegExp(e,t)}var rn;if(en){var Xn=_s("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");rn=function(t,r){var n;Xn.lastIndex=r;var i=Xn.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else rn=function(t,r){for(var n=[];;){var i=ps(t,r);if(i===void 0||ms(i)||nl(i))break;n.push(i),r+=i>=65536?2:1}return tn.apply(void 0,n)};var el=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:$.pound,location:S(o,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,S(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&nn(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:$.literal,value:"<".concat(i,"/>"),location:S(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()||!nn(this.char()))return this.error(x.INVALID_TAG,S(o,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(x.UNMATCHED_CLOSING_TAG,S(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:$.tag,value:i,children:a,location:S(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,S(o,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,S(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,S(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&rl(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 l=S(n,this.clonePosition());return{val:{type:$.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!tl(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 tn.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(),tn(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,S(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,S(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(x.MALFORMED_ARGUMENT,S(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,S(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:$.argument,value:i,location:S(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,S(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(x.MALFORMED_ARGUMENT,S(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=rn(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),a=S(t,s);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,S(a,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var h=Ko(c.val);if(h.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,S(this.clonePosition(),this.clonePosition()));var v=S(f,this.clonePosition());u={style:h,styleLocation:v}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var b=S(i,this.clonePosition());if(u&&jn(u?.style,"::",0)){var p=Jo(u.style.slice(2));if(o==="number"){var c=this.parseNumberSkeletonFromString(p,u.styleLocation);return c.err?c:{val:{type:$.number,value:n,location:b,style:c.val},err:null}}else{if(p.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,b);var g=p;this.locale&&(g=Uo(p,this.locale));var h={type:Lt.dateTime,pattern:g,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Io(g):{}},L=o==="date"?$.date:$.time;return{val:{type:L,value:n,location:b,style:h},err:null}}}return{val:{type:o==="number"?$.number:o==="date"?$.date:$.time,value:n,location:b,style:(s=u?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,S(O,gr({},O)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),y=0;if(o!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,S(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),C=this.parseIdentifierIfPossible(),y=c.val}var E=this.tryParsePluralOrSelectOptions(t,o,r,C);if(E.err)return E;var _=this.tryParseArgumentClose(i);if(_.err)return _;var B=S(i,this.clonePosition());return o==="select"?{val:{type:$.select,value:n,options:Vn(E.val),location:B},err:null}:{val:{type:$.plural,value:n,options:Vn(E.val),offset:y,pluralType:o==="plural"?"cardinal":"ordinal",location:B},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,S(a,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,S(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(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,S(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=Mo(t)}catch{return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:Lt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?Do(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,a=!1,o=[],l=new Set,u=i.value,f=i.location;;){if(u.length===0){var c=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=S(c,this.clonePosition()),u=this.message.slice(c.offset,this.offset())}else break}if(l.has(u))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);u==="other"&&(a=!0),this.bumpSpace();var v=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,S(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,r,n);if(_.err)return _;var b=this.tryParseArgumentClose(v);if(b.err)return b;o.push([u,{value:_.val,location:S(v,this.clonePosition())}]),l.add(u),this.bumpSpace(),s=this.parseIdentifierIfPossible(),u=s.value,f=s.location}return o.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,S(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(x.MISSING_OTHER_CLAUSE,S(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 l=S(i,this.clonePosition());return s?(a*=n,Yo(a)?{val:a,err:null}:this.error(r,l)):this.error(t,l)},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=ps(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(jn(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()&&ms(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 nn(e){return e>=97&&e<=122||e>=65&&e<=90}function tl(e){return nn(e)||e===47}function rl(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 ms(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function nl(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 sn(e){e.forEach(function(t){if(delete t.location,os(t)||ls(t))for(var r in t.options)delete t.options[r].location,sn(t.options[r].value);else is(t)&&fs(t.style)||(ss(t)||as(t))&&Kr(t.style)?delete t.style.location:us(t)&&sn(t.children)})}function il(e,t){t===void 0&&(t={}),t=gr({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new el(e,t).parse();if(r.err){var n=SyntaxError(x[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||sn(r.val),r.val}var Pt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Pt||(Pt={}));var Pr=function(e){Lr(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),Wn=function(e){Lr(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('", "'),'"'),Pt.INVALID_VALUE,s)||this}return t}(Pr),sl=function(e){Lr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Pt.INVALID_VALUE,i)||this}return t}(Pr),al=function(e){Lr(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,'"'),Pt.MISSING_VALUE,n)||this}return t}(Pr),Q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Q||(Q={}));function ol(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==Q.literal||r.type!==Q.literal?t.push(r):n.value+=r.value,t},[])}function ll(e){return typeof e=="function"}function fr(e,t,r,n,i,s,a){if(e.length===1&&Un(e[0]))return[{type:Q.literal,value:e[0].value}];for(var o=[],l=0,u=e;l<u.length;l++){var f=u[l];if(Un(f)){o.push({type:Q.literal,value:f.value});continue}if(No(f)){typeof s=="number"&&o.push({type:Q.literal,value:r.getNumberFormat(t).format(s)});continue}var c=f.value;if(!(i&&c in i))throw new al(c,a);var h=i[c];if(Po(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),o.push({type:typeof h=="string"?Q.literal:Q.object,value:h});continue}if(ss(f)){var v=typeof f.style=="string"?n.date[f.style]:Kr(f.style)?f.style.parsedOptions:void 0;o.push({type:Q.literal,value:r.getDateTimeFormat(t,v).format(h)});continue}if(as(f)){var v=typeof f.style=="string"?n.time[f.style]:Kr(f.style)?f.style.parsedOptions:n.time.medium;o.push({type:Q.literal,value:r.getDateTimeFormat(t,v).format(h)});continue}if(is(f)){var v=typeof f.style=="string"?n.number[f.style]:fs(f.style)?f.style.parsedOptions:void 0;v&&v.scale&&(h=h*(v.scale||1)),o.push({type:Q.literal,value:r.getNumberFormat(t,v).format(h)});continue}if(us(f)){var _=f.children,b=f.value,p=i[b];if(!ll(p))throw new sl(b,"function",a);var g=fr(_,t,r,n,i,s),L=p(g.map(function(y){return y.value}));Array.isArray(L)||(L=[L]),o.push.apply(o,L.map(function(y){return{type:typeof y=="string"?Q.literal:Q.object,value:y}}))}if(os(f)){var O=f.options[h]||f.options.other;if(!O)throw new Wn(f.value,h,Object.keys(f.options),a);o.push.apply(o,fr(O.value,t,r,n,i));continue}if(ls(f)){var O=f.options["=".concat(h)];if(!O){if(!Intl.PluralRules)throw new Pr(`Intl.PluralRules is not available in this environment.
|
|
4
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
5
|
+
`,Pt.MISSING_INTL_API,a);var C=r.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));O=f.options[C]||f.options.other}if(!O)throw new Wn(f.value,h,Object.keys(f.options),a);o.push.apply(o,fr(O.value,t,r,n,i,h-(f.offset||0)));continue}}return ol(o)}function ul(e,t){return t?Se(Se(Se({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=Se(Se({},e[n]),t[n]||{}),r},{})):e}function fl(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=ul(e[n],t[n]),r},Se({},e)):e}function Gr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function hl(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,$r([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,$r([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,$r([void 0],r,!1)))},{cache:Gr(e.pluralRules),strategy:Ur.variadic})}}var cl=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(l){var u=s.formatToParts(l);if(u.length===1)return u[0].value;var f=u.reduce(function(c,h){return!c.length||h.type!==Q.literal||typeof c[c.length-1]!="string"?c.push(h.value):c[c.length-1]+=h.value,c},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(l){return fr(s.ast,s.locales,s.formatters,s.formats,l,void 0,s.message)},this.resolvedOptions=function(){var l;return{locale:((l=s.resolvedLocale)===null||l===void 0?void 0:l.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=Eo(a,["formatters"]);this.ast=e.__parse(t,Se(Se({},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=fl(e.formats,n),this.formatters=i&&i.formatters||hl(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=il,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 dl(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 Ve={},vl=(e,t,r)=>r&&(t in Ve||(Ve[t]={}),e in Ve[t]||(Ve[t][e]=r),r),gs=(e,t)=>{if(t==null)return;if(t in Ve&&e in Ve[t])return Ve[t][e];const r=Nr(t);for(let n=0;n<r.length;n++){const i=r[n],s=_l(i,e);if(s)return vl(e,t,s)}};let Tn;const It=Hr({});function pl(e){return Tn[e]||null}function bs(e){return e in Tn}function _l(e,t){if(!bs(e))return null;const r=pl(e);return dl(r,t)}function ml(e){if(e==null)return;const t=Nr(e);for(let r=0;r<t.length;r++){const n=t[r];if(bs(n))return n}}function ys(e,...t){delete Ve[e],It.update(r=>(r[e]=yo.all([r[e]||{},...t]),r))}Bt([It],([e])=>Object.keys(e));It.subscribe(e=>Tn=e);const hr={};function gl(e,t){hr[e].delete(t),hr[e].size===0&&delete hr[e]}function Es(e){return hr[e]}function bl(e){return Nr(e).map(t=>{const r=Es(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function an(e){return e==null?!1:Nr(e).some(t=>{var r;return(r=Es(t))==null?void 0:r.size})}function yl(e,t){return Promise.all(t.map(n=>(gl(e,n),n().then(i=>i.default||i)))).then(n=>ys(e,...n))}const Dt={};function xs(e){if(!an(e))return e in Dt?Dt[e]:Promise.resolve();const t=bl(e);return Dt[e]=Promise.all(t.map(([r,n])=>yl(r,n))).then(()=>{if(an(e))return xs(e);delete Dt[e]}),Dt[e]}const El={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"}}},xl={fallbackLocale:null,loadingDelay:200,formats:El,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},wl=xl;function Nt(){return wl}const kr=Hr(!1);var Tl=Object.defineProperty,Sl=Object.defineProperties,Al=Object.getOwnPropertyDescriptors,zn=Object.getOwnPropertySymbols,Hl=Object.prototype.hasOwnProperty,Ll=Object.prototype.propertyIsEnumerable,qn=(e,t,r)=>t in e?Tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pl=(e,t)=>{for(var r in t||(t={}))Hl.call(t,r)&&qn(e,r,t[r]);if(zn)for(var r of zn(t))Ll.call(t,r)&&qn(e,r,t[r]);return e},Nl=(e,t)=>Sl(e,Al(t));let on;const br=Hr(null);function Zn(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function Nr(e,t=Nt().fallbackLocale){const r=Zn(e);return t?[...new Set([...r,...Zn(t)])]:r}function ct(){return on??void 0}br.subscribe(e=>{on=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Bl=e=>{if(e&&ml(e)&&an(e)){const{loadingDelay:t}=Nt();let r;return typeof window<"u"&&ct()!=null&&t?r=window.setTimeout(()=>kr.set(!0),t):kr.set(!0),xs(e).then(()=>{br.set(e)}).finally(()=>{clearTimeout(r),kr.set(!1)})}return br.set(e)},Ye=Nl(Pl({},br),{set:Bl}),Br=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var Il=Object.defineProperty,yr=Object.getOwnPropertySymbols,ws=Object.prototype.hasOwnProperty,Ts=Object.prototype.propertyIsEnumerable,Yn=(e,t,r)=>t in e?Il(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sn=(e,t)=>{for(var r in t||(t={}))ws.call(t,r)&&Yn(e,r,t[r]);if(yr)for(var r of yr(t))Ts.call(t,r)&&Yn(e,r,t[r]);return e},Ot=(e,t)=>{var r={};for(var n in e)ws.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yr)for(var n of yr(e))t.indexOf(n)<0&&Ts.call(e,n)&&(r[n]=e[n]);return r};const Xt=(e,t)=>{const{formats:r}=Nt();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ol=Br(e=>{var t=e,{locale:r,format:n}=t,i=Ot(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Xt("number",n)),new Intl.NumberFormat(r,i)}),Ml=Br(e=>{var t=e,{locale:r,format:n}=t,i=Ot(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Xt("date",n):Object.keys(i).length===0&&(i=Xt("date","short")),new Intl.DateTimeFormat(r,i)}),Cl=Br(e=>{var t=e,{locale:r,format:n}=t,i=Ot(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Xt("time",n):Object.keys(i).length===0&&(i=Xt("time","short")),new Intl.DateTimeFormat(r,i)}),Rl=(e={})=>{var t=e,{locale:r=ct()}=t,n=Ot(t,["locale"]);return Ol(Sn({locale:r},n))},$l=(e={})=>{var t=e,{locale:r=ct()}=t,n=Ot(t,["locale"]);return Ml(Sn({locale:r},n))},Dl=(e={})=>{var t=e,{locale:r=ct()}=t,n=Ot(t,["locale"]);return Cl(Sn({locale:r},n))},Ul=Br((e,t=ct())=>new cl(e,t,Nt().formats,{ignoreTag:Nt().ignoreTag})),Fl=(e,t={})=>{var r,n,i,s;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:o,locale:l=ct(),default:u}=a;if(l==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=gs(e,l);if(!f)f=(s=(i=(n=(r=Nt()).handleMissingMessage)==null?void 0:n.call(r,{locale:l,id:e,defaultValue:u}))!=null?i:u)!=null?s:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!o)return f;let c=f;try{c=Ul(f,l).format(o)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return c},Gl=(e,t)=>Dl(t).format(e),kl=(e,t)=>$l(t).format(e),jl=(e,t)=>Rl(t).format(e),Vl=(e,t=ct())=>gs(e,t),Ss=Bt([Ye,It],()=>Fl);Bt([Ye],()=>Gl);Bt([Ye],()=>kl);Bt([Ye],()=>jl);Bt([Ye,It],()=>Vl);function As({withLocale:e,translations:t}){Ye.subscribe(r=>{r==null&&(It.set(t),Ye.set(e))})}function Hs(e,t){ys(e,t)}function Ls(e){Ye.set(e)}const Xl={en:{prev:"Previous",next:"Next"},tr:{prev:"Önceki",next:"Sonraki"}},Wl=10,zl=7,ql=4;var Zl=ne('<span class="loyalty-pagination__ellipsis svelte-10d3cwj" aria-hidden="true">...</span>'),Yl=ne('<button type="button"> </button>'),Ql=ne('<div class="loyalty-pagination__pages svelte-10d3cwj"><button class="loyalty-pagination__btn loyalty-pagination__btn--prev svelte-10d3cwj" type="button"> </button> <!> <button class="loyalty-pagination__btn loyalty-pagination__btn--next svelte-10d3cwj" type="button"> </button></div>'),Jl=ne('<div class="loyalty-pagination svelte-10d3cwj"><!></div>');function Kl(e,t){cn(t,!0);const r=()=>Ji(Ss,"$_",n),[n,i]=Ki(),s=Te(t,"offset",3,0),a=Te(t,"limit",3,Wl),o=Te(t,"total",3,0),l=Te(t,"onPageChange",3,y=>{}),u=Te(t,"locale",3,"en");As({withLocale:u(),translations:{}}),Object.entries(Xl).forEach(([y,E])=>{Hs(y,E)}),we(()=>{Ls(u()??"en")});const f=Ee(()=>Math.max(1,Math.ceil(o()/Math.max(1,a())))),c=Ee(()=>a()>0?Math.floor(s()/a()):0);let h=F(!1);we(()=>{const y=window.matchMedia("(max-width: 767px)"),E=B=>{N(h,B.matches,!0)};return N(h,y.matches,!0),y.addEventListener("change",E),()=>y.removeEventListener("change",E)});const v=(y,E,B)=>y<=(B?ql:zl)?Array.from({length:y},(Ge,Le)=>Le):E<=1||E>=y-2?[0,1,"ellipsis",y-2,y-1]:[0,"ellipsis",E,"ellipsis",y-1],_=Ee(()=>v(d(f),d(c),d(h))),b=y=>l()(y*a()),p=()=>l()(Math.max(0,d(c)-1)*a()),g=()=>l()(Math.min(d(f)-1,d(c)+1)*a());var L=Jl(),O=M(L);{var C=y=>{var E=Ql(),B=M(E);B.__click=p;var oe=M(B,!0);I(B);var le=Y(B,2);Yi(le,17,()=>d(_),Ra,(Le,ke)=>{var Yt=Na(),Qt=Si(Yt);{var Mt=Pe=>{var Ne=Zl();W(Pe,Ne)},Ct=Pe=>{var Ne=Yl();let Jt;Ne.__click=()=>b(d(ke));var Ir=M(Ne,!0);I(Ne),Oe(()=>{Jt=Qi(Ne,1,"loyalty-pagination__btn svelte-10d3cwj",null,Jt,{"loyalty-pagination__btn--active":d(ke)===d(c)}),xe(Ir,d(ke)+1)}),W(Pe,Ne)};pe(Qt,Pe=>{d(ke)==="ellipsis"?Pe(Mt):Pe(Ct,!1)})}W(Le,Yt)});var R=Y(le,2);R.__click=g;var Ge=M(R,!0);I(R),I(E),Oe((Le,ke)=>{B.disabled=d(c)<=0,xe(oe,Le),R.disabled=d(c)>=d(f)-1,xe(Ge,ke)},[()=>r()("prev"),()=>r()("next")]),W(y,E)};pe(O,y=>{d(f)>1&&y(C)})}I(L),W(e,L),dn(),i()}Wi(["click"]);const eu={en:{startingLevel:"Starting Level: {points} points",seeMore:"See More",seeLess:"See Less",current:"Current",next:"Next"},tr:{startingLevel:"Başlangıç Seviyesi: {points} puan",seeMore:"Daha Fazla",seeLess:"Daha Az",current:"Mevcut",next:"Sonraki"}},Be=12;var tu=ne('<img class="loyalty-level__badge svelte-acx6c7"/>'),ru=ne('<span class="loyalty-level__tag svelte-acx6c7"> </span>'),nu=ne('<div class="loyalty-level__benefits svelte-acx6c7"><!></div>'),iu=ne('<article><header class="loyalty-level__head svelte-acx6c7"><!> <div class="loyalty-level__headings svelte-acx6c7"><div class="loyalty-level__title-row svelte-acx6c7"><span class="loyalty-level__name svelte-acx6c7"> </span> <!></div> <span class="loyalty-level__starting svelte-acx6c7"> </span></div></header> <!> <button class="loyalty-level__action svelte-acx6c7" type="button"> </button></article>'),su=ne('<div class="loyalty-level__sentinel svelte-acx6c7" aria-hidden="true"></div>'),au=ne('<img class="loyalty-level__badge svelte-acx6c7"/>'),ou=ne('<span class="loyalty-level__tag svelte-acx6c7"> </span>'),lu=ne('<div class="loyalty-level__benefits svelte-acx6c7"><!></div>'),uu=ne('<div class="loyalty-level__modal-overlay svelte-acx6c7" role="presentation"><div class="loyalty-level__modal svelte-acx6c7" role="dialog" aria-modal="true" tabindex="-1"><div class="loyalty-level__modal-close-wrapper svelte-acx6c7"><button class="loyalty-level__modal-close svelte-acx6c7" type="button" aria-label="close">×</button></div> <header class="loyalty-level__modal-head svelte-acx6c7"><!> <div class="loyalty-level__headings svelte-acx6c7"><div class="loyalty-level__title-row svelte-acx6c7"><span class="loyalty-level__name svelte-acx6c7"> </span> <!></div> <span class="loyalty-level__starting svelte-acx6c7"> </span></div></header> <!></div></div>'),fu=ne('<div class="loyalty-level svelte-acx6c7"><div class="loyalty-level__grid svelte-acx6c7"></div> <!> <!></div> <!>',1);function hu(e,t){cn(t,!0);const r=()=>Ji(Ss,"$_",n),[n,i]=Ki(),s=Te(t,"apiEndpoint",3,""),a=Te(t,"userSession",3,""),o=Te(t,"locale",3,""),l=Te(t,"onLevelLoaded",3,m=>{}),u=Te(t,"onSeeMore",3,m=>{});As({withLocale:o(),translations:{}}),Object.entries(eu).forEach(([m,T])=>{Hs(m,T)}),we(()=>{Ls(o()??"en")});const f=m=>{l()(m)},c=no(()=>({apiEndpoint:s(),userSession:a(),locale:o(),loadLevels:!0,onLevelLoaded:f})),h=Ee(()=>c.playerElevateLevel?.id),v=Ee(()=>[...c.levels??[]].sort((m,T)=>m.firstEntryPoints<T.firstEntryPoints?-1:1)),_=Ee(()=>d(v).findIndex(m=>m.id===d(h))),b=m=>m.presentation?.displayName??m.displayName??String(m.id),p=m=>d(_)>=0&&m<d(_);let g=F(0),L=F(!1),O=F(yt(Rr)),C=F(void 0),y=F(void 0),E=F(void 0);const B=Ee(()=>Math.max(1,Math.ceil(d(v).length/Be))),oe=Ee(()=>d(L)?d(v).slice(0,d(O)):d(v).slice(d(g)*Be,d(g)*Be+Be));we(()=>{d(g)>d(B)-1&&N(g,0)}),we(()=>{N(O,d(L)?Rr:Be,!0)}),we(()=>{if(!d(L)||!d(C))return;const m=new IntersectionObserver(T=>{T.some(ve=>ve.isIntersecting)&&N(O,Math.min(d(v).length,d(O)+Rr),!0)},{rootMargin:"200px"});return m.observe(d(C)),()=>m.disconnect()});const le=m=>{N(g,Math.floor(m/Be),!0)};we(()=>{const m=window.matchMedia("(max-width: 767px)"),T=ve=>{N(L,ve.matches,!0)};return N(L,m.matches,!0),m.addEventListener("change",T),()=>m.removeEventListener("change",T)});const R=m=>{u()(m),d(L)?N(y,d(y)===m.id?void 0:m.id,!0):N(E,m,!0)},Ge=()=>{N(E,void 0)},Le=m=>{m.target===m.currentTarget&&Ge()},ke=m=>{m.key==="Escape"&&Ge()};we(()=>{if(!d(E))return;const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}});const Yt=(m,T)=>!!m.presentation?.description&&(!p(T)||d(y)===m.id);var Qt=fu(),Mt=Si(Qt),Ct=M(Mt);Yi(Ct,23,()=>d(oe),m=>m.id,(m,T,ve)=>{const Rt=Ee(()=>d(L)?d(ve):d(g)*Be+d(ve));var dt=iu();let vt;var pt=M(dt),Kt=M(pt);{var er=Z=>{var ie=tu();Oe(et=>{ar(ie,"src",d(T).presentation.asset),ar(ie,"alt",et)},[()=>b(d(T))]),W(Z,ie)};pe(Kt,Z=>{d(T).presentation?.asset&&Z(er)})}var _t=Y(Kt,2),Je=M(_t),$t=M(Je),Or=M($t,!0);I($t);var Mr=Y($t,2);{var tr=Z=>{var ie=ru(),et=M(ie,!0);I(ie),Oe(Is=>xe(et,Is),[()=>r()("current")]),W(Z,ie)};pe(Mr,Z=>{d(T).id===d(h)&&Z(tr)})}I(Je);var rr=Y(Je,2),Cr=M(rr,!0);I(rr),I(_t),I(pt);var nr=Y(pt,2);{var q=Z=>{var ie=nu(),et=M(ie);Mn(et,()=>d(T).presentation?.description),I(ie),W(Z,ie)};pe(nr,Z=>{Yt(d(T),d(Rt))&&Z(q)})}var k=Y(nr,2);k.__click=()=>R(d(T));var Ke=M(k,!0);I(k),I(dt),Oe((Z,ie,et)=>{vt=Qi(dt,1,"loyalty-level__card svelte-acx6c7",null,vt,{"loyalty-level__card--current":d(T).id===d(h),"loyalty-level__card--expanded":d(y)===d(T).id}),xe(Or,Z),xe(Cr,ie),xe(Ke,et)},[()=>b(d(T)),()=>r()("startingLevel",{values:{points:d(T).firstEntryPoints.toLocaleString()}}),()=>d(y)===d(T).id?r()("seeLess"):r()("seeMore")]),W(m,dt)}),I(Ct);var Pe=Y(Ct,2);{var Ne=m=>{{let T=Ee(()=>d(g)*Be);Kl(m,{get offset(){return d(T)},get limit(){return Be},get total(){return d(v).length},onPageChange:le,get locale(){return o()}})}};pe(Pe,m=>{d(L)||m(Ne)})}var Jt=Y(Pe,2);{var Ir=m=>{var T=su();Xa(T,ve=>N(C,ve),()=>d(C)),W(m,T)};pe(Jt,m=>{d(L)&&d(O)<d(v).length&&m(Ir)})}I(Mt);var Ns=Y(Mt,2);{var Bs=m=>{var T=uu();T.__click=Le,T.__keydown=ke;var ve=M(T),Rt=M(ve),dt=M(Rt);dt.__click=Ge,I(Rt);var vt=Y(Rt,2),pt=M(vt);{var Kt=q=>{var k=au();Oe(Ke=>{ar(k,"src",d(E).presentation.asset),ar(k,"alt",Ke)},[()=>b(d(E))]),W(q,k)};pe(pt,q=>{d(E).presentation?.asset&&q(Kt)})}var er=Y(pt,2),_t=M(er),Je=M(_t),$t=M(Je,!0);I(Je);var Or=Y(Je,2);{var Mr=q=>{var k=ou(),Ke=M(k,!0);I(k),Oe(Z=>xe(Ke,Z),[()=>r()("current")]),W(q,k)};pe(Or,q=>{d(E).id===d(h)&&q(Mr)})}I(_t);var tr=Y(_t,2),rr=M(tr,!0);I(tr),I(er),I(vt);var Cr=Y(vt,2);{var nr=q=>{var k=lu(),Ke=M(k);Mn(Ke,()=>d(E).presentation.description),I(k),W(q,k)};pe(Cr,q=>{d(E).presentation?.description&&q(nr)})}I(ve),I(T),Oe((q,k)=>{xe($t,q),xe(rr,k)},[()=>b(d(E)),()=>r()("startingLevel",{values:{points:d(E).firstEntryPoints.toLocaleString()}})]),W(m,T)};pe(Ns,m=>{d(E)&&m(Bs)})}W(e,Qt),dn(),i()}Wi(["click","keydown"]);function Ps(e){hu(e,{})}customElements.define("loyalty-level",Qa(Ps,{},[],[],!1));exports.LoyaltyLevel_ce=Ps;
|