@everymatrix/loyalty-rakeback 0.1.8 → 0.2.0

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.
@@ -0,0 +1,23 @@
1
+ "use strict";var Vs=Object.defineProperty,Xs=Object.defineProperties;var Ws=Object.getOwnPropertyDescriptors;var On=Object.getOwnPropertySymbols;var zs=Object.prototype.hasOwnProperty,qs=Object.prototype.propertyIsEnumerable;var Pn=e=>{throw TypeError(e)};var Cr=(e,t,r)=>t in e?Vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,er=(e,t)=>{for(var r in t||(t={}))zs.call(t,r)&&Cr(e,r,t[r]);if(On)for(var r of On(t))qs.call(t,r)&&Cr(e,r,t[r]);return e},tr=(e,t)=>Xs(e,Ws(t));var I=(e,t,r)=>Cr(e,typeof t!="symbol"?t+"":t,r),Mr=(e,t,r)=>t.has(e)||Pn("Cannot "+r);var h=(e,t,r)=>(Mr(e,t,"read from private field"),r?r.call(e):t.get(e)),b=(e,t,r)=>t.has(e)?Pn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),_=(e,t,r,n)=>(Mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),P=(e,t,r)=>(Mr(e,t,"access private method"),r);var it=(e,t,r)=>new Promise((n,i)=>{var s=o=>{try{a(r.next(o))}catch(l){i(l)}},u=o=>{try{a(r.throw(o))}catch(l){i(l)}},a=o=>o.done?n(o.value):Promise.resolve(o.value).then(s,u);a((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Zs="5";var si,ai,oi;typeof window!="undefined"&&((oi=(ai=(si=window.__svelte)!=null?si:window.__svelte={}).v)!=null?oi:ai.v=new Set).add(Zs);const Ys=2,li="[",fi="[!",In="[?",hi="]",gt={},F=Symbol(),Js="http://www.w3.org/1999/xhtml",Qs=!1;var Ks=Array.isArray,ea=Array.prototype.indexOf,yt=Array.prototype.includes,ta=Array.from,mr=Object.keys,Dt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,ra=Object.prototype,na=Array.prototype,ia=Object.getPrototypeOf,Rn=Object.isExtensible;const Ne=()=>{};function ci(e){for(var t=0;t<e.length;t++)e[t]()}function di(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const U=2,Et=4,Zt=8,pi=1<<24,Ge=16,Ee=32,Ue=64,Xr=128,ne=512,D=1024,V=2048,ce=4096,ye=8192,he=16384,Ve=32768,Cn=1<<25,xt=65536,Mn=1<<17,sa=1<<18,rt=1<<19,vi=1<<20,et=65536,Wr=1<<21,vn=1<<22,ke=1<<23,Lr=Symbol("$state"),aa=Symbol("legacy props"),Se=new class extends Error{constructor(){super(...arguments);I(this,"name","StaleReactionError");I(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Sr=3,Hr=8;function oa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ua(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function la(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fa(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ha(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ca(){throw new Error("https://svelte.dev/e/hydration_failed")}function da(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function pa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function va(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ma(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Ar(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function _a(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let L=!1;function at(e){L=e}let H;function de(e){if(e===null)throw Ar(),gt;return H=e}function mn(){return de(Pe(H))}function rr(e){if(L){if(Pe(H)!==null)throw Ar(),gt;H=e}}function ba(e=1){if(L){for(var t=e,r=H;t--;)r=Pe(r);H=r}}function mi(e=!0){for(var t=0,r=H;;){if(r.nodeType===Hr){var n=r.data;if(n===hi){if(t===0)return r;t-=1}else(n===li||n===fi||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=Pe(r);e&&r.remove(),r=i}}function ga(e){if(!e||e.nodeType!==Hr)throw Ar(),gt;return e.data}function _i(e){return e===this.v}function bi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ya(e){return!bi(e,this.v)}let Ea=!1,se=null;function wt(e){se=e}function gi(e,t=!1,r){se={p:se,i:!1,c:null,e:null,s:e,x:null,r:w,l:null}}function yi(e){var t=se,r=t.e;if(r!==null){t.e=null;for(var n of r)Xi(n)}return e!==void 0&&(t.x=e),t.i=!0,se=t.p,e!=null?e:{}}function Ei(){return!0}let ze=[];function xi(){var e=ze;ze=[],ci(e)}function lt(e){if(ze.length===0&&!Lt){var t=ze;queueMicrotask(()=>{t===ze&&xi()})}ze.push(e)}function xa(){for(;ze.length>0;)xi()}function wi(e){var t=w;if(t===null)return g.f|=ke,e;if(!(t.f&Ve)&&!(t.f&Et))throw e;Le(e,t)}function Le(e,t){for(;t!==null;){if(t.f&Xr){if(!(t.f&Ve))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const wa=-7169;function M(e,t){e.f=e.f&wa|t}function _n(e){e.f&ne||e.deps===null?M(e,D):M(e,ce)}function Ti(e){if(e!==null)for(const t of e)!(t.f&U)||!(t.f&et)||(t.f^=et,Ti(t.deps))}function Si(e,t,r){e.f&V?t.add(e):e.f&ce&&r.add(e),Ti(e.deps),M(e,D)}function bn(e,t,r){if(e==null)return t(void 0),r&&r(void 0),Ne;const n=as(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const st=[];function Ta(e,t){return{subscribe:Br(e,t).subscribe}}function Br(e,t=Ne){let r=null;const n=new Set;function i(a){if(bi(e,a)&&(e=a,r)){const o=!st.length;for(const l of n)l[1](),st.push(l,e);if(o){for(let l=0;l<st.length;l+=2)st[l][0](st[l+1]);st.length=0}}}function s(a){i(a(e))}function u(a,o=Ne){const l=[a,o];return n.add(l),n.size===1&&(r=t(i,s)||Ne),a(e),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:u}}function Nt(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 Ta(r,(u,a)=>{let o=!1;const l=[];let f=0,d=Ne;const c=()=>{if(f)return;d();const p=t(n?l[0]:l,u,a);s?u(p):d=typeof p=="function"?p:Ne},v=i.map((p,m)=>bn(p,A=>{l[m]=A,f&=~(1<<m),o&&c()},()=>{f|=1<<m}));return o=!0,c(),function(){ci(v),d(),o=!1}})}function Sa(e){let t;return bn(e,r=>t=r)(),t}let zr=Symbol();function Ha(e,t,r){var s;const n=(s=r[t])!=null?s:r[t]={store:null,source:$i(void 0),unsubscribe:Ne};if(n.store!==e&&!(zr in r))if(n.unsubscribe(),n.store=e!=null?e:null,e==null)n.source.v=void 0,n.unsubscribe=Ne;else{var i=!0;n.unsubscribe=bn(e,u=>{i?n.source.v=u:G(n.source,u)}),i=!1}return e&&zr in r?Sa(e):B(n.source)}function Aa(){const e={};function t(){Vi(()=>{for(var r in e)e[r].unsubscribe();Dt(e,zr,{enumerable:!1,value:!0})})}return[e,t]}const It=new Set;let S=null,j=null,qr=null,Lt=!1,$r=!1,ot=null,ur=null;var Ln=0;let Ba=1;var ft,ht,ct,dt,Xt,Re,pt,Ce,ve,vt,X,Zr,Yr,Jr,Qr,Hi;const xr=class xr{constructor(){b(this,X);I(this,"id",Ba++);I(this,"current",new Map);I(this,"previous",new Map);b(this,ft,new Set);b(this,ht,new Set);b(this,ct,0);b(this,dt,0);b(this,Xt,null);b(this,Re,[]);b(this,pt,new Set);b(this,Ce,new Set);b(this,ve,new Map);I(this,"is_fork",!1);b(this,vt,!1)}skip_effect(t){h(this,ve).has(t)||h(this,ve).set(t,{d:[],m:[]})}unskip_effect(t){var r=h(this,ve).get(t);if(r){h(this,ve).delete(t);for(var n of r.d)M(n,V),this.schedule(n);for(n of r.m)M(n,ce),this.schedule(n)}}capture(t,r){r!==F&&!this.previous.has(t)&&this.previous.set(t,r),t.f&ke||(this.current.set(t,t.v),j==null||j.set(t,t.v))}activate(){S=this}deactivate(){S=null,j=null}flush(){try{if($r=!0,S=this,!P(this,X,Zr).call(this)){for(const t of h(this,pt))h(this,Ce).delete(t),M(t,V),this.schedule(t);for(const t of h(this,Ce))M(t,ce),this.schedule(t)}P(this,X,Yr).call(this)}finally{Ln=0,qr=null,ot=null,ur=null,$r=!1,S=null,j=null,De.clear()}}discard(){for(const t of h(this,ht))t(this);h(this,ht).clear()}increment(t){_(this,ct,h(this,ct)+1),t&&_(this,dt,h(this,dt)+1)}decrement(t,r){_(this,ct,h(this,ct)-1),t&&_(this,dt,h(this,dt)-1),!(h(this,vt)||r)&&(_(this,vt,!0),lt(()=>{_(this,vt,!1),this.flush()}))}oncommit(t){h(this,ft).add(t)}ondiscard(t){h(this,ht).add(t)}settled(){var t;return((t=h(this,Xt))!=null?t:_(this,Xt,di())).promise}static ensure(){if(S===null){const t=S=new xr;$r||(It.add(S),Lt||lt(()=>{S===t&&t.flush()}))}return S}apply(){}schedule(t){var i;if(qr=t,(i=t.b)!=null&&i.is_pending&&t.f&(Et|Zt|pi)&&!(t.f&Ve)){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(ot!==null&&r===w&&(g===null||!(g.f&U)))return;if(n&(Ue|Ee)){if(!(n&D))return;r.f^=D}}h(this,Re).push(r)}};ft=new WeakMap,ht=new WeakMap,ct=new WeakMap,dt=new WeakMap,Xt=new WeakMap,Re=new WeakMap,pt=new WeakMap,Ce=new WeakMap,ve=new WeakMap,vt=new WeakMap,X=new WeakSet,Zr=function(){return this.is_fork||h(this,dt)>0},Yr=function(){var a,o;Ln++>1e3&&Na();const t=h(this,Re);_(this,Re,[]),this.apply();var r=ot=[],n=[],i=ur=[];for(const l of t)P(this,X,Jr).call(this,l,r,n);if(S=null,i.length>0){var s=xr.ensure();for(const l of i)s.schedule(l)}if(ot=null,ur=null,P(this,X,Zr).call(this)){P(this,X,Qr).call(this,n),P(this,X,Qr).call(this,r);for(const[l,f]of h(this,ve))Ni(l,f)}else{h(this,pt).clear(),h(this,Ce).clear();for(const l of h(this,ft))l(this);h(this,ft).clear(),$n(n),$n(r),h(this,ct)===0&&P(this,X,Hi).call(this),(a=h(this,Xt))==null||a.resolve()}var u=S;u!==null&&(It.add(u),P(o=u,X,Yr).call(o))},Jr=function(t,r,n){t.f^=D;for(var i=t.first;i!==null;){var s=i.f,u=(s&(Ee|Ue))!==0,a=u&&(s&D)!==0,o=a||(s&ye)!==0||h(this,ve).has(i);if(!o&&i.fn!==null){u?i.f^=D:s&Et?r.push(i):Jt(i)&&(s&Ge&&h(this,Ce).add(i),Tt(i));var l=i.first;if(l!==null){i=l;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}},Qr=function(t){for(var r=0;r<t.length;r+=1)Si(t[r],h(this,pt),h(this,Ce))},Hi=function(){var i;if(It.size>1){this.previous.clear();var t=S,r=j,n=!0;for(const s of It){if(s===this){n=!1;continue}const u=[];for(const[o,l]of this.current){if(s.current.has(o))if(n&&l!==s.current.get(o))s.current.set(o,l);else continue;u.push(o)}if(u.length===0)continue;const a=[...s.current.keys()].filter(o=>!this.current.has(o));if(a.length>0){s.activate();const o=new Set,l=new Map;for(const f of u)Ai(f,a,o,l);if(h(s,Re).length>0){s.apply();for(const f of h(s,Re))P(i=s,X,Jr).call(i,f,[],[])}s.deactivate()}}S=t,j=r}h(this,ve).clear(),It.delete(this)};let Fe=xr;function Ct(e){var t=Lt;Lt=!0;try{for(var r;;){if(xa(),S===null)return r;S.flush()}}finally{Lt=t}}function Na(){try{ha()}catch(e){Le(e,qr)}}let oe=null;function $n(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if(!(n.f&(he|ye))&&Jt(n)&&(oe=new Set,Tt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Zi(n),(oe==null?void 0:oe.size)>0)){De.clear();for(const i of oe){if(i.f&(he|ye))continue;const s=[i];let u=i.parent;for(;u!==null;)oe.has(u)&&(oe.delete(u),s.push(u)),u=u.parent;for(let a=s.length-1;a>=0;a--){const o=s[a];o.f&(he|ye)||Tt(o)}}oe.clear()}}oe=null}}function Ai(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;s&U?Ai(i,t,r,n):s&(vn|Ge)&&!(s&V)&&Bi(i,t,n)&&(M(i,V),gn(i))}}function Bi(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(yt.call(t,i))return!0;if(i.f&U&&Bi(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function gn(e){S.schedule(e)}function Ni(e,t){if(!(e.f&Ee&&e.f&D)){e.f&V?t.d.push(e):e.f&ce&&t.m.push(e),M(e,D);for(var r=e.first;r!==null;)Ni(r,t),r=r.next}}function Oa(e){let t=0,r=Yt(0),n;return()=>{Tn()&&(B(r),Wi(()=>(t===0&&(n=as(()=>e(()=>$t(r)))),t+=1,()=>{lt(()=>{t-=1,t===0&&(n==null||n(),n=void 0,$t(r))})})))}}var Pa=xt|rt;function Ia(e,t,r,n){new Ra(e,t,r,n)}var J,Wt,me,Ye,z,_e,Q,ue,He,Je,Me,mt,_t,bt,Ae,wr,C,Oi,Pi,Ii,Kr,lr,fr,en;class Ra{constructor(t,r,n,i){b(this,C);I(this,"parent");I(this,"is_pending",!1);I(this,"transform_error");b(this,J);b(this,Wt,L?H:null);b(this,me);b(this,Ye);b(this,z);b(this,_e,null);b(this,Q,null);b(this,ue,null);b(this,He,null);b(this,Je,0);b(this,Me,0);b(this,mt,!1);b(this,_t,new Set);b(this,bt,new Set);b(this,Ae,null);b(this,wr,Oa(()=>(_(this,Ae,Yt(h(this,Je))),()=>{_(this,Ae,null)})));var s,u;_(this,J,t),_(this,me,r),_(this,Ye,a=>{var o=w;o.b=this,o.f|=Xr,n(a)}),this.parent=w.b,this.transform_error=(u=i!=null?i:(s=this.parent)==null?void 0:s.transform_error)!=null?u:a=>a,_(this,z,zi(()=>{if(L){const a=h(this,Wt);mn();const o=a.data===fi;if(a.data.startsWith(In)){const f=JSON.parse(a.data.slice(In.length));P(this,C,Pi).call(this,f)}else o?P(this,C,Ii).call(this):P(this,C,Oi).call(this)}else P(this,C,Kr).call(this)},Pa)),L&&_(this,J,H)}defer_effect(t){Si(t,h(this,_t),h(this,bt))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!h(this,me).pending}update_pending_count(t,r){P(this,C,en).call(this,t,r),_(this,Je,h(this,Je)+t),!(!h(this,Ae)||h(this,mt))&&(_(this,mt,!0),lt(()=>{_(this,mt,!1),h(this,Ae)&&br(h(this,Ae),h(this,Je))}))}get_effect_pending(){return h(this,wr).call(this),B(h(this,Ae))}error(t){var r=h(this,me).onerror;let n=h(this,me).failed;if(!r&&!n)throw t;h(this,_e)&&(Z(h(this,_e)),_(this,_e,null)),h(this,Q)&&(Z(h(this,Q)),_(this,Q,null)),h(this,ue)&&(Z(h(this,ue)),_(this,ue,null)),L&&(de(h(this,Wt)),ba(),de(mi()));var i=!1,s=!1;const u=()=>{if(i){_a();return}i=!0,s&&ma(),h(this,ue)!==null&&kt(h(this,ue),()=>{_(this,ue,null)}),P(this,C,fr).call(this,()=>{P(this,C,Kr).call(this)})},a=o=>{try{s=!0,r==null||r(o,u),s=!1}catch(l){Le(l,h(this,z)&&h(this,z).parent)}n&&_(this,ue,P(this,C,fr).call(this,()=>{try{return Te(()=>{var l=w;l.b=this,l.f|=Xr,n(h(this,J),()=>o,()=>u)})}catch(l){return Le(l,h(this,z).parent),null}}))};lt(()=>{var o;try{o=this.transform_error(t)}catch(l){Le(l,h(this,z)&&h(this,z).parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(a,l=>Le(l,h(this,z)&&h(this,z).parent)):a(o)})}}J=new WeakMap,Wt=new WeakMap,me=new WeakMap,Ye=new WeakMap,z=new WeakMap,_e=new WeakMap,Q=new WeakMap,ue=new WeakMap,He=new WeakMap,Je=new WeakMap,Me=new WeakMap,mt=new WeakMap,_t=new WeakMap,bt=new WeakMap,Ae=new WeakMap,wr=new WeakMap,C=new WeakSet,Oi=function(){try{_(this,_e,Te(()=>h(this,Ye).call(this,h(this,J))))}catch(t){this.error(t)}},Pi=function(t){const r=h(this,me).failed;r&&_(this,ue,Te(()=>{r(h(this,J),()=>t,()=>()=>{})}))},Ii=function(){const t=h(this,me).pending;if(t){this.is_pending=!0,_(this,Q,Te(()=>t(h(this,J))));var r=S;lt(()=>{var n=_(this,He,document.createDocumentFragment()),i=Oe();n.append(i),_(this,_e,P(this,C,fr).call(this,()=>Te(()=>h(this,Ye).call(this,i)))),h(this,Me)===0&&(h(this,J).before(n),_(this,He,null),kt(h(this,Q),()=>{_(this,Q,null)}),P(this,C,lr).call(this,r))})}},Kr=function(){var t=S;try{if(this.is_pending=this.has_pending_snippet(),_(this,Me,0),_(this,Je,0),_(this,_e,Te(()=>{h(this,Ye).call(this,h(this,J))})),h(this,Me)>0){var r=_(this,He,document.createDocumentFragment());Qi(h(this,_e),r);const n=h(this,me).pending;_(this,Q,Te(()=>n(h(this,J))))}else P(this,C,lr).call(this,t)}catch(n){this.error(n)}},lr=function(t){this.is_pending=!1;for(const r of h(this,_t))M(r,V),t.schedule(r);for(const r of h(this,bt))M(r,ce),t.schedule(r);h(this,_t).clear(),h(this,bt).clear()},fr=function(t){var r=w,n=g,i=se;xe(h(this,z)),ae(h(this,z)),wt(h(this,z).ctx);try{return Fe.ensure(),t()}catch(s){return wi(s),null}finally{xe(r),ae(n),wt(i)}},en=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&P(n=this.parent,C,en).call(n,t,r);return}_(this,Me,h(this,Me)+t),h(this,Me)===0&&(P(this,C,lr).call(this,r),h(this,Q)&&kt(h(this,Q),()=>{_(this,Q,null)}),h(this,He)&&(h(this,J).before(h(this,He)),_(this,He,null)))};function Ca(e,t,r,n){const i=yn;var s=e.filter(c=>!c.settled);if(r.length===0&&s.length===0){n(t.map(i));return}var u=w,a=Ma(),o=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function l(c){a();try{n(c)}catch(v){u.f&he||Le(v,u)}_r()}if(r.length===0){o.then(()=>l(t.map(i)));return}var f=Ri();function d(){Promise.all(r.map(c=>La(c))).then(c=>l([...t.map(i),...c])).catch(c=>Le(c,u)).finally(()=>f())}o?o.then(()=>{a(),d(),_r()}):d()}function Ma(){var e=w,t=g,r=se,n=S;return function(s=!0){xe(e),ae(t),wt(r),s&&!(e.f&he)&&(n==null||n.activate(),n==null||n.apply())}}function _r(e=!0){xe(null),ae(null),wt(null),e&&(S==null||S.deactivate())}function Ri(){var e=w.b,t=S,r=e.is_rendered();return e.update_pending_count(1,t),t.increment(r),(n=!1)=>{e.update_pending_count(-1,t),t.decrement(r,n)}}function yn(e){var t=U|V,r=g!==null&&g.f&U?g:null;return w!==null&&(w.f|=rt),{ctx:se,deps:null,effects:null,equals:_i,f:t,fn:e,reactions:null,rv:0,v:F,wv:0,parent:r!=null?r:w,ac:null}}function La(e,t,r){let n=w;n===null&&oa();var i=void 0,s=Yt(F),u=!g,a=new Map;return Ya(()=>{var v;var o=w,l=di();i=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).finally(_r)}catch(p){l.reject(p),_r()}var f=S;if(u){if(o.f&Ve)var d=Ri();if(n.b.is_rendered())(v=a.get(f))==null||v.reject(Se),a.delete(f);else{for(const p of a.values())p.reject(Se);a.clear()}a.set(f,l)}const c=(p,m=void 0)=>{if(d){var A=m===Se;d(A)}if(!(m===Se||o.f&he)){if(f.activate(),m)s.f|=ke,br(s,m);else{s.f&ke&&(s.f^=ke),br(s,p);for(const[y,O]of a){if(a.delete(y),y===f)break;O.reject(Se)}}f.deactivate()}};l.promise.then(c,p=>c(null,p||"unknown"))}),Vi(()=>{for(const o of a.values())o.reject(Se)}),new Promise(o=>{function l(f){function d(){f===i?o(s):l(i)}f.then(d,d)}l(i)})}function nr(e){const t=yn(e);return Ki(t),t}function $a(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Z(t[r])}}function ka(e){for(var t=e.parent;t!==null;){if(!(t.f&U))return t.f&he?null:t;t=t.parent}return null}function En(e){var t,r=w;xe(ka(e));try{e.f&=~et,$a(e),t=ns(e)}finally{xe(r)}return t}function Ci(e){var t=En(e);if(!e.equals(t)&&(e.wv=ts(),(!(S!=null&&S.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){M(e,D);return}je||(j!==null?(Tn()||S!=null&&S.is_fork)&&j.set(e,t):_n(e))}function Da(e){var t,r;if(e.effects!==null)for(const n of e.effects)(n.teardown||n.ac)&&((t=n.teardown)==null||t.call(n),(r=n.ac)==null||r.abort(Se),n.teardown=Ne,n.ac=null,Ft(n,0),Sn(n))}function Mi(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Tt(t)}let tn=new Set;const De=new Map;let Li=!1;function Yt(e,t){var r={f:0,v:e,reactions:null,equals:_i,rv:0,wv:0};return r}function re(e,t){const r=Yt(e);return Ki(r),r}function $i(e,t=!1,r=!0){const n=Yt(e);return t||(n.equals=ya),n}function G(e,t,r=!1){g!==null&&(!fe||g.f&Mn)&&Ei()&&g.f&(U|Ge|vn|Mn)&&(ie===null||!yt.call(ie,e))&&va();let n=r?Mt(t):t;return br(e,n,ur)}function br(e,t,r=null){if(!e.equals(t)){var n=e.v;je?De.set(e,t):De.set(e,n),e.v=t;var i=Fe.ensure();if(i.capture(e,n),e.f&U){const s=e;e.f&V&&En(s),_n(s)}e.wv=ts(),ki(e,V,r),w!==null&&w.f&D&&!(w.f&(Ee|Ue))&&(ee===null?to([e]):ee.push(e)),!i.is_fork&&tn.size>0&&!Li&&Ua()}return t}function Ua(){Li=!1;for(const e of tn)e.f&D&&M(e,ce),Jt(e)&&Tt(e);tn.clear()}function $t(e){G(e,e.v+1)}function ki(e,t,r){var n=e.reactions;if(n!==null)for(var i=n.length,s=0;s<i;s++){var u=n[s],a=u.f,o=(a&V)===0;if(o&&M(u,t),a&U){var l=u;j==null||j.delete(l),a&et||(a&ne&&(u.f|=et),ki(l,ce,r))}else if(o){var f=u;a&Ge&&oe!==null&&oe.add(f),r!==null?r.push(f):gn(f)}}}function Mt(e){if(typeof e!="object"||e===null||Lr in e)return e;const t=ia(e);if(t!==ra&&t!==na)return e;var r=new Map,n=Ks(e),i=re(0),s=Ke,u=a=>{if(Ke===s)return a();var o=g,l=Ke;ae(null),Fn(s);var f=a();return ae(o),Fn(l),f};return n&&r.set("length",re(e.length)),new Proxy(e,{defineProperty(a,o,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&da();var f=r.get(o);return f===void 0?u(()=>{var d=re(l.value);return r.set(o,d),d}):G(f,l.value,!0),!0},deleteProperty(a,o){var l=r.get(o);if(l===void 0){if(o in a){const f=u(()=>re(F));r.set(o,f),$t(i)}}else G(l,F),$t(i);return!0},get(a,o,l){var v;if(o===Lr)return e;var f=r.get(o),d=o in a;if(f===void 0&&(!d||(v=ut(a,o))!=null&&v.writable)&&(f=u(()=>{var p=Mt(d?a[o]:F),m=re(p);return m}),r.set(o,f)),f!==void 0){var c=B(f);return c===F?void 0:c}return Reflect.get(a,o,l)},getOwnPropertyDescriptor(a,o){var l=Reflect.getOwnPropertyDescriptor(a,o);if(l&&"value"in l){var f=r.get(o);f&&(l.value=B(f))}else if(l===void 0){var d=r.get(o),c=d==null?void 0:d.v;if(d!==void 0&&c!==F)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return l},has(a,o){var c;if(o===Lr)return!0;var l=r.get(o),f=l!==void 0&&l.v!==F||Reflect.has(a,o);if(l!==void 0||w!==null&&(!f||(c=ut(a,o))!=null&&c.writable)){l===void 0&&(l=u(()=>{var v=f?Mt(a[o]):F,p=re(v);return p}),r.set(o,l));var d=B(l);if(d===F)return!1}return f},set(a,o,l,f){var $;var d=r.get(o),c=o in a;if(n&&o==="length")for(var v=l;v<d.v;v+=1){var p=r.get(v+"");p!==void 0?G(p,F):v in a&&(p=u(()=>re(F)),r.set(v+"",p))}if(d===void 0)(!c||($=ut(a,o))!=null&&$.writable)&&(d=u(()=>re(void 0)),G(d,Mt(l)),r.set(o,d));else{c=d.v!==F;var m=u(()=>Mt(l));G(d,m)}var A=Reflect.getOwnPropertyDescriptor(a,o);if(A!=null&&A.set&&A.set.call(f,l),!c){if(n&&typeof o=="string"){var y=r.get("length"),O=Number(o);Number.isInteger(O)&&O>=y.v&&G(y,O+1)}$t(i)}return!0},ownKeys(a){B(i);var o=Reflect.ownKeys(a).filter(d=>{var c=r.get(d);return c===void 0||c.v!==F});for(var[l,f]of r)f.v!==F&&!(l in a)&&o.push(l);return o},setPrototypeOf(){pa()}})}var kn,Di,Ui,Fi;function rn(){if(kn===void 0){kn=window,Di=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Ui=ut(t,"firstChild").get,Fi=ut(t,"nextSibling").get,Rn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Rn(r)&&(r.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function Ut(e){return Ui.call(e)}function Pe(e){return Fi.call(e)}function ir(e,t){if(!L)return Ut(e);var r=Ut(H);if(r===null)r=H.appendChild(Oe());else if(t&&r.nodeType!==Sr){var n=Oe();return r==null||r.before(n),de(n),n}return t&&wn(r),de(r),r}function Fa(e,t=!1){if(!L){var r=Ut(e);return r instanceof Comment&&r.data===""?Pe(r):r}if(t){if((H==null?void 0:H.nodeType)!==Sr){var n=Oe();return H==null||H.before(n),de(n),n}wn(H)}return H}function ja(e,t=1,r=!1){let n=L?H:e;for(var i;t--;)i=n,n=Pe(n);if(!L)return n;if(r){if((n==null?void 0:n.nodeType)!==Sr){var s=Oe();return n===null?i==null||i.after(s):n.before(s),de(s),s}wn(n)}return de(n),n}function Ga(e){e.textContent=""}function Va(){return!1}function xn(e,t,r){return document.createElementNS(Js,e,void 0)}function wn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Sr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function ji(e){var t=g,r=w;ae(null),xe(null);try{return e()}finally{ae(t),xe(r)}}function Gi(e){w===null&&(g===null&&fa(),la()),je&&ua()}function Xa(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function pe(e,t){var u;var r=w;r!==null&&r.f&ye&&(e|=ye);var n={ctx:se,deps:null,nodes:null,f:e|V|ne,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null},i=n;if(e&Et)ot!==null?ot.push(n):Fe.ensure().schedule(n);else if(t!==null){try{Tt(n)}catch(a){throw Z(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&rt)&&(i=i.first,e&Ge&&e&xt&&i!==null&&(i.f|=xt))}if(i!==null&&(i.parent=r,r!==null&&Xa(i,r),g!==null&&g.f&U&&!(e&Ue))){var s=g;((u=s.effects)!=null?u:s.effects=[]).push(i)}return n}function Tn(){return g!==null&&!fe}function Vi(e){const t=pe(Zt,null);return M(t,D),t.teardown=e,t}function Dn(e){var i;Gi();var t=w.f,r=!g&&(t&Ee)!==0&&(t&Ve)===0;if(r){var n=se;((i=n.e)!=null?i:n.e=[]).push(e)}else return Xi(e)}function Xi(e){return pe(Et|vi,e)}function Wa(e){return Gi(),pe(Zt|vi,e)}function za(e){Fe.ensure();const t=pe(Ue|rt,e);return()=>{Z(t)}}function qa(e){Fe.ensure();const t=pe(Ue|rt,e);return(r={})=>new Promise(n=>{r.outro?kt(t,()=>{Z(t),n(void 0)}):(Z(t),n(void 0))})}function Za(e){return pe(Et,e)}function Ya(e){return pe(vn|rt,e)}function Wi(e,t=0){return pe(Zt|t,e)}function Ja(e,t=[],r=[],n=[]){Ca(n,t,r,i=>{pe(Zt,()=>e(...i.map(B)))})}function zi(e,t=0){var r=pe(Ge|t,e);return r}function Te(e){return pe(Ee|rt,e)}function qi(e){var t=e.teardown;if(t!==null){const r=je,n=g;Un(!0),ae(null);try{t.call(null)}finally{Un(r),ae(n)}}}function Sn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&ji(()=>{i.abort(Se)});var n=r.next;r.f&Ue?r.parent=null:Z(r,t),r=n}}function Qa(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Ee||Z(t),t=r}}function Z(e,t=!0){var r=!1;(t||e.f&sa)&&e.nodes!==null&&e.nodes.end!==null&&(Ka(e.nodes.start,e.nodes.end),r=!0),M(e,Cn),Sn(e,t&&!r),Ft(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();qi(e),e.f^=Cn,e.f|=he;var i=e.parent;i!==null&&i.first!==null&&Zi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ka(e,t){for(;e!==null;){var r=e===t?null:Pe(e);e.remove(),e=r}}function Zi(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 kt(e,t,r=!0){var n=[];Yi(e,n,!0);var i=()=>{r&&Z(e),t&&t()},s=n.length;if(s>0){var u=()=>--s||i();for(var a of n)a.out(u)}else i()}function Yi(e,t,r){if(!(e.f&ye)){e.f^=ye;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next,u=(i.f&xt)!==0||(i.f&Ee)!==0&&(e.f&Ge)!==0;Yi(i,t,u?r:!1),i=s}}}function eo(e){Ji(e,!0)}function Ji(e,t){if(e.f&ye){e.f^=ye,e.f&D||(M(e,V),Fe.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&xt)!==0||(r.f&Ee)!==0;Ji(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const u of s)(u.is_global||t)&&u.in()}}function Qi(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:Pe(r);t.append(r),r=i}}let hr=!1,je=!1;function Un(e){je=e}let g=null,fe=!1;function ae(e){g=e}let w=null;function xe(e){w=e}let ie=null;function Ki(e){g!==null&&(ie===null?ie=[e]:ie.push(e))}let q=null,Y=0,ee=null;function to(e){ee=e}let es=1,qe=0,Ke=qe;function Fn(e){Ke=e}function ts(){return++es}function Jt(e){var t=e.f;if(t&V)return!0;if(t&U&&(e.f&=~et),t&ce){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Jt(s)&&Ci(s),s.wv>e.wv)return!0}t&ne&&j===null&&M(e,D)}return!1}function rs(e,t,r=!0){var n=e.reactions;if(n!==null&&!(ie!==null&&yt.call(ie,e)))for(var i=0;i<n.length;i++){var s=n[i];s.f&U?rs(s,t,!1):t===s&&(r?M(s,V):s.f&D&&M(s,ce),gn(s))}}function ns(e){var m,A;var t=q,r=Y,n=ee,i=g,s=ie,u=se,a=fe,o=Ke,l=e.f;q=null,Y=0,ee=null,g=l&(Ee|Ue)?null:e,ie=null,wt(e.ctx),fe=!1,Ke=++qe,e.ac!==null&&(ji(()=>{e.ac.abort(Se)}),e.ac=null);try{e.f|=Wr;var f=e.fn,d=f();e.f|=Ve;var c=e.deps,v=S==null?void 0:S.is_fork;if(q!==null){var p;if(v||Ft(e,Y),c!==null&&Y>0)for(c.length=Y+q.length,p=0;p<q.length;p++)c[Y+p]=q[p];else e.deps=c=q;if(Tn()&&e.f&ne)for(p=Y;p<c.length;p++)((A=(m=c[p]).reactions)!=null?A:m.reactions=[]).push(e)}else!v&&c!==null&&Y<c.length&&(Ft(e,Y),c.length=Y);if(Ei()&&ee!==null&&!fe&&c!==null&&!(e.f&(U|ce|V)))for(p=0;p<ee.length;p++)rs(ee[p],e);if(i!==null&&i!==e){if(qe++,i.deps!==null)for(let y=0;y<r;y+=1)i.deps[y].rv=qe;if(t!==null)for(const y of t)y.rv=qe;ee!==null&&(n===null?n=ee:n.push(...ee))}return e.f&ke&&(e.f^=ke),d}catch(y){return wi(y)}finally{e.f^=Wr,q=t,Y=r,ee=n,g=i,ie=s,wt(u),fe=a,Ke=o}}function ro(e,t){let r=t.reactions;if(r!==null){var n=ea.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&U&&(q===null||!yt.call(q,t))){var s=t;s.f&ne&&(s.f^=ne,s.f&=~et),_n(s),Da(s),Ft(s,0)}}function Ft(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)ro(e,r[n])}function Tt(e){var t=e.f;if(!(t&he)){M(e,D);var r=w,n=hr;w=e,hr=!0;try{t&(Ge|pi)?Qa(e):Sn(e),qi(e);var i=ns(e);e.teardown=typeof i=="function"?i:null,e.wv=es;var s;Qs&&Ea&&e.f&V&&e.deps}finally{hr=n,w=r}}}function B(e){var f;var t=e.f,r=(t&U)!==0;if(g!==null&&!fe){var n=w!==null&&(w.f&he)!==0;if(!n&&(ie===null||!yt.call(ie,e))){var i=g.deps;if(g.f&Wr)e.rv<qe&&(e.rv=qe,q===null&&i!==null&&i[Y]===e?Y++:q===null?q=[e]:q.push(e));else{((f=g.deps)!=null?f:g.deps=[]).push(e);var s=e.reactions;s===null?e.reactions=[g]:yt.call(s,g)||s.push(g)}}}if(je&&De.has(e))return De.get(e);if(r){var u=e;if(je){var a=u.v;return(!(u.f&D)&&u.reactions!==null||ss(u))&&(a=En(u)),De.set(u,a),a}var o=(u.f&ne)===0&&!fe&&g!==null&&(hr||(g.f&ne)!==0),l=(u.f&Ve)===0;Jt(u)&&(o&&(u.f|=ne),Ci(u)),o&&!l&&(Mi(u),is(u))}if(j!=null&&j.has(e))return j.get(e);if(e.f&ke)throw e.v;return e.v}function is(e){var t;if(e.f|=ne,e.deps!==null)for(const r of e.deps)((t=r.reactions)!=null?t:r.reactions=[]).push(e),r.f&U&&!(r.f&ne)&&(Mi(r),is(r))}function ss(e){if(e.v===F)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(De.has(t)||t.f&U&&ss(t))return!0;return!1}function as(e){var t=fe;try{return fe=!0,e()}finally{fe=t}}const Ze=Symbol("events"),os=new Set,nn=new Set;function no(e,t,r){var n;((n=t[Ze])!=null?n:t[Ze]={})[e]=r}function io(e){for(var t=0;t<e.length;t++)os.add(e[t]);for(var r of nn)r(e)}let jn=null;function Gn(e){var A,y;var t=this,r=t.ownerDocument,n=e.type,i=((A=e.composedPath)==null?void 0:A.call(e))||[],s=i[0]||e.target;jn=e;var u=0,a=jn===e&&e[Ze];if(a){var o=i.indexOf(a);if(o!==-1&&(t===document||t===window)){e[Ze]=t;return}var l=i.indexOf(t);if(l===-1)return;o<=l&&(u=o)}if(s=i[u]||e.target,s!==t){Dt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=g,d=w;ae(null),xe(null);try{for(var c,v=[];s!==null;){var p=s.assignedSlot||s.parentNode||s.host||null;try{var m=(y=s[Ze])==null?void 0:y[n];m!=null&&(!s.disabled||e.target===s)&&m.call(s,e)}catch(O){c?v.push(O):c=O}if(e.cancelBubble||p===t||p===null)break;s=p}if(c){for(let O of v)queueMicrotask(()=>{throw O});throw c}}finally{e[Ze]=t,delete e.currentTarget,ae(f),xe(d)}}}var ui;const kr=((ui=globalThis==null?void 0:globalThis.window)==null?void 0:ui.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function so(e){var t;return(t=kr==null?void 0:kr.createHTML(e))!=null?t:e}function ao(e){var t=xn("template");return t.innerHTML=so(e.replaceAll("<!>","<!---->")),t.content}function jt(e,t){var r=w;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function us(e,t){var r=(t&Ys)!==0,n,i=!e.startsWith("<!>");return()=>{if(L)return jt(H,null),H;n===void 0&&(n=ao(i?e:"<!>"+e),n=Ut(n));var s=r||Di?document.importNode(n,!0):n.cloneNode(!0);return jt(s,s),s}}function oo(){if(L)return jt(H,null),H;var e=document.createDocumentFragment(),t=document.createComment(""),r=Oe();return e.append(t,r),jt(t,r),e}function cr(e,t){if(L){var r=w;(!(r.f&Ve)||r.nodes.end===null)&&(r.nodes.end=H),mn();return}e!==null&&e.before(t)}const uo=["touchstart","touchmove"];function lo(e){return uo.includes(e)}function Vn(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==((n=e.__t)!=null?n:e.__t=e.nodeValue)&&(e.__t=r,e.nodeValue=`${r}`)}function ls(e,t){return fs(e,t)}function fo(e,t){var u;rn(),t.intro=(u=t.intro)!=null?u:!1;const r=t.target,n=L,i=H;try{for(var s=Ut(r);s&&(s.nodeType!==Hr||s.data!==li);)s=Pe(s);if(!s)throw gt;at(!0),de(s);const a=fs(e,tr(er({},t),{anchor:s}));return at(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==gt&&console.warn("Failed to hydrate: ",a),t.recover===!1&&ca(),rn(),Ga(r),at(!1),ls(e,t)}finally{at(n),de(i)}}const sr=new Map;function fs(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:u=!0,transformError:a}){rn();var o=void 0,l=qa(()=>{var f=r!=null?r:t.appendChild(Oe());Ia(f,{pending:()=>{}},v=>{gi({});var p=se;if(s&&(p.c=s),i&&(n.$$events=i),L&&jt(v,null),o=e(v,n)||{},L&&(w.nodes.end=H,H===null||H.nodeType!==Hr||H.data!==hi))throw Ar(),gt;yi()},a);var d=new Set,c=v=>{for(var p=0;p<v.length;p++){var m=v[p];if(!d.has(m)){d.add(m);var A=lo(m);for(const $ of[t,document]){var y=sr.get($);y===void 0&&(y=new Map,sr.set($,y));var O=y.get(m);O===void 0?($.addEventListener(m,Gn,{passive:A}),y.set(m,1)):y.set(m,O+1)}}}};return c(ta(os)),nn.add(c),()=>{var A;for(var v of d)for(const y of[t,document]){var p=sr.get(y),m=p.get(v);--m==0?(y.removeEventListener(v,Gn),p.delete(v),p.size===0&&sr.delete(y)):p.set(v,m)}nn.delete(c),f!==r&&((A=f.parentNode)==null||A.removeChild(f))}});return sn.set(o,l),o}let sn=new WeakMap;function ho(e,t){const r=sn.get(e);return r?(sn.delete(e),r(t)):Promise.resolve()}var le,be,K,Qe,zt,qt,Tr;class co{constructor(t,r=!0){I(this,"anchor");b(this,le,new Map);b(this,be,new Map);b(this,K,new Map);b(this,Qe,new Set);b(this,zt,!0);b(this,qt,t=>{if(h(this,le).has(t)){var r=h(this,le).get(t),n=h(this,be).get(r);if(n)eo(n),h(this,Qe).delete(r);else{var i=h(this,K).get(r);i&&(h(this,be).set(r,i.effect),h(this,K).delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,u]of h(this,le)){if(h(this,le).delete(s),s===t)break;const a=h(this,K).get(u);a&&(Z(a.effect),h(this,K).delete(u))}for(const[s,u]of h(this,be)){if(s===r||h(this,Qe).has(s))continue;const a=()=>{if(Array.from(h(this,le).values()).includes(s)){var l=document.createDocumentFragment();Qi(u,l),l.append(Oe()),h(this,K).set(s,{effect:u,fragment:l})}else Z(u);h(this,Qe).delete(s),h(this,be).delete(s)};h(this,zt)||!n?(h(this,Qe).add(s),kt(u,a,!1)):a()}}});b(this,Tr,t=>{h(this,le).delete(t);const r=Array.from(h(this,le).values());for(const[n,i]of h(this,K))r.includes(n)||(Z(i.effect),h(this,K).delete(n))});this.anchor=t,_(this,zt,r)}ensure(t,r){var n=S,i=Va();if(r&&!h(this,be).has(t)&&!h(this,K).has(t))if(i){var s=document.createDocumentFragment(),u=Oe();s.append(u),h(this,K).set(t,{effect:Te(()=>r(u)),fragment:s})}else h(this,be).set(t,Te(()=>r(this.anchor)));if(h(this,le).set(n,t),i){for(const[a,o]of h(this,be))a===t?n.unskip_effect(o):n.skip_effect(o);for(const[a,o]of h(this,K))a===t?n.unskip_effect(o.effect):n.skip_effect(o.effect);n.oncommit(h(this,qt)),n.ondiscard(h(this,Tr))}else L&&(this.anchor=H),h(this,qt).call(this,n)}}le=new WeakMap,be=new WeakMap,K=new WeakMap,Qe=new WeakMap,zt=new WeakMap,qt=new WeakMap,Tr=new WeakMap;function po(e,t,r=!1){var n;L&&(n=H,mn());var i=new co(e),s=r?xt:0;function u(a,o){if(L){var l=ga(n);if(a!==parseInt(l.substring(1))){var f=mi();de(f),i.anchor=f,at(!1),i.ensure(a,o),at(!0);return}}i.ensure(a,o)}zi(()=>{var a=!1;t((o,l=0)=>{a=!0,u(l,o)}),a||u(-1,null)},s)}function vo(e,t){Za(()=>{var i;var r=e.getRootNode(),n=r.host?r:(i=r.head)!=null?i:r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const s=xn("style");s.id=t.hash,s.textContent=t.code,n.appendChild(s)}})}function ar(e,t,r,n){var i=n,s=!0,u=()=>(s&&(s=!1,i=n),i),a;a=e[t],a===void 0&&n!==void 0&&(a=u());var o;o=()=>{var c=e[t];return c===void 0?u():(s=!0,c)};var l=!1,f=yn(()=>(l=!1,o())),d=w;return function(c,v){if(arguments.length>0){const p=v?B(f):c;return G(f,p),l=!0,i!==void 0&&(i=p),c}return je&&l||d.f&he?f.v:B(f)}}function mo(e){return new _o(e)}var Be,te;class _o{constructor(t){b(this,Be);b(this,te);var s,u;var r=new Map,n=(a,o)=>{var l=$i(o,!1,!1);return r.set(a,l),l};const i=new Proxy(tr(er({},t.props||{}),{$$events:{}}),{get(a,o){var l;return B((l=r.get(o))!=null?l:n(o,Reflect.get(a,o)))},has(a,o){var l;return o===aa?!0:(B((l=r.get(o))!=null?l:n(o,Reflect.get(a,o))),Reflect.has(a,o))},set(a,o,l){var f;return G((f=r.get(o))!=null?f:n(o,l),l),Reflect.set(a,o,l)}});_(this,te,(t.hydrate?fo:ls)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:(s=t.intro)!=null?s:!1,recover:t.recover,transformError:t.transformError})),(!((u=t==null?void 0:t.props)!=null&&u.$$host)||t.sync===!1)&&Ct(),_(this,Be,i.$$events);for(const a of Object.keys(h(this,te)))a==="$set"||a==="$destroy"||a==="$on"||Dt(this,a,{get(){return h(this,te)[a]},set(o){h(this,te)[a]=o},enumerable:!0});h(this,te).$set=a=>{Object.assign(i,a)},h(this,te).$destroy=()=>{ho(h(this,te))}}$set(t){h(this,te).$set(t)}$on(t,r){h(this,Be)[t]=h(this,Be)[t]||[];const n=(...i)=>r.call(this,...i);return h(this,Be)[t].push(n),()=>{h(this,Be)[t]=h(this,Be)[t].filter(i=>i!==n)}}$destroy(){h(this,te).$destroy()}}Be=new WeakMap,te=new WeakMap;let hs;typeof HTMLElement=="function"&&(hs=class extends HTMLElement{constructor(t,r,n){super();I(this,"$$ctor");I(this,"$$s");I(this,"$$c");I(this,"$$cn",!1);I(this,"$$d",{});I(this,"$$r",!1);I(this,"$$p_d",{});I(this,"$$l",{});I(this,"$$l_u",new Map);I(this,"$$me");I(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}connectedCallback(){return it(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const u=xn("slot");i!=="default"&&(u.name=i),cr(s,u)}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=bo(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=dr(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=mo({component:this.$$ctor,target:this.$$shadowRoot||this,props:tr(er({},this.$$d),{$$slots:r,$$host:this})}),this.$$me=za(()=>{Wi(()=>{var i;this.$$r=!0;for(const s of mr(this.$$c)){if(!((i=this.$$p_d[s])!=null&&i.reflect))continue;this.$$d[s]=this.$$c[s];const u=dr(s,this.$$d[s],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,u)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const u=this.$$c.$on(i,s);this.$$l_u.set(s,u)}this.$$l={}}})}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=dr(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return mr(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function dr(e,t,r,n){var s;const i=(s=r[e])==null?void 0:s.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?null:t;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 bo(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function go(e,t,r,n,i,s){let u=class extends hs{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return mr(t).map(a=>(t[a].attribute||a).toLowerCase())}};return mr(t).forEach(a=>{Dt(u.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(o){var d;o=dr(a,o,t),this.$$d[a]=o;var l=this.$$c;if(l){var f=(d=ut(l,a))==null?void 0:d.get;f?l[a]=o:l.$set({[a]:o})}}})}),n.forEach(a=>{Dt(u.prototype,a,{get(){var o;return(o=this.$$c)==null?void 0:o[a]}})}),e.element=u,u}class cs extends Error{constructor(t,r){super(r),this.code=t,this.name="ElevateApiError"}}const yo=e=>it(exports,null,function*(){var s;const t=new URL(`${e.apiEndpoint}/elevate/playerInfo?language=${(s=e.locale)!=null?s:""}`),r=new Headers({"Content-Type":"application/json"});e.userSession&&r.append("X-SessionId",e.userSession);const i=yield(yield fetch(t.href,{method:"GET",headers:r})).json();if(!i.success)throw new cs(i.errorCode,i.errorMessage);return i.data}),Eo=e=>it(exports,null,function*(){const t=new URL(`${e.apiEndpoint}/elevate/rakeback/claim`),r=new Headers({"Content-Type":"application/json"});e.userSession&&r.append("X-Sessionid",e.userSession);const i=yield(yield fetch(t.href,{method:"PUT",headers:r,body:JSON.stringify({})})).json();if(!i.success)throw new cs(i.errorCode,i.errorMessage)}),xo=(e,t=2)=>{const[r,n=""]=e.toString().split(".");return t<=0?r:`${r}.${n?n.slice(0,t).padEnd(t,"0"):"0".repeat(t)}`},wo=(e,t="en")=>{var r,n;if(!e)return"";try{return(n=(r=new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(s=>s.type==="currency"))==null?void 0:r.value)!=null?n:e}catch(i){return e}},To=e=>{window.postMessage({type:"RakebackClaimTrigger",points:e},window.location.href)},So=e=>{window.postMessage({type:"RakebackClaimSuccess",points:e},window.location.href)},Ho=e=>{window.postMessage({type:"RakebackClaimFailed",message:e},window.location.href)},Ao=()=>{window.postMessage({type:"RakebackWalletMissing"},window.location.href)};function Bo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var No=function(t){return Oo(t)&&!Po(t)};function Oo(e){return!!e&&typeof e=="object"}function Po(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Co(e)}var Io=typeof Symbol=="function"&&Symbol.for,Ro=Io?Symbol.for("react.element"):60103;function Co(e){return e.$$typeof===Ro}function Mo(e){return Array.isArray(e)?[]:{}}function Gt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?St(Mo(e),e,t):e}function Lo(e,t,r){return e.concat(t).map(function(n){return Gt(n,r)})}function $o(e,t){if(!t.customMerge)return St;var r=t.customMerge(e);return typeof r=="function"?r:St}function ko(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Xn(e){return Object.keys(e).concat(ko(e))}function ds(e,t){try{return t in e}catch(r){return!1}}function Do(e,t){return ds(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Uo(e,t,r){var n={};return r.isMergeableObject(e)&&Xn(e).forEach(function(i){n[i]=Gt(e[i],r)}),Xn(t).forEach(function(i){Do(e,i)||(ds(e,i)&&r.isMergeableObject(t[i])?n[i]=$o(i,r)(e[i],t[i],r):n[i]=Gt(t[i],r))}),n}function St(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Lo,r.isMergeableObject=r.isMergeableObject||No,r.cloneUnlessOtherwiseSpecified=Gt;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):Uo(e,t,r):Gt(t,r)}St.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return St(n,i,r)},{})};var Fo=St,jo=Fo;const Go=Bo(jo);var an=function(e,t){return an=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])},an(e,t)};function Nr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");an(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ge=function(){return ge=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},ge.apply(this,arguments)};function Vo(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 Dr(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 Ur(e,t){var r=t&&t.cache?t.cache:Jo,n=t&&t.serializer?t.serializer:Zo,i=t&&t.strategy?t.strategy:zo;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=="undefined"&&(s=e.call(this,n),t.set(i,s)),s}function ps(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return typeof s=="undefined"&&(s=e.apply(this,n),t.set(i,s)),s}function vs(e,t,r,n,i){return r.bind(t,e,n,i)}function zo(e,t){var r=e.length===1?Wo:ps;return vs(e,this,r,t.cache.create(),t.serializer)}function qo(e,t){return vs(e,this,ps,t.cache.create(),t.serializer)}var Zo=function(){return JSON.stringify(arguments)},Yo=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}(),Jo={create:function(){return new Yo}},Fr={variadic:qo},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 N;(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"})(N||(N={}));var Ht;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ht||(Ht={}));function Wn(e){return e.type===N.literal}function Qo(e){return e.type===N.argument}function ms(e){return e.type===N.number}function _s(e){return e.type===N.date}function bs(e){return e.type===N.time}function gs(e){return e.type===N.select}function ys(e){return e.type===N.plural}function Ko(e){return e.type===N.pound}function Es(e){return e.type===N.tag}function xs(e){return!!(e&&typeof e=="object"&&e.type===Ht.number)}function on(e){return!!(e&&typeof e=="object"&&e.type===Ht.dateTime)}var ws=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,eu=/(?:[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 tu(e){var t={};return e.replace(eu,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 R=function(){return R=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},R.apply(this,arguments)};var ru=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function nu(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ru).filter(function(c){return c.length>0}),r=[],n=0,i=t;n<i.length;n++){var s=i[n],u=s.split("/");if(u.length===0)throw new Error("Invalid number skeleton");for(var a=u[0],o=u.slice(1),l=0,f=o;l<f.length;l++){var d=f[l];if(d.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:o})}return r}function iu(e){return e.replace(/^(.*?)-/,"")}var zn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ts=/^(@+)?(\+|#+)?[rs]?$/g,su=/(\*)(0+)|(#+)(0+)|(0+)/g,Ss=/^(0+)$/;function qn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Ts,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 Hs(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 au(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)),!Ss.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Zn(e){var t={},r=Hs(e);return r||t}function ou(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=iu(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=R(R(R({},t),{notation:"scientific"}),i.options.reduce(function(o,l){return R(R({},o),Zn(l))},{}));continue;case"engineering":t=R(R(R({},t),{notation:"engineering"}),i.options.reduce(function(o,l){return R(R({},o),Zn(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(su,function(o,l,f,d,c,v){if(l)t.minimumIntegerDigits=f.length;else{if(d&&c)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(Ss.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(zn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(zn,function(o,l,f,d,c,v){return f==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:c&&v?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+v.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var s=i.options[0];s==="w"?t=R(R({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=R(R({},t),qn(s)));continue}if(Ts.test(i.stem)){t=R(R({},t),qn(i.stem));continue}var u=Hs(i.stem);u&&(t=R(R({},t),u));var a=au(i.stem);a&&(t=R(R({},t),a))}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 uu(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 u=1+(s&1),a=s<2?1:3+(s>>1),o="a",l=lu(t);for((l=="H"||l=="k")&&(a=0);a-- >0;)r+=o;for(;u-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function lu(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 jr,fu=new RegExp("^".concat(ws.source,"*")),hu=new RegExp("".concat(ws.source,"*$"));function T(e,t){return{start:e,end:t}}var cu=!!String.prototype.startsWith&&"_a".startsWith("a",1),du=!!String.fromCodePoint,pu=!!Object.fromEntries,vu=!!String.prototype.codePointAt,mu=!!String.prototype.trimStart,_u=!!String.prototype.trimEnd,bu=!!Number.isSafeInteger,gu=bu?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},un=!0;try{var yu=Bs("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");un=((jr=yu.exec("a"))===null||jr===void 0?void 0:jr[0])==="a"}catch(e){un=!1}var Yn=cu?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},ln=du?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,s=0,u;i>s;){if(u=t[s++],u>1114111)throw RangeError(u+" is not a valid code point");n+=u<65536?String.fromCharCode(u):String.fromCharCode(((u-=65536)>>10)+55296,u%1024+56320)}return n},Jn=pu?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var s=i[n],u=s[0],a=s[1];r[u]=a}return r},As=vu?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}},Eu=mu?function(t){return t.trimStart()}:function(t){return t.replace(fu,"")},xu=_u?function(t){return t.trimEnd()}:function(t){return t.replace(hu,"")};function Bs(e,t){return new RegExp(e,t)}var fn;if(un){var Qn=Bs("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");fn=function(t,r){var n;Qn.lastIndex=r;var i=Qn.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else fn=function(t,r){for(var n=[];;){var i=As(t,r);if(i===void 0||Ns(i)||Hu(i))break;n.push(i),r+=i>=65536?2:1}return ln.apply(void 0,n)};var wu=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 u=this.parseArgument(t,n);if(u.err)return u;i.push(u.val)}else{if(s===125&&t>0)break;if(s===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:N.pound,location:T(a,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,T(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&hn(this.peek()||0)){var u=this.parseTag(t,r);if(u.err)return u;i.push(u.val)}else{var u=this.parseLiteral(t,r);if(u.err)return u;i.push(u.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:N.literal,value:"<".concat(i,"/>"),location:T(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,r,!0);if(s.err)return s;var u=s.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!hn(this.char()))return this.error(x.INVALID_TAG,T(a,this.clonePosition()));var o=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(x.UNMATCHED_CLOSING_TAG,T(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:N.tag,value:i,children:u,location:T(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,T(a,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,T(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,T(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Su(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 u=this.tryParseUnquoted(t,r);if(u){i+=u;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var o=T(n,this.clonePosition());return{val:{type:N.literal,value:i,location:o},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Tu(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 ln.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(),ln(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,T(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,T(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(x.MALFORMED_ARGUMENT,T(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:N.argument,value:i,location:T(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(x.MALFORMED_ARGUMENT,T(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=fn(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),u=T(t,s);return{value:n,location:u}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,u=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,T(u,o));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var c=xu(d.val);if(c.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,T(this.clonePosition(),this.clonePosition()));var v=T(f,this.clonePosition());l={style:c,styleLocation:v}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var m=T(i,this.clonePosition());if(l&&Yn(l==null?void 0:l.style,"::",0)){var A=Eu(l.style.slice(2));if(a==="number"){var d=this.parseNumberSkeletonFromString(A,l.styleLocation);return d.err?d:{val:{type:N.number,value:n,location:m,style:d.val},err:null}}else{if(A.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,m);var y=A;this.locale&&(y=uu(A,this.locale));var c={type:Ht.dateTime,pattern:y,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?tu(y):{}},O=a==="date"?N.date:N.time;return{val:{type:O,value:n,location:m,style:c},err:null}}}return{val:{type:a==="number"?N.number:a==="date"?N.date:N.time,value:n,location:m,style:(s=l==null?void 0:l.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var $=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,T($,gr({},$)));this.bumpSpace();var Xe=this.parseIdentifierIfPossible(),we=0;if(a!=="select"&&Xe.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),Xe=this.parseIdentifierIfPossible(),we=d.val}var We=this.tryParsePluralOrSelectOptions(t,a,r,Xe);if(We.err)return We;var p=this.tryParseArgumentClose(i);if(p.err)return p;var Qt=T(i,this.clonePosition());return a==="select"?{val:{type:N.select,value:n,options:Jn(We.val),location:Qt},err:null}:{val:{type:N.plural,value:n,options:Jn(We.val),offset:we,pluralType:a==="plural"?"cardinal":"ordinal",location:Qt},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,T(u,o))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,T(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,T(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=nu(t)}catch(i){return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:Ht.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?ou(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,u=!1,a=[],o=new Set,l=i.value,f=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;f=T(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(o.has(l))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);l==="other"&&(u=!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,T(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,r,n);if(p.err)return p;var m=this.tryParseArgumentClose(v);if(m.err)return m;a.push([l,{value:p.val,location:T(v,this.clonePosition())}]),o.add(l),this.bumpSpace(),s=this.parseIdentifierIfPossible(),l=s.value,f=s.location}return a.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,T(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!u?this.error(x.MISSING_OTHER_CLAUSE,T(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var s=!1,u=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)s=!0,u=u*10+(a-48),this.bump();else break}var o=T(i,this.clonePosition());return s?(u*=n,gu(u)?{val:u,err:null}:this.error(r,o)):this.error(t,o)},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=As(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(Yn(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ns(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e}();function hn(e){return e>=97&&e<=122||e>=65&&e<=90}function Tu(e){return hn(e)||e===47}function Su(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ns(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Hu(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 cn(e){e.forEach(function(t){if(delete t.location,gs(t)||ys(t))for(var r in t.options)delete t.options[r].location,cn(t.options[r].value);else ms(t)&&xs(t.style)||(_s(t)||bs(t))&&on(t.style)?delete t.style.location:Es(t)&&cn(t.children)})}function Au(e,t){t===void 0&&(t={}),t=gr({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new wu(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!=null&&t.captureLocation||cn(r.val),r.val}var At;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(At||(At={}));var Or=function(e){Nr(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),Kn=function(e){Nr(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('", "'),'"'),At.INVALID_VALUE,s)||this}return t}(Or),Bu=function(e){Nr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),At.INVALID_VALUE,i)||this}return t}(Or),Nu=function(e){Nr(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,'"'),At.MISSING_VALUE,n)||this}return t}(Or),W;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(W||(W={}));function Ou(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==W.literal||r.type!==W.literal?t.push(r):n.value+=r.value,t},[])}function Pu(e){return typeof e=="function"}function pr(e,t,r,n,i,s,u){if(e.length===1&&Wn(e[0]))return[{type:W.literal,value:e[0].value}];for(var a=[],o=0,l=e;o<l.length;o++){var f=l[o];if(Wn(f)){a.push({type:W.literal,value:f.value});continue}if(Ko(f)){typeof s=="number"&&a.push({type:W.literal,value:r.getNumberFormat(t).format(s)});continue}var d=f.value;if(!(i&&d in i))throw new Nu(d,u);var c=i[d];if(Qo(f)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),a.push({type:typeof c=="string"?W.literal:W.object,value:c});continue}if(_s(f)){var v=typeof f.style=="string"?n.date[f.style]:on(f.style)?f.style.parsedOptions:void 0;a.push({type:W.literal,value:r.getDateTimeFormat(t,v).format(c)});continue}if(bs(f)){var v=typeof f.style=="string"?n.time[f.style]:on(f.style)?f.style.parsedOptions:n.time.medium;a.push({type:W.literal,value:r.getDateTimeFormat(t,v).format(c)});continue}if(ms(f)){var v=typeof f.style=="string"?n.number[f.style]:xs(f.style)?f.style.parsedOptions:void 0;v&&v.scale&&(c=c*(v.scale||1)),a.push({type:W.literal,value:r.getNumberFormat(t,v).format(c)});continue}if(Es(f)){var p=f.children,m=f.value,A=i[m];if(!Pu(A))throw new Bu(m,"function",u);var y=pr(p,t,r,n,i,s),O=A(y.map(function(we){return we.value}));Array.isArray(O)||(O=[O]),a.push.apply(a,O.map(function(we){return{type:typeof we=="string"?W.literal:W.object,value:we}}))}if(gs(f)){var $=f.options[c]||f.options.other;if(!$)throw new Kn(f.value,c,Object.keys(f.options),u);a.push.apply(a,pr($.value,t,r,n,i));continue}if(ys(f)){var $=f.options["=".concat(c)];if(!$){if(!Intl.PluralRules)throw new Or(`Intl.PluralRules is not available in this environment.
3
+ Try polyfilling it using "@formatjs/intl-pluralrules"
4
+ `,At.MISSING_INTL_API,u);var Xe=r.getPluralRules(t,{type:f.pluralType}).select(c-(f.offset||0));$=f.options[Xe]||f.options.other}if(!$)throw new Kn(f.value,c,Object.keys(f.options),u);a.push.apply(a,pr($.value,t,r,n,i,c-(f.offset||0)));continue}}return Ou(a)}function Iu(e,t){return t?ge(ge(ge({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=ge(ge({},e[n]),t[n]||{}),r},{})):e}function Ru(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Iu(e[n],t[n]),r},ge({},e)):e}function Gr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Cu(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ur(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,Dr([void 0],r,!1)))},{cache:Gr(e.number),strategy:Fr.variadic}),getDateTimeFormat:Ur(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,Dr([void 0],r,!1)))},{cache:Gr(e.dateTime),strategy:Fr.variadic}),getPluralRules:Ur(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,Dr([void 0],r,!1)))},{cache:Gr(e.pluralRules),strategy:Fr.variadic})}}var Mu=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(o){var l=s.formatToParts(o);if(l.length===1)return l[0].value;var f=l.reduce(function(d,c){return!d.length||c.type!==W.literal||typeof d[d.length-1]!="string"?d.push(c.value):d[d.length-1]+=c.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(o){return pr(s.ast,s.locales,s.formatters,s.formats,o,void 0,s.message)},this.resolvedOptions=function(){var o;return{locale:((o=s.resolvedLocale)===null||o===void 0?void 0:o.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 u=i||{};u.formatters;var a=Vo(u,["formatters"]);this.ast=e.__parse(t,ge(ge({},a),{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=Ru(e.formats,n),this.formatters=i&&i.formatters||Cu(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!="undefined"){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=Au,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 Lu(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 $e={},$u=(e,t,r)=>r&&(t in $e||($e[t]={}),e in $e[t]||($e[t][e]=r),r),Os=(e,t)=>{if(t==null)return;if(t in $e&&e in $e[t])return $e[t][e];const r=Pr(t);for(let n=0;n<r.length;n++){const i=r[n],s=Du(i,e);if(s)return $u(e,t,s)}};let Hn;const Ot=Br({});function ku(e){return Hn[e]||null}function Ps(e){return e in Hn}function Du(e,t){if(!Ps(e))return null;const r=ku(e);return Lu(r,t)}function Uu(e){if(e==null)return;const t=Pr(e);for(let r=0;r<t.length;r++){const n=t[r];if(Ps(n))return n}}function Is(e,...t){delete $e[e],Ot.update(r=>(r[e]=Go.all([r[e]||{},...t]),r))}Nt([Ot],([e])=>Object.keys(e));Ot.subscribe(e=>Hn=e);const vr={};function Fu(e,t){vr[e].delete(t),vr[e].size===0&&delete vr[e]}function Rs(e){return vr[e]}function ju(e){return Pr(e).map(t=>{const r=Rs(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function dn(e){return e==null?!1:Pr(e).some(t=>{var r;return(r=Rs(t))==null?void 0:r.size})}function Gu(e,t){return Promise.all(t.map(n=>(Fu(e,n),n().then(i=>i.default||i)))).then(n=>Is(e,...n))}const Rt={};function Cs(e){if(!dn(e))return e in Rt?Rt[e]:Promise.resolve();const t=ju(e);return Rt[e]=Promise.all(t.map(([r,n])=>Gu(r,n))).then(()=>{if(dn(e))return Cs(e);delete Rt[e]}),Rt[e]}const Vu={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"}}},Xu={fallbackLocale:null,loadingDelay:200,formats:Vu,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Wu=Xu;function Bt(){return Wu}const Vr=Br(!1);var zu=Object.defineProperty,qu=Object.defineProperties,Zu=Object.getOwnPropertyDescriptors,ei=Object.getOwnPropertySymbols,Yu=Object.prototype.hasOwnProperty,Ju=Object.prototype.propertyIsEnumerable,ti=(e,t,r)=>t in e?zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qu=(e,t)=>{for(var r in t||(t={}))Yu.call(t,r)&&ti(e,r,t[r]);if(ei)for(var r of ei(t))Ju.call(t,r)&&ti(e,r,t[r]);return e},Ku=(e,t)=>qu(e,Zu(t));let pn;const yr=Br(null);function ri(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function Pr(e,t=Bt().fallbackLocale){const r=ri(e);return t?[...new Set([...r,...ri(t)])]:r}function nt(){return pn!=null?pn:void 0}yr.subscribe(e=>{pn=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const el=e=>{if(e&&Uu(e)&&dn(e)){const{loadingDelay:t}=Bt();let r;return typeof window!="undefined"&&nt()!=null&&t?r=window.setTimeout(()=>Vr.set(!0),t):Vr.set(!0),Cs(e).then(()=>{yr.set(e)}).finally(()=>{clearTimeout(r),Vr.set(!1)})}return yr.set(e)},tt=Ku(Qu({},yr),{set:el}),Ir=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var tl=Object.defineProperty,Er=Object.getOwnPropertySymbols,Ms=Object.prototype.hasOwnProperty,Ls=Object.prototype.propertyIsEnumerable,ni=(e,t,r)=>t in e?tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,An=(e,t)=>{for(var r in t||(t={}))Ms.call(t,r)&&ni(e,r,t[r]);if(Er)for(var r of Er(t))Ls.call(t,r)&&ni(e,r,t[r]);return e},Pt=(e,t)=>{var r={};for(var n in e)Ms.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Er)for(var n of Er(e))t.indexOf(n)<0&&Ls.call(e,n)&&(r[n]=e[n]);return r};const Vt=(e,t)=>{const{formats:r}=Bt();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},rl=Ir(e=>{var t=e,{locale:r,format:n}=t,i=Pt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Vt("number",n)),new Intl.NumberFormat(r,i)}),nl=Ir(e=>{var t=e,{locale:r,format:n}=t,i=Pt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Vt("date",n):Object.keys(i).length===0&&(i=Vt("date","short")),new Intl.DateTimeFormat(r,i)}),il=Ir(e=>{var t=e,{locale:r,format:n}=t,i=Pt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Vt("time",n):Object.keys(i).length===0&&(i=Vt("time","short")),new Intl.DateTimeFormat(r,i)}),sl=(e={})=>{var t=e,{locale:r=nt()}=t,n=Pt(t,["locale"]);return rl(An({locale:r},n))},al=(e={})=>{var t=e,{locale:r=nt()}=t,n=Pt(t,["locale"]);return nl(An({locale:r},n))},ol=(e={})=>{var t=e,{locale:r=nt()}=t,n=Pt(t,["locale"]);return il(An({locale:r},n))},ul=Ir((e,t=nt())=>new Mu(e,t,Bt().formats,{ignoreTag:Bt().ignoreTag})),ll=(e,t={})=>{var r,n,i,s;let u=t;typeof e=="object"&&(u=e,e=u.id);const{values:a,locale:o=nt(),default:l}=u;if(o==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Os(e,o);if(!f)f=(s=(i=(n=(r=Bt()).handleMissingMessage)==null?void 0:n.call(r,{locale:o,id:e,defaultValue:l}))!=null?i:l)!=null?s:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!a)return f;let d=f;try{d=ul(f,o).format(a)}catch(c){c instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,c.message)}return d},fl=(e,t)=>ol(t).format(e),hl=(e,t)=>al(t).format(e),cl=(e,t)=>sl(t).format(e),dl=(e,t=nt())=>Os(e,t),pl=Nt([tt,Ot],()=>ll);Nt([tt],()=>fl);Nt([tt],()=>hl);Nt([tt],()=>cl);Nt([tt,Ot],()=>dl);function vl({withLocale:e,translations:t}){tt.subscribe(r=>{r==null&&(Ot.set(t),tt.set(e))})}function ii(e,t){Is(e,t)}const ml={en:{requestRackBack:"Request Rackeback"},tr:{requestRackBack:"Request Rackeback"}},_l="RakebackClaimConfirmed";var bl=us('<div class="loyalty-rakeback-card svelte-7aljj5"><div class="loyalty-rakeback-card__content svelte-7aljj5"><span class="loyalty-rakeback-card__amount svelte-7aljj5"> </span> <button class="loyalty-rakeback-card__button svelte-7aljj5" type="button"> </button></div></div>'),gl=us('<div class="loyalty-rakeback-card svelte-7aljj5" aria-busy="true"><div class="loyalty-rakeback-card__content loyalty-rakeback-card__content--skeleton svelte-7aljj5"><span class="loyalty-rakeback-skeleton loyalty-rakeback-skeleton--amount svelte-7aljj5"></span> <span class="loyalty-rakeback-skeleton loyalty-rakeback-skeleton--button svelte-7aljj5"></span></div></div>');const yl={hash:"svelte-7aljj5",code:`.loyalty-rakeback-card.svelte-7aljj5 {padding:14px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-rakeback-card__content.svelte-7aljj5 {display:flex;align-items:baseline;gap:8px;justify-content:space-between;}.loyalty-rakeback-card__amount.svelte-7aljj5 {color:var(--text-default, #ffffff);font-size:16px;font-weight:700;line-height:140%;}.loyalty-rakeback-card__button.svelte-7aljj5 {height:37px;border-radius:6px;border-width:1px;padding:10px 16px;cursor:pointer;background:var(--button-secondary-bg-default, rgba(251, 251, 251, 0.1));border:solid 1px var(--button-secondary-border-default, rgba(251, 251, 251, 0.05));font-size:12px;font-weight:700;color:var(--button-secondary-text-default, #ffffff);}.loyalty-rakeback-card__button.svelte-7aljj5:disabled {opacity:0.4;cursor:default;}.loyalty-rakeback-skeleton.svelte-7aljj5 {display:block;border-radius:4px;background:linear-gradient(
5
+ 90deg,
6
+ var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
7
+ color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
8
+ var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
9
+ );background-size:400% 100%;
10
+ animation: svelte-7aljj5-loyalty-rakeback-shimmer 1.4s ease infinite;}.loyalty-rakeback-card__content--skeleton.svelte-7aljj5 {align-items:center;}.loyalty-rakeback-skeleton--amount.svelte-7aljj5 {width:120px;height:22px;}.loyalty-rakeback-skeleton--button.svelte-7aljj5 {width:110px;height:37px;border-radius:6px;}
11
+
12
+ @keyframes svelte-7aljj5-loyalty-rakeback-shimmer {
13
+ 0% {
14
+ background-position: 100% 50%;
15
+ }
16
+ 100% {
17
+ background-position: 0 50%;
18
+ }
19
+ }
20
+
21
+ @media (prefers-reduced-motion: reduce) {.loyalty-rakeback-skeleton.svelte-7aljj5 {
22
+ animation: none;}
23
+ }`};function $s(e,t){gi(t,!0),vo(e,yl);const r=()=>Ha(pl,"$_",n),[n,i]=Aa(),s=ar(t,"apiEndpoint",7,""),u=ar(t,"userSession",7,""),a=ar(t,"locale",7,""),o=ar(t,"translationUrl");vl({withLocale:a(),translations:{}}),Object.entries(ml).forEach(([E,k])=>{ii(E,k)});const l=()=>{let E=new URL(o(),window.location.href);fetch(E.href).then(k=>k.json()).then(k=>{Object.keys(k).forEach(Ie=>{ii(Ie,k[Ie])})}).catch(k=>{console.log("loyalty rakeback translation url err:",k)})};Wa(()=>{o()&&l()});let f=re(void 0),d=re(!1),c=re(!1),v=re(!1);const p=nr(()=>B(f)?xo(B(f).total.points<=0?0:B(f).total.points,2):"0.00"),m=nr(()=>{var E,k;return wo((k=(E=B(f))==null?void 0:E.currency)!=null?k:"",a())}),A=nr(()=>{var E;return!!((E=B(f))!=null&&E.claimable)}),y=nr(()=>B(d)),O=()=>it(this,null,function*(){if(!(!s()||!u())){G(v,!0);try{const E=yield yo({apiEndpoint:s(),userSession:u(),locale:a()});if(!E.rakebackWallet){G(d,!1),Ao();return}G(f,E.rakebackWallet,!0),G(d,!0)}catch(E){console.error("Failed to load rakeback info:",E)}finally{G(v,!1)}}}),$=()=>{!B(A)||B(c)||!B(f)||To(B(f).total.points)},Xe=()=>it(this,null,function*(){if(!(!s()||!u()||!B(f))){G(c,!0);try{yield Eo({apiEndpoint:s(),userSession:u(),locale:a()}),yield O(),So(B(f).total.points)}catch(E){console.error("Claim rakeback: ",E),Ho(E.message)}finally{G(c,!1)}}});Dn(()=>{s(),u(),a(),O()}),Dn(()=>{const E=k=>{var Ie;((Ie=k.data)==null?void 0:Ie.type)===_l&&Xe()};return window.addEventListener("message",E),()=>window.removeEventListener("message",E)});var we={get apiEndpoint(){return s()},set apiEndpoint(E=""){s(E),Ct()},get userSession(){return u()},set userSession(E=""){u(E),Ct()},get locale(){return a()},set locale(E=""){a(E),Ct()},get translationUrl(){return o()},set translationUrl(E){o(E),Ct()}},We=oo(),Qt=Fa(We);{var ks=E=>{var k=bl(),Ie=ir(k),Rr=ir(Ie),Fs=ir(Rr);rr(Rr);var Kt=ja(Rr,2),js=ir(Kt,!0);rr(Kt),rr(Ie),rr(k),Ja(Gs=>{var Bn,Nn;Vn(Fs,`${(Bn=B(p))!=null?Bn:""} ${(Nn=B(m))!=null?Nn:""}`),Kt.disabled=B(c)||!B(A),Vn(js,Gs)},[()=>r()("requestRackBack")]),no("click",Kt,$),cr(E,k)},Ds=E=>{var k=gl();cr(E,k)};po(Qt,E=>{B(y)?E(ks):B(v)&&E(Ds,1)})}cr(e,We);var Us=yi(we);return i(),Us}io(["click"]);customElements.define("loyalty-rakeback",go($s,{apiEndpoint:{},userSession:{},locale:{},translationUrl:{}},[],[]));exports.default=$s;