@gomusdev/web-components 3.1.1 → 3.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.
@@ -1,13 +1,14 @@
1
- var fv=Kt=>{throw TypeError(Kt)};var sP=(Kt,rr,mn)=>rr.has(Kt)||fv("Cannot "+mn);var hv=(Kt,rr,mn)=>(sP(Kt,rr,"read from private field"),mn?mn.call(Kt):rr.get(Kt)),pv=(Kt,rr,mn)=>rr.has(Kt)?fv("Cannot add the same private member more than once"):rr instanceof WeakSet?rr.add(Kt):rr.set(Kt,mn);(function(){"use strict";var sl;typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const rr=1,mn=2,bd=4,mv=8,gv=16,vv=1,yv=2,bv=4,_v=8,wv=16,kv=1,Sv=2,_d="[",yo="[!",ll="]",Bn={},ot=Symbol(),xv="http://www.w3.org/1999/xhtml",wd="@attach",ul=!1;var bo=Array.isArray,Ev=Array.prototype.indexOf,_i=Array.prototype.includes,_o=Array.from,wo=Object.keys,ko=Object.defineProperty,zr=Object.getOwnPropertyDescriptor,kd=Object.getOwnPropertyDescriptors,Sd=Object.prototype,Cv=Array.prototype,So=Object.getPrototypeOf,xd=Object.isExtensible;function us(t){return typeof t=="function"}const Fe=()=>{};function Ov(t){return t()}function cl(t){for(var e=0;e<t.length;e++)t[e]()}function Ed(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const ut=2,xo=4,cs=8,dl=1<<24,Lr=16,nr=32,gn=64,fl=128,Ht=512,at=1024,gt=2048,Zr=4096,Mt=8192,Vr=16384,Eo=32768,vn=65536,Cd=1<<17,Od=1<<18,Un=1<<19,Td=1<<20,jr=1<<25,qn=32768,hl=1<<21,pl=1<<22,yn=1<<23,wr=Symbol("$state"),ml=Symbol("legacy props"),Tv=Symbol(""),wi=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Co=3,bn=8;function Ad(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Av(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Dv(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Iv(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Pv(t){throw new Error("https://svelte.dev/e/effect_orphan")}function $v(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Mv(){throw new Error("https://svelte.dev/e/hydration_failed")}function Fv(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Nv(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Rv(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function zv(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Lv(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ds(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Zv(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Vv(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let we=!1;function vt(t){we=t}let Oe;function ct(t){if(t===null)throw ds(),Bn;return Oe=t}function Br(){return ct(or(Oe))}function T(t){if(we){if(or(Oe)!==null)throw ds(),Bn;Oe=t}}function yt(t=1){if(we){for(var e=t,r=Oe;e--;)r=or(r);Oe=r}}function Oo(t=!0){for(var e=0,r=Oe;;){if(r.nodeType===bn){var n=r.data;if(n===ll){if(e===0)return r;e-=1}else(n===_d||n===yo)&&(e+=1)}var i=or(r);t&&r.remove(),r=i}}function Dd(t){if(!t||t.nodeType!==bn)throw ds(),Bn;return t.data}function Id(t){return t===this.v}function jv(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Pd(t){return!jv(t,this.v)}let ki=!1,Bv=!1;function Uv(){ki=!0}const qv=[];function gl(t,e=!1,r=!1){return To(t,new Map,"",qv,null,r)}function To(t,e,r,n,i=null,s=!1){if(typeof t=="object"&&t!==null){var o=e.get(t);if(o!==void 0)return o;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(bo(t)){var a=Array(t.length);e.set(t,a),i!==null&&e.set(i,a);for(var l=0;l<t.length;l+=1){var u=t[l];l in t&&(a[l]=To(u,e,r,n,null,s))}return a}if(So(t)===Sd){a={},e.set(t,a),i!==null&&e.set(i,a);for(var c in t)a[c]=To(t[c],e,r,n,null,s);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!s)return To(t.toJSON(),e,r,n,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}let Ye=null;function Si(t){Ye=t}function $d(t){return vl().get(t)}function Wv(t,e){return vl().set(t,e),e}function Kv(t){return vl().has(t)}function X(t,e=!1,r){Ye={p:Ye,i:!1,c:null,e:null,s:t,x:null,l:ki&&!e?{s:null,u:null,$:[]}:null}}function ee(t){var e=Ye,r=e.e;if(r!==null){e.e=null;for(var n of r)af(n)}return t!==void 0&&(e.x=t),e.i=!0,Ye=e.p,t??{}}function fs(){return!ki||Ye!==null&&Ye.l===null}function vl(t){return Ye===null&&Ad(),Ye.c??=new Map(Hv(Ye)||void 0)}function Hv(t){let e=t.p;for(;e!==null;){const r=e.c;if(r!==null)return r;e=e.p}return null}let Wn=[];function Md(){var t=Wn;Wn=[],cl(t)}function Ft(t){if(Wn.length===0&&!hs){var e=Wn;queueMicrotask(()=>{e===Wn&&Md()})}Wn.push(t)}function Yv(){for(;Wn.length>0;)Md()}function Fd(t){var e=Ae;if(e===null)return Te.f|=yn,t;if((e.f&Eo)===0){if((e.f&fl)===0)throw t;e.b.error(t)}else xi(t,e)}function xi(t,e){for(;e!==null;){if((e.f&fl)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t}const Gv=-7169;function st(t,e){t.f=t.f&Gv|e}function yl(t){(t.f&Ht)!==0||t.deps===null?st(t,at):st(t,Zr)}function Nd(t){if(t!==null)for(const e of t)(e.f&ut)===0||(e.f&qn)===0||(e.f^=qn,Nd(e.deps))}function Rd(t,e,r){(t.f&gt)!==0?e.add(t):(t.f&Zr)!==0&&r.add(t),Nd(t.deps),st(t,at)}const Ao=new Set;let Me=null,Do=null,ir=null,Nt=[],Io=null,bl=!1,hs=!1;class Ur{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#i=null;#s=new Set;#a=new Set;skipped_effects=new Set;is_fork=!1;#o=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){Nt=[],this.apply();var r=[],n=[];for(const i of e)this.#l(i,r,n);if(this.is_deferred()){this.#u(n),this.#u(r);for(const i of this.skipped_effects)jd(i)}else{for(const i of this.#e)i();this.#e.clear(),this.#r===0&&this.#d(),Do=this,Me=null,Ld(n),Ld(r),Do=null,this.#i?.resolve()}ir=null}#l(e,r,n){e.f^=at;for(var i=e.first,s=null;i!==null;){var o=i.f,a=(o&(nr|gn))!==0,l=a&&(o&at)!==0,u=l||(o&Mt)!==0||this.skipped_effects.has(i);if(!u&&i.fn!==null){a?i.f^=at:s!==null&&(o&(xo|cs|dl))!==0?s.b.defer_effect(i):(o&xo)!==0?r.push(i):gs(i)&&((o&Lr)!==0&&this.#a.add(i),vs(i));var c=i.first;if(c!==null){i=c;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)d===s&&(s=null),i=d.next,d=d.parent}}#u(e){for(var r=0;r<e.length;r+=1)Rd(e[r],this.#s,this.#a)}capture(e,r){r!==ot&&!this.previous.has(e)&&this.previous.set(e,r),(e.f&yn)===0&&(this.current.set(e,e.v),ir?.set(e,e.v))}activate(){Me=this,this.apply()}deactivate(){Me===this&&(Me=null,ir=null)}flush(){if(this.activate(),Nt.length>0){if(zd(),Me!==null&&Me!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if(Ao.size>1){this.previous.clear();var e=ir,r=!0;for(const i of Ao){if(i===this){r=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(r&&l!==i.current.get(a))i.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var n=Nt;Nt=[];const a=new Set,l=new Map;for(const u of s)Zd(u,o,a,l);if(Nt.length>0){Me=i,i.apply();for(const u of Nt)i.#l(u,[],[]);i.deactivate()}Nt=n}}Me=null,ir=e}this.committed=!0,Ao.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),!this.#o&&(this.#o=!0,Ft(()=>{this.#o=!1,this.is_deferred()?Nt.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#s)this.#a.delete(e),st(e,gt),Wr(e);for(const e of this.#a)st(e,Zr),Wr(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=Ed()).promise}static ensure(){if(Me===null){const e=Me=new Ur;Ao.add(Me),hs||Ft(()=>{Me===e&&e.flush()})}return Me}apply(){}}function y(t){var e=hs;hs=!0;try{for(var r;;){if(Yv(),Nt.length===0&&(Me?.flush(),Nt.length===0))return Io=null,r;zd()}}finally{hs=e}}function zd(){bl=!0;var t=null;try{for(var e=0;Nt.length>0;){var r=Ur.ensure();if(e++>1e3){var n,i;Jv()}r.process(Nt),_n.clear()}}finally{bl=!1,Io=null}}function Jv(){try{$v()}catch(t){xi(t,Io)}}let qr=null;function Ld(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(Vr|Mt))===0&&gs(n)&&(qr=new Set,vs(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?ff(n):n.fn=null),qr?.size>0)){_n.clear();for(const i of qr){if((i.f&(Vr|Mt))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)qr.has(o)&&(qr.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(Vr|Mt))===0&&vs(l)}}qr.clear()}}qr=null}}function Zd(t,e,r,n){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const i of t.reactions){const s=i.f;(s&ut)!==0?Zd(i,e,r,n):(s&(pl|Lr))!==0&&(s&gt)===0&&Vd(i,e,n)&&(st(i,gt),Wr(i))}}function Vd(t,e,r){const n=r.get(t);if(n!==void 0)return n;if(t.deps!==null)for(const i of t.deps){if(_i.call(e,i))return!0;if((i.f&ut)!==0&&Vd(i,e,r))return r.set(i,!0),!0}return r.set(t,!1),!1}function Wr(t){for(var e=Io=t;e.parent!==null;){e=e.parent;var r=e.f;if(bl&&e===Ae&&(r&Lr)!==0&&(r&Od)===0)return;if((r&(gn|nr))!==0){if((r&at)===0)return;e.f^=at}}Nt.push(e)}function jd(t){if(!((t.f&nr)!==0&&(t.f&at)!==0)){st(t,at);for(var e=t.first;e!==null;)jd(e),e=e.next}}function _l(t){let e=0,r=wn(0),n;return()=>{Cl()&&(h(r),Ci(()=>(e===0&&(n=Ve(()=>t(()=>kr(r)))),e+=1,()=>{Ft(()=>{e-=1,e===0&&(n?.(),n=void 0,kr(r))})})))}}var Qv=vn|Un|fl;function Xv(t,e,r){new ey(t,e,r)}class ey{parent;is_pending=!1;#e;#t=we?Oe:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#u=null;#d=0;#c=0;#f=!1;#h=!1;#p=new Set;#m=new Set;#g=null;#v=_l(()=>(this.#g=wn(this.#d),()=>{this.#g=null}));constructor(e,r,n){this.#e=e,this.#r=r,this.#n=n,this.parent=Ae.b,this.is_pending=!!this.#r.pending,this.#i=ms(()=>{if(Ae.b=this,we){const s=this.#t;Br(),s.nodeType===bn&&s.data===yo?this.#b():(this.#y(),this.#c===0&&(this.is_pending=!1))}else{var i=this.#k();try{this.#s=Tt(()=>n(i))}catch(s){this.error(s)}this.#c>0?this.#w():this.is_pending=!1}return()=>{this.#u?.remove()}},Qv),we&&(this.#e=Oe)}#y(){try{this.#s=Tt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#b(){const e=this.#r.pending;e&&(this.#a=Tt(()=>e(this.#e)),Ft(()=>{var r=this.#k();this.#s=this.#_(()=>(Ur.ensure(),Tt(()=>this.#n(r)))),this.#c>0?this.#w():(Kn(this.#a,()=>{this.#a=null}),this.is_pending=!1)}))}#k(){var e=this.#e;return this.is_pending&&(this.#u=Ot(),this.#e.before(this.#u),e=this.#u),e}defer_effect(e){Rd(e,this.#p,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#_(e){var r=Ae,n=Te,i=Ye;Gt(this.#i),At(this.#i),Si(this.#i.ctx);try{return e()}catch(s){return Fd(s),null}finally{Gt(r),At(n),Si(i)}}#w(){const e=this.#r.pending;this.#s!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#u),mf(this.#s,this.#l)),this.#a===null&&(this.#a=Tt(()=>e(this.#e)))}#S(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e);return}if(this.#c+=e,this.#c===0){this.is_pending=!1;for(const r of this.#p)st(r,gt),Wr(r);for(const r of this.#m)st(r,Zr),Wr(r);this.#p.clear(),this.#m.clear(),this.#a&&Kn(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#S(e),this.#d+=e,!(!this.#g||this.#f)&&(this.#f=!0,Ft(()=>{this.#f=!1,this.#g&&Ei(this.#g,this.#d)}))}get_effect_pending(){return this.#v(),h(this.#g)}error(e){var r=this.#r.onerror;let n=this.#r.failed;if(this.#h||!r&&!n)throw e;this.#s&&(lt(this.#s),this.#s=null),this.#a&&(lt(this.#a),this.#a=null),this.#o&&(lt(this.#o),this.#o=null),we&&(ct(this.#t),yt(),ct(Oo()));var i=!1,s=!1;const o=()=>{if(i){Vv();return}i=!0,s&&Lv(),Ur.ensure(),this.#d=0,this.#o!==null&&Kn(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#_(()=>(this.#h=!1,Tt(()=>this.#n(this.#e)))),this.#c>0?this.#w():this.is_pending=!1};Ft(()=>{try{s=!0,r?.(e,o),s=!1}catch(a){xi(a,this.#i&&this.#i.parent)}n&&(this.#o=this.#_(()=>{Ur.ensure(),this.#h=!0;try{return Tt(()=>{n(this.#e,()=>e,()=>o)})}catch(a){return xi(a,this.#i.parent),null}finally{this.#h=!1}}))})}}function Bd(t,e,r,n){const i=fs()?ps:kl;var s=t.filter(f=>!f.settled);if(r.length===0&&s.length===0){n(e.map(i));return}var o=Me,a=Ae,l=ty(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(f=>f.promise)):null;function c(f){l();try{n(f)}catch(p){(a.f&Vr)===0&&xi(p,a)}o?.deactivate(),wl()}if(r.length===0){u.then(()=>c(e.map(i)));return}function d(){l(),Promise.all(r.map(f=>ry(f))).then(f=>c([...e.map(i),...f])).catch(f=>xi(f,a))}u?u.then(d):d()}function ty(){var t=Ae,e=Te,r=Ye,n=Me;return function(s=!0){Gt(t),At(e),Si(r),s&&n?.activate()}}function wl(){Gt(null),At(null),Si(null)}function ps(t){var e=ut|gt,r=Te!==null&&(Te.f&ut)!==0?Te:null;return Ae!==null&&(Ae.f|=Un),{ctx:Ye,deps:null,effects:null,equals:Id,f:e,fn:t,reactions:null,rv:0,v:ot,wv:0,parent:r??Ae,ac:null}}function ry(t,e,r){let n=Ae;n===null&&Av();var i=n.b,s=void 0,o=wn(ot),a=!Te,l=new Map;return uy(()=>{var u=Ed();s=u.promise;try{Promise.resolve(t()).then(u.resolve,u.reject).then(()=>{c===Me&&c.committed&&c.deactivate(),wl()})}catch(p){u.reject(p),wl()}var c=Me;if(a){var d=i.is_rendered();i.update_pending_count(1),c.increment(d),l.get(c)?.reject(wi),l.delete(c),l.set(c,u)}const f=(p,v=void 0)=>{if(c.activate(),v)v!==wi&&(o.f|=yn,Ei(o,v));else{(o.f&yn)!==0&&(o.f^=yn),Ei(o,p);for(const[g,m]of l){if(l.delete(g),g===c)break;m.reject(wi)}}a&&(i.update_pending_count(-1),c.decrement(d))};u.promise.then(f,p=>f(null,p||"unknown"))}),Mo(()=>{for(const u of l.values())u.reject(wi)}),new Promise(u=>{function c(d){function f(){d===s?u(o):c(s)}d.then(f,f)}c(s)})}function E(t){const e=ps(t);return vf(e),e}function kl(t){const e=ps(t);return e.equals=Pd,e}function Ud(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)lt(e[r])}}function ny(t){for(var e=t.parent;e!==null;){if((e.f&ut)===0)return(e.f&Vr)===0?e:null;e=e.parent}return null}function Sl(t){var e,r=Ae;Gt(ny(t));try{t.f&=~qn,Ud(t),e=kf(t)}finally{Gt(r)}return e}function qd(t){var e=Sl(t);if(!t.equals(e)&&(t.wv=_f(),(!Me?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){st(t,at);return}kn||(ir!==null?(Cl()||Me?.is_fork)&&ir.set(t,e):yl(t))}let xl=new Set;const _n=new Map;let Wd=!1;function wn(t,e){var r={f:0,v:t,reactions:null,equals:Id,rv:0,wv:0};return r}function ie(t,e){const r=wn(t);return vf(r),r}function Kd(t,e=!1,r=!0){const n=wn(t);return e||(n.equals=Pd),ki&&r&&Ye!==null&&Ye.l!==null&&(Ye.l.s??=[]).push(n),n}function I(t,e,r=!1){Te!==null&&(!ar||(Te.f&Cd)!==0)&&fs()&&(Te.f&(ut|Lr|pl|Cd))!==0&&(Jt===null||!_i.call(Jt,t))&&zv();let n=r?Ne(e):e;return Ei(t,n)}function Ei(t,e){if(!t.equals(e)){var r=t.v;kn?_n.set(t,e):_n.set(t,r),t.v=e;var n=Ur.ensure();if(n.capture(t,r),(t.f&ut)!==0){const i=t;(t.f&gt)!==0&&Sl(i),yl(i)}t.wv=_f(),Hd(t,gt),fs()&&Ae!==null&&(Ae.f&at)!==0&&(Ae.f&(nr|gn))===0&&(Qt===null?dy([t]):Qt.push(t)),!n.is_fork&&xl.size>0&&!Wd&&iy()}return e}function iy(){Wd=!1;for(const t of xl)(t.f&at)!==0&&st(t,Zr),gs(t)&&vs(t);xl.clear()}function kr(t){I(t,t.v+1)}function Hd(t,e){var r=t.reactions;if(r!==null)for(var n=fs(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;if(!(!n&&o===Ae)){var l=(a&gt)===0;if(l&&st(o,e),(a&ut)!==0){var u=o;ir?.delete(u),(a&qn)===0&&(a&Ht&&(o.f|=qn),Hd(u,Zr))}else l&&((a&Lr)!==0&&qr!==null&&qr.add(o),Wr(o))}}}function Ne(t){if(typeof t!="object"||t===null||wr in t)return t;const e=So(t);if(e!==Sd&&e!==Cv)return t;var r=new Map,n=bo(t),i=ie(0),s=Kr,o=a=>{if(Kr===s)return a();var l=Te,u=Kr;At(null),bf(s);var c=a();return At(l),bf(u),c};return n&&r.set("length",ie(t.length)),new Proxy(t,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Nv();var c=r.get(l);return c===void 0?c=o(()=>{var d=ie(u.value);return r.set(l,d),d}):I(c,u.value,!0),!0},deleteProperty(a,l){var u=r.get(l);if(u===void 0){if(l in a){const c=o(()=>ie(ot));r.set(l,c),kr(i)}}else I(u,ot),kr(i);return!0},get(a,l,u){if(l===wr)return t;var c=r.get(l),d=l in a;if(c===void 0&&(!d||zr(a,l)?.writable)&&(c=o(()=>{var p=Ne(d?a[l]:ot),v=ie(p);return v}),r.set(l,c)),c!==void 0){var f=h(c);return f===ot?void 0:f}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var c=r.get(l);c&&(u.value=h(c))}else if(u===void 0){var d=r.get(l),f=d?.v;if(d!==void 0&&f!==ot)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return u},has(a,l){if(l===wr)return!0;var u=r.get(l),c=u!==void 0&&u.v!==ot||Reflect.has(a,l);if(u!==void 0||Ae!==null&&(!c||zr(a,l)?.writable)){u===void 0&&(u=o(()=>{var f=c?Ne(a[l]):ot,p=ie(f);return p}),r.set(l,u));var d=h(u);if(d===ot)return!1}return c},set(a,l,u,c){var d=r.get(l),f=l in a;if(n&&l==="length")for(var p=u;p<d.v;p+=1){var v=r.get(p+"");v!==void 0?I(v,ot):p in a&&(v=o(()=>ie(ot)),r.set(p+"",v))}if(d===void 0)(!f||zr(a,l)?.writable)&&(d=o(()=>ie(void 0)),I(d,Ne(u)),r.set(l,d));else{f=d.v!==ot;var g=o(()=>Ne(u));I(d,g)}var m=Reflect.getOwnPropertyDescriptor(a,l);if(m?.set&&m.set.call(c,u),!f){if(n&&typeof l=="string"){var _=r.get("length"),k=Number(l);Number.isInteger(k)&&k>=_.v&&I(_,k+1)}kr(i)}return!0},ownKeys(a){h(i);var l=Reflect.ownKeys(a).filter(d=>{var f=r.get(d);return f===void 0||f.v!==ot});for(var[u,c]of r)c.v!==ot&&!(u in a)&&l.push(u);return l},setPrototypeOf(){Rv()}})}function Yd(t){try{if(t!==null&&typeof t=="object"&&wr in t)return t[wr]}catch{}return t}function Gd(t,e){return Object.is(Yd(t),Yd(e))}var Jd,Qd,Xd,ef;function El(){if(Jd===void 0){Jd=window,Qd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Xd=zr(e,"firstChild").get,ef=zr(e,"nextSibling").get,xd(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),xd(r)&&(r.__t=void 0)}}function Ot(t=""){return document.createTextNode(t)}function sr(t){return Xd.call(t)}function or(t){return ef.call(t)}function $(t,e){if(!we)return sr(t);var r=sr(Oe);if(r===null)r=Oe.appendChild(Ot());else if(e&&r.nodeType!==Co){var n=Ot();return r?.before(n),ct(n),n}return ct(r),r}function R(t,e=!1){if(!we){var r=sr(t);return r instanceof Comment&&r.data===""?or(r):r}if(e&&Oe?.nodeType!==Co){var n=Ot();return Oe?.before(n),ct(n),n}return Oe}function J(t,e=1,r=!1){let n=we?Oe:t;for(var i;e--;)i=n,n=or(n);if(!we)return n;if(r&&n?.nodeType!==Co){var s=Ot();return n===null?i?.after(s):n.before(s),ct(s),s}return ct(n),n}function tf(t){t.textContent=""}function rf(){return!1}function sy(t=""){return document.createComment(t)}function oy(t,e){if(e){const r=document.body;t.autofocus=!0,Ft(()=>{document.activeElement===r&&t.focus()})}}let nf=!1;function sf(){nf||(nf=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Po(t){var e=Te,r=Ae;At(null),Gt(null);try{return t()}finally{At(e),Gt(r)}}function $o(t,e,r,n=r){t.addEventListener(e,()=>Po(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),sf()}function of(t){Ae===null&&(Te===null&&Pv(),Iv()),kn&&Dv()}function ay(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Yt(t,e,r){var n=Ae;n!==null&&(n.f&Mt)!==0&&(t|=Mt);var i={ctx:Ye,deps:null,nodes:null,f:t|gt|Ht,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{vs(i),i.f|=Eo}catch(a){throw lt(i),a}else e!==null&&Wr(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Un)===0&&(s=s.first,(t&Lr)!==0&&(t&vn)!==0&&s!==null&&(s.f|=vn)),s!==null&&(s.parent=n,n!==null&&ay(s,n),Te!==null&&(Te.f&ut)!==0&&(t&gn)===0)){var o=Te;(o.effects??=[]).push(s)}return i}function Cl(){return Te!==null&&!ar}function Mo(t){const e=Yt(cs,null,!1);return st(e,at),e.teardown=t,e}function pe(t){of();var e=Ae.f,r=!Te&&(e&nr)!==0&&(e&Eo)===0;if(r){var n=Ye;(n.e??=[]).push(t)}else return af(t)}function af(t){return Yt(xo|Td,t,!1)}function Ol(t){return of(),Yt(cs|Td,t,!0)}function Fo(t){Ur.ensure();const e=Yt(gn|Un,t,!0);return()=>{lt(e)}}function ly(t){Ur.ensure();const e=Yt(gn|Un,t,!0);return(r={})=>new Promise(n=>{r.outro?Kn(e,()=>{lt(e),n(void 0)}):(lt(e),n(void 0))})}function No(t){return Yt(xo,t,!1)}function uy(t){return Yt(pl|Un,t,!0)}function Ci(t,e=0){return Yt(cs|e,t,!0)}function oe(t,e=[],r=[],n=[]){Bd(n,e,r,i=>{Yt(cs,()=>t(...i.map(h)),!0)})}function ms(t,e=0){var r=Yt(Lr|e,t,!0);return r}function lf(t,e=0){var r=Yt(dl|e,t,!0);return r}function Tt(t){return Yt(nr|Un,t,!0)}function uf(t){var e=t.teardown;if(e!==null){const r=kn,n=Te;gf(!0),At(null);try{e.call(null)}finally{gf(r),At(n)}}}function cf(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&Po(()=>{i.abort(wi)});var n=r.next;(r.f&gn)!==0?r.parent=null:lt(r,e),r=n}}function cy(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&nr)===0&&lt(e),e=r}}function lt(t,e=!0){var r=!1;(e||(t.f&Od)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(df(t.nodes.start,t.nodes.end),r=!0),cf(t,e&&!r),zo(t,0),st(t,Vr);var n=t.nodes&&t.nodes.t;if(n!==null)for(const s of n)s.stop();uf(t);var i=t.parent;i!==null&&i.first!==null&&ff(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function df(t,e){for(;t!==null;){var r=t===e?null:or(t);t.remove(),t=r}}function ff(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Kn(t,e,r=!0){var n=[];hf(t,n,!0);var i=()=>{r&&lt(t),e&&e()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function hf(t,e,r){if((t.f&Mt)===0){t.f^=Mt;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var s=i.next,o=(i.f&vn)!==0||(i.f&nr)!==0&&(t.f&Lr)!==0;hf(i,e,o?r:!1),i=s}}}function Tl(t){pf(t,!0)}function pf(t,e){if((t.f&Mt)!==0){t.f^=Mt,(t.f&at)===0&&(st(t,gt),Wr(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&vn)!==0||(r.f&nr)!==0;pf(r,i?e:!1),r=n}var s=t.nodes&&t.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function mf(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:or(r);e.append(r),r=i}}let Ro=!1,kn=!1;function gf(t){kn=t}let Te=null,ar=!1;function At(t){Te=t}let Ae=null;function Gt(t){Ae=t}let Jt=null;function vf(t){Te!==null&&(Jt===null?Jt=[t]:Jt.push(t))}let Dt=null,Rt=0,Qt=null;function dy(t){Qt=t}let yf=1,Hn=0,Kr=Hn;function bf(t){Kr=t}function _f(){return++yf}function gs(t){var e=t.f;if((e&gt)!==0)return!0;if(e&ut&&(t.f&=~qn),(e&Zr)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(gs(s)&&qd(s),s.wv>t.wv)return!0}(e&Ht)!==0&&ir===null&&st(t,at)}return!1}function wf(t,e,r=!0){var n=t.reactions;if(n!==null&&!(Jt!==null&&_i.call(Jt,t)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&ut)!==0?wf(s,e,!1):e===s&&(r?st(s,gt):(s.f&at)!==0&&st(s,Zr),Wr(s))}}function kf(t){var e=Dt,r=Rt,n=Qt,i=Te,s=Jt,o=Ye,a=ar,l=Kr,u=t.f;Dt=null,Rt=0,Qt=null,Te=(u&(nr|gn))===0?t:null,Jt=null,Si(t.ctx),ar=!1,Kr=++Hn,t.ac!==null&&(Po(()=>{t.ac.abort(wi)}),t.ac=null);try{t.f|=hl;var c=t.fn,d=c(),f=t.deps,p=Me?.is_fork;if(Dt!==null){var v;if(p||zo(t,Rt),f!==null&&Rt>0)for(f.length=Rt+Dt.length,v=0;v<Dt.length;v++)f[Rt+v]=Dt[v];else t.deps=f=Dt;if(Cl()&&(t.f&Ht)!==0)for(v=Rt;v<f.length;v++)(f[v].reactions??=[]).push(t)}else!p&&f!==null&&Rt<f.length&&(zo(t,Rt),f.length=Rt);if(fs()&&Qt!==null&&!ar&&f!==null&&(t.f&(ut|Zr|gt))===0)for(v=0;v<Qt.length;v++)wf(Qt[v],t);if(i!==null&&i!==t){if(Hn++,i.deps!==null)for(let g=0;g<r;g+=1)i.deps[g].rv=Hn;if(e!==null)for(const g of e)g.rv=Hn;Qt!==null&&(n===null?n=Qt:n.push(...Qt))}return(t.f&yn)!==0&&(t.f^=yn),d}catch(g){return Fd(g)}finally{t.f^=hl,Dt=e,Rt=r,Qt=n,Te=i,Jt=s,Si(o),ar=a,Kr=l}}function fy(t,e){let r=e.reactions;if(r!==null){var n=Ev.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&ut)!==0&&(Dt===null||!_i.call(Dt,e))){var s=e;(s.f&Ht)!==0&&(s.f^=Ht,s.f&=~qn),yl(s),Ud(s),zo(s,0)}}function zo(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)fy(t,r[n])}function vs(t){var e=t.f;if((e&Vr)===0){st(t,at);var r=Ae,n=Ro;Ae=t,Ro=!0;try{(e&(Lr|dl))!==0?cy(t):cf(t),uf(t);var i=kf(t);t.teardown=typeof i=="function"?i:null,t.wv=yf;var s;ul&&Bv&&(t.f&gt)!==0&&t.deps}finally{Ro=n,Ae=r}}}async function Sf(){await Promise.resolve(),y()}function h(t){var e=t.f,r=(e&ut)!==0;if(Te!==null&&!ar){var n=Ae!==null&&(Ae.f&Vr)!==0;if(!n&&(Jt===null||!_i.call(Jt,t))){var i=Te.deps;if((Te.f&hl)!==0)t.rv<Hn&&(t.rv=Hn,Dt===null&&i!==null&&i[Rt]===t?Rt++:Dt===null?Dt=[t]:Dt.push(t));else{(Te.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[Te]:_i.call(s,Te)||s.push(Te)}}}if(kn&&_n.has(t))return _n.get(t);if(r){var o=t;if(kn){var a=o.v;return((o.f&at)===0&&o.reactions!==null||Ef(o))&&(a=Sl(o)),_n.set(o,a),a}var l=(o.f&Ht)===0&&!ar&&Te!==null&&(Ro||(Te.f&Ht)!==0),u=o.deps===null;gs(o)&&(l&&(o.f|=Ht),qd(o)),l&&!u&&xf(o)}if(ir?.has(t))return ir.get(t);if((t.f&yn)!==0)throw t.v;return t.v}function xf(t){if(t.deps!==null){t.f|=Ht;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&ut)!==0&&(e.f&Ht)===0&&xf(e)}}function Ef(t){if(t.v===ot)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(_n.has(e)||(e.f&ut)!==0&&Ef(e))return!0;return!1}function Ve(t){var e=ar;try{return ar=!0,t()}finally{ar=e}}function hy(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(wr in t)Al(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&wr in r&&Al(r)}}}function Al(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{Al(t[n],e)}catch{}const r=So(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=kd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}const Cf=new Set,Dl=new Set;function Il(t,e,r,n={}){function i(s){if(n.capture||ys.call(e,s),!s.cancelBubble)return Po(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Ft(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function dt(t,e,r,n={}){var i=Il(e,t,r,n);return()=>{t.removeEventListener(e,i,n)}}function Pl(t,e,r,n,i){var s={capture:n,passive:i},o=Il(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Mo(()=>{e.removeEventListener(t,o,s)})}function Sr(t){for(var e=0;e<t.length;e++)Cf.add(t[e]);for(var r of Dl)r(t)}let Of=null;function ys(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;Of=t;var o=0,a=Of===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||t.target,s!==e){ko(t,"currentTarget",{configurable:!0,get(){return s||r}});var c=Te,d=Ae;At(null),Gt(null);try{for(var f,p=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var g=s["__"+n];g!=null&&(!s.disabled||t.target===s)&&g.call(s,t)}catch(m){f?p.push(m):f=m}if(t.cancelBubble||v===e||v===null)break;s=v}if(f){for(let m of p)queueMicrotask(()=>{throw m});throw f}}finally{t.__root=e,delete t.currentTarget,At(c),Gt(d)}}}function Tf(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function xr(t,e){var r=Ae;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function V(t,e){var r=(e&kv)!==0,n=(e&Sv)!==0,i,s=!t.startsWith("<!>");return()=>{if(we)return xr(Oe,null),Oe;i===void 0&&(i=Tf(s?t:"<!>"+t),r||(i=sr(i)));var o=n||Qd?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=sr(o),l=o.lastChild;xr(a,l)}else xr(o,o);return o}}function It(t=""){if(!we){var e=Ot(t+"");return xr(e,e),e}var r=Oe;return r.nodeType!==Co&&(r.before(r=Ot()),ct(r)),xr(r,r),r}function q(){if(we)return xr(Oe,null),Oe;var t=document.createDocumentFragment(),e=document.createComment(""),r=Ot();return t.append(e,r),xr(e,r),t}function w(t,e){if(we){var r=Ae;((r.f&Eo)===0||r.nodes.end===null)&&(r.nodes.end=Oe),Br();return}t!==null&&t.before(e)}function ft(){if(we&&Oe&&Oe.nodeType===bn&&Oe.textContent?.startsWith("$")){const t=Oe.textContent.substring(1);return Br(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function py(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const my=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function gy(t){return my.includes(t)}const vy={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function yy(t){return t=t.toLowerCase(),vy[t]??t}const by=["touchstart","touchmove"];function _y(t){return by.includes(t)}function te(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Af(t,e){return Df(t,e)}function wy(t,e){El(),e.intro=e.intro??!1;const r=e.target,n=we,i=Oe;try{for(var s=sr(r);s&&(s.nodeType!==bn||s.data!==_d);)s=or(s);if(!s)throw Bn;vt(!0),ct(s);const o=Df(t,{...e,anchor:s});return vt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Bn&&console.warn("Failed to hydrate: ",o),e.recover===!1&&Mv(),El(),tf(r),vt(!1),Af(t,e)}finally{vt(n),ct(i)}}const Oi=new Map;function Df(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){El();var a=new Set,l=d=>{for(var f=0;f<d.length;f++){var p=d[f];if(!a.has(p)){a.add(p);var v=_y(p);e.addEventListener(p,ys,{passive:v});var g=Oi.get(p);g===void 0?(document.addEventListener(p,ys,{passive:v}),Oi.set(p,1)):Oi.set(p,g+1)}}};l(_o(Cf)),Dl.add(l);var u=void 0,c=ly(()=>{var d=r??e.appendChild(Ot());return Xv(d,{pending:()=>{}},f=>{if(s){X({});var p=Ye;p.c=s}if(i&&(n.$$events=i),we&&xr(f,null),u=t(f,n)||{},we&&(Ae.nodes.end=Oe,Oe===null||Oe.nodeType!==bn||Oe.data!==ll))throw ds(),Bn;s&&ee()}),()=>{for(var f of a){e.removeEventListener(f,ys);var p=Oi.get(f);--p===0?(document.removeEventListener(f,ys),Oi.delete(f)):Oi.set(f,p)}Dl.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return $l.set(u,c),u}let $l=new WeakMap;function ky(t,e){const r=$l.get(t);return r?($l.delete(t),r(e)):Promise.resolve()}class Ml{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,r=!0){this.anchor=e,this.#i=r}#s=()=>{var e=Me;if(this.#e.has(e)){var r=this.#e.get(e),n=this.#t.get(r);if(n)Tl(n),this.#n.delete(r);else{var i=this.#r.get(r);i&&(this.#t.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===e)break;const a=this.#r.get(o);a&&(lt(a.effect),this.#r.delete(o))}for(const[s,o]of this.#t){if(s===r||this.#n.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var u=document.createDocumentFragment();mf(o,u),u.append(Ot()),this.#r.set(s,{effect:o,fragment:u})}else lt(o);this.#n.delete(s),this.#t.delete(s)};this.#i||!n?(this.#n.add(s),Kn(o,a,!1)):a()}}};#a=e=>{this.#e.delete(e);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(lt(i.effect),this.#r.delete(n))};ensure(e,r){var n=Me,i=rf();if(r&&!this.#t.has(e)&&!this.#r.has(e))if(i){var s=document.createDocumentFragment(),o=Ot();s.append(o),this.#r.set(e,{effect:Tt(()=>r(o)),fragment:s})}else this.#t.set(e,Tt(()=>r(this.anchor)));if(this.#e.set(n,e),i){for(const[a,l]of this.#t)a===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[a,l]of this.#r)a===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#s),n.ondiscard(this.#a)}else we&&(this.anchor=Oe),this.#s()}}function ve(t,e,...r){var n=new Ml(t);ms(()=>{const i=e()??null;n.ensure(i,i&&(s=>i(s,...r)))},vn)}function Hr(t){Ye===null&&Ad(),ki&&Ye.l!==null?Sy(Ye).m.push(t):pe(()=>{const e=Ve(t);if(typeof e=="function")return e})}function Sy(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function xy(){return Symbol(wd)}function ae(t,e,r=!1){we&&Br();var n=new Ml(t),i=r?vn:0;function s(o,a){if(we){const u=Dd(t)===yo;if(o===u){var l=Oo();ct(l),n.anchor=l,vt(!1),n.ensure(o,a),vt(!0);return}}n.ensure(o,a)}ms(()=>{var o=!1;e((a,l=!0)=>{o=!0,s(l,a)}),o||s(!1,null)},i)}function Er(t,e){return e}function Ey(t,e,r){for(var n=[],i=e.length,s,o=e.length,a=0;a<i;a++){let d=e[a];Kn(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var f=t.outrogroups;Fl(_o(s.done)),f.delete(s),f.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=n.length===0&&r!==null;if(l){var u=r,c=u.parentNode;tf(c),c.append(u),t.items.clear()}Fl(e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(s)}function Fl(t,e=!0){for(var r=0;r<t.length;r++)lt(t[r],e)}var If;function Le(t,e,r,n,i,s=null){var o=t,a=new Map,l=(e&bd)!==0;if(l){var u=t;o=we?ct(sr(u)):u.appendChild(Ot())}we&&Br();var c=null,d=kl(()=>{var _=r();return bo(_)?_:_==null?[]:_o(_)}),f,p=!0;function v(){m.fallback=c,Cy(m,f,o,e,n),c!==null&&(f.length===0?(c.f&jr)===0?Tl(c):(c.f^=jr,_s(c,null,o)):Kn(c,()=>{c=null}))}var g=ms(()=>{f=h(d);var _=f.length;let k=!1;if(we){var D=Dd(o)===yo;D!==(_===0)&&(o=Oo(),ct(o),vt(!1),k=!0)}for(var O=new Set,P=Me,C=rf(),A=0;A<_;A+=1){we&&Oe.nodeType===bn&&Oe.data===ll&&(o=Oe,k=!0,vt(!1));var N=f[A],M=n(N,A),j=p?null:a.get(M);j?(j.v&&Ei(j.v,N),j.i&&Ei(j.i,A),C&&P.skipped_effects.delete(j.e)):(j=Oy(a,p?o:If??=Ot(),N,M,A,i,e,r),p||(j.e.f|=jr),a.set(M,j)),O.add(M)}if(_===0&&s&&!c&&(p?c=Tt(()=>s(o)):(c=Tt(()=>s(If??=Ot())),c.f|=jr)),we&&_>0&&ct(Oo()),!p)if(C){for(const[se,z]of a)O.has(se)||P.skipped_effects.add(z.e);P.oncommit(v),P.ondiscard(()=>{})}else v();k&&vt(!0),h(d)}),m={effect:g,items:a,outrogroups:null,fallback:c};p=!1,we&&(o=Oe)}function bs(t){for(;t!==null&&(t.f&nr)===0;)t=t.next;return t}function Cy(t,e,r,n,i){var s=(n&mv)!==0,o=e.length,a=t.items,l=bs(t.effect.first),u,c=null,d,f=[],p=[],v,g,m,_;if(s)for(_=0;_<o;_+=1)v=e[_],g=i(v,_),m=a.get(g).e,(m.f&jr)===0&&(m.nodes?.a?.measure(),(d??=new Set).add(m));for(_=0;_<o;_+=1){if(v=e[_],g=i(v,_),m=a.get(g).e,t.outrogroups!==null)for(const j of t.outrogroups)j.pending.delete(m),j.done.delete(m);if((m.f&jr)!==0)if(m.f^=jr,m===l)_s(m,null,r);else{var k=c?c.next:l;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Sn(t,c,m),Sn(t,m,k),_s(m,k,r),c=m,f=[],p=[],l=bs(c.next);continue}if((m.f&Mt)!==0&&(Tl(m),s&&(m.nodes?.a?.unfix(),(d??=new Set).delete(m))),m!==l){if(u!==void 0&&u.has(m)){if(f.length<p.length){var D=p[0],O;c=D.prev;var P=f[0],C=f[f.length-1];for(O=0;O<f.length;O+=1)_s(f[O],D,r);for(O=0;O<p.length;O+=1)u.delete(p[O]);Sn(t,P.prev,C.next),Sn(t,c,P),Sn(t,C,D),l=D,c=C,_-=1,f=[],p=[]}else u.delete(m),_s(m,l,r),Sn(t,m.prev,m.next),Sn(t,m,c===null?t.effect.first:c.next),Sn(t,c,m),c=m;continue}for(f=[],p=[];l!==null&&l!==m;)(u??=new Set).add(l),p.push(l),l=bs(l.next);if(l===null)continue}(m.f&jr)===0&&f.push(m),c=m,l=bs(m.next)}if(t.outrogroups!==null){for(const j of t.outrogroups)j.pending.size===0&&(Fl(_o(j.done)),t.outrogroups?.delete(j));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||u!==void 0){var A=[];if(u!==void 0)for(m of u)(m.f&Mt)===0&&A.push(m);for(;l!==null;)(l.f&Mt)===0&&l!==t.fallback&&A.push(l),l=bs(l.next);var N=A.length;if(N>0){var M=(n&bd)!==0&&o===0?r:null;if(s){for(_=0;_<N;_+=1)A[_].nodes?.a?.measure();for(_=0;_<N;_+=1)A[_].nodes?.a?.fix()}Ey(t,A,M)}}s&&Ft(()=>{if(d!==void 0)for(m of d)m.nodes?.a?.apply()})}function Oy(t,e,r,n,i,s,o,a){var l=(o&rr)!==0?(o&gv)===0?Kd(r,!1,!1):wn(r):null,u=(o&mn)!==0?wn(i):null;return{v:l,i:u,e:Tt(()=>(s(e,l??r,u??i,a),()=>{t.delete(n)}))}}function _s(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,s=e&&(e.f&jr)===0?e.nodes.start:r;n!==null;){var o=or(n);if(s.before(n),n===i)return;n=o}}function Sn(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function Ty(t,e,r=!1,n=!1,i=!1){var s=t,o="";oe(()=>{var a=Ae;if(o===(o=e()??"")){we&&Br();return}if(a.nodes!==null&&(df(a.nodes.start,a.nodes.end),a.nodes=null),o!==""){if(we){Oe.data;for(var l=Br(),u=l;l!==null&&(l.nodeType!==bn||l.data!=="");)u=l,l=or(l);if(l===null)throw ds(),Bn;xr(Oe,u),s=ct(l);return}var c=o+"";r?c=`<svg>${c}</svg>`:n&&(c=`<math>${c}</math>`);var d=Tf(c);if((r||n)&&(d=sr(d)),xr(sr(d),d.lastChild),r||n)for(;sr(d);)s.before(sr(d));else s.before(d)}})}function Ay(t,e,r,n,i){we&&Br();var s=e.$$slots?.[r],o=!1;s===!0&&(s=e.children,o=!0),s===void 0||s(t,o?()=>n:n)}function Pe(t,e,r){we&&Br();var n=new Ml(t);ms(()=>{var i=e()??null;n.ensure(i,i&&(s=>r(s,i)))},vn)}function Dy(t,e){var r=void 0,n;lf(()=>{r!==(r=e())&&(n&&(lt(n),n=null),r&&(n=Tt(()=>{No(()=>r(t))})))})}function Pf(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Pf(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Lo(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Pf(t))&&(n&&(n+=" "),n+=e);return n}function Yr(t){return typeof t=="object"?Lo(t):t??""}const $f=[...`
3
- \r\f \v\uFEFF`];function Iy(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||$f.includes(n[o-1]))&&(a===n.length||$f.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function Mf(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Nl(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Py(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Nl)),i&&l.push(...Object.keys(i).map(Nl));var u=0,c=-1;const g=t.length;for(var d=0;d<g;d++){var f=t[d];if(a?f==="/"&&t[d-1]==="*"&&(a=!1):s?s===f&&(s=!1):f==="/"&&t[d+1]==="*"?a=!0:f==='"'||f==="'"?s=f:f==="("?o++:f===")"&&o--,!a&&s===!1&&o===0){if(f===":"&&c===-1)c=d;else if(f===";"||d===g-1){if(c!==-1){var p=Nl(t.substring(u,c).trim());if(!l.includes(p)){f!==";"&&d++;var v=t.substring(u,d).trim();r+=" "+v+";"}}u=d+1,c=-1}}}}return n&&(r+=Mf(n)),i&&(r+=Mf(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function zt(t,e,r,n,i,s){var o=t.__className;if(we||o!==r||o===void 0){var a=Iy(r,n,s);(!we||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(s&&i!==s)for(var l in s){var u=!!s[l];(i==null||u!==!!i[l])&&t.classList.toggle(l,u)}return s}function Rl(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function $y(t,e,r,n){var i=t.__style;if(we||i!==e){var s=Py(e,n);(!we||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}else n&&(Array.isArray(n)?(Rl(t,r?.[0],n[0]),Rl(t,r?.[1],n[1],"important")):Rl(t,r,n));return n}function Zo(t,e,r=!1){if(t.multiple){if(e==null)return;if(!bo(e))return Zv();for(var n of t.options)n.selected=e.includes(ws(n));return}for(n of t.options){var i=ws(n);if(Gd(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Ff(t){var e=new MutationObserver(()=>{Zo(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Mo(()=>{e.disconnect()})}function My(t,e,r=e){var n=new WeakSet,i=!0;$o(t,"change",s=>{var o=s?"[selected]":":checked",a;if(t.multiple)a=[].map.call(t.querySelectorAll(o),ws);else{var l=t.querySelector(o)??t.querySelector("option:not([disabled])");a=l&&ws(l)}r(a),Me!==null&&n.add(Me)}),No(()=>{var s=e();if(t===document.activeElement){var o=Do??Me;if(n.has(o))return}if(Zo(t,s,i),i&&s===void 0){var a=t.querySelector(":checked");a!==null&&(s=ws(a),r(s))}t.__value=s,i=!1}),Ff(t)}function ws(t){return"__value"in t?t.__value:t.value}const ks=Symbol("class"),Ss=Symbol("style"),Nf=Symbol("is custom element"),Rf=Symbol("is html");function Vo(t){if(we){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;Se(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;Se(t,"checked",null),t.checked=i}}};t.__on_r=r,Ft(r),sf()}}function zf(t,e){var r=jo(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function Fy(t,e){var r=jo(t);r.checked!==(r.checked=e??void 0)&&(t.checked=e)}function zl(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Se(t,e,r,n){var i=jo(t);we&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Tv]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Zl(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Yn(t,e,r){var n=Te,i=Ae;let s=we;we&&vt(!1),At(null),Gt(null);try{e!=="style"&&(Ll.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.tagName.toLowerCase())?Zl(t).includes(e):r&&typeof r=="object")?t[e]=r:Se(t,e,r==null?r:String(r))}finally{At(n),Gt(i),s&&vt(!0)}}function Ny(t,e,r,n,i=!1,s=!1){if(we&&i&&t.tagName==="INPUT"){var o=t,a=o.type==="checkbox"?"defaultChecked":"defaultValue";a in r||Vo(o)}var l=jo(t),u=l[Nf],c=!l[Rf];let d=we&&u;d&&vt(!1);var f=e||{},p=t.tagName==="OPTION";for(var v in e)v in r||(r[v]=null);r.class?r.class=Yr(r.class):r[ks]&&(r.class=null),r[Ss]&&(r.style??=null);var g=Zl(t);for(const C in r){let A=r[C];if(p&&C==="value"&&A==null){t.value=t.__value="",f[C]=A;continue}if(C==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";zt(t,m,A,n,e?.[ks],r[ks]),f[C]=A,f[ks]=r[ks];continue}if(C==="style"){$y(t,A,e?.[Ss],r[Ss]),f[C]=A,f[Ss]=r[Ss];continue}var _=f[C];if(!(A===_&&!(A===void 0&&t.hasAttribute(C)))){f[C]=A;var k=C[0]+C[1];if(k!=="$$")if(k==="on"){const N={},M="$$"+C;let j=C.slice(2);var D=gy(j);if(py(j)&&(j=j.slice(0,-7),N.capture=!0),!D&&_){if(A!=null)continue;t.removeEventListener(j,f[M],N),f[M]=null}if(A!=null)if(D)t[`__${j}`]=A,Sr([j]);else{let se=function(z){f[C].call(this,z)};f[M]=Il(j,t,se,N)}else D&&(t[`__${j}`]=void 0)}else if(C==="style")Se(t,C,A);else if(C==="autofocus")oy(t,!!A);else if(!u&&(C==="__value"||C==="value"&&A!=null))t.value=t.__value=A;else if(C==="selected"&&p)zl(t,A);else{var O=C;c||(O=yy(O));var P=O==="defaultValue"||O==="defaultChecked";if(A==null&&!u&&!P)if(l[C]=null,O==="value"||O==="checked"){let N=t;const M=e===void 0;if(O==="value"){let j=N.defaultValue;N.removeAttribute(O),N.defaultValue=j,N.value=N.__value=M?j:null}else{let j=N.defaultChecked;N.removeAttribute(O),N.defaultChecked=j,N.checked=M?j:!1}}else t.removeAttribute(C);else P||g.includes(O)&&(u||typeof A!="string")?(t[O]=A,O in l&&(l[O]=ot)):typeof A!="function"&&Se(t,O,A)}}}return d&&vt(!0),f}function Ze(t,e,r=[],n=[],i=[],s,o=!1,a=!1){Bd(i,r,n,l=>{var u=void 0,c={},d=t.nodeName==="SELECT",f=!1;if(lf(()=>{var v=e(...l.map(h)),g=Ny(t,u,v,s,o,a);f&&d&&"value"in v&&Zo(t,v.value);for(let _ of Object.getOwnPropertySymbols(c))v[_]||lt(c[_]);for(let _ of Object.getOwnPropertySymbols(v)){var m=v[_];_.description===wd&&(!u||m!==u[_])&&(c[_]&&lt(c[_]),c[_]=Tt(()=>Dy(t,()=>m))),g[_]=m}u=g}),d){var p=t;No(()=>{Zo(p,u.value,!0),Ff(p)})}f=!0})}function jo(t){return t.__attributes??={[Nf]:t.nodeName.includes("-"),[Rf]:t.namespaceURI===xv}}var Ll=new Map;function Zl(t){var e=t.getAttribute("is")||t.nodeName,r=Ll.get(e);if(r)return r;Ll.set(e,r=[]);for(var n,i=t,s=Element.prototype;s!==i;){n=kd(i);for(var o in n)n[o].set&&r.push(o);i=So(i)}return r}let Vl=null;function Ry(){if(Vl===null){var t=document.createElement("select");t.innerHTML="<option><span>t</span></option>",Vl=t.firstChild?.firstChild?.nodeType===1}return Vl}function zy(t,e){var r=we;Ry()||(vt(!1),t.textContent="",t.append(sy("")));try{e()}finally{r&&(we?T(t):(vt(!0),ct(t)))}}function jl(t,e,r=e){var n=new WeakSet;$o(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=Ul(t)?ql(s):s,r(s),Me!==null&&n.add(Me),await Sf(),s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=s??"",a!==null){var u=t.value.length;o===a&&a===l&&u>l?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=o,t.selectionEnd=Math.min(a,u))}}}),(we&&t.defaultValue!==t.value||Ve(e)==null&&t.value)&&(r(Ul(t)?ql(t.value):t.value),Me!==null&&n.add(Me)),Ci(()=>{var i=e();if(t===document.activeElement){var s=Do??Me;if(n.has(s))return}Ul(t)&&i===ql(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}const Bl=new Set;function Ly(t,e,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=t;let a=!1;if(e!==null)for(var l of e)o=o[l]??=[];o.push(r),$o(r,"change",()=>{var u=r.__value;s&&(u=Lf(o,u,r.checked)),i(u)},()=>i(s?[]:null)),Ci(()=>{var u=n();if(we&&r.defaultChecked!==r.checked){a=!0;return}s?(u=u||[],r.checked=u.includes(r.__value)):r.checked=Gd(r.__value,u)}),Mo(()=>{var u=o.indexOf(r);u!==-1&&o.splice(u,1)}),Bl.has(o)||(Bl.add(o),Ft(()=>{o.sort((u,c)=>u.compareDocumentPosition(c)===4?-1:1),Bl.delete(o)})),Ft(()=>{if(a){var u;if(s)u=Lf(o,u,r.checked);else{var c=o.find(d=>d.checked);u=c?.__value}i(u)}})}function Zy(t,e,r=e){$o(t,"change",n=>{var i=n?t.defaultChecked:t.checked;r(i)}),(we&&t.defaultChecked!==t.checked||Ve(e)==null)&&r(t.checked),Ci(()=>{var n=e();t.checked=!!n})}function Lf(t,e,r){for(var n=new Set,i=0;i<t.length;i+=1)t[i].checked&&n.add(t[i].__value);return r||n.delete(e),Array.from(n)}function Ul(t){var e=t.type;return e==="number"||e==="range"}function ql(t){return t===""?null:+t}function Zf(t,e){return t===e||t?.[wr]===e}function Vf(t={},e,r,n){return No(()=>{var i,s;return Ci(()=>{i=s,s=[],Ve(()=>{t!==r(...s)&&(e(t,...s),i&&Zf(r(...i),t)&&e(null,...i))})}),()=>{Ft(()=>{s&&Zf(r(...s),t)&&e(null,...s)})}}),t}function Wl(t=!1){const e=Ye,r=e.l.u;if(!r)return;let n=()=>hy(e.s);if(t){let i=0,s={};const o=ps(()=>{let a=!1;const l=e.s;for(const u in l)l[u]!==s[u]&&(s[u]=l[u],a=!0);return a&&i++,i});n=()=>h(o)}r.b.length&&Ol(()=>{jf(e,n),cl(r.b)}),pe(()=>{const i=Ve(()=>r.m.map(Ov));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&pe(()=>{jf(e,n),cl(r.a)})}function jf(t,e){if(t.l.s)for(const r of t.l.s)h(r);e()}let Bo=!1;function Vy(t){var e=Bo;try{return Bo=!1,[t(),Bo]}finally{Bo=e}}const jy={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Ue(t,e,r){return new Proxy({props:t,exclude:e},jy)}const By={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(us(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let i=t.props[n];us(i)&&(i=i());const s=zr(i,e);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(us(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const i=zr(n,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(t,e){if(e===wr||e===ml)return!1;for(let r of t.props)if(us(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(us(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function xn(...t){return new Proxy({props:t},By)}function b(t,e,r,n){var i=!ki||(r&yv)!==0,s=(r&_v)!==0,o=(r&wv)!==0,a=n,l=!0,u=()=>(l&&(l=!1,a=o?Ve(n):n),a),c;if(s){var d=wr in t||ml in t;c=zr(t,e)?.set??(d&&e in t?D=>t[e]=D:void 0)}var f,p=!1;s?[f,p]=Vy(()=>t[e]):f=t[e],f===void 0&&n!==void 0&&(f=u(),c&&(i&&Fv(),c(f)));var v;if(i?v=()=>{var D=t[e];return D===void 0?u():(l=!0,D)}:v=()=>{var D=t[e];return D!==void 0&&(a=void 0),D===void 0?a:D},i&&(r&bv)===0)return v;if(c){var g=t.$$legacy;return(function(D,O){return arguments.length>0?((!i||!O||g||p)&&c(O?v():D),D):v()})}var m=!1,_=((r&vv)!==0?ps:kl)(()=>(m=!1,v()));s&&h(_);var k=Ae;return(function(D,O){if(arguments.length>0){const P=O?h(_):i&&s?Ne(D):D;return I(_,P),m=!0,a!==void 0&&(a=P),D}return kn&&m||(k.f&Vr)!==0?_.v:h(_)})}function Uy(t){return new qy(t)}class qy{#e;#t;constructor(e){var r=new Map,n=(s,o)=>{var a=Kd(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(s,o){return h(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===ml?!0:(h(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return I(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#t=(e.hydrate?wy:Af)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||ko(this,s,{get(){return this.#t[s]},set(o){this.#t[s]=o},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{ky(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let Bf;typeof HTMLElement=="function"&&(Bf=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),w(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=Wy(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Uo(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Uy({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Fo(()=>{Ci(()=>{this.$$r=!0;for(const n of wo(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Uo(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Uo(t,r,this.$$p_d,"toProp"),this.$$c?.$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 wo(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Uo(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Wy(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function re(t,e,r,n,i,s){let o=class extends Bf{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return wo(e).map(a=>(e[a].attribute||a).toLowerCase())}};return wo(e).forEach(a=>{ko(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Uo(a,l,e),this.$$d[a]=l;var u=this.$$c;if(u){var c=zr(u,a)?.get;c?u[a]=l:u.$set({[a]:l})}}})}),n.forEach(a=>{ko(o.prototype,a,{get(){return this.$$c?.[a]}})}),t.element=o,o}const Uf={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:t=>`/#/checkout/failure?payment_error=${t}`,checkoutSuccess:t=>`/#/checkout/success?ORDERID=${t}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:t=>"/#/tickets/combi?group="+t,dayTickets:()=>"/#/tickets/day",eventGroup:Yy,event:t=>"/#/product/event/"+t,events:()=>"/#/products/events",exhibition:t=>"/#/exhibition/"+t,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:t=>"/#/merchandise/detail/"+t,merchandises:()=>"/#/merchandise/list",museum:t=>"/#/museum/"+t,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:t=>"/#/tickets/filters?group="+t,tour:t=>"/#/product/tour/"+t,tours:()=>"/#/products/tours",toursGroup:Gy,cart:()=>"/#/cart",annualTicketPersonalizationForm:(t,e)=>`/#/tickets/annual/personalisation/${t}/${e}`,annualTicketPersonalizationList:t=>`/#/tickets/annual/personalisation/${t}`,annualTicketPersonalizationFormSubmit:t=>`/#/tickets/annual/personalisation/${t}`},Ky={...Uf,checkoutSuccess:t=>`/checkout/success/?token=${t}`,checkoutFailure:t=>`/checkout/failure?error=${t}`};function Hy(t){return t==="angular"?Uf:Ky}function Yy(t){return`/#/products/events?category_id=${(S.settings?.multipleEventsMenuItems.event_groups[t]||[]).join("&category_id=")}`}function Gy(t){return`/#/products/tours?category_id=${(S.settings?.multipleToursMenuItems.tour_groups[t]||[]).join("&category_id=")}`}function Jy(t){return new Promise(e=>setTimeout(e,t))}function qf(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function Qy(t){return typeof t=="boolean"}function Kl(t,e=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=t();if(a){r(a);return}if(Date.now()-i>=e){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}const Hl=Array.isArray,Wf=t=>!!t&&t.constructor===Object,Xy=t=>typeof t=="string"||t instanceof String,eb=t=>{try{return Number(t)===t}catch{return!1}},tb=(t,e)=>!t||(t.length??0)===0?null:t.reduce(e);function Gn(t,e){return(t||[]).reduce((r,n)=>r+(e?e(n):n),0)}const rb=(t,e,r=!1)=>{if(!t)return[];const n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function Kf(t,e){const r=(n=>n);return tb(t,(n,i)=>r(n)<r(i)?n:i)}const Hf=(t,e,r)=>{let n=r;for(let i=1;i<=t;i++)n=e(n,i);return n},nb=(t,e)=>t?!e||e.length===0?t:e.reduce((r,n)=>(delete r[n],r),{...t}):{},Lt=(t,e)=>!t||!e?t??e??{}:Object.entries({...t,...e}).reduce((r,[n,i])=>({...r,[n]:Wf(t[n])?Lt(t[n],i):i}),{});class Yf{#e={uid:"",client:"",accessToken:"",expiry:0};constructor(){this.load(),typeof window<"u"&&window.addEventListener("storage",e=>{e.key==="go-auth"&&this.load()})}customerLevel(){if(this.isGuest())return 10;if(this.isLoggedIn())return 20}isAuthenticated(){return this.#e.uid!==""}isLoggedIn(){return!!(this.#e.uid&&qf(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!qf(this.#e.uid))}signOut(){this.#e.uid="",this.#e.client="",this.#e.accessToken="",this.#e.expiry=0,this.save()}signIn(e){this.#e.uid=e.uid,this.#e.client=e.client,this.#e.accessToken=e.accessToken,this.#e.expiry=e.expiry,this.save()}get data(){return this.#e.expiry<Math.floor(Date.now()/1e3)&&this.signOut(),this.#e}toString(){return JSON.stringify(this.#e)}save(){typeof localStorage>"u"||localStorage.setItem("go-auth",this.toString())}load(){if(typeof localStorage>"u")return;const e=localStorage.getItem("go-auth");if(!e){this.signOut();return}const r=JSON.parse(e);if(!(Wf(r)&&"uid"in r&&"client"in r&&"accessToken"in r&&"expiry"in r))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(r)}}class ib{constructor(e){this.auth=e}onRequest({request:e}){const{uid:r,client:n,accessToken:i,expiry:s}=this.auth.data,o=e.headers;r&&!o.has("uid")&&o.set("uid",r),n&&!o.has("client")&&o.set("client",n),i&&!o.has("access-token")&&o.set("access-token",i),s&&!o.has("expiry")&&o.set("expiry",String(s)),i&&!o.has("token-type")&&o.set("token-type","Bearer")}onResponse({response:e}){const r=e.headers.get("access-token"),n=e.headers.get("client"),i=e.headers.get("uid"),s=parseInt(e.headers.get("expiry")||"");return r&&n&&i&&s&&this.auth.signIn({uid:i,client:n,accessToken:r,expiry:s}),e}}var De;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(De||(De={}));var Yl;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Yl||(Yl={}));const fe=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),En=t=>{switch(typeof t){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(t)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(t)?fe.array:t===null?fe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?fe.promise:typeof Map<"u"&&t instanceof Map?fe.map:typeof Set<"u"&&t instanceof Set?fe.set:typeof Date<"u"&&t instanceof Date?fe.date:fe.object;default:return fe.unknown}},Q=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),sb=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Zt extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),n}static assert(e){if(!(e instanceof Zt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Zt.create=t=>new Zt(t);const Ti=(t,e)=>{let r;switch(t.code){case Q.invalid_type:t.received===fe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,De.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:r=`Unrecognized key(s) in object: ${De.joinValues(t.keys,", ")}`;break;case Q.invalid_union:r="Invalid input";break;case Q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${De.joinValues(t.options)}`;break;case Q.invalid_enum_value:r=`Invalid enum value. Expected ${De.joinValues(t.options)}, received '${t.received}'`;break;case Q.invalid_arguments:r="Invalid function arguments";break;case Q.invalid_return_type:r="Invalid function return type";break;case Q.invalid_date:r="Invalid date";break;case Q.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:De.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Q.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Q.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Q.custom:r="Invalid input";break;case Q.invalid_intersection_types:r="Intersection results could not be merged";break;case Q.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Q.not_finite:r="Number must be finite";break;default:r=e.defaultError,De.assertNever(t)}return{message:r}};let Gf=Ti;function ob(t){Gf=t}function qo(){return Gf}const Wo=t=>{const{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:e,defaultError:a}).message;return{...i,path:s,message:a}},ab=[];function de(t,e){const r=qo(),n=Wo({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Ti?void 0:Ti].filter(i=>!!i)});t.common.issues.push(n)}class mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const i of r){if(i.status==="aborted")return _e;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const i of r){const s=await i.key,o=await i.value;n.push({key:s,value:o})}return mt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const i of r){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return _e;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const _e=Object.freeze({status:"aborted"}),Ai=t=>({status:"dirty",value:t}),bt=t=>({status:"valid",value:t}),Gl=t=>t.status==="aborted",Jl=t=>t.status==="dirty",xs=t=>t.status==="valid",Es=t=>typeof Promise<"u"&&t instanceof Promise;function Ko(t,e,r,n){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Jf(t,e,r,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var he;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(he||(he={}));var Cs,Os;class Cr{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Qf=(t,e)=>{if(xs(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Zt(t.common.issues);return this._error=r,this._error}}};function xe(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{var l,u;const{message:c}=t;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??r)!==null&&u!==void 0?u:a.defaultError}},description:i}}let Ce=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return En(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:En(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new mt,ctx:{common:e.parent.common,data:e.data,parsedType:En(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Es(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:En(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Qf(i,s)}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:En(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(Es(i)?i:Promise.resolve(i));return Qf(n,s)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:Q.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new lr({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Tr.create(this,this._def)}nullable(){return An.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xn.create(this,this._def)}promise(){return Mi.create(this,this._def)}or(e){return Is.create([this,e],this._def)}and(e){return Ps.create(this,e,this._def)}transform(e){return new lr({...xe(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Rs({...xe(this._def),innerType:this,defaultValue:r,typeName:ye.ZodDefault})}brand(){return new eu({typeName:ye.ZodBranded,type:this,...xe(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new zs({...xe(this._def),innerType:this,catchValue:r,typeName:ye.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Ls.create(this,e)}readonly(){return Zs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const lb=/^c[^\s-]{8,}$/i,ub=/^[0-9a-z]+$/,cb=/^[0-9A-HJKMNP-TV-Z]{26}$/,db=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fb=/^[a-z0-9_-]{21}$/i,hb=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ql;const gb=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vb=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,yb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xf="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",bb=new RegExp(`^${Xf}$`);function eh(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function _b(t){return new RegExp(`^${eh(t)}$`)}function th(t){let e=`${Xf}T${eh(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function wb(t,e){return!!((e==="v4"||!e)&&gb.test(t)||(e==="v6"||!e)&&vb.test(t))}let Di=class vo extends Ce{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==fe.string){const s=this._getOrReturnCtx(e);return de(s,{code:Q.invalid_type,expected:fe.string,received:s.parsedType}),_e}const n=new mt;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),de(i,{code:Q.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),de(i,{code:Q.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?de(i,{code:Q.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&de(i,{code:Q.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")pb.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"email",code:Q.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Ql||(Ql=new RegExp(mb,"u")),Ql.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"emoji",code:Q.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")db.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"uuid",code:Q.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")fb.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"nanoid",code:Q.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")lb.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"cuid",code:Q.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")ub.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"cuid2",code:Q.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")cb.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"ulid",code:Q.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),de(i,{validation:"url",code:Q.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"regex",code:Q.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),de(i,{code:Q.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),de(i,{code:Q.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),de(i,{code:Q.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?th(s).test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{code:Q.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?bb.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{code:Q.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?_b(s).test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{code:Q.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?hb.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"duration",code:Q.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?wb(e.data,s.version)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"ip",code:Q.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?yb.test(e.data)||(i=this._getOrReturnCtx(e,i),de(i,{validation:"base64",code:Q.invalid_string,message:s.message}),n.dirty()):De.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:Q.invalid_string,...he.errToObj(n)})}_addCheck(e){return new vo({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...he.errToObj(e)})}url(e){return this._addCheck({kind:"url",...he.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...he.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...he.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...he.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...he.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...he.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...he.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...he.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...he.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...he.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...he.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...he.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...he.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...he.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...he.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...he.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...he.errToObj(r)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new vo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new vo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new vo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Di.create=t=>{var e;return new Di({checks:[],typeName:ye.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...xe(t)})};function kb(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class Cn extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==fe.number){const s=this._getOrReturnCtx(e);return de(s,{code:Q.invalid_type,expected:fe.number,received:s.parsedType}),_e}let n;const i=new mt;for(const s of this._def.checks)s.kind==="int"?De.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),de(n,{code:Q.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),de(n,{code:Q.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),de(n,{code:Q.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?kb(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),de(n,{code:Q.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),de(n,{code:Q.not_finite,message:s.message}),i.dirty()):De.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,he.toString(r))}gt(e,r){return this.setLimit("min",e,!1,he.toString(r))}lte(e,r){return this.setLimit("max",e,!0,he.toString(r))}lt(e,r){return this.setLimit("max",e,!1,he.toString(r))}setLimit(e,r,n,i){return new Cn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:he.toString(i)}]})}_addCheck(e){return new Cn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:he.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:he.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&De.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Cn.create=t=>new Cn({checks:[],typeName:ye.ZodNumber,coerce:t?.coerce||!1,...xe(t)});class On extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==fe.bigint){const s=this._getOrReturnCtx(e);return de(s,{code:Q.invalid_type,expected:fe.bigint,received:s.parsedType}),_e}let n;const i=new mt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),de(n,{code:Q.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),de(n,{code:Q.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),de(n,{code:Q.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):De.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,he.toString(r))}gt(e,r){return this.setLimit("min",e,!1,he.toString(r))}lte(e,r){return this.setLimit("max",e,!0,he.toString(r))}lt(e,r){return this.setLimit("max",e,!1,he.toString(r))}setLimit(e,r,n,i){return new On({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:he.toString(i)}]})}_addCheck(e){return new On({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}On.create=t=>{var e;return new On({checks:[],typeName:ye.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...xe(t)})};class Ts extends Ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==fe.boolean){const n=this._getOrReturnCtx(e);return de(n,{code:Q.invalid_type,expected:fe.boolean,received:n.parsedType}),_e}return bt(e.data)}}Ts.create=t=>new Ts({typeName:ye.ZodBoolean,coerce:t?.coerce||!1,...xe(t)});class Jn extends Ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==fe.date){const s=this._getOrReturnCtx(e);return de(s,{code:Q.invalid_type,expected:fe.date,received:s.parsedType}),_e}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return de(s,{code:Q.invalid_date}),_e}const n=new mt;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),de(i,{code:Q.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),de(i,{code:Q.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):De.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Jn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:he.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Jn.create=t=>new Jn({checks:[],coerce:t?.coerce||!1,typeName:ye.ZodDate,...xe(t)});class Ho extends Ce{_parse(e){if(this._getType(e)!==fe.symbol){const n=this._getOrReturnCtx(e);return de(n,{code:Q.invalid_type,expected:fe.symbol,received:n.parsedType}),_e}return bt(e.data)}}Ho.create=t=>new Ho({typeName:ye.ZodSymbol,...xe(t)});class As extends Ce{_parse(e){if(this._getType(e)!==fe.undefined){const n=this._getOrReturnCtx(e);return de(n,{code:Q.invalid_type,expected:fe.undefined,received:n.parsedType}),_e}return bt(e.data)}}As.create=t=>new As({typeName:ye.ZodUndefined,...xe(t)});class Ds extends Ce{_parse(e){if(this._getType(e)!==fe.null){const n=this._getOrReturnCtx(e);return de(n,{code:Q.invalid_type,expected:fe.null,received:n.parsedType}),_e}return bt(e.data)}}Ds.create=t=>new Ds({typeName:ye.ZodNull,...xe(t)});class Ii extends Ce{constructor(){super(...arguments),this._any=!0}_parse(e){return bt(e.data)}}Ii.create=t=>new Ii({typeName:ye.ZodAny,...xe(t)});class Qn extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return bt(e.data)}}Qn.create=t=>new Qn({typeName:ye.ZodUnknown,...xe(t)});class Gr extends Ce{_parse(e){const r=this._getOrReturnCtx(e);return de(r,{code:Q.invalid_type,expected:fe.never,received:r.parsedType}),_e}}Gr.create=t=>new Gr({typeName:ye.ZodNever,...xe(t)});class Yo extends Ce{_parse(e){if(this._getType(e)!==fe.undefined){const n=this._getOrReturnCtx(e);return de(n,{code:Q.invalid_type,expected:fe.void,received:n.parsedType}),_e}return bt(e.data)}}Yo.create=t=>new Yo({typeName:ye.ZodVoid,...xe(t)});let Xn=class al extends Ce{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==fe.array)return de(r,{code:Q.invalid_type,expected:fe.array,received:r.parsedType}),_e;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(de(r,{code:o?Q.too_big:Q.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(de(r,{code:Q.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(de(r,{code:Q.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new Cr(r,o,r.path,a)))).then(o=>mt.mergeArray(n,o));const s=[...r.data].map((o,a)=>i.type._parseSync(new Cr(r,o,r.path,a)));return mt.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new al({...this._def,minLength:{value:e,message:he.toString(r)}})}max(e,r){return new al({...this._def,maxLength:{value:e,message:he.toString(r)}})}length(e,r){return new al({...this._def,exactLength:{value:e,message:he.toString(r)}})}nonempty(e){return this.min(1,e)}};Xn.create=(t,e)=>new Xn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...xe(e)});function Pi(t){if(t instanceof Je){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Tr.create(Pi(n))}return new Je({...t._def,shape:()=>e})}else return t instanceof Xn?new Xn({...t._def,type:Pi(t.element)}):t instanceof Tr?Tr.create(Pi(t.unwrap())):t instanceof An?An.create(Pi(t.unwrap())):t instanceof Or?Or.create(t.items.map(e=>Pi(e))):t}class Je extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=De.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==fe.object){const u=this._getOrReturnCtx(e);return de(u,{code:Q.invalid_type,expected:fe.object,received:u.parsedType}),_e}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Gr&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=s[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cr(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Gr){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(de(i,{code:Q.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cr(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>mt.mergeObjectSync(n,u)):mt.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new Je({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;const l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=he.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Je({...this._def,unknownKeys:"strip"})}passthrough(){return new Je({...this._def,unknownKeys:"passthrough"})}extend(e){return new Je({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Je({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ye.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Je({...this._def,catchall:e})}pick(e){const r={};return De.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Je({...this._def,shape:()=>r})}omit(e){const r={};return De.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new Je({...this._def,shape:()=>r})}deepPartial(){return Pi(this)}partial(e){const r={};return De.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new Je({...this._def,shape:()=>r})}required(e){const r={};return De.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Tr;)s=s._def.innerType;r[n]=s}}),new Je({...this._def,shape:()=>r})}keyof(){return rh(De.objectKeys(this.shape))}}Je.create=(t,e)=>new Je({shape:()=>t,unknownKeys:"strip",catchall:Gr.create(),typeName:ye.ZodObject,...xe(e)}),Je.strictCreate=(t,e)=>new Je({shape:()=>t,unknownKeys:"strict",catchall:Gr.create(),typeName:ye.ZodObject,...xe(e)}),Je.lazycreate=(t,e)=>new Je({shape:t,unknownKeys:"strip",catchall:Gr.create(),typeName:ye.ZodObject,...xe(e)});let Is=class extends Ce{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new Zt(a.ctx.common.issues));return de(r,{code:Q.invalid_union,unionErrors:o}),_e}if(r.common.async)return Promise.all(n.map(async s=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new Zt(l));return de(r,{code:Q.invalid_union,unionErrors:a}),_e}}get options(){return this._def.options}};Is.create=(t,e)=>new Is({options:t,typeName:ye.ZodUnion,...xe(e)});const Jr=t=>t instanceof Ms?Jr(t.schema):t instanceof lr?Jr(t.innerType()):t instanceof Fs?[t.value]:t instanceof Tn?t.options:t instanceof Ns?De.objectValues(t.enum):t instanceof Rs?Jr(t._def.innerType):t instanceof As?[void 0]:t instanceof Ds?[null]:t instanceof Tr?[void 0,...Jr(t.unwrap())]:t instanceof An?[null,...Jr(t.unwrap())]:t instanceof eu||t instanceof Zs?Jr(t.unwrap()):t instanceof zs?Jr(t._def.innerType):[];class Go extends Ce{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==fe.object)return de(r,{code:Q.invalid_type,expected:fe.object,received:r.parsedType}),_e;const n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(de(r,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),_e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const s of r){const o=Jr(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Go({typeName:ye.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...xe(n)})}}function Xl(t,e){const r=En(t),n=En(e);if(t===e)return{valid:!0,data:t};if(r===fe.object&&n===fe.object){const i=De.objectKeys(e),s=De.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const l=Xl(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===fe.array&&n===fe.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],l=Xl(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===fe.date&&n===fe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let Ps=class extends Ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(Gl(s)||Gl(o))return _e;const a=Xl(s.value,o.value);return a.valid?((Jl(s)||Jl(o))&&r.dirty(),{status:r.value,value:a.data}):(de(n,{code:Q.invalid_intersection_types}),_e)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Ps.create=(t,e,r)=>new Ps({left:t,right:e,typeName:ye.ZodIntersection,...xe(r)});class Or extends Ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==fe.array)return de(n,{code:Q.invalid_type,expected:fe.array,received:n.parsedType}),_e;if(n.data.length<this._def.items.length)return de(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&n.data.length>this._def.items.length&&(de(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cr(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>mt.mergeArray(r,o)):mt.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Or({...this._def,rest:e})}}Or.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Or({items:t,typeName:ye.ZodTuple,rest:null,...xe(e)})};class $s extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==fe.object)return de(n,{code:Q.invalid_type,expected:fe.object,received:n.parsedType}),_e;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new Cr(n,a,n.path,a)),value:o._parse(new Cr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?mt.mergeObjectAsync(r,i):mt.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Ce?new $s({keyType:e,valueType:r,typeName:ye.ZodRecord,...xe(n)}):new $s({keyType:Di.create(),valueType:e,typeName:ye.ZodRecord,...xe(r)})}}class Jo extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==fe.map)return de(n,{code:Q.invalid_type,expected:fe.map,received:n.parsedType}),_e;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,l],u)=>({key:i._parse(new Cr(n,a,n.path,[u,"key"])),value:s._parse(new Cr(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return _e;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(u.value,c.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return _e;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(u.value,c.value)}return{status:r.value,value:a}}}}Jo.create=(t,e,r)=>new Jo({valueType:e,keyType:t,typeName:ye.ZodMap,...xe(r)});class ei extends Ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==fe.set)return de(n,{code:Q.invalid_type,expected:fe.set,received:n.parsedType}),_e;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(de(n,{code:Q.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(de(n,{code:Q.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return _e;c.status==="dirty"&&r.dirty(),u.add(c.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((l,u)=>s._parse(new Cr(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new ei({...this._def,minSize:{value:e,message:he.toString(r)}})}max(e,r){return new ei({...this._def,maxSize:{value:e,message:he.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}ei.create=(t,e)=>new ei({valueType:t,minSize:null,maxSize:null,typeName:ye.ZodSet,...xe(e)});class $i extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==fe.function)return de(r,{code:Q.invalid_type,expected:fe.function,received:r.parsedType}),_e;function n(a,l){return Wo({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qo(),Ti].filter(u=>!!u),issueData:{code:Q.invalid_arguments,argumentsError:l}})}function i(a,l){return Wo({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qo(),Ti].filter(u=>!!u),issueData:{code:Q.invalid_return_type,returnTypeError:l}})}const s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Mi){const a=this;return bt(async function(...l){const u=new Zt([]),c=await a._def.args.parseAsync(l,s).catch(p=>{throw u.addIssue(n(l,p)),u}),d=await Reflect.apply(o,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(p=>{throw u.addIssue(i(d,p)),u})})}else{const a=this;return bt(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Zt([n(l,u.error)]);const c=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Zt([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new $i({...this._def,args:Or.create(e).rest(Qn.create())})}returns(e){return new $i({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new $i({args:e||Or.create([]).rest(Qn.create()),returns:r||Qn.create(),typeName:ye.ZodFunction,...xe(n)})}}class Ms extends Ce{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ms.create=(t,e)=>new Ms({getter:t,typeName:ye.ZodLazy,...xe(e)});class Fs extends Ce{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return de(r,{received:r.data,code:Q.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:e.data}}get value(){return this._def.value}}Fs.create=(t,e)=>new Fs({value:t,typeName:ye.ZodLiteral,...xe(e)});function rh(t,e){return new Tn({values:t,typeName:ye.ZodEnum,...xe(e)})}class Tn extends Ce{constructor(){super(...arguments),Cs.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return de(r,{expected:De.joinValues(n),received:r.parsedType,code:Q.invalid_type}),_e}if(Ko(this,Cs)||Jf(this,Cs,new Set(this._def.values)),!Ko(this,Cs).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return de(r,{received:r.data,code:Q.invalid_enum_value,options:n}),_e}return bt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Tn.create(e,{...this._def,...r})}exclude(e,r=this._def){return Tn.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Cs=new WeakMap,Tn.create=rh;class Ns extends Ce{constructor(){super(...arguments),Os.set(this,void 0)}_parse(e){const r=De.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==fe.string&&n.parsedType!==fe.number){const i=De.objectValues(r);return de(n,{expected:De.joinValues(i),received:n.parsedType,code:Q.invalid_type}),_e}if(Ko(this,Os)||Jf(this,Os,new Set(De.getValidEnumValues(this._def.values))),!Ko(this,Os).has(e.data)){const i=De.objectValues(r);return de(n,{received:n.data,code:Q.invalid_enum_value,options:i}),_e}return bt(e.data)}get enum(){return this._def.values}}Os=new WeakMap,Ns.create=(t,e)=>new Ns({values:t,typeName:ye.ZodNativeEnum,...xe(e)});class Mi extends Ce{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==fe.promise&&r.common.async===!1)return de(r,{code:Q.invalid_type,expected:fe.promise,received:r.parsedType}),_e;const n=r.parsedType===fe.promise?r.data:Promise.resolve(r.data);return bt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Mi.create=(t,e)=>new Mi({type:t,typeName:ye.ZodPromise,...xe(e)});class lr extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{de(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return _e;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?_e:l.status==="dirty"||r.value==="dirty"?Ai(l.value):l});{if(r.value==="aborted")return _e;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?_e:a.status==="dirty"||r.value==="dirty"?Ai(a.value):a}}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?_e:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?_e:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!xs(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>xs(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);De.assertNever(i)}}lr.create=(t,e,r)=>new lr({schema:t,typeName:ye.ZodEffects,effect:e,...xe(r)}),lr.createWithPreprocess=(t,e,r)=>new lr({schema:e,effect:{type:"preprocess",transform:t},typeName:ye.ZodEffects,...xe(r)});let Tr=class extends Ce{_parse(e){return this._getType(e)===fe.undefined?bt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Tr.create=(t,e)=>new Tr({innerType:t,typeName:ye.ZodOptional,...xe(e)});let An=class extends Ce{_parse(e){return this._getType(e)===fe.null?bt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};An.create=(t,e)=>new An({innerType:t,typeName:ye.ZodNullable,...xe(e)});let Rs=class extends Ce{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===fe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Rs.create=(t,e)=>new Rs({innerType:t,typeName:ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xe(e)});let zs=class extends Ce{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Es(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Zt(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};zs.create=(t,e)=>new zs({innerType:t,typeName:ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xe(e)});class Qo extends Ce{_parse(e){if(this._getType(e)!==fe.nan){const n=this._getOrReturnCtx(e);return de(n,{code:Q.invalid_type,expected:fe.nan,received:n.parsedType}),_e}return{status:"valid",value:e.data}}}Qo.create=t=>new Qo({typeName:ye.ZodNaN,...xe(t)});const Sb=Symbol("zod_brand");class eu extends Ce{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ls extends Ce{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?_e:s.status==="dirty"?(r.dirty(),Ai(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?_e:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new Ls({in:e,out:r,typeName:ye.ZodPipeline})}}let Zs=class extends Ce{_parse(e){const r=this._def.innerType._parse(e),n=i=>(xs(i)&&(i.value=Object.freeze(i.value)),i);return Es(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Zs.create=(t,e)=>new Zs({innerType:t,typeName:ye.ZodReadonly,...xe(e)});function nh(t,e={},r){return t?Ii.create().superRefine((n,i)=>{var s,o;if(!t(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...u,fatal:l})}}):Ii.create()}const xb={object:Je.lazycreate};var ye;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ye||(ye={}));const Eb=(t,e={message:`Input not instance of ${t.name}`})=>nh(r=>r instanceof t,e),ih=Di.create,sh=Cn.create,Cb=Qo.create,Ob=On.create,oh=Ts.create,Tb=Jn.create,Ab=Ho.create,Db=As.create,Ib=Ds.create,Pb=Ii.create,$b=Qn.create,Mb=Gr.create,Fb=Yo.create,Nb=Xn.create,Rb=Je.create,zb=Je.strictCreate,Lb=Is.create,Zb=Go.create,Vb=Ps.create,jb=Or.create,Bb=$s.create,Ub=Jo.create,qb=ei.create,Wb=$i.create,Kb=Ms.create,Hb=Fs.create,Yb=Tn.create,Gb=Ns.create,Jb=Mi.create,ah=lr.create,Qb=Tr.create,Xb=An.create,e_=lr.createWithPreprocess,t_=Ls.create;var ht=Object.freeze({__proto__:null,defaultErrorMap:Ti,setErrorMap:ob,getErrorMap:qo,makeIssue:Wo,EMPTY_PATH:ab,addIssueToContext:de,ParseStatus:mt,INVALID:_e,DIRTY:Ai,OK:bt,isAborted:Gl,isDirty:Jl,isValid:xs,isAsync:Es,get util(){return De},get objectUtil(){return Yl},ZodParsedType:fe,getParsedType:En,ZodType:Ce,datetimeRegex:th,ZodString:Di,ZodNumber:Cn,ZodBigInt:On,ZodBoolean:Ts,ZodDate:Jn,ZodSymbol:Ho,ZodUndefined:As,ZodNull:Ds,ZodAny:Ii,ZodUnknown:Qn,ZodNever:Gr,ZodVoid:Yo,ZodArray:Xn,ZodObject:Je,ZodUnion:Is,ZodDiscriminatedUnion:Go,ZodIntersection:Ps,ZodTuple:Or,ZodRecord:$s,ZodMap:Jo,ZodSet:ei,ZodFunction:$i,ZodLazy:Ms,ZodLiteral:Fs,ZodEnum:Tn,ZodNativeEnum:Ns,ZodPromise:Mi,ZodEffects:lr,ZodTransformer:lr,ZodOptional:Tr,ZodNullable:An,ZodDefault:Rs,ZodCatch:zs,ZodNaN:Qo,BRAND:Sb,ZodBranded:eu,ZodPipeline:Ls,ZodReadonly:Zs,custom:nh,Schema:Ce,ZodSchema:Ce,late:xb,get ZodFirstPartyTypeKind(){return ye},coerce:{string:(t=>Di.create({...t,coerce:!0})),number:(t=>Cn.create({...t,coerce:!0})),boolean:(t=>Ts.create({...t,coerce:!0})),bigint:(t=>On.create({...t,coerce:!0})),date:(t=>Jn.create({...t,coerce:!0}))},any:Pb,array:Nb,bigint:Ob,boolean:oh,date:Tb,discriminatedUnion:Zb,effect:ah,enum:Yb,function:Wb,instanceof:Eb,intersection:Vb,lazy:Kb,literal:Hb,map:Ub,nan:Cb,nativeEnum:Gb,never:Mb,null:Ib,nullable:Xb,number:sh,object:Rb,oboolean:()=>oh().optional(),onumber:()=>sh().optional(),optional:Qb,ostring:()=>ih().optional(),pipeline:t_,preprocess:e_,promise:Jb,record:Bb,set:qb,strictObject:zb,string:ih,symbol:Ab,transformer:ah,tuple:jb,undefined:Db,union:Lb,unknown:$b,void:Fb,NEVER:_e,ZodIssueCode:Q,quotelessJson:sb,ZodError:Zt});const r_=ht.object({id:ht.number(),customer:ht.object({customer_salutation_id:ht.number().positive({message:"user.fieldErrors.titleRequire"}),name:ht.string().min(1,{message:"user.fieldErrors.nameRequire"}),surname:ht.string().min(1,{message:"user.fieldErrors.surnameRequire"}),email:ht.string().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:ht.string().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:ht.string().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:ht.string().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:ht.string().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:ht.number().positive().default(60),language_id:ht.number().positive({message:"user.fieldErrors.languageRequire"}).default(1)})});ht.object({ticket_sale_id:ht.number(),start_at:ht.string().date(),personalizations:ht.array(r_)});function tu(t,e){return t-e*Math.floor(t/e)}const lh=1721426;function Xo(t,e,r,n){e=ru(t,e);let i=e-1,s=-2;return r<=2?s=0:ea(e)&&(s=-1),lh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function ea(t){return t%4===0&&(t%100!==0||t%400===0)}function ru(t,e){return t==="BC"?1-e:e}function n_(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const i_={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Fi{fromJulianDay(e){let r=e,n=r-lh,i=Math.floor(n/146097),s=tu(n,146097),o=Math.floor(s/36524),a=tu(s,36524),l=Math.floor(a/1461),u=tu(a,1461),c=Math.floor(u/365),d=i*400+o*100+l*4+c+(o!==4&&c!==4?1:0),[f,p]=n_(d),v=r-Xo(f,p,1,1),g=2;r<Xo(f,p,3,1)?g=0:ea(p)&&(g=1);let m=Math.floor(((v+g)*12+373)/367),_=r-Xo(f,p,m,1)+1;return new $n(f,p,m,_)}toJulianDay(e){return Xo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return i_[ea(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ea(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}const s_={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Dn(t,e){return e=jt(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function nu(t,e){return e=jt(e,t.calendar),t=su(t),e=su(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function o_(t,e){return t.isEqual?.(e)??e.isEqual?.(t)??t.identifier===e.identifier}function a_(t,e){return Dn(t,Ni(e))}function uh(t,e,r){let n=t.calendar.toJulianDay(t),i=f_(e),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function l_(t){return Dr(Date.now(),t)}function Ni(t){return m_(l_(t))}function ch(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function dh(t,e){return fh(t)-fh(e)}function fh(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let iu=null,u_=!1;function Vt(){return iu==null&&(iu=new Intl.DateTimeFormat().resolvedOptions().timeZone),iu}function hh(){return u_}function su(t){return t.subtract({days:t.day-1})}function c_(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const ph=new Map,ou=new Map;function d_(t){if(Intl.Locale){let r=ph.get(t);return r||(r=new Intl.Locale(t).maximize().region,r&&ph.set(t,r)),r}let e=t.split("-")[1];return e==="u"?void 0:e}function f_(t){let e=ou.get(t);if(!e){if(Intl.Locale){let n=new Intl.Locale(t);if("getWeekInfo"in n&&(e=n.getWeekInfo(),e))return ou.set(t,e),e.firstDay}let r=d_(t);if(t.includes("-fw-")){let n=t.split("-fw-")[1].split("-")[0];n==="mon"?e={firstDay:1}:n==="tue"?e={firstDay:2}:n==="wed"?e={firstDay:3}:n==="thu"?e={firstDay:4}:n==="fri"?e={firstDay:5}:n==="sat"?e={firstDay:6}:e={firstDay:0}}else t.includes("-ca-iso8601")?e={firstDay:1}:e={firstDay:r&&s_[r]||0};ou.set(t,e)}return e.firstDay}function In(t){t=jt(t,new Fi);let e=ru(t.era,t.year);return mh(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function mh(t,e,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(t,e-1,r),a.getTime()}function Vs(t,e){if(e==="UTC")return 0;if(t>0&&e===Vt()&&!hh())return new Date(t).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=vh(t,e);return mh(r,n,i,s,o,a,0)-Math.floor(t/1e3)*1e3}const gh=new Map;function vh(t,e){let r=gh.get(e);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),gh.set(e,r));let n=r.formatToParts(new Date(t)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const ta=864e5;function h_(t,e){let r=In(t),n=r-Vs(r-ta,e),i=r-Vs(r+ta,e);return yh(t,e,n,i)}function yh(t,e,r,n){return(r===n?[r]:[r,n]).filter(s=>p_(t,e,s))}function p_(t,e,r){let n=vh(r,e);return t.year===n.year&&t.month===n.month&&t.day===n.day&&t.hour===n.hour&&t.minute===n.minute&&t.second===n.second}function Ar(t,e,r="compatible"){let n=Pn(t);if(e==="UTC")return In(n);if(e===Vt()&&r==="compatible"&&!hh()){n=jt(n,new Fi);let l=new Date,u=ru(n.era,n.year);return l.setFullYear(u,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=In(n),s=Vs(i-ta,e),o=Vs(i+ta,e),a=yh(n,e,i-s,i-o);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-o);case"compatible":case"later":return Math.max(i-s,i-o);case"reject":throw new RangeError("No such absolute time found")}}function bh(t,e,r="compatible"){return new Date(Ar(t,e,r))}function Dr(t,e){let r=Vs(t,e),n=new Date(t+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),u=n.getUTCSeconds(),c=n.getUTCMilliseconds();return new ur(i<1?"BC":"AD",i<1?-i+1:i,s,o,e,r,a,l,u,c)}function m_(t){return new $n(t.calendar,t.era,t.year,t.month,t.day)}function Pn(t,e){let r=0,n=0,i=0,s=0;if("timeZone"in t)({hour:r,minute:n,second:i,millisecond:s}=t);else if("hour"in t&&!e)return t;return e&&({hour:r,minute:n,second:i,millisecond:s}=e),new Xr(t.calendar,t.era,t.year,t.month,t.day,r,n,i,s)}function g_(t){return new vu(t.hour,t.minute,t.second,t.millisecond)}function jt(t,e){if(o_(t.calendar,e))return t;let r=e.fromJulianDay(t.calendar.toJulianDay(t)),n=t.copy();return n.calendar=e,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,ti(n),n}function v_(t,e,r){if(t instanceof ur)return t.timeZone===e?t:_h(t,e);let n=Ar(t,e,r);return Dr(n,e)}function y_(t){let e=In(t)-t.offset;return new Date(e)}function _h(t,e){let r=In(t)-t.offset;return jt(Dr(r,e),t.calendar)}const js=36e5;function ra(t,e){let r=t.copy(),n="hour"in r?xh(r,e):0;au(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,lu(r),wh(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=n,b_(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let o=r.calendar.isInverseEra?.(r);r.year=i,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function au(t,e){t.calendar.isInverseEra?.(t)&&(e=-e),t.year+=e}function lu(t){for(;t.month<1;)au(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,au(t,1)}function b_(t){for(;t.day<1;)t.month--,lu(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,lu(t)}function wh(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function ti(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),wh(t)}function uu(t){let e={};for(let r in t)typeof t[r]=="number"&&(e[r]=-t[r]);return e}function kh(t,e){return ra(t,uu(e))}function cu(t,e){let r=t.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),ti(r),r}function Bs(t,e){let r=t.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),Sh(r),r}function __(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=na(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=na(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=na(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=na(t.hour,24),e}function Sh(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function na(t,e){let r=t%e;return r<0&&(r+=e),r}function xh(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,__(t)}function Eh(t,e){let r=t.copy();return xh(r,e),r}function w_(t,e){return Eh(t,uu(e))}function du(t,e,r,n){let i=t.copy();switch(e){case"era":{let s=t.calendar.getEras(),o=s.indexOf(t.era);if(o<0)throw new Error("Invalid era: "+t.era);o=Qr(o,r,0,s.length-1,n?.round),i.era=s[o],ti(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=Qr(t.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Qr(t.month,r,1,t.calendar.getMonthsInYear(t),n?.round);break;case"day":i.day=Qr(t.day,r,1,t.calendar.getDaysInMonth(t),n?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),ti(i),i}function fu(t,e,r,n){let i=t.copy();switch(e){case"hour":{let s=t.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=Qr(s,r,o,a,n?.round);break}case"minute":i.minute=Qr(t.minute,r,0,59,n?.round);break;case"second":i.second=Qr(t.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=Qr(t.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Qr(t,e,r,n,i=!1){if(i){t+=Math.sign(e),t<r&&(t=n);let s=Math.abs(e);e>0?t=Math.ceil(t/s)*s:t=Math.floor(t/s)*s,t>n&&(t=r)}else t+=e,t<r?t=n-(r-t-1):t>n&&(t=r+(t-n-1));return t}function Ch(t,e){let r;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=ra(Pn(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});r=Ar(i,t.timeZone)}else r=In(t)-t.offset;r+=e.milliseconds||0,r+=(e.seconds||0)*1e3,r+=(e.minutes||0)*6e4,r+=(e.hours||0)*36e5;let n=Dr(r,t.timeZone);return jt(n,t.calendar)}function k_(t,e){return Ch(t,uu(e))}function S_(t,e,r,n){switch(e){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let v=t.hour>=12;i=v?12:0,s=v?23:11}let o=Pn(t),a=jt(Bs(o,{hour:i}),new Fi),l=[Ar(a,t.timeZone,"earlier"),Ar(a,t.timeZone,"later")].filter(v=>Dr(v,t.timeZone).day===a.day)[0],u=jt(Bs(o,{hour:s}),new Fi),c=[Ar(u,t.timeZone,"earlier"),Ar(u,t.timeZone,"later")].filter(v=>Dr(v,t.timeZone).day===u.day).pop(),d=In(t)-t.offset,f=Math.floor(d/js),p=d%js;return d=Qr(f,r,Math.floor(l/js),Math.floor(c/js),n?.round)*js+p,jt(Dr(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return fu(t,e,r,n);case"era":case"year":case"month":case"day":{let i=du(Pn(t),e,r,n),s=Ar(i,t.timeZone);return jt(Dr(s,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function x_(t,e,r){let n=Pn(t),i=Bs(cu(n,e),e);if(i.compare(n)===0)return t;let s=Ar(i,t.timeZone,r);return jt(Dr(s,t.timeZone),t.calendar)}const E_=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,C_=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,O_=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,hu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function pu(t){let e=t.match(E_);if(!e)throw hu.test(t)?new Error(`Invalid ISO 8601 date string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+t);let r=new $n(Re(e[1],0,9999),Re(e[2],1,12),1);return r.day=Re(e[3],1,r.calendar.getDaysInMonth(r)),r}function Oh(t){let e=t.match(C_);if(!e)throw hu.test(t)?new Error(`Invalid ISO 8601 date time string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+t);let r=Re(e[1],-9999,9999),n=r<1?"BC":"AD",i=new Xr(n,r<1?-r+1:r,Re(e[2],1,12),1,e[4]?Re(e[4],0,23):0,e[5]?Re(e[5],0,59):0,e[6]?Re(e[6],0,59):0,e[7]?Re(e[7],0,1/0)*1e3:0);return i.day=Re(e[3],0,i.calendar.getDaysInMonth(i)),i}function Th(t,e){let r=t.match(O_);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=Re(r[1],-9999,9999),i=n<1?"BC":"AD",s=new ur(i,n<1?-n+1:n,Re(r[2],1,12),1,r[11],0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);s.day=Re(r[3],0,s.calendar.getDaysInMonth(s));let o=Pn(s),a;if(r[8]){let l=Re(r[8],-23,23);if(s.offset=Math.sign(l)*(Math.abs(l)*36e5+Re(r[9]??"0",0,59)*6e4+Re(r[10]??"0",0,59)*1e3),a=In(s)-s.offset,!h_(o,s.timeZone).includes(a))throw new Error(`Offset ${Ih(s.offset)} is invalid for ${mu(s)} in ${s.timeZone}`)}else a=Ar(Pn(o),s.timeZone,e);return Dr(a,s.timeZone)}function T_(t,e){let r=t.match(hu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=Re(r[1],-9999,9999),i=n<1?"BC":"AD",s=new ur(i,n<1?-n+1:n,Re(r[2],1,12),1,e,0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);return s.day=Re(r[3],0,s.calendar.getDaysInMonth(s)),r[8]&&(s.offset=Re(r[8],-23,23)*36e5+Re(r[9]??"0",0,59)*6e4),_h(s,e)}function Re(t,e,r){let n=Number(t);if(n<e||n>r)throw new RangeError(`Value out of range: ${e} <= ${n} <= ${r}`);return n}function Ah(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function Dh(t){let e=jt(t,new Fi),r;return e.era==="BC"?r=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):r=String(e.year).padStart(4,"0"),`${r}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function mu(t){return`${Dh(t)}T${Ah(t)}`}function Ih(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let r=Math.floor(t/36e5),n=Math.floor(t%36e5/6e4),i=Math.floor(t%36e5%6e4/1e3),s=`${e}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function A_(t){return`${mu(t)}${Ih(t.offset)}[${t.timeZone}]`}function gu(t){let e=typeof t[0]=="object"?t.shift():new Fi,r;if(typeof t[0]=="string")r=t.shift();else{let o=e.getEras();r=o[o.length-1]}let n=t.shift(),i=t.shift(),s=t.shift();return[e,r,n,i,s]}class $n{#e;constructor(...e){let[r,n,i,s,o]=gu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,ti(this)}copy(){return this.era?new $n(this.calendar,this.era,this.year,this.month,this.day):new $n(this.calendar,this.year,this.month,this.day)}add(e){return ra(this,e)}subtract(e){return kh(this,e)}set(e){return cu(this,e)}cycle(e,r,n){return du(this,e,r,n)}toDate(e){return bh(this,e)}toString(){return Dh(this)}compare(e){return ch(this,e)}}class vu{#e;constructor(e=0,r=0,n=0,i=0){this.hour=e,this.minute=r,this.second=n,this.millisecond=i,Sh(this)}copy(){return new vu(this.hour,this.minute,this.second,this.millisecond)}add(e){return Eh(this,e)}subtract(e){return w_(this,e)}set(e){return Bs(this,e)}cycle(e,r,n){return fu(this,e,r,n)}toString(){return Ah(this)}compare(e){return dh(this,e)}}class Xr{#e;constructor(...e){let[r,n,i,s,o]=gu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,ti(this)}copy(){return this.era?new Xr(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Xr(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return ra(this,e)}subtract(e){return kh(this,e)}set(e){return cu(Bs(this,e),e)}cycle(e,r,n){switch(e){case"era":case"year":case"month":case"day":return du(this,e,r,n);default:return fu(this,e,r,n)}}toDate(e,r){return bh(this,e,r)}toString(){return mu(this)}compare(e){let r=ch(this,e);return r===0?dh(this,Pn(e)):r}}class ur{#e;constructor(...e){let[r,n,i,s,o]=gu(e),a=e.shift(),l=e.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,this.offset=l,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,ti(this)}copy(){return this.era?new ur(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new ur(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ch(this,e)}subtract(e){return k_(this,e)}set(e,r){return x_(this,e,r)}cycle(e,r,n){return S_(this,e,r,n)}toDate(){return y_(this)}toString(){return A_(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-v_(e,this.timeZone).toDate().getTime()}}let yu=new Map;class Ir{constructor(e,r={}){this.formatter=Ph(e,r),this.options=r}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(r)}`}formatRangeToParts(e,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(r);return[...n.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return P_()&&(this.resolvedHourCycle||(this.resolvedHourCycle=$_(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}}const D_={true:{ja:"h11"},false:{}};function Ph(t,e={}){if(typeof e.hour12=="boolean"&&I_()){e={...e};let i=D_[String(e.hour12)][t.split("-")[0]],s=e.hour12?"h12":"h23";e.hourCycle=i??s,delete e.hour12}let r=t+(e?Object.entries(e).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(yu.has(r))return yu.get(r);let n=new Intl.DateTimeFormat(t,e);return yu.set(r,n),n}let bu=null;function I_(){return bu==null&&(bu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),bu}let _u=null;function P_(){return _u==null&&(_u=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),_u}function $_(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let r=Ph(t,{...e,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function Us(t){return g_(T_(t,"Europe/Berlin")).toString().slice(0,-3)}function qs(t,e={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){return e={...e},new Date(t).toLocaleDateString(r,e)}function ia(t){if(t===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}let M_=1;function $h(t){return t.type==="Ticket"}function sa(t,e){return{...t,uid:M_++,selectedTime:e?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[t.ticket_type],shop_order:t.shop_order??0}}function Mn(t,e=""){return rb(Object.values(t).map(r=>sa(r,{selectedTime:e})),r=>r.shop_order)}function Fn(t,e=""){let r=Object.entries(t);return e!==""&&(r=r.filter(([,n])=>n.total_capacities?.[e]&&n.total_capacities[e]>0)),Object.fromEntries(r)}const F_=function(t,e,r,n){if(t.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!$h(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=t.quotaManager;s.clearPrecart();for(const l of[...n.items,...e.items]){const u=l.product;$h(u)&&s.setPrecartItemQuantity(u.id,l.quantity)}const o=s.ticketCapacity(i.id,i.selectedTime),a=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:a===0}};function Ws(t){return t.type==="Event"}function N_(t){return Ws(t)&&t.subtype==="scale"}let R_=1;function z_(t,e,r){const n={type:"Event",id:e,tax_included:!0,...t};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=t.title||"",r.price_description=t.description||""}return{uid:R_++,dateId:e,minAvailableCapacity:0,selectedTime:"",...r,...n,...t,type:"Event",subtype:t.scale_price_id===void 0?"flat":"scale"}}function wu(t,e,r){return z_(t,e,r)}const L_=function(t,e,r,n){if(t.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!Ws(r.product))throw new Error("(getMaxQuantitySeats) impossible");const s=r.product.dateId,o=t.allSeats[s];if(!o)return console.error("(getMaxQuantity) no seats found for dateId",s),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(o.max||100,o.max_per_registration||100,o.available??100),l={max_per_registration:a,available:100,overbook:!1,...o};let u=a;l.overbook&&(u=Math.min(l.max||100,l.max_per_registration||100));const c=n.totalQuantity,d=Gn(e.items.filter(v=>n.items.some(g=>g.uuid===v.uuid)),v=>v.quantity),f=Math.max(u-d-c+r.quantity,0);return{max:f,min:l.min??0,unavailable:l.available===0,bookedOut:f===0}},Z_=function(t,e,r,n){if(t.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function V_(t){return{apiData:t,_timeslots:[],addQuotas(n){this._timeslots=[],this.apiData={...this.apiData,...n}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(n,i){this.precart[n]=i,this._timeslots=[]},getPrecartItemQuantity(n){return this.precart[n]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([n,i])=>Object.keys(i.capacities).map(s=>{const o=Gn(i.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));return{timeSlot:s,quota:n,capacity:i.capacities[s]-o,tickets:i.ticket_ids,totalCapacity:i.total_capacities[s]}}))),this._timeslots},filterBy({timeslot:n,ticketId:i,date:s}={}){let o=this.timeslots();return i&&(o=o.filter(a=>a.tickets.includes(i))),n&&(o=o.filter(a=>a.timeSlot===n)),s&&(o=o.filter(a=>a.timeSlot.startsWith(s))),o.flatMap(a=>a.tickets.map(l=>({timeslot:n,ticket:l,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(n,i){return(Kf(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.capacity))??0)+this.getPrecartItemQuantity(n)},totalCapacity(n,i){return Kf(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.totalCapacity))??0},timeslotsOn(n){return Object.values(this.timeslots().filter(s=>s.timeSlot.startsWith(n.toString())).reduce((s,o)=>((!s[o.timeSlot]||o.capacity<s[o.timeSlot].capacity)&&(s[o.timeSlot]=o),s),{})).sort((s,o)=>s.timeSlot.localeCompare(o.timeSlot))}}}function j_(t){let e=0;Fo(()=>{pe(()=>{if(t.items.length===e)return;const r=t.items.length>e?"go-cart-item-added":"go-cart-item-removed";e=t.items.length,document.dispatchEvent(new CustomEvent(r,{detail:t.items.length}))})})}function pt(t,e){return{...{quantity:0,time:"",...e??{}},type:t.type,product:t,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(t.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity};case"Event":switch(t.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[t.scale_price_id]:this.quantity}};default:const s=t;throw new Error(`(orderAttributes) Unhandled Event subtype: ${s}`)}default:const i=t;throw new Error(`(orderAttributes) Unhandled product type: ${i}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),N_(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&n.push("discounted"),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){return this.time&&this.product.dynamic_prices?.[this.time]!=null?this.product.dynamic_prices[this.time]:this.product.price_cents},get price_formatted(){return Xt(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return Xt(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return Xt(this.total_price_cents)}}}function B_(t){const e=t.product.type;switch(e){case"Ticket":if(t.time&&!Mh(t.time))return;const r=sa(t.product);return pt(r,{time:t.time,quantity:t.quantity});case"Event":if(t.time&&!Mh(t.time))return;const n=wu(t.product,t.id);return pt(n,{time:t.time,quantity:t.quantity});default:const i=e;throw new Error(`Unhandled case: ${i}`)}}function U_(t){let e=[],r=[];try{const n=localStorage.getItem("go-cart");if(!n)return[];const i=JSON.parse(n);if(Array.isArray(i))e=i,r=[];else if(typeof i=="object"&&i!==null)e=i.items||[],r=i.coupons||[];else throw console.dir({parsed:i,content:n}),new Error("go-cart has invalid format");return e.length===0?t.clearItems():t.items=e.map(B_).filter(W_),t.clearCoupons(),r.forEach(s=>t.addCoupon(s)),t.items}catch(n){return console.error(n),localStorage.setItem("go-cart",JSON.stringify({items:[],coupons:[]})),[]}}function q_(t){U_(t);let e=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});localStorage.setItem("go-cart",e),Fo(()=>{pe(()=>{const r=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});r!==e&&(e=r,localStorage.setItem("go-cart",r))})})}const Mh=t=>{const e=new Date,r=new Date(t);return e<r},W_=t=>t!==void 0;let K_=0;function Ri(t,e=20){const r=Ne([]),n=Ne([]),s={items:r,coupons:n,paymentModeId:void 0,uid:`cart-${K_++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,Gn(this.items,o=>o.total_price_cents))},get totalQuantity(){return Gn(this.items,o=>o.quantity)},toString(){return this.uid+" > ["+this.items.map(o=>o.uuid+":"+o.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(o=>({type:o.type,attributes:o.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??S.settings?.defaultPaymentModeId,coupons:this.coupons,donations:[],affiliate:{},total:this.totalPriceCents}},get totalFormatted(){return Xt(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let a=this.items.length-1;a>=0;a--)this.items[a].uuid===o.uuid&&this.items.splice(a,1)},addItem(o){const a=this.items.find(l=>l.uuid===o.uuid);a?a.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(a=>this.addItem(a))},addCoupon(o){this.coupons.includes(o)||this.coupons.push(o)},removeCoupon(o){const a=this.coupons.indexOf(o);a>-1&&this.coupons.splice(a,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return t&&t.forEach(o=>s.addItem(pt(o))),s}function Xt(t){return t=t??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}function H_(){const t=Ne(Ri());return q_(t),j_(t),t}function oa(){return typeof window<"u"&&typeof localStorage<"u"}function Y_(t,e){if(oa())try{localStorage.setItem(t,JSON.stringify(e))}catch(r){console.warn(`Failed to save to localStorage (${t}):`,r)}}function ku(t){if(!oa())return null;try{const e=localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return console.warn(`Failed to load from localStorage (${t}):`,e),null}}function G_(t){if(oa())try{localStorage.removeItem(t)}catch(e){console.warn(`Failed to remove from localStorage (${t}):`,e)}}const Ks="go-capacity";function Fh(t,e){const r=ku(Ks),n={allSeats:{...r?.allSeats||{},...t},allQuotas:{...r?.allQuotas||{},...e}};Y_(Ks,n)}function Nh(t){const e=ku(Ks);if(e){if(e.allSeats)for(const r in e.allSeats){const n=parseInt(r);t.addSeats(n,e.allSeats[n],!1)}e.allQuotas&&t.addQuotas(e.allQuotas,!1)}}function J_(t){oa()&&window.addEventListener("storage",e=>{if(e.key===Ks&&Nh(t),e.key==="go-cart"){const r=ku("go-cart");(!r||!r.items||r.items.length===0)&&G_(Ks)}})}function Rh(){const t={allSeats:{},allQuotas:{},quotaManager:V_({}),addQuotas(e,r=!0){this.allQuotas={...this.allQuotas,...e},this.quotaManager.addQuotas(e),r&&Fh(this.allSeats,this.allQuotas)},addSeats(e,r,n=!0){this.allSeats[e]=r,n&&Fh(this.allSeats,this.allQuotas)},capacityPolicy(e){const r=e.product.type;switch(r){case"Ticket":const i=e.product.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:const l=i;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}case"Event":const o=e.product.subtype;switch(o){case"flat":case"scale":return"seats";default:const l=o;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}default:const a=r;throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}},capacity(e,r,n){const i=this.capacityPolicy(r),s={quotas:F_,seats:L_,unlimited:Z_}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ve(()=>s(this,e,r,n))}};return Nh(t),J_(t),t}function zh(t){if(typeof document>"u")return;const r=`; ${document.cookie}`.split(`; ${t}=`);if(r.length===2){const n=r.pop()?.split(";").shift();return n?decodeURIComponent(n):void 0}}class Lh{get isAuthenticated(){return this.isLoggedIn||this.isGuest}}class Q_ extends Lh{constructor(){super()}get isLoggedIn(){try{const e=zh("auth_headers");if(!e)return!1;const r=JSON.parse(e),n=Math.floor(Date.now()/1e3);return!r["access-token"]||parseInt(r.expiry,10)<n?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=zh("auth_headers");if(!e)return!0;const r=JSON.parse(e);return typeof r.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!0}}}class X_ extends Lh{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}}const ew=t=>{switch(t){case"angular":return new Q_;case"jmb":return new X_;default:let e=t;throw new Error("Unhandled shop type: "+e)}};function tw(t){return t==null||typeof t=="string"&&t.trim()===""}function rw(t,e){const r={};if(!e||e.length===0)return r;for(const n of e)(!(n in t)||tw(t[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function nw(t,e){return rw(t,e)}const iw={withStackTrace:!1},Zh=(t,e,r=iw)=>{const n=e.isOk()?{type:"Ok",value:e.value}:{type:"Err",value:e.error},i=r.withStackTrace?new Error().stack:void 0;return{data:n,message:t,stack:i}};function zi(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((n=n.apply(t,[])).next())})}function Vh(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ri(t){return this instanceof ri?(this.v=t,this):new ri(t)}function sw(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(f){n[f]&&(i[f]=function(p){return new Promise(function(v,g){s.push([f,p,v,g])>1||a(f,p)})})}function a(f,p){try{l(n[f](p))}catch(v){d(s[0][3],v)}}function l(f){f.value instanceof ri?Promise.resolve(f.value.v).then(u,c):d(s[0][2],f)}function u(f){a("next",f)}function c(f){a("throw",f)}function d(f,p){f(p),s.shift(),s.length&&a(s[0][0],s[0][1])}}function ow(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:ri(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function aw(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Vh=="function"?Vh(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,l){o=t[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}class _t{constructor(e){this._promise=e}static fromSafePromise(e){const r=e.then(n=>new tn(n));return new _t(r)}static fromPromise(e,r){const n=e.then(i=>new tn(i)).catch(i=>new Pr(r(i)));return new _t(n)}static fromThrowable(e,r){return(...n)=>new _t(zi(this,void 0,void 0,function*(){try{return new tn(yield e(...n))}catch(i){return new Pr(r?r(i):i)}}))}static combine(e){return lw(e)}static combineWithAllErrors(e){return uw(e)}map(e){return new _t(this._promise.then(r=>zi(this,void 0,void 0,function*(){return r.isErr()?new Pr(r.error):new tn(yield e(r.value))})))}andThrough(e){return new _t(this._promise.then(r=>zi(this,void 0,void 0,function*(){if(r.isErr())return new Pr(r.error);const n=yield e(r.value);return n.isErr()?new Pr(n.error):new tn(r.value)})))}andTee(e){return new _t(this._promise.then(r=>zi(this,void 0,void 0,function*(){if(r.isErr())return new Pr(r.error);try{yield e(r.value)}catch{}return new tn(r.value)})))}mapErr(e){return new _t(this._promise.then(r=>zi(this,void 0,void 0,function*(){return r.isOk()?new tn(r.value):new Pr(yield e(r.error))})))}andThen(e){return new _t(this._promise.then(r=>{if(r.isErr())return new Pr(r.error);const n=e(r.value);return n instanceof _t?n._promise:n}))}orElse(e){return new _t(this._promise.then(r=>zi(this,void 0,void 0,function*(){return r.isErr()?e(r.error):new tn(r.value)})))}match(e,r){return this._promise.then(n=>n.match(e,r))}unwrapOr(e){return this._promise.then(r=>r.unwrapOr(e))}safeUnwrap(){return sw(this,arguments,function*(){return yield ri(yield ri(yield*ow(aw(yield ri(this._promise.then(r=>r.safeUnwrap()))))))})}then(e,r){return this._promise.then(e,r)}}const Su=t=>new _t(Promise.resolve(new Pr(t))),jh=t=>{let e=ni([]);for(const r of t)if(r.isErr()){e=en(r.error);break}else e.map(n=>n.push(r.value));return e},lw=t=>_t.fromSafePromise(Promise.all(t)).andThen(jh),Bh=t=>{let e=ni([]);for(const r of t)r.isErr()&&e.isErr()?e.error.push(r.error):r.isErr()&&e.isOk()?e=en([r.error]):r.isOk()&&e.isOk()&&e.value.push(r.value);return e},uw=t=>_t.fromSafePromise(Promise.all(t)).andThen(Bh);var xu;(function(t){function e(i,s){return(...o)=>{try{const a=i(...o);return ni(a)}catch(a){return en(s?s(a):a)}}}t.fromThrowable=e;function r(i){return jh(i)}t.combine=r;function n(i){return Bh(i)}t.combineWithAllErrors=n})(xu||(xu={}));const ni=t=>new tn(t);function en(t){return new Pr(t)}class tn{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return ni(e(this.value))}mapErr(e){return ni(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(r=>this.value)}andTee(e){try{e(this.value)}catch{}return ni(this.value)}orElse(e){return ni(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return _t.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,r){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Zh("Called `_unsafeUnwrapErr` on an Ok",this,e)}}class Pr{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return en(this.error)}mapErr(e){return en(e(this.error))}andThrough(e){return en(this.error)}andTee(e){return en(this.error)}andThen(e){return en(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return Su(this.error)}asyncAndThrough(e){return Su(this.error)}asyncMap(e){return Su(this.error)}unwrapOr(e){return e}match(e,r){return r(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield en(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Zh("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}}xu.fromThrowable;const cw=/\{[^{}]+\}/g;function dw(){return Math.random().toString(36).slice(2,11)}function fw(t){let{baseUrl:e="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,headers:o,...a}={...t};e=Kh(e);const l=[];async function u(c,d){const{baseUrl:f,fetch:p=n,Request:v=r,headers:g,params:m={},parseAs:_="json",querySerializer:k,bodySerializer:D=s??pw,body:O,...P}=d||{};f&&(e=Kh(f));let C=typeof i=="function"?i:Wh(i);k&&(C=typeof k=="function"?k:Wh({...typeof i=="object"?i:{},...k}));const A=O===void 0?void 0:D(O),N=A===void 0||A instanceof FormData?{}:{"Content-Type":"application/json"},M={redirect:"follow",...a,...P,body:A,headers:gw(N,o,g,m.header)};let j,se,z=new r(mw(c,{baseUrl:e,params:m,querySerializer:C}),M);for(const W in P)W in z||(z[W]=P[W]);if(l.length){j=dw(),se=Object.freeze({baseUrl:e,fetch:p,parseAs:_,querySerializer:C,bodySerializer:D});for(const W of l)if(W&&typeof W=="object"&&typeof W.onRequest=="function"){const G=await W.onRequest({request:z,schemaPath:c,params:m,options:se,id:j});if(G){if(!(G instanceof r))throw new Error("onRequest: must return new Request() when modifying the request");z=G}}}let ue=await p(z);if(l.length)for(let W=l.length-1;W>=0;W--){const G=l[W];if(G&&typeof G=="object"&&typeof G.onResponse=="function"){const H=await G.onResponse({request:z,response:ue,schemaPath:c,params:m,options:se,id:j});if(H){if(!(H instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");ue=H}}}if(ue.status===204||ue.headers.get("Content-Length")==="0")return ue.ok?{data:{},response:ue}:{error:{},response:ue};if(ue.ok)return _==="stream"?{data:ue.body,response:ue}:{data:await ue[_](),response:ue};let ne=await ue.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:ue}}return{GET(c,d){return u(c,{...d,method:"GET"})},PUT(c,d){return u(c,{...d,method:"PUT"})},POST(c,d){return u(c,{...d,method:"POST"})},DELETE(c,d){return u(c,{...d,method:"DELETE"})},OPTIONS(c,d){return u(c,{...d,method:"OPTIONS"})},HEAD(c,d){return u(c,{...d,method:"HEAD"})},PATCH(c,d){return u(c,{...d,method:"PATCH"})},TRACE(c,d){return u(c,{...d,method:"TRACE"})},use(...c){for(const d of c)if(d){if(typeof d!="object"||!("onRequest"in d||"onResponse"in d))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");l.push(d)}},eject(...c){for(const d of c){const f=l.indexOf(d);f!==-1&&l.splice(f,1)}}}}function aa(t,e,r){if(e==null)return"";if(typeof e=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${r?.allowReserved===!0?e:encodeURIComponent(e)}`}function Uh(t,e,r){if(!e||typeof e!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const a in e)n.push(a,r.allowReserved===!0?e[a]:encodeURIComponent(e[a]));const o=n.join(",");switch(r.style){case"form":return`${t}=${o}`;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return o}}for(const o in e){const a=r.style==="deepObject"?`${t}[${o}]`:o;n.push(aa(a,e[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function qh(t,e,r){if(!Array.isArray(e))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?e:e.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return`${t}=${o}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of e)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(aa(t,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Wh(t){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){n.push(qh(i,s,{style:"form",explode:!0,...t?.array,allowReserved:t?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Uh(i,s,{style:"deepObject",explode:!0,...t?.object,allowReserved:t?.allowReserved||!1}));continue}n.push(aa(i,s,t))}}return n.join("&")}}function hw(t,e){let r=t;for(const n of t.match(cw)??[]){let i=n.substring(1,n.length-1),s=!1,o="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!e||e[i]===void 0||e[i]===null)continue;const a=e[i];if(Array.isArray(a)){r=r.replace(n,qh(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,Uh(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${aa(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function pw(t){return t instanceof FormData?t:JSON.stringify(t)}function mw(t,e){let r=`${e.baseUrl}${t}`;e.params?.path&&(r=hw(r,e.params.path));let n=e.querySerializer(e.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function gw(...t){const e=new Headers;for(const r of t){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)e.delete(i);else if(Array.isArray(s))for(const o of s)e.append(i,o);else s!==void 0&&e.set(i,s)}return e}function Kh(t){return t.endsWith("/")?t.substring(0,t.length-1):t}function vw(t,e){return fw({baseUrl:t,headers:{"X-Shop-Url":e}})}const yw="/api/v4/calendar",bw="/api/v4/tickets/calendar",_w="/api/v4/auth/validate_token",ww="/api/v4/tickets/list_and_quotas",kw="/api/v4/tickets",Sw="/api/v4/auth/sign_in",xw="/api/v4/auth",Hh={SHOP_GUEST:10,SHOP:20};class Ew{constructor(e,r,n,i="angular"){this.type=i,e&&r&&n&&this.load(e,r,n,i)}#e=ie(Ne({customerSalutations:[],countries:[],locales:[]}));#t={};async load(e,r,n,i="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),h(this.#e).urls=Hy(this.type),h(this.#e).currentUser=ew(this.type),h(this.#e).apiUrl=e,h(this.#e).shopDomain=r,h(this.#e).locale=n||"de",this.#t={},h(this.#e).client=vw(e,r),h(this.#e).capacityManager=Rh(),h(this.#e).cart=H_(),h(this.#e).auth=new Yf,h(this.#e).client.use(new ib(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return h(this.#e).capacityManager||(h(this.#e).capacityManager=Rh()),h(this.#e).capacityManager}get cart(){return h(this.#e).cart}get auth(){return h(this.#e).auth||(h(this.#e).auth=new Yf),h(this.#e).auth}get currentUser(){return h(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return h(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return this.shop?.translations}get currency(){return this.shop?.config.currency}t(e,r){return this.translate(e,r)}translate(e,r){if(!this.translations?.[e])return e;let n=this.translations[e];if(r&&n)for(const[i,s]of Object.entries(r))n=n.replace(`{{${i}}}`,s);return n||""}get apiUrl(){return h(this.#e).apiUrl}get shopDomain(){return h(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return h(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return h(this.#e)}validateToken(){return this.fetchAndCache(_w,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(bw,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(yw,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(ww,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:e})}tickets(e){return this.fetchAndCache(kw,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:e})}signIn(e){return this.apiPost(Sw,{body:e,requiredFields:["email","password"]})}signUp(e,r=!1){const n={addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:r?Hh.SHOP_GUEST:Hh.SHOP};e=Lt(n,e);let i=["name","surname","email","email_confirmation","terms"];return r||i.push("password","password_confirmation"),this.apiPost(xw,{body:e,requiredFields:i})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:e,cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const r=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===r)return this.#r.result;const n=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:r,result:n},n}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,r){return this.apiPost("/api/v4/annual/personalization/finalize",{body:r,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,r,n){const i=new FormData;return i.append("file",n),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:i,params:{path:{id:r},query:{token:e}}})}fetchAndCache(e,r,n,i){if(i??={},i.query??={},i.cache??=1e3,i.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),h(this.#e)[r];const s=Lt({per_page:1e3},i.query),o=e+JSON.stringify(s),a=!this.#t[o],l=this.#t[o]?.fetchedAt<Date.now()-i.cache*1e3;return(a||l)&&this.apiGet(e,s,i.path).then(u=>{u&&(h(this.#e)[r]=n===""?u:u[n])}),h(this.#e)[r]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums")}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions")}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,r){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:r},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getEventDetailsOnDate(e,r){return this.fetchAndCache(`/api/v4/events/${e}/dates/${r}`,`/api/v4/events/${e}/dates/${r}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events")}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours")}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises")}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries")}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return h(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,r){return this.apiCall(e,{method:"POST",...r})}async apiPut(e,r){return this.apiCall(e,{method:"PUT",...r})}async apiDELETE(e,r){return this.apiCall(e,{method:"DELETE",...r})}async apiUpload(e,r){this.#s();const{body:n,params:i={}}=r;return await this.client.POST(e,{body:n,params:Lt(this.#n,{params:i}).params,bodySerializer:o=>o})}async apiCall(e,r){this.#s();const{body:n,params:i={},requiredFields:s}=r,o=nw(n,s);if(Object.keys(o).length>0)return{error:{errors:o}};const a=this.client[r.method];return await a(e,{body:n,params:Lt(this.#n,{params:i}).params})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(r=>r.status==="fetching").length;)await Jy(10)}async apiGet(e,r={},n){this.#s();const i=e+JSON.stringify(r);this.#t[i]={status:"fetching",fetchedAt:Date.now()};let s=this.#n;r&&(s=Lt(s,{params:{query:r}})),e&&(s=Lt(s,{params:{path:n}}));const o=await this.client.GET(e,s);return this.#t[i]={status:"completed",fetchedAt:Date.now()},o.data||o}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}}const S=new Ew;function Li(t){return function(e,r){if(e)e.addEventListener(t,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}class Eu{constructor(e,r,n=1e3){this.host=e,this.KEY=r,this.pollDuration=n}#e=ie(Ne({value:void 0}));error=!1;static static(e){const r=new Eu(null,null);return r.value=e,r}load(){Kl(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return h(this.#e).value}set value(e){h(this.#e).value=e}}function Zi(t){return function(e,r={pollDuration:1e3}){if(e){const n=new Eu(e,t,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}let Cw={urls:{},navigateTo:t=>{window.location.assign(t)},forms:{},fields:{}};class Ow{defaultConfig=Lt(Cw,window.customOptions);override=this.defaultConfig;#e=ie(Ne({}));get options(){return h(this.#e)}set options(e){I(this.#e,e,!0)}constructor(){this.update()}update(){const e=Lt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((r,n)=>(r[n]={...this.defaultConfig.forms[n],...this.override.forms[n]},r),{}),this.options=e}get config(){return this.options}define(e){return this.override=Lt(this.override,e),this.update(),this}default(e){return this.defaultConfig=Lt(this.defaultConfig,e),this.update(),this}}const Qe=new Ow;class Yh{#e=ie();get token(){return h(this.#e)}set token(e){I(this.#e,e,!0)}#t=ie();get ticketSaleId(){return h(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){return this.token?gl(S.annualOrder(this.token)):void 0}get ticketSale(){if(this.ticketSaleId)return gl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Qe.config.urls.annualTicketPersonalizationForm?Qe.config.urls.annualTicketPersonalizationForm(this.token,e.id):S.urls.annualTicketPersonalizationForm(this.token,e.id)}}const Gh="go-annual-ticket-personalization",Jh=Li(Gh),Tw=Zi(Gh);var Aw=V("<li><a> </a></li>"),Dw=V('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function Iw(t,e){X(e,!0);let r=b(e,"token",7);const n=new Yh;Jh(e.$$host,n),pe(()=>{n.token=r()});let i=E(()=>n.order);var s={details:n,get token(){return r()},set token(u){r(u),y()}},o=q(),a=R(o);{var l=u=>{var c=q(),d=R(c);Le(d,17,()=>h(i).ticket_sales,f=>f.id,(f,p)=>{var v=Dw(),g=$(v),m=$(g,!0);T(g);var _=J(g,2),k=$(_,!0);T(_);var D=J(_,2);{var O=P=>{var C=Aw(),A=$(C),N=$(A,!0);T(A),T(C),oe((M,j)=>{Se(A,"href",M),te(N,j)},[()=>n.goToPersonalization(h(p)),()=>S.t("ticket.annual.personalization.list.personalize.add")]),w(P,C)};ae(D,P=>{h(p).status=="not_ready_to_send"&&P(O)})}T(v),oe(P=>{Se(v,"data-ticket-sale-id",h(p).id),te(m,h(p).title),te(k,P)},[()=>S.t("ticket.annual.personalization.detail.title",{count:h(p).personalizations.length})]),w(f,v)}),w(u,c)};ae(a,u=>{h(i)&&u(l)})}return w(t,o),ee(s)}customElements.define("go-annual-ticket-personalization",re(Iw,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));function K(t,e,r){function n(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);const u=o.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in a||(a[f]=u[f].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function o(a){var l;const u=r?.Parent?new s:this;n(u,a),(l=u._zod).deferred??(l.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class Vi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Qh extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Pw={};function ii(t){return Pw}function Cu(t,e){return typeof e=="bigint"?e.toString():e}function Ou(t){return t==null}function Tu(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}const Xh=Symbol("evaluating");function je(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Xh)return n===void 0&&(n=Xh,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function $w(...t){const e={};for(const r of t){const n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function Mw(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ep="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function tp(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Au(t){if(tp(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const r=e.prototype;return!(tp(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function rp(t){return Au(t)?{...t}:Array.isArray(t)?[...t]:t}function Du(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fw(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Ee(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function ji(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Nw(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function la(t){return typeof t=="string"?t:t?.message}function si(t,e,r){const n={...t,path:t.path??[]};if(!t.message){const i=la(t.inst?._zod.def?.error?.(t))??la(e?.error?.(t))??la(r.customError?.(t))??la(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Iu(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Hs(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}const np=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Cu,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ip=K("$ZodError",np),sp=K("$ZodError",np,{Parent:Error});function Rw(t,e=r=>r.message){const r={},n=[];for(const i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function zw(t,e=r=>r.message){const r={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(e(s));else{let o=r,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(s))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return n(t),r}const Pu=t=>(e,r,n,i)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new Vi;if(o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>si(l,s,ii())));throw ep(a,i?.callee),a}return o.value},$u=t=>async(e,r,n,i)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>si(l,s,ii())));throw ep(a,i?.callee),a}return o.value},ua=t=>(e,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Vi;return s.issues.length?{success:!1,error:new(t??ip)(s.issues.map(o=>si(o,i,ii())))}:{success:!0,data:s.value}},Lw=ua(sp),ca=t=>async(e,r,n)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>si(o,i,ii())))}:{success:!0,data:s.value}},Zw=ca(sp),Vw=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Pu(t)(e,r,i)},jw=t=>(e,r,n)=>Pu(t)(e,r,n),Bw=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return $u(t)(e,r,i)},Uw=t=>async(e,r,n)=>$u(t)(e,r,n),qw=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ua(t)(e,r,i)},Ww=t=>(e,r,n)=>ua(t)(e,r,n),Kw=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ca(t)(e,r,i)},Hw=t=>async(e,r,n)=>ca(t)(e,r,n),Yw=/^[cC][^\s-]{8,}$/,Gw=/^[0-9a-z]+$/,Jw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Qw=/^[0-9a-vA-V]{20}$/,Xw=/^[A-Za-z0-9]{27}$/,e0=/^[a-zA-Z0-9_-]{21}$/,t0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,r0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,op=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,n0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,i0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function s0(){return new RegExp(i0,"u")}const o0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,a0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,l0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,u0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,c0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ap=/^[A-Za-z0-9_-]*$/,d0=/^\+[1-9]\d{6,14}$/,lp="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",f0=new RegExp(`^${lp}$`);function up(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function h0(t){return new RegExp(`^${up(t)}$`)}function p0(t){const e=up({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${lp}T(?:${n})$`)}const m0=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},g0=/^[^A-Z]*$/,v0=/^[^a-z]*$/,$r=K("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),y0=K("$ZodCheckMaxLength",(t,e)=>{var r;$r.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Ou(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const i=n.value;if(i.length<=e.maximum)return;const o=Iu(i);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),b0=K("$ZodCheckMinLength",(t,e)=>{var r;$r.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Ou(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const i=n.value;if(i.length>=e.minimum)return;const o=Iu(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),_0=K("$ZodCheckLengthEquals",(t,e)=>{var r;$r.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Ou(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{const i=n.value,s=i.length;if(s===e.length)return;const o=Iu(i),a=s>e.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),da=K("$ZodCheckStringFormat",(t,e)=>{var r,n;$r.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),w0=K("$ZodCheckRegex",(t,e)=>{da.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),k0=K("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=g0),da.init(t,e)}),S0=K("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=v0),da.init(t,e)}),x0=K("$ZodCheckIncludes",(t,e)=>{$r.init(t,e);const r=Du(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),E0=K("$ZodCheckStartsWith",(t,e)=>{$r.init(t,e);const r=new RegExp(`^${Du(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),C0=K("$ZodCheckEndsWith",(t,e)=>{$r.init(t,e);const r=new RegExp(`.*${Du(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}}),O0=K("$ZodCheckOverwrite",(t,e)=>{$r.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),T0={major:4,minor:3,patch:6},wt=K("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=T0;const n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(const i of n)for(const s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(o,a,l)=>{let u=ji(o),c;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(u)continue;const f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&l?.async===!1)throw new Vi;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(u||(u=ji(o,f)))});else{if(o.issues.length===f)continue;u||(u=ji(o,f))}}return c?c.then(()=>o):o},s=(o,a,l)=>{if(ji(o))return o.aborted=!0,o;const u=i(a,n,l);if(u instanceof Promise){if(l.async===!1)throw new Vi;return u.then(c=>t._zod.parse(c,l))}return t._zod.parse(u,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const u=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(c=>s(c,o,a)):s(u,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new Vi;return l.then(u=>i(u,n,a))}return i(l,n,a)}}je(t,"~standard",()=>({validate:i=>{try{const s=Lw(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Zw(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Mu=K("$ZodString",(t,e)=>{wt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??m0(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),Ge=K("$ZodStringFormat",(t,e)=>{da.init(t,e),Mu.init(t,e)}),A0=K("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=r0),Ge.init(t,e)}),D0=K("$ZodUUID",(t,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=op(n))}else e.pattern??(e.pattern=op());Ge.init(t,e)}),I0=K("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=n0),Ge.init(t,e)}),P0=K("$ZodURL",(t,e)=>{Ge.init(t,e),t._zod.check=r=>{try{const n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),$0=K("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=s0()),Ge.init(t,e)}),M0=K("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=e0),Ge.init(t,e)}),F0=K("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Yw),Ge.init(t,e)}),N0=K("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Gw),Ge.init(t,e)}),R0=K("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Jw),Ge.init(t,e)}),z0=K("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Qw),Ge.init(t,e)}),L0=K("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Xw),Ge.init(t,e)}),Z0=K("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=p0(e)),Ge.init(t,e)}),V0=K("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=f0),Ge.init(t,e)}),j0=K("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=h0(e)),Ge.init(t,e)}),B0=K("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=t0),Ge.init(t,e)}),U0=K("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=o0),Ge.init(t,e),t._zod.bag.format="ipv4"}),q0=K("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=a0),Ge.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),W0=K("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=l0),Ge.init(t,e)}),K0=K("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=u0),Ge.init(t,e),t._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function cp(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const H0=K("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=c0),Ge.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{cp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function Y0(t){if(!ap.test(t))return!1;const e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return cp(r)}const G0=K("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=ap),Ge.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{Y0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),J0=K("$ZodE164",(t,e)=>{e.pattern??(e.pattern=d0),Ge.init(t,e)});function Q0(t,e=null){try{const r=t.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const X0=K("$ZodJWT",(t,e)=>{Ge.init(t,e),t._zod.check=r=>{Q0(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});function dp(t,e,r){t.issues.length&&e.issues.push(...Nw(r,t.issues)),e.value[r]=t.value}const ek=K("$ZodArray",(t,e)=>{wt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],l=e.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(u=>dp(u,r,o))):dp(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function fp(t,e,r,n){for(const s of t)if(s.issues.length===0)return e.value=s.value,e;const i=t.filter(s=>!ji(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(o=>si(o,n,ii())))}),e)}const tk=K("$ZodUnion",(t,e)=>{wt.init(t,e),je(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),je(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),je(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),je(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>Tu(s.source)).join("|")})$`)}});const r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1;const a=[];for(const l of e.options){const u=l._zod.run({value:i.value,issues:[]},s);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(l=>fp(l,i,t,s)):fp(a,i,t,s)}}),rk=K("$ZodIntersection",(t,e)=>{wt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value,s=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([l,u])=>hp(r,l,u)):hp(r,s,o)}});function Fu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Au(t)&&Au(e)){const r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),i={...t,...e};for(const s of n){const o=Fu(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<t.length;n++){const i=t[n],s=e[n],o=Fu(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function hp(t,e,r){const n=new Map;let i;for(const a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else t.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else t.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&t.issues.push({...i,keys:s}),ji(t))return t;const o=Fu(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const nk=K("$ZodTransform",(t,e)=>{wt.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Qh(t.constructor.name);const i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new Vi;return r.value=i,r}});function pp(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const mp=K("$ZodOptional",(t,e)=>{wt.init(t,e),t._zod.optin="optional",t._zod.optout="optional",je(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),je(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Tu(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>pp(s,r.value)):pp(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),ik=K("$ZodExactOptional",(t,e)=>{mp.init(t,e),je(t._zod,"values",()=>e.innerType._zod.values),je(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),sk=K("$ZodNullable",(t,e)=>{wt.init(t,e),je(t._zod,"optin",()=>e.innerType._zod.optin),je(t._zod,"optout",()=>e.innerType._zod.optout),je(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Tu(r.source)}|null)$`):void 0}),je(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),ok=K("$ZodDefault",(t,e)=>{wt.init(t,e),t._zod.optin="optional",je(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>gp(s,e)):gp(i,e)}});function gp(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const ak=K("$ZodPrefault",(t,e)=>{wt.init(t,e),t._zod.optin="optional",je(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),lk=K("$ZodNonOptional",(t,e)=>{wt.init(t,e),je(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>vp(s,t)):vp(i,t)}});function vp(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const uk=K("$ZodCatch",(t,e)=>{wt.init(t,e),je(t._zod,"optin",()=>e.innerType._zod.optin),je(t._zod,"optout",()=>e.innerType._zod.optout),je(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(o=>si(o,n,ii()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(s=>si(s,n,ii()))},input:r.value}),r.issues=[]),r)}}),ck=K("$ZodPipe",(t,e)=>{wt.init(t,e),je(t._zod,"values",()=>e.in._zod.values),je(t._zod,"optin",()=>e.in._zod.optin),je(t._zod,"optout",()=>e.out._zod.optout),je(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=e.out._zod.run(r,n);return s instanceof Promise?s.then(o=>fa(o,e.in,n)):fa(s,e.in,n)}const i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>fa(s,e.out,n)):fa(i,e.out,n)}});function fa(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}const dk=K("$ZodReadonly",(t,e)=>{wt.init(t,e),je(t._zod,"propValues",()=>e.innerType._zod.propValues),je(t._zod,"values",()=>e.innerType._zod.values),je(t._zod,"optin",()=>e.innerType?._zod?.optin),je(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(yp):yp(i)}});function yp(t){return t.value=Object.freeze(t.value),t}const fk=K("$ZodCustom",(t,e)=>{$r.init(t,e),wt.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{const n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(s=>bp(s,r,n,t));bp(i,r,n,t)}});function bp(t,e,r,n){if(!t){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(Hs(i))}}var _p;class hk{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){const n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function pk(){return new hk}(_p=globalThis).__zod_globalRegistry??(_p.__zod_globalRegistry=pk());const Ys=globalThis.__zod_globalRegistry;function mk(t,e){return new t({type:"string",...Ee(e)})}function gk(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Ee(e)})}function wp(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(e)})}function vk(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(e)})}function yk(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(e)})}function bk(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(e)})}function _k(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(e)})}function wk(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Ee(e)})}function kk(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(e)})}function Sk(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(e)})}function xk(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(e)})}function Ek(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(e)})}function Ck(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(e)})}function Ok(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(e)})}function Tk(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(e)})}function Ak(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(e)})}function Dk(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(e)})}function Ik(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(e)})}function Pk(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(e)})}function $k(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(e)})}function Mk(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(e)})}function Fk(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(e)})}function Nk(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(e)})}function Rk(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(e)})}function zk(t,e){return new t({type:"string",format:"date",check:"string_format",...Ee(e)})}function Lk(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Ee(e)})}function Zk(t,e){return new t({type:"string",format:"duration",check:"string_format",...Ee(e)})}function kp(t,e){return new y0({check:"max_length",...Ee(e),maximum:t})}function ha(t,e){return new b0({check:"min_length",...Ee(e),minimum:t})}function Sp(t,e){return new _0({check:"length_equals",...Ee(e),length:t})}function Vk(t,e){return new w0({check:"string_format",format:"regex",...Ee(e),pattern:t})}function jk(t){return new k0({check:"string_format",format:"lowercase",...Ee(t)})}function Bk(t){return new S0({check:"string_format",format:"uppercase",...Ee(t)})}function Uk(t,e){return new x0({check:"string_format",format:"includes",...Ee(e),includes:t})}function qk(t,e){return new E0({check:"string_format",format:"starts_with",...Ee(e),prefix:t})}function Wk(t,e){return new C0({check:"string_format",format:"ends_with",...Ee(e),suffix:t})}function Bi(t){return new O0({check:"overwrite",tx:t})}function Kk(t){return Bi(e=>e.normalize(t))}function Hk(){return Bi(t=>t.trim())}function Yk(){return Bi(t=>t.toLowerCase())}function Gk(){return Bi(t=>t.toUpperCase())}function Jk(){return Bi(t=>Mw(t))}function Qk(t,e,r){return new t({type:"array",element:e,...Ee(r)})}function Xk(t,e,r){return new t({type:"custom",check:"custom",fn:e,...Ee(r)})}function eS(t){const e=tS(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Hs(n,r.value,e._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(Hs(i))}},t(r.value,r)));return e}function tS(t,e){const r=new $r({check:"custom",...Ee(e)});return r._zod.check=t,r}function xp(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Ys,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function kt(t,e,r={path:[],schemaPath:[]}){var n;const i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);const a=t._zod.toJSONSchema?.();if(a)o.schema=a;else{const c={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,c);else{const f=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,c)}const d=t._zod.parent;d&&(o.ref||(o.ref=d),kt(d,e,c),e.seen.get(d).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&St(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function Ep(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of t.seen.entries()){const a=t.metadataRegistry.get(o[0])?.id;if(a){const l=n.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}const i=o=>{const a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const d=t.external.registry.get(o[0])?.id,f=t.external.uri??(v=>v);if(d)return{ref:f(d)};const p=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const u=`#/${a}/`,c=o[1].schema.id??`__schema${t.counter++}`;return{defId:c,ref:u+c}},s=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:u}=i(o);a.def={...a.schema},u&&(a.defId=u);const c=a.schema;for(const d in c)delete c[d];c.$ref=l};if(t.cycles==="throw")for(const o of t.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
1
+ var Ny=gr=>{throw TypeError(gr)};var JM=(gr,Ar,Bn)=>Ar.has(gr)||Ny("Cannot "+Bn);var Fy=(gr,Ar,Bn)=>(JM(gr,Ar,"read from private field"),Bn?Bn.call(gr):Ar.get(gr)),Ry=(gr,Ar,Bn)=>Ar.has(gr)?Ny("Cannot add the same private member more than once"):Ar instanceof WeakSet?Ar.add(gr):Ar.set(gr,Bn);(function(){"use strict";var Hl;typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Ar=1,Bn=2,bf=4,Ly=8,zy=16,Zy=1,Vy=2,Uy=4,By=8,jy=16,qy=1,Wy=2,wf="[",na="[!",Ql="]",yi={},mt=Symbol(),Hy="http://www.w3.org/1999/xhtml",kf="@attach",Xl=!1;var ia=Array.isArray,Ky=Array.prototype.indexOf,Hi=Array.prototype.includes,sa=Array.from,oa=Object.keys,aa=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,Sf=Object.getOwnPropertyDescriptors,xf=Object.prototype,Gy=Array.prototype,la=Object.getPrototypeOf,Ef=Object.isExtensible;function zs(t){return typeof t=="function"}const Ue=()=>{};function Yy(t){return t()}function ec(t){for(var e=0;e<t.length;e++)t[e]()}function Tf(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const _t=2,ca=4,Zs=8,tc=1<<24,hn=16,Cr=32,jn=64,rc=128,vr=512,gt=1024,It=2048,pn=4096,ir=8192,mn=16384,ua=32768,qn=65536,Af=1<<17,Cf=1<<18,_i=1<<19,Of=1<<20,gn=1<<25,bi=32768,nc=1<<21,ic=1<<22,Wn=1<<23,qr=Symbol("$state"),sc=Symbol("legacy props"),Jy=Symbol(""),Ki=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},da=3,Hn=8;function Df(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Qy(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Xy(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function e_(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function t_(t){throw new Error("https://svelte.dev/e/effect_orphan")}function r_(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function n_(){throw new Error("https://svelte.dev/e/hydration_failed")}function i_(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function s_(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function o_(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function a_(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function l_(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Vs(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function c_(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function u_(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let Ee=!1;function Pt(t){Ee=t}let Pe;function bt(t){if(t===null)throw Vs(),yi;return Pe=t}function vn(){return bt(Ir(Pe))}function I(t){if(Ee){if(Ir(Pe)!==null)throw Vs(),yi;Pe=t}}function Mt(t=1){if(Ee){for(var e=t,r=Pe;e--;)r=Ir(r);Pe=r}}function fa(t=!0){for(var e=0,r=Pe;;){if(r.nodeType===Hn){var n=r.data;if(n===Ql){if(e===0)return r;e-=1}else(n===wf||n===na)&&(e+=1)}var i=Ir(r);t&&r.remove(),r=i}}function If(t){if(!t||t.nodeType!==Hn)throw Vs(),yi;return t.data}function Pf(t){return t===this.v}function d_(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Mf(t){return!d_(t,this.v)}let Gi=!1,f_=!1;function h_(){Gi=!0}const p_=[];function oc(t,e=!1,r=!1){return ha(t,new Map,"",p_,null,r)}function ha(t,e,r,n,i=null,s=!1){if(typeof t=="object"&&t!==null){var o=e.get(t);if(o!==void 0)return o;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(ia(t)){var a=Array(t.length);e.set(t,a),i!==null&&e.set(i,a);for(var l=0;l<t.length;l+=1){var c=t[l];l in t&&(a[l]=ha(c,e,r,n,null,s))}return a}if(la(t)===xf){a={},e.set(t,a),i!==null&&e.set(i,a);for(var u in t)a[u]=ha(t[u],e,r,n,null,s);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!s)return ha(t.toJSON(),e,r,n,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}let rt=null;function Yi(t){rt=t}function $f(t){return ac().get(t)}function m_(t,e){return ac().set(t,e),e}function g_(t){return ac().has(t)}function ne(t,e=!1,r){rt={p:rt,i:!1,c:null,e:null,s:t,x:null,l:Gi&&!e?{s:null,u:null,$:[]}:null}}function ie(t){var e=rt,r=e.e;if(r!==null){e.e=null;for(var n of r)ah(n)}return t!==void 0&&(e.x=t),e.i=!0,rt=e.p,t??{}}function Us(){return!Gi||rt!==null&&rt.l===null}function ac(t){return rt===null&&Df(),rt.c??=new Map(v_(rt)||void 0)}function v_(t){let e=t.p;for(;e!==null;){const r=e.c;if(r!==null)return r;e=e.p}return null}let wi=[];function Nf(){var t=wi;wi=[],ec(t)}function sr(t){if(wi.length===0&&!Bs){var e=wi;queueMicrotask(()=>{e===wi&&Nf()})}wi.push(t)}function y_(){for(;wi.length>0;)Nf()}function Ff(t){var e=$e;if(e===null)return Me.f|=Wn,t;if((e.f&ua)===0){if((e.f&rc)===0)throw t;e.b.error(t)}else Ji(t,e)}function Ji(t,e){for(;e!==null;){if((e.f&rc)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t}const __=-7169;function ft(t,e){t.f=t.f&__|e}function lc(t){(t.f&vr)!==0||t.deps===null?ft(t,gt):ft(t,pn)}function Rf(t){if(t!==null)for(const e of t)(e.f&_t)===0||(e.f&bi)===0||(e.f^=bi,Rf(e.deps))}function Lf(t,e,r){(t.f&It)!==0?e.add(t):(t.f&pn)!==0&&r.add(t),Rf(t.deps),ft(t,gt)}const pa=new Set;let ze=null,ma=null,Or=null,or=[],ga=null,cc=!1,Bs=!1;class yn{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#i=null;#s=new Set;#a=new Set;skipped_effects=new Set;is_fork=!1;#o=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){or=[],this.apply();var r=[],n=[];for(const i of e)this.#l(i,r,n);if(this.is_deferred()){this.#c(n),this.#c(r);for(const i of this.skipped_effects)Bf(i)}else{for(const i of this.#e)i();this.#e.clear(),this.#r===0&&this.#d(),ma=this,ze=null,Zf(n),Zf(r),ma=null,this.#i?.resolve()}Or=null}#l(e,r,n){e.f^=gt;for(var i=e.first,s=null;i!==null;){var o=i.f,a=(o&(Cr|jn))!==0,l=a&&(o&gt)!==0,c=l||(o&ir)!==0||this.skipped_effects.has(i);if(!c&&i.fn!==null){a?i.f^=gt:s!==null&&(o&(ca|Zs|tc))!==0?s.b.defer_effect(i):(o&ca)!==0?r.push(i):Ws(i)&&((o&hn)!==0&&this.#a.add(i),Hs(i));var u=i.first;if(u!==null){i=u;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)d===s&&(s=null),i=d.next,d=d.parent}}#c(e){for(var r=0;r<e.length;r+=1)Lf(e[r],this.#s,this.#a)}capture(e,r){r!==mt&&!this.previous.has(e)&&this.previous.set(e,r),(e.f&Wn)===0&&(this.current.set(e,e.v),Or?.set(e,e.v))}activate(){ze=this,this.apply()}deactivate(){ze===this&&(ze=null,Or=null)}flush(){if(this.activate(),or.length>0){if(zf(),ze!==null&&ze!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if(pa.size>1){this.previous.clear();var e=Or,r=!0;for(const i of pa){if(i===this){r=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(r&&l!==i.current.get(a))i.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var n=or;or=[];const a=new Set,l=new Map;for(const c of s)Vf(c,o,a,l);if(or.length>0){ze=i,i.apply();for(const c of or)i.#l(c,[],[]);i.deactivate()}or=n}}ze=null,Or=e}this.committed=!0,pa.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),!this.#o&&(this.#o=!0,sr(()=>{this.#o=!1,this.is_deferred()?or.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#s)this.#a.delete(e),ft(e,It),bn(e);for(const e of this.#a)ft(e,pn),bn(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=Tf()).promise}static ensure(){if(ze===null){const e=ze=new yn;pa.add(ze),Bs||sr(()=>{ze===e&&e.flush()})}return ze}apply(){}}function y(t){var e=Bs;Bs=!0;try{for(var r;;){if(y_(),or.length===0&&(ze?.flush(),or.length===0))return ga=null,r;zf()}}finally{Bs=e}}function zf(){cc=!0;var t=null;try{for(var e=0;or.length>0;){var r=yn.ensure();if(e++>1e3){var n,i;b_()}r.process(or),Kn.clear()}}finally{cc=!1,ga=null}}function b_(){try{r_()}catch(t){Ji(t,ga)}}let _n=null;function Zf(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(mn|ir))===0&&Ws(n)&&(_n=new Set,Hs(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?fh(n):n.fn=null),_n?.size>0)){Kn.clear();for(const i of _n){if((i.f&(mn|ir))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)_n.has(o)&&(_n.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(mn|ir))===0&&Hs(l)}}_n.clear()}}_n=null}}function Vf(t,e,r,n){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const i of t.reactions){const s=i.f;(s&_t)!==0?Vf(i,e,r,n):(s&(ic|hn))!==0&&(s&It)===0&&Uf(i,e,n)&&(ft(i,It),bn(i))}}function Uf(t,e,r){const n=r.get(t);if(n!==void 0)return n;if(t.deps!==null)for(const i of t.deps){if(Hi.call(e,i))return!0;if((i.f&_t)!==0&&Uf(i,e,r))return r.set(i,!0),!0}return r.set(t,!1),!1}function bn(t){for(var e=ga=t;e.parent!==null;){e=e.parent;var r=e.f;if(cc&&e===$e&&(r&hn)!==0&&(r&Cf)===0)return;if((r&(jn|Cr))!==0){if((r&gt)===0)return;e.f^=gt}}or.push(e)}function Bf(t){if(!((t.f&Cr)!==0&&(t.f&gt)!==0)){ft(t,gt);for(var e=t.first;e!==null;)Bf(e),e=e.next}}function uc(t){let e=0,r=Gn(0),n;return()=>{gc()&&(h(r),Xi(()=>(e===0&&(n=Ge(()=>t(()=>Wr(r)))),e+=1,()=>{sr(()=>{e-=1,e===0&&(n?.(),n=void 0,Wr(r))})})))}}var w_=qn|_i|rc;function k_(t,e,r){new S_(t,e,r)}class S_{parent;is_pending=!1;#e;#t=Ee?Pe:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#c=null;#d=0;#u=0;#f=!1;#h=!1;#p=new Set;#m=new Set;#g=null;#v=uc(()=>(this.#g=Gn(this.#d),()=>{this.#g=null}));constructor(e,r,n){this.#e=e,this.#r=r,this.#n=n,this.parent=$e.b,this.is_pending=!!this.#r.pending,this.#i=qs(()=>{if($e.b=this,Ee){const s=this.#t;vn(),s.nodeType===Hn&&s.data===na?this.#_():(this.#y(),this.#u===0&&(this.is_pending=!1))}else{var i=this.#k();try{this.#s=Ht(()=>n(i))}catch(s){this.error(s)}this.#u>0?this.#w():this.is_pending=!1}return()=>{this.#c?.remove()}},w_),Ee&&(this.#e=Pe)}#y(){try{this.#s=Ht(()=>this.#n(this.#e))}catch(e){this.error(e)}}#_(){const e=this.#r.pending;e&&(this.#a=Ht(()=>e(this.#e)),sr(()=>{var r=this.#k();this.#s=this.#b(()=>(yn.ensure(),Ht(()=>this.#n(r)))),this.#u>0?this.#w():(ki(this.#a,()=>{this.#a=null}),this.is_pending=!1)}))}#k(){var e=this.#e;return this.is_pending&&(this.#c=Wt(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){Lf(e,this.#p,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#b(e){var r=$e,n=Me,i=rt;_r(this.#i),Kt(this.#i),Yi(this.#i.ctx);try{return e()}catch(s){return Ff(s),null}finally{_r(r),Kt(n),Yi(i)}}#w(){const e=this.#r.pending;this.#s!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),mh(this.#s,this.#l)),this.#a===null&&(this.#a=Ht(()=>e(this.#e)))}#S(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e);return}if(this.#u+=e,this.#u===0){this.is_pending=!1;for(const r of this.#p)ft(r,It),bn(r);for(const r of this.#m)ft(r,pn),bn(r);this.#p.clear(),this.#m.clear(),this.#a&&ki(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#S(e),this.#d+=e,!(!this.#g||this.#f)&&(this.#f=!0,sr(()=>{this.#f=!1,this.#g&&Qi(this.#g,this.#d)}))}get_effect_pending(){return this.#v(),h(this.#g)}error(e){var r=this.#r.onerror;let n=this.#r.failed;if(this.#h||!r&&!n)throw e;this.#s&&(vt(this.#s),this.#s=null),this.#a&&(vt(this.#a),this.#a=null),this.#o&&(vt(this.#o),this.#o=null),Ee&&(bt(this.#t),Mt(),bt(fa()));var i=!1,s=!1;const o=()=>{if(i){u_();return}i=!0,s&&l_(),yn.ensure(),this.#d=0,this.#o!==null&&ki(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#b(()=>(this.#h=!1,Ht(()=>this.#n(this.#e)))),this.#u>0?this.#w():this.is_pending=!1};sr(()=>{try{s=!0,r?.(e,o),s=!1}catch(a){Ji(a,this.#i&&this.#i.parent)}n&&(this.#o=this.#b(()=>{yn.ensure(),this.#h=!0;try{return Ht(()=>{n(this.#e,()=>e,()=>o)})}catch(a){return Ji(a,this.#i.parent),null}finally{this.#h=!1}}))})}}function jf(t,e,r,n){const i=Us()?js:fc;var s=t.filter(f=>!f.settled);if(r.length===0&&s.length===0){n(e.map(i));return}var o=ze,a=$e,l=x_(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(f=>f.promise)):null;function u(f){l();try{n(f)}catch(p){(a.f&mn)===0&&Ji(p,a)}o?.deactivate(),dc()}if(r.length===0){c.then(()=>u(e.map(i)));return}function d(){l(),Promise.all(r.map(f=>E_(f))).then(f=>u([...e.map(i),...f])).catch(f=>Ji(f,a))}c?c.then(d):d()}function x_(){var t=$e,e=Me,r=rt,n=ze;return function(s=!0){_r(t),Kt(e),Yi(r),s&&n?.activate()}}function dc(){_r(null),Kt(null),Yi(null)}function js(t){var e=_t|It,r=Me!==null&&(Me.f&_t)!==0?Me:null;return $e!==null&&($e.f|=_i),{ctx:rt,deps:null,effects:null,equals:Pf,f:e,fn:t,reactions:null,rv:0,v:mt,wv:0,parent:r??$e,ac:null}}function E_(t,e,r){let n=$e;n===null&&Qy();var i=n.b,s=void 0,o=Gn(mt),a=!Me,l=new Map;return P_(()=>{var c=Tf();s=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{u===ze&&u.committed&&u.deactivate(),dc()})}catch(p){c.reject(p),dc()}var u=ze;if(a){var d=i.is_rendered();i.update_pending_count(1),u.increment(d),l.get(u)?.reject(Ki),l.delete(u),l.set(u,c)}const f=(p,v=void 0)=>{if(u.activate(),v)v!==Ki&&(o.f|=Wn,Qi(o,v));else{(o.f&Wn)!==0&&(o.f^=Wn),Qi(o,p);for(const[g,m]of l){if(l.delete(g),g===u)break;m.reject(Ki)}}a&&(i.update_pending_count(-1),u.decrement(d))};c.promise.then(f,p=>f(null,p||"unknown"))}),_a(()=>{for(const c of l.values())c.reject(Ki)}),new Promise(c=>{function u(d){function f(){d===s?c(o):u(s)}d.then(f,f)}u(s)})}function C(t){const e=js(t);return vh(e),e}function fc(t){const e=js(t);return e.equals=Mf,e}function qf(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)vt(e[r])}}function T_(t){for(var e=t.parent;e!==null;){if((e.f&_t)===0)return(e.f&mn)===0?e:null;e=e.parent}return null}function hc(t){var e,r=$e;_r(T_(t));try{t.f&=~bi,qf(t),e=kh(t)}finally{_r(r)}return e}function Wf(t){var e=hc(t);if(!t.equals(e)&&(t.wv=bh(),(!ze?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){ft(t,gt);return}Yn||(Or!==null?(gc()||ze?.is_fork)&&Or.set(t,e):lc(t))}let pc=new Set;const Kn=new Map;let Hf=!1;function Gn(t,e){var r={f:0,v:t,reactions:null,equals:Pf,rv:0,wv:0};return r}function le(t,e){const r=Gn(t);return vh(r),r}function Kf(t,e=!1,r=!0){const n=Gn(t);return e||(n.equals=Mf),Gi&&r&&rt!==null&&rt.l!==null&&(rt.l.s??=[]).push(n),n}function M(t,e,r=!1){Me!==null&&(!Pr||(Me.f&Af)!==0)&&Us()&&(Me.f&(_t|hn|ic|Af))!==0&&(br===null||!Hi.call(br,t))&&a_();let n=r?Be(e):e;return Qi(t,n)}function Qi(t,e){if(!t.equals(e)){var r=t.v;Yn?Kn.set(t,e):Kn.set(t,r),t.v=e;var n=yn.ensure();if(n.capture(t,r),(t.f&_t)!==0){const i=t;(t.f&It)!==0&&hc(i),lc(i)}t.wv=bh(),Gf(t,It),Us()&&$e!==null&&($e.f&gt)!==0&&($e.f&(Cr|jn))===0&&(wr===null?$_([t]):wr.push(t)),!n.is_fork&&pc.size>0&&!Hf&&A_()}return e}function A_(){Hf=!1;for(const t of pc)(t.f&gt)!==0&&ft(t,pn),Ws(t)&&Hs(t);pc.clear()}function Wr(t){M(t,t.v+1)}function Gf(t,e){var r=t.reactions;if(r!==null)for(var n=Us(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;if(!(!n&&o===$e)){var l=(a&It)===0;if(l&&ft(o,e),(a&_t)!==0){var c=o;Or?.delete(c),(a&bi)===0&&(a&vr&&(o.f|=bi),Gf(c,pn))}else l&&((a&hn)!==0&&_n!==null&&_n.add(o),bn(o))}}}function Be(t){if(typeof t!="object"||t===null||qr in t)return t;const e=la(t);if(e!==xf&&e!==Gy)return t;var r=new Map,n=ia(t),i=le(0),s=wn,o=a=>{if(wn===s)return a();var l=Me,c=wn;Kt(null),_h(s);var u=a();return Kt(l),_h(c),u};return n&&r.set("length",le(t.length)),new Proxy(t,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&s_();var u=r.get(l);return u===void 0?u=o(()=>{var d=le(c.value);return r.set(l,d),d}):M(u,c.value,!0),!0},deleteProperty(a,l){var c=r.get(l);if(c===void 0){if(l in a){const u=o(()=>le(mt));r.set(l,u),Wr(i)}}else M(c,mt),Wr(i);return!0},get(a,l,c){if(l===qr)return t;var u=r.get(l),d=l in a;if(u===void 0&&(!d||fn(a,l)?.writable)&&(u=o(()=>{var p=Be(d?a[l]:mt),v=le(p);return v}),r.set(l,u)),u!==void 0){var f=h(u);return f===mt?void 0:f}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=r.get(l);u&&(c.value=h(u))}else if(c===void 0){var d=r.get(l),f=d?.v;if(d!==void 0&&f!==mt)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(a,l){if(l===qr)return!0;var c=r.get(l),u=c!==void 0&&c.v!==mt||Reflect.has(a,l);if(c!==void 0||$e!==null&&(!u||fn(a,l)?.writable)){c===void 0&&(c=o(()=>{var f=u?Be(a[l]):mt,p=le(f);return p}),r.set(l,c));var d=h(c);if(d===mt)return!1}return u},set(a,l,c,u){var d=r.get(l),f=l in a;if(n&&l==="length")for(var p=c;p<d.v;p+=1){var v=r.get(p+"");v!==void 0?M(v,mt):p in a&&(v=o(()=>le(mt)),r.set(p+"",v))}if(d===void 0)(!f||fn(a,l)?.writable)&&(d=o(()=>le(void 0)),M(d,Be(c)),r.set(l,d));else{f=d.v!==mt;var g=o(()=>Be(c));M(d,g)}var m=Reflect.getOwnPropertyDescriptor(a,l);if(m?.set&&m.set.call(u,c),!f){if(n&&typeof l=="string"){var b=r.get("length"),k=Number(l);Number.isInteger(k)&&k>=b.v&&M(b,k+1)}Wr(i)}return!0},ownKeys(a){h(i);var l=Reflect.ownKeys(a).filter(d=>{var f=r.get(d);return f===void 0||f.v!==mt});for(var[c,u]of r)u.v!==mt&&!(c in a)&&l.push(c);return l},setPrototypeOf(){o_()}})}function Yf(t){try{if(t!==null&&typeof t=="object"&&qr in t)return t[qr]}catch{}return t}function Jf(t,e){return Object.is(Yf(t),Yf(e))}var Qf,Xf,eh,th;function mc(){if(Qf===void 0){Qf=window,Xf=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;eh=fn(e,"firstChild").get,th=fn(e,"nextSibling").get,Ef(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ef(r)&&(r.__t=void 0)}}function Wt(t=""){return document.createTextNode(t)}function Dr(t){return eh.call(t)}function Ir(t){return th.call(t)}function $(t,e){if(!Ee)return Dr(t);var r=Dr(Pe);if(r===null)r=Pe.appendChild(Wt());else if(e&&r.nodeType!==da){var n=Wt();return r?.before(n),bt(n),n}return bt(r),r}function z(t,e=!1){if(!Ee){var r=Dr(t);return r instanceof Comment&&r.data===""?Ir(r):r}if(e&&Pe?.nodeType!==da){var n=Wt();return Pe?.before(n),bt(n),n}return Pe}function te(t,e=1,r=!1){let n=Ee?Pe:t;for(var i;e--;)i=n,n=Ir(n);if(!Ee)return n;if(r&&n?.nodeType!==da){var s=Wt();return n===null?i?.after(s):n.before(s),bt(s),s}return bt(n),n}function rh(t){t.textContent=""}function nh(){return!1}function C_(t=""){return document.createComment(t)}function O_(t,e){if(e){const r=document.body;t.autofocus=!0,sr(()=>{document.activeElement===r&&t.focus()})}}let ih=!1;function sh(){ih||(ih=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function va(t){var e=Me,r=$e;Kt(null),_r(null);try{return t()}finally{Kt(e),_r(r)}}function ya(t,e,r,n=r){t.addEventListener(e,()=>va(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),sh()}function oh(t){$e===null&&(Me===null&&t_(),e_()),Yn&&Xy()}function D_(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function yr(t,e,r){var n=$e;n!==null&&(n.f&ir)!==0&&(t|=ir);var i={ctx:rt,deps:null,nodes:null,f:t|It|vr,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{Hs(i),i.f|=ua}catch(a){throw vt(i),a}else e!==null&&bn(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&_i)===0&&(s=s.first,(t&hn)!==0&&(t&qn)!==0&&s!==null&&(s.f|=qn)),s!==null&&(s.parent=n,n!==null&&D_(s,n),Me!==null&&(Me.f&_t)!==0&&(t&jn)===0)){var o=Me;(o.effects??=[]).push(s)}return i}function gc(){return Me!==null&&!Pr}function _a(t){const e=yr(Zs,null,!1);return ft(e,gt),e.teardown=t,e}function _e(t){oh();var e=$e.f,r=!Me&&(e&Cr)!==0&&(e&ua)===0;if(r){var n=rt;(n.e??=[]).push(t)}else return ah(t)}function ah(t){return yr(ca|Of,t,!1)}function vc(t){return oh(),yr(Zs|Of,t,!0)}function ba(t){yn.ensure();const e=yr(jn|_i,t,!0);return()=>{vt(e)}}function I_(t){yn.ensure();const e=yr(jn|_i,t,!0);return(r={})=>new Promise(n=>{r.outro?ki(e,()=>{vt(e),n(void 0)}):(vt(e),n(void 0))})}function wa(t){return yr(ca,t,!1)}function P_(t){return yr(ic|_i,t,!0)}function Xi(t,e=0){return yr(Zs|e,t,!0)}function ce(t,e=[],r=[],n=[]){jf(n,e,r,i=>{yr(Zs,()=>t(...i.map(h)),!0)})}function qs(t,e=0){var r=yr(hn|e,t,!0);return r}function lh(t,e=0){var r=yr(tc|e,t,!0);return r}function Ht(t){return yr(Cr|_i,t,!0)}function ch(t){var e=t.teardown;if(e!==null){const r=Yn,n=Me;gh(!0),Kt(null);try{e.call(null)}finally{gh(r),Kt(n)}}}function uh(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&va(()=>{i.abort(Ki)});var n=r.next;(r.f&jn)!==0?r.parent=null:vt(r,e),r=n}}function M_(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Cr)===0&&vt(e),e=r}}function vt(t,e=!0){var r=!1;(e||(t.f&Cf)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(dh(t.nodes.start,t.nodes.end),r=!0),uh(t,e&&!r),Sa(t,0),ft(t,mn);var n=t.nodes&&t.nodes.t;if(n!==null)for(const s of n)s.stop();ch(t);var i=t.parent;i!==null&&i.first!==null&&fh(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function dh(t,e){for(;t!==null;){var r=t===e?null:Ir(t);t.remove(),t=r}}function fh(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function ki(t,e,r=!0){var n=[];hh(t,n,!0);var i=()=>{r&&vt(t),e&&e()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function hh(t,e,r){if((t.f&ir)===0){t.f^=ir;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var s=i.next,o=(i.f&qn)!==0||(i.f&Cr)!==0&&(t.f&hn)!==0;hh(i,e,o?r:!1),i=s}}}function yc(t){ph(t,!0)}function ph(t,e){if((t.f&ir)!==0){t.f^=ir,(t.f&gt)===0&&(ft(t,It),bn(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&qn)!==0||(r.f&Cr)!==0;ph(r,i?e:!1),r=n}var s=t.nodes&&t.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function mh(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Ir(r);e.append(r),r=i}}let ka=!1,Yn=!1;function gh(t){Yn=t}let Me=null,Pr=!1;function Kt(t){Me=t}let $e=null;function _r(t){$e=t}let br=null;function vh(t){Me!==null&&(br===null?br=[t]:br.push(t))}let Gt=null,ar=0,wr=null;function $_(t){wr=t}let yh=1,Si=0,wn=Si;function _h(t){wn=t}function bh(){return++yh}function Ws(t){var e=t.f;if((e&It)!==0)return!0;if(e&_t&&(t.f&=~bi),(e&pn)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Ws(s)&&Wf(s),s.wv>t.wv)return!0}(e&vr)!==0&&Or===null&&ft(t,gt)}return!1}function wh(t,e,r=!0){var n=t.reactions;if(n!==null&&!(br!==null&&Hi.call(br,t)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&_t)!==0?wh(s,e,!1):e===s&&(r?ft(s,It):(s.f&gt)!==0&&ft(s,pn),bn(s))}}function kh(t){var e=Gt,r=ar,n=wr,i=Me,s=br,o=rt,a=Pr,l=wn,c=t.f;Gt=null,ar=0,wr=null,Me=(c&(Cr|jn))===0?t:null,br=null,Yi(t.ctx),Pr=!1,wn=++Si,t.ac!==null&&(va(()=>{t.ac.abort(Ki)}),t.ac=null);try{t.f|=nc;var u=t.fn,d=u(),f=t.deps,p=ze?.is_fork;if(Gt!==null){var v;if(p||Sa(t,ar),f!==null&&ar>0)for(f.length=ar+Gt.length,v=0;v<Gt.length;v++)f[ar+v]=Gt[v];else t.deps=f=Gt;if(gc()&&(t.f&vr)!==0)for(v=ar;v<f.length;v++)(f[v].reactions??=[]).push(t)}else!p&&f!==null&&ar<f.length&&(Sa(t,ar),f.length=ar);if(Us()&&wr!==null&&!Pr&&f!==null&&(t.f&(_t|pn|It))===0)for(v=0;v<wr.length;v++)wh(wr[v],t);if(i!==null&&i!==t){if(Si++,i.deps!==null)for(let g=0;g<r;g+=1)i.deps[g].rv=Si;if(e!==null)for(const g of e)g.rv=Si;wr!==null&&(n===null?n=wr:n.push(...wr))}return(t.f&Wn)!==0&&(t.f^=Wn),d}catch(g){return Ff(g)}finally{t.f^=nc,Gt=e,ar=r,wr=n,Me=i,br=s,Yi(o),Pr=a,wn=l}}function N_(t,e){let r=e.reactions;if(r!==null){var n=Ky.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&_t)!==0&&(Gt===null||!Hi.call(Gt,e))){var s=e;(s.f&vr)!==0&&(s.f^=vr,s.f&=~bi),lc(s),qf(s),Sa(s,0)}}function Sa(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)N_(t,r[n])}function Hs(t){var e=t.f;if((e&mn)===0){ft(t,gt);var r=$e,n=ka;$e=t,ka=!0;try{(e&(hn|tc))!==0?M_(t):uh(t),ch(t);var i=kh(t);t.teardown=typeof i=="function"?i:null,t.wv=yh;var s;Xl&&f_&&(t.f&It)!==0&&t.deps}finally{ka=n,$e=r}}}async function Sh(){await Promise.resolve(),y()}function h(t){var e=t.f,r=(e&_t)!==0;if(Me!==null&&!Pr){var n=$e!==null&&($e.f&mn)!==0;if(!n&&(br===null||!Hi.call(br,t))){var i=Me.deps;if((Me.f&nc)!==0)t.rv<Si&&(t.rv=Si,Gt===null&&i!==null&&i[ar]===t?ar++:Gt===null?Gt=[t]:Gt.push(t));else{(Me.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[Me]:Hi.call(s,Me)||s.push(Me)}}}if(Yn&&Kn.has(t))return Kn.get(t);if(r){var o=t;if(Yn){var a=o.v;return((o.f&gt)===0&&o.reactions!==null||Eh(o))&&(a=hc(o)),Kn.set(o,a),a}var l=(o.f&vr)===0&&!Pr&&Me!==null&&(ka||(Me.f&vr)!==0),c=o.deps===null;Ws(o)&&(l&&(o.f|=vr),Wf(o)),l&&!c&&xh(o)}if(Or?.has(t))return Or.get(t);if((t.f&Wn)!==0)throw t.v;return t.v}function xh(t){if(t.deps!==null){t.f|=vr;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&_t)!==0&&(e.f&vr)===0&&xh(e)}}function Eh(t){if(t.v===mt)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Kn.has(e)||(e.f&_t)!==0&&Eh(e))return!0;return!1}function Ge(t){var e=Pr;try{return Pr=!0,t()}finally{Pr=e}}function F_(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(qr in t)_c(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&qr in r&&_c(r)}}}function _c(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{_c(t[n],e)}catch{}const r=la(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Sf(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}const Th=new Set,bc=new Set;function wc(t,e,r,n={}){function i(s){if(n.capture||Ks.call(e,s),!s.cancelBubble)return va(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?sr(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function wt(t,e,r,n={}){var i=wc(e,t,r,n);return()=>{t.removeEventListener(e,i,n)}}function kc(t,e,r,n,i){var s={capture:n,passive:i},o=wc(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&_a(()=>{e.removeEventListener(t,o,s)})}function Hr(t){for(var e=0;e<t.length;e++)Th.add(t[e]);for(var r of bc)r(t)}let Ah=null;function Ks(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;Ah=t;var o=0,a=Ah===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=i.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||t.target,s!==e){aa(t,"currentTarget",{configurable:!0,get(){return s||r}});var u=Me,d=$e;Kt(null),_r(null);try{for(var f,p=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var g=s["__"+n];g!=null&&(!s.disabled||t.target===s)&&g.call(s,t)}catch(m){f?p.push(m):f=m}if(t.cancelBubble||v===e||v===null)break;s=v}if(f){for(let m of p)queueMicrotask(()=>{throw m});throw f}}finally{t.__root=e,delete t.currentTarget,Kt(u),_r(d)}}}function Ch(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Kr(t,e){var r=$e;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function j(t,e){var r=(e&qy)!==0,n=(e&Wy)!==0,i,s=!t.startsWith("<!>");return()=>{if(Ee)return Kr(Pe,null),Pe;i===void 0&&(i=Ch(s?t:"<!>"+t),r||(i=Dr(i)));var o=n||Xf?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Dr(o),l=o.lastChild;Kr(a,l)}else Kr(o,o);return o}}function Yt(t=""){if(!Ee){var e=Wt(t+"");return Kr(e,e),e}var r=Pe;return r.nodeType!==da&&(r.before(r=Wt()),bt(r)),Kr(r,r),r}function W(){if(Ee)return Kr(Pe,null),Pe;var t=document.createDocumentFragment(),e=document.createComment(""),r=Wt();return t.append(e,r),Kr(e,r),t}function w(t,e){if(Ee){var r=$e;((r.f&ua)===0||r.nodes.end===null)&&(r.nodes.end=Pe),vn();return}t!==null&&t.before(e)}function kt(){if(Ee&&Pe&&Pe.nodeType===Hn&&Pe.textContent?.startsWith("$")){const t=Pe.textContent.substring(1);return vn(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function R_(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const L_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function z_(t){return L_.includes(t)}const Z_={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function V_(t){return t=t.toLowerCase(),Z_[t]??t}const U_=["touchstart","touchmove"];function B_(t){return U_.includes(t)}function se(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Oh(t,e){return Dh(t,e)}function j_(t,e){mc(),e.intro=e.intro??!1;const r=e.target,n=Ee,i=Pe;try{for(var s=Dr(r);s&&(s.nodeType!==Hn||s.data!==wf);)s=Ir(s);if(!s)throw yi;Pt(!0),bt(s);const o=Dh(t,{...e,anchor:s});return Pt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==yi&&console.warn("Failed to hydrate: ",o),e.recover===!1&&n_(),mc(),rh(r),Pt(!1),Oh(t,e)}finally{Pt(n),bt(i)}}const es=new Map;function Dh(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){mc();var a=new Set,l=d=>{for(var f=0;f<d.length;f++){var p=d[f];if(!a.has(p)){a.add(p);var v=B_(p);e.addEventListener(p,Ks,{passive:v});var g=es.get(p);g===void 0?(document.addEventListener(p,Ks,{passive:v}),es.set(p,1)):es.set(p,g+1)}}};l(sa(Th)),bc.add(l);var c=void 0,u=I_(()=>{var d=r??e.appendChild(Wt());return k_(d,{pending:()=>{}},f=>{if(s){ne({});var p=rt;p.c=s}if(i&&(n.$$events=i),Ee&&Kr(f,null),c=t(f,n)||{},Ee&&($e.nodes.end=Pe,Pe===null||Pe.nodeType!==Hn||Pe.data!==Ql))throw Vs(),yi;s&&ie()}),()=>{for(var f of a){e.removeEventListener(f,Ks);var p=es.get(f);--p===0?(document.removeEventListener(f,Ks),es.delete(f)):es.set(f,p)}bc.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return Sc.set(c,u),c}let Sc=new WeakMap;function q_(t,e){const r=Sc.get(t);return r?(Sc.delete(t),r(e)):Promise.resolve()}class xc{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,r=!0){this.anchor=e,this.#i=r}#s=()=>{var e=ze;if(this.#e.has(e)){var r=this.#e.get(e),n=this.#t.get(r);if(n)yc(n),this.#n.delete(r);else{var i=this.#r.get(r);i&&(this.#t.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===e)break;const a=this.#r.get(o);a&&(vt(a.effect),this.#r.delete(o))}for(const[s,o]of this.#t){if(s===r||this.#n.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();mh(o,c),c.append(Wt()),this.#r.set(s,{effect:o,fragment:c})}else vt(o);this.#n.delete(s),this.#t.delete(s)};this.#i||!n?(this.#n.add(s),ki(o,a,!1)):a()}}};#a=e=>{this.#e.delete(e);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(vt(i.effect),this.#r.delete(n))};ensure(e,r){var n=ze,i=nh();if(r&&!this.#t.has(e)&&!this.#r.has(e))if(i){var s=document.createDocumentFragment(),o=Wt();s.append(o),this.#r.set(e,{effect:Ht(()=>r(o)),fragment:s})}else this.#t.set(e,Ht(()=>r(this.anchor)));if(this.#e.set(n,e),i){for(const[a,l]of this.#t)a===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[a,l]of this.#r)a===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#s),n.ondiscard(this.#a)}else Ee&&(this.anchor=Pe),this.#s()}}function ke(t,e,...r){var n=new xc(t);qs(()=>{const i=e()??null;n.ensure(i,i&&(s=>i(s,...r)))},qn)}function kn(t){rt===null&&Df(),Gi&&rt.l!==null?W_(rt).m.push(t):_e(()=>{const e=Ge(t);if(typeof e=="function")return e})}function W_(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function H_(){return Symbol(kf)}function fe(t,e,r=!1){Ee&&vn();var n=new xc(t),i=r?qn:0;function s(o,a){if(Ee){const c=If(t)===na;if(o===c){var l=fa();bt(l),n.anchor=l,Pt(!1),n.ensure(o,a),Pt(!0);return}}n.ensure(o,a)}qs(()=>{var o=!1;e((a,l=!0)=>{o=!0,s(l,a)}),o||s(!1,null)},i)}function Gr(t,e){return e}function K_(t,e,r){for(var n=[],i=e.length,s,o=e.length,a=0;a<i;a++){let d=e[a];ki(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var f=t.outrogroups;Ec(sa(s.done)),f.delete(s),f.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=n.length===0&&r!==null;if(l){var c=r,u=c.parentNode;rh(u),u.append(c),t.items.clear()}Ec(e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(s)}function Ec(t,e=!0){for(var r=0;r<t.length;r++)vt(t[r],e)}var Ih;function He(t,e,r,n,i,s=null){var o=t,a=new Map,l=(e&bf)!==0;if(l){var c=t;o=Ee?bt(Dr(c)):c.appendChild(Wt())}Ee&&vn();var u=null,d=fc(()=>{var b=r();return ia(b)?b:b==null?[]:sa(b)}),f,p=!0;function v(){m.fallback=u,G_(m,f,o,e,n),u!==null&&(f.length===0?(u.f&gn)===0?yc(u):(u.f^=gn,Ys(u,null,o)):ki(u,()=>{u=null}))}var g=qs(()=>{f=h(d);var b=f.length;let k=!1;if(Ee){var O=If(o)===na;O!==(b===0)&&(o=fa(),bt(o),Pt(!1),k=!0)}for(var E=new Set,P=ze,A=nh(),D=0;D<b;D+=1){Ee&&Pe.nodeType===Hn&&Pe.data===Ql&&(o=Pe,k=!0,Pt(!1));var F=f[D],N=n(F,D),B=p?null:a.get(N);B?(B.v&&Qi(B.v,F),B.i&&Qi(B.i,D),A&&P.skipped_effects.delete(B.e)):(B=Y_(a,p?o:Ih??=Wt(),F,N,D,i,e,r),p||(B.e.f|=gn),a.set(N,B)),E.add(N)}if(b===0&&s&&!u&&(p?u=Ht(()=>s(o)):(u=Ht(()=>s(Ih??=Wt())),u.f|=gn)),Ee&&b>0&&bt(fa()),!p)if(A){for(const[H,Z]of a)E.has(H)||P.skipped_effects.add(Z.e);P.oncommit(v),P.ondiscard(()=>{})}else v();k&&Pt(!0),h(d)}),m={effect:g,items:a,outrogroups:null,fallback:u};p=!1,Ee&&(o=Pe)}function Gs(t){for(;t!==null&&(t.f&Cr)===0;)t=t.next;return t}function G_(t,e,r,n,i){var s=(n&Ly)!==0,o=e.length,a=t.items,l=Gs(t.effect.first),c,u=null,d,f=[],p=[],v,g,m,b;if(s)for(b=0;b<o;b+=1)v=e[b],g=i(v,b),m=a.get(g).e,(m.f&gn)===0&&(m.nodes?.a?.measure(),(d??=new Set).add(m));for(b=0;b<o;b+=1){if(v=e[b],g=i(v,b),m=a.get(g).e,t.outrogroups!==null)for(const B of t.outrogroups)B.pending.delete(m),B.done.delete(m);if((m.f&gn)!==0)if(m.f^=gn,m===l)Ys(m,null,r);else{var k=u?u.next:l;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Jn(t,u,m),Jn(t,m,k),Ys(m,k,r),u=m,f=[],p=[],l=Gs(u.next);continue}if((m.f&ir)!==0&&(yc(m),s&&(m.nodes?.a?.unfix(),(d??=new Set).delete(m))),m!==l){if(c!==void 0&&c.has(m)){if(f.length<p.length){var O=p[0],E;u=O.prev;var P=f[0],A=f[f.length-1];for(E=0;E<f.length;E+=1)Ys(f[E],O,r);for(E=0;E<p.length;E+=1)c.delete(p[E]);Jn(t,P.prev,A.next),Jn(t,u,P),Jn(t,A,O),l=O,u=A,b-=1,f=[],p=[]}else c.delete(m),Ys(m,l,r),Jn(t,m.prev,m.next),Jn(t,m,u===null?t.effect.first:u.next),Jn(t,u,m),u=m;continue}for(f=[],p=[];l!==null&&l!==m;)(c??=new Set).add(l),p.push(l),l=Gs(l.next);if(l===null)continue}(m.f&gn)===0&&f.push(m),u=m,l=Gs(m.next)}if(t.outrogroups!==null){for(const B of t.outrogroups)B.pending.size===0&&(Ec(sa(B.done)),t.outrogroups?.delete(B));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||c!==void 0){var D=[];if(c!==void 0)for(m of c)(m.f&ir)===0&&D.push(m);for(;l!==null;)(l.f&ir)===0&&l!==t.fallback&&D.push(l),l=Gs(l.next);var F=D.length;if(F>0){var N=(n&bf)!==0&&o===0?r:null;if(s){for(b=0;b<F;b+=1)D[b].nodes?.a?.measure();for(b=0;b<F;b+=1)D[b].nodes?.a?.fix()}K_(t,D,N)}}s&&sr(()=>{if(d!==void 0)for(m of d)m.nodes?.a?.apply()})}function Y_(t,e,r,n,i,s,o,a){var l=(o&Ar)!==0?(o&zy)===0?Kf(r,!1,!1):Gn(r):null,c=(o&Bn)!==0?Gn(i):null;return{v:l,i:c,e:Ht(()=>(s(e,l??r,c??i,a),()=>{t.delete(n)}))}}function Ys(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,s=e&&(e.f&gn)===0?e.nodes.start:r;n!==null;){var o=Ir(n);if(s.before(n),n===i)return;n=o}}function Jn(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function J_(t,e,r=!1,n=!1,i=!1){var s=t,o="";ce(()=>{var a=$e;if(o===(o=e()??"")){Ee&&vn();return}if(a.nodes!==null&&(dh(a.nodes.start,a.nodes.end),a.nodes=null),o!==""){if(Ee){Pe.data;for(var l=vn(),c=l;l!==null&&(l.nodeType!==Hn||l.data!=="");)c=l,l=Ir(l);if(l===null)throw Vs(),yi;Kr(Pe,c),s=bt(l);return}var u=o+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=Ch(u);if((r||n)&&(d=Dr(d)),Kr(Dr(d),d.lastChild),r||n)for(;Dr(d);)s.before(Dr(d));else s.before(d)}})}function Q_(t,e,r,n,i){Ee&&vn();var s=e.$$slots?.[r],o=!1;s===!0&&(s=e.children,o=!0),s===void 0||s(t,o?()=>n:n)}function Re(t,e,r){Ee&&vn();var n=new xc(t);qs(()=>{var i=e()??null;n.ensure(i,i&&(s=>r(s,i)))},qn)}function X_(t,e){var r=void 0,n;lh(()=>{r!==(r=e())&&(n&&(vt(n),n=null),r&&(n=Ht(()=>{wa(()=>r(t))})))})}function Ph(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Ph(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function xa(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Ph(t))&&(n&&(n+=" "),n+=e);return n}function Sn(t){return typeof t=="object"?xa(t):t??""}const Mh=[...`
3
+ \r\f \v\uFEFF`];function eb(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||Mh.includes(n[o-1]))&&(a===n.length||Mh.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function $h(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Tc(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function tb(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Tc)),i&&l.push(...Object.keys(i).map(Tc));var c=0,u=-1;const g=t.length;for(var d=0;d<g;d++){var f=t[d];if(a?f==="/"&&t[d-1]==="*"&&(a=!1):s?s===f&&(s=!1):f==="/"&&t[d+1]==="*"?a=!0:f==='"'||f==="'"?s=f:f==="("?o++:f===")"&&o--,!a&&s===!1&&o===0){if(f===":"&&u===-1)u=d;else if(f===";"||d===g-1){if(u!==-1){var p=Tc(t.substring(c,u).trim());if(!l.includes(p)){f!==";"&&d++;var v=t.substring(c,d).trim();r+=" "+v+";"}}c=d+1,u=-1}}}}return n&&(r+=$h(n)),i&&(r+=$h(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function lr(t,e,r,n,i,s){var o=t.__className;if(Ee||o!==r||o===void 0){var a=eb(r,n,s);(!Ee||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&t.classList.toggle(l,c)}return s}function Ac(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function rb(t,e,r,n){var i=t.__style;if(Ee||i!==e){var s=tb(e,n);(!Ee||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}else n&&(Array.isArray(n)?(Ac(t,r?.[0],n[0]),Ac(t,r?.[1],n[1],"important")):Ac(t,r,n));return n}function Ea(t,e,r=!1){if(t.multiple){if(e==null)return;if(!ia(e))return c_();for(var n of t.options)n.selected=e.includes(Js(n));return}for(n of t.options){var i=Js(n);if(Jf(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Nh(t){var e=new MutationObserver(()=>{Ea(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),_a(()=>{e.disconnect()})}function nb(t,e,r=e){var n=new WeakSet,i=!0;ya(t,"change",s=>{var o=s?"[selected]":":checked",a;if(t.multiple)a=[].map.call(t.querySelectorAll(o),Js);else{var l=t.querySelector(o)??t.querySelector("option:not([disabled])");a=l&&Js(l)}r(a),ze!==null&&n.add(ze)}),wa(()=>{var s=e();if(t===document.activeElement){var o=ma??ze;if(n.has(o))return}if(Ea(t,s,i),i&&s===void 0){var a=t.querySelector(":checked");a!==null&&(s=Js(a),r(s))}t.__value=s,i=!1}),Nh(t)}function Js(t){return"__value"in t?t.__value:t.value}const Qs=Symbol("class"),Xs=Symbol("style"),Fh=Symbol("is custom element"),Rh=Symbol("is html");function Ta(t){if(Ee){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;Ae(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;Ae(t,"checked",null),t.checked=i}}};t.__on_r=r,sr(r),sh()}}function Lh(t,e){var r=Aa(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function ib(t,e){var r=Aa(t);r.checked!==(r.checked=e??void 0)&&(t.checked=e)}function Cc(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ae(t,e,r,n){var i=Aa(t);Ee&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Jy]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Dc(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function xi(t,e,r){var n=Me,i=$e;let s=Ee;Ee&&Pt(!1),Kt(null),_r(null);try{e!=="style"&&(Oc.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.tagName.toLowerCase())?Dc(t).includes(e):r&&typeof r=="object")?t[e]=r:Ae(t,e,r==null?r:String(r))}finally{Kt(n),_r(i),s&&Pt(!0)}}function sb(t,e,r,n,i=!1,s=!1){if(Ee&&i&&t.tagName==="INPUT"){var o=t,a=o.type==="checkbox"?"defaultChecked":"defaultValue";a in r||Ta(o)}var l=Aa(t),c=l[Fh],u=!l[Rh];let d=Ee&&c;d&&Pt(!1);var f=e||{},p=t.tagName==="OPTION";for(var v in e)v in r||(r[v]=null);r.class?r.class=Sn(r.class):r[Qs]&&(r.class=null),r[Xs]&&(r.style??=null);var g=Dc(t);for(const A in r){let D=r[A];if(p&&A==="value"&&D==null){t.value=t.__value="",f[A]=D;continue}if(A==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";lr(t,m,D,n,e?.[Qs],r[Qs]),f[A]=D,f[Qs]=r[Qs];continue}if(A==="style"){rb(t,D,e?.[Xs],r[Xs]),f[A]=D,f[Xs]=r[Xs];continue}var b=f[A];if(!(D===b&&!(D===void 0&&t.hasAttribute(A)))){f[A]=D;var k=A[0]+A[1];if(k!=="$$")if(k==="on"){const F={},N="$$"+A;let B=A.slice(2);var O=z_(B);if(R_(B)&&(B=B.slice(0,-7),F.capture=!0),!O&&b){if(D!=null)continue;t.removeEventListener(B,f[N],F),f[N]=null}if(D!=null)if(O)t[`__${B}`]=D,Hr([B]);else{let H=function(Z){f[A].call(this,Z)};f[N]=wc(B,t,H,F)}else O&&(t[`__${B}`]=void 0)}else if(A==="style")Ae(t,A,D);else if(A==="autofocus")O_(t,!!D);else if(!c&&(A==="__value"||A==="value"&&D!=null))t.value=t.__value=D;else if(A==="selected"&&p)Cc(t,D);else{var E=A;u||(E=V_(E));var P=E==="defaultValue"||E==="defaultChecked";if(D==null&&!c&&!P)if(l[A]=null,E==="value"||E==="checked"){let F=t;const N=e===void 0;if(E==="value"){let B=F.defaultValue;F.removeAttribute(E),F.defaultValue=B,F.value=F.__value=N?B:null}else{let B=F.defaultChecked;F.removeAttribute(E),F.defaultChecked=B,F.checked=N?B:!1}}else t.removeAttribute(A);else P||g.includes(E)&&(c||typeof D!="string")?(t[E]=D,E in l&&(l[E]=mt)):typeof D!="function"&&Ae(t,E,D)}}}return d&&Pt(!0),f}function Ke(t,e,r=[],n=[],i=[],s,o=!1,a=!1){jf(i,r,n,l=>{var c=void 0,u={},d=t.nodeName==="SELECT",f=!1;if(lh(()=>{var v=e(...l.map(h)),g=sb(t,c,v,s,o,a);f&&d&&"value"in v&&Ea(t,v.value);for(let b of Object.getOwnPropertySymbols(u))v[b]||vt(u[b]);for(let b of Object.getOwnPropertySymbols(v)){var m=v[b];b.description===kf&&(!c||m!==c[b])&&(u[b]&&vt(u[b]),u[b]=Ht(()=>X_(t,()=>m))),g[b]=m}c=g}),d){var p=t;wa(()=>{Ea(p,c.value,!0),Nh(p)})}f=!0})}function Aa(t){return t.__attributes??={[Fh]:t.nodeName.includes("-"),[Rh]:t.namespaceURI===Hy}}var Oc=new Map;function Dc(t){var e=t.getAttribute("is")||t.nodeName,r=Oc.get(e);if(r)return r;Oc.set(e,r=[]);for(var n,i=t,s=Element.prototype;s!==i;){n=Sf(i);for(var o in n)n[o].set&&r.push(o);i=la(i)}return r}let Ic=null;function ob(){if(Ic===null){var t=document.createElement("select");t.innerHTML="<option><span>t</span></option>",Ic=t.firstChild?.firstChild?.nodeType===1}return Ic}function ab(t,e){var r=Ee;ob()||(Pt(!1),t.textContent="",t.append(C_("")));try{e()}finally{r&&(Ee?I(t):(Pt(!0),bt(t)))}}function Pc(t,e,r=e){var n=new WeakSet;ya(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=$c(t)?Nc(s):s,r(s),ze!==null&&n.add(ze),await Sh(),s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=s??"",a!==null){var c=t.value.length;o===a&&a===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),(Ee&&t.defaultValue!==t.value||Ge(e)==null&&t.value)&&(r($c(t)?Nc(t.value):t.value),ze!==null&&n.add(ze)),Xi(()=>{var i=e();if(t===document.activeElement){var s=ma??ze;if(n.has(s))return}$c(t)&&i===Nc(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}const Mc=new Set;function lb(t,e,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=t;let a=!1;if(e!==null)for(var l of e)o=o[l]??=[];o.push(r),ya(r,"change",()=>{var c=r.__value;s&&(c=zh(o,c,r.checked)),i(c)},()=>i(s?[]:null)),Xi(()=>{var c=n();if(Ee&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Jf(r.__value,c)}),_a(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Mc.has(o)||(Mc.add(o),sr(()=>{o.sort((c,u)=>c.compareDocumentPosition(u)===4?-1:1),Mc.delete(o)})),sr(()=>{if(a){var c;if(s)c=zh(o,c,r.checked);else{var u=o.find(d=>d.checked);c=u?.__value}i(c)}})}function cb(t,e,r=e){ya(t,"change",n=>{var i=n?t.defaultChecked:t.checked;r(i)}),(Ee&&t.defaultChecked!==t.checked||Ge(e)==null)&&r(t.checked),Xi(()=>{var n=e();t.checked=!!n})}function zh(t,e,r){for(var n=new Set,i=0;i<t.length;i+=1)t[i].checked&&n.add(t[i].__value);return r||n.delete(e),Array.from(n)}function $c(t){var e=t.type;return e==="number"||e==="range"}function Nc(t){return t===""?null:+t}function Zh(t,e){return t===e||t?.[qr]===e}function Vh(t={},e,r,n){return wa(()=>{var i,s;return Xi(()=>{i=s,s=[],Ge(()=>{t!==r(...s)&&(e(t,...s),i&&Zh(r(...i),t)&&e(null,...i))})}),()=>{sr(()=>{s&&Zh(r(...s),t)&&e(null,...s)})}}),t}function Fc(t=!1){const e=rt,r=e.l.u;if(!r)return;let n=()=>F_(e.s);if(t){let i=0,s={};const o=js(()=>{let a=!1;const l=e.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],a=!0);return a&&i++,i});n=()=>h(o)}r.b.length&&vc(()=>{Uh(e,n),ec(r.b)}),_e(()=>{const i=Ge(()=>r.m.map(Yy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&_e(()=>{Uh(e,n),ec(r.a)})}function Uh(t,e){if(t.l.s)for(const r of t.l.s)h(r);e()}let Ca=!1;function ub(t){var e=Ca;try{return Ca=!1,[t(),Ca]}finally{Ca=e}}const db={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Je(t,e,r){return new Proxy({props:t,exclude:e},db)}const fb={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let i=t.props[n];zs(i)&&(i=i());const s=fn(i,e);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const i=fn(n,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(t,e){if(e===qr||e===sc)return!1;for(let r of t.props)if(zs(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(zs(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function Qn(...t){return new Proxy({props:t},fb)}function _(t,e,r,n){var i=!Gi||(r&Vy)!==0,s=(r&By)!==0,o=(r&jy)!==0,a=n,l=!0,c=()=>(l&&(l=!1,a=o?Ge(n):n),a),u;if(s){var d=qr in t||sc in t;u=fn(t,e)?.set??(d&&e in t?O=>t[e]=O:void 0)}var f,p=!1;s?[f,p]=ub(()=>t[e]):f=t[e],f===void 0&&n!==void 0&&(f=c(),u&&(i&&i_(),u(f)));var v;if(i?v=()=>{var O=t[e];return O===void 0?c():(l=!0,O)}:v=()=>{var O=t[e];return O!==void 0&&(a=void 0),O===void 0?a:O},i&&(r&Uy)===0)return v;if(u){var g=t.$$legacy;return(function(O,E){return arguments.length>0?((!i||!E||g||p)&&u(E?v():O),O):v()})}var m=!1,b=((r&Zy)!==0?js:fc)(()=>(m=!1,v()));s&&h(b);var k=$e;return(function(O,E){if(arguments.length>0){const P=E?h(b):i&&s?Be(O):O;return M(b,P),m=!0,a!==void 0&&(a=P),O}return Yn&&m||(k.f&mn)!==0?b.v:h(b)})}function hb(t){return new pb(t)}class pb{#e;#t;constructor(e){var r=new Map,n=(s,o)=>{var a=Kf(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(s,o){return h(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===sc?!0:(h(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return M(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#t=(e.hydrate?j_:Oh)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||aa(this,s,{get(){return this.#t[s]},set(o){this.#t[s]=o},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{q_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let Bh;typeof HTMLElement=="function"&&(Bh=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),w(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=mb(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Oa(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=hb({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=ba(()=>{Xi(()=>{this.$$r=!0;for(const n of oa(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Oa(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Oa(t,r,this.$$p_d,"toProp"),this.$$c?.$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 oa(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Oa(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function mb(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function oe(t,e,r,n,i,s){let o=class extends Bh{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return oa(e).map(a=>(e[a].attribute||a).toLowerCase())}};return oa(e).forEach(a=>{aa(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Oa(a,l,e),this.$$d[a]=l;var c=this.$$c;if(c){var u=fn(c,a)?.get;u?c[a]=l:c.$set({[a]:l})}}})}),n.forEach(a=>{aa(o.prototype,a,{get(){return this.$$c?.[a]}})}),t.element=o,o}const jh={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:t=>`/#/checkout/failure?payment_error=${t}`,checkoutSuccess:t=>`/#/checkout/success?ORDERID=${t}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:t=>"/#/tickets/combi?group="+t,dayTickets:()=>"/#/tickets/day",eventGroup:yb,event:t=>"/#/product/event/"+t,events:()=>"/#/products/events",exhibition:t=>"/#/exhibition/"+t,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:t=>"/#/merchandise/detail/"+t,merchandises:()=>"/#/merchandise/list",museum:t=>"/#/museum/"+t,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:t=>"/#/tickets/filters?group="+t,tour:t=>"/#/product/tour/"+t,tours:()=>"/#/products/tours",toursGroup:_b,cart:()=>"/#/cart",annualTicketPersonalizationForm:(t,e)=>`/#/tickets/annual/personalisation/${t}/${e}`,annualTicketPersonalizationList:t=>`/#/tickets/annual/personalisation/${t}`,annualTicketPersonalizationFormSubmit:t=>`/#/tickets/annual/personalisation/${t}`},gb={...jh,checkoutSuccess:t=>`/checkout/success/?token=${t}`,checkoutFailure:t=>`/checkout/failure?error=${t}`};function vb(t){return t==="angular"?jh:gb}function yb(t){return`/#/products/events?category_id=${(S.settings?.multipleEventsMenuItems.event_groups[t]||[]).join("&category_id=")}`}function _b(t){return`/#/products/tours?category_id=${(S.settings?.multipleToursMenuItems.tour_groups[t]||[]).join("&category_id=")}`}function bb(t){return new Promise(e=>setTimeout(e,t))}function qh(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function wb(t){return typeof t=="boolean"}function Rc(t,e=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=t();if(a){r(a);return}if(Date.now()-i>=e){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}const Lc=Array.isArray,Wh=t=>!!t&&t.constructor===Object,kb=t=>typeof t=="string"||t instanceof String,Sb=t=>{try{return Number(t)===t}catch{return!1}},xb=(t,e)=>!t||(t.length??0)===0?null:t.reduce(e);function Ei(t,e){return(t||[]).reduce((r,n)=>r+(e?e(n):n),0)}const Eb=(t,e,r=!1)=>{if(!t)return[];const n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function Hh(t,e){const r=(n=>n);return xb(t,(n,i)=>r(n)<r(i)?n:i)}const Kh=(t,e,r)=>{let n=r;for(let i=1;i<=t;i++)n=e(n,i);return n},Tb=(t,e)=>t?!e||e.length===0?t:e.reduce((r,n)=>(delete r[n],r),{...t}):{},cr=(t,e)=>!t||!e?t??e??{}:Object.entries({...t,...e}).reduce((r,[n,i])=>({...r,[n]:Wh(t[n])?cr(t[n],i):i}),{});class Gh{#e={uid:"",client:"",accessToken:"",expiry:0};constructor(){this.load(),typeof window<"u"&&window.addEventListener("storage",e=>{e.key==="go-auth"&&this.load()})}customerLevel(){if(this.isGuest())return 10;if(this.isLoggedIn())return 20}isAuthenticated(){return this.#e.uid!==""}isLoggedIn(){return!!(this.#e.uid&&qh(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!qh(this.#e.uid))}signOut(){this.#e.uid="",this.#e.client="",this.#e.accessToken="",this.#e.expiry=0,this.save()}signIn(e){this.#e.uid=e.uid,this.#e.client=e.client,this.#e.accessToken=e.accessToken,this.#e.expiry=e.expiry,this.save()}get data(){return this.#e.expiry<Math.floor(Date.now()/1e3)&&this.signOut(),this.#e}toString(){return JSON.stringify(this.#e)}save(){typeof localStorage>"u"||localStorage.setItem("go-auth",this.toString())}load(){if(typeof localStorage>"u")return;const e=localStorage.getItem("go-auth");if(!e){this.signOut();return}const r=JSON.parse(e);if(!(Wh(r)&&"uid"in r&&"client"in r&&"accessToken"in r&&"expiry"in r))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(r)}}class Ab{constructor(e){this.auth=e}onRequest({request:e}){const{uid:r,client:n,accessToken:i,expiry:s}=this.auth.data,o=e.headers;r&&!o.has("uid")&&o.set("uid",r),n&&!o.has("client")&&o.set("client",n),i&&!o.has("access-token")&&o.set("access-token",i),s&&!o.has("expiry")&&o.set("expiry",String(s)),i&&!o.has("token-type")&&o.set("token-type","Bearer")}onResponse({response:e}){const r=e.headers.get("access-token"),n=e.headers.get("client"),i=e.headers.get("uid"),s=parseInt(e.headers.get("expiry")||"");return r&&n&&i&&s&&this.auth.signIn({uid:i,client:n,accessToken:r,expiry:s}),e}}var Ne;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Ne||(Ne={}));var zc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(zc||(zc={}));const pe=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xn=t=>{switch(typeof t){case"undefined":return pe.undefined;case"string":return pe.string;case"number":return isNaN(t)?pe.nan:pe.number;case"boolean":return pe.boolean;case"function":return pe.function;case"bigint":return pe.bigint;case"symbol":return pe.symbol;case"object":return Array.isArray(t)?pe.array:t===null?pe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?pe.promise:typeof Map<"u"&&t instanceof Map?pe.map:typeof Set<"u"&&t instanceof Set?pe.set:typeof Date<"u"&&t instanceof Date?pe.date:pe.object;default:return pe.unknown}},re=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Cb=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class ur extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return i(this),n}static assert(e){if(!(e instanceof ur))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}ur.create=t=>new ur(t);const ts=(t,e)=>{let r;switch(t.code){case re.invalid_type:t.received===pe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case re.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ne.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(t.keys,", ")}`;break;case re.invalid_union:r="Invalid input";break;case re.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(t.options)}`;break;case re.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(t.options)}, received '${t.received}'`;break;case re.invalid_arguments:r="Invalid function arguments";break;case re.invalid_return_type:r="Invalid function return type";break;case re.invalid_date:r="Invalid date";break;case re.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ne.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case re.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case re.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case re.custom:r="Invalid input";break;case re.invalid_intersection_types:r="Intersection results could not be merged";break;case re.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case re.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ne.assertNever(t)}return{message:r}};let Yh=ts;function Ob(t){Yh=t}function Da(){return Yh}const Ia=t=>{const{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...i,path:s,message:a}},Db=[];function he(t,e){const r=Da(),n=Ia({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ts?void 0:ts].filter(i=>!!i)});t.common.issues.push(n)}class At{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const i of r){if(i.status==="aborted")return xe;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const i of r){const s=await i.key,o=await i.value;n.push({key:s,value:o})}return At.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const i of r){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return xe;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const xe=Object.freeze({status:"aborted"}),rs=t=>({status:"dirty",value:t}),$t=t=>({status:"valid",value:t}),Zc=t=>t.status==="aborted",Vc=t=>t.status==="dirty",eo=t=>t.status==="valid",to=t=>typeof Promise<"u"&&t instanceof Promise;function Pa(t,e,r,n){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Jh(t,e,r,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var ge;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ge||(ge={}));var ro,no;class Yr{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Qh=(t,e)=>{if(eo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new ur(t.common.issues);return this._error=r,this._error}}};function Ce(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{var l,c;const{message:u}=t;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??r)!==null&&c!==void 0?c:a.defaultError}},description:i}}let De=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Xn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new At,ctx:{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(to(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Qh(i,s)}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(to(i)?i:Promise.resolve(i));return Qh(n,s)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:re.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Mr({schema:this,typeName:Se.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Qr.create(this,this._def)}nullable(){return ni.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ci.create(this,this._def)}promise(){return as.create(this,this._def)}or(e){return ao.create([this,e],this._def)}and(e){return lo.create(this,e,this._def)}transform(e){return new Mr({...Ce(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new po({...Ce(this._def),innerType:this,defaultValue:r,typeName:Se.ZodDefault})}brand(){return new jc({typeName:Se.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new mo({...Ce(this._def),innerType:this,catchValue:r,typeName:Se.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return go.create(this,e)}readonly(){return vo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Ib=/^c[^\s-]{8,}$/i,Pb=/^[0-9a-z]+$/,Mb=/^[0-9A-HJKMNP-TV-Z]{26}$/,$b=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Nb=/^[a-z0-9_-]{21}$/i,Fb=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Lb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uc;const zb=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zb=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Vb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ub=new RegExp(`^${Xh}$`);function ep(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Bb(t){return new RegExp(`^${ep(t)}$`)}function tp(t){let e=`${Xh}T${ep(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function jb(t,e){return!!((e==="v4"||!e)&&zb.test(t)||(e==="v6"||!e)&&Zb.test(t))}let ns=class ra extends De{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==pe.string){const s=this._getOrReturnCtx(e);return he(s,{code:re.invalid_type,expected:pe.string,received:s.parsedType}),xe}const n=new At;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),he(i,{code:re.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),he(i,{code:re.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?he(i,{code:re.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&he(i,{code:re.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Rb.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"email",code:re.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Uc||(Uc=new RegExp(Lb,"u")),Uc.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"emoji",code:re.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")$b.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"uuid",code:re.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Nb.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"nanoid",code:re.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Ib.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"cuid",code:re.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Pb.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"cuid2",code:re.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Mb.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"ulid",code:re.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),he(i,{validation:"url",code:re.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"regex",code:re.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),he(i,{code:re.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),he(i,{code:re.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),he(i,{code:re.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?tp(s).test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{code:re.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Ub.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{code:re.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Bb(s).test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{code:re.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Fb.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"duration",code:re.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?jb(e.data,s.version)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"ip",code:re.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Vb.test(e.data)||(i=this._getOrReturnCtx(e,i),he(i,{validation:"base64",code:re.invalid_string,message:s.message}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:re.invalid_string,...ge.errToObj(n)})}_addCheck(e){return new ra({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ge.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ge.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ge.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ge.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ge.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ge.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ge.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ge.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ge.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ge.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...ge.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ge.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ge.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ge.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...ge.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ge.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ge.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ge.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ge.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ge.errToObj(r)})}nonempty(e){return this.min(1,ge.errToObj(e))}trim(){return new ra({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ns.create=t=>{var e;return new ns({checks:[],typeName:Se.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function qb(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class ei extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==pe.number){const s=this._getOrReturnCtx(e);return he(s,{code:re.invalid_type,expected:pe.number,received:s.parsedType}),xe}let n;const i=new At;for(const s of this._def.checks)s.kind==="int"?Ne.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),he(n,{code:re.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),he(n,{code:re.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),he(n,{code:re.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?qb(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),he(n,{code:re.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),he(n,{code:re.not_finite,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ge.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ge.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ge.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ge.toString(r))}setLimit(e,r,n,i){return new ei({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ge.toString(i)}]})}_addCheck(e){return new ei({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ge.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ge.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ge.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ne.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ei.create=t=>new ei({checks:[],typeName:Se.ZodNumber,coerce:t?.coerce||!1,...Ce(t)});class ti extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==pe.bigint){const s=this._getOrReturnCtx(e);return he(s,{code:re.invalid_type,expected:pe.bigint,received:s.parsedType}),xe}let n;const i=new At;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),he(n,{code:re.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),he(n,{code:re.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),he(n,{code:re.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ge.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ge.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ge.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ge.toString(r))}setLimit(e,r,n,i){return new ti({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ge.toString(i)}]})}_addCheck(e){return new ti({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ge.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}ti.create=t=>{var e;return new ti({checks:[],typeName:Se.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class io extends De{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==pe.boolean){const n=this._getOrReturnCtx(e);return he(n,{code:re.invalid_type,expected:pe.boolean,received:n.parsedType}),xe}return $t(e.data)}}io.create=t=>new io({typeName:Se.ZodBoolean,coerce:t?.coerce||!1,...Ce(t)});class Ti extends De{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==pe.date){const s=this._getOrReturnCtx(e);return he(s,{code:re.invalid_type,expected:pe.date,received:s.parsedType}),xe}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return he(s,{code:re.invalid_date}),xe}const n=new At;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),he(i,{code:re.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),he(i,{code:re.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ti({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ge.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ge.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Ti.create=t=>new Ti({checks:[],coerce:t?.coerce||!1,typeName:Se.ZodDate,...Ce(t)});class Ma extends De{_parse(e){if(this._getType(e)!==pe.symbol){const n=this._getOrReturnCtx(e);return he(n,{code:re.invalid_type,expected:pe.symbol,received:n.parsedType}),xe}return $t(e.data)}}Ma.create=t=>new Ma({typeName:Se.ZodSymbol,...Ce(t)});class so extends De{_parse(e){if(this._getType(e)!==pe.undefined){const n=this._getOrReturnCtx(e);return he(n,{code:re.invalid_type,expected:pe.undefined,received:n.parsedType}),xe}return $t(e.data)}}so.create=t=>new so({typeName:Se.ZodUndefined,...Ce(t)});class oo extends De{_parse(e){if(this._getType(e)!==pe.null){const n=this._getOrReturnCtx(e);return he(n,{code:re.invalid_type,expected:pe.null,received:n.parsedType}),xe}return $t(e.data)}}oo.create=t=>new oo({typeName:Se.ZodNull,...Ce(t)});class is extends De{constructor(){super(...arguments),this._any=!0}_parse(e){return $t(e.data)}}is.create=t=>new is({typeName:Se.ZodAny,...Ce(t)});class Ai extends De{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $t(e.data)}}Ai.create=t=>new Ai({typeName:Se.ZodUnknown,...Ce(t)});class xn extends De{_parse(e){const r=this._getOrReturnCtx(e);return he(r,{code:re.invalid_type,expected:pe.never,received:r.parsedType}),xe}}xn.create=t=>new xn({typeName:Se.ZodNever,...Ce(t)});class $a extends De{_parse(e){if(this._getType(e)!==pe.undefined){const n=this._getOrReturnCtx(e);return he(n,{code:re.invalid_type,expected:pe.void,received:n.parsedType}),xe}return $t(e.data)}}$a.create=t=>new $a({typeName:Se.ZodVoid,...Ce(t)});let Ci=class Jl extends De{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==pe.array)return he(r,{code:re.invalid_type,expected:pe.array,received:r.parsedType}),xe;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(he(r,{code:o?re.too_big:re.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(he(r,{code:re.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(he(r,{code:re.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new Yr(r,o,r.path,a)))).then(o=>At.mergeArray(n,o));const s=[...r.data].map((o,a)=>i.type._parseSync(new Yr(r,o,r.path,a)));return At.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Jl({...this._def,minLength:{value:e,message:ge.toString(r)}})}max(e,r){return new Jl({...this._def,maxLength:{value:e,message:ge.toString(r)}})}length(e,r){return new Jl({...this._def,exactLength:{value:e,message:ge.toString(r)}})}nonempty(e){return this.min(1,e)}};Ci.create=(t,e)=>new Ci({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Ce(e)});function ss(t){if(t instanceof st){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Qr.create(ss(n))}return new st({...t._def,shape:()=>e})}else return t instanceof Ci?new Ci({...t._def,type:ss(t.element)}):t instanceof Qr?Qr.create(ss(t.unwrap())):t instanceof ni?ni.create(ss(t.unwrap())):t instanceof Jr?Jr.create(t.items.map(e=>ss(e))):t}class st extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ne.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==pe.object){const c=this._getOrReturnCtx(e);return he(c,{code:re.invalid_type,expected:pe.object,received:c.parsedType}),xe}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof xn&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Yr(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof xn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")a.length>0&&(he(i,{code:re.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Yr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>At.mergeObjectSync(n,c)):At.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return ge.errToObj,new st({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;const l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=ge.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new st({...this._def,unknownKeys:"strip"})}passthrough(){return new st({...this._def,unknownKeys:"passthrough"})}extend(e){return new st({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new st({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Se.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new st({...this._def,catchall:e})}pick(e){const r={};return Ne.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new st({...this._def,shape:()=>r})}omit(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new st({...this._def,shape:()=>r})}deepPartial(){return ss(this)}partial(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new st({...this._def,shape:()=>r})}required(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Qr;)s=s._def.innerType;r[n]=s}}),new st({...this._def,shape:()=>r})}keyof(){return rp(Ne.objectKeys(this.shape))}}st.create=(t,e)=>new st({shape:()=>t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),st.strictCreate=(t,e)=>new st({shape:()=>t,unknownKeys:"strict",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),st.lazycreate=(t,e)=>new st({shape:t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)});let ao=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new ur(a.ctx.common.issues));return he(r,{code:re.invalid_union,unionErrors:o}),xe}if(r.common.async)return Promise.all(n.map(async s=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new ur(l));return he(r,{code:re.invalid_union,unionErrors:a}),xe}}get options(){return this._def.options}};ao.create=(t,e)=>new ao({options:t,typeName:Se.ZodUnion,...Ce(e)});const En=t=>t instanceof uo?En(t.schema):t instanceof Mr?En(t.innerType()):t instanceof fo?[t.value]:t instanceof ri?t.options:t instanceof ho?Ne.objectValues(t.enum):t instanceof po?En(t._def.innerType):t instanceof so?[void 0]:t instanceof oo?[null]:t instanceof Qr?[void 0,...En(t.unwrap())]:t instanceof ni?[null,...En(t.unwrap())]:t instanceof jc||t instanceof vo?En(t.unwrap()):t instanceof mo?En(t._def.innerType):[];class Na extends De{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.object)return he(r,{code:re.invalid_type,expected:pe.object,received:r.parsedType}),xe;const n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(he(r,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const s of r){const o=En(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Na({typeName:Se.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ce(n)})}}function Bc(t,e){const r=Xn(t),n=Xn(e);if(t===e)return{valid:!0,data:t};if(r===pe.object&&n===pe.object){const i=Ne.objectKeys(e),s=Ne.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const l=Bc(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===pe.array&&n===pe.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],l=Bc(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===pe.date&&n===pe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let lo=class extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(Zc(s)||Zc(o))return xe;const a=Bc(s.value,o.value);return a.valid?((Vc(s)||Vc(o))&&r.dirty(),{status:r.value,value:a.data}):(he(n,{code:re.invalid_intersection_types}),xe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};lo.create=(t,e,r)=>new lo({left:t,right:e,typeName:Se.ZodIntersection,...Ce(r)});class Jr extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.array)return he(n,{code:re.invalid_type,expected:pe.array,received:n.parsedType}),xe;if(n.data.length<this._def.items.length)return he(n,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&n.data.length>this._def.items.length&&(he(n,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Yr(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>At.mergeArray(r,o)):At.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Jr({...this._def,rest:e})}}Jr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jr({items:t,typeName:Se.ZodTuple,rest:null,...Ce(e)})};class co extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.object)return he(n,{code:re.invalid_type,expected:pe.object,received:n.parsedType}),xe;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new Yr(n,a,n.path,a)),value:o._parse(new Yr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?At.mergeObjectAsync(r,i):At.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof De?new co({keyType:e,valueType:r,typeName:Se.ZodRecord,...Ce(n)}):new co({keyType:ns.create(),valueType:e,typeName:Se.ZodRecord,...Ce(r)})}}class Fa extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.map)return he(n,{code:re.invalid_type,expected:pe.map,received:n.parsedType}),xe;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:i._parse(new Yr(n,a,n.path,[c,"key"])),value:s._parse(new Yr(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return xe;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return xe;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}}}}Fa.create=(t,e,r)=>new Fa({valueType:e,keyType:t,typeName:Se.ZodMap,...Ce(r)});class Oi extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.set)return he(n,{code:re.invalid_type,expected:pe.set,received:n.parsedType}),xe;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(he(n,{code:re.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(he(n,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return xe;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>s._parse(new Yr(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new Oi({...this._def,minSize:{value:e,message:ge.toString(r)}})}max(e,r){return new Oi({...this._def,maxSize:{value:e,message:ge.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Oi.create=(t,e)=>new Oi({valueType:t,minSize:null,maxSize:null,typeName:Se.ZodSet,...Ce(e)});class os extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.function)return he(r,{code:re.invalid_type,expected:pe.function,received:r.parsedType}),xe;function n(a,l){return Ia({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Da(),ts].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function i(a,l){return Ia({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Da(),ts].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof as){const a=this;return $t(async function(...l){const c=new ur([]),u=await a._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(n(l,p)),c}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const a=this;return $t(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new ur([n(l,c.error)]);const u=Reflect.apply(o,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new ur([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new os({...this._def,args:Jr.create(e).rest(Ai.create())})}returns(e){return new os({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new os({args:e||Jr.create([]).rest(Ai.create()),returns:r||Ai.create(),typeName:Se.ZodFunction,...Ce(n)})}}class uo extends De{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}uo.create=(t,e)=>new uo({getter:t,typeName:Se.ZodLazy,...Ce(e)});class fo extends De{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return he(r,{received:r.data,code:re.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:e.data}}get value(){return this._def.value}}fo.create=(t,e)=>new fo({value:t,typeName:Se.ZodLiteral,...Ce(e)});function rp(t,e){return new ri({values:t,typeName:Se.ZodEnum,...Ce(e)})}class ri extends De{constructor(){super(...arguments),ro.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return he(r,{expected:Ne.joinValues(n),received:r.parsedType,code:re.invalid_type}),xe}if(Pa(this,ro)||Jh(this,ro,new Set(this._def.values)),!Pa(this,ro).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return he(r,{received:r.data,code:re.invalid_enum_value,options:n}),xe}return $t(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return ri.create(e,{...this._def,...r})}exclude(e,r=this._def){return ri.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}ro=new WeakMap,ri.create=rp;class ho extends De{constructor(){super(...arguments),no.set(this,void 0)}_parse(e){const r=Ne.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==pe.string&&n.parsedType!==pe.number){const i=Ne.objectValues(r);return he(n,{expected:Ne.joinValues(i),received:n.parsedType,code:re.invalid_type}),xe}if(Pa(this,no)||Jh(this,no,new Set(Ne.getValidEnumValues(this._def.values))),!Pa(this,no).has(e.data)){const i=Ne.objectValues(r);return he(n,{received:n.data,code:re.invalid_enum_value,options:i}),xe}return $t(e.data)}get enum(){return this._def.values}}no=new WeakMap,ho.create=(t,e)=>new ho({values:t,typeName:Se.ZodNativeEnum,...Ce(e)});class as extends De{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.promise&&r.common.async===!1)return he(r,{code:re.invalid_type,expected:pe.promise,received:r.parsedType}),xe;const n=r.parsedType===pe.promise?r.data:Promise.resolve(r.data);return $t(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}as.create=(t,e)=>new as({type:t,typeName:Se.ZodPromise,...Ce(e)});class Mr extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{he(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return xe;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?xe:l.status==="dirty"||r.value==="dirty"?rs(l.value):l});{if(r.value==="aborted")return xe;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?xe:a.status==="dirty"||r.value==="dirty"?rs(a.value):a}}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?xe:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?xe:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!eo(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>eo(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);Ne.assertNever(i)}}Mr.create=(t,e,r)=>new Mr({schema:t,typeName:Se.ZodEffects,effect:e,...Ce(r)}),Mr.createWithPreprocess=(t,e,r)=>new Mr({schema:e,effect:{type:"preprocess",transform:t},typeName:Se.ZodEffects,...Ce(r)});let Qr=class extends De{_parse(e){return this._getType(e)===pe.undefined?$t(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Qr.create=(t,e)=>new Qr({innerType:t,typeName:Se.ZodOptional,...Ce(e)});let ni=class extends De{_parse(e){return this._getType(e)===pe.null?$t(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ni.create=(t,e)=>new ni({innerType:t,typeName:Se.ZodNullable,...Ce(e)});let po=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===pe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};po.create=(t,e)=>new po({innerType:t,typeName:Se.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});let mo=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return to(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ur(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ur(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};mo.create=(t,e)=>new mo({innerType:t,typeName:Se.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class Ra extends De{_parse(e){if(this._getType(e)!==pe.nan){const n=this._getOrReturnCtx(e);return he(n,{code:re.invalid_type,expected:pe.nan,received:n.parsedType}),xe}return{status:"valid",value:e.data}}}Ra.create=t=>new Ra({typeName:Se.ZodNaN,...Ce(t)});const Wb=Symbol("zod_brand");class jc extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class go extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?xe:s.status==="dirty"?(r.dirty(),rs(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?xe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new go({in:e,out:r,typeName:Se.ZodPipeline})}}let vo=class extends De{_parse(e){const r=this._def.innerType._parse(e),n=i=>(eo(i)&&(i.value=Object.freeze(i.value)),i);return to(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};vo.create=(t,e)=>new vo({innerType:t,typeName:Se.ZodReadonly,...Ce(e)});function np(t,e={},r){return t?is.create().superRefine((n,i)=>{var s,o;if(!t(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,c=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...c,fatal:l})}}):is.create()}const Hb={object:st.lazycreate};var Se;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Se||(Se={}));const Kb=(t,e={message:`Input not instance of ${t.name}`})=>np(r=>r instanceof t,e),ip=ns.create,sp=ei.create,Gb=Ra.create,Yb=ti.create,op=io.create,Jb=Ti.create,Qb=Ma.create,Xb=so.create,ew=oo.create,tw=is.create,rw=Ai.create,nw=xn.create,iw=$a.create,sw=Ci.create,ow=st.create,aw=st.strictCreate,lw=ao.create,cw=Na.create,uw=lo.create,dw=Jr.create,fw=co.create,hw=Fa.create,pw=Oi.create,mw=os.create,gw=uo.create,vw=fo.create,yw=ri.create,_w=ho.create,bw=as.create,ap=Mr.create,ww=Qr.create,kw=ni.create,Sw=Mr.createWithPreprocess,xw=go.create;var St=Object.freeze({__proto__:null,defaultErrorMap:ts,setErrorMap:Ob,getErrorMap:Da,makeIssue:Ia,EMPTY_PATH:Db,addIssueToContext:he,ParseStatus:At,INVALID:xe,DIRTY:rs,OK:$t,isAborted:Zc,isDirty:Vc,isValid:eo,isAsync:to,get util(){return Ne},get objectUtil(){return zc},ZodParsedType:pe,getParsedType:Xn,ZodType:De,datetimeRegex:tp,ZodString:ns,ZodNumber:ei,ZodBigInt:ti,ZodBoolean:io,ZodDate:Ti,ZodSymbol:Ma,ZodUndefined:so,ZodNull:oo,ZodAny:is,ZodUnknown:Ai,ZodNever:xn,ZodVoid:$a,ZodArray:Ci,ZodObject:st,ZodUnion:ao,ZodDiscriminatedUnion:Na,ZodIntersection:lo,ZodTuple:Jr,ZodRecord:co,ZodMap:Fa,ZodSet:Oi,ZodFunction:os,ZodLazy:uo,ZodLiteral:fo,ZodEnum:ri,ZodNativeEnum:ho,ZodPromise:as,ZodEffects:Mr,ZodTransformer:Mr,ZodOptional:Qr,ZodNullable:ni,ZodDefault:po,ZodCatch:mo,ZodNaN:Ra,BRAND:Wb,ZodBranded:jc,ZodPipeline:go,ZodReadonly:vo,custom:np,Schema:De,ZodSchema:De,late:Hb,get ZodFirstPartyTypeKind(){return Se},coerce:{string:(t=>ns.create({...t,coerce:!0})),number:(t=>ei.create({...t,coerce:!0})),boolean:(t=>io.create({...t,coerce:!0})),bigint:(t=>ti.create({...t,coerce:!0})),date:(t=>Ti.create({...t,coerce:!0}))},any:tw,array:sw,bigint:Yb,boolean:op,date:Jb,discriminatedUnion:cw,effect:ap,enum:yw,function:mw,instanceof:Kb,intersection:uw,lazy:gw,literal:vw,map:hw,nan:Gb,nativeEnum:_w,never:nw,null:ew,nullable:kw,number:sp,object:ow,oboolean:()=>op().optional(),onumber:()=>sp().optional(),optional:ww,ostring:()=>ip().optional(),pipeline:xw,preprocess:Sw,promise:bw,record:fw,set:pw,strictObject:aw,string:ip,symbol:Qb,transformer:ap,tuple:dw,undefined:Xb,union:lw,unknown:rw,void:iw,NEVER:xe,ZodIssueCode:re,quotelessJson:Cb,ZodError:ur});const Ew=St.object({id:St.number(),customer:St.object({customer_salutation_id:St.number().positive({message:"user.fieldErrors.titleRequire"}),name:St.string().min(1,{message:"user.fieldErrors.nameRequire"}),surname:St.string().min(1,{message:"user.fieldErrors.surnameRequire"}),email:St.string().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:St.string().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:St.string().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:St.string().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:St.string().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:St.number().positive().default(60),language_id:St.number().positive({message:"user.fieldErrors.languageRequire"}).default(1)})});St.object({ticket_sale_id:St.number(),start_at:St.string().date(),personalizations:St.array(Ew)});function qc(t,e){return t-e*Math.floor(t/e)}const lp=1721426;function La(t,e,r,n){e=Wc(t,e);let i=e-1,s=-2;return r<=2?s=0:za(e)&&(s=-1),lp-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function za(t){return t%4===0&&(t%100!==0||t%400===0)}function Wc(t,e){return t==="BC"?1-e:e}function Tw(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const Aw={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class ls{fromJulianDay(e){let r=e,n=r-lp,i=Math.floor(n/146097),s=qc(n,146097),o=Math.floor(s/36524),a=qc(s,36524),l=Math.floor(a/1461),c=qc(a,1461),u=Math.floor(c/365),d=i*400+o*100+l*4+u+(o!==4&&u!==4?1:0),[f,p]=Tw(d),v=r-La(f,p,1,1),g=2;r<La(f,p,3,1)?g=0:za(p)&&(g=1);let m=Math.floor(((v+g)*12+373)/367),b=r-La(f,p,m,1)+1;return new ai(f,p,m,b)}toJulianDay(e){return La(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Aw[za(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return za(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}const Cw={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function ii(t,e){return e=fr(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Hc(t,e){return e=fr(e,t.calendar),t=Gc(t),e=Gc(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function Ow(t,e){return t.isEqual?.(e)??e.isEqual?.(t)??t.identifier===e.identifier}function Dw(t,e){return ii(t,cs(e))}function cp(t,e,r){let n=t.calendar.toJulianDay(t),i=Nw(e),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function Iw(t){return en(Date.now(),t)}function cs(t){return Lw(Iw(t))}function up(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function dp(t,e){return fp(t)-fp(e)}function fp(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Kc=null,Pw=!1;function dr(){return Kc==null&&(Kc=new Intl.DateTimeFormat().resolvedOptions().timeZone),Kc}function hp(){return Pw}function Gc(t){return t.subtract({days:t.day-1})}function Mw(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const pp=new Map,Yc=new Map;function $w(t){if(Intl.Locale){let r=pp.get(t);return r||(r=new Intl.Locale(t).maximize().region,r&&pp.set(t,r)),r}let e=t.split("-")[1];return e==="u"?void 0:e}function Nw(t){let e=Yc.get(t);if(!e){if(Intl.Locale){let n=new Intl.Locale(t);if("getWeekInfo"in n&&(e=n.getWeekInfo(),e))return Yc.set(t,e),e.firstDay}let r=$w(t);if(t.includes("-fw-")){let n=t.split("-fw-")[1].split("-")[0];n==="mon"?e={firstDay:1}:n==="tue"?e={firstDay:2}:n==="wed"?e={firstDay:3}:n==="thu"?e={firstDay:4}:n==="fri"?e={firstDay:5}:n==="sat"?e={firstDay:6}:e={firstDay:0}}else t.includes("-ca-iso8601")?e={firstDay:1}:e={firstDay:r&&Cw[r]||0};Yc.set(t,e)}return e.firstDay}function si(t){t=fr(t,new ls);let e=Wc(t.era,t.year);return mp(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function mp(t,e,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(t,e-1,r),a.getTime()}function yo(t,e){if(e==="UTC")return 0;if(t>0&&e===dr()&&!hp())return new Date(t).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=vp(t,e);return mp(r,n,i,s,o,a,0)-Math.floor(t/1e3)*1e3}const gp=new Map;function vp(t,e){let r=gp.get(e);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),gp.set(e,r));let n=r.formatToParts(new Date(t)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Za=864e5;function Fw(t,e){let r=si(t),n=r-yo(r-Za,e),i=r-yo(r+Za,e);return yp(t,e,n,i)}function yp(t,e,r,n){return(r===n?[r]:[r,n]).filter(s=>Rw(t,e,s))}function Rw(t,e,r){let n=vp(r,e);return t.year===n.year&&t.month===n.month&&t.day===n.day&&t.hour===n.hour&&t.minute===n.minute&&t.second===n.second}function Xr(t,e,r="compatible"){let n=oi(t);if(e==="UTC")return si(n);if(e===dr()&&r==="compatible"&&!hp()){n=fr(n,new ls);let l=new Date,c=Wc(n.era,n.year);return l.setFullYear(c,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=si(n),s=yo(i-Za,e),o=yo(i+Za,e),a=yp(n,e,i-s,i-o);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-o);case"compatible":case"later":return Math.max(i-s,i-o);case"reject":throw new RangeError("No such absolute time found")}}function _p(t,e,r="compatible"){return new Date(Xr(t,e,r))}function en(t,e){let r=yo(t,e),n=new Date(t+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),u=n.getUTCMilliseconds();return new $r(i<1?"BC":"AD",i<1?-i+1:i,s,o,e,r,a,l,c,u)}function Lw(t){return new ai(t.calendar,t.era,t.year,t.month,t.day)}function oi(t,e){let r=0,n=0,i=0,s=0;if("timeZone"in t)({hour:r,minute:n,second:i,millisecond:s}=t);else if("hour"in t&&!e)return t;return e&&({hour:r,minute:n,second:i,millisecond:s}=e),new An(t.calendar,t.era,t.year,t.month,t.day,r,n,i,s)}function zw(t){return new au(t.hour,t.minute,t.second,t.millisecond)}function fr(t,e){if(Ow(t.calendar,e))return t;let r=e.fromJulianDay(t.calendar.toJulianDay(t)),n=t.copy();return n.calendar=e,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Di(n),n}function Zw(t,e,r){if(t instanceof $r)return t.timeZone===e?t:bp(t,e);let n=Xr(t,e,r);return en(n,e)}function Vw(t){let e=si(t)-t.offset;return new Date(e)}function bp(t,e){let r=si(t)-t.offset;return fr(en(r,e),t.calendar)}const _o=36e5;function Va(t,e){let r=t.copy(),n="hour"in r?xp(r,e):0;Jc(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,Qc(r),wp(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=n,Uw(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let o=r.calendar.isInverseEra?.(r);r.year=i,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function Jc(t,e){t.calendar.isInverseEra?.(t)&&(e=-e),t.year+=e}function Qc(t){for(;t.month<1;)Jc(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,Jc(t,1)}function Uw(t){for(;t.day<1;)t.month--,Qc(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,Qc(t)}function wp(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function Di(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),wp(t)}function Xc(t){let e={};for(let r in t)typeof t[r]=="number"&&(e[r]=-t[r]);return e}function kp(t,e){return Va(t,Xc(e))}function eu(t,e){let r=t.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),Di(r),r}function bo(t,e){let r=t.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),Sp(r),r}function Bw(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Ua(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Ua(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Ua(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Ua(t.hour,24),e}function Sp(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Ua(t,e){let r=t%e;return r<0&&(r+=e),r}function xp(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,Bw(t)}function Ep(t,e){let r=t.copy();return xp(r,e),r}function jw(t,e){return Ep(t,Xc(e))}function tu(t,e,r,n){let i=t.copy();switch(e){case"era":{let s=t.calendar.getEras(),o=s.indexOf(t.era);if(o<0)throw new Error("Invalid era: "+t.era);o=Tn(o,r,0,s.length-1,n?.round),i.era=s[o],Di(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=Tn(t.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Tn(t.month,r,1,t.calendar.getMonthsInYear(t),n?.round);break;case"day":i.day=Tn(t.day,r,1,t.calendar.getDaysInMonth(t),n?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),Di(i),i}function ru(t,e,r,n){let i=t.copy();switch(e){case"hour":{let s=t.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=Tn(s,r,o,a,n?.round);break}case"minute":i.minute=Tn(t.minute,r,0,59,n?.round);break;case"second":i.second=Tn(t.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=Tn(t.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Tn(t,e,r,n,i=!1){if(i){t+=Math.sign(e),t<r&&(t=n);let s=Math.abs(e);e>0?t=Math.ceil(t/s)*s:t=Math.floor(t/s)*s,t>n&&(t=r)}else t+=e,t<r?t=n-(r-t-1):t>n&&(t=r+(t-n-1));return t}function Tp(t,e){let r;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=Va(oi(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});r=Xr(i,t.timeZone)}else r=si(t)-t.offset;r+=e.milliseconds||0,r+=(e.seconds||0)*1e3,r+=(e.minutes||0)*6e4,r+=(e.hours||0)*36e5;let n=en(r,t.timeZone);return fr(n,t.calendar)}function qw(t,e){return Tp(t,Xc(e))}function Ww(t,e,r,n){switch(e){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let v=t.hour>=12;i=v?12:0,s=v?23:11}let o=oi(t),a=fr(bo(o,{hour:i}),new ls),l=[Xr(a,t.timeZone,"earlier"),Xr(a,t.timeZone,"later")].filter(v=>en(v,t.timeZone).day===a.day)[0],c=fr(bo(o,{hour:s}),new ls),u=[Xr(c,t.timeZone,"earlier"),Xr(c,t.timeZone,"later")].filter(v=>en(v,t.timeZone).day===c.day).pop(),d=si(t)-t.offset,f=Math.floor(d/_o),p=d%_o;return d=Tn(f,r,Math.floor(l/_o),Math.floor(u/_o),n?.round)*_o+p,fr(en(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return ru(t,e,r,n);case"era":case"year":case"month":case"day":{let i=tu(oi(t),e,r,n),s=Xr(i,t.timeZone);return fr(en(s,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function Hw(t,e,r){let n=oi(t),i=bo(eu(n,e),e);if(i.compare(n)===0)return t;let s=Xr(i,t.timeZone,r);return fr(en(s,t.timeZone),t.calendar)}const Kw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Gw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Yw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,nu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function iu(t){let e=t.match(Kw);if(!e)throw nu.test(t)?new Error(`Invalid ISO 8601 date string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+t);let r=new ai(je(e[1],0,9999),je(e[2],1,12),1);return r.day=je(e[3],1,r.calendar.getDaysInMonth(r)),r}function Ap(t){let e=t.match(Gw);if(!e)throw nu.test(t)?new Error(`Invalid ISO 8601 date time string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+t);let r=je(e[1],-9999,9999),n=r<1?"BC":"AD",i=new An(n,r<1?-r+1:r,je(e[2],1,12),1,e[4]?je(e[4],0,23):0,e[5]?je(e[5],0,59):0,e[6]?je(e[6],0,59):0,e[7]?je(e[7],0,1/0)*1e3:0);return i.day=je(e[3],0,i.calendar.getDaysInMonth(i)),i}function Cp(t,e){let r=t.match(Yw);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=je(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,n<1?-n+1:n,je(r[2],1,12),1,r[11],0,r[4]?je(r[4],0,23):0,r[5]?je(r[5],0,59):0,r[6]?je(r[6],0,59):0,r[7]?je(r[7],0,1/0)*1e3:0);s.day=je(r[3],0,s.calendar.getDaysInMonth(s));let o=oi(s),a;if(r[8]){let l=je(r[8],-23,23);if(s.offset=Math.sign(l)*(Math.abs(l)*36e5+je(r[9]??"0",0,59)*6e4+je(r[10]??"0",0,59)*1e3),a=si(s)-s.offset,!Fw(o,s.timeZone).includes(a))throw new Error(`Offset ${Ip(s.offset)} is invalid for ${su(s)} in ${s.timeZone}`)}else a=Xr(oi(o),s.timeZone,e);return en(a,s.timeZone)}function Jw(t,e){let r=t.match(nu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=je(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,n<1?-n+1:n,je(r[2],1,12),1,e,0,r[4]?je(r[4],0,23):0,r[5]?je(r[5],0,59):0,r[6]?je(r[6],0,59):0,r[7]?je(r[7],0,1/0)*1e3:0);return s.day=je(r[3],0,s.calendar.getDaysInMonth(s)),r[8]&&(s.offset=je(r[8],-23,23)*36e5+je(r[9]??"0",0,59)*6e4),bp(s,e)}function je(t,e,r){let n=Number(t);if(n<e||n>r)throw new RangeError(`Value out of range: ${e} <= ${n} <= ${r}`);return n}function Op(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function Dp(t){let e=fr(t,new ls),r;return e.era==="BC"?r=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):r=String(e.year).padStart(4,"0"),`${r}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function su(t){return`${Dp(t)}T${Op(t)}`}function Ip(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let r=Math.floor(t/36e5),n=Math.floor(t%36e5/6e4),i=Math.floor(t%36e5%6e4/1e3),s=`${e}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function Qw(t){return`${su(t)}${Ip(t.offset)}[${t.timeZone}]`}function ou(t){let e=typeof t[0]=="object"?t.shift():new ls,r;if(typeof t[0]=="string")r=t.shift();else{let o=e.getEras();r=o[o.length-1]}let n=t.shift(),i=t.shift(),s=t.shift();return[e,r,n,i,s]}class ai{#e;constructor(...e){let[r,n,i,s,o]=ou(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,Di(this)}copy(){return this.era?new ai(this.calendar,this.era,this.year,this.month,this.day):new ai(this.calendar,this.year,this.month,this.day)}add(e){return Va(this,e)}subtract(e){return kp(this,e)}set(e){return eu(this,e)}cycle(e,r,n){return tu(this,e,r,n)}toDate(e){return _p(this,e)}toString(){return Dp(this)}compare(e){return up(this,e)}}class au{#e;constructor(e=0,r=0,n=0,i=0){this.hour=e,this.minute=r,this.second=n,this.millisecond=i,Sp(this)}copy(){return new au(this.hour,this.minute,this.second,this.millisecond)}add(e){return Ep(this,e)}subtract(e){return jw(this,e)}set(e){return bo(this,e)}cycle(e,r,n){return ru(this,e,r,n)}toString(){return Op(this)}compare(e){return dp(this,e)}}class An{#e;constructor(...e){let[r,n,i,s,o]=ou(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Di(this)}copy(){return this.era?new An(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new An(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Va(this,e)}subtract(e){return kp(this,e)}set(e){return eu(bo(this,e),e)}cycle(e,r,n){switch(e){case"era":case"year":case"month":case"day":return tu(this,e,r,n);default:return ru(this,e,r,n)}}toDate(e,r){return _p(this,e,r)}toString(){return su(this)}compare(e){let r=up(this,e);return r===0?dp(this,oi(e)):r}}class $r{#e;constructor(...e){let[r,n,i,s,o]=ou(e),a=e.shift(),l=e.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,this.offset=l,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Di(this)}copy(){return this.era?new $r(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $r(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Tp(this,e)}subtract(e){return qw(this,e)}set(e,r){return Hw(this,e,r)}cycle(e,r,n){return Ww(this,e,r,n)}toDate(){return Vw(this)}toString(){return Qw(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Zw(e,this.timeZone).toDate().getTime()}}let lu=new Map;class tn{constructor(e,r={}){this.formatter=Pp(e,r),this.options=r}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(r)}`}formatRangeToParts(e,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(r);return[...n.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return t0()&&(this.resolvedHourCycle||(this.resolvedHourCycle=r0(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}}const Xw={true:{ja:"h11"},false:{}};function Pp(t,e={}){if(typeof e.hour12=="boolean"&&e0()){e={...e};let i=Xw[String(e.hour12)][t.split("-")[0]],s=e.hour12?"h12":"h23";e.hourCycle=i??s,delete e.hour12}let r=t+(e?Object.entries(e).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(lu.has(r))return lu.get(r);let n=new Intl.DateTimeFormat(t,e);return lu.set(r,n),n}let cu=null;function e0(){return cu==null&&(cu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),cu}let uu=null;function t0(){return uu==null&&(uu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),uu}function r0(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let r=Pp(t,{...e,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function wo(t){return zw(Jw(t,"Europe/Berlin")).toString().slice(0,-3)}function ko(t,e={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){return e={...e},new Date(t).toLocaleDateString(r,e)}function Ba(t){if(t===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}let n0=1;function Mp(t){return t.type==="Ticket"}function ja(t,e){return{...t,uid:n0++,selectedTime:e?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[t.ticket_type],shop_order:t.shop_order??0}}function li(t,e=""){return Eb(Object.values(t).map(r=>ja(r,{selectedTime:e})),r=>r.shop_order)}function ci(t,e=""){let r=Object.entries(t);return e!==""&&(r=r.filter(([,n])=>n.total_capacities?.[e]&&n.total_capacities[e]>0)),Object.fromEntries(r)}const i0=function(t,e,r,n){if(t.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!Mp(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=t.quotaManager;s.clearPrecart();for(const l of[...n.items,...e.items]){const c=l.product;Mp(c)&&s.setPrecartItemQuantity(c.id,l.quantity)}const o=s.ticketCapacity(i.id,i.selectedTime),a=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:a===0}};function So(t){return t.type==="Event"}function s0(t){return So(t)&&t.subtype==="scale"}let o0=1;function a0(t,e,r){const n={type:"Event",id:e,tax_included:!0,...t};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=t.title||"",r.price_description=t.description||""}return{uid:o0++,dateId:e,minAvailableCapacity:0,selectedTime:"",...r,...n,...t,type:"Event",subtype:t.scale_price_id===void 0?"flat":"scale"}}function du(t,e,r){return a0(t,e,r)}const l0=function(t,e,r,n){if(t.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!So(r.product))throw new Error("(getMaxQuantitySeats) impossible");const s=r.product.dateId,o=t.allSeats[s];if(!o)return console.error("(getMaxQuantity) no seats found for dateId",s),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(o.max||100,o.max_per_registration||100,o.available??100),l={max_per_registration:a,available:100,overbook:!1,...o};let c=a;l.overbook&&(c=Math.min(l.max||100,l.max_per_registration||100));const u=n.totalQuantity,d=Ei(e.items.filter(v=>n.items.some(g=>g.uuid===v.uuid)),v=>v.quantity),f=Math.max(c-d-u+r.quantity,0);return{max:f,min:l.min??0,unavailable:l.available===0,bookedOut:f===0}},c0=function(t,e,r,n){if(t.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function u0(t){return{apiData:t,_timeslots:[],addQuotas(n){this._timeslots=[],this.apiData={...this.apiData,...n}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(n,i){this.precart[n]=i,this._timeslots=[]},getPrecartItemQuantity(n){return this.precart[n]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([n,i])=>Object.keys(i.capacities).map(s=>{const o=Ei(i.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));return{timeSlot:s,quota:n,capacity:i.capacities[s]-o,tickets:i.ticket_ids,totalCapacity:i.total_capacities[s]}}))),this._timeslots},filterBy({timeslot:n,ticketId:i,date:s}={}){let o=this.timeslots();return i&&(o=o.filter(a=>a.tickets.includes(i))),n&&(o=o.filter(a=>a.timeSlot===n)),s&&(o=o.filter(a=>a.timeSlot.startsWith(s))),o.flatMap(a=>a.tickets.map(l=>({timeslot:n,ticket:l,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(n,i){return(Hh(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.capacity))??0)+this.getPrecartItemQuantity(n)},totalCapacity(n,i){return Hh(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.totalCapacity))??0},timeslotsOn(n){return Object.values(this.timeslots().filter(s=>s.timeSlot.startsWith(n.toString())).reduce((s,o)=>((!s[o.timeSlot]||o.capacity<s[o.timeSlot].capacity)&&(s[o.timeSlot]=o),s),{})).sort((s,o)=>s.timeSlot.localeCompare(o.timeSlot))}}}function d0(t){let e=0;ba(()=>{_e(()=>{if(t.items.length===e)return;const r=t.items.length>e?"go-cart-item-added":"go-cart-item-removed";e=t.items.length,document.dispatchEvent(new CustomEvent(r,{detail:t.items.length}))})})}function xt(t,e){return{...{quantity:0,time:"",...e??{}},type:t.type,product:t,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(t.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity};case"Event":switch(t.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[t.scale_price_id]:this.quantity}};default:const s=t;throw new Error(`(orderAttributes) Unhandled Event subtype: ${s}`)}default:const i=t;throw new Error(`(orderAttributes) Unhandled product type: ${i}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),s0(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&n.push("discounted"),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){return this.time&&this.product.dynamic_prices?.[this.time]!=null?this.product.dynamic_prices[this.time]:this.product.price_cents},get price_formatted(){return kr(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return kr(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return kr(this.total_price_cents)}}}function f0(t){const e=t.product.type;switch(e){case"Ticket":if(t.time&&!$p(t.time))return;const r=ja(t.product);return xt(r,{time:t.time,quantity:t.quantity});case"Event":if(t.time&&!$p(t.time))return;const n=du(t.product,t.id);return xt(n,{time:t.time,quantity:t.quantity});default:const i=e;throw new Error(`Unhandled case: ${i}`)}}function h0(t){let e=[],r=[];try{const n=localStorage.getItem("go-cart");if(!n)return[];const i=JSON.parse(n);if(Array.isArray(i))e=i,r=[];else if(typeof i=="object"&&i!==null)e=i.items||[],r=i.coupons||[];else throw console.dir({parsed:i,content:n}),new Error("go-cart has invalid format");return e.length===0?t.clearItems():t.items=e.map(f0).filter(m0),t.clearCoupons(),r.forEach(s=>t.addCoupon(s)),t.items}catch(n){return console.error(n),localStorage.setItem("go-cart",JSON.stringify({items:[],coupons:[]})),[]}}function p0(t){h0(t);let e=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});localStorage.setItem("go-cart",e),ba(()=>{_e(()=>{const r=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});r!==e&&(e=r,localStorage.setItem("go-cart",r))})})}const $p=t=>{const e=new Date,r=new Date(t);return e<r},m0=t=>t!==void 0;let g0=0;function us(t,e=20){const r=Be([]),n=Be([]),s={items:r,coupons:n,paymentModeId:void 0,uid:`cart-${g0++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,Ei(this.items,o=>o.total_price_cents))},get totalQuantity(){return Ei(this.items,o=>o.quantity)},toString(){return this.uid+" > ["+this.items.map(o=>o.uuid+":"+o.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(o=>({type:o.type,attributes:o.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??S.settings?.defaultPaymentModeId,coupons:this.coupons,donations:[],affiliate:{},total:this.totalPriceCents}},get totalFormatted(){return kr(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let a=this.items.length-1;a>=0;a--)this.items[a].uuid===o.uuid&&this.items.splice(a,1)},addItem(o){const a=this.items.find(l=>l.uuid===o.uuid);a?a.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(a=>this.addItem(a))},addCoupon(o){this.coupons.includes(o)||this.coupons.push(o)},removeCoupon(o){const a=this.coupons.indexOf(o);a>-1&&this.coupons.splice(a,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return t&&t.forEach(o=>s.addItem(xt(o))),s}function kr(t){return t=t??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}function v0(){const t=Be(us());return p0(t),d0(t),t}function qa(){return typeof window<"u"&&typeof localStorage<"u"}function y0(t,e){if(qa())try{localStorage.setItem(t,JSON.stringify(e))}catch(r){console.warn(`Failed to save to localStorage (${t}):`,r)}}function fu(t){if(!qa())return null;try{const e=localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return console.warn(`Failed to load from localStorage (${t}):`,e),null}}function _0(t){if(qa())try{localStorage.removeItem(t)}catch(e){console.warn(`Failed to remove from localStorage (${t}):`,e)}}const xo="go-capacity";function Np(t,e){const r=fu(xo),n={allSeats:{...r?.allSeats||{},...t},allQuotas:{...r?.allQuotas||{},...e}};y0(xo,n)}function Fp(t){const e=fu(xo);if(e){if(e.allSeats)for(const r in e.allSeats){const n=parseInt(r);t.addSeats(n,e.allSeats[n],!1)}e.allQuotas&&t.addQuotas(e.allQuotas,!1)}}function b0(t){qa()&&window.addEventListener("storage",e=>{if(e.key===xo&&Fp(t),e.key==="go-cart"){const r=fu("go-cart");(!r||!r.items||r.items.length===0)&&_0(xo)}})}function Rp(){const t={allSeats:{},allQuotas:{},quotaManager:u0({}),addQuotas(e,r=!0){this.allQuotas={...this.allQuotas,...e},this.quotaManager.addQuotas(e),r&&Np(this.allSeats,this.allQuotas)},addSeats(e,r,n=!0){this.allSeats[e]=r,n&&Np(this.allSeats,this.allQuotas)},capacityPolicy(e){const r=e.product.type;switch(r){case"Ticket":const i=e.product.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:const l=i;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}case"Event":const o=e.product.subtype;switch(o){case"flat":case"scale":return"seats";default:const l=o;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}default:const a=r;throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}},capacity(e,r,n){const i=this.capacityPolicy(r),s={quotas:i0,seats:l0,unlimited:c0}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ge(()=>s(this,e,r,n))}};return Fp(t),b0(t),t}function Lp(t){if(typeof document>"u")return;const r=`; ${document.cookie}`.split(`; ${t}=`);if(r.length===2){const n=r.pop()?.split(";").shift();return n?decodeURIComponent(n):void 0}}class zp{get isAuthenticated(){return this.isLoggedIn||this.isGuest}}class w0 extends zp{constructor(){super()}get isLoggedIn(){try{const e=Lp("auth_headers");if(!e)return!1;const r=JSON.parse(e),n=Math.floor(Date.now()/1e3);return!r["access-token"]||parseInt(r.expiry,10)<n?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=Lp("auth_headers");if(!e)return!0;const r=JSON.parse(e);return typeof r.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!0}}}class k0 extends zp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}}const S0=t=>{switch(t){case"angular":return new w0;case"jmb":return new k0;default:let e=t;throw new Error("Unhandled shop type: "+e)}};function x0(t){return t==null||typeof t=="string"&&t.trim()===""}function E0(t,e){const r={};if(!e||e.length===0)return r;for(const n of e)(!(n in t)||x0(t[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function T0(t,e){return E0(t,e)}const A0={withStackTrace:!1},Zp=(t,e,r=A0)=>{const n=e.isOk()?{type:"Ok",value:e.value}:{type:"Err",value:e.error},i=r.withStackTrace?new Error().stack:void 0;return{data:n,message:t,stack:i}};function ds(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((n=n.apply(t,[])).next())})}function Vp(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ii(t){return this instanceof Ii?(this.v=t,this):new Ii(t)}function C0(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(f){n[f]&&(i[f]=function(p){return new Promise(function(v,g){s.push([f,p,v,g])>1||a(f,p)})})}function a(f,p){try{l(n[f](p))}catch(v){d(s[0][3],v)}}function l(f){f.value instanceof Ii?Promise.resolve(f.value.v).then(c,u):d(s[0][2],f)}function c(f){a("next",f)}function u(f){a("throw",f)}function d(f,p){f(p),s.shift(),s.length&&a(s[0][0],s[0][1])}}function O0(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Ii(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function D0(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Vp=="function"?Vp(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,l){o=t[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}class Nt{constructor(e){this._promise=e}static fromSafePromise(e){const r=e.then(n=>new On(n));return new Nt(r)}static fromPromise(e,r){const n=e.then(i=>new On(i)).catch(i=>new rn(r(i)));return new Nt(n)}static fromThrowable(e,r){return(...n)=>new Nt(ds(this,void 0,void 0,function*(){try{return new On(yield e(...n))}catch(i){return new rn(r?r(i):i)}}))}static combine(e){return I0(e)}static combineWithAllErrors(e){return P0(e)}map(e){return new Nt(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?new rn(r.error):new On(yield e(r.value))})))}andThrough(e){return new Nt(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new rn(r.error);const n=yield e(r.value);return n.isErr()?new rn(n.error):new On(r.value)})))}andTee(e){return new Nt(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new rn(r.error);try{yield e(r.value)}catch{}return new On(r.value)})))}mapErr(e){return new Nt(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isOk()?new On(r.value):new rn(yield e(r.error))})))}andThen(e){return new Nt(this._promise.then(r=>{if(r.isErr())return new rn(r.error);const n=e(r.value);return n instanceof Nt?n._promise:n}))}orElse(e){return new Nt(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?e(r.error):new On(r.value)})))}match(e,r){return this._promise.then(n=>n.match(e,r))}unwrapOr(e){return this._promise.then(r=>r.unwrapOr(e))}safeUnwrap(){return C0(this,arguments,function*(){return yield Ii(yield Ii(yield*O0(D0(yield Ii(this._promise.then(r=>r.safeUnwrap()))))))})}then(e,r){return this._promise.then(e,r)}}const hu=t=>new Nt(Promise.resolve(new rn(t))),Up=t=>{let e=Pi([]);for(const r of t)if(r.isErr()){e=Cn(r.error);break}else e.map(n=>n.push(r.value));return e},I0=t=>Nt.fromSafePromise(Promise.all(t)).andThen(Up),Bp=t=>{let e=Pi([]);for(const r of t)r.isErr()&&e.isErr()?e.error.push(r.error):r.isErr()&&e.isOk()?e=Cn([r.error]):r.isOk()&&e.isOk()&&e.value.push(r.value);return e},P0=t=>Nt.fromSafePromise(Promise.all(t)).andThen(Bp);var pu;(function(t){function e(i,s){return(...o)=>{try{const a=i(...o);return Pi(a)}catch(a){return Cn(s?s(a):a)}}}t.fromThrowable=e;function r(i){return Up(i)}t.combine=r;function n(i){return Bp(i)}t.combineWithAllErrors=n})(pu||(pu={}));const Pi=t=>new On(t);function Cn(t){return new rn(t)}class On{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Pi(e(this.value))}mapErr(e){return Pi(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(r=>this.value)}andTee(e){try{e(this.value)}catch{}return Pi(this.value)}orElse(e){return Pi(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return Nt.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,r){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Zp("Called `_unsafeUnwrapErr` on an Ok",this,e)}}class rn{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Cn(this.error)}mapErr(e){return Cn(e(this.error))}andThrough(e){return Cn(this.error)}andTee(e){return Cn(this.error)}andThen(e){return Cn(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return hu(this.error)}asyncAndThrough(e){return hu(this.error)}asyncMap(e){return hu(this.error)}unwrapOr(e){return e}match(e,r){return r(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Cn(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Zp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}}pu.fromThrowable;const M0=/\{[^{}]+\}/g;function $0(){return Math.random().toString(36).slice(2,11)}function N0(t){let{baseUrl:e="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,headers:o,...a}={...t};e=Hp(e);const l=[];async function c(u,d){const{baseUrl:f,fetch:p=n,Request:v=r,headers:g,params:m={},parseAs:b="json",querySerializer:k,bodySerializer:O=s??R0,body:E,...P}=d||{};f&&(e=Hp(f));let A=typeof i=="function"?i:Wp(i);k&&(A=typeof k=="function"?k:Wp({...typeof i=="object"?i:{},...k}));const D=E===void 0?void 0:O(E),F=D===void 0||D instanceof FormData?{}:{"Content-Type":"application/json"},N={redirect:"follow",...a,...P,body:D,headers:z0(F,o,g,m.header)};let B,H,Z=new r(L0(u,{baseUrl:e,params:m,querySerializer:A}),N);for(const K in P)K in Z||(Z[K]=P[K]);if(l.length){B=$0(),H=Object.freeze({baseUrl:e,fetch:p,parseAs:b,querySerializer:A,bodySerializer:O});for(const K of l)if(K&&typeof K=="object"&&typeof K.onRequest=="function"){const J=await K.onRequest({request:Z,schemaPath:u,params:m,options:H,id:B});if(J){if(!(J instanceof r))throw new Error("onRequest: must return new Request() when modifying the request");Z=J}}}let de=await p(Z);if(l.length)for(let K=l.length-1;K>=0;K--){const J=l[K];if(J&&typeof J=="object"&&typeof J.onResponse=="function"){const G=await J.onResponse({request:Z,response:de,schemaPath:u,params:m,options:H,id:B});if(G){if(!(G instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=G}}}if(de.status===204||de.headers.get("Content-Length")==="0")return de.ok?{data:{},response:de}:{error:{},response:de};if(de.ok)return b==="stream"?{data:de.body,response:de}:{data:await de[b](),response:de};let X=await de.text();try{X=JSON.parse(X)}catch{}return{error:X,response:de}}return{GET(u,d){return c(u,{...d,method:"GET"})},PUT(u,d){return c(u,{...d,method:"PUT"})},POST(u,d){return c(u,{...d,method:"POST"})},DELETE(u,d){return c(u,{...d,method:"DELETE"})},OPTIONS(u,d){return c(u,{...d,method:"OPTIONS"})},HEAD(u,d){return c(u,{...d,method:"HEAD"})},PATCH(u,d){return c(u,{...d,method:"PATCH"})},TRACE(u,d){return c(u,{...d,method:"TRACE"})},use(...u){for(const d of u)if(d){if(typeof d!="object"||!("onRequest"in d||"onResponse"in d))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");l.push(d)}},eject(...u){for(const d of u){const f=l.indexOf(d);f!==-1&&l.splice(f,1)}}}}function Wa(t,e,r){if(e==null)return"";if(typeof e=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${r?.allowReserved===!0?e:encodeURIComponent(e)}`}function jp(t,e,r){if(!e||typeof e!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const a in e)n.push(a,r.allowReserved===!0?e[a]:encodeURIComponent(e[a]));const o=n.join(",");switch(r.style){case"form":return`${t}=${o}`;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return o}}for(const o in e){const a=r.style==="deepObject"?`${t}[${o}]`:o;n.push(Wa(a,e[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function qp(t,e,r){if(!Array.isArray(e))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?e:e.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return`${t}=${o}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of e)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(Wa(t,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Wp(t){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){n.push(qp(i,s,{style:"form",explode:!0,...t?.array,allowReserved:t?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(jp(i,s,{style:"deepObject",explode:!0,...t?.object,allowReserved:t?.allowReserved||!1}));continue}n.push(Wa(i,s,t))}}return n.join("&")}}function F0(t,e){let r=t;for(const n of t.match(M0)??[]){let i=n.substring(1,n.length-1),s=!1,o="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!e||e[i]===void 0||e[i]===null)continue;const a=e[i];if(Array.isArray(a)){r=r.replace(n,qp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,jp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${Wa(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function R0(t){return t instanceof FormData?t:JSON.stringify(t)}function L0(t,e){let r=`${e.baseUrl}${t}`;e.params?.path&&(r=F0(r,e.params.path));let n=e.querySerializer(e.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function z0(...t){const e=new Headers;for(const r of t){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)e.delete(i);else if(Array.isArray(s))for(const o of s)e.append(i,o);else s!==void 0&&e.set(i,s)}return e}function Hp(t){return t.endsWith("/")?t.substring(0,t.length-1):t}function Z0(t,e){return N0({baseUrl:t,headers:{"X-Shop-Url":e}})}const V0="/api/v4/calendar",U0="/api/v4/tickets/calendar",B0="/api/v4/auth/validate_token",j0="/api/v4/tickets/list_and_quotas",q0="/api/v4/tickets",W0="/api/v4/auth/sign_in",H0="/api/v4/auth",Kp={SHOP_GUEST:10,SHOP:20};class K0{constructor(e,r,n,i="angular"){this.type=i,e&&r&&n&&this.load(e,r,n,i)}#e=le(Be({customerSalutations:[],countries:[],locales:[]}));#t={};async load(e,r,n,i="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),h(this.#e).urls=vb(this.type),h(this.#e).currentUser=S0(this.type),h(this.#e).apiUrl=e,h(this.#e).shopDomain=r,h(this.#e).locale=n||"de",this.#t={},h(this.#e).client=Z0(e,r),h(this.#e).capacityManager=Rp(),h(this.#e).cart=v0(),h(this.#e).auth=new Gh,h(this.#e).client.use(new Ab(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return h(this.#e).capacityManager||(h(this.#e).capacityManager=Rp()),h(this.#e).capacityManager}get cart(){return h(this.#e).cart}get auth(){return h(this.#e).auth||(h(this.#e).auth=new Gh),h(this.#e).auth}get currentUser(){return h(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return h(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return this.shop?.translations}get currency(){return this.shop?.config.currency}t(e,r){return this.translate(e,r)}translate(e,r){if(!this.translations?.[e])return e;let n=this.translations[e];if(r&&n)for(const[i,s]of Object.entries(r))n=n.replace(`{{${i}}}`,s);return n||""}get apiUrl(){return h(this.#e).apiUrl}get shopDomain(){return h(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return h(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return h(this.#e)}validateToken(){return this.fetchAndCache(B0,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(U0,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(V0,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(j0,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:e})}tickets(e){return this.fetchAndCache(q0,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:e})}signIn(e){return this.apiPost(W0,{body:e,requiredFields:["email","password"]})}signUp(e,r=!1){const n={addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:r?Kp.SHOP_GUEST:Kp.SHOP};e=cr(n,e);let i=["name","surname","email","email_confirmation","terms"];return r||i.push("password","password_confirmation"),this.apiPost(H0,{body:e,requiredFields:i})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:e,cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const r=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===r)return this.#r.result;const n=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:r,result:n},n}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,r){return this.apiPost("/api/v4/annual/personalization/finalize",{body:r,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,r,n){const i=new FormData;return i.append("file",n),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:i,params:{path:{id:r},query:{token:e}}})}fetchAndCache(e,r,n,i){if(i??={},i.query??={},i.cache??=1e3,i.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),h(this.#e)[r];const s=cr({per_page:1e3},i.query),o=e+JSON.stringify(s),a=!this.#t[o],l=this.#t[o]?.fetchedAt<Date.now()-i.cache*1e3;return(a||l)&&this.apiGet(e,s,i.path).then(c=>{c&&(h(this.#e)[r]=n===""?c:c[n])}),h(this.#e)[r]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums")}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions")}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,r){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:r},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getEventDetailsOnDate(e,r){return this.fetchAndCache(`/api/v4/events/${e}/dates/${r}`,`/api/v4/events/${e}/dates/${r}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events")}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours")}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises")}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries")}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return h(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,r){return this.apiCall(e,{method:"POST",...r})}async apiPut(e,r){return this.apiCall(e,{method:"PUT",...r})}async apiDELETE(e,r){return this.apiCall(e,{method:"DELETE",...r})}async apiUpload(e,r){this.#s();const{body:n,params:i={}}=r;return await this.client.POST(e,{body:n,params:cr(this.#n,{params:i}).params,bodySerializer:o=>o})}async apiCall(e,r){this.#s();const{body:n,params:i={},requiredFields:s}=r,o=T0(n,s);if(Object.keys(o).length>0)return{error:{errors:o}};const a=this.client[r.method];return await a(e,{body:n,params:cr(this.#n,{params:i}).params})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(r=>r.status==="fetching").length;)await bb(10)}async apiGet(e,r={},n){this.#s();const i=e+JSON.stringify(r);this.#t[i]={status:"fetching",fetchedAt:Date.now()};let s=this.#n;r&&(s=cr(s,{params:{query:r}})),e&&(s=cr(s,{params:{path:n}}));const o=await this.client.GET(e,s);return this.#t[i]={status:"completed",fetchedAt:Date.now()},o.data||o}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}}const S=new K0;function fs(t){return function(e,r){if(e)e.addEventListener(t,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}class mu{constructor(e,r,n=1e3){this.host=e,this.KEY=r,this.pollDuration=n}#e=le(Be({value:void 0}));error=!1;static static(e){const r=new mu(null,null);return r.value=e,r}load(){Rc(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return h(this.#e).value}set value(e){h(this.#e).value=e}}function hs(t){return function(e,r={pollDuration:1e3}){if(e){const n=new mu(e,t,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}let G0={urls:{},navigateTo:t=>{window.location.assign(t)},forms:{},fields:{}};class Y0{defaultConfig=cr(G0,window.customOptions);override=this.defaultConfig;#e=le(Be({}));get options(){return h(this.#e)}set options(e){M(this.#e,e,!0)}constructor(){this.update()}update(){const e=cr(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((r,n)=>(r[n]={...this.defaultConfig.forms[n],...this.override.forms[n]},r),{}),this.options=e}get config(){return this.options}define(e){return this.override=cr(this.override,e),this.update(),this}default(e){return this.defaultConfig=cr(this.defaultConfig,e),this.update(),this}}const ot=new Y0;class Gp{#e=le();get token(){return h(this.#e)}set token(e){M(this.#e,e,!0)}#t=le();get ticketSaleId(){return h(this.#t)}set ticketSaleId(e){M(this.#t,e,!0)}get order(){return this.token?oc(S.annualOrder(this.token)):void 0}get ticketSale(){if(this.ticketSaleId)return oc(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return ot.config.urls.annualTicketPersonalizationForm?ot.config.urls.annualTicketPersonalizationForm(this.token,e.id):S.urls.annualTicketPersonalizationForm(this.token,e.id)}}const Yp="go-annual-ticket-personalization",Jp=fs(Yp),J0=hs(Yp);var Q0=j("<li><a> </a></li>"),X0=j('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function ek(t,e){ne(e,!0);let r=_(e,"token",7);const n=new Gp;Jp(e.$$host,n),_e(()=>{n.token=r()});let i=C(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=W(),a=z(o);{var l=c=>{var u=W(),d=z(u);He(d,17,()=>h(i).ticket_sales,f=>f.id,(f,p)=>{var v=X0(),g=$(v),m=$(g,!0);I(g);var b=te(g,2),k=$(b,!0);I(b);var O=te(b,2);{var E=P=>{var A=Q0(),D=$(A),F=$(D,!0);I(D),I(A),ce((N,B)=>{Ae(D,"href",N),se(F,B)},[()=>n.goToPersonalization(h(p)),()=>S.t("ticket.annual.personalization.list.personalize.add")]),w(P,A)};fe(O,P=>{h(p).status=="not_ready_to_send"&&P(E)})}I(v),ce(P=>{Ae(v,"data-ticket-sale-id",h(p).id),se(m,h(p).title),se(k,P)},[()=>S.t("ticket.annual.personalization.detail.title",{count:h(p).personalizations.length})]),w(f,v)}),w(c,u)};fe(a,c=>{h(i)&&c(l)})}return w(t,o),ie(s)}customElements.define("go-annual-ticket-personalization",oe(ek,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));function Q(t,e,r){function n(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);const c=o.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const f=u[d];f in a||(a[f]=c[f].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class ps extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Qp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const tk={};function Mi(t){return tk}function gu(t,e){return typeof e=="bigint"?e.toString():e}function vu(t){return t==null}function yu(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}const Xp=Symbol("evaluating");function Ye(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Xp)return n===void 0&&(n=Xp,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function rk(...t){const e={};for(const r of t){const n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function nk(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const em="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function tm(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function _u(t){if(tm(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const r=e.prototype;return!(tm(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function rm(t){return _u(t)?{...t}:Array.isArray(t)?[...t]:t}function bu(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ik(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Oe(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function ms(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function sk(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Ha(t){return typeof t=="string"?t:t?.message}function $i(t,e,r){const n={...t,path:t.path??[]};if(!t.message){const i=Ha(t.inst?._zod.def?.error?.(t))??Ha(e?.error?.(t))??Ha(r.customError?.(t))??Ha(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function wu(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Eo(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}const nm=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,gu,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},im=Q("$ZodError",nm),sm=Q("$ZodError",nm,{Parent:Error});function ok(t,e=r=>r.message){const r={},n=[];for(const i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function ak(t,e=r=>r.message){const r={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(e(s));else{let o=r,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(s))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return n(t),r}const ku=t=>(e,r,n,i)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new ps;if(o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>$i(l,s,Mi())));throw em(a,i?.callee),a}return o.value},Su=t=>async(e,r,n,i)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>$i(l,s,Mi())));throw em(a,i?.callee),a}return o.value},Ka=t=>(e,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ps;return s.issues.length?{success:!1,error:new(t??im)(s.issues.map(o=>$i(o,i,Mi())))}:{success:!0,data:s.value}},lk=Ka(sm),Ga=t=>async(e,r,n)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>$i(o,i,Mi())))}:{success:!0,data:s.value}},ck=Ga(sm),uk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ku(t)(e,r,i)},dk=t=>(e,r,n)=>ku(t)(e,r,n),fk=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Su(t)(e,r,i)},hk=t=>async(e,r,n)=>Su(t)(e,r,n),pk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ka(t)(e,r,i)},mk=t=>(e,r,n)=>Ka(t)(e,r,n),gk=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ga(t)(e,r,i)},vk=t=>async(e,r,n)=>Ga(t)(e,r,n),yk=/^[cC][^\s-]{8,}$/,_k=/^[0-9a-z]+$/,bk=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wk=/^[0-9a-vA-V]{20}$/,kk=/^[A-Za-z0-9]{27}$/,Sk=/^[a-zA-Z0-9_-]{21}$/,xk=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ek=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,om=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Tk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ak="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ck(){return new RegExp(Ak,"u")}const Ok=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Dk=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ik=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Pk=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Mk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,am=/^[A-Za-z0-9_-]*$/,$k=/^\+[1-9]\d{6,14}$/,lm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Nk=new RegExp(`^${lm}$`);function cm(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Fk(t){return new RegExp(`^${cm(t)}$`)}function Rk(t){const e=cm({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${lm}T(?:${n})$`)}const Lk=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},zk=/^[^A-Z]*$/,Zk=/^[^a-z]*$/,nn=Q("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Vk=Q("$ZodCheckMaxLength",(t,e)=>{var r;nn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!vu(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const i=n.value;if(i.length<=e.maximum)return;const o=wu(i);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Uk=Q("$ZodCheckMinLength",(t,e)=>{var r;nn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!vu(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const i=n.value;if(i.length>=e.minimum)return;const o=wu(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Bk=Q("$ZodCheckLengthEquals",(t,e)=>{var r;nn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!vu(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{const i=n.value,s=i.length;if(s===e.length)return;const o=wu(i),a=s>e.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Ya=Q("$ZodCheckStringFormat",(t,e)=>{var r,n;nn.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),jk=Q("$ZodCheckRegex",(t,e)=>{Ya.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),qk=Q("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=zk),Ya.init(t,e)}),Wk=Q("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Zk),Ya.init(t,e)}),Hk=Q("$ZodCheckIncludes",(t,e)=>{nn.init(t,e);const r=bu(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Kk=Q("$ZodCheckStartsWith",(t,e)=>{nn.init(t,e);const r=new RegExp(`^${bu(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),Gk=Q("$ZodCheckEndsWith",(t,e)=>{nn.init(t,e);const r=new RegExp(`.*${bu(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}}),Yk=Q("$ZodCheckOverwrite",(t,e)=>{nn.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),Jk={major:4,minor:3,patch:6},Ft=Q("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Jk;const n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(const i of n)for(const s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(o,a,l)=>{let c=ms(o),u;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(c)continue;const f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&l?.async===!1)throw new ps;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(c||(c=ms(o,f)))});else{if(o.issues.length===f)continue;c||(c=ms(o,f))}}return u?u.then(()=>o):o},s=(o,a,l)=>{if(ms(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new ps;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const c=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>s(u,o,a)):s(c,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new ps;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Ye(t,"~standard",()=>({validate:i=>{try{const s=lk(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return ck(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),xu=Q("$ZodString",(t,e)=>{Ft.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Lk(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),nt=Q("$ZodStringFormat",(t,e)=>{Ya.init(t,e),xu.init(t,e)}),Qk=Q("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Ek),nt.init(t,e)}),Xk=Q("$ZodUUID",(t,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=om(n))}else e.pattern??(e.pattern=om());nt.init(t,e)}),eS=Q("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Tk),nt.init(t,e)}),tS=Q("$ZodURL",(t,e)=>{nt.init(t,e),t._zod.check=r=>{try{const n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),rS=Q("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Ck()),nt.init(t,e)}),nS=Q("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Sk),nt.init(t,e)}),iS=Q("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=yk),nt.init(t,e)}),sS=Q("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=_k),nt.init(t,e)}),oS=Q("$ZodULID",(t,e)=>{e.pattern??(e.pattern=bk),nt.init(t,e)}),aS=Q("$ZodXID",(t,e)=>{e.pattern??(e.pattern=wk),nt.init(t,e)}),lS=Q("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=kk),nt.init(t,e)}),cS=Q("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Rk(e)),nt.init(t,e)}),uS=Q("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Nk),nt.init(t,e)}),dS=Q("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Fk(e)),nt.init(t,e)}),fS=Q("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=xk),nt.init(t,e)}),hS=Q("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Ok),nt.init(t,e),t._zod.bag.format="ipv4"}),pS=Q("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Dk),nt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),mS=Q("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Ik),nt.init(t,e)}),gS=Q("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Pk),nt.init(t,e),t._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function um(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const vS=Q("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Mk),nt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{um(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function yS(t){if(!am.test(t))return!1;const e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return um(r)}const _S=Q("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=am),nt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{yS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),bS=Q("$ZodE164",(t,e)=>{e.pattern??(e.pattern=$k),nt.init(t,e)});function wS(t,e=null){try{const r=t.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const kS=Q("$ZodJWT",(t,e)=>{nt.init(t,e),t._zod.check=r=>{wS(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});function dm(t,e,r){t.issues.length&&e.issues.push(...sk(r,t.issues)),e.value[r]=t.value}const SS=Q("$ZodArray",(t,e)=>{Ft.init(t,e),t._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],l=e.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(c=>dm(c,r,o))):dm(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function fm(t,e,r,n){for(const s of t)if(s.issues.length===0)return e.value=s.value,e;const i=t.filter(s=>!ms(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(o=>$i(o,n,Mi())))}),e)}const xS=Q("$ZodUnion",(t,e)=>{Ft.init(t,e),Ye(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ye(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ye(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Ye(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>yu(s.source)).join("|")})$`)}});const r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1;const a=[];for(const l of e.options){const c=l._zod.run({value:i.value,issues:[]},s);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>fm(l,i,t,s)):fm(a,i,t,s)}}),ES=Q("$ZodIntersection",(t,e)=>{Ft.init(t,e),t._zod.parse=(r,n)=>{const i=r.value,s=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([l,c])=>hm(r,l,c)):hm(r,s,o)}});function Eu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(_u(t)&&_u(e)){const r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),i={...t,...e};for(const s of n){const o=Eu(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<t.length;n++){const i=t[n],s=e[n],o=Eu(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function hm(t,e,r){const n=new Map;let i;for(const a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else t.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else t.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&t.issues.push({...i,keys:s}),ms(t))return t;const o=Eu(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const TS=Q("$ZodTransform",(t,e)=>{Ft.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Qp(t.constructor.name);const i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new ps;return r.value=i,r}});function pm(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const mm=Q("$ZodOptional",(t,e)=>{Ft.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${yu(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>pm(s,r.value)):pm(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),AS=Q("$ZodExactOptional",(t,e)=>{mm.init(t,e),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),CS=Q("$ZodNullable",(t,e)=>{Ft.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${yu(r.source)}|null)$`):void 0}),Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),OS=Q("$ZodDefault",(t,e)=>{Ft.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>gm(s,e)):gm(i,e)}});function gm(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const DS=Q("$ZodPrefault",(t,e)=>{Ft.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),IS=Q("$ZodNonOptional",(t,e)=>{Ft.init(t,e),Ye(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>vm(s,t)):vm(i,t)}});function vm(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const PS=Q("$ZodCatch",(t,e)=>{Ft.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(o=>$i(o,n,Mi()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(s=>$i(s,n,Mi()))},input:r.value}),r.issues=[]),r)}}),MS=Q("$ZodPipe",(t,e)=>{Ft.init(t,e),Ye(t._zod,"values",()=>e.in._zod.values),Ye(t._zod,"optin",()=>e.in._zod.optin),Ye(t._zod,"optout",()=>e.out._zod.optout),Ye(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=e.out._zod.run(r,n);return s instanceof Promise?s.then(o=>Ja(o,e.in,n)):Ja(s,e.in,n)}const i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Ja(s,e.out,n)):Ja(i,e.out,n)}});function Ja(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}const $S=Q("$ZodReadonly",(t,e)=>{Ft.init(t,e),Ye(t._zod,"propValues",()=>e.innerType._zod.propValues),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"optin",()=>e.innerType?._zod?.optin),Ye(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(ym):ym(i)}});function ym(t){return t.value=Object.freeze(t.value),t}const NS=Q("$ZodCustom",(t,e)=>{nn.init(t,e),Ft.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{const n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(s=>_m(s,r,n,t));_m(i,r,n,t)}});function _m(t,e,r,n){if(!t){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(Eo(i))}}var bm;class FS{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){const n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function RS(){return new FS}(bm=globalThis).__zod_globalRegistry??(bm.__zod_globalRegistry=RS());const To=globalThis.__zod_globalRegistry;function LS(t,e){return new t({type:"string",...Oe(e)})}function zS(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Oe(e)})}function wm(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(e)})}function ZS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(e)})}function VS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(e)})}function US(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(e)})}function BS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(e)})}function jS(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Oe(e)})}function qS(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(e)})}function WS(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(e)})}function HS(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(e)})}function KS(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(e)})}function GS(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(e)})}function YS(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(e)})}function JS(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(e)})}function QS(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(e)})}function XS(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(e)})}function ex(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(e)})}function tx(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(e)})}function rx(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(e)})}function nx(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(e)})}function ix(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(e)})}function sx(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(e)})}function ox(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(e)})}function ax(t,e){return new t({type:"string",format:"date",check:"string_format",...Oe(e)})}function lx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Oe(e)})}function cx(t,e){return new t({type:"string",format:"duration",check:"string_format",...Oe(e)})}function km(t,e){return new Vk({check:"max_length",...Oe(e),maximum:t})}function Qa(t,e){return new Uk({check:"min_length",...Oe(e),minimum:t})}function Sm(t,e){return new Bk({check:"length_equals",...Oe(e),length:t})}function ux(t,e){return new jk({check:"string_format",format:"regex",...Oe(e),pattern:t})}function dx(t){return new qk({check:"string_format",format:"lowercase",...Oe(t)})}function fx(t){return new Wk({check:"string_format",format:"uppercase",...Oe(t)})}function hx(t,e){return new Hk({check:"string_format",format:"includes",...Oe(e),includes:t})}function px(t,e){return new Kk({check:"string_format",format:"starts_with",...Oe(e),prefix:t})}function mx(t,e){return new Gk({check:"string_format",format:"ends_with",...Oe(e),suffix:t})}function gs(t){return new Yk({check:"overwrite",tx:t})}function gx(t){return gs(e=>e.normalize(t))}function vx(){return gs(t=>t.trim())}function yx(){return gs(t=>t.toLowerCase())}function _x(){return gs(t=>t.toUpperCase())}function bx(){return gs(t=>nk(t))}function wx(t,e,r){return new t({type:"array",element:e,...Oe(r)})}function kx(t,e,r){return new t({type:"custom",check:"custom",fn:e,...Oe(r)})}function Sx(t){const e=xx(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Eo(n,r.value,e._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(Eo(i))}},t(r.value,r)));return e}function xx(t,e){const r=new nn({check:"custom",...Oe(e)});return r._zod.check=t,r}function xm(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??To,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Rt(t,e,r={path:[],schemaPath:[]}){var n;const i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);const a=t._zod.toJSONSchema?.();if(a)o.schema=a;else{const u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,u);else{const f=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,u)}const d=t._zod.parent;d&&(o.ref||(o.ref=d),Rt(d,e,u),e.seen.get(d).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&Lt(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function Em(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of t.seen.entries()){const a=t.metadataRegistry.get(o[0])?.id;if(a){const l=n.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}const i=o=>{const a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const d=t.external.registry.get(o[0])?.id,f=t.external.uri??(v=>v);if(d)return{ref:f(d)};const p=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const c=`#/${a}/`,u=o[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},s=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:c}=i(o);a.def={...a.schema},c&&(a.defId=c);const u=a.schema;for(const d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(const o of t.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
4
4
 
5
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of t.seen.entries()){const a=o[1];if(e===o[0]){s(o);continue}if(t.external){const u=t.external.registry.get(o[0])?.id;if(e!==o[0]&&u){s(o);continue}}if(t.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&t.reused==="ref"){s(o);continue}}}function Cp(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const a=t.seen.get(o);if(a.ref===null)return;const l=a.def??a.schema,u={...l},c=a.ref;if(a.ref=null,c){n(c);const f=t.seen.get(c),p=f.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Object.assign(l,p),Object.assign(l,u),o._zod.parent===c)for(const g in l)g==="$ref"||g==="allOf"||g in u||delete l[g];if(p.$ref&&f.def)for(const g in l)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(l[g])===JSON.stringify(f.def[g])&&delete l[g]}const d=o._zod.parent;if(d&&d!==c){n(d);const f=t.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(const p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}t.override({zodSchema:o,jsonSchema:l,path:a.path??[]})};for(const o of[...t.seen.entries()].reverse())n(o[0]);const i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,r.def??r.schema);const s=t.external?.defs??{};for(const o of t.seen.entries()){const a=o[1];a.def&&a.defId&&(s[a.defId]=a.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:pa(e,"input",t.processors),output:pa(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function St(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return St(n.element,r);if(n.type==="set")return St(n.valueType,r);if(n.type==="lazy")return St(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return St(n.innerType,r);if(n.type==="intersection")return St(n.left,r)||St(n.right,r);if(n.type==="record"||n.type==="map")return St(n.keyType,r)||St(n.valueType,r);if(n.type==="pipe")return St(n.in,r)||St(n.out,r);if(n.type==="object"){for(const i in n.shape)if(St(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(St(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(St(i,r))return!0;return!!(n.rest&&St(n.rest,r))}return!1}const rS=(t,e={})=>r=>{const n=xp({...r,processors:e});return kt(t,n),Ep(n,t),Cp(n,t)},pa=(t,e,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=xp({...i??{},target:s,io:e,processors:r});return kt(t,o),Ep(o,t),Cp(o,t)},nS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},iS=(t,e,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:u}=t._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=nS[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?i.pattern=c[0].source:c.length>1&&(i.allOf=[...c.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},sS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},oS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},aS=(t,e,r,n)=>{const i=r,s=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=kt(s.element,e,{...n,path:[...n.path,"items"]})},lS=(t,e,r,n)=>{const i=t._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>kt(a,e,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},uS=(t,e,r,n)=>{const i=t._zod.def,s=kt(i.left,e,{...n,path:[...n.path,"allOf",0]}),o=kt(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];r.allOf=l},cS=(t,e,r,n)=>{const i=t._zod.def,s=kt(i.innerType,e,n),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},dS=(t,e,r,n)=>{const i=t._zod.def;kt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},fS=(t,e,r,n)=>{const i=t._zod.def;kt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},hS=(t,e,r,n)=>{const i=t._zod.def;kt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},pS=(t,e,r,n)=>{const i=t._zod.def;kt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},mS=(t,e,r,n)=>{const i=t._zod.def,s=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;kt(s,e,n);const o=e.seen.get(t);o.ref=s},gS=(t,e,r,n)=>{const i=t._zod.def;kt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.readOnly=!0},Op=(t,e,r,n)=>{const i=t._zod.def;kt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},vS=K("ZodISODateTime",(t,e)=>{Z0.init(t,e),Xe.init(t,e)});function yS(t){return Rk(vS,t)}const bS=K("ZodISODate",(t,e)=>{V0.init(t,e),Xe.init(t,e)});function _S(t){return zk(bS,t)}const wS=K("ZodISOTime",(t,e)=>{j0.init(t,e),Xe.init(t,e)});function kS(t){return Lk(wS,t)}const SS=K("ZodISODuration",(t,e)=>{B0.init(t,e),Xe.init(t,e)});function xS(t){return Zk(SS,t)}const er=K("ZodError",(t,e)=>{ip.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>zw(t,r)},flatten:{value:r=>Rw(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,Cu,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,Cu,2)}},isEmpty:{get(){return t.issues.length===0}}})},{Parent:Error}),ES=Pu(er),CS=$u(er),OS=ua(er),TS=ca(er),AS=Vw(er),DS=jw(er),IS=Bw(er),PS=Uw(er),$S=qw(er),MS=Ww(er),FS=Kw(er),NS=Hw(er),xt=K("ZodType",(t,e)=>(wt.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:pa(t,"input"),output:pa(t,"output")}}),t.toJSONSchema=rS(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone($w(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>Fw(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>ES(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>OS(t,r,n),t.parseAsync=async(r,n)=>CS(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>TS(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>AS(t,r,n),t.decode=(r,n)=>DS(t,r,n),t.encodeAsync=async(r,n)=>IS(t,r,n),t.decodeAsync=async(r,n)=>PS(t,r,n),t.safeEncode=(r,n)=>$S(t,r,n),t.safeDecode=(r,n)=>MS(t,r,n),t.safeEncodeAsync=async(r,n)=>FS(t,r,n),t.safeDecodeAsync=async(r,n)=>NS(t,r,n),t.refine=(r,n)=>t.check(xx(r,n)),t.superRefine=r=>t.check(Ex(r)),t.overwrite=r=>t.check(Bi(r)),t.optional=()=>Dp(t),t.exactOptional=()=>dx(t),t.nullable=()=>Ip(t),t.nullish=()=>Dp(Ip(t)),t.nonoptional=r=>yx(t,r),t.array=()=>rx(t),t.or=r=>ix([t,r]),t.and=r=>ox(t,r),t.transform=r=>Pp(t,lx(r)),t.default=r=>px(t,r),t.prefault=r=>gx(t,r),t.catch=r=>_x(t,r),t.pipe=r=>Pp(t,r),t.readonly=()=>Sx(t),t.describe=r=>{const n=t.clone();return Ys.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return Ys.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Ys.get(t);const n=t.clone();return Ys.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),Tp=K("_ZodString",(t,e)=>{Mu.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(n,i,s)=>iS(t,n,i);const r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(Vk(...n)),t.includes=(...n)=>t.check(Uk(...n)),t.startsWith=(...n)=>t.check(qk(...n)),t.endsWith=(...n)=>t.check(Wk(...n)),t.min=(...n)=>t.check(ha(...n)),t.max=(...n)=>t.check(kp(...n)),t.length=(...n)=>t.check(Sp(...n)),t.nonempty=(...n)=>t.check(ha(1,...n)),t.lowercase=n=>t.check(jk(n)),t.uppercase=n=>t.check(Bk(n)),t.trim=()=>t.check(Hk()),t.normalize=(...n)=>t.check(Kk(...n)),t.toLowerCase=()=>t.check(Yk()),t.toUpperCase=()=>t.check(Gk()),t.slugify=()=>t.check(Jk())}),RS=K("ZodString",(t,e)=>{Mu.init(t,e),Tp.init(t,e),t.email=r=>t.check(gk(zS,r)),t.url=r=>t.check(wk(LS,r)),t.jwt=r=>t.check(Nk(ex,r)),t.emoji=r=>t.check(kk(ZS,r)),t.guid=r=>t.check(wp(Ap,r)),t.uuid=r=>t.check(vk(ga,r)),t.uuidv4=r=>t.check(yk(ga,r)),t.uuidv6=r=>t.check(bk(ga,r)),t.uuidv7=r=>t.check(_k(ga,r)),t.nanoid=r=>t.check(Sk(VS,r)),t.guid=r=>t.check(wp(Ap,r)),t.cuid=r=>t.check(xk(jS,r)),t.cuid2=r=>t.check(Ek(BS,r)),t.ulid=r=>t.check(Ck(US,r)),t.base64=r=>t.check($k(JS,r)),t.base64url=r=>t.check(Mk(QS,r)),t.xid=r=>t.check(Ok(qS,r)),t.ksuid=r=>t.check(Tk(WS,r)),t.ipv4=r=>t.check(Ak(KS,r)),t.ipv6=r=>t.check(Dk(HS,r)),t.cidrv4=r=>t.check(Ik(YS,r)),t.cidrv6=r=>t.check(Pk(GS,r)),t.e164=r=>t.check(Fk(XS,r)),t.datetime=r=>t.check(yS(r)),t.date=r=>t.check(_S(r)),t.time=r=>t.check(kS(r)),t.duration=r=>t.check(xS(r))});function ma(t){return mk(RS,t)}const Xe=K("ZodStringFormat",(t,e)=>{Ge.init(t,e),Tp.init(t,e)}),zS=K("ZodEmail",(t,e)=>{I0.init(t,e),Xe.init(t,e)}),Ap=K("ZodGUID",(t,e)=>{A0.init(t,e),Xe.init(t,e)}),ga=K("ZodUUID",(t,e)=>{D0.init(t,e),Xe.init(t,e)}),LS=K("ZodURL",(t,e)=>{P0.init(t,e),Xe.init(t,e)}),ZS=K("ZodEmoji",(t,e)=>{$0.init(t,e),Xe.init(t,e)}),VS=K("ZodNanoID",(t,e)=>{M0.init(t,e),Xe.init(t,e)}),jS=K("ZodCUID",(t,e)=>{F0.init(t,e),Xe.init(t,e)}),BS=K("ZodCUID2",(t,e)=>{N0.init(t,e),Xe.init(t,e)}),US=K("ZodULID",(t,e)=>{R0.init(t,e),Xe.init(t,e)}),qS=K("ZodXID",(t,e)=>{z0.init(t,e),Xe.init(t,e)}),WS=K("ZodKSUID",(t,e)=>{L0.init(t,e),Xe.init(t,e)}),KS=K("ZodIPv4",(t,e)=>{U0.init(t,e),Xe.init(t,e)}),HS=K("ZodIPv6",(t,e)=>{q0.init(t,e),Xe.init(t,e)}),YS=K("ZodCIDRv4",(t,e)=>{W0.init(t,e),Xe.init(t,e)}),GS=K("ZodCIDRv6",(t,e)=>{K0.init(t,e),Xe.init(t,e)}),JS=K("ZodBase64",(t,e)=>{H0.init(t,e),Xe.init(t,e)}),QS=K("ZodBase64URL",(t,e)=>{G0.init(t,e),Xe.init(t,e)}),XS=K("ZodE164",(t,e)=>{J0.init(t,e),Xe.init(t,e)}),ex=K("ZodJWT",(t,e)=>{X0.init(t,e),Xe.init(t,e)}),tx=K("ZodArray",(t,e)=>{ek.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>aS(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(ha(r,n)),t.nonempty=r=>t.check(ha(1,r)),t.max=(r,n)=>t.check(kp(r,n)),t.length=(r,n)=>t.check(Sp(r,n)),t.unwrap=()=>t.element});function rx(t,e){return Qk(tx,t,e)}const nx=K("ZodUnion",(t,e)=>{tk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>lS(t,r,n,i),t.options=e.options});function ix(t,e){return new nx({type:"union",options:t,...Ee(e)})}const sx=K("ZodIntersection",(t,e)=>{rk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>uS(t,r,n,i)});function ox(t,e){return new sx({type:"intersection",left:t,right:e})}const ax=K("ZodTransform",(t,e)=>{nk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>oS(t,r),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Qh(t.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Hs(s,r.value,e));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),r.issues.push(Hs(o))}};const i=e.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r)):(r.value=i,r)}});function lx(t){return new ax({type:"transform",transform:t})}const ux=K("ZodOptional",(t,e)=>{mp.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Op(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Dp(t){return new ux({type:"optional",innerType:t})}const cx=K("ZodExactOptional",(t,e)=>{ik.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Op(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function dx(t){return new cx({type:"optional",innerType:t})}const fx=K("ZodNullable",(t,e)=>{sk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>cS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Ip(t){return new fx({type:"nullable",innerType:t})}const hx=K("ZodDefault",(t,e)=>{ok.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>fS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function px(t,e){return new hx({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():rp(e)}})}const mx=K("ZodPrefault",(t,e)=>{ak.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>hS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function gx(t,e){return new mx({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():rp(e)}})}const vx=K("ZodNonOptional",(t,e)=>{lk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>dS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function yx(t,e){return new vx({type:"nonoptional",innerType:t,...Ee(e)})}const bx=K("ZodCatch",(t,e)=>{uk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>pS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function _x(t,e){return new bx({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const wx=K("ZodPipe",(t,e)=>{ck.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>mS(t,r,n,i),t.in=e.in,t.out=e.out});function Pp(t,e){return new wx({type:"pipe",in:t,out:e})}const kx=K("ZodReadonly",(t,e)=>{dk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>gS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Sx(t){return new kx({type:"readonly",innerType:t})}const $p=K("ZodCustom",(t,e)=>{fk.init(t,e),xt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>sS(t,r)});function xx(t,e={}){return Xk($p,t,e)}function Ex(t){return eS(t)}function Cx(t,e={}){const r=new $p({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...Ee(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Ox={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>S.customerSalutations.map(t=>({label:t.salutation,value:t.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:ma().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:ma().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:ma().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>S.countries.map(t=>({label:t.name,value:t.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>S.locales.map(t=>({label:S.t(`languages.${t.locale}`),value:t.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:ma().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:Cx(File)},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(S.payment_modes?Object.values(S.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function Tx(t,e){return{...t,errors:t.errors||[],value:t.value??Ax(t.type),options:t.options,autocomplete:t.autocomplete??"",placeholder:t.placeholder??"",description:t.description,apiErrors:t.apiErrors??[],mounted:t.mounted??!1,required:e,validate(){Dx(this)}}}function Ax(t){return t==="checkbox"?!1:t==="file"?null:""}function Dx(t){if(t.errors=[],!t.validator){t.required&&(t.value===!1||t.value===""||t.value===null||t.value===void 0)&&(t.errors=["common.fieldErrors.required"]);return}const e=t.validator.safeParse(t.value);e.success?t.errors=[]:t.errors=e.error.format()._errors}const as=class as{static defineForm(e){Qe.default({forms:{[e.id]:{fields:e.fields,submitLabel:e.submitLabel}}})}static defineFields(e){Qe.default({fields:e})}static setRequiredApiKeys(e,r){hv(as,sl)[e]=r}static getFormOptions(e){return Qe.config.forms[e]}static createField(e,r){const n=as.getFieldInit(e);if(!n)throw new Error(`(formFields) Field "${e}" not found`);return Tx(n,r)}static getFormFields(e){return Ix(e)}static getFieldInit(e){return Qe.config.fields[e]}};sl=new WeakMap,pv(as,sl,{}),as.defineFields(Ox);let Bt=as;function Ix(t){const e=Qe.config.forms[t];if(!e)throw new Error(`(formFields) Form ${t} not found`);const r=e.fields;return r||(console.warn("(formFields) No fields defined for form",t),[])}function Nu(t){return t?t.filter(r=>r.mounted&&(r.errors?.length||r.apiErrors?.length)).length:0}function Px(t,e){X(e,!0);let r=b(e,"token",7),n=b(e,"ticketSaleId",7),i;const s=new Yh;Jh(e.$$host,s),pe(()=>{s.token=r(),s.ticketSaleId=n()}),Bt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const g=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),_=Hf(g,(C,A)=>{const N=m[A-1].details;return C.push(N),C},[]);if(_.forEach(C=>{C.fields.forEach(A=>{C.validateField(A)})}),!Hf(g,(C,A)=>_[A-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const C=_.map(async(M,j)=>{const se=s.ticketSale.personalizations[j].id,ue=M.fields.find(W=>W.key==="photo")?.value;if(!(ue instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const ne=await S.uploadPersonalizationPhoto(r(),se,ue);return ne.error?{ok:!1,error:ne.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),N=(await Promise.all(C)).find(M=>!M.ok);if(N){i.details.apiErrors=[N.error];return}}const D={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:_.map((C,A)=>{const N=nb(C.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[A].id,customer:N}})}},O=await S.finalizePersonalizations(r(),D);if(O.error){i.details.apiErrors=[O.error.error];return}const P=Qe.config.forms.personalization?.beforeSubmit;P&&P(D),Qe.config.urls.annualTicketPersonalizationFormSubmit?.()&&Qe.config.navigateTo(Qe.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,u=null,c=0;function d(g){g.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function f(){return a?!0:(a=e.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),d(l),u=new Comment("go-personalization-form-anchor"),a.after(u),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function p(g){if(!f()||!a||!l||!u)return;const m=a.parentElement;if(!m)return;const _=Math.max(g,1),k=Array.from(m.querySelectorAll("go-personalization-form"));for(;k.length<_;){const O=l.cloneNode(!0);d(O),m.insertBefore(O,u),k.push(O)}for(;k.length>_;){const O=k.pop();O&&O!==a&&O.remove()}const D=s.ticketSale?.personalizations??[];k.forEach((O,P)=>{const C=D[P];C&&(O.dataset.personalizationId=String(C.id))}),c=_}Hr(()=>{f(),e.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),pe(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==c&&p(m)});var v={details:s,get token(){return r()},set token(g){r(g),y()},get ticketSaleId(){return n()},set ticketSaleId(g){n(g),y()}};return ee(v)}customElements.define("go-annual-ticket-personalization-form",re(Px,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));class $x{constructor(e,r){this.formId=e,this.form=r}#e=ie(Ne([]));#t=E(()=>Nu(this.fields)==0);get isValid(){return h(this.#t)}set isValid(e){I(this.#t,e)}#r=ie();get successMessage(){return h(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(i){return eb(i)||Qy(i)?i:i==="true"||i==="false"?i==="true":!Number.isNaN(+i)&&i.trim()!==""?+i:i}const r=this.fields.filter(i=>i!==void 0).filter(i=>i.type!=="file").filter(i=>i.value!=="");return Object.fromEntries(r.map(i=>[i.apiKey,e(i.value)]))}fieldValue(e){return this.fields.find(r=>r.key===e)?.value}get apiErrors(){return h(this.#e)}set apiErrors(e){if(this.fields.forEach(r=>r.apiErrors=[]),Hl(e)){I(this.#e,e,!0);return}if(e.errors&&Hl(e.errors)&&I(this.#e,e.errors,!0),Xy(e.error)){I(this.#e,[e.error],!0);return}for(const[r,n]of Object.entries(e)){if(r==="full_messages"||r==="success"||r==="errors")continue;const i=this.fields.find(s=>s.apiKey===r);if(!i){console.error(`(set apiErrors) Field with API key ${r} not found`);continue}i.apiErrors=n}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const r=this.fields.find(n=>n.apiKey==="password");(!r||r&&e.value!==r.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const r=this.fields.find(n=>n.apiKey==="email");(!r||r&&e.value!==r.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(r=>r.closest("go-form")===e).map(r=>r.getField?.()).filter(r=>r)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const r=this.fields;Object.entries(e).forEach(([n,i])=>{const s=r.find(o=>o.apiKey===n);if(!s){console.warn(`(FormDetails.fill) Field with API key ${n} not found.`);return}if(s.type==="select"&&!s.options?.().find(o=>o.value===i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);if(s.type==="checkbox"&&![!0,!1].includes(i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);s.value=i})}}const Mp="go-form-details",Mx=Li(Mp),Ui=Zi(Mp);function oi(t,e,r){const n=t.firstElementChild||void 0;if(t.children?.length===1&&n?.tagName.toLowerCase()===e)return n;const i=document.createElement(e);r&&Object.entries(r).forEach(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;t.firstChild;)s.appendChild(t.firstChild);return i.appendChild(s),t.replaceChildren(i),i}var Fx=V("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function Nx(t,e){X(e,!0);let r=b(e,"formId",7),n=b(e,"custom",7);const i=new $x(r(),e.$$host);Mx(e.$$host,i);async function s(c){c.preventDefault(),c.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",c)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",c)),e.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}Hr(()=>{const c=oi(e.$$host,"form",{novalidate:!0});c.addEventListener("submit",s),i.form=c});var o={details:i,get formId(){return r()},set formId(c){r(c),y()},get custom(){return n()},set custom(c){n(c),y()}},a=q(),l=R(a);{var u=c=>{var d=Fx(),f=R(d),p=J(f,2),v=J(p,2),g=$(v,!0);T(v),oe(m=>te(g,m),[()=>S.t(Bt.getFormOptions(r())?.submitLabel||"Submit")]),w(c,d)};ae(l,c=>{n()||c(u)})}return w(t,a),ee(o)}customElements.define("go-form",re(Nx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Rx=V("<go-form></go-form>",2);function zx(t,e){X(e,!0);let r=b(e,"custom",7,!1);Bt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(o){const l=o.target.details,u=await S.passwordReset(l.formData);u.data?(e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=u.data.message,l.apiErrors=[]):l.apiErrors=u.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),y()}},s=Rx();return Yn(s,"formId","passwordReset"),oe(()=>Yn(s,"custom",r())),Pl("submit",s,n),w(t,s),ee(i)}customElements.define("go-password-reset",re(zx,{custom:{}},[],[]));function Lx(t,e){X(e,!0),Bt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=b(e,"custom",7,!1);async function n(s){const a=s.target.details,l=await S.signIn(a.formData);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}oi(e.$$host,"go-form",{"form-id":"signIn",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return ee(i)}customElements.define("go-sign-in",re(Lx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Zx(t,e){X(e,!0);let r=b(e,"custom",7,!1);Bt.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(s){const a=s.target.details,l=await S.signUp(a.formData,!1);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}oi(e.$$host,"go-form",{"form-id":"signUp",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return ee(i)}customElements.define("go-sign-up",re(Zx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Vx(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(t&&typeof t=="object"){const r=Object.values(t).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return e}function Fp(t){return"quantity"in t&&t.quantity!==void 0?t.quantity:t.quantities}function jx(t){return Vx(Fp(t),0)}function Bx(t){const e=Fp(t);if(e&&typeof e=="object"){const r=Object.keys(e);if(r.length>0)return Number(r[0])}}function Ux(t,e){const r=Ri(),n=new Set;return t.coupons.forEach(i=>r.addCoupon(i)),e.forEach(i=>{const s=i.attributes,o=Bx(s),a=t.items.find(l=>l.type.toLowerCase()===i.type.toLowerCase()&&l.product.id===s.id&&(!s.time||l.time===s.time)&&(o===void 0||Ws(l.product)&&l.product.scale_price_id===o));if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}s.coupon&&(r.addCoupon(s.coupon),n.add(s.coupon)),r.addItem(qx(a,s))}),{cart:r,appliedCoupons:n}}function qx(t,e){const r=jx(e),n=e.price_cents??t.product.price_cents,i=t.product.price_cents,s=n<i,o={...t.product,price_cents:n};return pt(o,{quantity:r,time:t.time,display:{discounted:s,reference_uuid:t.uuid,originalPrice:i}})}class Wx{#e=ie();get displayCart(){return h(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=ie(Ne(new Set));get appliedCoupons(){return h(this.#t)}set appliedCoupons(e){I(this.#t,e,!0)}#r=ie(!1);get preview(){return h(this.#r)}set preview(e){I(this.#r,e,!0)}get totalPriceCents(){return this.displayCart?.totalPriceCents??0}get subtotalPriceCents(){return S.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=S.cart;if(e)try{const{items:r,coupons:n}=e.orderData(),i=await S.createCart({items:r,coupons:n});if(!i||"error"in i){i&&"error"in i&&console.error("(go-cart) Unable to fetch discounted cart data",i.error),this.displayCart=e;return}const s=Ux(e,i.data.items??[]);this.displayCart=s.cart,this.appliedCoupons=s.appliedCoupons}catch(r){console.error("(go-cart) Unable to fetch discounted cart data",r),this.displayCart=e}}}const Np="go-cart-details",Kx=Li(Np),qi=Zi(Np);var Hx=V('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),Yx=V('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function Rp(t,e){X(e,!0);let r=b(e,"cartItem",7);if(!Ws(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(p){r(p),y()}},s=Yx(),o=R(s),a=$(o),l=$(a,!0);T(a);var u=J(a),c=$(u,!0);T(u),T(o);var d=J(o);{var f=p=>{var v=Hx(),g=R(v),m=$(g,!0);T(g);var _=J(g),k=$(_,!0);T(_),oe((D,O)=>{te(m,D),te(k,O)},[()=>qs(r().time,{month:"numeric",day:"numeric"},S.locale),()=>Us(r().time)]),w(p,v)};ae(d,p=>{r().time&&p(f)})}return oe(()=>{te(l,n.event_title),te(c,n.title)}),w(t,s),ee(i)}re(Rp,{cartItem:{}},[],[],{mode:"open"});var Gx=V('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),Jx=V('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Qx=V('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function zp(t,e){X(e,!0);let r=b(e,"cartItem",7);var n={get cartItem(){return r()},set cartItem(u){r(u),y()}},i=Qx(),s=R(i),o=$(s,!0);T(s);var a=J(s,2);{var l=u=>{var c=Jx(),d=R(c),f=$(d,!0);T(d);var p=J(d,2);{var v=g=>{var m=Gx(),_=$(m,!0);T(m),oe(k=>te(_,k),[()=>Us(r().time)]),w(g,m)};ae(p,g=>{r().product.subtype==="timeslot"&&g(v)})}oe(g=>te(f,g),[()=>qs(r().time,{month:"numeric",day:"numeric"},S.locale)]),w(u,c)};ae(a,u=>{r().time&&u(l)})}return oe(()=>te(o,r().product.title)),w(t,i),ee(n)}re(zp,{cartItem:{}},[],[],{mode:"open"});function Lp(t,e,r={floor:0}){const{floor:n}=r;if(e===0||e===n)return[va(n)];if(e<t)return t>n?[va(t)]:[];const i=Math.max(t,n),s=[va(n)];for(let o=i;o<=e;o++)o!==n&&s.push(va(o));return s}function va(t){return{value:t,label:t.toString()}}var Xx=V('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),e1=V('<span class="go-cart-item-price-discounted"> </span>'),t1=V("<span> </span>"),r1=V("<option> </option>"),n1=V('<select class="go-cart-item-select"></select>'),i1=V('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),s1=V('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article>');function Zp(t,e){X(e,!0);let r=b(e,"displayItem",7),n=b(e,"displayCart",7),i=b(e,"preview",7),s=ie(void 0);const o=E(()=>S.cart?.items.find(v=>v.uuid===(r().display?.reference_uuid??r().uuid))),a=Ri();pe(()=>{S.cart?.items.map(v=>v.quantity),Ve(()=>{I(s,S.capacityManager.capacity(n(),r(),a),!0)})});function l(v){const g=v;if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const m=parseInt(g.value,10);h(o).quantity=Math.max(0,h(o).quantity-r().quantity+m)}function u(){if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const v=Math.max(0,h(o).quantity-r().quantity);v===0?S.cart?.deleteItem(h(o)):h(o).quantity=v}var c={get displayItem(){return r()},set displayItem(v){r(v),y()},get displayCart(){return n()},set displayCart(v){n(v),y()},get preview(){return i()},set preview(v){i(v),y()}},d=q(),f=R(d);{var p=v=>{var g=s1(),m=$(g),_=$(m),k=$(_);{var D=H=>{zp(H,{get cartItem(){return r()}})},O=H=>{var U=q(),Y=R(U);{var le=ce=>{Rp(ce,{get cartItem(){return r()}})};ae(Y,ce=>{r().product.type==="Event"&&ce(le)},!0)}w(H,U)};ae(k,H=>{r().product.type==="Ticket"?H(D):H(O,!1)})}T(_);var P=J(_,2),C=$(P);{var A=H=>{var U=Xx(),Y=R(U),le=$(Y,!0);T(Y);var ce=J(Y,2),me=$(ce,!0);T(ce),oe((Z,ge)=>{te(le,Z),te(me,ge)},[()=>Xt(r().display.originalPrice),()=>Xt(r().final_price_cents)]),w(H,U)},N=H=>{var U=e1(),Y=$(U,!0);T(U),oe(le=>te(Y,le),[()=>Xt(r().final_price_cents)]),w(H,U)};ae(C,H=>{r().display?.discounted?H(A):H(N,!1)})}T(P);var M=J(P,2),j=$(M);{var se=H=>{var U=t1(),Y=$(U,!0);T(U),oe(()=>te(Y,r().quantity)),w(H,U)},z=H=>{var U=n1();U.__change=Y=>l(Y.target),Le(U,21,()=>Lp(h(s).min,h(s).max,{floor:1}),Y=>Y.value,(Y,le)=>{var ce=r1(),me=$(ce,!0);T(ce);var Z={};oe(()=>{zl(ce,r().quantity===h(le).value),te(me,h(le).label),Z!==(Z=h(le).value)&&(ce.value=(ce.__value=h(le).value)??"")}),w(Y,ce)}),T(U),oe(Y=>Se(U,"aria-label",Y),[()=>S.t("cart.content.table.edit")]),w(H,U)};ae(j,H=>{i()?H(se):H(z,!1)})}T(M);var ue=J(M,2);{var ne=H=>{var U=i1(),Y=$(U);Y.__click=u,T(U),oe(le=>Se(Y,"aria-label",le),[()=>S.t("cart.item.remove")]),w(H,U)};ae(ue,H=>{i()||H(ne)})}var W=J(ue,2),G=$(W,!0);T(W),T(m),T(g),oe(H=>te(G,H),[()=>Xt(r().total_price_cents)]),w(v,g)};ae(f,v=>{h(s)&&v(p)})}return w(t,d),ee(c)}Sr(["change","click"]),re(Zp,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var o1=V('<li class="go-cart-header-remove"></li>'),a1=V('<li class="go-cart-item"><!></li>'),l1=V('<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>');function u1(t,e){X(e,!0);const r=qi(e.$$host),n=E(()=>r.value);var i=q(),s=R(i);{var o=a=>{var l=l1(),u=$(l),c=$(u),d=$(c),f=$(d,!0);T(d);var p=J(d,2),v=$(p,!0);T(p);var g=J(p,2),m=$(g,!0);T(g);var _=J(g,2);{var k=C=>{var A=o1();w(C,A)};ae(_,C=>{h(n).preview||C(k)})}var D=J(_,2),O=$(D,!0);T(D),T(c),T(u);var P=J(u,2);Le(P,17,()=>h(n).displayCart.items,C=>C.uuid,(C,A)=>{var N=a1(),M=$(N);Zp(M,{get displayItem(){return h(A)},get displayCart(){return h(n).displayCart},get preview(){return h(n).preview}}),T(N),w(C,N)}),T(l),oe((C,A,N,M)=>{te(f,C),te(v,A),te(m,N),te(O,M)},[()=>S.t("cart.content.table.desc"),()=>S.t("cart.content.table.price"),()=>S.t("cart.content.table.quantity"),()=>S.t("cart.content.table.total")]),w(a,l)};ae(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),ee()}customElements.define("go-cart-items",re(u1,{},[],[]));var c1=V('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),d1=V('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),f1=V('<ol data-testid="cart-coupons"></ol>');function h1(t,e){X(e,!0);const r=qi(e.$$host),n=E(()=>r.value);var i=q(),s=R(i);{var o=a=>{var l=f1();Le(l,20,()=>h(n).displayCart.coupons,u=>u,(u,c)=>{var d=d1();let f;var p=$(d),v=$(p),g=$(v),m=$(g,!0);T(g);var _=J(g,2);{var k=D=>{var O=c1(),P=$(O);P.__click=()=>S.cart?.removeCoupon(c),T(O),oe(C=>Se(P,"aria-label",C),[()=>S.t("cart.coupons.remove")]),w(D,O)};ae(_,D=>{h(n).preview||D(k)})}T(v),T(p),T(d),oe(D=>{f=zt(d,1,"go-cart-coupon",null,f,D),te(m,c)},[()=>({"go-cart-coupon-inactive":!h(n).appliedCoupons.has(c)})]),w(u,d)}),T(l),w(a,l)};ae(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.coupons.length>0&&a(o)})}w(t,i),ee()}Sr(["click"]),customElements.define("go-cart-coupons",re(h1,{},[],[]));var p1=V('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function m1(t,e){X(e,!0);const r=qi(e.$$host),n=E(()=>r.value);var i=q(),s=R(i);{var o=a=>{var l=p1(),u=$(l,!0);T(l),oe(c=>te(u,c),[()=>Xt(h(n).totalPriceCents)]),w(a,l)};ae(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),ee()}customElements.define("go-cart-total-amount",re(m1,{},[],[]));function g1(t,e){X(e,!0);const r=b(e,"preview",7,!1),n=new Wx;Kx(e.$$host,n),pe(()=>{n.preview=r()}),pe(()=>{S.cart&&(S.cart.items.map(o=>o.uuid+":"+o.quantity+":"+o.time),S.cart.coupons.join("|"),Ve(()=>n.calculateDisplayCart()))});async function i(){const o=e.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const l of o){const u=await l.flush?.();u&&!u.success&&(a=!1)}return a}e.$$host.addEventListener("click",async o=>{const a=o.target.closest("go-submit");if(!a)return;const l=a.closest("go-form");if(l&&e.$$host.contains(l))return;const u=await i();e.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:u},bubbles:!0,composed:!0}))});var s={get preview(){return r()},set preview(o=!1){r(o),y()}};return ee(s)}customElements.define("go-cart",re(g1,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var v1=V('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function y1(t,e){X(e,!0);const r=qi(e.$$host),n=E(()=>r.value);var i=q(),s=R(i);{var o=a=>{var l=v1(),u=$(l,!0);T(l),oe(c=>te(u,c),[()=>Xt(h(n).subtotalPriceCents)]),w(a,l)};ae(s,a=>{h(n)&&S.cart?.items.length&&a(o)})}w(t,i),ee()}customElements.define("go-cart-subtotal-amount",re(y1,{},[],[]));var b1=V('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function _1(t,e){X(e,!0);const r=qi(e.$$host),n=E(()=>r.value);var i=q(),s=R(i);{var o=a=>{var l=b1(),u=J($(l),1,!0);T(l),oe(c=>te(u,c),[()=>Xt(h(n).discountedAmountCents)]),w(a,l)};ae(s,a=>{h(n)&&h(n).discountedAmountCents>0&&a(o)})}w(t,i),ee()}customElements.define("go-cart-discounted-amount",re(_1,{},[],[]));function w1(t,e){X(e,!0),oi(e.$$host,"go-if",{when:"data.cart.items.length === 0"}),ee()}customElements.define("go-cart-empty",re(w1,{},[],[]));function k1(t,e){X(e,!0);let r=E(()=>S.cart?.items.length);yt();var n=It();oe(()=>te(n,h(r))),w(t,n),ee()}customElements.define("go-cart-counter",re(k1,{},[],[]));function S1(t,e){X(e,!0);let r=b(e,"custom",7,!1),n=E(()=>S.cart);Bt.defineForm({id:"checkoutGuest",submitLabel:"cart.detail.actions.checkout",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),oi(e.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),e.$$host.addEventListener("submit",async s=>{const o=s.target;if(!h(n))return;const a=await S.signUp(o.details.formData,!0);if(a.error){o.details.apiErrors=a.error.errors;return}const l=o.details.fieldValue("paymentMode");h(n).paymentModeId=l==null?void 0:String(l);const u=await S.checkout(h(n).orderData());if(u.error){o.details.apiErrors=u.error;return}const c=Qe.config.forms.checkoutGuest?.beforeSubmit;c&&await c(o.details.formData);const d=u.data.meta.payment_url;Qe.config.navigateTo?.(d)});var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return ee(i)}customElements.define("go-checkout-form",re(S1,{custom:{}},[],[]));const x1="TokenActions::ApplyOrderDiscount";async function E1(t){if(!S.cart)throw new Error("(go-coupon-redemption): cart not found");const e=await S.asyncFetch(()=>S.getCouponSaleByBarcode(t));return e?.is_valid?e.value_action===x1?(S.cart.addCoupon(t),{success:!0}):e.is_voucher_for?C1(t,e):Ru([S.t("cart.coupon.form.errors.notValid")]):Ru([S.t("cart.coupon.form.errors.notValid")])}async function C1(t,e){const n=(await S.asyncFetch(()=>S.tickets({"by_ticket_ids[]":[e.is_voucher_for]}))).find(s=>s.id===e.is_voucher_for);if(!n)return Ru([S.t("cart.coupon.form.errors.error")]);const i={...n,price_cents:0};return S.cart.addItem(pt(sa(i),{quantity:1})),S.cart.addCoupon(t),{success:!0}}function Ru(t){return{success:!1,errors:t}}var O1=V("<go-form></go-form>",2);function T1(t,e){X(e,!0),Bt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(d=>d.key==="token"),u=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!u)return{success:!0};const c=await E1(u);return c.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),c):(a.details.apiErrors=c.errors,c)}async function n(a){await r(a.target)}async function i(){const a=e.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=O1();return Yn(o,"formId","couponRedemption"),Pl("submit",o,n),w(t,o),ee(s)}customElements.define("go-coupon-redemption",re(T1,{},[],["flush"])),Uv();class A1{#e=ie();get campaign(){return h(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=ie();get amount(){return h(this.#t)}set amount(e){I(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let r=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");Gn(r.filter(i=>i.campaign_id=e.campaign_id),i=>i.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!S.currentUser?.isAuthenticated||S.currentUser.isGuest)?this.skipDonation():(r.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(r)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart())}}const Et=new A1;var D1=V('<img alt="logo"/>'),I1=V('<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>');function Vp(t,e){X(e,!0);let r=b(e,"campaign",7);const n=E(()=>r().translations);var i={get campaign(){return r()},set campaign(g){r(g),y()}},s=I1();let o;s.__click=()=>Et.selectCampaign(r()),s.__keydown=g=>{g.key==="Enter"&&Et.selectCampaign(r())};var a=$(s),l=$(a);{var u=g=>{var m=D1();oe(_=>Se(m,"src",_),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),w(g,m)};ae(l,g=>{r().picture.thumbnail&&g(u)})}T(a);var c=J(a,2),d=$(c),f=$(d,!0);T(d);var p=J(d,2),v=$(p,!0);return T(p),T(c),T(s),oe(()=>{o=zt(s,1,"go-donation-campaign",null,o,{selected:Et.campaign?.id===r()?.id}),te(f,h(n)["donations.headline"]),te(v,h(n)["donations.shop.info"])}),w(t,s),ee(i)}Sr(["click","keydown"]),re(Vp,{campaign:{}},[],[],{mode:"open"});function P1(t,e){return e=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:e}).format(t):new Intl.NumberFormat("de-DE",{style:"currency",currency:e}).format(t)}function rn(t){if(!t)return;const e=t.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return e.length>0?e:void 0}var $1=V("<button> </button>"),M1=V('<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>'),F1=V('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function jp(t,e){X(e,!0);const r=Et.campaign?.guest_limit/100;let n=ie(void 0);function i(f){Et.amount=f,I(n,null)}function s(f){const p=document.getElementById("donationForm");p.checkValidity()?Et.amount=f.target.valueAsNumber*100:(Et.amount=void 0,p.reportValidity())}var o=F1(),a=$(o),l=$(a,!0);T(a);var u=J(a,2);Le(u,20,()=>Et.campaign?.options,f=>f,(f,p)=>{var v=$1();let g;v.__click=()=>i(p);var m=$(v,!0);T(v),oe(_=>{g=zt(v,1,"btn btn-default",null,g,{selected:Et.amount===p}),te(m,_)},[()=>P1(p/100,S.currency)]),w(f,v)}),T(u);var c=J(u,2);{var d=f=>{var p=M1(),v=$(p),g=$(v),m=$(g,!0);T(g);var _=J(g,2);Vo(_),_.__input=s,T(v),T(p),oe((k,D)=>{te(m,k),Se(_,"max",r),Se(_,"placeholder",D),zf(_,h(n))},[()=>S.t("donations.selection.custom.label"),()=>S.t("donations.selection.custom.input.placeholder")]),w(f,p)};ae(c,f=>{Et.campaign?.free_donations&&f(d)})}T(o),oe(f=>te(l,f),[()=>S.t("donations.selection.title")]),w(t,o),ee()}Sr(["click","input"]),re(jp,{},[],[],{mode:"open"});var N1=V('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function R1(t,e){X(e,!1),Hr(()=>{S.donations?.campaigns?.length==1&&Et.selectCampaign(S.donations?.campaigns[0])}),Wl();var r=q(),n=R(r);{var i=s=>{var o=N1(),a=$(o);Le(a,1,()=>S?.donations?.campaigns,g=>g.id,(g,m)=>{Vp(g,{get campaign(){return h(m)}})});var l=J(a,2);{var u=g=>{jp(g,{})};ae(l,g=>{Et.campaign&&g(u)})}var c=J(l,2),d=$(c);d.__click=function(...g){Et.skipDonation?.apply(this,g)};var f=$(d,!0);T(d);var p=J(d,2);p.__click=function(...g){Et.addDonationToCart?.apply(this,g)};var v=$(p,!0);T(p),T(c),T(o),oe((g,m)=>{te(f,g),p.disabled=!Et.amount,te(v,m)},[()=>S.t("donations.actions.continueWithoutDonation"),()=>S.t("donations.actions.addToCart")]),w(s,o)};ae(n,s=>{S.donations&&S.donations.campaigns&&s(i)})}w(t,r),ee()}Sr(["click"]),customElements.define("go-donations",re(R1,{},[],[]));function z1(t){return typeof t=="function"}function Gs(t){return t!==null&&typeof t=="object"}const L1=["string","number","bigint","boolean"];function zu(t){return t==null||L1.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>zu(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const ya=Symbol("box"),Bp=Symbol("is-writable");function F(t,e){const r=E(t);return e?{[ya]:!0,[Bp]:!0,get current(){return h(r)},set current(n){e(n)}}:{[ya]:!0,get current(){return t()}}}function Up(t){return Gs(t)&&ya in t}function Z1(t){return Up(t)?t:z1(t)?F(t):cr(t)}function cr(t){let e=ie(Ne(t));return{[ya]:!0,[Bp]:!0,get current(){return h(e)},set current(r){I(e,r,!0)}}}function qp(...t){return function(e){for(const r of t)if(r){if(e.defaultPrevented)return;typeof r=="function"?r.call(this,e):r.current?.call(this,e)}}}var Wp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,V1=/\n/g,j1=/^\s*/,B1=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,U1=/^:\s*/,q1=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,W1=/^[;\s]*/,K1=/^\s+|\s+$/g,H1=`
6
- `,Kp="/",Hp="*",ai="",Y1="comment",G1="declaration";function J1(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(v){var g=v.match(V1);g&&(r+=g.length);var m=v.lastIndexOf(H1);n=~m?v.length-m:n+v.length}function s(){var v={line:r,column:n};return function(g){return g.position=new o(v),u(),g}}function o(v){this.start=v,this.end={line:r,column:n},this.source=e.source}o.prototype.content=t;function a(v){var g=new Error(e.source+":"+r+":"+n+": "+v);if(g.reason=v,g.filename=e.source,g.line=r,g.column=n,g.source=t,!e.silent)throw g}function l(v){var g=v.exec(t);if(g){var m=g[0];return i(m),t=t.slice(m.length),g}}function u(){l(j1)}function c(v){var g;for(v=v||[];g=d();)g!==!1&&v.push(g);return v}function d(){var v=s();if(!(Kp!=t.charAt(0)||Hp!=t.charAt(1))){for(var g=2;ai!=t.charAt(g)&&(Hp!=t.charAt(g)||Kp!=t.charAt(g+1));)++g;if(g+=2,ai===t.charAt(g-1))return a("End of comment missing");var m=t.slice(2,g-2);return n+=2,i(m),t=t.slice(g),n+=2,v({type:Y1,comment:m})}}function f(){var v=s(),g=l(B1);if(g){if(d(),!l(U1))return a("property missing ':'");var m=l(q1),_=v({type:G1,property:Yp(g[0].replace(Wp,ai)),value:m?Yp(m[0].replace(Wp,ai)):ai});return l(W1),_}}function p(){var v=[];c(v);for(var g;g=f();)g!==!1&&(v.push(g),c(v));return v}return u(),p()}function Yp(t){return t?t.replace(K1,ai):ai}function Q1(t,e){let r=null;if(!t||typeof t!="string")return r;const n=J1(t),i=typeof e=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?e(o,a,s):a&&(r=r||{},r[o]=a)}),r}const X1=/\d/,eE=["-","_","/","."];function tE(t=""){if(!X1.test(t))return t!==t.toLowerCase()}function rE(t){const e=[];let r="",n,i;for(const s of t){const o=eE.includes(s);if(o===!0){e.push(r),r="",n=void 0;continue}const a=tE(s);if(i===!1){if(n===!1&&a===!0){e.push(r),r=s,n=a;continue}if(n===!0&&a===!1&&r.length>1){const l=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=a;continue}}r+=s,n=a,i=o}return e.push(r),e}function Gp(t){return t?rE(t).map(e=>iE(e)).join(""):""}function nE(t){return sE(Gp(t||""))}function iE(t){return t?t[0].toUpperCase()+t.slice(1):""}function sE(t){return t?t[0].toLowerCase()+t.slice(1):""}function Js(t){if(!t)return{};const e={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[Gp(n)]=i;return}if(n.startsWith("--")){e[n]=i;return}e[nE(n)]=i}return Q1(t,r),e}function Qs(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function oE(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const aE=oE(/[A-Z]/,t=>`-${t.toLowerCase()}`);function lE(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${aE(e)}: ${t[e]};`).join(`
7
- `)}function Xs(t={}){return lE(t).replace(`
8
- `," ")}const uE=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],cE=new Set(uE);function dE(t){return cE.has(t)}function Ke(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];if(n){for(const i of Object.keys(n)){const s=e[i],o=n[i],a=typeof s=="function",l=typeof o=="function";if(a&&dE(i)){const u=s,c=o;e[i]=qp(u,c)}else if(a&&l)e[i]=Qs(s,o);else if(i==="class"){const u=zu(s),c=zu(o);u&&c?e[i]=Lo(s,o):u?e[i]=Lo(s):c&&(e[i]=Lo(o))}else if(i==="style"){const u=typeof s=="object",c=typeof o=="object",d=typeof s=="string",f=typeof o=="string";if(u&&c)e[i]={...s,...o};else if(u&&f){const p=Js(o);e[i]={...s,...p}}else if(d&&c){const p=Js(s);e[i]={...p,...o}}else if(d&&f){const p=Js(s),v=Js(o);e[i]={...p,...v}}else u?e[i]=s:c?e[i]=o:d?e[i]=s:f&&(e[i]=o)}else e[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(n)){const s=e[i],o=n[i];e[i]=o!==void 0?o:s}}}return typeof e.style=="object"&&(e.style=Xs(e.style).replaceAll(`
9
- `," ")),e.hidden===!1&&(e.hidden=void 0,delete e.hidden),e.disabled===!1&&(e.disabled=void 0,delete e.disabled),e}const Jp=Xs({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"}),Qp=typeof window<"u"?window:void 0;function fE(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class hE extends Map{#e=new Map;#t=ie(0);#r=ie(0);#n=Kr||-1;constructor(e){if(super(),e){for(var[r,n]of e)super.set(r,n);this.#r.v=super.size}}#i(e){return Kr===this.#n?ie(e):wn(e)}has(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else return h(this.#t),!1}return h(n),!0}forEach(e,r){this.#s(),super.forEach(e,r)}get(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else{h(this.#t);return}}return h(n),super.get(e)}set(e,r){var n=this.#e,i=n.get(e),s=super.get(e),o=super.set(e,r),a=this.#t;if(i===void 0)i=this.#i(0),n.set(e,i),I(this.#r,super.size),kr(a);else if(s!==r){kr(i);var l=a.reactions===null?null:new Set(a.reactions),u=l===null||!i.reactions?.every(c=>l.has(c));u&&kr(a)}return o}delete(e){var r=this.#e,n=r.get(e),i=super.delete(e);return n!==void 0&&(r.delete(e),I(this.#r,super.size),I(n,-1),kr(this.#t)),i}clear(){if(super.size!==0){super.clear();var e=this.#e;I(this.#r,0);for(var r of e.values())I(r,-1);kr(this.#t),e.clear()}}#s(){h(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var r of super.keys())if(!e.has(r)){var n=this.#i(0);e.set(r,n)}}for([,n]of this.#e)h(n)}keys(){return h(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return h(this.#r),super.size}}class pE{#e;#t;constructor(e={}){const{window:r=Qp,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=_l(i=>{const s=dt(r,"focusin",i),o=dt(r,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#t?.(),this.#e?fE(this.#e):null}}new pE;function mE(t){return typeof t=="function"}class nn{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return Kv(this.#t)}get(){const e=$d(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const r=$d(this.#t);return r===void 0?e:r}set(e){return Wv(this.#t,e)}}function gE(t,e){switch(t){case"post":pe(e);break;case"pre":Ol(e);break}}function Xp(t,e,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(t)?[]:void 0;gE(e,()=>{const a=Array.isArray(t)?t.map(u=>u()):t();if(!s){s=!0,o=a;return}const l=Ve(()=>r(a,o));return o=a,l})}function it(t,e,r){Xp(t,"post",e,r)}function vE(t,e,r){Xp(t,"pre",e,r)}it.pre=vE;function em(t){return mE(t)?t():t}class yE{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=E(()=>(h(this.#o)?.(),this.getSize().width));#a=E(()=>(h(this.#o)?.(),this.getSize().height));#o=E(()=>{const e=em(this.#n);if(e)return _l(r=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(i=>{this.#t=!0;for(const s of i){const o=this.#r.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#e.width=a.reduce((l,u)=>Math.max(l,u.inlineSize),0),this.#e.height=a.reduce((l,u)=>Math.max(l,u.blockSize),0)}r()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,r={box:"border-box"}){this.#i=r.window??Qp,this.#r=r,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=em(this.#n);if(!e||!this.#i)return;const r=e.offsetWidth,n=e.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:n};const i=this.#i.getComputedStyle(e),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),l=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=r-s-a,c=n-o-l;return{width:u,height:c}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return h(this.#o)?.(),this.getSize()}get width(){return h(this.#s)}get height(){return h(this.#a)}}function Wi(t){pe(()=>()=>{t()})}function bE(t,e){return setTimeout(e,t)}function eo(t){Sf().then(t)}const _E=1,wE=9,kE=11;function Lu(t){return Gs(t)&&t.nodeType===_E&&typeof t.nodeName=="string"}function tm(t){return Gs(t)&&t.nodeType===wE}function SE(t){return Gs(t)&&t.constructor?.name==="VisualViewport"}function xE(t){return Gs(t)&&t.nodeType!==void 0}function rm(t){return xE(t)&&t.nodeType===kE&&"host"in t}function EE(t,e){if(!t||!e||!Lu(t)||!Lu(e))return!1;const r=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(r&&rm(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function ba(t){return tm(t)?t:SE(t)?t.document:t?.ownerDocument??document}function nm(t){return rm(t)?nm(t.host):tm(t)?t.defaultView??window:Lu(t)?t.ownerDocument?.defaultView??window:window}function CE(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class Ki{element;#e=E(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return h(this.#e)}set root(e){I(this.#e,e)}constructor(e){typeof e=="function"?this.element=F(e):this.element=e}getDocument=()=>ba(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>CE(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,r)=>this.getWindow().setTimeout(e,r);clearTimeout=e=>this.getWindow().clearTimeout(e)}function et(t,e){return{[xy()]:r=>Up(t)?(t.current=r,Ve(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t.current=null,e?.(null))}):(t(r),Ve(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t(null),e?.(null))})}}function dr(t){return t?"true":"false"}function Zu(t){return t?"true":void 0}function ze(t){return t?"":void 0}function im(t){return t?"open":"closed"}class OE{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(r=>[r,this.getAttr(r)]))}getAttr(e,r){return r?`data-${r}-${e}`:`${this.#t}${e}`}selector(e,r){return`[${this.getAttr(e,r)}]`}}function _a(t){const e=new OE(t);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}const wa="ArrowDown",to="ArrowLeft",ro="ArrowRight",ka="ArrowUp",sm="Backspace",Vu="Enter",TE="Escape",ju=" ",Sa="Tab",Bu="a",om="P",Uu="A",AE="p",sn=typeof document<"u",am=DE();function DE(){return sn&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function fr(t){return t instanceof HTMLElement}function no(t){return t instanceof Element}function IE(t){return t instanceof Element||t instanceof SVGElement}function xa(t){return!Number.isNaN(Number(t))&&!Number.isNaN(Number.parseFloat(t))}function Nn(t){return t===null}function Ea(t){return t.pointerType==="touch"}function PE(t){return t!==null}class $E{#e;#t=null;constructor(e){this.#e=e,Wi(()=>this.#r())}#r(){this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null)}run(e){this.#r();const r=this.#e.ref.current;if(r){if(typeof r.getAnimations!="function"){this.#n(e);return}this.#t=window.requestAnimationFrame(()=>{const n=r.getAnimations();if(n.length===0){this.#n(e);return}Promise.allSettled(n.map(i=>i.finished)).then(()=>{this.#n(e)})})}}#n(e){const r=()=>{e()};this.#e.afterTick?eo(r):r()}}class lm{#e;#t;#r;#n=ie(!1);constructor(e){this.#e=e,I(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new $E({ref:this.#e.ref,afterTick:this.#e.open}),it(()=>this.#e.open.current,r=>{r&&I(this.#n,!0),this.#t&&this.#r.run(()=>{r===this.#e.open.current&&(this.#e.open.current||I(this.#n,!1),this.#e.onComplete?.())})})}get shouldRender(){return h(this.#n)}}function ke(){}function Ie(t,e){return`bits-${t}`}const ME=new nn("BitsConfig");function FE(){const t=new NE(null,{});return ME.getOr(t).opts}class NE{opts;constructor(e,r){const n=RE(e,r);this.opts={defaultPortalTo:n(i=>i.defaultPortalTo),defaultLocale:n(i=>i.defaultLocale)}}}function RE(t,e){return r=>F(()=>{const i=r(e)?.current;if(i!==void 0)return i;if(t!==null)return r(t.opts)?.current})}function zE(t,e){return r=>{const n=FE();return F(()=>{const i=r();if(i!==void 0)return i;const s=t(n).current;return s!==void 0?s:e})}}const um=zE(t=>t.defaultLocale,"en");function cm(t,e=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...i)},e)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function dm(t,e){return t===e||t.contains(e)}function fm(t){return t?.ownerDocument??document}function LE(t,e){const{clientX:r,clientY:n}=t,i=e.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var hm=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ca=hm.join(","),pm=typeof Element>"u",li=pm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oa=!pm&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},Ta=function(e,r){var n;r===void 0&&(r=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=i===""||i==="true",o=s||r&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Ta(e.parentNode));return o},ZE=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},mm=function(e,r,n){if(Ta(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Ca));return r&&li.call(e,Ca)&&i.unshift(e),i=i.filter(n),i},Aa=function(e,r,n){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!Ta(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,u=Aa(l,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var c=li.call(o,Ca);c&&n.filter(o)&&(r||!e.includes(o))&&i.push(o);var d=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),f=!Ta(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(d&&f){var p=Aa(d===!0?o.children:d.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},gm=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},vm=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ZE(e))&&!gm(e)?0:e.tabIndex},VE=function(e,r){var n=vm(e);return n<0&&r&&!gm(e)?0:n},jE=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},ym=function(e){return e.tagName==="INPUT"},BE=function(e){return ym(e)&&e.type==="hidden"},UE=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},qE=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},WE=function(e){if(!e.name)return!0;var r=e.form||Oa(e),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=qE(i,e.form);return!s||s===e},KE=function(e){return ym(e)&&e.type==="radio"},HE=function(e){return KE(e)&&!WE(e)},YE=function(e){var r,n=e&&Oa(e),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==e){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var u,c,d;n=Oa(i),i=(u=n)===null||u===void 0?void 0:u.host,s=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return s},bm=function(e){var r=e.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},GE=function(e,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var o=li.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(li.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var u=e.parentElement,c=Oa(e);if(u&&!u.shadowRoot&&i(u)===!0)return bm(e);e.assignedSlot?e=e.assignedSlot:!u&&c!==e.ownerDocument?e=c.host:e=u}e=l}if(YE(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return bm(e);return!1},JE=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return li.call(r,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}r=r.parentElement}return!1},Da=function(e,r){return!(r.disabled||BE(r)||GE(r,e)||UE(r)||JE(r))},qu=function(e,r){return!(HE(r)||vm(r)<0||!Da(e,r))},QE=function(e){var r=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},_m=function(e){var r=[],n=[];return e.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=VE(a,o),u=o?_m(i.candidates):a;l===0?o?r.push.apply(r,u):r.push(a):n.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:u})}),n.sort(jE).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},XE=function(e,r){r=r||{};var n;return r.getShadowRoot?n=Aa([e],r.includeContainer,{filter:qu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:QE}):n=mm(e,r.includeContainer,qu.bind(null,r)),_m(n)},eC=function(e,r){r=r||{};var n;return r.getShadowRoot?n=Aa([e],r.includeContainer,{filter:Da.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=mm(e,r.includeContainer,Da.bind(null,r)),n},tC=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return li.call(e,Ca)===!1?!1:qu(r,e)},rC=hm.concat("iframe:not([inert]):not([inert] *)").join(","),nC=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return li.call(e,rC)===!1?!1:Da(r,e)};function iC(t,e){const r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}function Wu(t,e){return t>=0&&t<e.length}const sC="data-context-menu-trigger",oC="data-context-menu-content";_a({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]}),globalThis.bitsDismissableLayers??=new Map;class Ku{static create(e){return new Ku(e)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=ke;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,pe(()=>{this.#s=fm(this.opts.ref.current)});let r=ke;const n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),r()};it([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return bE(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),Wi(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),this.#o(),r()})}#l=e=>{e.defaultPrevented||this.opts.ref.current&&eo(()=>{!this.opts.ref.current||this.#m(e.target)||e.target&&!this.#i&&this.#a.current?.(e)})};#u(){return Qs(dt(this.#s,"pointerdown",Qs(this.#f,this.#p),{capture:!0}),dt(this.#s,"pointerdown",Qs(this.#h,this.#c)),dt(this.#s,"focusin",this.#l))}#d=e=>{let r=e;r.defaultPrevented&&(r=wm(e)),this.#e.current(e)};#c=cm(e=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(e,this.opts.ref.current)||uC(e,this.opts.ref.current);if(!this.#n||this.#v()||!r){this.#o();return}let n=e;if(n.defaultPrevented&&(n=wm(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}e.pointerType==="touch"?(this.#o(),this.#o=dt(this.#s,"click",this.#d,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#r[e.type]=!0};#h=e=>{this.#r[e.type]=!1};#p=()=>{this.opts.ref.current&&(this.#n=lC(this.opts.ref.current))};#m=e=>this.opts.ref.current?dm(this.opts.ref.current,e):!1;#g=cm(()=>{for(const e in this.#r)this.#r[e]=!1;this.#n=!1},20);#v(){return Object.values(this.#r).some(Boolean)}#y=()=>{this.#i=!0};#b=()=>{this.#i=!1};props={onfocuscapture:this.#y,onblurcapture:this.#b}}function aC(t=[...globalThis.bitsDismissableLayers]){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function lC(t){const e=[...globalThis.bitsDismissableLayers],r=aC(e);if(r)return r[0].opts.ref.current===t;const[n]=e[0];return n.opts.ref.current===t}function uC(t,e){const r=t.target;if(!IE(r))return!1;const n=!!r.closest(`[${sC}]`);if("button"in t&&t.button>0&&!n)return!1;if("button"in t&&t.button===0&&n)return!0;const i=!!e.closest(`[${oC}]`);return n&&i?!1:fm(r).documentElement.contains(r)&&!dm(e,r)&&LE(t,e)}function wm(t){const e=t.currentTarget,r=t.target;let n;t instanceof PointerEvent?n=new PointerEvent(t.type,t):n=new PointerEvent("pointerdown",t);let i=!1;return new Proxy(n,{get:(o,a)=>a==="currentTarget"?e:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:t[a]})}function km(t,e){X(e,!0);let r=b(e,"interactOutsideBehavior",7,"close"),n=b(e,"onInteractOutside",7,ke),i=b(e,"onFocusOutside",7,ke),s=b(e,"id",7),o=b(e,"children",7),a=b(e,"enabled",7),l=b(e,"isValidEvent",7,()=>!1),u=b(e,"ref",7);const c=Ku.create({id:F(()=>s()),interactOutsideBehavior:F(()=>r()),onInteractOutside:F(()=>n()),enabled:F(()=>a()),onFocusOutside:F(()=>i()),isValidEvent:F(()=>l()),ref:u()});var d={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(v="close"){r(v),y()},get onInteractOutside(){return n()},set onInteractOutside(v=ke){n(v),y()},get onFocusOutside(){return i()},set onFocusOutside(v=ke){i(v),y()},get id(){return s()},set id(v){s(v),y()},get children(){return o()},set children(v){o(v),y()},get enabled(){return a()},set enabled(v){a(v),y()},get isValidEvent(){return l()},set isValidEvent(v=()=>!1){l(v),y()},get ref(){return u()},set ref(v){u(v),y()}},f=q(),p=R(f);return ve(p,()=>o()??Fe,()=>({props:c.props})),w(t,f),ee(d)}re(km,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;class Hu{static create(e){return new Hu(e)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Ki(this.opts.ref);let r=ke;it(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>dt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==TE||!cC(this))return;const r=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}}function cC(t){const e=[...globalThis.bitsEscapeLayers],r=e.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===t;const[n]=e[0];return n===t}function Sm(t,e){X(e,!0);let r=b(e,"escapeKeydownBehavior",7,"close"),n=b(e,"onEscapeKeydown",7,ke),i=b(e,"children",7),s=b(e,"enabled",7),o=b(e,"ref",7);Hu.create({escapeKeydownBehavior:F(()=>r()),onEscapeKeydown:F(()=>n()),enabled:F(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(c="close"){r(c),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(c=ke){n(c),y()},get children(){return i()},set children(c){i(c),y()},get enabled(){return s()},set enabled(c){s(c),y()},get ref(){return o()},set ref(c){o(c),y()}},l=q(),u=R(l);return ve(u,()=>i()??Fe),w(t,l),ee(a)}re(Sm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});class Yu{static instance;#e=cr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Yu),this.instance}register(e){const r=this.getActive();r&&r!==e&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(e,n),this.#e.current=this.#e.current.filter(i=>i!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(n=>n!==e);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,r){this.#t.set(e,r)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,r){this.#r.set(e,r)}getPreFocusMemory(e){return this.#r.get(e)}clearPreFocusMemory(e){this.#r.delete(e)}}class Gu{#e=!1;#t=null;#r=Yu.getInstance();#n=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const e of this.#n)e();this.#n=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#r.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const e=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#d();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const e=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const e=this.#t,r=e.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(!a)return;if(e.contains(a))this.#r.setFocusMemory(this,a);else{const u=this.#r.getFocusMemory(this);if(u&&e.contains(u)&&nC(u))o.preventDefault(),u.focus();else{const c=this.#d(),d=this.#c()[0];(c||d||e).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length<2)return;const l=a[0],u=a[a.length-1];!o.shiftKey&&r.activeElement===u?(o.preventDefault(),l.focus()):o.shiftKey&&r.activeElement===l&&(o.preventDefault(),u.focus())};this.#n.push(dt(r,"focusin",n,{capture:!0}),dt(e,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!e.contains(o)){const a=this.#d(),l=this.#c()[0],u=a||l;u?(u.focus(),this.#r.setFocusMemory(this,u)):e.focus()}});s.observe(e,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?XE(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#u()[0]||null}#c(){return this.#t?eC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(e){let r=null;return it([()=>e.ref.current,()=>e.enabled.current],([n,i])=>{n&&i?(r||(r=new Gu(e)),r.mount(n)):r&&(r.unmount(),r=null)}),Wi(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}}function xm(t,e){X(e,!0);let r=b(e,"enabled",7,!1),n=b(e,"trapFocus",7,!1),i=b(e,"loop",7,!1),s=b(e,"onCloseAutoFocus",7,ke),o=b(e,"onOpenAutoFocus",7,ke),a=b(e,"focusScope",7),l=b(e,"ref",7);const u=Gu.use({enabled:F(()=>r()),trap:F(()=>n()),loop:i(),onCloseAutoFocus:F(()=>s()),onOpenAutoFocus:F(()=>o()),ref:l()});var c={get enabled(){return r()},set enabled(p=!1){r(p),y()},get trapFocus(){return n()},set trapFocus(p=!1){n(p),y()},get loop(){return i()},set loop(p=!1){i(p),y()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(p=ke){s(p),y()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(p=ke){o(p),y()},get focusScope(){return a()},set focusScope(p){a(p),y()},get ref(){return l()},set ref(p){l(p),y()}},d=q(),f=R(d);return ve(f,()=>a()??Fe,()=>({props:u.props})),w(t,d),ee(c)}re(xm,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsTextSelectionLayers??=new Map;class Ju{static create(e){return new Ju(e)}opts;domContext;#e=ke;constructor(e){this.opts=e,this.domContext=new Ki(e.ref);let r=ke;it(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#t()),()=>{r(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Qs(dt(this.domContext.getDocument(),"pointerdown",this.#r),dt(this.domContext.getDocument(),"pointerup",qp(this.#n,this.opts.onPointerUp.current)))}#r=e=>{const r=this.opts.ref.current,n=e.target;!fr(r)||!fr(n)||!this.opts.enabled.current||!fC(this)||!EE(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=dC(r,this.domContext.getDocument().body)))};#n=()=>{this.#e(),this.#e=ke}}const Em=t=>t.style.userSelect||t.style.webkitUserSelect;function dC(t,e){const r=Em(e),n=Em(t);return Ia(e,"none"),Ia(t,"text"),()=>{Ia(e,r),Ia(t,n)}}function Ia(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function fC(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function Cm(t,e){X(e,!0);let r=b(e,"preventOverflowTextSelection",7,!0),n=b(e,"onPointerDown",7,ke),i=b(e,"onPointerUp",7,ke),s=b(e,"id",7),o=b(e,"children",7),a=b(e,"enabled",7),l=b(e,"ref",7);Ju.create({id:F(()=>s()),onPointerDown:F(()=>n()),onPointerUp:F(()=>i()),enabled:F(()=>a()&&r()),ref:l()});var u={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(f=!0){r(f),y()},get onPointerDown(){return n()},set onPointerDown(f=ke){n(f),y()},get onPointerUp(){return i()},set onPointerUp(f=ke){i(f),y()},get id(){return s()},set id(f){s(f),y()},get children(){return o()},set children(f){o(f),y()},get enabled(){return a()},set enabled(f){a(f),y()},get ref(){return l()},set ref(f){l(f),y()}},c=q(),d=R(c);return ve(d,()=>o()??Fe),w(t,c),ee(u)}re(Cm,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Rn(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}class hC{#e;#t=0;#r=ie();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),I(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,h(this.#r)===void 0&&(this.#n=Fo(()=>{I(this.#r,this.#e(...e),!0)})),pe(()=>()=>{this.#i()}),h(this.#r)}}const Pa=new hE;let $a=ie(null),Qu=null,io=null,so=!1;const Om=F(()=>{for(const t of Pa.values())if(t)return!0;return!1});let Xu=null;const pC=new hC(()=>{function t(){document.body.setAttribute("style",h($a)??""),document.body.style.removeProperty("--scrollbar-width"),am&&Qu?.(),I($a,null)}function e(){io!==null&&(window.clearTimeout(io),io=null)}function r(i,s){e(),so=!0,Xu=Date.now();const o=Xu,a=()=>{io=null,Xu===o&&(Tm(Pa)?so=!1:(so=!1,s()))},l=i===null?24:i;io=window.setTimeout(a,l)}function n(){h($a)===null&&Pa.size===0&&!so&&I($a,document.body.getAttribute("style"),!0)}return it(()=>Om.current,()=>{if(!Om.current)return;n(),so=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",am&&(Qu=dt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),eo(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Wi(()=>()=>{Qu?.()}),{get lockMap(){return Pa},resetBodyStyle:t,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:e,ensureInitialStyleCaptured:n}});class mC{#e=Rn();#t;#r=()=>null;#n;locked;constructor(e,r=()=>null){this.#t=e,this.#r=r,this.#n=pC.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=F(()=>this.#n.lockMap.get(this.#e)??!1,n=>this.#n.lockMap.set(this.#e,n)),Wi(()=>{if(this.#n.lockMap.delete(this.#e),Tm(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function Tm(t){for(const[e,r]of t)if(r)return!0;return!1}function ec(t,e){X(e,!0);let r=b(e,"preventScroll",7,!0),n=b(e,"restoreScrollDelay",7,null);r()&&new mC(r(),()=>n());var i={get preventScroll(){return r()},set preventScroll(s=!0){r(s),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(s=null){n(s),y()}};return ee(i)}re(ec,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function gC(t){if(!sn||!t)return null;let e=t.querySelector("[data-bits-announcer]");const r=i=>{const s=t.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!fr(e)){const i=t.createElement("div");i.style.cssText=Jp,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),e=i,t.body.insertBefore(e,t.body.firstChild)}return{getLog:i=>{if(!fr(e))return null;const s=e.querySelector(`[aria-live="${i}"]`);return fr(s)?s:null}}}function Ma(t){const e=gC(t);function r(n,i="assertive",s=7500){if(!e||!sn||!t)return;const o=e.getLog(i),a=t.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?o?.replaceChildren(a):o?.appendChild(a),setTimeout(()=>{a.remove()},s)}return{announce:r}}const vC={defaultValue:void 0,granularity:"day"};function Am(t){const e={...vC,...t},{defaultValue:r,granularity:n,minValue:i,maxValue:s}=e;if(Array.isArray(r)&&r.length)return r[r.length-1];if(r&&!Array.isArray(r))return r;{let o=new Date;i&&o<i.toDate(Vt())?o=i.toDate(Vt()):s&&o>s.toDate(Vt())&&(o=s.toDate(Vt()));const a=o.getFullYear(),l=o.getMonth()+1,u=o.getDate();return["hour","minute","second"].includes(n??"day")?new Xr(a,l,u,0,0,0):new $n(a,l,u)}}function Dm(t,e){let r;return e instanceof ur?r=Th(t):e instanceof Xr?r=Oh(t):r=pu(t),r.calendar!==e.calendar?jt(r,e.calendar):r}function Pt(t,e=Vt()){return t instanceof ur?t.toDate():t.toDate(e)}function yC(t){if(t instanceof $n)return"date";if(t instanceof Xr)return"datetime";if(t instanceof ur)return"zoneddatetime";throw new Error("Unknown date type")}function bC(t,e){switch(e){case"date":return pu(t);case"datetime":return Oh(t);case"zoneddatetime":return Th(t);default:throw new Error(`Unknown date type: ${e}`)}}function _C(t){return t instanceof Xr}function tc(t){return t instanceof ur}function Fa(t){return _C(t)||tc(t)}function oo(t){if(t instanceof Date){const e=t.getFullYear(),r=t.getMonth()+1;return new Date(e,r,0).getDate()}else return t.set({day:100}).day}function ui(t,e){return t.compare(e)<0}function wC(t,e){return t.compare(e)>0}function Im(t,e,r){const n=uh(t,r);return e>n?t.subtract({days:n+7-e}):e===n?t:t.subtract({days:n-e})}function Pm(t,e,r){const n=uh(t,r),i=e===0?6:e-1;return n===i?t:n>i?t.add({days:7-n+i}):t.add({days:i-n})}const Na=["day","month","year"],rc=["hour","minute","second","dayPeriod"],kC=["literal","timeZoneName"],ao=[...Na,...rc],SC=[...ao,...kC],xC=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],EC=["year","month","day"],nc={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function CC(t){if($m(t))return nc[t];{const e=DC(t);return $m(e)?nc[e]:nc.en}}function ic(t,e,r){return OC(t)?CC(r)[t]:AC(t)?e:TC(t)?"––":""}function $m(t){return xC.includes(t)}function OC(t){return EC.includes(t)}function TC(t){return t==="hour"||t==="minute"||t==="second"}function AC(t){return t==="era"||t==="dayPeriod"}function DC(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}function sc(t){const e=["hour","minute","second"],r=ao.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:t==="day"?!e.includes(n):!0);return Object.fromEntries(r)}function IC(t){const{segmentValues:e,formatter:r,locale:n,dateRef:i}=t,s=Object.keys(e).reduce((a,l)=>{if(!Fm(l))return a;if("hour"in e&&l==="dayPeriod"){const u=e[l];Nn(u)?a[l]=ic(l,"AM",n):a[l]=u}else a[l]=o(l);return a},{});function o(a){if("hour"in e){const l=e[a],u=typeof l=="string"&&l?.startsWith("0"),c=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!Nn(l)&&!Nn(c)){const d=r.part(i.set({[a]:l}),a,{hourCycle:t.hourCycle===24?"h23":void 0}),f=t.hourCycle===12||t.hourCycle===void 0&&Rm(n)===12;if(a==="hour"&&f){if(c>12){const p=c-12;return p===0?"12":p<10?`0${p}`:`${p}`}return c===0?"12":c<10?`0${c}`:`${c}`}return a==="year"?`${l}`:u&&d.length===1?`0${d}`:d}else return ic(a,"",n)}else{if(Ra(a)){const l=e[a],u=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Nn(l))return ic(a,"",n);{const c=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:u&&c.length===1?`0${c}`:c}}return""}}return s}function PC(t){const{granularity:e,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=t;return n.toParts(r,MC(e,o)).map(u=>["literal","dayPeriod","timeZoneName",null].includes(u.type)||!Fm(u.type)?{part:u.type,value:u.value}:{part:u.type,value:i[u.type]}).filter(u=>!(Nn(u.part)||Nn(u.value)||u.part==="timeZoneName"&&(!tc(r)||s)))}function $C(t){const e=IC(t),r=PC({contentObj:e,...t});return{obj:e,arr:r}}function MC(t,e){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:e===24?"h23":void 0,hour12:e===24?!1:void 0};return t==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),t==="hour"&&delete r.minute,t==="minute"&&delete r.second,r}function Mm(){return ao.reduce((t,e)=>(t[e]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},t),{})}function Ra(t){return Na.includes(t)}function Fm(t){return ao.includes(t)}function FC(t){return SC.includes(t)}function Nm(t){return!sn||!t?[]:za(t).map(r=>r.dataset.segment).filter(r=>ao.includes(r))}function NC(t){const{segmentObj:e,fieldNode:r,dateRef:n}=t,i=Nm(r);let s=n;for(const o of i)if("hour"in e){const a=e[o];if(Nn(a))continue;s=s.set({[o]:e[o]})}else if(Ra(o)){const a=e[o];if(Nn(a))continue;s=s.set({[o]:e[o]})}return s}function RC(t,e){const r=Nm(e);for(const n of r)if("hour"in t){if(t[n]===null)return!1}else if(Ra(n)&&t[n]===null)return!1;return!0}function zC(t){return typeof t!="object"||t===null?!1:Object.entries(t).every(([e,r])=>(rc.includes(e)||Na.includes(e))&&(e==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function LC(t,e){return e||(Fa(t)?"minute":"day")}function oc(t){return!!([Vu,ka,wa,to,ro,sm,ju].includes(t)||xa(t))}function ZC(t,e){if(!sn)return!1;const r=za(e);return r.length?r[0].id===t:!1}function VC(t){const{id:e,formatter:r,value:n,doc:i}=t;if(!sn)return;const s=r.selectedDate(n),o=i.getElementById(e);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Xs({display:"none"}),a.id=e,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function jC(t,e){if(!sn)return;const r=e.getElementById(t);r&&e.body.removeChild(r)}function Rm(t){return new Intl.DateTimeFormat(t,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(i=>i.type==="hour")?.value==="1"?12:24}function lo(t,e){const r=t.currentTarget;if(!fr(r))return;const{prev:n,next:i}=ac(r,e);if(t.key===to){if(!n)return;n.focus()}else if(t.key===ro){if(!i)return;i.focus()}}function BC(t,e){const r=e.indexOf(t);if(r===e.length-1||r===-1)return null;const n=r+1;return e[n]}function UC(t,e){const r=e.indexOf(t);if(r===0||r===-1)return null;const n=r-1;return e[n]}function ac(t,e){const r=za(e);return r.length?{next:BC(t,r),prev:UC(t,r)}:{next:null,prev:null}}function zm(t,e){const r=t.currentTarget;if(!fr(r))return;const{next:n}=ac(r,e);n&&n.focus()}function Lm(t,e){const r=t.currentTarget;if(!fr(r))return;const{prev:n}=ac(r,e);n&&n.focus()}function uo(t){return t===ro||t===to}function za(t){return t?Array.from(t.querySelectorAll("[data-segment]")).filter(r=>{if(!fr(r))return!1;const n=r.dataset.segment;return n==="trigger"?!0:!(!FC(n)||n==="literal")}):[]}function qC(t){return za(t)[0]}const WC={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Zm(t){let e=t.initialLocale;function r(p){e=p}function n(){return e}function i(p,v){return new Ir(e,v).format(p)}function s(p,v=!0){return Fa(p)&&v?i(Pt(p),{dateStyle:"long",timeStyle:"long"}):i(Pt(p),{dateStyle:"long"})}function o(p){if(typeof t.monthFormat.current!="function"&&typeof t.yearFormat.current!="function")return new Ir(e,{month:t.monthFormat.current,year:t.yearFormat.current}).format(p);const v=typeof t.monthFormat.current=="function"?t.monthFormat.current(p.getMonth()+1):new Ir(e,{month:t.monthFormat.current}).format(p),g=typeof t.yearFormat.current=="function"?t.yearFormat.current(p.getFullYear()):new Ir(e,{year:t.yearFormat.current}).format(p);return`${v} ${g}`}function a(p){return new Ir(e,{month:"long"}).format(p)}function l(p){return new Ir(e,{year:"numeric"}).format(p)}function u(p,v){return tc(p)?new Ir(e,{...v,timeZone:p.timeZone}).formatToParts(Pt(p)):new Ir(e,v).formatToParts(Pt(p))}function c(p,v="narrow"){return new Ir(e,{weekday:v}).format(p)}function d(p,v=void 0){return new Ir(e,{hour:"numeric",minute:"numeric",hourCycle:v===24?"h23":void 0}).formatToParts(p).find(_=>_.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function f(p,v,g={}){const m={...WC,...g},k=u(p,m).find(D=>D.type===v);return k?k.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:u,custom:i,part:f,dayPeriod:d,selectedDate:s,dayOfWeek:c}}function KC(t){return!(!fr(t)||!t.hasAttribute("data-bits-day"))}function Vm(t,e){const r=[];let n=t.add({days:1});const i=e;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function lc(t){const{dateObj:e,weekStartsOn:r,fixedWeeks:n,locale:i}=t,s=oo(e),o=Array.from({length:s},(m,_)=>e.set({day:_+1})),a=su(e),l=c_(e),u=r!==void 0?Im(a,r,"en-US"):Im(a,0,i),c=r!==void 0?Pm(l,r,"en-US"):Pm(l,0,i),d=Vm(u.subtract({days:1}),a),f=Vm(l,c.add({days:1})),p=d.length+o.length+f.length;if(n&&p<42){const m=42-p;let _=f[f.length-1];_||(_=e.add({months:1}).set({day:1}));let k=m;f.length===0&&(k=m-1,f.push(_));const D=Array.from({length:k},(O,P)=>{const C=P+1;return _.add({days:C})});f.push(...D)}const v=d.concat(o,f),g=iC(v,7);return{value:e,dates:v,weeks:g}}function co(t){const{numberOfMonths:e,dateObj:r,...n}=t,i=[];if(!e||e===1)return i.push(lc({...n,dateObj:r})),i;i.push(lc({...n,dateObj:r}));for(let s=1;s<e;s++){const o=r.add({months:s});i.push(lc({...n,dateObj:o}))}return i}function uc(t){return t?Array.from(t.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(r=>fr(r)):[]}function jm(t,e){const r=t.getAttribute("data-value");r&&(e.current=Dm(r,e.current))}function HC({node:t,add:e,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=uc(n);if(!l.length)return;const c=l.indexOf(t)+e;if(Wu(c,l)){const d=l[c];return jm(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),eo(()=>{const f=uc(n);if(!f.length)return;const p=f.length-Math.abs(c);if(Wu(p,f)){const v=f[p];return jm(v,r),v.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),eo(()=>{const f=uc(n);if(!f.length)return;const p=c-l.length;if(Wu(p,f))return f[p].focus()})}}const Bm=[wa,ka,to,ro],Um=[Vu,ju];function YC({event:t,handleCellClick:e,shiftFocus:r,placeholderValue:n}){const i=t.target;if(!KC(i)||!Bm.includes(t.key)&&!Um.includes(t.key))return;t.preventDefault();const s={[wa]:7,[ka]:-7,[to]:-1,[ro]:1};if(Bm.includes(t.key)){const o=s[t.key];o!==void 0&&r(i,o)}if(Um.includes(t.key)){const o=i.getAttribute("data-value");if(!o)return;e(t,Dm(o,n))}}function GC({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.add({months:r}));else{const u=l.add({months:1}),c=co({dateObj:u,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(u),e(c)}}function JC({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const u=l.subtract({months:1}),c=co({dateObj:u,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(u),e(c)}}function QC({months:t,formatter:e,weekdayFormat:r}){if(!t.length)return[];const i=t[0].weeks[0];return i?i.map(s=>e.dayOfWeek(Pt(s),r)):[]}function XC(t){pe(()=>{const e=t.weekStartsOn.current,r=t.locale.current,n=t.fixedWeeks.current,i=t.numberOfMonths.current;Ve(()=>{const s=t.placeholder.current;if(!s)return;const o={weekStartsOn:e,locale:r,fixedWeeks:n,numberOfMonths:i};t.setMonths(co({...o,dateObj:s}))})})}function eO({calendarNode:t,label:e,accessibleHeadingId:r}){const n=ba(t),i=n.createElement("div");i.style.cssText=Xs({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=e,s.id=r,s.role="heading",s.ariaLevel="2",t.insertBefore(i,t.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function tO({placeholder:t,getVisibleMonths:e,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){pe(()=>{t.current,Ve(()=>{if(e().some(l=>nu(l,t.current)))return;const a={weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current};o(co({...a,dateObj:t.current}))})})}function rO({maxValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[e.length-1]?.value;if(!n)return!1;const i=n.add({months:1}).set({day:1});return wC(i,t)}function nO({minValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[0]?.value;if(!n)return!1;const i=n.subtract({months:1}).set({day:35});return ui(i,t)}function iO({months:t,locale:e,formatter:r}){if(!t.length)return"";if(e!==r.getLocale()&&r.setLocale(e),t.length===1){const c=Pt(t[0].value);return`${r.fullMonthAndYear(c)}`}const n=Pt(t[0].value),i=Pt(t[t.length-1].value),s=r.fullMonth(n),o=r.fullMonth(i),a=r.fullYear(n),l=r.fullYear(i);return a===l?`${s} - ${o} ${l}`:`${s} ${a} - ${o} ${l}`}function sO({fullCalendarLabel:t,id:e,isInvalid:r,disabled:n,readonly:i}){return{id:e,role:"application","aria-label":t,"data-invalid":ze(r),"data-disabled":ze(n),"data-readonly":ze(i)}}function oO(t){const r=ba(t.target).querySelector("[data-bits-day][data-focused]");r&&(t.preventDefault(),r?.focus())}function aO(t){if(!sn)return;const e=Array.from(t.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(e.length===0)return;const r=e[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return bC(n,i)}function lO({ref:t,placeholder:e,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&ui(a,n.current)||i.current&&ui(i.current,a))}it(()=>t.current,()=>{t.current&&e.current&&Dn(e.current,r)&&o(r)&&(e.current=aO(t.current)??r)})}function uO(t,e){return!t||!e?t:Fa(t)&&Fa(e)?t.set({hour:e.hour,minute:e.minute,millisecond:e.millisecond,second:e.second}):t}const cO=_a({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function dO(t){const e=new Date().getFullYear(),r=Math.max(t.placeholderYear,e);let n,i;if(t.minValue)n=t.minValue.year;else{const o=r-100;n=t.placeholderYear<o?t.placeholderYear-10:o}t.maxValue?i=t.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}const hr=new nn("Calendar.Root | RangeCalender.Root");class La{static create(e){return hr.set(new La(e))}opts;#e=E(()=>this.months.map(e=>e.value));get visibleMonths(){return h(this.#e)}set visibleMonths(e){I(this.#e,e)}formatter;accessibleHeadingId=Rn();domContext;attachment;#t=ie(Ne([]));get months(){return h(this.#t)}set months(e){I(this.#t,e,!0)}announcer;constructor(e){this.opts=e,this.attachment=et(this.opts.ref),this.domContext=new Ki(e.ref),this.announcer=Ma(null),this.formatter=Zm({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),Hr(()=>{this.announcer=Ma(this.domContext.getDocument())}),this.months=co({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#a(),this.#o(),tO({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),XC({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),it(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),it(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),lO({placeholder:e.placeholder,defaultPlaceholder:e.defaultPlaceholder,isDateDisabled:e.isDateDisabled,maxValue:e.maxValue,minValue:e.minValue,ref:e.ref})}setMonths(e){this.months=e}#r=E(()=>QC({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return h(this.#r)}set weekdays(e){I(this.#r,e)}#n=E(()=>Ve(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return h(this.#n)}set initialPlaceholderYear(e){I(this.#n,e)}#i=E(()=>dO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return h(this.#i)}set defaultYears(e){I(this.#i,e)}#s(){pe(()=>{if(Ve(()=>this.opts.initialFocus.current)){const r=this.opts.ref.current?.querySelector("[data-focused]");r&&r.focus()}})}#a(){pe(()=>this.opts.ref.current?eO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId}):void 0)}#o(){Ol(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){GC({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){JC({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(e){this.opts.placeholder.current=this.opts.placeholder.current.set({year:e})}setMonth(e){this.opts.placeholder.current=this.opts.placeholder.current.set({month:e})}#l=E(()=>rO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return h(this.#l)}set isNextButtonDisabled(e){I(this.#l,e)}#u=E(()=>nO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return h(this.#u)}set isPrevButtonDisabled(e){I(this.#u,e)}#d=E(()=>{const e=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(e)){if(!e.length)return!1;for(const i of e)if(r(i)||n(i))return!0}else{if(!e)return!1;if(r(e)||n(e))return!0}return!1});get isInvalid(){return h(this.#d)}set isInvalid(e){I(this.#d,e)}#c=E(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,iO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return h(this.#c)}set headingValue(e){I(this.#c,e)}#f=E(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return h(this.#f)}set fullCalendarLabel(e){I(this.#f,e)}isOutsideVisibleMonths(e){return!this.visibleMonths.some(r=>nu(e,r))}isDateDisabled(e){if(this.opts.isDateDisabled.current(e)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&ui(e,r)||n&&ui(n,e))}isDateSelected(e){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>Dn(n,e)):r?Dn(r,e):!1}shiftFocus(e,r){return HC({node:e,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#h(e){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=e.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(e,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const s=this.handleSingleUpdate(n,r);s?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(s,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=uO(s,n),s!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(e,r){if(!e){const s=[r];return this.#h(s)?s:[r]}if(!Array.isArray(e))return;const n=e.findIndex(s=>Dn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...e,r];return this.#h(s)?s:[r]}else{if(i)return e;{const s=e.filter(o=>!Dn(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(e,r){if(!e)return r;if(!this.opts.preventDeselect.current&&Dn(e,r)){this.opts.placeholder.current=r;return}return r}onkeydown(e){YC({event:e,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#p=E(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return h(this.#p)}set snippetProps(e){I(this.#p,e)}getBitsAttr=e=>cO.getAttr(e);#m=E(()=>({...sO({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return h(this.#m)}set props(e){I(this.#m,e)}}class cc{static create(e){return new cc(e,hr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"aria-hidden":Zu(!0),"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}const qm=new nn("Calendar.Cell | RangeCalendar.Cell");class dc{static create(e){return qm.set(new dc(e,hr.get()))}opts;root;#e=E(()=>Pt(this.opts.date.current));get cellDate(){return h(this.#e)}set cellDate(e){I(this.#e,e)}#t=E(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return h(this.#t)}set isUnavailable(e){I(this.#t,e)}#r=E(()=>a_(this.opts.date.current,Vt()));get isDateToday(){return h(this.#r)}set isDateToday(e){I(this.#r,e)}#n=E(()=>!nu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return h(this.#n)}set isOutsideMonth(e){I(this.#n,e)}#i=E(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return h(this.#i)}set isOutsideVisibleMonths(e){I(this.#i,e)}#s=E(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return h(this.#s)}set isDisabled(e){I(this.#s,e)}#a=E(()=>Dn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return h(this.#a)}set isFocusedDate(e){I(this.#a,e)}#o=E(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return h(this.#o)}set isSelectedDate(e){I(this.#o,e)}#l=E(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return h(this.#l)}set labelText(e){I(this.#l,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#u=E(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return h(this.#u)}set snippetProps(e){I(this.#u,e)}#d=E(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return h(this.#d)}set ariaDisabled(e){I(this.#d,e)}#c=E(()=>({"data-unavailable":ze(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":ze(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":yC(this.opts.date.current),"data-disabled":ze(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return h(this.#c)}set sharedDataAttrs(e){I(this.#c,e)}#f=E(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":dr(this.isSelectedDate),"aria-disabled":dr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return h(this.#f)}set props(e){I(this.#f,e)}}class fc{static create(e){return new fc(e,qm.get())}opts;cell;attachment;constructor(e,r){this.opts=e,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}#e=E(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(e){this.cell.isDisabled||this.cell.root.handleCellClick(e,this.cell.opts.date.current)}#t=E(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return h(this.#t)}set snippetProps(e){I(this.#t,e)}#r=E(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":dr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:h(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#r)}set props(e){I(this.#r,e)}}class hc{static create(e){return new hc(e,hr.get())}opts;root;#e=E(()=>this.root.isNextButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){I(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(e){this.isDisabled||this.root.nextPage()}#t=E(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":dr(this.isDisabled),"data-disabled":ze(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){I(this.#t,e)}}class pc{static create(e){return new pc(e,hr.get())}opts;root;#e=E(()=>this.root.isPrevButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){I(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(this.opts.ref)}onclick(e){this.isDisabled||this.root.prevPage()}#t=E(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":dr(this.isDisabled),"data-disabled":ze(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){I(this.#t,e)}}class mc{static create(e){return new mc(e,hr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":dr(this.root.opts.readonly.current),"aria-disabled":dr(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),"data-disabled":ze(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class gc{static create(e){return new gc(e,hr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class vc{static create(e){return new vc(e,hr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class yc{static create(e){return new yc(e,hr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class bc{static create(e){return new bc(e,hr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class _c{static create(e){return new _c(e,hr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}var fO=V("<div><!></div>");function Wm(t,e){X(e,!0);let r=b(e,"child",7),n=b(e,"children",7),i=b(e,"id",23,Rn),s=b(e,"ref",15,null),o=b(e,"value",15),a=b(e,"onValueChange",7,ke),l=b(e,"placeholder",15),u=b(e,"onPlaceholderChange",7,ke),c=b(e,"weekdayFormat",7,"narrow"),d=b(e,"weekStartsOn",7),f=b(e,"pagedNavigation",7,!1),p=b(e,"isDateDisabled",7,()=>!1),v=b(e,"isDateUnavailable",7,()=>!1),g=b(e,"fixedWeeks",7,!1),m=b(e,"numberOfMonths",7,1),_=b(e,"locale",7),k=b(e,"calendarLabel",7,"Event"),D=b(e,"disabled",7,!1),O=b(e,"readonly",7,!1),P=b(e,"minValue",7,void 0),C=b(e,"maxValue",7,void 0),A=b(e,"preventDeselect",7,!1),N=b(e,"type",7),M=b(e,"disableDaysOutsideMonth",7,!0),j=b(e,"initialFocus",7,!1),se=b(e,"maxDays",7),z=b(e,"monthFormat",7,"long"),ue=b(e,"yearFormat",7,"numeric"),ne=Ue(e,["$$slots","$$events","$$legacy","$$host","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]);const W=Am({defaultValue:o(),minValue:P(),maxValue:C()});function G(){l()===void 0&&l(W)}G(),it.pre(()=>l(),()=>{G()});function H(){o()===void 0&&o(N()==="single"?void 0:[])}H(),it.pre(()=>o(),()=>{H()});const U=La.create({id:F(()=>i()),ref:F(()=>s(),B=>s(B)),weekdayFormat:F(()=>c()),weekStartsOn:F(()=>d()),pagedNavigation:F(()=>f()),isDateDisabled:F(()=>p()),isDateUnavailable:F(()=>v()),fixedWeeks:F(()=>g()),numberOfMonths:F(()=>m()),locale:um(()=>_()),calendarLabel:F(()=>k()),readonly:F(()=>O()),disabled:F(()=>D()),minValue:F(()=>P()),maxValue:F(()=>C()),disableDaysOutsideMonth:F(()=>M()),initialFocus:F(()=>j()),maxDays:F(()=>se()),placeholder:F(()=>l(),B=>{l(B),u()(B)}),preventDeselect:F(()=>A()),value:F(()=>o(),B=>{o(B),a()(B)}),type:F(()=>N()),monthFormat:F(()=>z()),yearFormat:F(()=>ue()),defaultPlaceholder:W}),Y=E(()=>Ke(ne,U.props));var le={get child(){return r()},set child(B){r(B),y()},get children(){return n()},set children(B){n(B),y()},get id(){return i()},set id(B=Rn()){i(B),y()},get ref(){return s()},set ref(B=null){s(B),y()},get value(){return o()},set value(B){o(B),y()},get onValueChange(){return a()},set onValueChange(B=ke){a(B),y()},get placeholder(){return l()},set placeholder(B){l(B),y()},get onPlaceholderChange(){return u()},set onPlaceholderChange(B=ke){u(B),y()},get weekdayFormat(){return c()},set weekdayFormat(B="narrow"){c(B),y()},get weekStartsOn(){return d()},set weekStartsOn(B){d(B),y()},get pagedNavigation(){return f()},set pagedNavigation(B=!1){f(B),y()},get isDateDisabled(){return p()},set isDateDisabled(B=()=>!1){p(B),y()},get isDateUnavailable(){return v()},set isDateUnavailable(B=()=>!1){v(B),y()},get fixedWeeks(){return g()},set fixedWeeks(B=!1){g(B),y()},get numberOfMonths(){return m()},set numberOfMonths(B=1){m(B),y()},get locale(){return _()},set locale(B){_(B),y()},get calendarLabel(){return k()},set calendarLabel(B="Event"){k(B),y()},get disabled(){return D()},set disabled(B=!1){D(B),y()},get readonly(){return O()},set readonly(B=!1){O(B),y()},get minValue(){return P()},set minValue(B=void 0){P(B),y()},get maxValue(){return C()},set maxValue(B=void 0){C(B),y()},get preventDeselect(){return A()},set preventDeselect(B=!1){A(B),y()},get type(){return N()},set type(B){N(B),y()},get disableDaysOutsideMonth(){return M()},set disableDaysOutsideMonth(B=!0){M(B),y()},get initialFocus(){return j()},set initialFocus(B=!1){j(B),y()},get maxDays(){return se()},set maxDays(B){se(B),y()},get monthFormat(){return z()},set monthFormat(B="long"){z(B),y()},get yearFormat(){return ue()},set yearFormat(B="numeric"){ue(B),y()}},ce=q(),me=R(ce);{var Z=B=>{var L=q(),be=R(L);{let x=E(()=>({props:h(Y),...U.snippetProps}));ve(be,r,()=>h(x))}w(B,L)},ge=B=>{var L=fO();Ze(L,()=>({...h(Y)}));var be=$(L);ve(be,()=>n()??Fe,()=>U.snippetProps),T(L),w(B,L)};ae(me,B=>{r()?B(Z):B(ge,!1)})}return w(t,ce),ee(le)}re(Wm,{child:{},children:{},id:{},ref:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},weekdayFormat:{},weekStartsOn:{},pagedNavigation:{},isDateDisabled:{},isDateUnavailable:{},fixedWeeks:{},numberOfMonths:{},locale:{},calendarLabel:{},disabled:{},readonly:{},minValue:{},maxValue:{},preventDeselect:{},type:{},disableDaysOutsideMonth:{},initialFocus:{},maxDays:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var hO=V("<div><!></div>");function wc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=fc.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);{let k=E(()=>({props:h(u),...l.snippetProps}));ve(_,i,()=>h(k))}w(g,m)},v=g=>{var m=hO();Ze(m,()=>({...h(u)}));var _=$(m);{var k=O=>{var P=q(),C=R(P);ve(C,()=>n()??Fe,()=>l.snippetProps),w(O,P)},D=O=>{var P=It();oe(()=>te(P,l.cell.opts.date.current.day)),w(O,P)};ae(_,O=>{n()?O(k):O(D,!1)})}T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(wc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var pO=V("<table><!></table>");function kc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=mc.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,i,()=>({props:h(u)})),w(g,m)},v=g=>{var m=pO();Ze(m,()=>({...h(u)}));var _=$(m);ve(_,()=>n()??Fe),T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(kc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var mO=V("<tbody><!></tbody>");function Sc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=gc.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,i,()=>({props:h(u)})),w(g,m)},v=g=>{var m=mO();Ze(m,()=>({...h(u)}));var _=$(m);ve(_,()=>n()??Fe),T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(Sc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var gO=V("<td><!></td>");function xc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=b(e,"date",7),l=b(e,"month",7),u=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]);const c=dc.create({id:F(()=>o()),ref:F(()=>s(),_=>s(_)),date:F(()=>a()),month:F(()=>l())}),d=E(()=>Ke(u,c.props));var f={get children(){return n()},set children(_){n(_),y()},get child(){return i()},set child(_){i(_),y()},get ref(){return s()},set ref(_=null){s(_),y()},get id(){return o()},set id(_=Ie(r)){o(_),y()},get date(){return a()},set date(_){a(_),y()},get month(){return l()},set month(_){l(_),y()}},p=q(),v=R(p);{var g=_=>{var k=q(),D=R(k);{let O=E(()=>({props:h(d),...c.snippetProps}));ve(D,i,()=>h(O))}w(_,k)},m=_=>{var k=gO();Ze(k,()=>({...h(d)}));var D=$(k);ve(D,()=>n()??Fe,()=>c.snippetProps),T(k),w(_,k)};ae(v,_=>{i()?_(g):_(m,!1)})}return w(t,p),ee(f)}re(xc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var vO=V("<thead><!></thead>");function Ec(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=vc.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,i,()=>({props:h(u)})),w(g,m)},v=g=>{var m=vO();Ze(m,()=>({...h(u)}));var _=$(m);ve(_,()=>n()??Fe),T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(Ec,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var yO=V("<th><!></th>");function Cc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=bc.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,i,()=>({props:h(u)})),w(g,m)},v=g=>{var m=yO();Ze(m,()=>({...h(u)}));var _=$(m);ve(_,()=>n()??Fe),T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(Cc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var bO=V("<tr><!></tr>");function fo(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=yc.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,i,()=>({props:h(u)})),w(g,m)},v=g=>{var m=bO();Ze(m,()=>({...h(u)}));var _=$(m);ve(_,()=>n()??Fe),T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(fo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var _O=V("<header><!></header>");function Oc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=_c.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,i,()=>({props:h(u)})),w(g,m)},v=g=>{var m=_O();Ze(m,()=>({...h(u)}));var _=$(m);ve(_,()=>n()??Fe),T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(Oc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var wO=V("<div><!></div>");function Tc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=cc.create({id:F(()=>o()),ref:F(()=>s(),g=>s(g))}),u=E(()=>Ke(a,l.props));var c={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Ie(r)){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,i,()=>({props:h(u),headingValue:l.root.headingValue})),w(g,m)},v=g=>{var m=wO();Ze(m,()=>({...h(u)}));var _=$(m);{var k=O=>{var P=q(),C=R(P);ve(C,()=>n()??Fe,()=>({headingValue:l.root.headingValue})),w(O,P)},D=O=>{var P=It();oe(()=>te(P,l.root.headingValue)),w(O,P)};ae(_,O=>{n()?O(k):O(D,!1)})}T(m),w(g,m)};ae(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(Tc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var kO=V("<button><!></button>");function Ac(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"id",23,()=>Ie(r)),o=b(e,"ref",15,null),a=b(e,"tabindex",7,0),l=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const u=hc.create({id:F(()=>s()),ref:F(()=>o(),m=>o(m))}),c=E(()=>Ke(l,u.props,{tabindex:a()}));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Ie(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get tabindex(){return a()},set tabindex(m=0){a(m),y()}},f=q(),p=R(f);{var v=m=>{var _=q(),k=R(_);ve(k,i,()=>({props:h(c)})),w(m,_)},g=m=>{var _=kO();Ze(_,()=>({...h(c)}));var k=$(_);ve(k,()=>n()??Fe),T(_),w(m,_)};ae(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),ee(d)}re(Ac,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var SO=V("<button><!></button>");function Dc(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"id",23,()=>Ie(r)),o=b(e,"ref",15,null),a=b(e,"tabindex",7,0),l=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const u=pc.create({id:F(()=>s()),ref:F(()=>o(),m=>o(m))}),c=E(()=>Ke(l,u.props,{tabindex:a()}));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Ie(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get tabindex(){return a()},set tabindex(m=0){a(m),y()}},f=q(),p=R(f);{var v=m=>{var _=q(),k=R(_);ve(k,i,()=>({props:h(c)})),w(m,_)},g=m=>{var _=SO();Ze(_,()=>({...h(c)}));var k=$(_);ve(k,()=>n()??Fe),T(_),w(m,_)};ae(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),ee(d)}re(Dc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var xO=V("<input/>"),EO=V("<input/>");function Km(t,e){X(e,!0);let r=b(e,"value",15),n=Ue(e,["$$slots","$$events","$$legacy","$$host","value"]);const i=E(()=>Ke(n,{"aria-hidden":"true",tabindex:-1,style:Jp}));var s={get value(){return r()},set value(c){r(c),y()}},o=q(),a=R(o);{var l=c=>{var d=xO();Ze(d,()=>({...h(i),value:r()}),void 0,void 0,void 0,void 0,!0),w(c,d)},u=c=>{var d=EO();Ze(d,()=>({...h(i)}),void 0,void 0,void 0,void 0,!0),jl(d,r),w(c,d)};ae(a,c=>{h(i).type==="checkbox"?c(l):c(u,!1)})}return w(t,o),ee(s)}re(Km,{value:{}},[],[],{mode:"open"});const CO=["top","right","bottom","left"],zn=Math.min,Ut=Math.max,Za=Math.round,Va=Math.floor,Mr=t=>({x:t,y:t}),OO={left:"right",right:"left",bottom:"top",top:"bottom"},TO={start:"end",end:"start"};function Ic(t,e,r){return Ut(t,zn(e,r))}function on(t,e){return typeof t=="function"?t(e):t}function an(t){return t.split("-")[0]}function Hi(t){return t.split("-")[1]}function Pc(t){return t==="x"?"y":"x"}function $c(t){return t==="y"?"height":"width"}const AO=new Set(["top","bottom"]);function Fr(t){return AO.has(an(t))?"y":"x"}function Mc(t){return Pc(Fr(t))}function DO(t,e,r){r===void 0&&(r=!1);const n=Hi(t),i=Mc(t),s=$c(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=ja(o)),[o,ja(o)]}function IO(t){const e=ja(t);return[Fc(t),e,Fc(e)]}function Fc(t){return t.replace(/start|end/g,e=>TO[e])}const Hm=["left","right"],Ym=["right","left"],PO=["top","bottom"],$O=["bottom","top"];function MO(t,e,r){switch(t){case"top":case"bottom":return r?e?Ym:Hm:e?Hm:Ym;case"left":case"right":return e?PO:$O;default:return[]}}function FO(t,e,r,n){const i=Hi(t);let s=MO(an(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Fc)))),s}function ja(t){return t.replace(/left|right|bottom|top/g,e=>OO[e])}function NO(t){return{top:0,right:0,bottom:0,left:0,...t}}function Gm(t){return typeof t!="number"?NO(t):{top:t,right:t,bottom:t,left:t}}function Ba(t){const{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Jm(t,e,r){let{reference:n,floating:i}=t;const s=Fr(e),o=Mc(e),a=$c(o),l=an(e),u=s==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Hi(e)){case"start":p[o]-=f*(r&&u?-1:1);break;case"end":p[o]+=f*(r&&u?-1:1);break}return p}async function RO(t,e){var r;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=on(e,t),v=Gm(p),m=a[f?d==="floating"?"reference":"floating":d],_=Ba(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),k=d==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),O=await(s.isElement==null?void 0:s.isElement(D))?await(s.getScale==null?void 0:s.getScale(D))||{x:1,y:1}:{x:1,y:1},P=Ba(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:D,strategy:l}):k);return{top:(_.top-P.top+v.top)/O.y,bottom:(P.bottom-_.bottom+v.bottom)/O.y,left:(_.left-P.left+v.left)/O.x,right:(P.right-_.right+v.right)/O.x}}const zO=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=Jm(u,n,l),f=n,p={},v=0;for(let m=0;m<a.length;m++){var g;const{name:_,fn:k}=a[m],{x:D,y:O,data:P,reset:C}=await k({x:c,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:u,platform:{...o,detectOverflow:(g=o.detectOverflow)!=null?g:RO},elements:{reference:t,floating:e}});c=D??c,d=O??d,p={...p,[_]:{...p[_],...P}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:c,y:d}=Jm(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}},LO=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=on(t,e)||{};if(u==null)return{};const d=Gm(c),f={x:r,y:n},p=Mc(i),v=$c(p),g=await o.getDimensions(u),m=p==="y",_=m?"top":"left",k=m?"bottom":"right",D=m?"clientHeight":"clientWidth",O=s.reference[v]+s.reference[p]-f[p]-s.floating[v],P=f[p]-s.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let A=C?C[D]:0;(!A||!await(o.isElement==null?void 0:o.isElement(C)))&&(A=a.floating[D]||s.floating[v]);const N=O/2-P/2,M=A/2-g[v]/2-1,j=zn(d[_],M),se=zn(d[k],M),z=j,ue=A-g[v]-se,ne=A/2-g[v]/2+N,W=Ic(z,ne,ue),G=!l.arrow&&Hi(i)!=null&&ne!==W&&s.reference[v]/2-(ne<z?j:se)-g[v]/2<0,H=G?ne<z?ne-z:ne-ue:0;return{[p]:f[p]+H,data:{[p]:W,centerOffset:ne-W-H,...G&&{alignmentOffset:H}},reset:G}}}),ZO=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...m}=on(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=an(i),k=Fr(a),D=an(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=f||(D||!g?[ja(a)]:IO(a)),C=v!=="none";!f&&C&&P.push(...FO(a,g,v,O));const A=[a,...P],N=await l.detectOverflow(e,m),M=[];let j=((n=s.flip)==null?void 0:n.overflows)||[];if(c&&M.push(N[_]),d){const ne=DO(i,o,O);M.push(N[ne[0]],N[ne[1]])}if(j=[...j,{placement:i,overflows:M}],!M.every(ne=>ne<=0)){var se,z;const ne=(((se=s.flip)==null?void 0:se.index)||0)+1,W=A[ne];if(W&&(!(d==="alignment"?k!==Fr(W):!1)||j.every(U=>Fr(U.placement)===k?U.overflows[0]>0:!0)))return{data:{index:ne,overflows:j},reset:{placement:W}};let G=(z=j.filter(H=>H.overflows[0]<=0).sort((H,U)=>H.overflows[1]-U.overflows[1])[0])==null?void 0:z.placement;if(!G)switch(p){case"bestFit":{var ue;const H=(ue=j.filter(U=>{if(C){const Y=Fr(U.placement);return Y===k||Y==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Y=>Y>0).reduce((Y,le)=>Y+le,0)]).sort((U,Y)=>U[1]-Y[1])[0])==null?void 0:ue[0];H&&(G=H);break}case"initialPlacement":G=a;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function Qm(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Xm(t){return CO.some(e=>t[e]>=0)}const VO=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:i="referenceHidden",...s}=on(t,e);switch(i){case"referenceHidden":{const o=await n.detectOverflow(e,{...s,elementContext:"reference"}),a=Qm(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Xm(a)}}}case"escaped":{const o=await n.detectOverflow(e,{...s,altBoundary:!0}),a=Qm(o,r.floating);return{data:{escapedOffsets:a,escaped:Xm(a)}}}default:return{}}}}},eg=new Set(["left","top"]);async function jO(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=an(r),a=Hi(r),l=Fr(r)==="y",u=eg.has(o)?-1:1,c=s&&l?-1:1,d=on(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const BO=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await jO(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},UO=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:_=>{let{x:k,y:D}=_;return{x:k,y:D}}},...u}=on(t,e),c={x:r,y:n},d=await s.detectOverflow(e,u),f=Fr(an(i)),p=Pc(f);let v=c[p],g=c[f];if(o){const _=p==="y"?"top":"left",k=p==="y"?"bottom":"right",D=v+d[_],O=v-d[k];v=Ic(D,v,O)}if(a){const _=f==="y"?"top":"left",k=f==="y"?"bottom":"right",D=g+d[_],O=g-d[k];g=Ic(D,g,O)}const m=l.fn({...e,[p]:v,[f]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[f]:a}}}}}},qO=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=on(t,e),c={x:r,y:n},d=Fr(i),f=Pc(d);let p=c[f],v=c[d];const g=on(a,e),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const D=f==="y"?"height":"width",O=s.reference[f]-s.floating[D]+m.mainAxis,P=s.reference[f]+s.reference[D]-m.mainAxis;p<O?p=O:p>P&&(p=P)}if(u){var _,k;const D=f==="y"?"width":"height",O=eg.has(an(i)),P=s.reference[d]-s.floating[D]+(O&&((_=o.offset)==null?void 0:_[d])||0)+(O?0:m.crossAxis),C=s.reference[d]+s.reference[D]+(O?0:((k=o.offset)==null?void 0:k[d])||0)-(O?m.crossAxis:0);v<P?v=P:v>C&&(v=C)}return{[f]:p,[d]:v}}}},WO=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...u}=on(t,e),c=await o.detectOverflow(e,u),d=an(i),f=Hi(i),p=Fr(i)==="y",{width:v,height:g}=s.floating;let m,_;d==="top"||d==="bottom"?(m=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=d,m=f==="end"?"top":"bottom");const k=g-c.top-c.bottom,D=v-c.left-c.right,O=zn(g-c[m],k),P=zn(v-c[_],D),C=!e.middlewareData.shift;let A=O,N=P;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(N=D),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(A=k),C&&!f){const j=Ut(c.left,0),se=Ut(c.right,0),z=Ut(c.top,0),ue=Ut(c.bottom,0);p?N=v-2*(j!==0||se!==0?j+se:Ut(c.left,c.right)):A=g-2*(z!==0||ue!==0?z+ue:Ut(c.top,c.bottom))}await l({...e,availableWidth:N,availableHeight:A});const M=await o.getDimensions(a.floating);return v!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Ua(){return typeof window<"u"}function Yi(t){return tg(t)?(t.nodeName||"").toLowerCase():"#document"}function qt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Nr(t){var e;return(e=(tg(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function tg(t){return Ua()?t instanceof Node||t instanceof qt(t).Node:!1}function pr(t){return Ua()?t instanceof Element||t instanceof qt(t).Element:!1}function Rr(t){return Ua()?t instanceof HTMLElement||t instanceof qt(t).HTMLElement:!1}function rg(t){return!Ua()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof qt(t).ShadowRoot}const KO=new Set(["inline","contents"]);function ho(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=mr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!KO.has(i)}const HO=new Set(["table","td","th"]);function YO(t){return HO.has(Yi(t))}const GO=[":popover-open",":modal"];function qa(t){return GO.some(e=>{try{return t.matches(e)}catch{return!1}})}const JO=["transform","translate","scale","rotate","perspective"],QO=["transform","translate","scale","rotate","perspective","filter"],XO=["paint","layout","strict","content"];function Nc(t){const e=Rc(),r=pr(t)?mr(t):t;return JO.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||QO.some(n=>(r.willChange||"").includes(n))||XO.some(n=>(r.contain||"").includes(n))}function eT(t){let e=Ln(t);for(;Rr(e)&&!Gi(e);){if(Nc(e))return e;if(qa(e))return null;e=Ln(e)}return null}function Rc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tT=new Set(["html","body","#document"]);function Gi(t){return tT.has(Yi(t))}function mr(t){return qt(t).getComputedStyle(t)}function Wa(t){return pr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(Yi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||rg(t)&&t.host||Nr(t);return rg(e)?e.host:e}function ng(t){const e=Ln(t);return Gi(e)?t.ownerDocument?t.ownerDocument.body:t.body:Rr(e)&&ho(e)?e:ng(e)}function po(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=ng(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=qt(i);if(s){const a=zc(o);return e.concat(o,o.visualViewport||[],ho(i)?i:[],a&&r?po(a):[])}return e.concat(i,po(i,[],r))}function zc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ig(t){const e=mr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Rr(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Za(r)!==s||Za(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Lc(t){return pr(t)?t:t.contextElement}function Ji(t){const e=Lc(t);if(!Rr(e))return Mr(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=ig(e);let o=(s?Za(r.width):r.width)/n,a=(s?Za(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const rT=Mr(0);function sg(t){const e=qt(t);return!Rc()||!e.visualViewport?rT:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nT(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==qt(t)?!1:e}function ci(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Lc(t);let o=Mr(1);e&&(n?pr(n)&&(o=Ji(n)):o=Ji(t));const a=nT(s,r,n)?sg(s):Mr(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=qt(s),p=n&&pr(n)?qt(n):n;let v=f,g=zc(v);for(;g&&n&&p!==v;){const m=Ji(g),_=g.getBoundingClientRect(),k=mr(g),D=_.left+(g.clientLeft+parseFloat(k.paddingLeft))*m.x,O=_.top+(g.clientTop+parseFloat(k.paddingTop))*m.y;l*=m.x,u*=m.y,c*=m.x,d*=m.y,l+=D,u+=O,v=qt(g),g=zc(v)}}return Ba({width:c,height:d,x:l,y:u})}function Ka(t,e){const r=Wa(t).scrollLeft;return e?e.left+r:ci(Nr(t)).left+r}function og(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Ka(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function iT(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t;const s=i==="fixed",o=Nr(n),a=e?qa(e.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},u=Mr(1);const c=Mr(0),d=Rr(n);if((d||!d&&!s)&&((Yi(n)!=="body"||ho(o))&&(l=Wa(n)),Rr(n))){const p=ci(n);u=Ji(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const f=o&&!d&&!s?og(o,l):Mr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function sT(t){return Array.from(t.getClientRects())}function oT(t){const e=Nr(t),r=Wa(t),n=t.ownerDocument.body,i=Ut(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Ut(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Ka(t);const a=-r.scrollTop;return mr(n).direction==="rtl"&&(o+=Ut(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}const ag=25;function aT(t,e){const r=qt(t),n=Nr(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=Rc();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Ka(n);if(u<=0){const c=n.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(n.clientWidth-d.clientWidth-p);v<=ag&&(s-=v)}else u<=ag&&(s+=u);return{width:s,height:o,x:a,y:l}}const lT=new Set(["absolute","fixed"]);function uT(t,e){const r=ci(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=Rr(t)?Ji(t):Mr(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,u=n*s.y;return{width:o,height:a,x:l,y:u}}function lg(t,e,r){let n;if(e==="viewport")n=aT(t,r);else if(e==="document")n=oT(Nr(t));else if(pr(e))n=uT(e,r);else{const i=sg(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ba(n)}function ug(t,e){const r=Ln(t);return r===e||!pr(r)||Gi(r)?!1:mr(r).position==="fixed"||ug(r,e)}function cT(t,e){const r=e.get(t);if(r)return r;let n=po(t,[],!1).filter(a=>pr(a)&&Yi(a)!=="body"),i=null;const s=mr(t).position==="fixed";let o=s?Ln(t):t;for(;pr(o)&&!Gi(o);){const a=mr(o),l=Nc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&lT.has(i.position)||ho(o)&&!l&&ug(t,o))?n=n.filter(c=>c!==o):i=a,o=Ln(o)}return e.set(t,n),n}function dT(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?qa(e)?[]:cT(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const d=lg(e,c,i);return u.top=Ut(d.top,u.top),u.right=zn(d.right,u.right),u.bottom=zn(d.bottom,u.bottom),u.left=Ut(d.left,u.left),u},lg(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fT(t){const{width:e,height:r}=ig(t);return{width:e,height:r}}function hT(t,e,r){const n=Rr(e),i=Nr(e),s=r==="fixed",o=ci(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Mr(0);function u(){l.x=Ka(i)}if(n||!n&&!s)if((Yi(e)!=="body"||ho(i))&&(a=Wa(e)),n){const p=ci(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else i&&u();s&&!n&&i&&u();const c=i&&!n&&!s?og(i,a):Mr(0),d=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:o.width,height:o.height}}function Zc(t){return mr(t).position==="static"}function cg(t,e){if(!Rr(t)||mr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Nr(t)===r&&(r=r.ownerDocument.body),r}function dg(t,e){const r=qt(t);if(qa(t))return r;if(!Rr(t)){let i=Ln(t);for(;i&&!Gi(i);){if(pr(i)&&!Zc(i))return i;i=Ln(i)}return r}let n=cg(t,e);for(;n&&YO(n)&&Zc(n);)n=cg(n,e);return n&&Gi(n)&&Zc(n)&&!Nc(n)?r:n||eT(t)||r}const pT=async function(t){const e=this.getOffsetParent||dg,r=this.getDimensions,n=await r(t.floating);return{reference:hT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mT(t){return mr(t).direction==="rtl"}const gT={convertOffsetParentRelativeRectToViewportRelativeRect:iT,getDocumentElement:Nr,getClippingRect:dT,getOffsetParent:dg,getElementRects:pT,getClientRects:sT,getDimensions:fT,getScale:Ji,isElement:pr,isRTL:mT};function fg(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function vT(t,e){let r=null,n;const i=Nr(t);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=t.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(a||e(),!f||!p)return;const v=Va(d),g=Va(i.clientWidth-(c+f)),m=Va(i.clientHeight-(d+p)),_=Va(c),D={rootMargin:-v+"px "+-g+"px "+-m+"px "+-_+"px",threshold:Ut(0,zn(1,l))||1};let O=!0;function P(C){const A=C[0].intersectionRatio;if(A!==l){if(!O)return o();A?o(!1,A):n=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!fg(u,t.getBoundingClientRect())&&o(),O=!1}try{r=new IntersectionObserver(P,{...D,root:i.ownerDocument})}catch{r=new IntersectionObserver(P,D)}r.observe(t)}return o(!0),s}function yT(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Lc(t),c=i||s?[...u?po(u):[],...po(e)]:[];c.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const d=u&&a?vT(u,r):null;let f=-1,p=null;o&&(p=new ResizeObserver(_=>{let[k]=_;k&&k.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var D;(D=p)==null||D.observe(e)})),r()}),u&&!l&&p.observe(u),p.observe(e));let v,g=l?ci(t):null;l&&m();function m(){const _=ci(t);g&&!fg(g,_)&&r(),g=_,v=requestAnimationFrame(m)}return r(),()=>{var _;c.forEach(k=>{i&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),d?.(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const bT=BO,_T=UO,wT=ZO,kT=WO,ST=VO,xT=LO,ET=qO,CT=(t,e,r)=>{const n=new Map,i={platform:gT,...r},s={...i.platform,_c:n};return zO(t,e,{...i,platform:s})};function di(t){return typeof t=="function"?t():t}function hg(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pg(t,e){const r=hg(t);return Math.round(e*r)/r}function mg(t){return{[`--bits-${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${t}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${t}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${t}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function OT(t){const e=t.whileElementsMounted,r=E(()=>di(t.open)??!0),n=E(()=>di(t.middleware)),i=E(()=>di(t.transform)??!0),s=E(()=>di(t.placement)??"bottom"),o=E(()=>di(t.strategy)??"absolute"),a=E(()=>di(t.sideOffset)??0),l=E(()=>di(t.alignOffset)??0),u=t.reference;let c=ie(0),d=ie(0);const f=cr(null);let p=ie(Ne(h(o))),v=ie(Ne(h(s))),g=ie(Ne({})),m=ie(!1);const _=E(()=>{const A=f.current?pg(f.current,h(c)):h(c),N=f.current?pg(f.current,h(d)):h(d);return h(i)?{position:h(p),left:"0",top:"0",transform:`translate(${A}px, ${N}px)`,...f.current&&hg(f.current)>=1.5&&{willChange:"transform"}}:{position:h(p),left:`${A}px`,top:`${N}px`}});let k;function D(){u.current===null||f.current===null||CT(u.current,f.current,{middleware:h(n),placement:h(s),strategy:h(o)}).then(A=>{if(!h(r)&&h(c)!==0&&h(d)!==0){const N=Math.max(Math.abs(h(a)),Math.abs(h(l)),15);if(A.x<=N&&A.y<=N)return}I(c,A.x,!0),I(d,A.y,!0),I(p,A.strategy,!0),I(v,A.placement,!0),I(g,A.middlewareData,!0),I(m,!0)})}function O(){typeof k=="function"&&(k(),k=void 0)}function P(){if(O(),e===void 0){D();return}u.current===null||f.current===null||(k=e(u.current,f.current,D))}function C(){h(r)||I(m,!1)}return pe(D),pe(P),pe(C),pe(()=>O),{floating:f,reference:u,get strategy(){return h(p)},get placement(){return h(v)},get middlewareData(){return h(g)},get isPositioned(){return h(m)},get floatingStyles(){return h(_)},get update(){return D}}}const TT={top:"bottom",right:"left",bottom:"top",left:"right"},Vc=new nn("Floating.Root"),gg=new nn("Floating.Content"),jc=new nn("Floating.Root");class Ha{static create(e=!1){return e?jc.set(new Ha):Vc.set(new Ha)}anchorNode=cr(null);customAnchorNode=cr(null);triggerNode=cr(null);constructor(){pe(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class Ya{static create(e,r=!1){return r?gg.set(new Ya(e,jc.get())):gg.set(new Ya(e,Vc.get()))}opts;root;contentRef=cr(null);wrapperRef=cr(null);arrowRef=cr(null);contentAttachment=et(this.contentRef);wrapperAttachment=et(this.wrapperRef);arrowAttachment=et(this.arrowRef);arrowId=cr(Rn());#e=E(()=>{if(typeof this.opts.style=="string")return Js(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new yE(()=>this.arrowRef.current??void 0);#n=E(()=>this.#r?.width??0);#i=E(()=>this.#r?.height??0);#s=E(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=E(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=E(()=>h(this.#a).length>0);get hasExplicitBoundaries(){return h(this.#o)}set hasExplicitBoundaries(e){I(this.#o,e)}#l=E(()=>({padding:this.opts.collisionPadding.current,boundary:h(this.#a).filter(PE),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return h(this.#l)}set detectOverflowOptions(e){I(this.#l,e)}#u=ie(void 0);#d=ie(void 0);#c=ie(void 0);#f=ie(void 0);#h=E(()=>[bT({mainAxis:this.opts.sideOffset.current+h(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&_T({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?ET():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&wT({...this.detectOverflowOptions}),kT({...this.detectOverflowOptions,apply:({rects:e,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=e.reference;I(this.#u,r,!0),I(this.#d,n,!0),I(this.#c,i,!0),I(this.#f,s,!0)}}),this.arrowRef.current&&xT({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),AT({arrowWidth:h(this.#n),arrowHeight:h(this.#i)}),this.opts.hideWhenDetached.current&&ST({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return h(this.#h)}set middleware(e){I(this.#h,e)}floating;#p=E(()=>DT(this.floating.placement));get placedSide(){return h(this.#p)}set placedSide(e){I(this.#p,e)}#m=E(()=>IT(this.floating.placement));get placedAlign(){return h(this.#m)}set placedAlign(e){I(this.#m,e)}#g=E(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return h(this.#g)}set arrowX(e){I(this.#g,e)}#v=E(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return h(this.#v)}set arrowY(e){I(this.#v,e)}#y=E(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return h(this.#y)}set cannotCenterArrow(e){I(this.#y,e)}#b=ie();get contentZIndex(){return h(this.#b)}set contentZIndex(e){I(this.#b,e,!0)}#k=E(()=>TT[this.placedSide]);get arrowBaseSide(){return h(this.#k)}set arrowBaseSide(e){I(this.#k,e)}#_=E(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${h(this.#u)}px`,"--bits-floating-available-height":`${h(this.#d)}px`,"--bits-floating-anchor-width":`${h(this.#c)}px`,"--bits-floating-anchor-height":`${h(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...h(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return h(this.#_)}set wrapperProps(e){I(this.#_,e)}#w=E(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Xs({...h(this.#e)}),...this.contentAttachment}));get props(){return h(this.#w)}set props(e){I(this.#w,e)}#S=E(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return h(this.#S)}set arrowStyle(e){I(this.#S,e)}constructor(e,r){this.opts=e,this.root=r,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),it(()=>e.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=OT({strategy:()=>this.opts.strategy.current,placement:()=>h(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>yT(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),pe(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),it(()=>this.contentRef.current,n=>{if(!n)return;const i=nm(n);this.contentZIndex=i.getComputedStyle(n).zIndex}),pe(()=>{this.floating.floating.current=this.wrapperRef.current})}}class Ga{static create(e,r=!1){return r?new Ga(e,jc.get()):new Ga(e,Vc.get())}opts;root;constructor(e,r){this.opts=e,this.root=r,e.virtualEl&&e.virtualEl.current?r.triggerNode=Z1(e.virtualEl.current):r.triggerNode=e.ref}}function AT(t){return{name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:i}=e,o=i.arrow?.centerOffset!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=Bc(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+l/2;let v="",g="";return u==="bottom"?(v=o?d:`${f}px`,g=`${-l}px`):u==="top"?(v=o?d:`${f}px`,g=`${n.floating.height+l}px`):u==="right"?(v=`${-l}px`,g=o?d:`${p}px`):u==="left"&&(v=`${n.floating.width+l}px`,g=o?d:`${p}px`),{data:{x:v,y:g}}}}}function Bc(t){const[e,r="center"]=t.split("-");return[e,r]}function DT(t){return Bc(t)[0]}function IT(t){return Bc(t)[1]}function vg(t,e){X(e,!0);let r=b(e,"children",7),n=b(e,"tooltip",7,!1);Ha.create(n());var i={get children(){return r()},set children(a){r(a),y()},get tooltip(){return n()},set tooltip(a=!1){n(a),y()}},s=q(),o=R(s);return ve(o,()=>r()??Fe),w(t,s),ee(i)}re(vg,{children:{},tooltip:{}},[],[],{mode:"open"});function yg(t,e){X(e,!0);let r=b(e,"id",7),n=b(e,"children",7),i=b(e,"virtualEl",7),s=b(e,"ref",7),o=b(e,"tooltip",7,!1);Ga.create({id:F(()=>r()),virtualEl:F(()=>i()),ref:s()},o());var a={get id(){return r()},set id(c){r(c),y()},get children(){return n()},set children(c){n(c),y()},get virtualEl(){return i()},set virtualEl(c){i(c),y()},get ref(){return s()},set ref(c){s(c),y()},get tooltip(){return o()},set tooltip(c=!1){o(c),y()}},l=q(),u=R(l);return ve(u,()=>n()??Fe),w(t,l),ee(a)}re(yg,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function bg(t,e){X(e,!0);let r=b(e,"content",7),n=b(e,"side",7,"bottom"),i=b(e,"sideOffset",7,0),s=b(e,"align",7,"center"),o=b(e,"alignOffset",7,0),a=b(e,"id",7),l=b(e,"arrowPadding",7,0),u=b(e,"avoidCollisions",7,!0),c=b(e,"collisionBoundary",23,()=>[]),d=b(e,"collisionPadding",7,0),f=b(e,"hideWhenDetached",7,!1),p=b(e,"onPlaced",7,()=>{}),v=b(e,"sticky",7,"partial"),g=b(e,"updatePositionStrategy",7,"optimized"),m=b(e,"strategy",7,"fixed"),_=b(e,"dir",7,"ltr"),k=b(e,"style",23,()=>({})),D=b(e,"wrapperId",23,Rn),O=b(e,"customAnchor",7,null),P=b(e,"enabled",7),C=b(e,"tooltip",7,!1);const A=Ya.create({side:F(()=>n()),sideOffset:F(()=>i()),align:F(()=>s()),alignOffset:F(()=>o()),id:F(()=>a()),arrowPadding:F(()=>l()),avoidCollisions:F(()=>u()),collisionBoundary:F(()=>c()),collisionPadding:F(()=>d()),hideWhenDetached:F(()=>f()),onPlaced:F(()=>p()),sticky:F(()=>v()),updatePositionStrategy:F(()=>g()),strategy:F(()=>m()),dir:F(()=>_()),style:F(()=>k()),enabled:F(()=>P()),wrapperId:F(()=>D()),customAnchor:F(()=>O())},C()),N=E(()=>Ke(A.wrapperProps,{style:{pointerEvents:"auto"}}));var M={get content(){return r()},set content(z){r(z),y()},get side(){return n()},set side(z="bottom"){n(z),y()},get sideOffset(){return i()},set sideOffset(z=0){i(z),y()},get align(){return s()},set align(z="center"){s(z),y()},get alignOffset(){return o()},set alignOffset(z=0){o(z),y()},get id(){return a()},set id(z){a(z),y()},get arrowPadding(){return l()},set arrowPadding(z=0){l(z),y()},get avoidCollisions(){return u()},set avoidCollisions(z=!0){u(z),y()},get collisionBoundary(){return c()},set collisionBoundary(z=[]){c(z),y()},get collisionPadding(){return d()},set collisionPadding(z=0){d(z),y()},get hideWhenDetached(){return f()},set hideWhenDetached(z=!1){f(z),y()},get onPlaced(){return p()},set onPlaced(z=()=>{}){p(z),y()},get sticky(){return v()},set sticky(z="partial"){v(z),y()},get updatePositionStrategy(){return g()},set updatePositionStrategy(z="optimized"){g(z),y()},get strategy(){return m()},set strategy(z="fixed"){m(z),y()},get dir(){return _()},set dir(z="ltr"){_(z),y()},get style(){return k()},set style(z={}){k(z),y()},get wrapperId(){return D()},set wrapperId(z=Rn()){D(z),y()},get customAnchor(){return O()},set customAnchor(z=null){O(z),y()},get enabled(){return P()},set enabled(z){P(z),y()},get tooltip(){return C()},set tooltip(z=!1){C(z),y()}},j=q(),se=R(j);return ve(se,()=>r()??Fe,()=>({props:A.props,wrapperProps:h(N)})),w(t,j),ee(M)}re(bg,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function _g(t,e){X(e,!0);let r=b(e,"content",7),n=b(e,"onPlaced",7);Hr(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),y()},get onPlaced(){return n()},set onPlaced(a){n(a),y()}},s=q(),o=R(s);return ve(o,()=>r()??Fe,()=>({props:{},wrapperProps:{}})),w(t,s),ee(i)}re(_g,{content:{},onPlaced:{}},[],[],{mode:"open"});function wg(t,e){X(e,!0);let r=b(e,"content",7),n=b(e,"isStatic",7,!1),i=b(e,"onPlaced",7),s=Ue(e,["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);var o={get content(){return r()},set content(d){r(d),y()},get isStatic(){return n()},set isStatic(d=!1){n(d),y()},get onPlaced(){return i()},set onPlaced(d){i(d),y()}},a=q(),l=R(a);{var u=d=>{_g(d,{get content(){return r()},get onPlaced(){return i()}})},c=d=>{bg(d,xn({get content(){return r()},get onPlaced(){return i()}},()=>s))};ae(l,d=>{n()?d(u):d(c,!1)})}return w(t,a),ee(o)}re(wg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var PT=V("<!> <!>",1);function Uc(t,e){X(e,!0);let r=b(e,"popper",7),n=b(e,"onEscapeKeydown",7),i=b(e,"escapeKeydownBehavior",7),s=b(e,"preventOverflowTextSelection",7),o=b(e,"id",7),a=b(e,"onPointerDown",7),l=b(e,"onPointerUp",7),u=b(e,"side",7),c=b(e,"sideOffset",7),d=b(e,"align",7),f=b(e,"alignOffset",7),p=b(e,"arrowPadding",7),v=b(e,"avoidCollisions",7),g=b(e,"collisionBoundary",7),m=b(e,"collisionPadding",7),_=b(e,"sticky",7),k=b(e,"hideWhenDetached",7),D=b(e,"updatePositionStrategy",7),O=b(e,"strategy",7),P=b(e,"dir",7),C=b(e,"preventScroll",7),A=b(e,"wrapperId",7),N=b(e,"style",7),M=b(e,"onPlaced",7),j=b(e,"onInteractOutside",7),se=b(e,"onCloseAutoFocus",7),z=b(e,"onOpenAutoFocus",7),ue=b(e,"onFocusOutside",7),ne=b(e,"interactOutsideBehavior",7,"close"),W=b(e,"loop",7),G=b(e,"trapFocus",7,!0),H=b(e,"isValidEvent",7,()=>!1),U=b(e,"customAnchor",7,null),Y=b(e,"isStatic",7,!1),le=b(e,"enabled",7),ce=b(e,"ref",7),me=b(e,"tooltip",7,!1),Z=b(e,"contentPointerEvents",7,"auto"),ge=Ue(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);var B={get popper(){return r()},set popper(L){r(L),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(L){n(L),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(L){i(L),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(L){s(L),y()},get id(){return o()},set id(L){o(L),y()},get onPointerDown(){return a()},set onPointerDown(L){a(L),y()},get onPointerUp(){return l()},set onPointerUp(L){l(L),y()},get side(){return u()},set side(L){u(L),y()},get sideOffset(){return c()},set sideOffset(L){c(L),y()},get align(){return d()},set align(L){d(L),y()},get alignOffset(){return f()},set alignOffset(L){f(L),y()},get arrowPadding(){return p()},set arrowPadding(L){p(L),y()},get avoidCollisions(){return v()},set avoidCollisions(L){v(L),y()},get collisionBoundary(){return g()},set collisionBoundary(L){g(L),y()},get collisionPadding(){return m()},set collisionPadding(L){m(L),y()},get sticky(){return _()},set sticky(L){_(L),y()},get hideWhenDetached(){return k()},set hideWhenDetached(L){k(L),y()},get updatePositionStrategy(){return D()},set updatePositionStrategy(L){D(L),y()},get strategy(){return O()},set strategy(L){O(L),y()},get dir(){return P()},set dir(L){P(L),y()},get preventScroll(){return C()},set preventScroll(L){C(L),y()},get wrapperId(){return A()},set wrapperId(L){A(L),y()},get style(){return N()},set style(L){N(L),y()},get onPlaced(){return M()},set onPlaced(L){M(L),y()},get onInteractOutside(){return j()},set onInteractOutside(L){j(L),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(L){se(L),y()},get onOpenAutoFocus(){return z()},set onOpenAutoFocus(L){z(L),y()},get onFocusOutside(){return ue()},set onFocusOutside(L){ue(L),y()},get interactOutsideBehavior(){return ne()},set interactOutsideBehavior(L="close"){ne(L),y()},get loop(){return W()},set loop(L){W(L),y()},get trapFocus(){return G()},set trapFocus(L=!0){G(L),y()},get isValidEvent(){return H()},set isValidEvent(L=()=>!1){H(L),y()},get customAnchor(){return U()},set customAnchor(L=null){U(L),y()},get isStatic(){return Y()},set isStatic(L=!1){Y(L),y()},get enabled(){return le()},set enabled(L){le(L),y()},get ref(){return ce()},set ref(L){ce(L),y()},get tooltip(){return me()},set tooltip(L=!1){me(L),y()},get contentPointerEvents(){return Z()},set contentPointerEvents(L="auto"){Z(L),y()}};return wg(t,{get isStatic(){return Y()},get id(){return o()},get side(){return u()},get sideOffset(){return c()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return v()},get collisionBoundary(){return g()},get collisionPadding(){return m()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return D()},get strategy(){return O()},get dir(){return P()},get wrapperId(){return A()},get style(){return N()},get onPlaced(){return M()},get customAnchor(){return U()},get enabled(){return le()},get tooltip(){return me()},content:(be,x)=>{let tt=()=>x?.().props,Be=()=>x?.().wrapperProps;var We=PT(),Ct=R(We);{var rt=Wt=>{ec(Wt,{get preventScroll(){return C()}})},hn=Wt=>{var yr=q(),vi=R(yr);{var br=_r=>{ec(_r,{get preventScroll(){return C()}})};ae(vi,_r=>{e.forceMount||_r(br)},!0)}w(Wt,yr)};ae(Ct,Wt=>{e.forceMount&&le()?Wt(rt):Wt(hn,!1)})}var vr=J(Ct,2);xm(vr,{get onOpenAutoFocus(){return z()},get onCloseAutoFocus(){return se()},get loop(){return W()},get enabled(){return le()},get trapFocus(){return G()},get forceMount(){return e.forceMount},get ref(){return ce()},focusScope:(yr,vi)=>{let br=()=>vi?.().props;Sm(yr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return le()},get ref(){return ce()},children:(_r,ls)=>{km(_r,{get id(){return o()},get onInteractOutside(){return j()},get onFocusOutside(){return ue()},get interactOutsideBehavior(){return ne()},get isValidEvent(){return H()},get enabled(){return le()},get ref(){return ce()},children:(pn,yi)=>{let Vn=()=>yi?.().props;Cm(pn,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return le()},get ref(){return ce()},children:(jn,vd)=>{var ol=q(),bi=R(ol);{let yd=E(()=>({props:Ke(ge,tt(),Vn(),br(),{style:{pointerEvents:Z()}}),wrapperProps:Be()}));ve(bi,()=>r()??Fe,()=>h(yd))}w(jn,ol)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),w(be,We)},$$slots:{content:!0}}),ee(B)}re(Uc,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:"open"});function kg(t,e){X(e,!0);let r=b(e,"popper",7),n=b(e,"open",7),i=b(e,"onEscapeKeydown",7),s=b(e,"escapeKeydownBehavior",7),o=b(e,"preventOverflowTextSelection",7),a=b(e,"id",7),l=b(e,"onPointerDown",7),u=b(e,"onPointerUp",7),c=b(e,"side",7),d=b(e,"sideOffset",7),f=b(e,"align",7),p=b(e,"alignOffset",7),v=b(e,"arrowPadding",7),g=b(e,"avoidCollisions",7),m=b(e,"collisionBoundary",7),_=b(e,"collisionPadding",7),k=b(e,"sticky",7),D=b(e,"hideWhenDetached",7),O=b(e,"updatePositionStrategy",7),P=b(e,"strategy",7),C=b(e,"dir",7),A=b(e,"preventScroll",7),N=b(e,"wrapperId",7),M=b(e,"style",7),j=b(e,"onPlaced",7),se=b(e,"onInteractOutside",7),z=b(e,"onCloseAutoFocus",7),ue=b(e,"onOpenAutoFocus",7),ne=b(e,"onFocusOutside",7),W=b(e,"interactOutsideBehavior",7,"close"),G=b(e,"loop",7),H=b(e,"trapFocus",7,!0),U=b(e,"isValidEvent",7,()=>!1),Y=b(e,"customAnchor",7,null),le=b(e,"isStatic",7,!1),ce=b(e,"ref",7),me=b(e,"shouldRender",7),Z=Ue(e,["$$slots","$$events","$$legacy","$$host","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var ge={get popper(){return r()},set popper(x){r(x),y()},get open(){return n()},set open(x){n(x),y()},get onEscapeKeydown(){return i()},set onEscapeKeydown(x){i(x),y()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(x){s(x),y()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(x){o(x),y()},get id(){return a()},set id(x){a(x),y()},get onPointerDown(){return l()},set onPointerDown(x){l(x),y()},get onPointerUp(){return u()},set onPointerUp(x){u(x),y()},get side(){return c()},set side(x){c(x),y()},get sideOffset(){return d()},set sideOffset(x){d(x),y()},get align(){return f()},set align(x){f(x),y()},get alignOffset(){return p()},set alignOffset(x){p(x),y()},get arrowPadding(){return v()},set arrowPadding(x){v(x),y()},get avoidCollisions(){return g()},set avoidCollisions(x){g(x),y()},get collisionBoundary(){return m()},set collisionBoundary(x){m(x),y()},get collisionPadding(){return _()},set collisionPadding(x){_(x),y()},get sticky(){return k()},set sticky(x){k(x),y()},get hideWhenDetached(){return D()},set hideWhenDetached(x){D(x),y()},get updatePositionStrategy(){return O()},set updatePositionStrategy(x){O(x),y()},get strategy(){return P()},set strategy(x){P(x),y()},get dir(){return C()},set dir(x){C(x),y()},get preventScroll(){return A()},set preventScroll(x){A(x),y()},get wrapperId(){return N()},set wrapperId(x){N(x),y()},get style(){return M()},set style(x){M(x),y()},get onPlaced(){return j()},set onPlaced(x){j(x),y()},get onInteractOutside(){return se()},set onInteractOutside(x){se(x),y()},get onCloseAutoFocus(){return z()},set onCloseAutoFocus(x){z(x),y()},get onOpenAutoFocus(){return ue()},set onOpenAutoFocus(x){ue(x),y()},get onFocusOutside(){return ne()},set onFocusOutside(x){ne(x),y()},get interactOutsideBehavior(){return W()},set interactOutsideBehavior(x="close"){W(x),y()},get loop(){return G()},set loop(x){G(x),y()},get trapFocus(){return H()},set trapFocus(x=!0){H(x),y()},get isValidEvent(){return U()},set isValidEvent(x=()=>!1){U(x),y()},get customAnchor(){return Y()},set customAnchor(x=null){Y(x),y()},get isStatic(){return le()},set isStatic(x=!1){le(x),y()},get ref(){return ce()},set ref(x){ce(x),y()},get shouldRender(){return me()},set shouldRender(x){me(x),y()}},B=q(),L=R(B);{var be=x=>{Uc(x,xn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return o()},get id(){return a()},get onPointerDown(){return l()},get onPointerUp(){return u()},get side(){return c()},get sideOffset(){return d()},get align(){return f()},get alignOffset(){return p()},get arrowPadding(){return v()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return _()},get sticky(){return k()},get hideWhenDetached(){return D()},get updatePositionStrategy(){return O()},get strategy(){return P()},get dir(){return C()},get preventScroll(){return A()},get wrapperId(){return N()},get style(){return M()},get onPlaced(){return j()},get customAnchor(){return Y()},get isStatic(){return le()},get enabled(){return n()},get onInteractOutside(){return se()},get onCloseAutoFocus(){return z()},get onOpenAutoFocus(){return ue()},get interactOutsideBehavior(){return W()},get loop(){return G()},get trapFocus(){return H()},get isValidEvent(){return U()},get onFocusOutside(){return ne()},forceMount:!1,get ref(){return ce()}},()=>Z))};ae(L,x=>{me()&&x(be)})}return w(t,B),ee(ge)}re(kg,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:"open"});function Sg(t,e){X(e,!0);let r=b(e,"popper",7),n=b(e,"onEscapeKeydown",7),i=b(e,"escapeKeydownBehavior",7),s=b(e,"preventOverflowTextSelection",7),o=b(e,"id",7),a=b(e,"onPointerDown",7),l=b(e,"onPointerUp",7),u=b(e,"side",7),c=b(e,"sideOffset",7),d=b(e,"align",7),f=b(e,"alignOffset",7),p=b(e,"arrowPadding",7),v=b(e,"avoidCollisions",7),g=b(e,"collisionBoundary",7),m=b(e,"collisionPadding",7),_=b(e,"sticky",7),k=b(e,"hideWhenDetached",7),D=b(e,"updatePositionStrategy",7),O=b(e,"strategy",7),P=b(e,"dir",7),C=b(e,"preventScroll",7),A=b(e,"wrapperId",7),N=b(e,"style",7),M=b(e,"onPlaced",7),j=b(e,"onInteractOutside",7),se=b(e,"onCloseAutoFocus",7),z=b(e,"onOpenAutoFocus",7),ue=b(e,"onFocusOutside",7),ne=b(e,"interactOutsideBehavior",7,"close"),W=b(e,"loop",7),G=b(e,"trapFocus",7,!0),H=b(e,"isValidEvent",7,()=>!1),U=b(e,"customAnchor",7,null),Y=b(e,"isStatic",7,!1),le=b(e,"enabled",7),ce=Ue(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);var me={get popper(){return r()},set popper(Z){r(Z),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(Z){n(Z),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(Z){i(Z),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(Z){s(Z),y()},get id(){return o()},set id(Z){o(Z),y()},get onPointerDown(){return a()},set onPointerDown(Z){a(Z),y()},get onPointerUp(){return l()},set onPointerUp(Z){l(Z),y()},get side(){return u()},set side(Z){u(Z),y()},get sideOffset(){return c()},set sideOffset(Z){c(Z),y()},get align(){return d()},set align(Z){d(Z),y()},get alignOffset(){return f()},set alignOffset(Z){f(Z),y()},get arrowPadding(){return p()},set arrowPadding(Z){p(Z),y()},get avoidCollisions(){return v()},set avoidCollisions(Z){v(Z),y()},get collisionBoundary(){return g()},set collisionBoundary(Z){g(Z),y()},get collisionPadding(){return m()},set collisionPadding(Z){m(Z),y()},get sticky(){return _()},set sticky(Z){_(Z),y()},get hideWhenDetached(){return k()},set hideWhenDetached(Z){k(Z),y()},get updatePositionStrategy(){return D()},set updatePositionStrategy(Z){D(Z),y()},get strategy(){return O()},set strategy(Z){O(Z),y()},get dir(){return P()},set dir(Z){P(Z),y()},get preventScroll(){return C()},set preventScroll(Z){C(Z),y()},get wrapperId(){return A()},set wrapperId(Z){A(Z),y()},get style(){return N()},set style(Z){N(Z),y()},get onPlaced(){return M()},set onPlaced(Z){M(Z),y()},get onInteractOutside(){return j()},set onInteractOutside(Z){j(Z),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(Z){se(Z),y()},get onOpenAutoFocus(){return z()},set onOpenAutoFocus(Z){z(Z),y()},get onFocusOutside(){return ue()},set onFocusOutside(Z){ue(Z),y()},get interactOutsideBehavior(){return ne()},set interactOutsideBehavior(Z="close"){ne(Z),y()},get loop(){return W()},set loop(Z){W(Z),y()},get trapFocus(){return G()},set trapFocus(Z=!0){G(Z),y()},get isValidEvent(){return H()},set isValidEvent(Z=()=>!1){H(Z),y()},get customAnchor(){return U()},set customAnchor(Z=null){U(Z),y()},get isStatic(){return Y()},set isStatic(Z=!1){Y(Z),y()},get enabled(){return le()},set enabled(Z){le(Z),y()}};return Uc(t,xn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return o()},get onPointerDown(){return a()},get onPointerUp(){return l()},get side(){return u()},get sideOffset(){return c()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return v()},get collisionBoundary(){return g()},get collisionPadding(){return m()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return D()},get strategy(){return O()},get dir(){return P()},get preventScroll(){return C()},get wrapperId(){return A()},get style(){return N()},get onPlaced(){return M()},get customAnchor(){return U()},get isStatic(){return Y()},get enabled(){return le()},get onInteractOutside(){return j()},get onCloseAutoFocus(){return se()},get onOpenAutoFocus(){return z()},get interactOutsideBehavior(){return ne()},get loop(){return W()},get trapFocus(){return G()},get isValidEvent(){return H()},get onFocusOutside(){return ue()}},()=>ce,{forceMount:!0})),ee(me)}re(Sg,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:"open"});const Ja=_a({component:"date-field",parts:["input","label","segment"]}),Qi={day:{min:1,max:t=>{const e=t.segmentValues.month,r=t.value.current??t.placeholder.current;return oo(e?r.set({month:Number.parseInt(e)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(t,e)=>e.placeholder.current?`${t} - ${e.formatter.fullMonth(Pt(e.placeholder.current.set({month:t})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:t=>t.hourCycle.current===12?1:0,max:t=>t.hourCycle.current===24?23:t.hourCycle.current===12||Rm(t.locale.current)===12?12:23,cycle:1,canBeZero:!0,padZero:!0},minute:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0},second:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0}},Zn=new nn("DateField.Root");class qc{static create(e,r){return Zn.set(new qc(e,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Rn();formatter;initialSegments;#e=ie();get segmentValues(){return h(this.#e)}set segmentValues(e){I(this.#e,e,!0)}announcer;#t=E(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return h(this.#t)}set readonlySegmentsSet(e){I(this.#t,e)}segmentStates=Mm();#r=ie(null);#n=ie(null);#i=ie(null);get descriptionNode(){return h(this.#i)}set descriptionNode(e){I(this.#i,e,!0)}#s=ie(null);get validationNode(){return h(this.#s)}set validationNode(e){I(this.#s,e,!0)}states=Mm();#a=ie(null);get dayPeriodNode(){return h(this.#a)}set dayPeriodNode(e){I(this.#a,e,!0)}rangeRoot=void 0;#o=ie("");get name(){return h(this.#o)}set name(e){I(this.#o,e,!0)}domContext=new Ki(()=>null);constructor(e,r){this.rangeRoot=r,this.value=e.value,this.placeholder=r?r.opts.placeholder:e.placeholder,this.validate=r?cr(void 0):e.validate,this.minValue=r?r.opts.minValue:e.minValue,this.maxValue=r?r.opts.maxValue:e.maxValue,this.disabled=r?r.opts.disabled:e.disabled,this.readonly=r?r.opts.readonly:e.readonly,this.granularity=r?r.opts.granularity:e.granularity,this.readonlySegments=r?r.opts.readonlySegments:e.readonlySegments,this.hourCycle=r?r.opts.hourCycle:e.hourCycle,this.locale=r?r.opts.locale:e.locale,this.hideTimeZone=r?r.opts.hideTimeZone:e.hideTimeZone,this.required=r?r.opts.required:e.required,this.onInvalid=r?r.opts.onInvalid:e.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:e.errorMessageId,this.isInvalidProp=e.isInvalidProp,this.formatter=Zm({initialLocale:this.locale.current,monthFormat:F(()=>"long"),yearFormat:F(()=>"numeric")}),this.initialSegments=sc(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Ma(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),pe(()=>{Ve(()=>{this.initialSegments=sc(this.inferredGranularity)})}),Hr(()=>{this.announcer=Ma(this.domContext.getDocument())}),Wi(()=>{r||jC(this.descriptionId,this.domContext.getDocument())}),pe(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),pe(()=>{if(r)return;if(this.value.current){const i=Ve(()=>this.descriptionId);VC({id:i,formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()})}const n=Ve(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ve(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),pe(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),pe(()=>{this.value.current===void 0&&(this.segmentValues=sc(this.inferredGranularity))}),it(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(e){this.name=e}setFieldNode(e){I(this.#r,e,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:h(this.#r)}setLabelNode(e){I(this.#n,e,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:h(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(e){this.value.current=e}syncSegmentValues(e){const r=Na.map(n=>{const i=e[n];if(n==="month"){if(this.states.month.updating)return[n,this.states.month.updating];if(i<10)return[n,`0${i}`]}if(n==="day"){if(this.states.day.updating)return[n,this.states.day.updating];if(i<10)return[n,`0${i}`]}if(n==="year"){if(this.states.year.updating)return[n,this.states.year.updating];const o=4-`${i}`.length;if(o>0)return[n,`${"0".repeat(o)}${i}`]}return[n,`${i}`]});if("hour"in e){const n=rc.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Pt(e))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`];if(e[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}return[s,`${e[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=E(()=>{const e=this.value.current;if(!e)return!1;const r=this.validate.current?.(e);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&ui(e,n))return{reason:"min"};const i=this.maxValue.current;return i&&ui(i,e)?{reason:"max"}:!1});get validationStatus(){return h(this.#u)}set validationStatus(e){I(this.#u,e)}#d=E(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return h(this.#d)}set isInvalid(e){I(this.#d,e)}#c=E(()=>{const e=this.granularity.current;return e||LC(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return h(this.#c)}set inferredGranularity(e){I(this.#c,e)}#f=E(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return h(this.#f)}set dateRef(e){I(this.#f,e)}#h=E(()=>$C({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return h(this.#h)}set allSegmentContent(e){I(this.#h,e)}#p=E(()=>this.allSegmentContent.arr);get segmentContents(){return h(this.#p)}set segmentContents(e){I(this.#p,e)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"}};#m(e){return`${e} ${this.getLabelNode()?.id??""}`}updateSegment(e,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(e))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(zC(o)){const u=o[e],c=r;if(e==="month"){const d=c(u);if(this.states.month.updating=d,d!==null&&o.day!==null){const f=l.set({month:Number.parseInt(d)}),p=oo(Pt(f));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[e]:d}}else if(e==="dayPeriod"){const d=c(u);this.states.dayPeriod.updating=d;const f=this.value.current;if(f&&"hour"in f){const p=f.hour;d==="AM"?p>=12&&(o.hour=`${p-12}`):d==="PM"&&p<12&&(o.hour=`${p+12}`)}a={...o,[e]:d}}else if(e==="hour"){const d=c(u);if(this.states.hour.updating=d,d!==null&&o.dayPeriod!==null){const f=this.formatter.dayPeriod(Pt(l.set({hour:Number.parseInt(d)})),this.hourCycle.current);(f==="AM"||f==="PM")&&(o.dayPeriod=f)}a={...o,[e]:d}}else if(e==="minute"){const d=c(u);this.states.minute.updating=d,a={...o,[e]:d}}else if(e==="second"){const d=c(u);this.states.second.updating=d,a={...o,[e]:d}}else if(e==="year"){const d=c(u);this.states.year.updating=d,a={...o,[e]:d}}else if(e==="day"){const d=c(u);this.states.day.updating=d,a={...o,[e]:d}}else{const d=c(u);a={...o,[e]:d}}}else if(Ra(e)){const u=o[e],c=r,d=c(u);if(e==="month"&&d!==null&&o.day!==null){this.states.month.updating=d;const f=l.set({month:Number.parseInt(d)}),p=oo(Pt(f));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[e]:d}}else if(e==="year"){const f=c(u);this.states.year.updating=f,a={...o,[e]:f}}else if(e==="day"){const f=c(u);this.states.day.updating=f,a={...o,[e]:f}}else a={...o,[e]:d}}this.segmentValues=a,RC(a,h(this.#r))?this.setValue(NC({segmentObj:a,fieldNode:h(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(e){this.disabled.current&&e.preventDefault()}getBaseSegmentAttrs(e,r){const n=this.readonlySegmentsSet.has(e),i={"aria-invalid":Zu(this.isInvalid),"aria-disabled":dr(this.disabled.current),"aria-readonly":dr(this.readonly.current||n),"data-invalid":ze(this.isInvalid),"data-disabled":ze(this.disabled.current),"data-readonly":ze(this.readonly.current||n),"data-segment":`${e}`,[Ja.segment]:""};if(e==="literal")return i;const s=this.descriptionNode?.id,o=ZC(r,h(this.#r))&&s,a=this.errorMessageId?.current,l=o?`${s} ${this.isInvalid&&a?a:""}`:void 0,u=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:u?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}}class Wc{static create(e){return new Wc(e,Zn.get())}opts;root;domContext;attachment;constructor(e,r){this.opts=e,this.root=r,this.domContext=new Ki(e.ref),this.root.domContext=this.domContext,this.attachment=et(e.ref,n=>this.root.setFieldNode(n)),it(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=E(()=>{if(!(!sn||!this.domContext.getElementById(this.root.descriptionId)))return this.root.descriptionId});#t=E(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":h(this.#e),"aria-disabled":dr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":ze(this.root.disabled.current),[Ja.input]:"",...this.attachment}));get props(){return h(this.#t)}set props(e){I(this.#t,e)}}class Kc{static create(){return new Kc(Zn.get())}root;#e=E(()=>this.root.name!=="");get shouldRender(){return h(this.#e)}set shouldRender(e){I(this.#e,e)}#t=E(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return h(this.#t)}set isoValue(e){I(this.#t,e)}constructor(e){this.root=e}#r=E(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return h(this.#r)}set props(e){I(this.#r,e)}}class Hc{static create(e){return new Hc(e,Zn.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(e.ref,n=>this.root.setLabelNode(n))}onclick(e){if(this.root.disabled.current)return;const r=qC(this.root.getFieldNode());r&&r.focus()}#e=E(()=>({id:this.opts.id.current,"data-invalid":ze(this.root.isInvalid),"data-disabled":ze(this.root.disabled.current),[Ja.label]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class Xi{opts;root;announcer;part;config;attachment;constructor(e,r,n,i){this.opts=e,this.root=r,this.part=n,this.config=i,this.announcer=r.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=et(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,r=!0){const n=String(e);return r&&this.config.padZero&&n.length===1?`0${e}`:n}onkeydown(e){const r=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in r))&&(e.key!==Sa&&e.preventDefault(),!!oc(e.key))){if(Qc(e.key)){this.#i(r);return}if(Xc(e.key)){this.#s(r);return}if(xa(e.key)){this.#a(e);return}if(ed(e.key)){this.#o(e);return}uo(e.key)&&lo(e,this.root.getFieldNode())}}#i(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#s(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#a(e){const r=Number.parseInt(e.key);let n=!1;const i=this.#e(),s=Math.floor(i/10),o=r===0,a=this.part;this.root.updateSegment(this.part,l=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(l=null,this.root.states[a].hasLeftFocus=!1),l===null)return o?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||r>s)&&(n=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),n&&String(r).length===1?(this.announcer.announce(r),`0${r}`):`${r}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return r!==0?(n=!0,this.root.states[a].lastKeyZero=!1,`0${r}`):this.part==="hour"&&r===0&&this.root.hourCycle.current===24?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&r===0?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):l;const u=Number.parseInt(l+r.toString());return u>i?(n=!0,`0${r}`):(n=!0,`${u}`)}),n&&zm(e,this.root.getFieldNode())}#o(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1);let n=!1;this.root.updateSegment(this.part,i=>{if(i===null)return n=!0,this.announcer.announce(null),null;if(i.length===2&&i.startsWith("0"))return this.announcer.announce(null),null;const s=i.toString();if(s.length===1)return this.announcer.announce(null),null;const o=Number.parseInt(s.slice(0,-1));return this.announcer.announce(this.#r(o)),`${o}`}),n&&Lm(e,this.root.getFieldNode())}onfocusout(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,n=>n&&n.length===1?`0${n}`:n)}getSegmentProps(){const e=this.root.segmentValues,r=this.root.placeholder.current,n=e[this.part]===null;let i=r;e[this.part]&&(i=r.set({[this.part]:Number.parseInt(e[this.part])}));const s=i[this.part],o=this.#t(),a=this.#e();let l=n?"Empty":`${s}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(l=n?"Empty":`${s} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":s,"aria-valuetext":l}}#l=E(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return h(this.#l)}set props(e){I(this.#l,e)}}class $T extends Xi{#e=[];#t=0;constructor(e,r){super(e,r,"year",Qi.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==Sa&&e.preventDefault(),!!oc(e.key))){if(Qc(e.key)){this.#r(),super.onkeydown(e);return}if(Xc(e.key)){this.#r(),super.onkeydown(e);return}if(xa(e.key)){this.#i(e);return}if(ed(e.key)){this.#s(e);return}uo(e.key)&&lo(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let r=!1;const n=Number.parseInt(e.key);this.root.updateSegment("year",i=>{if(this.root.states.year.hasLeftFocus&&(i=null,this.root.states.year.hasLeftFocus=!1),i===null)return this.announcer.announce(n),`000${n}`;const s=i.toString()+n.toString(),o=Number.parseInt(s);if(String(o).length<4)return this.#t>0&&this.#e.length<=this.#t&&s.length<=4?(this.announcer.announce(o),s):(this.announcer.announce(o),xg(o));this.announcer.announce(o),r=!0;const l=`${o}`;return l.length>4?l.slice(0,4):l}),(this.#e.length===4||this.#e.length===this.#t)&&(r=!0),r&&zm(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let r=!1;this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus=!1,n===null)return r=!0,this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=i.slice(0,-1);return this.announcer.announce(s),`${s}`}),r&&Lm(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",r=>r&&r.length!==4?xg(Number.parseInt(r)):r)}}class MT extends Xi{constructor(e,r){super(e,r,"day",Qi.day)}}class FT extends Xi{constructor(e,r){super(e,r,"month",Qi.month)}}class NT extends Xi{constructor(e,r){super(e,r,"hour",Qi.hour)}onkeydown(e){if(xa(e.key)){const r=this.root.updateSegment.bind(this.root);this.root.updateSegment=(n,i)=>{const s=r(n,i);return n==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),s}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}}class RT extends Xi{constructor(e,r){super(e,r,"minute",Qi.minute)}}class zT extends Xi{constructor(e,r){super(e,r,"second",Qi.second)}}class Yc{static create(e){return new Yc(e,Zn.get())}opts;root;attachment;#e;constructor(e,r){this.opts=e,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(e.ref,n=>this.root.dayPeriodNode=n)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==Sa&&e.preventDefault(),!!ZT(e.key))){if(Qc(e.key)||Xc(e.key)){this.root.updateSegment("dayPeriod",r=>{if(r==="AM")return this.#e.announce("PM"),"PM";const n="AM";return this.#e.announce(n),n});return}ed(e.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),(e.key===Uu||e.key===om||Bu)&&this.root.updateSegment("dayPeriod",()=>{const r=e.key===Uu||e.key===Bu?"AM":"PM";return this.#e.announce(r),r}),uo(e.key)&&lo(e,this.root.getFieldNode())}}#t=E(()=>{const e=this.root.segmentValues;if(!("dayPeriod"in e))return;const r=0,n=12,i=e.dayPeriod==="AM"?0:12,s=e.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return h(this.#t)}set props(e){I(this.#t,e)}}class Gc{static create(e){return new Gc(e,Zn.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(e.ref)}#e=E(()=>({id:this.opts.id.current,"aria-hidden":Zu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class Jc{static create(e){return new Jc(e,Zn.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(e.ref)}onkeydown(e){e.key!==Sa&&e.preventDefault(),!this.root.disabled.current&&uo(e.key)&&lo(e,this.root.getFieldNode())}#e=E(()=>({role:"textbox",id:this.opts.id.current,"aria-label":"timezone, ",style:{caretColor:"transparent"},onkeydown:this.onkeydown,...this.root.getBaseSegmentAttrs("timeZoneName",this.opts.id.current),"data-readonly":ze(!0),...this.attachment}));get props(){return h(this.#e)}set props(e){I(this.#e,e)}}class LT{static create(e,r){const n=Zn.get();switch(e){case"day":return new MT(r,n);case"month":return new FT(r,n);case"year":return new $T(r,n);case"hour":return new NT(r,n);case"minute":return new RT(r,n);case"second":return new zT(r,n);case"dayPeriod":return new Yc(r,n);case"literal":return new Gc(r,n);case"timeZoneName":return new Jc(r,n)}}}function ZT(t){return oc(t)||t===Uu||t===om||t===Bu||t===AE}function Qc(t){return t===ka}function Xc(t){return t===wa}function ed(t){return t===sm}function xg(t){const r=4-String(t).length;return`${"0".repeat(r)}${t}`}function Eg(t,e){X(e,!1);const r=Kc.create();Wl();var n=q(),i=R(n);{var s=o=>{Km(o,xn(()=>r.props))};ae(i,o=>{r.shouldRender&&o(s)})}w(t,n),ee()}re(Eg,{},[],[],{mode:"open"});var VT=V("<div><!></div>"),jT=V("<!> <!>",1);function Cg(t,e){const r=ft();X(e,!0);let n=b(e,"id",23,()=>Ie(r)),i=b(e,"ref",15,null),s=b(e,"name",7,""),o=b(e,"children",7),a=b(e,"child",7),l=Ue(e,["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]);const u=Wc.create({id:F(()=>n()),ref:F(()=>i(),_=>i(_)),name:F(()=>s())}),c=E(()=>Ke(l,u.props));var d={get id(){return n()},set id(_=Ie(r)){n(_),y()},get ref(){return i()},set ref(_=null){i(_),y()},get name(){return s()},set name(_=""){s(_),y()},get children(){return o()},set children(_){o(_),y()},get child(){return a()},set child(_){a(_),y()}},f=jT(),p=R(f);{var v=_=>{var k=q(),D=R(k);ve(D,a,()=>({props:h(c),segments:u.root.segmentContents})),w(_,k)},g=_=>{var k=VT();Ze(k,()=>({...h(c)}));var D=$(k);ve(D,()=>o()??Fe,()=>({segments:u.root.segmentContents})),T(k),w(_,k)};ae(p,_=>{a()?_(v):_(g,!1)})}var m=J(p,2);return Eg(m,{}),w(t,f),ee(d)}re(Cg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var BT=V("<div><!></div>");function Og(t,e){const r=ft();X(e,!0);let n=b(e,"id",23,()=>Ie(r)),i=b(e,"ref",15,null),s=b(e,"children",7),o=b(e,"child",7),a=Ue(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]);const l=Hc.create({id:F(()=>n()),ref:F(()=>i(),g=>i(g))}),u=E(()=>Ke(a,l.props));var c={get id(){return n()},set id(g=Ie(r)){n(g),y()},get ref(){return i()},set ref(g=null){i(g),y()},get children(){return s()},set children(g){s(g),y()},get child(){return o()},set child(g){o(g),y()}},d=q(),f=R(d);{var p=g=>{var m=q(),_=R(m);ve(_,o,()=>({props:h(u)})),w(g,m)},v=g=>{var m=BT();Ze(m,()=>({...h(u)}));var _=$(m);ve(_,()=>s()??Fe),T(m),w(g,m)};ae(f,g=>{o()?g(p):g(v,!1)})}return w(t,d),ee(c)}re(Og,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var UT=V("<span><!></span>");function Tg(t,e){const r=ft();X(e,!0);let n=b(e,"id",23,()=>Ie(r)),i=b(e,"ref",15,null),s=b(e,"children",7),o=b(e,"child",7),a=b(e,"part",7),l=Ue(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]);const u=LT.create(a(),{id:F(()=>n()),ref:F(()=>i(),m=>i(m))}),c=E(()=>Ke(l,u.props));var d={get id(){return n()},set id(m=Ie(r)){n(m),y()},get ref(){return i()},set ref(m=null){i(m),y()},get children(){return s()},set children(m){s(m),y()},get child(){return o()},set child(m){o(m),y()},get part(){return a()},set part(m){a(m),y()}},f=q(),p=R(f);{var v=m=>{var _=q(),k=R(_);ve(k,o,()=>({props:h(c)})),w(m,_)},g=m=>{var _=UT();Ze(_,()=>({...h(c)}));var k=$(_);ve(k,()=>s()??Fe),T(_),w(m,_)};ae(p,m=>{o()?m(v):m(g,!1)})}return w(t,f),ee(d)}re(Tg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});const Ag=new nn("DatePicker.Root");class td{static create(e){return Ag.set(new td(e))}opts;constructor(e){this.opts=e}}function Dg(t,e){const[r,n]=t;let i=!1;const s=e.length;for(let o=0,a=s-1;o<s;a=o++){const[l,u]=e[o]??[0,0],[c,d]=e[a]??[0,0];u>=n!=d>=n&&r<=(c-l)*(n-u)/(d-u)+l&&(i=!i)}return i}function Ig(t,e){return t[0]>=e.left&&t[0]<=e.right&&t[1]>=e.top&&t[1]<=e.bottom}function qT(t,e){const r=t.left+t.width/2,n=t.top+t.height/2,i=e.left+e.width/2,s=e.top+e.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}class WT{#e;#t;#r=null;#n=null;constructor(e){this.#e=e,this.#t=e.buffer??1,it([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#r=null,this.#n=null;return}const s=ba(r),o=d=>{this.#i(d,r,n)},a=d=>{const f=d.relatedTarget;no(f)&&n.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="content")},l=()=>{this.#r=null,this.#n=null},u=()=>{this.#r=null,this.#n=null},c=d=>{const f=d.relatedTarget;no(f)&&r.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="trigger")};return[dt(s,"pointermove",o),dt(r,"pointerleave",a),dt(r,"pointerenter",l),dt(n,"pointerenter",u),dt(n,"pointerleave",c)].reduce((d,f)=>()=>{d(),f()},()=>{})})}#i(e,r,n){if(!this.#r||!this.#n)return;const i=[e.clientX,e.clientY],s=r.getBoundingClientRect(),o=n.getBoundingClientRect();if(this.#n==="content"&&Ig(i,o)){this.#r=null,this.#n=null;return}if(this.#n==="trigger"&&Ig(i,s)){this.#r=null,this.#n=null;return}const a=qT(s,o),l=this.#s(s,o,a);if(l&&Dg(i,l))return;const u=this.#n==="content"?o:s,c=this.#a(this.#r,u,a,this.#n);Dg(i,c)||(this.#r=null,this.#n=null,this.#e.onPointerExit())}#s(e,r,n){const i=this.#t;switch(n){case"top":return[[Math.min(e.left,r.left)-i,e.top],[Math.min(e.left,r.left)-i,r.bottom],[Math.max(e.right,r.right)+i,r.bottom],[Math.max(e.right,r.right)+i,e.top]];case"bottom":return[[Math.min(e.left,r.left)-i,e.bottom],[Math.min(e.left,r.left)-i,r.top],[Math.max(e.right,r.right)+i,r.top],[Math.max(e.right,r.right)+i,e.bottom]];case"left":return[[e.left,Math.min(e.top,r.top)-i],[r.right,Math.min(e.top,r.top)-i],[r.right,Math.max(e.bottom,r.bottom)+i],[e.left,Math.max(e.bottom,r.bottom)+i]];case"right":return[[e.right,Math.min(e.top,r.top)-i],[r.left,Math.min(e.top,r.top)-i],[r.left,Math.max(e.bottom,r.bottom)+i],[e.right,Math.max(e.bottom,r.bottom)+i]]}}#a(e,r,n,i){const s=this.#t*4,[o,a]=e;switch(i==="trigger"?this.#o(n):n){case"top":return[[o-s,a+s],[o+s,a+s],[r.right+s,r.bottom],[r.right+s,r.top],[r.left-s,r.top],[r.left-s,r.bottom]];case"bottom":return[[o-s,a-s],[o+s,a-s],[r.right+s,r.top],[r.right+s,r.bottom],[r.left-s,r.bottom],[r.left-s,r.top]];case"left":return[[o+s,a-s],[o+s,a+s],[r.right,r.bottom+s],[r.left,r.bottom+s],[r.left,r.top-s],[r.right,r.top-s]];case"right":return[[o-s,a-s],[o-s,a+s],[r.left,r.bottom+s],[r.right,r.bottom+s],[r.right,r.top-s],[r.left,r.top-s]]}}#o(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const rd=_a({component:"popover",parts:["root","trigger","content","close","overlay"]}),nd=new nn("Popover.Root");class id{static create(e){return nd.set(new id(e))}opts;#e=ie(null);get contentNode(){return h(this.#e)}set contentNode(e){I(this.#e,e,!0)}contentPresence;#t=ie(null);get triggerNode(){return h(this.#t)}set triggerNode(e){I(this.#t,e,!0)}#r=ie(null);get overlayNode(){return h(this.#r)}set overlayNode(e){I(this.#r,e,!0)}overlayPresence;#n=ie(!1);get openedViaHover(){return h(this.#n)}set openedViaHover(e){I(this.#n,e,!0)}#i=ie(!1);get hasInteractedWithContent(){return h(this.#i)}set hasInteractedWithContent(e){I(this.#i,e,!0)}#s=ie(!1);get hoverCooldown(){return h(this.#s)}set hoverCooldown(e){I(this.#s,e,!0)}#a=ie(0);get closeDelay(){return h(this.#a)}set closeDelay(e){I(this.#a,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new lm({ref:F(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new lm({ref:F(()=>this.overlayNode),open:this.opts.open}),it(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(e){this.#l=e}#u(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}}class sd{static create(e){return new sd(e,nd.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=ie(!1);constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Ki(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),it(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||Ea(e)||(I(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(Ea(e)||(I(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#s(),h(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}h(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===Vu||e.key===ju)&&(e.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=E(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":dr(this.root.opts.open.current),"data-state":im(this.root.opts.open.current),"aria-controls":this.#a(),[rd.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#o)}set props(e){I(this.#o,e)}}class od{static create(e){return new od(e,nd.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new WT({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const r=e.target;no(r)&&tC(r)&&this.root.markInteraction()}onpointerenter(e){Ea(e)||this.root.cancelDelayedClose()}onpointerleave(e){Ea(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!no(e.target))return;const r=e.target.closest(rd.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(no(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=E(()=>({open:this.root.opts.open.current}));get snippetProps(){return h(this.#e)}set snippetProps(e){I(this.#e,e)}#t=E(()=>({id:this.opts.id.current,tabindex:-1,"data-state":im(this.root.opts.open.current),[rd.content]:"",style:{pointerEvents:"auto"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#t)}set props(e){I(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}function Pg(t,e){X(e,!0);let r=b(e,"open",15,!1),n=b(e,"onOpenChange",7,ke),i=b(e,"onOpenChangeComplete",7,ke),s=b(e,"value",15),o=b(e,"onValueChange",7,ke),a=b(e,"placeholder",15),l=b(e,"onPlaceholderChange",7,ke),u=b(e,"isDateUnavailable",7,()=>!1),c=b(e,"validate",7,ke),d=b(e,"onInvalid",7,ke),f=b(e,"minValue",7),p=b(e,"maxValue",7),v=b(e,"disabled",7,!1),g=b(e,"readonly",7,!1),m=b(e,"granularity",7),_=b(e,"readonlySegments",23,()=>[]),k=b(e,"hourCycle",7),D=b(e,"locale",7),O=b(e,"hideTimeZone",7,!1),P=b(e,"required",7,!1),C=b(e,"calendarLabel",7,"Event"),A=b(e,"disableDaysOutsideMonth",7,!0),N=b(e,"preventDeselect",7,!1),M=b(e,"pagedNavigation",7,!1),j=b(e,"weekStartsOn",7),se=b(e,"weekdayFormat",7,"narrow"),z=b(e,"isDateDisabled",7,()=>!1),ue=b(e,"fixedWeeks",7,!1),ne=b(e,"numberOfMonths",7,1),W=b(e,"closeOnDateSelect",7,!0),G=b(e,"initialFocus",7,!1),H=b(e,"errorMessageId",7),U=b(e,"children",7),Y=b(e,"monthFormat",7,"long"),le=b(e,"yearFormat",7,"numeric");const ce=Am({granularity:m(),defaultValue:s(),minValue:f(),maxValue:p()});function me(){a()===void 0&&a(ce)}me(),it.pre(()=>a(),()=>{me()});function Z(){W()&&r(!1)}const ge=td.create({open:F(()=>r(),x=>{r(x),n()(x)}),value:F(()=>s(),x=>{s(x),o()(x)}),placeholder:F(()=>a(),x=>{a(x),l()(x)}),isDateUnavailable:F(()=>u()),minValue:F(()=>f()),maxValue:F(()=>p()),disabled:F(()=>v()),readonly:F(()=>g()),granularity:F(()=>m()),readonlySegments:F(()=>_()),hourCycle:F(()=>k()),locale:um(()=>D()),hideTimeZone:F(()=>O()),required:F(()=>P()),calendarLabel:F(()=>C()),disableDaysOutsideMonth:F(()=>A()),preventDeselect:F(()=>N()),pagedNavigation:F(()=>M()),weekStartsOn:F(()=>j()),weekdayFormat:F(()=>se()),isDateDisabled:F(()=>z()),fixedWeeks:F(()=>ue()),numberOfMonths:F(()=>ne()),initialFocus:F(()=>G()),onDateSelect:F(()=>Z),defaultPlaceholder:ce,monthFormat:F(()=>Y()),yearFormat:F(()=>le())});id.create({open:ge.opts.open,onOpenChangeComplete:F(()=>i())}),qc.create({value:ge.opts.value,disabled:ge.opts.disabled,readonly:ge.opts.readonly,readonlySegments:ge.opts.readonlySegments,validate:F(()=>c()),onInvalid:F(()=>d()),minValue:ge.opts.minValue,maxValue:ge.opts.maxValue,granularity:ge.opts.granularity,hideTimeZone:ge.opts.hideTimeZone,hourCycle:ge.opts.hourCycle,locale:ge.opts.locale,required:ge.opts.required,placeholder:ge.opts.placeholder,errorMessageId:F(()=>H()),isInvalidProp:F(()=>{})});var B={get open(){return r()},set open(x=!1){r(x),y()},get onOpenChange(){return n()},set onOpenChange(x=ke){n(x),y()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(x=ke){i(x),y()},get value(){return s()},set value(x){s(x),y()},get onValueChange(){return o()},set onValueChange(x=ke){o(x),y()},get placeholder(){return a()},set placeholder(x){a(x),y()},get onPlaceholderChange(){return l()},set onPlaceholderChange(x=ke){l(x),y()},get isDateUnavailable(){return u()},set isDateUnavailable(x=()=>!1){u(x),y()},get validate(){return c()},set validate(x=ke){c(x),y()},get onInvalid(){return d()},set onInvalid(x=ke){d(x),y()},get minValue(){return f()},set minValue(x){f(x),y()},get maxValue(){return p()},set maxValue(x){p(x),y()},get disabled(){return v()},set disabled(x=!1){v(x),y()},get readonly(){return g()},set readonly(x=!1){g(x),y()},get granularity(){return m()},set granularity(x){m(x),y()},get readonlySegments(){return _()},set readonlySegments(x=[]){_(x),y()},get hourCycle(){return k()},set hourCycle(x){k(x),y()},get locale(){return D()},set locale(x){D(x),y()},get hideTimeZone(){return O()},set hideTimeZone(x=!1){O(x),y()},get required(){return P()},set required(x=!1){P(x),y()},get calendarLabel(){return C()},set calendarLabel(x="Event"){C(x),y()},get disableDaysOutsideMonth(){return A()},set disableDaysOutsideMonth(x=!0){A(x),y()},get preventDeselect(){return N()},set preventDeselect(x=!1){N(x),y()},get pagedNavigation(){return M()},set pagedNavigation(x=!1){M(x),y()},get weekStartsOn(){return j()},set weekStartsOn(x){j(x),y()},get weekdayFormat(){return se()},set weekdayFormat(x="narrow"){se(x),y()},get isDateDisabled(){return z()},set isDateDisabled(x=()=>!1){z(x),y()},get fixedWeeks(){return ue()},set fixedWeeks(x=!1){ue(x),y()},get numberOfMonths(){return ne()},set numberOfMonths(x=1){ne(x),y()},get closeOnDateSelect(){return W()},set closeOnDateSelect(x=!0){W(x),y()},get initialFocus(){return G()},set initialFocus(x=!1){G(x),y()},get errorMessageId(){return H()},set errorMessageId(x){H(x),y()},get children(){return U()},set children(x){U(x),y()},get monthFormat(){return Y()},set monthFormat(x="long"){Y(x),y()},get yearFormat(){return le()},set yearFormat(x="numeric"){le(x),y()}},L=q(),be=R(L);return Pe(be,()=>vg,(x,tt)=>{tt(x,{children:(Be,We)=>{var Ct=q(),rt=R(Ct);ve(rt,()=>U()??Fe),w(Be,Ct)},$$slots:{default:!0}})}),w(t,L),ee(B)}re(Pg,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var KT=V("<div><!></div>");function $g(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"id",23,()=>Ie(r)),o=b(e,"ref",15,null),a=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]);const l=Ag.get(),u=La.create({id:F(()=>s()),ref:F(()=>o(),m=>o(m)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:F(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:F(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),c=E(()=>Ke(a,u.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Ie(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()}},f=q(),p=R(f);{var v=m=>{var _=q(),k=R(_);{let D=E(()=>({props:h(c),...u.snippetProps}));ve(k,i,()=>h(D))}w(m,_)},g=m=>{var _=KT();Ze(_,()=>({...h(c)}));var k=$(_);ve(k,()=>n()??Fe,()=>u.snippetProps),T(_),w(m,_)};ae(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),ee(d)}re($g,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var HT=V("<div><div><!></div></div>"),YT=V("<div><div><!></div></div>");function Mg(t,e){const r=ft();X(e,!0);let n=b(e,"child",7),i=b(e,"children",7),s=b(e,"ref",15,null),o=b(e,"id",23,()=>Ie(r)),a=b(e,"forceMount",7,!1),l=b(e,"onOpenAutoFocus",7,ke),u=b(e,"onCloseAutoFocus",7,ke),c=b(e,"onEscapeKeydown",7,ke),d=b(e,"onInteractOutside",7,ke),f=b(e,"trapFocus",7,!0),p=b(e,"preventScroll",7,!1),v=b(e,"customAnchor",7,null),g=Ue(e,["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor"]);const m=od.create({id:F(()=>o()),ref:F(()=>s(),M=>s(M)),onInteractOutside:F(()=>d()),onEscapeKeydown:F(()=>c()),customAnchor:F(()=>v())}),_=E(()=>Ke(g,m.props)),k=E(()=>f()&&m.shouldTrapFocus);function D(M){m.shouldTrapFocus||M.preventDefault(),l()(M)}var O={get child(){return n()},set child(M){n(M),y()},get children(){return i()},set children(M){i(M),y()},get ref(){return s()},set ref(M=null){s(M),y()},get id(){return o()},set id(M=Ie(r)){o(M),y()},get forceMount(){return a()},set forceMount(M=!1){a(M),y()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(M=ke){l(M),y()},get onCloseAutoFocus(){return u()},set onCloseAutoFocus(M=ke){u(M),y()},get onEscapeKeydown(){return c()},set onEscapeKeydown(M=ke){c(M),y()},get onInteractOutside(){return d()},set onInteractOutside(M=ke){d(M),y()},get trapFocus(){return f()},set trapFocus(M=!0){f(M),y()},get preventScroll(){return p()},set preventScroll(M=!1){p(M),y()},get customAnchor(){return v()},set customAnchor(M=null){v(M),y()}},P=q(),C=R(P);{var A=M=>{Sg(M,xn(()=>h(_),()=>m.popperProps,{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return v()},onOpenAutoFocus:D,get onCloseAutoFocus(){return u()},get shouldRender(){return m.shouldRender},popper:(se,z)=>{let ue=()=>z?.().props,ne=()=>z?.().wrapperProps;const W=E(()=>Ke(ue(),{style:mg("popover")}));var G=q(),H=R(G);{var U=le=>{var ce=q(),me=R(ce);{let Z=E(()=>({props:h(W),wrapperProps:ne(),...m.snippetProps}));ve(me,n,()=>h(Z))}w(le,ce)},Y=le=>{var ce=HT();Ze(ce,()=>({...ne()}));var me=$(ce);Ze(me,()=>({...h(W)}));var Z=$(me);ve(Z,()=>i()??Fe),T(me),T(ce),w(le,ce)};ae(H,le=>{n()?le(U):le(Y,!1)})}w(se,G)},$$slots:{popper:!0}}))},N=M=>{var j=q(),se=R(j);{var z=ue=>{kg(ue,xn(()=>h(_),()=>m.popperProps,{get ref(){return m.opts.ref},get open(){return m.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return v()},onOpenAutoFocus:D,get onCloseAutoFocus(){return u()},get shouldRender(){return m.shouldRender},popper:(W,G)=>{let H=()=>G?.().props,U=()=>G?.().wrapperProps;const Y=E(()=>Ke(H(),{style:mg("popover")}));var le=q(),ce=R(le);{var me=ge=>{var B=q(),L=R(B);{let be=E(()=>({props:h(Y),wrapperProps:U(),...m.snippetProps}));ve(L,n,()=>h(be))}w(ge,B)},Z=ge=>{var B=YT();Ze(B,()=>({...U()}));var L=$(B);Ze(L,()=>({...h(Y)}));var be=$(L);ve(be,()=>i()??Fe),T(L),T(B),w(ge,B)};ae(ce,ge=>{n()?ge(me):ge(Z,!1)})}w(W,le)},$$slots:{popper:!0}}))};ae(se,ue=>{a()||ue(z)},!0)}w(M,j)};ae(C,M=>{a()?M(A):M(N,!1)})}return w(t,P),ee(O)}re(Mg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{}},[],[],{mode:"open"});function Fg(t,e){X(e,!0);let r=b(e,"ref",15,null),n=b(e,"onOpenAutoFocus",7),i=Ue(e,["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);const s=E(()=>Ke({onOpenAutoFocus:n()},{onOpenAutoFocus:oO}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return Mg(t,xn(()=>h(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),ee(o)}re(Fg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var GT=V("<button><!></button>");function Ng(t,e){const r=ft();X(e,!0);let n=b(e,"children",7),i=b(e,"child",7),s=b(e,"id",23,()=>Ie(r)),o=b(e,"ref",15,null),a=b(e,"type",7,"button"),l=b(e,"disabled",7,!1),u=b(e,"openOnHover",7,!1),c=b(e,"openDelay",7,700),d=b(e,"closeDelay",7,300),f=Ue(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const p=sd.create({id:F(()=>s()),ref:F(()=>o(),m=>o(m)),disabled:F(()=>!!l()),openOnHover:F(()=>u()),openDelay:F(()=>c()),closeDelay:F(()=>d())}),v=E(()=>Ke(f,p.props,{type:a()}));var g={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Ie(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get type(){return a()},set type(m="button"){a(m),y()},get disabled(){return l()},set disabled(m=!1){l(m),y()},get openOnHover(){return u()},set openOnHover(m=!1){u(m),y()},get openDelay(){return c()},set openDelay(m=700){c(m),y()},get closeDelay(){return d()},set closeDelay(m=300){d(m),y()}};return yg(t,{get id(){return s()},get ref(){return p.opts.ref},children:(m,_)=>{var k=q(),D=R(k);{var O=C=>{var A=q(),N=R(A);ve(N,i,()=>({props:h(v)})),w(C,A)},P=C=>{var A=GT();Ze(A,()=>({...h(v)}));var N=$(A);ve(N,()=>n()??Fe),T(A),w(C,A)};ae(D,C=>{i()?C(O):C(P,!1)})}w(m,k)},$$slots:{default:!0}}),ee(g)}re(Ng,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});function Rg(t,e){X(e,!0);let r=b(e,"ref",15,null),n=b(e,"onkeydown",7),i=Ue(e,["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function s(l){if(uo(l.key)){const c=l.currentTarget.closest(Ja.selector("input"));if(!c)return;lo(l,c)}}const o=E(()=>Ke({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),y()},get onkeydown(){return n()},set onkeydown(l){n(l),y()}};return Ng(t,xn(()=>i,{"data-segment":"trigger"},()=>h(o),{get ref(){return r()},set ref(l){r(l)}})),ee(a)}re(Rg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var JT=V("<!> <!>",1),QT=V("<!> <!> <!>",1),XT=V("<!> <!>",1),eA=V("<!> <!>",1),tA=V("<!> <!> <!>",1);function zg(t,e){X(e,!0);let r=b(e,"dateString",15),n=b(e,"labelClass",7),i=b(e,"inputClass",7),s=b(e,"labelText",7),o=ie(Ne(Ni(Vt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);pe(()=>{r(h(o).toString())});var l={get dateString(){return r()},set dateString(d){r(d),y()},get labelClass(){return n()},set labelClass(d){n(d),y()},get inputClass(){return i()},set inputClass(d){i(d),y()},get labelText(){return s()},set labelText(d){s(d),y()}},u=q(),c=R(u);{let d=E(()=>S.locale||"de");Pe(c,()=>Pg,(f,p)=>{p(f,{get locale(){return h(d)},weekStartsOn:1,isDateDisabled:v=>v.compare(Ni(Vt()))<0,get value(){return h(o)},set value(v){I(o,v,!0)},children:(v,g)=>{var m=tA(),_=R(m);Pe(_,()=>Og,(O,P)=>{P(O,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(C,A)=>{var N=q(),M=R(N);{var j=se=>{var z=q(),ue=R(z);ve(ue,s),w(se,z)};ae(M,se=>{s()&&se(j)})}w(C,N)},$$slots:{default:!0}})});var k=J(_,2);{const O=(P,C)=>{let A=()=>C?.().segments;var N=JT(),M=R(N);Le(M,17,A,Er,(se,z)=>{let ue=()=>h(z).part,ne=()=>h(z).value;var W=q(),G=R(W);Pe(G,()=>Tg,(H,U)=>{U(H,{get part(){return ue()},children:(Y,le)=>{yt();var ce=It();oe(()=>te(ce,ne())),w(Y,ce)},$$slots:{default:!0}})}),w(se,W)});var j=J(M,2);Pe(j,()=>Rg,(se,z)=>{z(se,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),w(P,N)};Pe(k,()=>Cg,(P,C)=>{C(P,{get class(){return`go-datepicker-input ${i()??""}`},children:O,$$slots:{default:!0}})})}var D=J(k,2);Pe(D,()=>Fg,(O,P)=>{P(O,{children:(C,A)=>{var N=q(),M=R(N);{const j=(se,z)=>{let ue=()=>z?.().months,ne=()=>z?.().weekdays;var W=eA(),G=R(W);Pe(G,()=>Oc,(U,Y)=>{Y(U,{children:(le,ce)=>{var me=QT(),Z=R(me);Pe(Z,()=>Dc,(L,be)=>{be(L,{class:"go-datepicker-previous"})});var ge=J(Z,2);Pe(ge,()=>Tc,(L,be)=>{be(L,{class:"go-datepicker-selected-month"})});var B=J(ge,2);Pe(B,()=>Ac,(L,be)=>{be(L,{class:"go-datepicker-next"})}),w(le,me)},$$slots:{default:!0}})});var H=J(G,2);Le(H,16,ue,U=>U,(U,Y)=>{var le=q(),ce=R(le);Pe(ce,()=>kc,(me,Z)=>{Z(me,{children:(ge,B)=>{var L=XT(),be=R(L);Pe(be,()=>Ec,(tt,Be)=>{Be(tt,{children:(We,Ct)=>{var rt=q(),hn=R(rt);Pe(hn,()=>fo,(vr,Wt)=>{Wt(vr,{children:(yr,vi)=>{var br=q(),_r=R(br);Le(_r,17,ne,Er,(ls,go)=>{var pn=q(),yi=R(pn);Pe(yi,()=>Cc,(Vn,jn)=>{jn(Vn,{children:(vd,ol)=>{yt();var bi=It();oe(()=>te(bi,h(go))),w(vd,bi)},$$slots:{default:!0}})}),w(ls,pn)}),w(yr,br)},$$slots:{default:!0}})}),w(We,rt)},$$slots:{default:!0}})});var x=J(be,2);Pe(x,()=>Sc,(tt,Be)=>{Be(tt,{children:(We,Ct)=>{var rt=q(),hn=R(rt);Le(hn,16,()=>Y.weeks,vr=>vr,(vr,Wt)=>{var yr=q(),vi=R(yr);Pe(vi,()=>fo,(br,_r)=>{_r(br,{children:(ls,go)=>{var pn=q(),yi=R(pn);Le(yi,16,()=>Wt,Vn=>Vn,(Vn,jn,vd,ol)=>{var bi=q(),yd=R(bi);Pe(yd,()=>xc,(XI,eP)=>{eP(XI,{get date(){return jn},get month(){return Y.value},children:(tP,vP)=>{var dv=q(),rP=R(dv);Pe(rP,()=>wc,(nP,iP)=>{iP(nP,{})}),w(tP,dv)},$$slots:{default:!0}})}),w(Vn,bi)}),w(ls,pn)},$$slots:{default:!0}})}),w(vr,yr)}),w(We,rt)},$$slots:{default:!0}})}),w(ge,L)},$$slots:{default:!0}})}),w(U,le)}),w(se,W)};Pe(M,()=>$g,(se,z)=>{z(se,{children:j,$$slots:{default:!0}})})}w(C,N)},$$slots:{default:!0}})}),w(v,m)},$$slots:{default:!0}})})}return w(t,u),ee(l)}re(zg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var rA=V('<span class="go-field-star" aria-hidden="true">*</span>'),nA=V(" <!>",1),iA=V("<label><!></label> <input/>",1),sA=V('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),oA=V("<label><!></label> <input/> <!>",1),aA=V('<label><input/> <span class="go-checkbox-label"><!></span></label>'),lA=V('<img src="" alt=""/> <option> </option>',1),uA=V('<option disabled hidden="" selected> </option> <!>',1),cA=V("<!>",1),dA=V("<label><!></label> <select><!></select>",1),fA=V('<img style="width: 60px" aria-hidden="true"/>'),hA=V('<span class="go-payment-mode-icons"></span>'),pA=V('<label><input type="radio"/> <!></label>'),mA=V('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),gA=V("<label> <input/></label>"),vA=V("<fieldset><legend><!></legend> <!></fieldset>");function Lg(t,e){X(e,!0);const r=ne=>{yt();var W=nA(),G=R(W),H=J(G);{var U=Y=>{var le=rA();w(Y,le)};ae(H,Y=>{c().required&&Y(U)})}oe(()=>te(G,`${h(A)??""} `)),w(ne,W)},n=ne=>{var W=iA(),G=R(W),H=$(G);r(H),T(G);var U=J(G,2);Ze(U,()=>({...h(C),...g,class:p(),placeholder:c().placeholder,type:c().type,name:c().key}),void 0,void 0,void 0,void 0,!0),oe(()=>{zt(G,1,Yr(f())),Se(G,"for",h(O))}),jl(U,()=>c().value,Y=>c(c().value=Y,!0)),w(ne,W)},i=ne=>{var W=oA(),G=R(W),H=$(G);r(H),T(G);var U=J(G,2),Y=me=>{const Z=me.currentTarget.files;c(c().value=Z&&Z[0]?Z[0]:null,!0),h(_)?h(_).validateField(c()):c().validate()};Ze(U,()=>({...h(C),...g,class:p(),type:"file",accept:"image/*",name:c().key,onchange:Y}),void 0,void 0,void 0,void 0,!0);var le=J(U,2);{var ce=me=>{var Z=sA(),ge=$(Z),B=J(ge,2),L=$(B,!0);T(B),T(Z),oe(be=>{Se(Z,"data-field-preview",c().key),Se(ge,"src",h(M)),Se(ge,"alt",be),te(L,c().value.name)},[()=>S.t("forms.file.preview_alt")||"User uploaded photo"]),w(me,Z)};ae(le,me=>{h(M)&&c().value instanceof File&&me(ce)})}oe(()=>{zt(G,1,Yr(f())),Se(G,"for",h(O))}),w(ne,W)},s=ne=>{var W=aA(),G=$(W);Ze(G,()=>({...h(C),...g,name:c().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var H=J(G,2),U=$(H);r(U),T(H),T(W),oe(()=>{zt(W,1,Yr(f())),Se(W,"for",h(O))}),Zy(G,()=>c().value===!0,Y=>{c(c().value=Y,!0)}),w(ne,W)},o=ne=>{var W=dA(),G=R(W),H=$(G);r(H),T(G);var U=J(G,2);Ze(U,()=>({...h(C),...g,name:c().key,class:p()})),zy(U,()=>{var Y=$(U),le=cA(),ce=R(le);{var me=Z=>{var ge=uA(),B=R(ge),L=$(B,!0);T(B),B.value=B.__value="";var be=J(B,2);Le(be,17,()=>c().options(),x=>x.value,(x,tt)=>{var Be=lA(),We=J(R(Be),2),Ct=$(We,!0);T(We);var rt={};oe(()=>{te(Ct,h(tt).label),rt!==(rt=h(tt).value)&&(We.value=(We.__value=h(tt).value)??"")}),w(x,Be)}),oe(x=>te(L,x),[()=>S.t("common.choose")]),w(Z,ge)};ae(ce,Z=>{c().options&&Z(me)})}w(Y,le)}),oe(()=>{zt(G,1,Yr(f())),Se(G,"for",h(O))}),My(U,()=>c().value,Y=>c(c().value=Y,!0)),w(ne,W)},a=ne=>{zg(ne,{get labelClass(){return f()},get inputClass(){return p()},get labelText(){return r},get dateString(){return c().value},set dateString(W){c(c().value=W,!0)}})},l=ne=>{const W=E(()=>S.payment_modes?Object.values(S.payment_modes):[]);var G=mA(),H=$(G),U=$(H);r(U),T(H);var Y=J(H,2);Le(Y,17,()=>h(W),le=>le.id,(le,ce)=>{var me=pA(),Z=$(me);Vo(Z),Z.__change=()=>{c(c().value=String(h(ce).id),!0)};var ge=J(Z,2);{var B=L=>{var be=hA();Le(be,20,()=>h(ce).icons,x=>x,(x,tt)=>{const Be=E(()=>N+tt+".svg");var We=fA();oe(()=>{zt(We,1,Yr(tt)),Se(We,"src",h(Be)),Se(We,"alt",tt+" icon")}),w(x,We)}),T(be),w(L,be)};ae(ge,L=>{h(ce).icons.length>0&&L(B)})}T(me),oe((L,be,x)=>{Se(Z,"name",c().key),zf(Z,L),Fy(Z,be),Se(Z,"hidden",h(W).length===1),Se(Z,"aria-label",x)},[()=>String(h(ce).id),()=>h(W).length===1||String(h(ce).id)===String(c().value),()=>S.t(`cart.paymentMode.ariaLabel.${h(ce).name.toLowerCase()}`)]),w(le,me)}),T(G),oe(()=>{Se(G,"aria-required",c().required),Se(G,"aria-invalid",c().errors.length>0)}),w(ne,G)},u=ne=>{var W=vA(),G=$(W),H=$(G);r(H),T(G);var U=J(G,2);{var Y=le=>{var ce=q(),me=R(ce);Le(me,17,()=>c().options,Er,(Z,ge)=>{var B=gA(),L=$(B),be=J(L);Ze(be,()=>({...h(C),...g,class:p(),type:"radio"}),void 0,void 0,void 0,void 0,!0),T(B),oe(()=>{zt(B,1,Yr(f())),Se(B,"for",h(O)+h(ge)),te(L,`${h(ge)??""} `)}),jl(be,()=>c().value,x=>c(c().value=x,!0)),w(Z,B)}),w(le,ce)};ae(U,le=>{c().options&&le(Y)})}T(W),w(ne,W)};let c=b(e,"field",15),d=b(e,"describedByIds",7),f=b(e,"labelClass",7),p=b(e,"inputClass",7),v=b(e,"host",7),g=Ue(e,["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]);const m=Ui(v()),_=E(()=>m.value),k={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:s,select:o,radio:u,date:a,file:i,textarea:null,paymentMode:l},D=E(()=>k[c().type]);let O=E(()=>e.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function P(){c().type!=="checkbox"&&c().value&&(h(_)?h(_).validateField(c()):c().validate())}const C=E(()=>({id:h(O),"aria-describedby":d(),"aria-required":c().required,"aria-invalid":c().errors.length>0,autocomplete:c().autocomplete,onblur:P}));let A=E(()=>S.t(c().label)||c().label);const N="https://cdn.shop.platform.gomus.de/";let M=ie(null);pe(()=>{const ne=c().value;if(ne instanceof File&&ne.type.startsWith("image/")){const W=URL.createObjectURL(ne);return I(M,W,!0),()=>{URL.revokeObjectURL(W),I(M,null)}}I(M,null)});var j={get field(){return c()},set field(ne){c(ne),y()},get describedByIds(){return d()},set describedByIds(ne){d(ne),y()},get labelClass(){return f()},set labelClass(ne){f(ne),y()},get inputClass(){return p()},set inputClass(ne){p(ne),y()},get host(){return v()},set host(ne){v(ne),y()}},se=q(),z=R(se);{var ue=ne=>{var W=q(),G=R(W);ve(G,()=>h(D)),w(ne,W)};ae(z,ne=>{h(D)&&ne(ue)})}return w(t,se),ee(j)}Sr(["change"]),re(Lg,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var yA=V("<span> </span>"),bA=V("<li> </li>"),_A=V('<ul class="go-field-errors"></ul>'),wA=V("<!> <!> <!>",1);function kA(t,e){X(e,!0);let r=b(e,"key",7),n=b(e,"required",7,!1),i=b(e,"labelClass",7),s=b(e,"inputClass",7),o=ie(Ne(Bt.createField(r(),n())));const a=Ui(e.$$host),l=E(()=>a.value),u=()=>h(o);let c=E(()=>h(o)?[...h(o).errors,...h(o).apiErrors].map(A=>S.t(A)):[]),d=E(()=>h(o)?.description),f=E(()=>h(c).length>0),p=E(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),v=E(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),g=E(()=>[h(d)&&h(p),h(f)&&h(v)].filter(Boolean).join(" ")||void 0);pe(()=>{e.$$host.classList.toggle("go-field",!0),e.$$host.classList.toggle("is-invalid",h(c).length>0)}),e.$$host.dataset.testid=r(),pe(()=>{h(o)&&(h(o).mounted=!0,h(o).value,Ve(()=>{h(o)?.errors.length&&h(l).validateField(h(o))}))});var m={getField:u,get key(){return r()},set key(A){r(A),y()},get required(){return n()},set required(A=!1){n(A),y()},get labelClass(){return i()},set labelClass(A){i(A),y()},get inputClass(){return s()},set inputClass(A){s(A),y()}},_=wA(),k=R(_);Lg(k,{get describedByIds(){return h(g)},get labelClass(){return i()},get inputClass(){return s()},host:e.$$host,get field(){return h(o)},set field(A){I(o,A,!0)}});var D=J(k,2);{var O=A=>{var N=yA(),M=$(N,!0);T(N),oe(()=>{Se(N,"id",h(p)),te(M,h(o).description)}),w(A,N)};ae(D,A=>{h(d)&&A(O)})}var P=J(D,2);{var C=A=>{var N=_A();Le(N,21,()=>h(c),Er,(M,j)=>{var se=bA(),z=$(se,!0);T(se),oe(()=>te(z,h(j))),w(M,se)}),T(N),oe(()=>Se(N,"id",h(v))),w(A,N)};ae(P,A=>{h(f)&&A(C)})}return w(t,_),ee(m)}customElements.define("go-field",re(kA,{key:{attribute:"key",reflect:!0,type:"String"},required:{attribute:"required",reflect:!0,type:"Boolean"},labelClass:{attribute:"label-class",reflect:!0,type:"String"},inputClass:{attribute:"input-class",reflect:!0,type:"String"}},[],["getField"]));var SA=V("<go-field></go-field>",2);function xA(t,e){X(e,!0);let r=Ui(e.$$host),n=E(()=>r.value),i=E(()=>h(n)?Bt.getFormFields(h(n)?.formId):[]);var s=q(),o=R(s);Le(o,17,()=>h(i),a=>a.key,(a,l)=>{var u=SA();oe(()=>Yn(u,"key",h(l).key)),oe(()=>Yn(u,"required",h(l).required)),w(a,u)}),w(t,s),ee()}customElements.define("go-all-fields",re(xA,{},[],[]));var EA=V('<p aria-hidden="true"> </p>'),CA=V("<li> </li>"),OA=V('<ul class="go-error-feedback-api-errors"></ul>'),TA=V('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function AA(t,e){X(e,!0);const r=Ui(e.$$host),n=E(()=>r.value);pe(()=>{h(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Nu(h(n)?.fields),!0)})});let i=ie(0);setInterval(()=>{I(i,Nu(h(n)?.fields)||0,!0)},100);let s=E(()=>h(i)+(h(n)?.apiErrors?.length||0)),o=ie(-1);pe(()=>{e.$$host.classList.toggle("is-invalid",h(s)>0),e.$$host.classList.toggle("go-feedback",!0),e.$$host.setAttribute("data-num-errors",h(s).toString())});var a=TA(),l=$(a),u=$(l);{var c=g=>{var m=It();oe(_=>te(m,_),[()=>S.t("forms.errorSummary",{count:h(o)})]),w(g,m)};ae(u,g=>{h(o)>0&&g(c)})}T(l);var d=J(l,2);{var f=g=>{var m=EA(),_=$(m,!0);T(m),oe(k=>te(_,k),[()=>S.t("forms.errorSummary",{count:h(i)})]),w(g,m)};ae(d,g=>{h(i)>0&&g(f)})}var p=J(d,2);{var v=g=>{var m=OA();Le(m,21,()=>h(n)?.apiErrors,Er,(_,k)=>{var D=CA(),O=$(D,!0);T(D),oe(()=>te(O,h(k))),w(_,D)}),T(m),w(g,m)};ae(p,g=>{h(n)&&Hl(h(n).apiErrors)&&h(n).apiErrors.length>0&&g(v)})}T(a),w(t,a),ee()}customElements.define("go-errors-feedback",re(AA,{},[],[]));var DA=V('<div class="go-form-feedback"><!></div>');function IA(t,e){var r=DA(),n=$(r);Ay(n,e,"default",{}),T(r),w(t,r)}customElements.define("go-form-feedback",re(IA,{},["default"],[]));function PA(t,e){X(e,!0);let r=b(e,"buttonClass",7,"");Hr(()=>{oi(e.$$host,"button",{type:"submit",class:r()})});var n={get buttonClass(){return r()},set buttonClass(i=""){r(i),y()}};return ee(n)}customElements.define("go-submit",re(PA,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var $A=V('<div aria-live="assertive"> </div>');function MA(t,e){X(e,!0);const r=Ui(e.$$host),n=E(()=>r.value);var i=q(),s=R(i);{var o=a=>{var l=$A();let u;var c=$(l,!0);T(l),oe(()=>{u=zt(l,1,"go-success-feedback go-feedback",null,u,{"is-successful":h(n).successMessage}),te(c,h(n)?.successMessage)}),w(a,l)};ae(s,a=>{h(n)?.successMessage&&a(o)})}w(t,i),ee()}customElements.define("go-success-feedback",re(MA,{},[],[]));var tr="INUMBER",es="IOP1",ts="IOP2",rs="IOP3",ln="IVAR",fi="IVARNAME",ns="IFUNCALL",Qa="IFUNDEF",$t="IEXPR",ad="IEXPREVAL",hi="IMEMBER",Xa="IENDSTATEMENT",is="IARRAY";function $e(t,e){this.type=t,this.value=e??0}$e.prototype.toString=function(){switch(this.type){case tr:case es:case ts:case rs:case ln:case fi:case Xa:return this.value;case ns:return"CALL "+this.value;case Qa:return"DEF "+this.value;case is:return"ARRAY "+this.value;case hi:return"."+this.value;default:return"Invalid Instruction"}};function el(t){return new $e(es,t)}function un(t){return new $e(ts,t)}function Zg(t){return new $e(rs,t)}function ld(t,e,r,n,i){for(var s=[],o=[],a,l,u,c,d=0;d<t.length;d++){var f=t[d],p=f.type;if(p===tr||p===fi)Array.isArray(f.value)?s.push.apply(s,ld(f.value.map(function(v){return new $e(tr,v)}).concat(new $e(is,f.value.length)),e,r,n,i)):s.push(f);else if(p===ln&&i.hasOwnProperty(f.value))f=new $e(tr,i[f.value]),s.push(f);else if(p===ts&&s.length>1)l=s.pop(),a=s.pop(),c=r[f.value],f=new $e(tr,c(a.value,l.value)),s.push(f);else if(p===rs&&s.length>2)u=s.pop(),l=s.pop(),a=s.pop(),f.value==="?"?s.push(a.value?l.value:u.value):(c=n[f.value],f=new $e(tr,c(a.value,l.value,u.value)),s.push(f));else if(p===es&&s.length>0)a=s.pop(),c=e[f.value],f=new $e(tr,c(a.value)),s.push(f);else if(p===$t){for(;s.length>0;)o.push(s.shift());o.push(new $e($t,ld(f.value,e,r,n,i)))}else if(p===hi&&s.length>0)a=s.pop(),s.push(new $e(tr,a.value[f.value]));else{for(;s.length>0;)o.push(s.shift());o.push(f)}}for(;s.length>0;)o.push(s.shift());return o}function Vg(t,e,r){for(var n=[],i=0;i<t.length;i++){var s=t[i],o=s.type;if(o===ln&&s.value===e)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],u;l.type===es?u=el(l.value):l.type===ts?u=un(l.value):l.type===rs?u=Zg(l.value):u=new $e(l.type,l.value),n.push(u)}else o===$t?n.push(new $e($t,Vg(s.value,e,r))):n.push(s)}return n}function pi(t,e,r){var n=[],i,s,o,a,l,u;if(ud(t))return cn(t,r);for(var c=t.length,d=0;d<c;d++){var f=t[d],p=f.type;if(p===tr||p===fi)n.push(f.value);else if(p===ts)s=n.pop(),i=n.pop(),f.value==="and"?n.push(i?!!pi(s,e,r):!1):f.value==="or"?n.push(i?!0:!!pi(s,e,r)):f.value==="="?(a=e.binaryOps[f.value],n.push(a(i,pi(s,e,r),r))):(a=e.binaryOps[f.value],n.push(a(cn(i,r),cn(s,r))));else if(p===rs)o=n.pop(),s=n.pop(),i=n.pop(),f.value==="?"?n.push(pi(i?s:o,e,r)):(a=e.ternaryOps[f.value],n.push(a(cn(i,r),cn(s,r),cn(o,r))));else if(p===ln)if(f.value in e.functions)n.push(e.functions[f.value]);else if(f.value in e.unaryOps&&e.parser.isOperatorEnabled(f.value))n.push(e.unaryOps[f.value]);else{var v=r[f.value];if(v!==void 0)n.push(v);else throw new Error("undefined variable: "+f.value)}else if(p===es)i=n.pop(),a=e.unaryOps[f.value],n.push(a(cn(i,r)));else if(p===ns){for(u=f.value,l=[];u-- >0;)l.unshift(cn(n.pop(),r));if(a=n.pop(),a.apply&&a.call)n.push(a.apply(void 0,l));else throw new Error(a+" is not a function")}else if(p===Qa)n.push((function(){for(var g=n.pop(),m=[],_=f.value;_-- >0;)m.unshift(n.pop());var k=n.pop(),D=function(){for(var O=Object.assign({},r),P=0,C=m.length;P<C;P++)O[m[P]]=arguments[P];return pi(g,e,O)};return Object.defineProperty(D,"name",{value:k,writable:!1}),r[k]=D,D})());else if(p===$t)n.push(FA(f,e));else if(p===ad)n.push(f);else if(p===hi)i=n.pop(),n.push(i[f.value]);else if(p===Xa)n.pop();else if(p===is){for(u=f.value,l=[];u-- >0;)l.unshift(n.pop());n.push(l)}else throw new Error("invalid Expression")}if(n.length>1)throw new Error("invalid Expression (parity)");return n[0]===0?0:cn(n[0],r)}function FA(t,e,r){return ud(t)?t:{type:ad,value:function(n){return pi(t.value,e,n)}}}function ud(t){return t&&t.type===ad}function cn(t,e){return ud(t)?t.value(e):t}function cd(t,e){for(var r=[],n,i,s,o,a,l,u=0;u<t.length;u++){var c=t[u],d=c.type;if(d===tr)typeof c.value=="number"&&c.value<0?r.push("("+c.value+")"):Array.isArray(c.value)?r.push("["+c.value.map(jg).join(", ")+"]"):r.push(jg(c.value));else if(d===ts)i=r.pop(),n=r.pop(),o=c.value,e?o==="^"?r.push("Math.pow("+n+", "+i+")"):o==="and"?r.push("(!!"+n+" && !!"+i+")"):o==="or"?r.push("(!!"+n+" || !!"+i+")"):o==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):o==="=="?r.push("("+n+" === "+i+")"):o==="!="?r.push("("+n+" !== "+i+")"):o==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+o+" "+i+")"):o==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+o+" "+i+")");else if(d===rs)if(s=r.pop(),i=r.pop(),n=r.pop(),o=c.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(d===ln||d===fi)r.push(c.value);else if(d===es)n=r.pop(),o=c.value,o==="-"||o==="+"?r.push("("+o+n+")"):e?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(d===ns){for(l=c.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(d===Qa){for(i=r.pop(),l=c.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),e?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(d===hi)n=r.pop(),r.push(n+"."+c.value);else if(d===is){for(l=c.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(d===$t)r.push("("+cd(c.value,e)+")");else if(d!==Xa)throw new Error("invalid Expression")}return r.length>1&&(e?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function jg(t){return typeof t=="string"?JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):t}function ss(t,e){for(var r=0;r<t.length;r++)if(t[r]===e)return!0;return!1}function dd(t,e,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<t.length;s++){var o=t[s];o.type===ln||o.type===fi?!n&&!ss(e,o.value)?e.push(o.value):(i!==null&&(ss(e,i)||e.push(i)),i=o.value):o.type===hi&&n&&i!==null?i+="."+o.value:o.type===$t?dd(o.value,e,r):i!==null&&(ss(e,i)||e.push(i),i=null)}i!==null&&!ss(e,i)&&e.push(i)}function gr(t,e){this.tokens=t,this.parser=e,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.functions=e.functions}gr.prototype.simplify=function(t){return t=t||{},new gr(ld(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,t),this.parser)},gr.prototype.substitute=function(t,e){return e instanceof gr||(e=this.parser.parse(String(e))),new gr(Vg(this.tokens,t,e),this.parser)},gr.prototype.evaluate=function(t){return t=t||{},pi(this.tokens,this,t)},gr.prototype.toString=function(){return cd(this.tokens,!1)},gr.prototype.symbols=function(t){t=t||{};var e=[];return dd(this.tokens,e,t),e},gr.prototype.variables=function(t){t=t||{};var e=[];dd(this.tokens,e,t);var r=this.functions;return e.filter(function(n){return!(n in r)})},gr.prototype.toJSFunction=function(t,e){var r=this,n=new Function(t,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+cd(this.simplify(e).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var mo="TEOF",qe="TOP",tl="TNUMBER",Bg="TSTRING",dn="TPAREN",os="TBRACKET",rl="TCOMMA",fd="TNAME",hd="TSEMICOLON";function Ug(t,e,r){this.type=t,this.value=e,this.index=r}Ug.prototype.toString=function(){return this.type+": "+this.value};function nt(t,e){this.pos=0,this.current=null,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.consts=t.consts,this.expression=e,this.savedPosition=0,this.savedCurrent=null,this.options=t.options,this.parser=t}nt.prototype.newToken=function(t,e,r){return new Ug(t,e,r??this.pos)},nt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},nt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},nt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(mo,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},nt.prototype.isString=function(){var t=!1,e=this.pos,r=this.expression.charAt(e);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,e+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(e+1,n);this.current=this.newToken(Bg,this.unescape(i),e),t=!0;break}n=this.expression.indexOf(r,n+1)}return t},nt.prototype.isParen=function(){var t=this.expression.charAt(this.pos);return t==="("||t===")"?(this.current=this.newToken(dn,t),this.pos++,!0):!1},nt.prototype.isBracket=function(){var t=this.expression.charAt(this.pos);return(t==="["||t==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(os,t),this.pos++,!0):!1},nt.prototype.isComma=function(){var t=this.expression.charAt(this.pos);return t===","?(this.current=this.newToken(rl,","),this.pos++,!0):!1},nt.prototype.isSemicolon=function(){var t=this.expression.charAt(this.pos);return t===";"?(this.current=this.newToken(hd,";"),this.pos++,!0):!1},nt.prototype.isConst=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(n in this.consts)return this.current=this.newToken(tl,this.consts[n]),this.pos+=n.length,!0}return!1},nt.prototype.isNamedOp=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(qe,n),this.pos+=n.length,!0}return!1},nt.prototype.isName=function(){for(var t=this.pos,e=t,r=!1;e<this.expression.length;e++){var n=this.expression.charAt(e);if(n.toUpperCase()===n.toLowerCase()){if(e===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(e===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(t,e);return this.current=this.newToken(fd,i),this.pos+=i.length,!0}return!1},nt.prototype.isWhitespace=function(){for(var t=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===`
10
- `||e==="\r")&&(t=!0,this.pos++,!(this.pos>=this.expression.length));)e=this.expression.charAt(this.pos);return t};var NA=/^[0-9a-f]{4}$/i;nt.prototype.unescape=function(t){var e=t.indexOf("\\");if(e<0)return t;for(var r=t.substring(0,e);e>=0;){var n=t.charAt(++e);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
11
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=t.substring(e+1,e+5);NA.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),e+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++e;var s=t.indexOf("\\",e);r+=t.substring(e,s<0?t.length:s),e=s}return r},nt.prototype.isComment=function(){var t=this.expression.charAt(this.pos);return t==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},nt.prototype.isRadixInteger=function(){var t=this.pos;if(t>=this.expression.length-2||this.expression.charAt(t)!=="0")return!1;++t;var e,r;if(this.expression.charAt(t)==="x")e=16,r=/^[0-9a-f]$/i,++t;else if(this.expression.charAt(t)==="b")e=2,r=/^[01]$/i,++t;else return!1;for(var n=!1,i=t;t<this.expression.length;){var s=this.expression.charAt(t);if(r.test(s))t++,n=!0;else break}return n&&(this.current=this.newToken(tl,parseInt(this.expression.substring(i,t),e)),this.pos=t),n},nt.prototype.isNumber=function(){for(var t=!1,e=this.pos,r=e,n=e,i=!1,s=!1,o;e<this.expression.length&&(o=this.expression.charAt(e),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,e++,t=s;if(t&&(n=e),o==="e"||o==="E"){e++;for(var a=!0,l=!1;e<this.expression.length;){if(o=this.expression.charAt(e),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;e++}l||(e=n)}return t?(this.current=this.newToken(tl,parseFloat(this.expression.substring(r,e))),this.pos=e):this.pos=n,t},nt.prototype.isOperator=function(){var t=this.pos,e=this.expression.charAt(this.pos);if(e==="+"||e==="-"||e==="*"||e==="/"||e==="%"||e==="^"||e==="?"||e===":"||e===".")this.current=this.newToken(qe,e);else if(e==="∙"||e==="•")this.current=this.newToken(qe,"*");else if(e===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(qe,">="),this.pos++):this.current=this.newToken(qe,">");else if(e==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(qe,"<="),this.pos++):this.current=this.newToken(qe,"<");else if(e==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(qe,"||"),this.pos++;else return!1;else if(e==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(qe,"=="),this.pos++):this.current=this.newToken(qe,e);else if(e==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(qe,"!="),this.pos++):this.current=this.newToken(qe,e);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=t,!1)},nt.prototype.isOperatorEnabled=function(t){return this.parser.isOperatorEnabled(t)},nt.prototype.getCoordinates=function(){var t=0,e,r=-1;do t++,e=this.pos-r,r=this.expression.indexOf(`
12
- `,r+1);while(r>=0&&r<this.pos);return{line:t,column:e}},nt.prototype.parseError=function(t){var e=this.getCoordinates();throw new Error("parse error ["+e.line+":"+e.column+"]: "+t)};function He(t,e,r){this.parser=t,this.tokens=e,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}He.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},He.prototype.tokenMatches=function(t,e){return typeof e>"u"?!0:Array.isArray(e)?ss(e,t.value):typeof e=="function"?e(t):t.value===e},He.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},He.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},He.prototype.accept=function(t,e){return this.nextToken.type===t&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1},He.prototype.expect=function(t,e){if(!this.accept(t,e)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(e||t))}},He.prototype.parseAtom=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.accept(fd)||this.accept(qe,r))t.push(new $e(ln,this.current.value));else if(this.accept(tl))t.push(new $e(tr,this.current.value));else if(this.accept(Bg))t.push(new $e(tr,this.current.value));else if(this.accept(dn,"("))this.parseExpression(t),this.expect(dn,")");else if(this.accept(os,"["))if(this.accept(os,"]"))t.push(new $e(is,0));else{var n=this.parseArrayList(t);t.push(new $e(is,n))}else throw new Error("unexpected "+this.nextToken)},He.prototype.parseExpression=function(t){var e=[];this.parseUntilEndStatement(t,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(t,e)&&this.pushExpression(t,e))},He.prototype.pushExpression=function(t,e){for(var r=0,n=e.length;r<n;r++)t.push(e[r])},He.prototype.parseUntilEndStatement=function(t,e){return this.accept(hd)?(this.nextToken&&this.nextToken.type!==mo&&!(this.nextToken.type===dn&&this.nextToken.value===")")&&e.push(new $e(Xa)),this.nextToken.type!==mo&&this.parseExpression(e),t.push(new $e($t,e)),!0):!1},He.prototype.parseArrayList=function(t){for(var e=0;!this.accept(os,"]");)for(this.parseExpression(t),++e;this.accept(rl);)this.parseExpression(t),++e;return e},He.prototype.parseVariableAssignmentExpression=function(t){for(this.parseConditionalExpression(t);this.accept(qe,"=");){var e=t.pop(),r=[],n=t.length-1;if(e.type===ns){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=e.value+1;i<s;i++){var o=n-i;t[o].type===ln&&(t[o]=new $e(fi,t[o].value))}this.parseVariableAssignmentExpression(r),t.push(new $e($t,r)),t.push(new $e(Qa,e.value));continue}if(e.type!==ln&&e.type!==hi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),t.push(new $e(fi,e.value)),t.push(new $e($t,r)),t.push(un("="))}},He.prototype.parseConditionalExpression=function(t){for(this.parseOrExpression(t);this.accept(qe,"?");){var e=[],r=[];this.parseConditionalExpression(e),this.expect(qe,":"),this.parseConditionalExpression(r),t.push(new $e($t,e)),t.push(new $e($t,r)),t.push(Zg("?"))}},He.prototype.parseOrExpression=function(t){for(this.parseAndExpression(t);this.accept(qe,"or");){var e=[];this.parseAndExpression(e),t.push(new $e($t,e)),t.push(un("or"))}},He.prototype.parseAndExpression=function(t){for(this.parseComparison(t);this.accept(qe,"and");){var e=[];this.parseComparison(e),t.push(new $e($t,e)),t.push(un("and"))}};var RA=["==","!=","<","<=",">=",">","in"];He.prototype.parseComparison=function(t){for(this.parseAddSub(t);this.accept(qe,RA);){var e=this.current;this.parseAddSub(t),t.push(un(e.value))}};var zA=["+","-","||"];He.prototype.parseAddSub=function(t){for(this.parseTerm(t);this.accept(qe,zA);){var e=this.current;this.parseTerm(t),t.push(un(e.value))}};var LA=["*","/","%"];He.prototype.parseTerm=function(t){for(this.parseFactor(t);this.accept(qe,LA);){var e=this.current;this.parseFactor(t),t.push(un(e.value))}},He.prototype.parseFactor=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.save(),this.accept(qe,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===dn&&this.nextToken.value==="("){this.restore(),this.parseExponential(t);return}else if(this.nextToken.type===hd||this.nextToken.type===rl||this.nextToken.type===mo||this.nextToken.type===dn&&this.nextToken.value===")"){this.restore(),this.parseAtom(t);return}}var n=this.current;this.parseFactor(t),t.push(el(n.value))}else this.parseExponential(t)},He.prototype.parseExponential=function(t){for(this.parsePostfixExpression(t);this.accept(qe,"^");)this.parseFactor(t),t.push(un("^"))},He.prototype.parsePostfixExpression=function(t){for(this.parseFunctionCall(t);this.accept(qe,"!");)t.push(el("!"))},He.prototype.parseFunctionCall=function(t){var e=this.tokens.unaryOps;function r(s){return s.value in e}if(this.accept(qe,r)){var n=this.current;this.parseAtom(t),t.push(el(n.value))}else for(this.parseMemberExpression(t);this.accept(dn,"(");)if(this.accept(dn,")"))t.push(new $e(ns,0));else{var i=this.parseArgumentList(t);t.push(new $e(ns,i))}},He.prototype.parseArgumentList=function(t){for(var e=0;!this.accept(dn,")");)for(this.parseExpression(t),++e;this.accept(rl);)this.parseExpression(t),++e;return e},He.prototype.parseMemberExpression=function(t){for(this.parseAtom(t);this.accept(qe,".")||this.accept(os,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(fd),t.push(new $e(hi,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(t),this.expect(os,"]"),t.push(un("["))}else throw new Error("unexpected symbol: "+e.value)}};function ZA(t,e){return Number(t)+Number(e)}function VA(t,e){return t-e}function jA(t,e){return t*e}function BA(t,e){return t/e}function UA(t,e){return t%e}function qA(t,e){return Array.isArray(t)&&Array.isArray(e)?t.concat(e):""+t+e}function WA(t,e){return t===e}function KA(t,e){return t!==e}function HA(t,e){return t>e}function YA(t,e){return t<e}function GA(t,e){return t>=e}function JA(t,e){return t<=e}function QA(t,e){return!!(t&&e)}function XA(t,e){return!!(t||e)}function eD(t,e){return ss(e,t)}function tD(t){return(Math.exp(t)-Math.exp(-t))/2}function rD(t){return(Math.exp(t)+Math.exp(-t))/2}function nD(t){return t===1/0?1:t===-1/0?-1:(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))}function iD(t){return t===-1/0?t:Math.log(t+Math.sqrt(t*t+1))}function sD(t){return Math.log(t+Math.sqrt(t*t-1))}function oD(t){return Math.log((1+t)/(1-t))/2}function qg(t){return Math.log(t)*Math.LOG10E}function aD(t){return-t}function lD(t){return!t}function uD(t){return t<0?Math.ceil(t):Math.floor(t)}function cD(t){return Math.random()*(t||1)}function Wg(t){return md(t+1)}function dD(t){return isFinite(t)&&t===Math.round(t)}var fD=4.7421875,pd=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function md(t){var e,r;if(dD(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var n=t-2,i=t-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*md(1-t));if(t>=171.35)return 1/0;if(t>85){var s=t*t,o=s*t,a=o*t,l=a*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*t))}--t,r=pd[0];for(var u=1;u<pd.length;++u)r+=pd[u]/(t+u);return e=t+fD+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*r}function hD(t){return Array.isArray(t)?t.length:String(t).length}function Kg(){for(var t=0,e=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;e<n?(i=e/n,t=t*i*i+1,e=n):n>0?(i=n/e,t+=i*i):t+=n}return e===1/0?1/0:e*Math.sqrt(t)}function Hg(t,e,r){return t?e:r}function pD(t,e){return typeof e>"u"||+e==0?Math.round(t):(t=+t,e=-+e,isNaN(t)||!(typeof e=="number"&&e%1===0)?NaN:(t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function mD(t,e,r){return r&&(r[t]=e),e}function gD(t,e){return t[e|0]}function vD(t){return arguments.length===1&&Array.isArray(t)?Math.max.apply(Math,t):Math.max.apply(Math,arguments)}function yD(t){return arguments.length===1&&Array.isArray(t)?Math.min.apply(Math,t):Math.min.apply(Math,arguments)}function bD(t,e){if(typeof t!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(r,n){return t(r,n)})}function _D(t,e,r){if(typeof t!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return t(n,i,s)},e)}function wD(t,e){if(typeof t!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(r,n){return t(r,n)})}function kD(t,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(t)}function SD(t,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(t)}function xD(t){return(t>0)-(t<0)||+t}var Yg=1/3;function ED(t){return t<0?-Math.pow(-t,Yg):Math.pow(t,Yg)}function CD(t){return Math.exp(t)-1}function OD(t){return Math.log(1+t)}function TD(t){return Math.log(t)/Math.LN2}function mi(t){this.options=t||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||tD,cosh:Math.cosh||rD,tanh:Math.tanh||nD,asinh:Math.asinh||iD,acosh:Math.acosh||sD,atanh:Math.atanh||oD,sqrt:Math.sqrt,cbrt:Math.cbrt||ED,log:Math.log,log2:Math.log2||TD,ln:Math.log,lg:Math.log10||qg,log10:Math.log10||qg,expm1:Math.expm1||CD,log1p:Math.log1p||OD,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||uD,"-":aD,"+":Number,exp:Math.exp,not:lD,length:hD,"!":Wg,sign:Math.sign||xD},this.binaryOps={"+":ZA,"-":VA,"*":jA,"/":BA,"%":UA,"^":Math.pow,"||":qA,"==":WA,"!=":KA,">":HA,"<":YA,">=":GA,"<=":JA,and:QA,or:XA,in:eD,"=":mD,"[":gD},this.ternaryOps={"?":Hg},this.functions={random:cD,fac:Wg,min:yD,max:vD,hypot:Math.hypot||Kg,pyt:Math.hypot||Kg,pow:Math.pow,atan2:Math.atan2,if:Hg,gamma:md,roundTo:pD,map:bD,fold:_D,filter:wD,indexOf:kD,join:SD},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}mi.prototype.parse=function(t){var e=[],r=new He(this,new nt(this,t),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(e),r.expect(mo,"EOF"),new gr(e,this)},mi.prototype.evaluate=function(t,e){return this.parse(t).evaluate(e)};var Gg=new mi;mi.parse=function(t){return Gg.parse(t)},mi.evaluate=function(t,e){return Gg.parse(t).evaluate(e)};var Jg={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function AD(t){return Jg.hasOwnProperty(t)?Jg[t]:t}mi.prototype.isOperatorEnabled=function(t){var e=AD(t),r=this.options.operators||{};return!(e in r)||!!r[e]};const DD=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,ID=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,PD=/(__optional\("[^"]+"\))\.length\b/g,$D=new mi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Qg=new Map;function MD(t){return t.replace(DD,e=>e.includes("?.")?`__optional("${e.replace(/\?\./g,".")}")`:e).replace(ID,(e,r)=>`__length(${r})`).replace(PD,(e,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function FD(t){const e=Qg.get(t);if(e)return e;const r=$D.parse(MD(t));return Qg.set(t,r),r}function ND(t,e){if(t==null||typeof t!="string")return t;const r={data:e,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=FD(t);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${t}) in go-if: ${n.message}`)}}const Xg=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price"],RD={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.selectedDate)return;const{quotas:e}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));S.capacityManager.addQuotas(e)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTimeslot)return;const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));S.capacityManager.addQuotas(n);const i=Fn(r,e.selectedTime),s=Mn(i,e.selectedTime);for(const o of s)t.preCart.addItem(pt(o,{time:e.selectedTime}))}},zD={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate)return;const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));S.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=Fn(r,s),a=Mn(o,s);for(const l of a)t.preCart.addItem(pt(l,{time:s}))}},LD={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e)return;const r=await S.asyncFetch(()=>S.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));for(const n of Object.values(r))t.preCart.addItem(pt(sa(n)))}},ZD={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!(await S.asyncFetch(()=>S.getEvent(e.eventIds[0]))).tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),date_id:t.dateId}));S.capacityManager.addQuotas(i);const s=Fn(n,e.selectedTime),o=Mn(s,e.selectedTime);for(const a of o)t.preCart.addItem(pt(a,{time:e.selectedTime}))}},VD={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate)return;const r=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:e.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=Fn(n,o),l=Mn(a,o);for(const u of l)t.preCart.addItem(pt(u,{time:o}))}},jD={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!e.selectedTimeslot)return;const r=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Fn(n,e.selectedTime),o=Mn(s,e.selectedTime);for(const a of o)t.preCart.addItem(pt(a,{time:e.selectedTime}))}},BD={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||t.dateId===void 0)return;const r=await S.asyncFetch(()=>S.getEventDetailsOnDate(e.eventIds[0],t.dateId));if(r.prices?.length){for(const n of r.prices){const i=wu(n,r.id,{event_title:r.event_title});t.preCart.addItem(pt(i,{time:r.start_time}))}r.seats&&S.capacityManager.addSeats(r.id,r.seats)}}},UD=7200*1e3;function nl(t,e,r){const n=Date.parse(r);return t.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===e&&o>=n&&o<=n+UD&&(i.seats?.available??0)>0})}async function il(t){if(!t?.selectedDate)return;const{quotas:e}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));S.capacityManager.addQuotas(e)}const qD={"ticket:timeslot":RD,"ticket:day":zD,"ticket:annual":LD,"event:admission":ZD,"event:admission:day":VD,"event:admission:timeslot":jD,"event:price":BD,"events:admission":{name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=Fn(o,i.start_time),u=Mn(l,i.start_time);for(const c of u)t.preCart.addItem(pt(c,{time:i.start_time}))}}},"events:admission:day":{name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=Object.values(a)[0],u=l?Object.keys(l.capacities)[0]:i.start_time,c=Fn(o,u),d=Mn(c,u);for(const f of d)t.preCart.addItem(pt(f,{time:u}))}}},"events:admission:timeslot":{name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=Fn(o,i.start_time),u=Mn(l,i.start_time);for(const c of u)t.preCart.addItem(pt(c,{time:i.start_time}))}}},"events:price":{name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime),i=t.query;for(const s of n){if(!s.prices?.length)continue;const o=i?s.prices.filter(a=>a.title?.includes(i)):s.prices;for(const a of o){const l=wu(a,s.id,{event_title:s.event_title});t.preCart.addItem(pt(l,{time:s.start_time}))}s.seats&&S.capacityManager.addSeats(s.id,s.seats)}}}};function gi(t){const e=qD[t];return e||console.warn(`[ticket-selection] Unknown filter "${t}". Valid filters: ${Xg.join(", ")}`),e}const ev=Xg;let WD=0;class KD{uid=WD++;#e=ie();get filters(){return h(this.#e)}set filters(e){I(this.#e,e,!0)}#t=ie();get eventIds(){return h(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=ie();get museumIds(){return h(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=ie();get exhibitionIds(){return h(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=ie();get ticketIds(){return h(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=ie();get ticketGroupIds(){return h(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=ie();get selectedDate(){return h(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=ie();get selectedTimeslot(){return h(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}#l=E(()=>this.selectedTimeslot);get selectedTime(){return h(this.#l)}set selectedTime(e){I(this.#l,e)}#u=ie(Ne([]));get ticketSegments(){return h(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#d=E(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return h(this.#d)}set preCarts(e){I(this.#d,e)}#c=ie();get timeslotDetails(){return h(this.#c)}set timeslotDetails(e){I(this.#c,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>gi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>gi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>gi(e).isTicketsVisible(this))}}const tv="go-ticket-selection",HD=Li(tv),fn=Zi(tv);function YD(t,e){X(e,!0);let r=b(e,"when",7),n=b(e,"then",7,"show");const i=fn(e.$$host),s=E(()=>i.value),o=Tw(e.$$host),a=E(()=>o.value),l=Ui(e.$$host),u=E(()=>l.value),c=qi(e.$$host),d=E(()=>c.value);let f=E(()=>({ticketSelection:h(s),personalizationDetails:h(a),formData:h(u)?.formData,cart:S.cart,cartView:h(d)}));const p=k=>{I(f,k)},v=()=>h(f);let g=E(()=>ND(r(),h(f))),m=null;pe(()=>{const k=e.$$host;if(h(g)&&n()==="show")m&&(k.appendChild(m),m=null);else if(!m&&k.childNodes.length>0)for(m=document.createDocumentFragment();k.firstChild;)m.appendChild(k.firstChild)});var _={_setData:p,_getData:v,get when(){return r()},set when(k){r(k),y()},get then(){return n()},set then(k="show"){n(k),y()}};return ee(_)}customElements.define("go-if",re(YD,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function rv(t,e){X(e,!0);let r=b(e,"apiUrl",7),n=b(e,"shopDomain",7),i=b(e,"locale",7);i(i()||localStorage.getItem("lang")||"en"),pe(()=>{(n()!==S.shopDomain||r()!==S.apiUrl||i()!==S.locale)&&(S.load(r(),n(),i()),console.warn("shop loaded due to prop change"))});var s={get apiUrl(){return r()},set apiUrl(o){r(o),y()},get shopDomain(){return n()},set shopDomain(o){n(o),y()},get locale(){return i()},set locale(o){i(o),y()}};return ee(s)}customElements.define("gomus-init",re(rv,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function GD(t,e){X(e,!0);let r=b(e,"apiDomain",7),n=b(e,"shopDomain",7),i=b(e,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),y()},get shopDomain(){return n()},set shopDomain(a){n(a),y()},get locale(){return i()},set locale(a){i(a),y()}};return rv(t,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ee(o)}customElements.define("go-init",re(GD,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function JD(t,e){X(e,!0);const r=b(e,"to",7),n=E(()=>Qe.config.urls[r()]),i=oi(e.$$host,"a");pe(()=>{if(!h(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",h(n)())}),i.addEventListener("click",o=>{if(o.preventDefault(),!Qe.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}Qe.config.navigateTo(Qe.config.urls[r()]())});var s={get to(){return r()},set to(o){r(o),y()}};return ee(s)}customElements.define("go-link",re(JD,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));class QD{#e=ie();get token(){return h(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){return this.token?gl(S.order(this.token)):void 0}downloadLink(e,r){if(this.order?.is_valid)switch(e.type){case"Event":return`${S.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Qe.config.urls.annualTicketPersonalizationList?.()?Qe.config.urls.annualTicketPersonalizationList(this.token):S.urls?.annualTicketPersonalizationList(this.token):`${S.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}&barcode_id=${r}`}}}const nv="go-order-details",XD=Li(nv),iv=Zi(nv);function eI(t,e){X(e,!0);let r=b(e,"token",7);const n=new QD(r());XD(e.$$host,n),Hr(()=>{S.cart.clearItems(),S.auth.isGuest()&&S.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return ee(i)}customElements.define("go-order",re(eI,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var tI=V('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),rI=V('<br/> <span class="go-order-item-quantities"> </span>',1),nI=V('<a aria-label="iCal link"> </a>'),iI=V('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function sv(t,e){X(e,!0);let r=b(e,"item",7),n=b(e,"orderDetails",7);var i={get item(){return r()},set item(P){r(P),y()},get orderDetails(){return n()},set orderDetails(P){n(P),y()}},s=iI(),o=$(s),a=$(o),l=J($(a),2),u=$(l),c=$(u,!0);T(u);var d=J(u,2);{var f=P=>{var C=tI(),A=R(C),N=$(A,!0);T(A);var M=J(A,2),j=$(M,!0);T(M),oe((se,z)=>{te(N,se),te(j,z)},[()=>qs(r().attributes.start_time,{month:"numeric",day:"numeric"},S.locale),()=>Us(r().attributes.start_time)]),w(P,C)};ae(d,P=>{r().attributes.start_time&&P(f)})}var p=J(d,2);Le(p,17,()=>r().attributes.quantities,P=>P.id,(P,C)=>{var A=rI(),N=J(R(A),2),M=$(N);T(N),oe(()=>te(M,`${h(C).quantity??""} x ${h(C).title??""}`)),w(P,A)});var v=J(p,2),g=$(v,!0);T(v),T(l);var m=J(l,2),_=$(m,!0);T(m);var k=J(m,4),D=$(k);{var O=P=>{var C=nI(),A=$(C,!0);T(C),oe(N=>{Se(C,"href",S.apiUrl+r().attributes.ical_url),te(A,N)},[()=>S.t("common.calendar")]),w(P,C)};ae(D,P=>{r().attributes.ical_url&&P(O)})}return T(k),T(a),T(o),T(s),oe((P,C,A)=>{te(c,r().attributes.title),Se(v,"href",P),te(g,C),te(_,A)},[()=>n().downloadLink(r()),()=>S.t("common.download"),()=>ia(r().price_cents)]),w(t,s),ee(i)}re(sv,{item:{},orderDetails:{}},[],[],{mode:"open"});var sI=V('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),oI=V('<span class="go-cart-item-date"> </span>'),aI=V('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),lI=V('<br/> <a class="go-ticket-personalization"> </a>',1),uI=V('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),cI=V('<a aria-label="iCal link"> </a>'),dI=V('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),fI=V('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),hI=V('<a class="go-ticket-personalization"> </a>'),pI=V('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function ov(t,e){X(e,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${S.locale}.svg`;let n=b(e,"item",7),i=b(e,"orderDetails",7);var s={get item(){return n()},set item(c){n(c),y()},get orderDetails(){return i()},set orderDetails(c){i(c),y()}},o=q(),a=R(o);{var l=c=>{var d=q(),f=R(d);Le(f,17,()=>({length:n().attributes.quantity}),Er,(p,v,g)=>{var m=dI(),_=$(m),k=$(_),D=$(k);D.textContent="1";var O=J(D,2),P=$(O),C=$(P,!0);T(P);var A=J(P,2);{var N=U=>{const Y=E(()=>n().attributes.barcodes[g]?.id);var le=aI(),ce=R(le);{var me=L=>{var be=sI(),x=R(be),tt=$(x,!0);T(x);var Be=J(x,2),We=$(Be,!0);T(Be),oe((Ct,rt)=>{te(tt,Ct),te(We,rt)},[()=>qs(n().attributes.start_time,{month:"numeric",day:"numeric"},S.locale),()=>Us(n().attributes.start_time)]),w(L,be)},Z=L=>{var be=q(),x=R(be);{var tt=Be=>{var We=oI(),Ct=$(We,!0);T(We),oe(rt=>te(Ct,rt),[()=>qs(n().attributes.start_time,{month:"numeric",day:"numeric"},S.locale)]),w(Be,We)};ae(x,Be=>{n().attributes.ticket_type==="normal"&&Be(tt)},!0)}w(L,be)};ae(ce,L=>{n().attributes.ticket_type==="time_slot"?L(me):L(Z,!1)})}var ge=J(ce,4),B=$(ge,!0);T(ge),oe((L,be)=>{Se(ge,"href",L),te(B,be)},[()=>i().downloadLink(n(),h(Y)),()=>S.t("common.download")]),w(U,le)},M=U=>{var Y=lI(),le=J(R(Y),2),ce=$(le,!0);T(le),oe((me,Z)=>{Se(le,"href",me),te(ce,Z)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),w(U,Y)};ae(A,U=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?U(N):U(M,!1)})}T(O);var j=J(O,2),se=$(j,!0);T(j);var z=J(j,2),ue=$(z);{var ne=U=>{var Y=uI(),le=$(Y);T(Y),oe(()=>{Se(Y,"href",S.apiUrl+n().attributes.barcodes[g]?.passbook_url),Se(le,"src",r)}),w(U,Y)};ae(ue,U=>{n().attributes.barcodes[g]&&n().attributes.barcodes[g]?.passbook_url&&U(ne)})}T(z);var W=J(z,2),G=$(W);{var H=U=>{var Y=cI(),le=$(Y,!0);T(Y),oe(ce=>{Se(Y,"href",S.apiUrl+n().attributes.ical_url),te(le,ce)},[()=>S.t("common.calendar")]),w(U,Y)};ae(G,U=>{n().attributes.ical_url&&U(H)})}T(W),T(k),T(_),T(m),oe(U=>{te(C,n().attributes.title),te(se,U)},[()=>ia(n().price_cents)]),w(p,m)}),w(c,d)},u=c=>{var d=pI(),f=$(d),p=$(f),v=$(p),g=$(v,!0);T(v);var m=J(v,2),_=$(m),k=$(_,!0);T(_);var D=J(_,2);{var O=N=>{var M=fI(),j=$(M,!0);T(M),oe((se,z)=>{Se(M,"href",se),te(j,z)},[()=>i().downloadLink(n()),()=>S.t("common.download")]),w(N,M)},P=N=>{var M=hI(),j=$(M,!0);T(M),oe((se,z)=>{Se(M,"href",se),te(j,z)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),w(N,M)};ae(D,N=>{n().attributes.is_voucher?N(O):N(P,!1)})}T(m);var C=J(m,2),A=$(C,!0);T(C),yt(2),T(p),T(f),T(d),oe(N=>{te(g,n().attributes.quantity),te(k,n().attributes.title),te(A,N)},[()=>ia(n().price_cents)]),w(c,d)};ae(a,c=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?c(l):c(u,!1)})}return w(t,o),ee(s)}re(ov,{item:{},orderDetails:{}},[],[],{mode:"open"});var mI=V('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function gI(t,e){X(e,!0);const r=iv(e.$$host),n=E(()=>r.value);let i=E(()=>h(n)?.order);var s=q(),o=R(s);{var a=l=>{var u=mI(),c=$(u),d=$(c),f=$(d),p=$(f,!0);T(f);var v=J(f,2),g=$(v,!0);T(v);var m=J(v,2),_=$(m,!0);T(m),yt(2),T(d),T(c);var k=J(c,2);Le(k,17,()=>h(i).items,A=>A.id,(A,N)=>{var M=q(),j=R(M);{var se=ue=>{ov(ue,{get item(){return h(N)},get orderDetails(){return h(n)}})},z=ue=>{var ne=q(),W=R(ne);{var G=H=>{sv(H,{get item(){return h(N)},get orderDetails(){return h(n)}})};ae(W,H=>{h(N).type==="Event"&&H(G)},!0)}w(ue,ne)};ae(j,ue=>{h(N).type==="Ticket"?ue(se):ue(z,!1)})}w(A,M)});var D=J(k,2),O=$(D),P=J($(O),4),C=$(P,!0);T(P),yt(2),T(O),T(D),T(u),oe((A,N,M,j)=>{te(p,A),te(g,N),te(_,M),te(C,j)},[()=>S.t("common.table.count"),()=>S.t("common.table.product"),()=>S.t("common.table.price"),()=>S.t("common.table.total",{value:ia(h(i).total_price_cents)})]),w(l,u)};ae(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),ee()}customElements.define("go-order-breakdown",re(gI,{},[],[]));function vI(t,e){X(e,!0);const r=iv(e.$$host),n=E(()=>r.value);let i=E(()=>h(n)?.order);yt();var s=It();oe(()=>te(s,h(i)?.id)),w(t,s),ee()}customElements.define("go-order-invoice-id",re(vI,{},[],[]));var yI=V("<go-form></go-form>",2);function bI(t,e){X(e,!1),Bt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const o=i.target.details,a=await S.updatePassword(o.formData);a.data?(o.successMessage=S.t("user.passwordSuccess.desc.title"),o.apiErrors=[]):o.apiErrors=a.error?.errors||a.error||a.errors}Wl();var n=yI();Yn(n,"formId","passwordResetForm"),Pl("submit",n,r),w(t,n),ee()}customElements.define("go-profile-password",re(bI,{},[],[]));var _I=V("<go-form></go-form>",2);function wI(t,e){X(e,!0),Bt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=ie(void 0);const n=E(()=>S.validateToken());Hr(async()=>{await S.waitForAllFetches(),await Kl(()=>h(r).details),await Kl(()=>h(n).data),h(r).details.fill(h(n).data)});var i=_I();Yn(i,"formId","accountDetailsForm"),Vf(i,s=>I(r,s),()=>h(r)),w(t,i),ee()}customElements.define("go-profile-details",re(wI,{},[],[]));var kI=V('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function SI(t,e){X(e,!0);const r=E(()=>S.validateToken()),n=E(()=>h(r)?.data);var i=q(),s=R(i);{var o=l=>{var u=kI(),c=R(u),d=$(c);T(c);var f=J(c,2),p=$(f,!0);T(f),oe(()=>{te(d,`${h(n).name??""}
13
- ${h(n).surname??""}`),te(p,h(n).email)}),w(l,u)},a=l=>{var u=It();oe(c=>te(u,c),[()=>S.t("user.login.desc.text")]),w(l,u)};ae(s,l=>{h(n)?l(o):l(a,!1)})}w(t,i),ee()}customElements.define("go-profile-overview",re(SI,{},[],[]));function xI(t,e){X(e,!0);function r(p){if(!p)return;const v=[];for(const g of p.split(",")){const m=g.trim();m&&(ev.includes(m)?v.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${ev.join(", ")}`))}return v.length?v:void 0}let n=b(e,"filters",7),i=b(e,"eventIds",7),s=b(e,"museumIds",7),o=b(e,"exhibitionIds",7),a=b(e,"selectedDate",7),l=b(e,"selectedTimeslot",7),u=b(e,"ticketIds",7),c=b(e,"ticketGroupIds",7);const d=new KD;pe(()=>{e.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),pe(()=>{d.filters=r(n()),d.eventIds=rn(i()),d.museumIds=rn(s()),d.exhibitionIds=rn(o()),d.ticketIds=rn(u()),d.ticketGroupIds=rn(c()),d.selectedTimeslot=l(),a()&&(d.selectedDate=pu(a()))}),pe(()=>{d.selectedDate&&Ve(()=>{a(d.selectedDate.toString())})}),HD(e.$$host,d);var f={details:d,get filters(){return n()},set filters(p){n(p),y()},get eventIds(){return i()},set eventIds(p){i(p),y()},get museumIds(){return s()},set museumIds(p){s(p),y()},get exhibitionIds(){return o()},set exhibitionIds(p){o(p),y()},get selectedDate(){return a()},set selectedDate(p){a(p),y()},get selectedTimeslot(){return l()},set selectedTimeslot(p){l(p),y()},get ticketIds(){return u()},set ticketIds(p){u(p),y()},get ticketGroupIds(){return c()},set ticketGroupIds(p){c(p),y()}};return ee(f)}customElements.define("go-ticket-selection",re(xI,{filters:{attribute:"filters",reflect:!0,type:"String"},eventIds:{attribute:"event-ids",reflect:!0,type:"String"},ticketIds:{attribute:"ticket-ids",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},exhibitionIds:{attribute:"exhibition-ids",reflect:!0,type:"String"},selectedDate:{attribute:"selected-date",reflect:!0,type:"String"},selectedTimeslot:{attribute:"selected-timeslot",reflect:!0,type:"String"}},[],["details"]));function EI(t,e){X(e,!0);const r=fn(e.$$host),n=E(()=>r.value);pe(()=>{e.$$host.style.display=h(n)?.isTicketsVisible?"block":"none",e.$$host.classList.toggle("is-hidden",!h(n)?.isTicketsVisible),e.$$host.classList.toggle("is-visible",h(n)?.isTicketsVisible)}),ee()}customElements.define("go-tickets",re(EI,{},[],[]));function CI(t,e){X(e,!0);const r=fn(e.$$host),n=E(()=>r.value),i=E(()=>Gn(h(n)?.preCarts||[],o=>o.items.length)),s=E(()=>!h(n)?.isTicketsVisible||h(n)?.isTicketsVisible&&h(i)===0);pe(()=>{e.$$host.style.display=h(s)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(s)),e.$$host.classList.toggle("is-visible",h(s))}),ee()}customElements.define("go-tickets-empty",re(CI,{},[],[]));function OI(t,e){X(e,!0);const r=fn(e.$$host),n=E(()=>r.value);let i=E(()=>Gn(h(n)?.preCarts||[],o=>o.totalPriceCents));yt();var s=It();oe(o=>te(s,o),[()=>Xt(h(i))]),w(t,s),ee()}customElements.define("go-tickets-sum",re(OI,{},[],[]));class TI{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}#t=ie(Ne(Ri()));get preCart(){return h(this.#t)}set preCart(e){I(this.#t,e,!0)}#r=ie();get filters(){return h(this.#r)}set filters(e){I(this.#r,e,!0)}#n=ie();get dateId(){return h(this.#n)}set dateId(e){I(this.#n,e,!0)}#i=ie();get limit(){return h(this.#i)}set limit(e){I(this.#i,e,!0)}#s=ie();get query(){return h(this.#s)}set query(e){I(this.#s,e,!0)}#a=ie(Ne([]));get ticketGroupIds(){return h(this.#a)}set ticketGroupIds(e){I(this.#a,e,!0)}#o=ie(Ne([]));get languageIds(){return h(this.#o)}set languageIds(e){I(this.#o,e,!0)}#l=ie(Ne([]));get catchWordIds(){return h(this.#l)}set catchWordIds(e){I(this.#l,e,!0)}#u=ie(Ne([]));get museumIds(){return h(this.#u)}set museumIds(e){I(this.#u,e,!0)}constructor(e,r){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=E(()=>r.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=Ri([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Ri();const e=this.effectiveFilters.filter(r=>r!=="custom");await Promise.all(e.map(r=>gi(r).loadProducts(this)))}}const av="go-ticket-segment",AI=Li(av),gd=Zi(av);function DI(t,e){X(e,!0);const r=b(e,"filters",7),n=b(e,"dateId",7),i=b(e,"query",7),s=b(e,"limit",7),o=b(e,"ticketGroupIds",7),a=b(e,"languageIds",7),l=b(e,"catchWordIds",7),u=b(e,"museumIds",7);function c(m){if(!m)return;const _=m.split(",").map(k=>k.trim()).filter(Boolean);return _.length?_:void 0}const d=fn(e.$$host),f=d.value,p=new TI(c(r()),d);AI(e.$$host,p),pe(()=>{p.filters=c(r()),p.dateId=n(),p.query=i(),p.limit=s(),p.ticketGroupIds=rn(o()),p.languageIds=rn(a()),p.catchWordIds=rn(l()),p.museumIds=rn(u())}),pe(()=>{p.dateId,p.filters,p.ticketGroupIds,p.museumIds,p.languageIds,p.catchWordIds,p.query,p.limit,f?.filters,f?.selectedTimeslot,f?.selectedTime,f?.selectedDate,f?.museumIds,Ve(()=>{p.loadTickets()})}),pe(()=>{f&&Ve(()=>f?.addTicketSegment(p))});const v=E(()=>p.preCart.items.length);pe(()=>{e.$$host.classList.toggle("is-empty",h(v)===0)});var g={details:p,get filters(){return r()},set filters(m){r(m),y()},get dateId(){return n()},set dateId(m){n(m),y()},get query(){return i()},set query(m){i(m),y()},get limit(){return s()},set limit(m){s(m),y()},get ticketGroupIds(){return o()},set ticketGroupIds(m){o(m),y()},get languageIds(){return a()},set languageIds(m){a(m),y()},get catchWordIds(){return l()},set catchWordIds(m){l(m),y()},get museumIds(){return u()},set museumIds(m){u(m),y()}};return ee(g)}customElements.define("go-ticket-segment",re(DI,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"}},[],["details"]));function II(t,e){X(e,!0);const n=fn(e.$$host).value,s=gd(e.$$host).value,o=E(()=>s?.preCart.items.length),a=E(()=>!n?.isTicketsVisible||n?.isTicketsVisible&&h(o)===0);pe(()=>{e.$$host.style.display=h(a)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(a)),e.$$host.classList.toggle("is-visible",h(a))}),ee()}customElements.define("go-ticket-segment-empty",re(II,{},[],[]));var PI=V('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),$I=V("<option> </option>"),MI=V('<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""><!></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>');function lv(t,e){X(e,!0);const r=p=>{var v=PI(),g=R(v),m=$(g);T(g);var _=J(g,2),k=$(_,!0);T(_),oe(D=>{te(m,`${i().product.eventTitle??""} - ${D??""}`),te(k,i().product.title)},[()=>Us(i().time)]),w(p,v)},n=p=>{yt();var v=It();oe(()=>te(v,i().product.title)),w(p,v)};let i=b(e,"item",7),s=b(e,"details",7),o=ie(void 0);pe(()=>{s().preCart.items.map(p=>p.quantity),Ve(()=>{I(o,S.capacityManager.capacity(S.cart,i(),s().preCart),!0)})});function a(p,v,g){const m=v;p.quantity=parseInt(m.value)}let l=n;Ws(i().product)&&(l=r);var u={get item(){return i()},set item(p){i(p),y()},get details(){return s()},set details(p){s(p),y()}},c=q(),d=R(c);{var f=p=>{var v=MI(),g=$(v),m=$(g),_=$(m),k=$(_);l(k),T(_);var D=J(_,2),O=$(D);Ty(O,()=>i().product.description),T(D);var P=J(D,2),C=$(P,!0);T(P);var A=J(P,2),N=$(A);N.__change=M=>a(i(),M.target,s()?.ticketSelectionDetails),Le(N,21,()=>Lp(h(o).min,h(o).max),M=>M.value,(M,j)=>{var se=$I(),z=$(se,!0);T(se);var ue={};oe(()=>{zl(se,i().quantity===h(j).value),te(z,h(j).label),ue!==(ue=h(j).value)&&(se.value=(se.__value=h(j).value)??"")}),w(M,se)}),T(N),T(A),T(m),T(g),T(v),oe(M=>{zt(g,1,Yr(["go-tickets-item",h(o).bookedOut&&"is-booked-out"])),Se(g,"data-testid",i().uuid),te(C,i().price_formatted),Se(N,"aria-label",M)},[()=>S.t("cart.content.table.edit")]),w(p,v)};ae(d,p=>{h(o)&&!h(o).unavailable&&p(f)})}return w(t,c),ee(u)}Sr(["change"]),re(lv,{item:{},details:{}},[],[],{mode:"open"});var FI=V('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function NI(t,e){X(e,!0);const r=gd(e.$$host),n=E(()=>r.value),i=E(()=>h(n)?.preCart?.items.length&&h(n)?.preCart?.items.length>0);var s=q(),o=R(s);{var a=l=>{var u=FI(),c=$(u),d=$(c),f=$(d),p=$(f,!0);T(f);var v=J(f,2),g=$(v,!0);T(v);var m=J(v,2),_=$(m,!0);T(m);var k=J(m,2),D=$(k,!0);T(k),T(d),T(c);var O=J(c,2);Le(O,17,()=>h(n).preCart.items,P=>P.uuid,(P,C)=>{lv(P,{get item(){return h(C)},get details(){return h(n)}})}),T(u),oe((P,C,A,N)=>{te(p,P),te(g,C),te(_,A),te(D,N)},[()=>S.t("product.detail.table.title"),()=>S.t("product.detail.table.desc"),()=>S.t("product.detail.table.price"),()=>S.t("product.detail.table.quantity")]),w(l,u)};ae(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),ee()}customElements.define("go-ticket-segment-body",re(NI,{},[],[]));function RI(t,e){X(e,!0);const r=gd(e.$$host),n=E(()=>r.value);yt();var i=It();oe(()=>te(i,h(n)?.preCart.totalFormatted)),w(t,i),ee()}customElements.define("go-ticket-segment-sum",re(RI,{},[],[]));let zI=class{#e;get tsd(){return h(this.#e)}set tsd(e){I(this.#e,e)}#t=ie(Ne([]));get timeslots(){return h(this.#t)}set timeslots(e){I(this.#t,e,!0)}constructor(e){e&&(this.#e=E(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}this.timeslots=S.capacityManager.quotaManager.timeslotsOn(e).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}};var LI=V('<li><label> <input type="radio" name="timeslot"/></label></li>'),ZI=V('<ul data-testid="timeslots"></ul>');function VI(t,e){X(e,!0);const r=[],n=fn(e.$$host),i=new zI(n);pe(()=>{const d=i.tsd;if(!d)return;const f=d.filters,p=d.selectedDate;Ve(async()=>{f?.length&&p&&await Promise.all(f.map(v=>gi(v).loadTimeslots(d))),i.recalculateCapacities()})});const s=(d,f)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:f},bubbles:!0,composed:!0}))},o=d=>{s(d.target,i.tsd?.selectedTimeslot)};pe(()=>{const d=i.tsd;if(!d)return;const f=i.timeslots;if(f.length!==1)return;const p=f[0];p.available&&d.selectedTimeslot!==p.startAt&&(d.selectedTimeslot=p.startAt,s(e.$$host,p.startAt))});var a={details:i},l=q(),u=R(l);{var c=d=>{var f=ZI();Le(f,20,()=>i.timeslots,p=>p,(p,v)=>{const g=E(()=>v.capacity===0),m=E(()=>h(g)||!v.available),_=E(()=>i.tsd?.selectedTimeslot===v.startAt);var k=LI(),D=$(k),O=$(D),P=J(O);Vo(P),P.__change=o;var C;T(D),T(k),oe(()=>{zt(k,1,Yr({"go-timeslot":!0,"is-sold-out":h(g),"is-disabled":h(m),"is-selected":h(_)})),te(O,`${v.timeFormatted??""} `),P.disabled=h(m),Se(P,"aria-disabled",h(m)),C!==(C=v.startAt)&&(P.value=(P.__value=v.startAt)??"")}),Ly(r,[],P,()=>(v.startAt,i.tsd.selectedTimeslot),A=>i.tsd.selectedTimeslot=A),w(p,k)}),T(f),w(d,f)};ae(u,d=>{i.tsd?.isTimeslotsVisible&&d(c)})}return w(t,l),ee(a)}Sr(["change"]),customElements.define("go-timeslots",re(VI,{},[],["details"]));class jI{#e=ie();get details(){return h(this.#e)}set details(e){I(this.#e,e,!0)}#t=ie(Ne(Ni(Vt())));get startAt(){return h(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=ie(void 0);get selected(){return h(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(r=>gi(r).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}isDateDisabled(e){return this.dates?e.compare(Ni(Vt()))<0||this.dates[e.toString()]=="unavailable":e.compare(Ni(Vt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>gi(e).apiToken).filter(Boolean)}params(e){return this.details?{by_bookable:!0,"by_ticket_types[]":this.apiFilters,"by_ticket_ids[]":this.details.ticketIds,"by_ticket_group_ids[]":this.details.ticketGroupIds,"by_museum_ids[]":this.details.museumIds,"by_exhibition_ids[]":this.details.exhibitionIds,"by_event_ids[]":this.details.eventIds,depth:"availability_status",start_at:e.toString(),end_at:e.add({months:1}).toString()}:{}}fetchPeriod(){const e=this.startAt.set({day:1});return[e.subtract({months:1}),e,e.add({months:1}),e.add({months:2})]}eventsDates(){const e=S.calendar.bind(S);return this.fetchPeriod().reduce((r,n)=>Lt(r,e(this.params(n))),{})}ticketsDates(){const e=S.ticketsCalendar.bind(S);return this.fetchPeriod().reduce((r,n)=>Lt(r,e(this.params(n))),{})}}var BI=V("<!> <!> <!>",1),UI=V("<div> </div>"),qI=V("<!> <!>",1),WI=V("<!> <!>",1),KI=V('<div data-calendar-wrapper=""><!></div>');function uv(t,e){X(e,!0);let r=b(e,"calendarClass",7),n=ie(void 0);const i=r();pe(()=>{h(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),y()}},o=KI(),a=$(o);{const l=(u,c)=>{let d=()=>c?.().months,f=()=>c?.().weekdays;var p=WI(),v=R(p);Pe(v,()=>Oc,(m,_)=>{_(m,{children:(k,D)=>{var O=BI(),P=R(O);Pe(P,()=>Dc,(N,M)=>{M(N,{class:"go-calendar-prev-button",children:(j,se)=>{yt();var z=It("Prev");w(j,z)},$$slots:{default:!0}})});var C=J(P,2);Pe(C,()=>Tc,(N,M)=>{M(N,{class:"go-calendar-heading"})});var A=J(C,2);Pe(A,()=>Ac,(N,M)=>{M(N,{class:"go-calendar-next-button",children:(j,se)=>{yt();var z=It("Next");w(j,z)},$$slots:{default:!0}})}),w(k,O)},$$slots:{default:!0}})});var g=J(v,2);Le(g,17,d,Er,(m,_)=>{var k=q(),D=R(k);Pe(D,()=>kc,(O,P)=>{P(O,{class:"go-calendar-grid",children:(C,A)=>{var N=qI(),M=R(N);Pe(M,()=>Ec,(se,z)=>{z(se,{class:"go-calendar-grid-head",children:(ue,ne)=>{var W=q(),G=R(W);Pe(G,()=>fo,(H,U)=>{U(H,{class:"go-calendar-grid-row",children:(Y,le)=>{var ce=q(),me=R(ce);Le(me,17,f,Er,(Z,ge,B,L)=>{var be=q(),x=R(be);Pe(x,()=>Cc,(tt,Be)=>{Be(tt,{children:(We,Ct)=>{var rt=UI(),hn=$(rt,!0);T(rt),oe(vr=>te(hn,vr),[()=>h(ge).slice(0,2)]),w(We,rt)},$$slots:{default:!0}})}),w(Z,be)}),w(Y,ce)},$$slots:{default:!0}})}),w(ue,W)},$$slots:{default:!0}})});var j=J(M,2);Pe(j,()=>Sc,(se,z)=>{z(se,{class:"go-calendar-grid-body",children:(ue,ne)=>{var W=q(),G=R(W);Le(G,17,()=>h(_).weeks,Er,(H,U,Y,le)=>{var ce=q(),me=R(ce);Pe(me,()=>fo,(Z,ge)=>{ge(Z,{class:"go-calendar-grid-row",children:(B,L)=>{var be=q(),x=R(be);Le(x,17,()=>h(U),Er,(tt,Be,We,Ct)=>{var rt=q(),hn=R(rt);Pe(hn,()=>xc,(vr,Wt)=>{Wt(vr,{get date(){return h(Be)},get month(){return h(_).value},class:"go-calendar-cell",children:(yr,vi)=>{var br=q(),_r=R(br);{let ls=E(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(h(Be)),"is-disabled":r().isDateDisabled(h(Be)),"is-selected":r().selected?.compare(h(Be))===0}));Pe(_r,()=>wc,(go,pn)=>{pn(go,{get class(){return h(ls)},children:(yi,Vn)=>{yt();var jn=It();oe(()=>te(jn,h(Be).day)),w(yi,jn)},$$slots:{default:!0}})})}w(yr,br)},$$slots:{default:!0}})}),w(tt,rt)}),w(B,be)},$$slots:{default:!0}})}),w(H,ce)}),w(ue,W)},$$slots:{default:!0}})}),w(C,N)},$$slots:{default:!0}})}),w(m,k)}),w(u,p)};Pe(a,()=>Wm,(u,c)=>{c(u,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return S.locale},isDateDisabled:d=>r().isDateDisabled(d),isDateUnavailable:d=>r().isDateUnavailable(d),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(d){r().selected=d},get placeholder(){return r().startAt},set placeholder(d){r().startAt=d},children:l,$$slots:{default:!0}})})}return T(o),Vf(o,l=>I(n,l),()=>h(n)),w(t,o),ee(s)}re(uv,{calendarClass:{}},[],["details"],{mode:"open"});function HI(t,e){X(e,!0);const r=new jI,n=r,i=fn(e.$$host),s=E(()=>i.value);pe(()=>{r.details=h(s)}),e.$$host.addEventListener("go-date-select",c=>{h(s)&&(h(s).selectedDate=c.detail.selected,h(s).selectedTimeslot=void 0)});var o={details:n},a=q(),l=R(a);{var u=c=>{uv(c,{get calendarClass(){return r}})};ae(l,c=>{h(s)?.isCalendarVisible&&c(u)})}return w(t,a),ee(o)}customElements.define("go-calendar",re(HI,{},[],["details"]));class YI{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}constructor(e){e&&(this.#e=E(()=>e.value))}addToCart(){if(!S.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,r=e.flatMap(n=>n.nonEmptyItems.map(i=>{const s=i.product.ticket_type!="annual"?i.time:void 0;return pt(i.product,{quantity:i.quantity,time:s})}));S.cart.addItems(r),e.forEach(n=>n.items.forEach(i=>i.quantity=0)),Qe.config.urls.cart&&Qe.config.navigateTo(Qe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(r=>r.items.some(n=>n.quantity>0)):!1}}var GI=V('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function JI(t,e){X(e,!0);const r=fn(e.$$host),n=new YI(r);var i={details:n},s=GI();s.__click=()=>n.addToCart();var o=$(s,!0);return T(s),oe((a,l,u)=>{s.disabled=a,Se(s,"data-x",l),te(o,u)},[()=>!n.anyTicketsSelected(),()=>!n.anyTicketsSelected(),()=>S.t("common.actions.cart")]),w(t,s),ee(i)}Sr(["click"]),customElements.define("go-add-to-cart-button",re(JI,{},[],["details"]));async function QI(t){const e=t.go;let r=e&&e._queue||[];console.log(r);for(const n of r)try{await cv[n.method](n.options)}catch(i){console.error(i)}t.go=cv,e&&(e._queue=null)}const cv={loaded:!0,config:t=>{Qe.define(t)},init:async t=>{await S.load("https://"+t.api,t.shop,t.locale)}};(async()=>await QI(window))()})();
5
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of t.seen.entries()){const a=o[1];if(e===o[0]){s(o);continue}if(t.external){const c=t.external.registry.get(o[0])?.id;if(e!==o[0]&&c){s(o);continue}}if(t.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&t.reused==="ref"){s(o);continue}}}function Tm(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const a=t.seen.get(o);if(a.ref===null)return;const l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){n(u);const f=t.seen.get(u),p=f.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Object.assign(l,p),Object.assign(l,c),o._zod.parent===u)for(const g in l)g==="$ref"||g==="allOf"||g in c||delete l[g];if(p.$ref&&f.def)for(const g in l)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(l[g])===JSON.stringify(f.def[g])&&delete l[g]}const d=o._zod.parent;if(d&&d!==u){n(d);const f=t.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(const p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}t.override({zodSchema:o,jsonSchema:l,path:a.path??[]})};for(const o of[...t.seen.entries()].reverse())n(o[0]);const i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,r.def??r.schema);const s=t.external?.defs??{};for(const o of t.seen.entries()){const a=o[1];a.def&&a.defId&&(s[a.defId]=a.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:Xa(e,"input",t.processors),output:Xa(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function Lt(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Lt(n.element,r);if(n.type==="set")return Lt(n.valueType,r);if(n.type==="lazy")return Lt(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Lt(n.innerType,r);if(n.type==="intersection")return Lt(n.left,r)||Lt(n.right,r);if(n.type==="record"||n.type==="map")return Lt(n.keyType,r)||Lt(n.valueType,r);if(n.type==="pipe")return Lt(n.in,r)||Lt(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Lt(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Lt(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Lt(i,r))return!0;return!!(n.rest&&Lt(n.rest,r))}return!1}const Ex=(t,e={})=>r=>{const n=xm({...r,processors:e});return Rt(t,n),Em(n,t),Tm(n,t)},Xa=(t,e,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=xm({...i??{},target:s,io:e,processors:r});return Rt(t,o),Em(o,t),Tm(o,t)},Tx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ax=(t,e,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Tx[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Cx=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Ox=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Dx=(t,e,r,n)=>{const i=r,s=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Rt(s.element,e,{...n,path:[...n.path,"items"]})},Ix=(t,e,r,n)=>{const i=t._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>Rt(a,e,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},Px=(t,e,r,n)=>{const i=t._zod.def,s=Rt(i.left,e,{...n,path:[...n.path,"allOf",0]}),o=Rt(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];r.allOf=l},Mx=(t,e,r,n)=>{const i=t._zod.def,s=Rt(i.innerType,e,n),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},$x=(t,e,r,n)=>{const i=t._zod.def;Rt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},Nx=(t,e,r,n)=>{const i=t._zod.def;Rt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},Fx=(t,e,r,n)=>{const i=t._zod.def;Rt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Rx=(t,e,r,n)=>{const i=t._zod.def;Rt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},Lx=(t,e,r,n)=>{const i=t._zod.def,s=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Rt(s,e,n);const o=e.seen.get(t);o.ref=s},zx=(t,e,r,n)=>{const i=t._zod.def;Rt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.readOnly=!0},Am=(t,e,r,n)=>{const i=t._zod.def;Rt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},Zx=Q("ZodISODateTime",(t,e)=>{cS.init(t,e),at.init(t,e)});function Vx(t){return ox(Zx,t)}const Ux=Q("ZodISODate",(t,e)=>{uS.init(t,e),at.init(t,e)});function Bx(t){return ax(Ux,t)}const jx=Q("ZodISOTime",(t,e)=>{dS.init(t,e),at.init(t,e)});function qx(t){return lx(jx,t)}const Wx=Q("ZodISODuration",(t,e)=>{fS.init(t,e),at.init(t,e)});function Hx(t){return cx(Wx,t)}const Sr=Q("ZodError",(t,e)=>{im.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>ak(t,r)},flatten:{value:r=>ok(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,gu,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,gu,2)}},isEmpty:{get(){return t.issues.length===0}}})},{Parent:Error}),Kx=ku(Sr),Gx=Su(Sr),Yx=Ka(Sr),Jx=Ga(Sr),Qx=uk(Sr),Xx=dk(Sr),eE=fk(Sr),tE=hk(Sr),rE=pk(Sr),nE=mk(Sr),iE=gk(Sr),sE=vk(Sr),zt=Q("ZodType",(t,e)=>(Ft.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Xa(t,"input"),output:Xa(t,"output")}}),t.toJSONSchema=Ex(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(rk(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>ik(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>Kx(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>Yx(t,r,n),t.parseAsync=async(r,n)=>Gx(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>Jx(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>Qx(t,r,n),t.decode=(r,n)=>Xx(t,r,n),t.encodeAsync=async(r,n)=>eE(t,r,n),t.decodeAsync=async(r,n)=>tE(t,r,n),t.safeEncode=(r,n)=>rE(t,r,n),t.safeDecode=(r,n)=>nE(t,r,n),t.safeEncodeAsync=async(r,n)=>iE(t,r,n),t.safeDecodeAsync=async(r,n)=>sE(t,r,n),t.refine=(r,n)=>t.check(HE(r,n)),t.superRefine=r=>t.check(KE(r)),t.overwrite=r=>t.check(gs(r)),t.optional=()=>Dm(t),t.exactOptional=()=>$E(t),t.nullable=()=>Im(t),t.nullish=()=>Dm(Im(t)),t.nonoptional=r=>VE(t,r),t.array=()=>EE(t),t.or=r=>AE([t,r]),t.and=r=>OE(t,r),t.transform=r=>Pm(t,IE(r)),t.default=r=>RE(t,r),t.prefault=r=>zE(t,r),t.catch=r=>BE(t,r),t.pipe=r=>Pm(t,r),t.readonly=()=>WE(t),t.describe=r=>{const n=t.clone();return To.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return To.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return To.get(t);const n=t.clone();return To.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),Cm=Q("_ZodString",(t,e)=>{xu.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(n,i,s)=>Ax(t,n,i);const r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(ux(...n)),t.includes=(...n)=>t.check(hx(...n)),t.startsWith=(...n)=>t.check(px(...n)),t.endsWith=(...n)=>t.check(mx(...n)),t.min=(...n)=>t.check(Qa(...n)),t.max=(...n)=>t.check(km(...n)),t.length=(...n)=>t.check(Sm(...n)),t.nonempty=(...n)=>t.check(Qa(1,...n)),t.lowercase=n=>t.check(dx(n)),t.uppercase=n=>t.check(fx(n)),t.trim=()=>t.check(vx()),t.normalize=(...n)=>t.check(gx(...n)),t.toLowerCase=()=>t.check(yx()),t.toUpperCase=()=>t.check(_x()),t.slugify=()=>t.check(bx())}),oE=Q("ZodString",(t,e)=>{xu.init(t,e),Cm.init(t,e),t.email=r=>t.check(zS(aE,r)),t.url=r=>t.check(jS(lE,r)),t.jwt=r=>t.check(sx(SE,r)),t.emoji=r=>t.check(qS(cE,r)),t.guid=r=>t.check(wm(Om,r)),t.uuid=r=>t.check(ZS(tl,r)),t.uuidv4=r=>t.check(VS(tl,r)),t.uuidv6=r=>t.check(US(tl,r)),t.uuidv7=r=>t.check(BS(tl,r)),t.nanoid=r=>t.check(WS(uE,r)),t.guid=r=>t.check(wm(Om,r)),t.cuid=r=>t.check(HS(dE,r)),t.cuid2=r=>t.check(KS(fE,r)),t.ulid=r=>t.check(GS(hE,r)),t.base64=r=>t.check(rx(bE,r)),t.base64url=r=>t.check(nx(wE,r)),t.xid=r=>t.check(YS(pE,r)),t.ksuid=r=>t.check(JS(mE,r)),t.ipv4=r=>t.check(QS(gE,r)),t.ipv6=r=>t.check(XS(vE,r)),t.cidrv4=r=>t.check(ex(yE,r)),t.cidrv6=r=>t.check(tx(_E,r)),t.e164=r=>t.check(ix(kE,r)),t.datetime=r=>t.check(Vx(r)),t.date=r=>t.check(Bx(r)),t.time=r=>t.check(qx(r)),t.duration=r=>t.check(Hx(r))});function el(t){return LS(oE,t)}const at=Q("ZodStringFormat",(t,e)=>{nt.init(t,e),Cm.init(t,e)}),aE=Q("ZodEmail",(t,e)=>{eS.init(t,e),at.init(t,e)}),Om=Q("ZodGUID",(t,e)=>{Qk.init(t,e),at.init(t,e)}),tl=Q("ZodUUID",(t,e)=>{Xk.init(t,e),at.init(t,e)}),lE=Q("ZodURL",(t,e)=>{tS.init(t,e),at.init(t,e)}),cE=Q("ZodEmoji",(t,e)=>{rS.init(t,e),at.init(t,e)}),uE=Q("ZodNanoID",(t,e)=>{nS.init(t,e),at.init(t,e)}),dE=Q("ZodCUID",(t,e)=>{iS.init(t,e),at.init(t,e)}),fE=Q("ZodCUID2",(t,e)=>{sS.init(t,e),at.init(t,e)}),hE=Q("ZodULID",(t,e)=>{oS.init(t,e),at.init(t,e)}),pE=Q("ZodXID",(t,e)=>{aS.init(t,e),at.init(t,e)}),mE=Q("ZodKSUID",(t,e)=>{lS.init(t,e),at.init(t,e)}),gE=Q("ZodIPv4",(t,e)=>{hS.init(t,e),at.init(t,e)}),vE=Q("ZodIPv6",(t,e)=>{pS.init(t,e),at.init(t,e)}),yE=Q("ZodCIDRv4",(t,e)=>{mS.init(t,e),at.init(t,e)}),_E=Q("ZodCIDRv6",(t,e)=>{gS.init(t,e),at.init(t,e)}),bE=Q("ZodBase64",(t,e)=>{vS.init(t,e),at.init(t,e)}),wE=Q("ZodBase64URL",(t,e)=>{_S.init(t,e),at.init(t,e)}),kE=Q("ZodE164",(t,e)=>{bS.init(t,e),at.init(t,e)}),SE=Q("ZodJWT",(t,e)=>{kS.init(t,e),at.init(t,e)}),xE=Q("ZodArray",(t,e)=>{SS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Dx(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(Qa(r,n)),t.nonempty=r=>t.check(Qa(1,r)),t.max=(r,n)=>t.check(km(r,n)),t.length=(r,n)=>t.check(Sm(r,n)),t.unwrap=()=>t.element});function EE(t,e){return wx(xE,t,e)}const TE=Q("ZodUnion",(t,e)=>{xS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Ix(t,r,n,i),t.options=e.options});function AE(t,e){return new TE({type:"union",options:t,...Oe(e)})}const CE=Q("ZodIntersection",(t,e)=>{ES.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Px(t,r,n,i)});function OE(t,e){return new CE({type:"intersection",left:t,right:e})}const DE=Q("ZodTransform",(t,e)=>{TS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Ox(t,r),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Qp(t.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Eo(s,r.value,e));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),r.issues.push(Eo(o))}};const i=e.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r)):(r.value=i,r)}});function IE(t){return new DE({type:"transform",transform:t})}const PE=Q("ZodOptional",(t,e)=>{mm.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Am(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Dm(t){return new PE({type:"optional",innerType:t})}const ME=Q("ZodExactOptional",(t,e)=>{AS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Am(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function $E(t){return new ME({type:"optional",innerType:t})}const NE=Q("ZodNullable",(t,e)=>{CS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Mx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Im(t){return new NE({type:"nullable",innerType:t})}const FE=Q("ZodDefault",(t,e)=>{OS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Nx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function RE(t,e){return new FE({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():rm(e)}})}const LE=Q("ZodPrefault",(t,e)=>{DS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Fx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function zE(t,e){return new LE({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():rm(e)}})}const ZE=Q("ZodNonOptional",(t,e)=>{IS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>$x(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function VE(t,e){return new ZE({type:"nonoptional",innerType:t,...Oe(e)})}const UE=Q("ZodCatch",(t,e)=>{PS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Rx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function BE(t,e){return new UE({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const jE=Q("ZodPipe",(t,e)=>{MS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Lx(t,r,n,i),t.in=e.in,t.out=e.out});function Pm(t,e){return new jE({type:"pipe",in:t,out:e})}const qE=Q("ZodReadonly",(t,e)=>{$S.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>zx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function WE(t){return new qE({type:"readonly",innerType:t})}const Mm=Q("ZodCustom",(t,e)=>{NS.init(t,e),zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Cx(t,r)});function HE(t,e={}){return kx(Mm,t,e)}function KE(t){return Sx(t)}function GE(t,e={}){const r=new Mm({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...Oe(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var YE={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>S.customerSalutations.map(t=>({label:t.salutation,value:t.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:el().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:el().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:el().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>S.countries.map(t=>({label:t.name,value:t.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>S.locales.map(t=>({label:S.t(`languages.${t.locale}`),value:t.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:el().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:GE(File)},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(S.payment_modes?Object.values(S.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function JE(t,e){return{...t,errors:t.errors||[],value:t.value??QE(t.type),options:t.options,autocomplete:t.autocomplete??"",placeholder:t.placeholder??"",description:t.description,apiErrors:t.apiErrors??[],mounted:t.mounted??!1,required:e,validate(){XE(this)}}}function QE(t){return t==="checkbox"?!1:t==="file"?null:""}function XE(t){if(t.errors=[],!t.validator){t.required&&(t.value===!1||t.value===""||t.value===null||t.value===void 0)&&(t.errors=["common.fieldErrors.required"]);return}const e=t.validator.safeParse(t.value);e.success?t.errors=[]:t.errors=e.error.format()._errors}const $s=class $s{static defineForm(e){ot.default({forms:{[e.id]:{fields:e.fields,submitLabel:e.submitLabel}}})}static defineFields(e){ot.default({fields:e})}static setRequiredApiKeys(e,r){Fy($s,Hl)[e]=r}static getFormOptions(e){return ot.config.forms[e]}static createField(e,r){const n=$s.getFieldInit(e);if(!n)throw new Error(`(formFields) Field "${e}" not found`);return JE(n,r)}static getFormFields(e){return eT(e)}static getFieldInit(e){return ot.config.fields[e]}};Hl=new WeakMap,Ry($s,Hl,{}),$s.defineFields(YE);let hr=$s;function eT(t){const e=ot.config.forms[t];if(!e)throw new Error(`(formFields) Form ${t} not found`);const r=e.fields;return r||(console.warn("(formFields) No fields defined for form",t),[])}function Tu(t){return t?t.filter(r=>r.mounted&&(r.errors?.length||r.apiErrors?.length)).length:0}function tT(t,e){ne(e,!0);let r=_(e,"token",7),n=_(e,"ticketSaleId",7),i;const s=new Gp;Jp(e.$$host,s),_e(()=>{s.token=r(),s.ticketSaleId=n()}),hr.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const g=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),b=Kh(g,(A,D)=>{const F=m[D-1].details;return A.push(F),A},[]);if(b.forEach(A=>{A.fields.forEach(D=>{A.validateField(D)})}),!Kh(g,(A,D)=>b[D-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const A=b.map(async(N,B)=>{const H=s.ticketSale.personalizations[B].id,de=N.fields.find(K=>K.key==="photo")?.value;if(!(de instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const X=await S.uploadPersonalizationPhoto(r(),H,de);return X.error?{ok:!1,error:X.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),F=(await Promise.all(A)).find(N=>!N.ok);if(F){i.details.apiErrors=[F.error];return}}const O={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:b.map((A,D)=>{const F=Tb(A.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[D].id,customer:F}})}},E=await S.finalizePersonalizations(r(),O);if(E.error){i.details.apiErrors=[E.error.error];return}const P=ot.config.forms.personalization?.beforeSubmit;P&&P(O),ot.config.urls.annualTicketPersonalizationFormSubmit?.()&&ot.config.navigateTo(ot.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,u=0;function d(g){g.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function f(){return a?!0:(a=e.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),d(l),c=new Comment("go-personalization-form-anchor"),a.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function p(g){if(!f()||!a||!l||!c)return;const m=a.parentElement;if(!m)return;const b=Math.max(g,1),k=Array.from(m.querySelectorAll("go-personalization-form"));for(;k.length<b;){const E=l.cloneNode(!0);d(E),m.insertBefore(E,c),k.push(E)}for(;k.length>b;){const E=k.pop();E&&E!==a&&E.remove()}const O=s.ticketSale?.personalizations??[];k.forEach((E,P)=>{const A=O[P];A&&(E.dataset.personalizationId=String(A.id))}),u=b}kn(()=>{f(),e.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),_e(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==u&&p(m)});var v={details:s,get token(){return r()},set token(g){r(g),y()},get ticketSaleId(){return n()},set ticketSaleId(g){n(g),y()}};return ie(v)}customElements.define("go-annual-ticket-personalization-form",oe(tT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));class rT{constructor(e,r){this.formId=e,this.form=r}#e=le(Be([]));#t=C(()=>Tu(this.fields)==0);get isValid(){return h(this.#t)}set isValid(e){M(this.#t,e)}#r=le();get successMessage(){return h(this.#r)}set successMessage(e){M(this.#r,e,!0)}get formData(){function e(i){return Sb(i)||wb(i)?i:i==="true"||i==="false"?i==="true":!Number.isNaN(+i)&&i.trim()!==""?+i:i}const r=this.fields.filter(i=>i!==void 0).filter(i=>i.type!=="file").filter(i=>i.value!=="");return Object.fromEntries(r.map(i=>[i.apiKey,e(i.value)]))}fieldValue(e){return this.fields.find(r=>r.key===e)?.value}get apiErrors(){return h(this.#e)}set apiErrors(e){if(this.fields.forEach(r=>r.apiErrors=[]),Lc(e)){M(this.#e,e,!0);return}if(e.errors&&Lc(e.errors)&&M(this.#e,e.errors,!0),kb(e.error)){M(this.#e,[e.error],!0);return}for(const[r,n]of Object.entries(e)){if(r==="full_messages"||r==="success"||r==="errors")continue;const i=this.fields.find(s=>s.apiKey===r);if(!i){console.error(`(set apiErrors) Field with API key ${r} not found`);continue}i.apiErrors=n}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const r=this.fields.find(n=>n.apiKey==="password");(!r||r&&e.value!==r.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const r=this.fields.find(n=>n.apiKey==="email");(!r||r&&e.value!==r.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(r=>r.closest("go-form")===e).map(r=>r.getField?.()).filter(r=>r)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const r=this.fields;Object.entries(e).forEach(([n,i])=>{const s=r.find(o=>o.apiKey===n);if(!s){console.warn(`(FormDetails.fill) Field with API key ${n} not found.`);return}if(s.type==="select"&&!s.options?.().find(o=>o.value===i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);if(s.type==="checkbox"&&![!0,!1].includes(i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);s.value=i})}}const $m="go-form-details",nT=fs($m),vs=hs($m);function Ni(t,e,r){const n=t.firstElementChild||void 0;if(t.children?.length===1&&n?.tagName.toLowerCase()===e)return n;const i=document.createElement(e);r&&Object.entries(r).forEach(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;t.firstChild;)s.appendChild(t.firstChild);return i.appendChild(s),t.replaceChildren(i),i}var iT=j("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function sT(t,e){ne(e,!0);let r=_(e,"formId",7),n=_(e,"custom",7);const i=new rT(r(),e.$$host);nT(e.$$host,i);async function s(u){u.preventDefault(),u.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",u)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",u)),e.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}kn(()=>{const u=Ni(e.$$host,"form",{novalidate:!0});u.addEventListener("submit",s),i.form=u});var o={details:i,get formId(){return r()},set formId(u){r(u),y()},get custom(){return n()},set custom(u){n(u),y()}},a=W(),l=z(a);{var c=u=>{var d=iT(),f=z(d),p=te(f,2),v=te(p,2),g=$(v,!0);I(v),ce(m=>se(g,m),[()=>S.t(hr.getFormOptions(r())?.submitLabel||"Submit")]),w(u,d)};fe(l,u=>{n()||u(c)})}return w(t,a),ie(o)}customElements.define("go-form",oe(sT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var oT=j("<go-form></go-form>",2);function aT(t,e){ne(e,!0);let r=_(e,"custom",7,!1);hr.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(o){const l=o.target.details,c=await S.passwordReset(l.formData);c.data?(e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=c.data.message,l.apiErrors=[]):l.apiErrors=c.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),y()}},s=oT();return xi(s,"formId","passwordReset"),ce(()=>xi(s,"custom",r())),kc("submit",s,n),w(t,s),ie(i)}customElements.define("go-password-reset",oe(aT,{custom:{}},[],[]));function lT(t,e){ne(e,!0),hr.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(e,"custom",7,!1);async function n(s){const a=s.target.details,l=await S.signIn(a.formData);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}Ni(e.$$host,"go-form",{"form-id":"signIn",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return ie(i)}customElements.define("go-sign-in",oe(lT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function cT(t,e){ne(e,!0);let r=_(e,"custom",7,!1);hr.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(s){const a=s.target.details,l=await S.signUp(a.formData,!1);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}Ni(e.$$host,"go-form",{"form-id":"signUp",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return ie(i)}customElements.define("go-sign-up",oe(cT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function uT(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(t&&typeof t=="object"){const r=Object.values(t).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return e}function Nm(t){return"quantity"in t&&t.quantity!==void 0?t.quantity:t.quantities}function dT(t){return uT(Nm(t),0)}function fT(t){const e=Nm(t);if(e&&typeof e=="object"){const r=Object.keys(e);if(r.length>0)return Number(r[0])}}function hT(t,e){const r=us(),n=new Set;return t.coupons.forEach(i=>r.addCoupon(i)),e.forEach(i=>{const s=i.attributes,o=fT(s),a=t.items.find(l=>l.type.toLowerCase()===i.type.toLowerCase()&&l.product.id===s.id&&(!s.time||l.time===s.time)&&(o===void 0||So(l.product)&&l.product.scale_price_id===o));if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}s.coupon&&(r.addCoupon(s.coupon),n.add(s.coupon)),r.addItem(pT(a,s))}),{cart:r,appliedCoupons:n}}function pT(t,e){const r=dT(e),n=e.price_cents??t.product.price_cents,i=t.product.price_cents,s=n<i,o={...t.product,price_cents:n};return xt(o,{quantity:r,time:t.time,display:{discounted:s,reference_uuid:t.uuid,originalPrice:i}})}class mT{#e=le();get displayCart(){return h(this.#e)}set displayCart(e){M(this.#e,e,!0)}#t=le(Be(new Set));get appliedCoupons(){return h(this.#t)}set appliedCoupons(e){M(this.#t,e,!0)}#r=le(!1);get preview(){return h(this.#r)}set preview(e){M(this.#r,e,!0)}get totalPriceCents(){return this.displayCart?.totalPriceCents??0}get subtotalPriceCents(){return S.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=S.cart;if(e)try{const{items:r,coupons:n}=e.orderData(),i=await S.createCart({items:r,coupons:n});if(!i||"error"in i){i&&"error"in i&&console.error("(go-cart) Unable to fetch discounted cart data",i.error),this.displayCart=e;return}const s=hT(e,i.data.items??[]);this.displayCart=s.cart,this.appliedCoupons=s.appliedCoupons}catch(r){console.error("(go-cart) Unable to fetch discounted cart data",r),this.displayCart=e}}}const Fm="go-cart-details",gT=fs(Fm),ys=hs(Fm);var vT=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),yT=j('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function Rm(t,e){ne(e,!0);let r=_(e,"cartItem",7);if(!So(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(p){r(p),y()}},s=yT(),o=z(s),a=$(o),l=$(a,!0);I(a);var c=te(a),u=$(c,!0);I(c),I(o);var d=te(o);{var f=p=>{var v=vT(),g=z(v),m=$(g,!0);I(g);var b=te(g),k=$(b,!0);I(b),ce((O,E)=>{se(m,O),se(k,E)},[()=>ko(r().time,{month:"numeric",day:"numeric"},S.locale),()=>wo(r().time)]),w(p,v)};fe(d,p=>{r().time&&p(f)})}return ce(()=>{se(l,n.event_title),se(u,n.title)}),w(t,s),ie(i)}oe(Rm,{cartItem:{}},[],[],{mode:"open"});var _T=j('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),bT=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),wT=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Lm(t,e){ne(e,!0);let r=_(e,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=wT(),s=z(i),o=$(s,!0);I(s);var a=te(s,2);{var l=c=>{var u=bT(),d=z(u),f=$(d,!0);I(d);var p=te(d,2);{var v=g=>{var m=_T(),b=$(m,!0);I(m),ce(k=>se(b,k),[()=>wo(r().time)]),w(g,m)};fe(p,g=>{r().product.subtype==="timeslot"&&g(v)})}ce(g=>se(f,g),[()=>ko(r().time,{month:"numeric",day:"numeric"},S.locale)]),w(c,u)};fe(a,c=>{r().time&&c(l)})}return ce(()=>se(o,r().product.title)),w(t,i),ie(n)}oe(Lm,{cartItem:{}},[],[],{mode:"open"});function zm(t,e,r={floor:0}){const{floor:n}=r;if(e===0||e===n)return[rl(n)];if(e<t)return t>n?[rl(t)]:[];const i=Math.max(t,n),s=[rl(n)];for(let o=i;o<=e;o++)o!==n&&s.push(rl(o));return s}function rl(t){return{value:t,label:t.toString()}}var kT=j('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),ST=j('<span class="go-cart-item-price-discounted"> </span>'),xT=j("<span> </span>"),ET=j("<option> </option>"),TT=j('<select class="go-cart-item-select"></select>'),AT=j('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),CT=j('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article>');function Zm(t,e){ne(e,!0);let r=_(e,"displayItem",7),n=_(e,"displayCart",7),i=_(e,"preview",7),s=le(void 0);const o=C(()=>S.cart?.items.find(v=>v.uuid===(r().display?.reference_uuid??r().uuid))),a=us();_e(()=>{S.cart?.items.map(v=>v.quantity),Ge(()=>{M(s,S.capacityManager.capacity(n(),r(),a),!0)})});function l(v){const g=v;if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const m=parseInt(g.value,10);h(o).quantity=Math.max(0,h(o).quantity-r().quantity+m)}function c(){if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const v=Math.max(0,h(o).quantity-r().quantity);v===0?S.cart?.deleteItem(h(o)):h(o).quantity=v}var u={get displayItem(){return r()},set displayItem(v){r(v),y()},get displayCart(){return n()},set displayCart(v){n(v),y()},get preview(){return i()},set preview(v){i(v),y()}},d=W(),f=z(d);{var p=v=>{var g=CT(),m=$(g),b=$(m),k=$(b);{var O=G=>{Lm(G,{get cartItem(){return r()}})},E=G=>{var q=W(),Y=z(q);{var ue=ee=>{Rm(ee,{get cartItem(){return r()}})};fe(Y,ee=>{r().product.type==="Event"&&ee(ue)},!0)}w(G,q)};fe(k,G=>{r().product.type==="Ticket"?G(O):G(E,!1)})}I(b);var P=te(b,2),A=$(P);{var D=G=>{var q=kT(),Y=z(q),ue=$(Y,!0);I(Y);var ee=te(Y,2),ve=$(ee,!0);I(ee),ce((L,ye)=>{se(ue,L),se(ve,ye)},[()=>kr(r().display.originalPrice),()=>kr(r().final_price_cents)]),w(G,q)},F=G=>{var q=ST(),Y=$(q,!0);I(q),ce(ue=>se(Y,ue),[()=>kr(r().final_price_cents)]),w(G,q)};fe(A,G=>{r().display?.discounted?G(D):G(F,!1)})}I(P);var N=te(P,2),B=$(N);{var H=G=>{var q=xT(),Y=$(q,!0);I(q),ce(()=>se(Y,r().quantity)),w(G,q)},Z=G=>{var q=TT();q.__change=Y=>l(Y.target),He(q,21,()=>zm(h(s).min,h(s).max,{floor:1}),Y=>Y.value,(Y,ue)=>{var ee=ET(),ve=$(ee,!0);I(ee);var L={};ce(()=>{Cc(ee,r().quantity===h(ue).value),se(ve,h(ue).label),L!==(L=h(ue).value)&&(ee.value=(ee.__value=h(ue).value)??"")}),w(Y,ee)}),I(q),ce(Y=>Ae(q,"aria-label",Y),[()=>S.t("cart.content.table.edit")]),w(G,q)};fe(B,G=>{i()?G(H):G(Z,!1)})}I(N);var de=te(N,2);{var X=G=>{var q=AT(),Y=$(q);Y.__click=c,I(q),ce(ue=>Ae(Y,"aria-label",ue),[()=>S.t("cart.item.remove")]),w(G,q)};fe(de,G=>{i()||G(X)})}var K=te(de,2),J=$(K,!0);I(K),I(m),I(g),ce(G=>se(J,G),[()=>kr(r().total_price_cents)]),w(v,g)};fe(f,v=>{h(s)&&v(p)})}return w(t,d),ie(u)}Hr(["change","click"]),oe(Zm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var OT=j('<li class="go-cart-header-remove"></li>'),DT=j('<li class="go-cart-item"><!></li>'),IT=j('<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>');function PT(t,e){ne(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=W(),s=z(i);{var o=a=>{var l=IT(),c=$(l),u=$(c),d=$(u),f=$(d,!0);I(d);var p=te(d,2),v=$(p,!0);I(p);var g=te(p,2),m=$(g,!0);I(g);var b=te(g,2);{var k=A=>{var D=OT();w(A,D)};fe(b,A=>{h(n).preview||A(k)})}var O=te(b,2),E=$(O,!0);I(O),I(u),I(c);var P=te(c,2);He(P,17,()=>h(n).displayCart.items,A=>A.uuid,(A,D)=>{var F=DT(),N=$(F);Zm(N,{get displayItem(){return h(D)},get displayCart(){return h(n).displayCart},get preview(){return h(n).preview}}),I(F),w(A,F)}),I(l),ce((A,D,F,N)=>{se(f,A),se(v,D),se(m,F),se(E,N)},[()=>S.t("cart.content.table.desc"),()=>S.t("cart.content.table.price"),()=>S.t("cart.content.table.quantity"),()=>S.t("cart.content.table.total")]),w(a,l)};fe(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),ie()}customElements.define("go-cart-items",oe(PT,{},[],[]));var MT=j('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),$T=j('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),NT=j('<ol data-testid="cart-coupons"></ol>');function FT(t,e){ne(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=W(),s=z(i);{var o=a=>{var l=NT();He(l,20,()=>h(n).displayCart.coupons,c=>c,(c,u)=>{var d=$T();let f;var p=$(d),v=$(p),g=$(v),m=$(g,!0);I(g);var b=te(g,2);{var k=O=>{var E=MT(),P=$(E);P.__click=()=>S.cart?.removeCoupon(u),I(E),ce(A=>Ae(P,"aria-label",A),[()=>S.t("cart.coupons.remove")]),w(O,E)};fe(b,O=>{h(n).preview||O(k)})}I(v),I(p),I(d),ce(O=>{f=lr(d,1,"go-cart-coupon",null,f,O),se(m,u)},[()=>({"go-cart-coupon-inactive":!h(n).appliedCoupons.has(u)})]),w(c,d)}),I(l),w(a,l)};fe(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.coupons.length>0&&a(o)})}w(t,i),ie()}Hr(["click"]),customElements.define("go-cart-coupons",oe(FT,{},[],[]));var RT=j('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function LT(t,e){ne(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=W(),s=z(i);{var o=a=>{var l=RT(),c=$(l,!0);I(l),ce(u=>se(c,u),[()=>kr(h(n).totalPriceCents)]),w(a,l)};fe(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),ie()}customElements.define("go-cart-total-amount",oe(LT,{},[],[]));function zT(t,e){ne(e,!0);const r=_(e,"preview",7,!1),n=new mT;gT(e.$$host,n),_e(()=>{n.preview=r()}),_e(()=>{S.cart&&(S.cart.items.map(o=>o.uuid+":"+o.quantity+":"+o.time),S.cart.coupons.join("|"),Ge(()=>n.calculateDisplayCart()))});async function i(){const o=e.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const l of o){const c=await l.flush?.();c&&!c.success&&(a=!1)}return a}e.$$host.addEventListener("click",async o=>{const a=o.target.closest("go-submit");if(!a)return;const l=a.closest("go-form");if(l&&e.$$host.contains(l))return;const c=await i();e.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:c},bubbles:!0,composed:!0}))});var s={get preview(){return r()},set preview(o=!1){r(o),y()}};return ie(s)}customElements.define("go-cart",oe(zT,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var ZT=j('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function VT(t,e){ne(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=W(),s=z(i);{var o=a=>{var l=ZT(),c=$(l,!0);I(l),ce(u=>se(c,u),[()=>kr(h(n).subtotalPriceCents)]),w(a,l)};fe(s,a=>{h(n)&&S.cart?.items.length&&a(o)})}w(t,i),ie()}customElements.define("go-cart-subtotal-amount",oe(VT,{},[],[]));var UT=j('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function BT(t,e){ne(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=W(),s=z(i);{var o=a=>{var l=UT(),c=te($(l),1,!0);I(l),ce(u=>se(c,u),[()=>kr(h(n).discountedAmountCents)]),w(a,l)};fe(s,a=>{h(n)&&h(n).discountedAmountCents>0&&a(o)})}w(t,i),ie()}customElements.define("go-cart-discounted-amount",oe(BT,{},[],[]));function jT(t,e){ne(e,!0),Ni(e.$$host,"go-if",{when:"data.cart.items.length === 0"}),ie()}customElements.define("go-cart-empty",oe(jT,{},[],[]));function qT(t,e){ne(e,!0);let r=C(()=>S.cart?.items.length);Mt();var n=Yt();ce(()=>se(n,h(r))),w(t,n),ie()}customElements.define("go-cart-counter",oe(qT,{},[],[]));function WT(t,e){ne(e,!0);let r=_(e,"custom",7,!1),n=C(()=>S.cart);hr.defineForm({id:"checkoutGuest",submitLabel:"cart.detail.actions.checkout",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Ni(e.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),e.$$host.addEventListener("submit",async s=>{const o=s.target;if(!h(n))return;const a=await S.signUp(o.details.formData,!0);if(a.error){o.details.apiErrors=a.error.errors;return}const l=o.details.fieldValue("paymentMode");h(n).paymentModeId=l==null?void 0:String(l);const c=await S.checkout(h(n).orderData());if(c.error){o.details.apiErrors=c.error;return}const u=ot.config.forms.checkoutGuest?.beforeSubmit;u&&await u(o.details.formData);const d=c.data.meta.payment_url;ot.config.navigateTo?.(d)});var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return ie(i)}customElements.define("go-checkout-form",oe(WT,{custom:{}},[],[]));const HT="TokenActions::ApplyOrderDiscount";async function KT(t){if(!S.cart)throw new Error("(go-coupon-redemption): cart not found");const e=await S.asyncFetch(()=>S.getCouponSaleByBarcode(t));return e?.is_valid?e.value_action===HT?(S.cart.addCoupon(t),{success:!0}):e.is_voucher_for?GT(t,e):Au([S.t("cart.coupon.form.errors.notValid")]):Au([S.t("cart.coupon.form.errors.notValid")])}async function GT(t,e){const n=(await S.asyncFetch(()=>S.tickets({"by_ticket_ids[]":[e.is_voucher_for]}))).find(s=>s.id===e.is_voucher_for);if(!n)return Au([S.t("cart.coupon.form.errors.error")]);const i={...n,price_cents:0};return S.cart.addItem(xt(ja(i),{quantity:1})),S.cart.addCoupon(t),{success:!0}}function Au(t){return{success:!1,errors:t}}var YT=j("<go-form></go-form>",2);function JT(t,e){ne(e,!0),hr.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(d=>d.key==="token"),c=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const u=await KT(c);return u.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),u):(a.details.apiErrors=u.errors,u)}async function n(a){await r(a.target)}async function i(){const a=e.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=YT();return xi(o,"formId","couponRedemption"),kc("submit",o,n),w(t,o),ie(s)}customElements.define("go-coupon-redemption",oe(JT,{},[],["flush"])),h_();class QT{#e=le();get campaign(){return h(this.#e)}set campaign(e){M(this.#e,e,!0)}#t=le();get amount(){return h(this.#t)}set amount(e){M(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let r=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");Ei(r.filter(i=>i.campaign_id=e.campaign_id),i=>i.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!S.currentUser?.isAuthenticated||S.currentUser.isGuest)?this.skipDonation():(r.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(r)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart())}}const Zt=new QT;var XT=j('<img alt="logo"/>'),e1=j('<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>');function Vm(t,e){ne(e,!0);let r=_(e,"campaign",7);const n=C(()=>r().translations);var i={get campaign(){return r()},set campaign(g){r(g),y()}},s=e1();let o;s.__click=()=>Zt.selectCampaign(r()),s.__keydown=g=>{g.key==="Enter"&&Zt.selectCampaign(r())};var a=$(s),l=$(a);{var c=g=>{var m=XT();ce(b=>Ae(m,"src",b),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),w(g,m)};fe(l,g=>{r().picture.thumbnail&&g(c)})}I(a);var u=te(a,2),d=$(u),f=$(d,!0);I(d);var p=te(d,2),v=$(p,!0);return I(p),I(u),I(s),ce(()=>{o=lr(s,1,"go-donation-campaign",null,o,{selected:Zt.campaign?.id===r()?.id}),se(f,h(n)["donations.headline"]),se(v,h(n)["donations.shop.info"])}),w(t,s),ie(i)}Hr(["click","keydown"]),oe(Vm,{campaign:{}},[],[],{mode:"open"});function t1(t,e){return e=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:e}).format(t):new Intl.NumberFormat("de-DE",{style:"currency",currency:e}).format(t)}function Dn(t){if(!t)return;const e=t.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return e.length>0?e:void 0}var r1=j("<button> </button>"),n1=j('<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>'),i1=j('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Um(t,e){ne(e,!0);const r=Zt.campaign?.guest_limit/100;let n=le(void 0);function i(f){Zt.amount=f,M(n,null)}function s(f){const p=document.getElementById("donationForm");p.checkValidity()?Zt.amount=f.target.valueAsNumber*100:(Zt.amount=void 0,p.reportValidity())}var o=i1(),a=$(o),l=$(a,!0);I(a);var c=te(a,2);He(c,20,()=>Zt.campaign?.options,f=>f,(f,p)=>{var v=r1();let g;v.__click=()=>i(p);var m=$(v,!0);I(v),ce(b=>{g=lr(v,1,"btn btn-default",null,g,{selected:Zt.amount===p}),se(m,b)},[()=>t1(p/100,S.currency)]),w(f,v)}),I(c);var u=te(c,2);{var d=f=>{var p=n1(),v=$(p),g=$(v),m=$(g,!0);I(g);var b=te(g,2);Ta(b),b.__input=s,I(v),I(p),ce((k,O)=>{se(m,k),Ae(b,"max",r),Ae(b,"placeholder",O),Lh(b,h(n))},[()=>S.t("donations.selection.custom.label"),()=>S.t("donations.selection.custom.input.placeholder")]),w(f,p)};fe(u,f=>{Zt.campaign?.free_donations&&f(d)})}I(o),ce(f=>se(l,f),[()=>S.t("donations.selection.title")]),w(t,o),ie()}Hr(["click","input"]),oe(Um,{},[],[],{mode:"open"});var s1=j('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function o1(t,e){ne(e,!1),kn(()=>{S.donations?.campaigns?.length==1&&Zt.selectCampaign(S.donations?.campaigns[0])}),Fc();var r=W(),n=z(r);{var i=s=>{var o=s1(),a=$(o);He(a,1,()=>S?.donations?.campaigns,g=>g.id,(g,m)=>{Vm(g,{get campaign(){return h(m)}})});var l=te(a,2);{var c=g=>{Um(g,{})};fe(l,g=>{Zt.campaign&&g(c)})}var u=te(l,2),d=$(u);d.__click=function(...g){Zt.skipDonation?.apply(this,g)};var f=$(d,!0);I(d);var p=te(d,2);p.__click=function(...g){Zt.addDonationToCart?.apply(this,g)};var v=$(p,!0);I(p),I(u),I(o),ce((g,m)=>{se(f,g),p.disabled=!Zt.amount,se(v,m)},[()=>S.t("donations.actions.continueWithoutDonation"),()=>S.t("donations.actions.addToCart")]),w(s,o)};fe(n,s=>{S.donations&&S.donations.campaigns&&s(i)})}w(t,r),ie()}Hr(["click"]),customElements.define("go-donations",oe(o1,{},[],[]));function a1(t){return typeof t=="function"}function Ao(t){return t!==null&&typeof t=="object"}const l1=["string","number","bigint","boolean"];function Cu(t){return t==null||l1.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>Cu(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const nl=Symbol("box"),Bm=Symbol("is-writable");function R(t,e){const r=C(t);return e?{[nl]:!0,[Bm]:!0,get current(){return h(r)},set current(n){e(n)}}:{[nl]:!0,get current(){return t()}}}function jm(t){return Ao(t)&&nl in t}function c1(t){return jm(t)?t:a1(t)?R(t):Nr(t)}function Nr(t){let e=le(Be(t));return{[nl]:!0,[Bm]:!0,get current(){return h(e)},set current(r){M(e,r,!0)}}}function qm(...t){return function(e){for(const r of t)if(r){if(e.defaultPrevented)return;typeof r=="function"?r.call(this,e):r.current?.call(this,e)}}}var Wm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,u1=/\n/g,d1=/^\s*/,f1=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,h1=/^:\s*/,p1=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,m1=/^[;\s]*/,g1=/^\s+|\s+$/g,v1=`
6
+ `,Hm="/",Km="*",Fi="",y1="comment",_1="declaration";function b1(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(v){var g=v.match(u1);g&&(r+=g.length);var m=v.lastIndexOf(v1);n=~m?v.length-m:n+v.length}function s(){var v={line:r,column:n};return function(g){return g.position=new o(v),c(),g}}function o(v){this.start=v,this.end={line:r,column:n},this.source=e.source}o.prototype.content=t;function a(v){var g=new Error(e.source+":"+r+":"+n+": "+v);if(g.reason=v,g.filename=e.source,g.line=r,g.column=n,g.source=t,!e.silent)throw g}function l(v){var g=v.exec(t);if(g){var m=g[0];return i(m),t=t.slice(m.length),g}}function c(){l(d1)}function u(v){var g;for(v=v||[];g=d();)g!==!1&&v.push(g);return v}function d(){var v=s();if(!(Hm!=t.charAt(0)||Km!=t.charAt(1))){for(var g=2;Fi!=t.charAt(g)&&(Km!=t.charAt(g)||Hm!=t.charAt(g+1));)++g;if(g+=2,Fi===t.charAt(g-1))return a("End of comment missing");var m=t.slice(2,g-2);return n+=2,i(m),t=t.slice(g),n+=2,v({type:y1,comment:m})}}function f(){var v=s(),g=l(f1);if(g){if(d(),!l(h1))return a("property missing ':'");var m=l(p1),b=v({type:_1,property:Gm(g[0].replace(Wm,Fi)),value:m?Gm(m[0].replace(Wm,Fi)):Fi});return l(m1),b}}function p(){var v=[];u(v);for(var g;g=f();)g!==!1&&(v.push(g),u(v));return v}return c(),p()}function Gm(t){return t?t.replace(g1,Fi):Fi}function w1(t,e){let r=null;if(!t||typeof t!="string")return r;const n=b1(t),i=typeof e=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?e(o,a,s):a&&(r=r||{},r[o]=a)}),r}const k1=/\d/,S1=["-","_","/","."];function x1(t=""){if(!k1.test(t))return t!==t.toLowerCase()}function E1(t){const e=[];let r="",n,i;for(const s of t){const o=S1.includes(s);if(o===!0){e.push(r),r="",n=void 0;continue}const a=x1(s);if(i===!1){if(n===!1&&a===!0){e.push(r),r=s,n=a;continue}if(n===!0&&a===!1&&r.length>1){const l=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=a;continue}}r+=s,n=a,i=o}return e.push(r),e}function Ym(t){return t?E1(t).map(e=>A1(e)).join(""):""}function T1(t){return C1(Ym(t||""))}function A1(t){return t?t[0].toUpperCase()+t.slice(1):""}function C1(t){return t?t[0].toLowerCase()+t.slice(1):""}function Co(t){if(!t)return{};const e={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[Ym(n)]=i;return}if(n.startsWith("--")){e[n]=i;return}e[T1(n)]=i}return w1(t,r),e}function Oo(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function O1(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const D1=O1(/[A-Z]/,t=>`-${t.toLowerCase()}`);function I1(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${D1(e)}: ${t[e]};`).join(`
7
+ `)}function Do(t={}){return I1(t).replace(`
8
+ `," ")}const P1=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],M1=new Set(P1);function $1(t){return M1.has(t)}function et(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];if(n){for(const i of Object.keys(n)){const s=e[i],o=n[i],a=typeof s=="function",l=typeof o=="function";if(a&&$1(i)){const c=s,u=o;e[i]=qm(c,u)}else if(a&&l)e[i]=Oo(s,o);else if(i==="class"){const c=Cu(s),u=Cu(o);c&&u?e[i]=xa(s,o):c?e[i]=xa(s):u&&(e[i]=xa(o))}else if(i==="style"){const c=typeof s=="object",u=typeof o=="object",d=typeof s=="string",f=typeof o=="string";if(c&&u)e[i]={...s,...o};else if(c&&f){const p=Co(o);e[i]={...s,...p}}else if(d&&u){const p=Co(s);e[i]={...p,...o}}else if(d&&f){const p=Co(s),v=Co(o);e[i]={...p,...v}}else c?e[i]=s:u?e[i]=o:d?e[i]=s:f&&(e[i]=o)}else e[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(n)){const s=e[i],o=n[i];e[i]=o!==void 0?o:s}}}return typeof e.style=="object"&&(e.style=Do(e.style).replaceAll(`
9
+ `," ")),e.hidden===!1&&(e.hidden=void 0,delete e.hidden),e.disabled===!1&&(e.disabled=void 0,delete e.disabled),e}const Jm=Do({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"}),Qm=typeof window<"u"?window:void 0;function N1(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class F1 extends Map{#e=new Map;#t=le(0);#r=le(0);#n=wn||-1;constructor(e){if(super(),e){for(var[r,n]of e)super.set(r,n);this.#r.v=super.size}}#i(e){return wn===this.#n?le(e):Gn(e)}has(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else return h(this.#t),!1}return h(n),!0}forEach(e,r){this.#s(),super.forEach(e,r)}get(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else{h(this.#t);return}}return h(n),super.get(e)}set(e,r){var n=this.#e,i=n.get(e),s=super.get(e),o=super.set(e,r),a=this.#t;if(i===void 0)i=this.#i(0),n.set(e,i),M(this.#r,super.size),Wr(a);else if(s!==r){Wr(i);var l=a.reactions===null?null:new Set(a.reactions),c=l===null||!i.reactions?.every(u=>l.has(u));c&&Wr(a)}return o}delete(e){var r=this.#e,n=r.get(e),i=super.delete(e);return n!==void 0&&(r.delete(e),M(this.#r,super.size),M(n,-1),Wr(this.#t)),i}clear(){if(super.size!==0){super.clear();var e=this.#e;M(this.#r,0);for(var r of e.values())M(r,-1);Wr(this.#t),e.clear()}}#s(){h(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var r of super.keys())if(!e.has(r)){var n=this.#i(0);e.set(r,n)}}for([,n]of this.#e)h(n)}keys(){return h(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return h(this.#r),super.size}}class R1{#e;#t;constructor(e={}){const{window:r=Qm,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=uc(i=>{const s=wt(r,"focusin",i),o=wt(r,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#t?.(),this.#e?N1(this.#e):null}}new R1;function L1(t){return typeof t=="function"}class In{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return g_(this.#t)}get(){const e=$f(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const r=$f(this.#t);return r===void 0?e:r}set(e){return m_(this.#t,e)}}function z1(t,e){switch(t){case"post":_e(e);break;case"pre":vc(e);break}}function Xm(t,e,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(t)?[]:void 0;z1(e,()=>{const a=Array.isArray(t)?t.map(c=>c()):t();if(!s){s=!0,o=a;return}const l=Ge(()=>r(a,o));return o=a,l})}function ut(t,e,r){Xm(t,"post",e,r)}function Z1(t,e,r){Xm(t,"pre",e,r)}ut.pre=Z1;function eg(t){return L1(t)?t():t}class V1{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=C(()=>(h(this.#o)?.(),this.getSize().width));#a=C(()=>(h(this.#o)?.(),this.getSize().height));#o=C(()=>{const e=eg(this.#n);if(e)return uc(r=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(i=>{this.#t=!0;for(const s of i){const o=this.#r.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#e.width=a.reduce((l,c)=>Math.max(l,c.inlineSize),0),this.#e.height=a.reduce((l,c)=>Math.max(l,c.blockSize),0)}r()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,r={box:"border-box"}){this.#i=r.window??Qm,this.#r=r,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=eg(this.#n);if(!e||!this.#i)return;const r=e.offsetWidth,n=e.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:n};const i=this.#i.getComputedStyle(e),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),l=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),c=r-s-a,u=n-o-l;return{width:c,height:u}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return h(this.#o)?.(),this.getSize()}get width(){return h(this.#s)}get height(){return h(this.#a)}}function _s(t){_e(()=>()=>{t()})}function U1(t,e){return setTimeout(e,t)}function Io(t){Sh().then(t)}const B1=1,j1=9,q1=11;function Ou(t){return Ao(t)&&t.nodeType===B1&&typeof t.nodeName=="string"}function tg(t){return Ao(t)&&t.nodeType===j1}function W1(t){return Ao(t)&&t.constructor?.name==="VisualViewport"}function H1(t){return Ao(t)&&t.nodeType!==void 0}function rg(t){return H1(t)&&t.nodeType===q1&&"host"in t}function K1(t,e){if(!t||!e||!Ou(t)||!Ou(e))return!1;const r=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(r&&rg(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function il(t){return tg(t)?t:W1(t)?t.document:t?.ownerDocument??document}function ng(t){return rg(t)?ng(t.host):tg(t)?t.defaultView??window:Ou(t)?t.ownerDocument?.defaultView??window:window}function G1(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class bs{element;#e=C(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return h(this.#e)}set root(e){M(this.#e,e)}constructor(e){typeof e=="function"?this.element=R(e):this.element=e}getDocument=()=>il(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>G1(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,r)=>this.getWindow().setTimeout(e,r);clearTimeout=e=>this.getWindow().clearTimeout(e)}function lt(t,e){return{[H_()]:r=>jm(t)?(t.current=r,Ge(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t.current=null,e?.(null))}):(t(r),Ge(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t(null),e?.(null))})}}function Fr(t){return t?"true":"false"}function Du(t){return t?"true":void 0}function qe(t){return t?"":void 0}function ig(t){return t?"open":"closed"}class Y1{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(r=>[r,this.getAttr(r)]))}getAttr(e,r){return r?`data-${r}-${e}`:`${this.#t}${e}`}selector(e,r){return`[${this.getAttr(e,r)}]`}}function sl(t){const e=new Y1(t);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}const ol="ArrowDown",Po="ArrowLeft",Mo="ArrowRight",al="ArrowUp",sg="Backspace",Iu="Enter",J1="Escape",Pu=" ",ll="Tab",Mu="a",og="P",$u="A",Q1="p",Pn=typeof document<"u",ag=X1();function X1(){return Pn&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Rr(t){return t instanceof HTMLElement}function $o(t){return t instanceof Element}function eA(t){return t instanceof Element||t instanceof SVGElement}function cl(t){return!Number.isNaN(Number(t))&&!Number.isNaN(Number.parseFloat(t))}function ui(t){return t===null}function ul(t){return t.pointerType==="touch"}function tA(t){return t!==null}class rA{#e;#t=null;constructor(e){this.#e=e,_s(()=>this.#r())}#r(){this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null)}run(e){this.#r();const r=this.#e.ref.current;if(r){if(typeof r.getAnimations!="function"){this.#n(e);return}this.#t=window.requestAnimationFrame(()=>{const n=r.getAnimations();if(n.length===0){this.#n(e);return}Promise.allSettled(n.map(i=>i.finished)).then(()=>{this.#n(e)})})}}#n(e){const r=()=>{e()};this.#e.afterTick?Io(r):r()}}class lg{#e;#t;#r;#n=le(!1);constructor(e){this.#e=e,M(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new rA({ref:this.#e.ref,afterTick:this.#e.open}),ut(()=>this.#e.open.current,r=>{r&&M(this.#n,!0),this.#t&&this.#r.run(()=>{r===this.#e.open.current&&(this.#e.open.current||M(this.#n,!1),this.#e.onComplete?.())})})}get shouldRender(){return h(this.#n)}}function Te(){}function Fe(t,e){return`bits-${t}`}const nA=new In("BitsConfig");function iA(){const t=new sA(null,{});return nA.getOr(t).opts}class sA{opts;constructor(e,r){const n=oA(e,r);this.opts={defaultPortalTo:n(i=>i.defaultPortalTo),defaultLocale:n(i=>i.defaultLocale)}}}function oA(t,e){return r=>R(()=>{const i=r(e)?.current;if(i!==void 0)return i;if(t!==null)return r(t.opts)?.current})}function aA(t,e){return r=>{const n=iA();return R(()=>{const i=r();if(i!==void 0)return i;const s=t(n).current;return s!==void 0?s:e})}}const cg=aA(t=>t.defaultLocale,"en");function ug(t,e=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...i)},e)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function dg(t,e){return t===e||t.contains(e)}function fg(t){return t?.ownerDocument??document}function lA(t,e){const{clientX:r,clientY:n}=t,i=e.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var hg=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],dl=hg.join(","),pg=typeof Element>"u",Ri=pg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fl=!pg&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},hl=function(e,r){var n;r===void 0&&(r=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=i===""||i==="true",o=s||r&&e&&(typeof e.closest=="function"?e.closest("[inert]"):hl(e.parentNode));return o},cA=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},mg=function(e,r,n){if(hl(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(dl));return r&&Ri.call(e,dl)&&i.unshift(e),i=i.filter(n),i},pl=function(e,r,n){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!hl(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,c=pl(l,!0,n);n.flatten?i.push.apply(i,c):i.push({scopeParent:o,candidates:c})}else{var u=Ri.call(o,dl);u&&n.filter(o)&&(r||!e.includes(o))&&i.push(o);var d=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),f=!hl(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(d&&f){var p=pl(d===!0?o.children:d.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},gg=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},vg=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||cA(e))&&!gg(e)?0:e.tabIndex},uA=function(e,r){var n=vg(e);return n<0&&r&&!gg(e)?0:n},dA=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},yg=function(e){return e.tagName==="INPUT"},fA=function(e){return yg(e)&&e.type==="hidden"},hA=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},pA=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},mA=function(e){if(!e.name)return!0;var r=e.form||fl(e),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=pA(i,e.form);return!s||s===e},gA=function(e){return yg(e)&&e.type==="radio"},vA=function(e){return gA(e)&&!mA(e)},yA=function(e){var r,n=e&&fl(e),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==e){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var c,u,d;n=fl(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((u=i)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return s},_g=function(e){var r=e.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},_A=function(e,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var o=Ri.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Ri.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var c=e.parentElement,u=fl(e);if(c&&!c.shadowRoot&&i(c)===!0)return _g(e);e.assignedSlot?e=e.assignedSlot:!c&&u!==e.ownerDocument?e=u.host:e=c}e=l}if(yA(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return _g(e);return!1},bA=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return Ri.call(r,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}r=r.parentElement}return!1},ml=function(e,r){return!(r.disabled||fA(r)||_A(r,e)||hA(r)||bA(r))},Nu=function(e,r){return!(vA(r)||vg(r)<0||!ml(e,r))},wA=function(e){var r=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},bg=function(e){var r=[],n=[];return e.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=uA(a,o),c=o?bg(i.candidates):a;l===0?o?r.push.apply(r,c):r.push(a):n.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:c})}),n.sort(dA).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},kA=function(e,r){r=r||{};var n;return r.getShadowRoot?n=pl([e],r.includeContainer,{filter:Nu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:wA}):n=mg(e,r.includeContainer,Nu.bind(null,r)),bg(n)},SA=function(e,r){r=r||{};var n;return r.getShadowRoot?n=pl([e],r.includeContainer,{filter:ml.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=mg(e,r.includeContainer,ml.bind(null,r)),n},xA=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Ri.call(e,dl)===!1?!1:Nu(r,e)},EA=hg.concat("iframe:not([inert]):not([inert] *)").join(","),TA=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Ri.call(e,EA)===!1?!1:ml(r,e)};function AA(t,e){const r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}function Fu(t,e){return t>=0&&t<e.length}const CA="data-context-menu-trigger",OA="data-context-menu-content";sl({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]}),globalThis.bitsDismissableLayers??=new Map;class Ru{static create(e){return new Ru(e)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Te;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,_e(()=>{this.#s=fg(this.opts.ref.current)});let r=Te;const n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),r()};ut([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return U1(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#c())}),n}),_s(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#o(),r()})}#l=e=>{e.defaultPrevented||this.opts.ref.current&&Io(()=>{!this.opts.ref.current||this.#m(e.target)||e.target&&!this.#i&&this.#a.current?.(e)})};#c(){return Oo(wt(this.#s,"pointerdown",Oo(this.#f,this.#p),{capture:!0}),wt(this.#s,"pointerdown",Oo(this.#h,this.#u)),wt(this.#s,"focusin",this.#l))}#d=e=>{let r=e;r.defaultPrevented&&(r=wg(e)),this.#e.current(e)};#u=ug(e=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(e,this.opts.ref.current)||PA(e,this.opts.ref.current);if(!this.#n||this.#v()||!r){this.#o();return}let n=e;if(n.defaultPrevented&&(n=wg(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}e.pointerType==="touch"?(this.#o(),this.#o=wt(this.#s,"click",this.#d,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#r[e.type]=!0};#h=e=>{this.#r[e.type]=!1};#p=()=>{this.opts.ref.current&&(this.#n=IA(this.opts.ref.current))};#m=e=>this.opts.ref.current?dg(this.opts.ref.current,e):!1;#g=ug(()=>{for(const e in this.#r)this.#r[e]=!1;this.#n=!1},20);#v(){return Object.values(this.#r).some(Boolean)}#y=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#y,onblurcapture:this.#_}}function DA(t=[...globalThis.bitsDismissableLayers]){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function IA(t){const e=[...globalThis.bitsDismissableLayers],r=DA(e);if(r)return r[0].opts.ref.current===t;const[n]=e[0];return n.opts.ref.current===t}function PA(t,e){const r=t.target;if(!eA(r))return!1;const n=!!r.closest(`[${CA}]`);if("button"in t&&t.button>0&&!n)return!1;if("button"in t&&t.button===0&&n)return!0;const i=!!e.closest(`[${OA}]`);return n&&i?!1:fg(r).documentElement.contains(r)&&!dg(e,r)&&lA(t,e)}function wg(t){const e=t.currentTarget,r=t.target;let n;t instanceof PointerEvent?n=new PointerEvent(t.type,t):n=new PointerEvent("pointerdown",t);let i=!1;return new Proxy(n,{get:(o,a)=>a==="currentTarget"?e:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:t[a]})}function kg(t,e){ne(e,!0);let r=_(e,"interactOutsideBehavior",7,"close"),n=_(e,"onInteractOutside",7,Te),i=_(e,"onFocusOutside",7,Te),s=_(e,"id",7),o=_(e,"children",7),a=_(e,"enabled",7),l=_(e,"isValidEvent",7,()=>!1),c=_(e,"ref",7);const u=Ru.create({id:R(()=>s()),interactOutsideBehavior:R(()=>r()),onInteractOutside:R(()=>n()),enabled:R(()=>a()),onFocusOutside:R(()=>i()),isValidEvent:R(()=>l()),ref:c()});var d={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(v="close"){r(v),y()},get onInteractOutside(){return n()},set onInteractOutside(v=Te){n(v),y()},get onFocusOutside(){return i()},set onFocusOutside(v=Te){i(v),y()},get id(){return s()},set id(v){s(v),y()},get children(){return o()},set children(v){o(v),y()},get enabled(){return a()},set enabled(v){a(v),y()},get isValidEvent(){return l()},set isValidEvent(v=()=>!1){l(v),y()},get ref(){return c()},set ref(v){c(v),y()}},f=W(),p=z(f);return ke(p,()=>o()??Ue,()=>({props:u.props})),w(t,f),ie(d)}oe(kg,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;class Lu{static create(e){return new Lu(e)}opts;domContext;constructor(e){this.opts=e,this.domContext=new bs(this.opts.ref);let r=Te;ut(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>wt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==J1||!MA(this))return;const r=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}}function MA(t){const e=[...globalThis.bitsEscapeLayers],r=e.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===t;const[n]=e[0];return n===t}function Sg(t,e){ne(e,!0);let r=_(e,"escapeKeydownBehavior",7,"close"),n=_(e,"onEscapeKeydown",7,Te),i=_(e,"children",7),s=_(e,"enabled",7),o=_(e,"ref",7);Lu.create({escapeKeydownBehavior:R(()=>r()),onEscapeKeydown:R(()=>n()),enabled:R(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(u="close"){r(u),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(u=Te){n(u),y()},get children(){return i()},set children(u){i(u),y()},get enabled(){return s()},set enabled(u){s(u),y()},get ref(){return o()},set ref(u){o(u),y()}},l=W(),c=z(l);return ke(c,()=>i()??Ue),w(t,l),ie(a)}oe(Sg,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});class zu{static instance;#e=Nr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new zu),this.instance}register(e){const r=this.getActive();r&&r!==e&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(e,n),this.#e.current=this.#e.current.filter(i=>i!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(n=>n!==e);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,r){this.#t.set(e,r)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,r){this.#r.set(e,r)}getPreFocusMemory(e){return this.#r.get(e)}clearPreFocusMemory(e){this.#r.delete(e)}}class Zu{#e=!1;#t=null;#r=zu.getInstance();#n=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const e of this.#n)e();this.#n=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#r.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const e=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#d();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const e=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const e=this.#t,r=e.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(!a)return;if(e.contains(a))this.#r.setFocusMemory(this,a);else{const c=this.#r.getFocusMemory(this);if(c&&e.contains(c)&&TA(c))o.preventDefault(),c.focus();else{const u=this.#d(),d=this.#u()[0];(u||d||e).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#c();if(a.length<2)return;const l=a[0],c=a[a.length-1];!o.shiftKey&&r.activeElement===c?(o.preventDefault(),l.focus()):o.shiftKey&&r.activeElement===l&&(o.preventDefault(),c.focus())};this.#n.push(wt(r,"focusin",n,{capture:!0}),wt(e,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!e.contains(o)){const a=this.#d(),l=this.#u()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):e.focus()}});s.observe(e,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#c(){return this.#t?kA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#c()[0]||null}#u(){return this.#t?SA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(e){let r=null;return ut([()=>e.ref.current,()=>e.enabled.current],([n,i])=>{n&&i?(r||(r=new Zu(e)),r.mount(n)):r&&(r.unmount(),r=null)}),_s(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}}function xg(t,e){ne(e,!0);let r=_(e,"enabled",7,!1),n=_(e,"trapFocus",7,!1),i=_(e,"loop",7,!1),s=_(e,"onCloseAutoFocus",7,Te),o=_(e,"onOpenAutoFocus",7,Te),a=_(e,"focusScope",7),l=_(e,"ref",7);const c=Zu.use({enabled:R(()=>r()),trap:R(()=>n()),loop:i(),onCloseAutoFocus:R(()=>s()),onOpenAutoFocus:R(()=>o()),ref:l()});var u={get enabled(){return r()},set enabled(p=!1){r(p),y()},get trapFocus(){return n()},set trapFocus(p=!1){n(p),y()},get loop(){return i()},set loop(p=!1){i(p),y()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(p=Te){s(p),y()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(p=Te){o(p),y()},get focusScope(){return a()},set focusScope(p){a(p),y()},get ref(){return l()},set ref(p){l(p),y()}},d=W(),f=z(d);return ke(f,()=>a()??Ue,()=>({props:c.props})),w(t,d),ie(u)}oe(xg,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsTextSelectionLayers??=new Map;class Vu{static create(e){return new Vu(e)}opts;domContext;#e=Te;constructor(e){this.opts=e,this.domContext=new bs(e.ref);let r=Te;ut(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#t()),()=>{r(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Oo(wt(this.domContext.getDocument(),"pointerdown",this.#r),wt(this.domContext.getDocument(),"pointerup",qm(this.#n,this.opts.onPointerUp.current)))}#r=e=>{const r=this.opts.ref.current,n=e.target;!Rr(r)||!Rr(n)||!this.opts.enabled.current||!NA(this)||!K1(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=$A(r,this.domContext.getDocument().body)))};#n=()=>{this.#e(),this.#e=Te}}const Eg=t=>t.style.userSelect||t.style.webkitUserSelect;function $A(t,e){const r=Eg(e),n=Eg(t);return gl(e,"none"),gl(t,"text"),()=>{gl(e,r),gl(t,n)}}function gl(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function NA(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function Tg(t,e){ne(e,!0);let r=_(e,"preventOverflowTextSelection",7,!0),n=_(e,"onPointerDown",7,Te),i=_(e,"onPointerUp",7,Te),s=_(e,"id",7),o=_(e,"children",7),a=_(e,"enabled",7),l=_(e,"ref",7);Vu.create({id:R(()=>s()),onPointerDown:R(()=>n()),onPointerUp:R(()=>i()),enabled:R(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(f=!0){r(f),y()},get onPointerDown(){return n()},set onPointerDown(f=Te){n(f),y()},get onPointerUp(){return i()},set onPointerUp(f=Te){i(f),y()},get id(){return s()},set id(f){s(f),y()},get children(){return o()},set children(f){o(f),y()},get enabled(){return a()},set enabled(f){a(f),y()},get ref(){return l()},set ref(f){l(f),y()}},u=W(),d=z(u);return ke(d,()=>o()??Ue),w(t,u),ie(c)}oe(Tg,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function di(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}class FA{#e;#t=0;#r=le();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),M(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,h(this.#r)===void 0&&(this.#n=ba(()=>{M(this.#r,this.#e(...e),!0)})),_e(()=>()=>{this.#i()}),h(this.#r)}}const vl=new F1;let yl=le(null),Uu=null,No=null,Fo=!1;const Ag=R(()=>{for(const t of vl.values())if(t)return!0;return!1});let Bu=null;const RA=new FA(()=>{function t(){document.body.setAttribute("style",h(yl)??""),document.body.style.removeProperty("--scrollbar-width"),ag&&Uu?.(),M(yl,null)}function e(){No!==null&&(window.clearTimeout(No),No=null)}function r(i,s){e(),Fo=!0,Bu=Date.now();const o=Bu,a=()=>{No=null,Bu===o&&(Cg(vl)?Fo=!1:(Fo=!1,s()))},l=i===null?24:i;No=window.setTimeout(a,l)}function n(){h(yl)===null&&vl.size===0&&!Fo&&M(yl,document.body.getAttribute("style"),!0)}return ut(()=>Ag.current,()=>{if(!Ag.current)return;n(),Fo=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,c={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${c.padding}px`,document.body.style.marginRight=`${c.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",ag&&(Uu=wt(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),Io(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),_s(()=>()=>{Uu?.()}),{get lockMap(){return vl},resetBodyStyle:t,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:e,ensureInitialStyleCaptured:n}});class LA{#e=di();#t;#r=()=>null;#n;locked;constructor(e,r=()=>null){this.#t=e,this.#r=r,this.#n=RA.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=R(()=>this.#n.lockMap.get(this.#e)??!1,n=>this.#n.lockMap.set(this.#e,n)),_s(()=>{if(this.#n.lockMap.delete(this.#e),Cg(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function Cg(t){for(const[e,r]of t)if(r)return!0;return!1}function ju(t,e){ne(e,!0);let r=_(e,"preventScroll",7,!0),n=_(e,"restoreScrollDelay",7,null);r()&&new LA(r(),()=>n());var i={get preventScroll(){return r()},set preventScroll(s=!0){r(s),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(s=null){n(s),y()}};return ie(i)}oe(ju,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function zA(t){if(!Pn||!t)return null;let e=t.querySelector("[data-bits-announcer]");const r=i=>{const s=t.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!Rr(e)){const i=t.createElement("div");i.style.cssText=Jm,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),e=i,t.body.insertBefore(e,t.body.firstChild)}return{getLog:i=>{if(!Rr(e))return null;const s=e.querySelector(`[aria-live="${i}"]`);return Rr(s)?s:null}}}function _l(t){const e=zA(t);function r(n,i="assertive",s=7500){if(!e||!Pn||!t)return;const o=e.getLog(i),a=t.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?o?.replaceChildren(a):o?.appendChild(a),setTimeout(()=>{a.remove()},s)}return{announce:r}}const ZA={defaultValue:void 0,granularity:"day"};function Og(t){const e={...ZA,...t},{defaultValue:r,granularity:n,minValue:i,maxValue:s}=e;if(Array.isArray(r)&&r.length)return r[r.length-1];if(r&&!Array.isArray(r))return r;{let o=new Date;i&&o<i.toDate(dr())?o=i.toDate(dr()):s&&o>s.toDate(dr())&&(o=s.toDate(dr()));const a=o.getFullYear(),l=o.getMonth()+1,c=o.getDate();return["hour","minute","second"].includes(n??"day")?new An(a,l,c,0,0,0):new ai(a,l,c)}}function Dg(t,e){let r;return e instanceof $r?r=Cp(t):e instanceof An?r=Ap(t):r=iu(t),r.calendar!==e.calendar?fr(r,e.calendar):r}function Jt(t,e=dr()){return t instanceof $r?t.toDate():t.toDate(e)}function VA(t){if(t instanceof ai)return"date";if(t instanceof An)return"datetime";if(t instanceof $r)return"zoneddatetime";throw new Error("Unknown date type")}function UA(t,e){switch(e){case"date":return iu(t);case"datetime":return Ap(t);case"zoneddatetime":return Cp(t);default:throw new Error(`Unknown date type: ${e}`)}}function BA(t){return t instanceof An}function qu(t){return t instanceof $r}function bl(t){return BA(t)||qu(t)}function Ro(t){if(t instanceof Date){const e=t.getFullYear(),r=t.getMonth()+1;return new Date(e,r,0).getDate()}else return t.set({day:100}).day}function Li(t,e){return t.compare(e)<0}function jA(t,e){return t.compare(e)>0}function Ig(t,e,r){const n=cp(t,r);return e>n?t.subtract({days:n+7-e}):e===n?t:t.subtract({days:n-e})}function Pg(t,e,r){const n=cp(t,r),i=e===0?6:e-1;return n===i?t:n>i?t.add({days:7-n+i}):t.add({days:i-n})}const wl=["day","month","year"],Wu=["hour","minute","second","dayPeriod"],qA=["literal","timeZoneName"],Lo=[...wl,...Wu],WA=[...Lo,...qA],HA=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],KA=["year","month","day"],Hu={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function GA(t){if(Mg(t))return Hu[t];{const e=XA(t);return Mg(e)?Hu[e]:Hu.en}}function Ku(t,e,r){return YA(t)?GA(r)[t]:QA(t)?e:JA(t)?"––":""}function Mg(t){return HA.includes(t)}function YA(t){return KA.includes(t)}function JA(t){return t==="hour"||t==="minute"||t==="second"}function QA(t){return t==="era"||t==="dayPeriod"}function XA(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}function Gu(t){const e=["hour","minute","second"],r=Lo.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:t==="day"?!e.includes(n):!0);return Object.fromEntries(r)}function eC(t){const{segmentValues:e,formatter:r,locale:n,dateRef:i}=t,s=Object.keys(e).reduce((a,l)=>{if(!Ng(l))return a;if("hour"in e&&l==="dayPeriod"){const c=e[l];ui(c)?a[l]=Ku(l,"AM",n):a[l]=c}else a[l]=o(l);return a},{});function o(a){if("hour"in e){const l=e[a],c=typeof l=="string"&&l?.startsWith("0"),u=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!ui(l)&&!ui(u)){const d=r.part(i.set({[a]:l}),a,{hourCycle:t.hourCycle===24?"h23":void 0}),f=t.hourCycle===12||t.hourCycle===void 0&&Rg(n)===12;if(a==="hour"&&f){if(u>12){const p=u-12;return p===0?"12":p<10?`0${p}`:`${p}`}return u===0?"12":u<10?`0${u}`:`${u}`}return a==="year"?`${l}`:c&&d.length===1?`0${d}`:d}else return Ku(a,"",n)}else{if(kl(a)){const l=e[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(ui(l))return Ku(a,"",n);{const u=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}}return""}}return s}function tC(t){const{granularity:e,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=t;return n.toParts(r,nC(e,o)).map(c=>["literal","dayPeriod","timeZoneName",null].includes(c.type)||!Ng(c.type)?{part:c.type,value:c.value}:{part:c.type,value:i[c.type]}).filter(c=>!(ui(c.part)||ui(c.value)||c.part==="timeZoneName"&&(!qu(r)||s)))}function rC(t){const e=eC(t),r=tC({contentObj:e,...t});return{obj:e,arr:r}}function nC(t,e){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:e===24?"h23":void 0,hour12:e===24?!1:void 0};return t==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),t==="hour"&&delete r.minute,t==="minute"&&delete r.second,r}function $g(){return Lo.reduce((t,e)=>(t[e]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},t),{})}function kl(t){return wl.includes(t)}function Ng(t){return Lo.includes(t)}function iC(t){return WA.includes(t)}function Fg(t){return!Pn||!t?[]:Sl(t).map(r=>r.dataset.segment).filter(r=>Lo.includes(r))}function sC(t){const{segmentObj:e,fieldNode:r,dateRef:n}=t,i=Fg(r);let s=n;for(const o of i)if("hour"in e){const a=e[o];if(ui(a))continue;s=s.set({[o]:e[o]})}else if(kl(o)){const a=e[o];if(ui(a))continue;s=s.set({[o]:e[o]})}return s}function oC(t,e){const r=Fg(e);for(const n of r)if("hour"in t){if(t[n]===null)return!1}else if(kl(n)&&t[n]===null)return!1;return!0}function aC(t){return typeof t!="object"||t===null?!1:Object.entries(t).every(([e,r])=>(Wu.includes(e)||wl.includes(e))&&(e==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function lC(t,e){return e||(bl(t)?"minute":"day")}function Yu(t){return!!([Iu,al,ol,Po,Mo,sg,Pu].includes(t)||cl(t))}function cC(t,e){if(!Pn)return!1;const r=Sl(e);return r.length?r[0].id===t:!1}function uC(t){const{id:e,formatter:r,value:n,doc:i}=t;if(!Pn)return;const s=r.selectedDate(n),o=i.getElementById(e);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Do({display:"none"}),a.id=e,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function dC(t,e){if(!Pn)return;const r=e.getElementById(t);r&&e.body.removeChild(r)}function Rg(t){return new Intl.DateTimeFormat(t,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(i=>i.type==="hour")?.value==="1"?12:24}function zo(t,e){const r=t.currentTarget;if(!Rr(r))return;const{prev:n,next:i}=Ju(r,e);if(t.key===Po){if(!n)return;n.focus()}else if(t.key===Mo){if(!i)return;i.focus()}}function fC(t,e){const r=e.indexOf(t);if(r===e.length-1||r===-1)return null;const n=r+1;return e[n]}function hC(t,e){const r=e.indexOf(t);if(r===0||r===-1)return null;const n=r-1;return e[n]}function Ju(t,e){const r=Sl(e);return r.length?{next:fC(t,r),prev:hC(t,r)}:{next:null,prev:null}}function Lg(t,e){const r=t.currentTarget;if(!Rr(r))return;const{next:n}=Ju(r,e);n&&n.focus()}function zg(t,e){const r=t.currentTarget;if(!Rr(r))return;const{prev:n}=Ju(r,e);n&&n.focus()}function Zo(t){return t===Mo||t===Po}function Sl(t){return t?Array.from(t.querySelectorAll("[data-segment]")).filter(r=>{if(!Rr(r))return!1;const n=r.dataset.segment;return n==="trigger"?!0:!(!iC(n)||n==="literal")}):[]}function pC(t){return Sl(t)[0]}const mC={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Zg(t){let e=t.initialLocale;function r(p){e=p}function n(){return e}function i(p,v){return new tn(e,v).format(p)}function s(p,v=!0){return bl(p)&&v?i(Jt(p),{dateStyle:"long",timeStyle:"long"}):i(Jt(p),{dateStyle:"long"})}function o(p){if(typeof t.monthFormat.current!="function"&&typeof t.yearFormat.current!="function")return new tn(e,{month:t.monthFormat.current,year:t.yearFormat.current}).format(p);const v=typeof t.monthFormat.current=="function"?t.monthFormat.current(p.getMonth()+1):new tn(e,{month:t.monthFormat.current}).format(p),g=typeof t.yearFormat.current=="function"?t.yearFormat.current(p.getFullYear()):new tn(e,{year:t.yearFormat.current}).format(p);return`${v} ${g}`}function a(p){return new tn(e,{month:"long"}).format(p)}function l(p){return new tn(e,{year:"numeric"}).format(p)}function c(p,v){return qu(p)?new tn(e,{...v,timeZone:p.timeZone}).formatToParts(Jt(p)):new tn(e,v).formatToParts(Jt(p))}function u(p,v="narrow"){return new tn(e,{weekday:v}).format(p)}function d(p,v=void 0){return new tn(e,{hour:"numeric",minute:"numeric",hourCycle:v===24?"h23":void 0}).formatToParts(p).find(b=>b.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function f(p,v,g={}){const m={...mC,...g},k=c(p,m).find(O=>O.type===v);return k?k.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:f,dayPeriod:d,selectedDate:s,dayOfWeek:u}}function gC(t){return!(!Rr(t)||!t.hasAttribute("data-bits-day"))}function Vg(t,e){const r=[];let n=t.add({days:1});const i=e;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function Qu(t){const{dateObj:e,weekStartsOn:r,fixedWeeks:n,locale:i}=t,s=Ro(e),o=Array.from({length:s},(m,b)=>e.set({day:b+1})),a=Gc(e),l=Mw(e),c=r!==void 0?Ig(a,r,"en-US"):Ig(a,0,i),u=r!==void 0?Pg(l,r,"en-US"):Pg(l,0,i),d=Vg(c.subtract({days:1}),a),f=Vg(l,u.add({days:1})),p=d.length+o.length+f.length;if(n&&p<42){const m=42-p;let b=f[f.length-1];b||(b=e.add({months:1}).set({day:1}));let k=m;f.length===0&&(k=m-1,f.push(b));const O=Array.from({length:k},(E,P)=>{const A=P+1;return b.add({days:A})});f.push(...O)}const v=d.concat(o,f),g=AA(v,7);return{value:e,dates:v,weeks:g}}function Vo(t){const{numberOfMonths:e,dateObj:r,...n}=t,i=[];if(!e||e===1)return i.push(Qu({...n,dateObj:r})),i;i.push(Qu({...n,dateObj:r}));for(let s=1;s<e;s++){const o=r.add({months:s});i.push(Qu({...n,dateObj:o}))}return i}function Xu(t){return t?Array.from(t.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(r=>Rr(r)):[]}function Ug(t,e){const r=t.getAttribute("data-value");r&&(e.current=Dg(r,e.current))}function vC({node:t,add:e,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=Xu(n);if(!l.length)return;const u=l.indexOf(t)+e;if(Fu(u,l)){const d=l[u];return Ug(d,r),d.focus()}if(u<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Io(()=>{const f=Xu(n);if(!f.length)return;const p=f.length-Math.abs(u);if(Fu(p,f)){const v=f[p];return Ug(v,r),v.focus()}})}if(u>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Io(()=>{const f=Xu(n);if(!f.length)return;const p=u-l.length;if(Fu(p,f))return f[p].focus()})}}const Bg=[ol,al,Po,Mo],jg=[Iu,Pu];function yC({event:t,handleCellClick:e,shiftFocus:r,placeholderValue:n}){const i=t.target;if(!gC(i)||!Bg.includes(t.key)&&!jg.includes(t.key))return;t.preventDefault();const s={[ol]:7,[al]:-7,[Po]:-1,[Mo]:1};if(Bg.includes(t.key)){const o=s[t.key];o!==void 0&&r(i,o)}if(jg.includes(t.key)){const o=i.getAttribute("data-value");if(!o)return;e(t,Dg(o,n))}}function _C({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),u=Vo({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),e(u)}}function bC({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),u=Vo({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),e(u)}}function wC({months:t,formatter:e,weekdayFormat:r}){if(!t.length)return[];const i=t[0].weeks[0];return i?i.map(s=>e.dayOfWeek(Jt(s),r)):[]}function kC(t){_e(()=>{const e=t.weekStartsOn.current,r=t.locale.current,n=t.fixedWeeks.current,i=t.numberOfMonths.current;Ge(()=>{const s=t.placeholder.current;if(!s)return;const o={weekStartsOn:e,locale:r,fixedWeeks:n,numberOfMonths:i};t.setMonths(Vo({...o,dateObj:s}))})})}function SC({calendarNode:t,label:e,accessibleHeadingId:r}){const n=il(t),i=n.createElement("div");i.style.cssText=Do({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=e,s.id=r,s.role="heading",s.ariaLevel="2",t.insertBefore(i,t.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function xC({placeholder:t,getVisibleMonths:e,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){_e(()=>{t.current,Ge(()=>{if(e().some(l=>Hc(l,t.current)))return;const a={weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current};o(Vo({...a,dateObj:t.current}))})})}function EC({maxValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[e.length-1]?.value;if(!n)return!1;const i=n.add({months:1}).set({day:1});return jA(i,t)}function TC({minValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[0]?.value;if(!n)return!1;const i=n.subtract({months:1}).set({day:35});return Li(i,t)}function AC({months:t,locale:e,formatter:r}){if(!t.length)return"";if(e!==r.getLocale()&&r.setLocale(e),t.length===1){const u=Jt(t[0].value);return`${r.fullMonthAndYear(u)}`}const n=Jt(t[0].value),i=Jt(t[t.length-1].value),s=r.fullMonth(n),o=r.fullMonth(i),a=r.fullYear(n),l=r.fullYear(i);return a===l?`${s} - ${o} ${l}`:`${s} ${a} - ${o} ${l}`}function CC({fullCalendarLabel:t,id:e,isInvalid:r,disabled:n,readonly:i}){return{id:e,role:"application","aria-label":t,"data-invalid":qe(r),"data-disabled":qe(n),"data-readonly":qe(i)}}function OC(t){const r=il(t.target).querySelector("[data-bits-day][data-focused]");r&&(t.preventDefault(),r?.focus())}function DC(t){if(!Pn)return;const e=Array.from(t.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(e.length===0)return;const r=e[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return UA(n,i)}function IC({ref:t,placeholder:e,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&Li(a,n.current)||i.current&&Li(i.current,a))}ut(()=>t.current,()=>{t.current&&e.current&&ii(e.current,r)&&o(r)&&(e.current=DC(t.current)??r)})}function PC(t,e){return!t||!e?t:bl(t)&&bl(e)?t.set({hour:e.hour,minute:e.minute,millisecond:e.millisecond,second:e.second}):t}const MC=sl({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function $C(t){const e=new Date().getFullYear(),r=Math.max(t.placeholderYear,e);let n,i;if(t.minValue)n=t.minValue.year;else{const o=r-100;n=t.placeholderYear<o?t.placeholderYear-10:o}t.maxValue?i=t.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}const Lr=new In("Calendar.Root | RangeCalender.Root");class xl{static create(e){return Lr.set(new xl(e))}opts;#e=C(()=>this.months.map(e=>e.value));get visibleMonths(){return h(this.#e)}set visibleMonths(e){M(this.#e,e)}formatter;accessibleHeadingId=di();domContext;attachment;#t=le(Be([]));get months(){return h(this.#t)}set months(e){M(this.#t,e,!0)}announcer;constructor(e){this.opts=e,this.attachment=lt(this.opts.ref),this.domContext=new bs(e.ref),this.announcer=_l(null),this.formatter=Zg({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),kn(()=>{this.announcer=_l(this.domContext.getDocument())}),this.months=Vo({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#a(),this.#o(),xC({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),kC({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),ut(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),ut(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),IC({placeholder:e.placeholder,defaultPlaceholder:e.defaultPlaceholder,isDateDisabled:e.isDateDisabled,maxValue:e.maxValue,minValue:e.minValue,ref:e.ref})}setMonths(e){this.months=e}#r=C(()=>wC({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return h(this.#r)}set weekdays(e){M(this.#r,e)}#n=C(()=>Ge(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return h(this.#n)}set initialPlaceholderYear(e){M(this.#n,e)}#i=C(()=>$C({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return h(this.#i)}set defaultYears(e){M(this.#i,e)}#s(){_e(()=>{if(Ge(()=>this.opts.initialFocus.current)){const r=this.opts.ref.current?.querySelector("[data-focused]");r&&r.focus()}})}#a(){_e(()=>this.opts.ref.current?SC({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId}):void 0)}#o(){vc(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){_C({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){bC({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(e){this.opts.placeholder.current=this.opts.placeholder.current.set({year:e})}setMonth(e){this.opts.placeholder.current=this.opts.placeholder.current.set({month:e})}#l=C(()=>EC({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return h(this.#l)}set isNextButtonDisabled(e){M(this.#l,e)}#c=C(()=>TC({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return h(this.#c)}set isPrevButtonDisabled(e){M(this.#c,e)}#d=C(()=>{const e=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(e)){if(!e.length)return!1;for(const i of e)if(r(i)||n(i))return!0}else{if(!e)return!1;if(r(e)||n(e))return!0}return!1});get isInvalid(){return h(this.#d)}set isInvalid(e){M(this.#d,e)}#u=C(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,AC({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return h(this.#u)}set headingValue(e){M(this.#u,e)}#f=C(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return h(this.#f)}set fullCalendarLabel(e){M(this.#f,e)}isOutsideVisibleMonths(e){return!this.visibleMonths.some(r=>Hc(e,r))}isDateDisabled(e){if(this.opts.isDateDisabled.current(e)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&Li(e,r)||n&&Li(n,e))}isDateSelected(e){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>ii(n,e)):r?ii(r,e):!1}shiftFocus(e,r){return vC({node:e,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#h(e){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=e.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(e,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const s=this.handleSingleUpdate(n,r);s?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(s,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=PC(s,n),s!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(e,r){if(!e){const s=[r];return this.#h(s)?s:[r]}if(!Array.isArray(e))return;const n=e.findIndex(s=>ii(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...e,r];return this.#h(s)?s:[r]}else{if(i)return e;{const s=e.filter(o=>!ii(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(e,r){if(!e)return r;if(!this.opts.preventDeselect.current&&ii(e,r)){this.opts.placeholder.current=r;return}return r}onkeydown(e){yC({event:e,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#p=C(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return h(this.#p)}set snippetProps(e){M(this.#p,e)}getBitsAttr=e=>MC.getAttr(e);#m=C(()=>({...CC({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return h(this.#m)}set props(e){M(this.#m,e)}}class ed{static create(e){return new ed(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"aria-hidden":Du(!0),"data-disabled":qe(this.root.opts.disabled.current),"data-readonly":qe(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}const qg=new In("Calendar.Cell | RangeCalendar.Cell");class td{static create(e){return qg.set(new td(e,Lr.get()))}opts;root;#e=C(()=>Jt(this.opts.date.current));get cellDate(){return h(this.#e)}set cellDate(e){M(this.#e,e)}#t=C(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return h(this.#t)}set isUnavailable(e){M(this.#t,e)}#r=C(()=>Dw(this.opts.date.current,dr()));get isDateToday(){return h(this.#r)}set isDateToday(e){M(this.#r,e)}#n=C(()=>!Hc(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return h(this.#n)}set isOutsideMonth(e){M(this.#n,e)}#i=C(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return h(this.#i)}set isOutsideVisibleMonths(e){M(this.#i,e)}#s=C(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return h(this.#s)}set isDisabled(e){M(this.#s,e)}#a=C(()=>ii(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return h(this.#a)}set isFocusedDate(e){M(this.#a,e)}#o=C(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return h(this.#o)}set isSelectedDate(e){M(this.#o,e)}#l=C(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return h(this.#l)}set labelText(e){M(this.#l,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#c=C(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return h(this.#c)}set snippetProps(e){M(this.#c,e)}#d=C(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return h(this.#d)}set ariaDisabled(e){M(this.#d,e)}#u=C(()=>({"data-unavailable":qe(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":qe(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":VA(this.opts.date.current),"data-disabled":qe(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return h(this.#u)}set sharedDataAttrs(e){M(this.#u,e)}#f=C(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":Fr(this.isSelectedDate),"aria-disabled":Fr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return h(this.#f)}set props(e){M(this.#f,e)}}class rd{static create(e){return new rd(e,qg.get())}opts;cell;attachment;constructor(e,r){this.opts=e,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=lt(this.opts.ref)}#e=C(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(e){this.cell.isDisabled||this.cell.root.handleCellClick(e,this.cell.opts.date.current)}#t=C(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return h(this.#t)}set snippetProps(e){M(this.#t,e)}#r=C(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":Fr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:h(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#r)}set props(e){M(this.#r,e)}}class nd{static create(e){return new nd(e,Lr.get())}opts;root;#e=C(()=>this.root.isNextButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){M(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=lt(this.opts.ref)}onclick(e){this.isDisabled||this.root.nextPage()}#t=C(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":Fr(this.isDisabled),"data-disabled":qe(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class id{static create(e){return new id(e,Lr.get())}opts;root;#e=C(()=>this.root.isPrevButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){M(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=lt(this.opts.ref)}onclick(e){this.isDisabled||this.root.prevPage()}#t=C(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":Fr(this.isDisabled),"data-disabled":qe(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class sd{static create(e){return new sd(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":Fr(this.root.opts.readonly.current),"aria-disabled":Fr(this.root.opts.disabled.current),"data-readonly":qe(this.root.opts.readonly.current),"data-disabled":qe(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class od{static create(e){return new od(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":qe(this.root.opts.disabled.current),"data-readonly":qe(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class ad{static create(e){return new ad(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":qe(this.root.opts.disabled.current),"data-readonly":qe(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class ld{static create(e){return new ld(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":qe(this.root.opts.disabled.current),"data-readonly":qe(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class cd{static create(e){return new cd(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":qe(this.root.opts.disabled.current),"data-readonly":qe(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class ud{static create(e){return new ud(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":qe(this.root.opts.disabled.current),"data-readonly":qe(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}var NC=j("<div><!></div>");function Wg(t,e){ne(e,!0);let r=_(e,"child",7),n=_(e,"children",7),i=_(e,"id",23,di),s=_(e,"ref",15,null),o=_(e,"value",15),a=_(e,"onValueChange",7,Te),l=_(e,"placeholder",15),c=_(e,"onPlaceholderChange",7,Te),u=_(e,"weekdayFormat",7,"narrow"),d=_(e,"weekStartsOn",7),f=_(e,"pagedNavigation",7,!1),p=_(e,"isDateDisabled",7,()=>!1),v=_(e,"isDateUnavailable",7,()=>!1),g=_(e,"fixedWeeks",7,!1),m=_(e,"numberOfMonths",7,1),b=_(e,"locale",7),k=_(e,"calendarLabel",7,"Event"),O=_(e,"disabled",7,!1),E=_(e,"readonly",7,!1),P=_(e,"minValue",7,void 0),A=_(e,"maxValue",7,void 0),D=_(e,"preventDeselect",7,!1),F=_(e,"type",7),N=_(e,"disableDaysOutsideMonth",7,!0),B=_(e,"initialFocus",7,!1),H=_(e,"maxDays",7),Z=_(e,"monthFormat",7,"long"),de=_(e,"yearFormat",7,"numeric"),X=Je(e,["$$slots","$$events","$$legacy","$$host","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]);const K=Og({defaultValue:o(),minValue:P(),maxValue:A()});function J(){l()===void 0&&l(K)}J(),ut.pre(()=>l(),()=>{J()});function G(){o()===void 0&&o(F()==="single"?void 0:[])}G(),ut.pre(()=>o(),()=>{G()});const q=xl.create({id:R(()=>i()),ref:R(()=>s(),U=>s(U)),weekdayFormat:R(()=>u()),weekStartsOn:R(()=>d()),pagedNavigation:R(()=>f()),isDateDisabled:R(()=>p()),isDateUnavailable:R(()=>v()),fixedWeeks:R(()=>g()),numberOfMonths:R(()=>m()),locale:cg(()=>b()),calendarLabel:R(()=>k()),readonly:R(()=>E()),disabled:R(()=>O()),minValue:R(()=>P()),maxValue:R(()=>A()),disableDaysOutsideMonth:R(()=>N()),initialFocus:R(()=>B()),maxDays:R(()=>H()),placeholder:R(()=>l(),U=>{l(U),c()(U)}),preventDeselect:R(()=>D()),value:R(()=>o(),U=>{o(U),a()(U)}),type:R(()=>F()),monthFormat:R(()=>Z()),yearFormat:R(()=>de()),defaultPlaceholder:K}),Y=C(()=>et(X,q.props));var ue={get child(){return r()},set child(U){r(U),y()},get children(){return n()},set children(U){n(U),y()},get id(){return i()},set id(U=di()){i(U),y()},get ref(){return s()},set ref(U=null){s(U),y()},get value(){return o()},set value(U){o(U),y()},get onValueChange(){return a()},set onValueChange(U=Te){a(U),y()},get placeholder(){return l()},set placeholder(U){l(U),y()},get onPlaceholderChange(){return c()},set onPlaceholderChange(U=Te){c(U),y()},get weekdayFormat(){return u()},set weekdayFormat(U="narrow"){u(U),y()},get weekStartsOn(){return d()},set weekStartsOn(U){d(U),y()},get pagedNavigation(){return f()},set pagedNavigation(U=!1){f(U),y()},get isDateDisabled(){return p()},set isDateDisabled(U=()=>!1){p(U),y()},get isDateUnavailable(){return v()},set isDateUnavailable(U=()=>!1){v(U),y()},get fixedWeeks(){return g()},set fixedWeeks(U=!1){g(U),y()},get numberOfMonths(){return m()},set numberOfMonths(U=1){m(U),y()},get locale(){return b()},set locale(U){b(U),y()},get calendarLabel(){return k()},set calendarLabel(U="Event"){k(U),y()},get disabled(){return O()},set disabled(U=!1){O(U),y()},get readonly(){return E()},set readonly(U=!1){E(U),y()},get minValue(){return P()},set minValue(U=void 0){P(U),y()},get maxValue(){return A()},set maxValue(U=void 0){A(U),y()},get preventDeselect(){return D()},set preventDeselect(U=!1){D(U),y()},get type(){return F()},set type(U){F(U),y()},get disableDaysOutsideMonth(){return N()},set disableDaysOutsideMonth(U=!0){N(U),y()},get initialFocus(){return B()},set initialFocus(U=!1){B(U),y()},get maxDays(){return H()},set maxDays(U){H(U),y()},get monthFormat(){return Z()},set monthFormat(U="long"){Z(U),y()},get yearFormat(){return de()},set yearFormat(U="numeric"){de(U),y()}},ee=W(),ve=z(ee);{var L=U=>{var V=W(),we=z(V);{let T=C(()=>({props:h(Y),...q.snippetProps}));ke(we,r,()=>h(T))}w(U,V)},ye=U=>{var V=NC();Ke(V,()=>({...h(Y)}));var we=$(V);ke(we,()=>n()??Ue,()=>q.snippetProps),I(V),w(U,V)};fe(ve,U=>{r()?U(L):U(ye,!1)})}return w(t,ee),ie(ue)}oe(Wg,{child:{},children:{},id:{},ref:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},weekdayFormat:{},weekStartsOn:{},pagedNavigation:{},isDateDisabled:{},isDateUnavailable:{},fixedWeeks:{},numberOfMonths:{},locale:{},calendarLabel:{},disabled:{},readonly:{},minValue:{},maxValue:{},preventDeselect:{},type:{},disableDaysOutsideMonth:{},initialFocus:{},maxDays:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var FC=j("<div><!></div>");function dd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=rd.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);{let k=C(()=>({props:h(c),...l.snippetProps}));ke(b,i,()=>h(k))}w(g,m)},v=g=>{var m=FC();Ke(m,()=>({...h(c)}));var b=$(m);{var k=E=>{var P=W(),A=z(P);ke(A,()=>n()??Ue,()=>l.snippetProps),w(E,P)},O=E=>{var P=Yt();ce(()=>se(P,l.cell.opts.date.current.day)),w(E,P)};fe(b,E=>{n()?E(k):E(O,!1)})}I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(dd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var RC=j("<table><!></table>");function fd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=sd.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=RC();Ke(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(fd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var LC=j("<tbody><!></tbody>");function hd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=od.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=LC();Ke(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(hd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var zC=j("<td><!></td>");function pd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=_(e,"date",7),l=_(e,"month",7),c=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]);const u=td.create({id:R(()=>o()),ref:R(()=>s(),b=>s(b)),date:R(()=>a()),month:R(()=>l())}),d=C(()=>et(c,u.props));var f={get children(){return n()},set children(b){n(b),y()},get child(){return i()},set child(b){i(b),y()},get ref(){return s()},set ref(b=null){s(b),y()},get id(){return o()},set id(b=Fe(r)){o(b),y()},get date(){return a()},set date(b){a(b),y()},get month(){return l()},set month(b){l(b),y()}},p=W(),v=z(p);{var g=b=>{var k=W(),O=z(k);{let E=C(()=>({props:h(d),...u.snippetProps}));ke(O,i,()=>h(E))}w(b,k)},m=b=>{var k=zC();Ke(k,()=>({...h(d)}));var O=$(k);ke(O,()=>n()??Ue,()=>u.snippetProps),I(k),w(b,k)};fe(v,b=>{i()?b(g):b(m,!1)})}return w(t,p),ie(f)}oe(pd,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var ZC=j("<thead><!></thead>");function md(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=ad.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=ZC();Ke(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(md,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var VC=j("<th><!></th>");function gd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=cd.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=VC();Ke(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(gd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var UC=j("<tr><!></tr>");function Uo(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=ld.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=UC();Ke(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(Uo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var BC=j("<header><!></header>");function vd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=ud.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=BC();Ke(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(vd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var jC=j("<div><!></div>");function yd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=ed.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,i,()=>({props:h(c),headingValue:l.root.headingValue})),w(g,m)},v=g=>{var m=jC();Ke(m,()=>({...h(c)}));var b=$(m);{var k=E=>{var P=W(),A=z(P);ke(A,()=>n()??Ue,()=>({headingValue:l.root.headingValue})),w(E,P)},O=E=>{var P=Yt();ce(()=>se(P,l.root.headingValue)),w(E,P)};fe(b,E=>{n()?E(k):E(O,!1)})}I(m),w(g,m)};fe(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(yd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var qC=j("<button><!></button>");function _d(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=_(e,"tabindex",7,0),l=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const c=nd.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m))}),u=C(()=>et(l,c.props,{tabindex:a()}));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get tabindex(){return a()},set tabindex(m=0){a(m),y()}},f=W(),p=z(f);{var v=m=>{var b=W(),k=z(b);ke(k,i,()=>({props:h(u)})),w(m,b)},g=m=>{var b=qC();Ke(b,()=>({...h(u)}));var k=$(b);ke(k,()=>n()??Ue),I(b),w(m,b)};fe(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),ie(d)}oe(_d,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var WC=j("<button><!></button>");function bd(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=_(e,"tabindex",7,0),l=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const c=id.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m))}),u=C(()=>et(l,c.props,{tabindex:a()}));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get tabindex(){return a()},set tabindex(m=0){a(m),y()}},f=W(),p=z(f);{var v=m=>{var b=W(),k=z(b);ke(k,i,()=>({props:h(u)})),w(m,b)},g=m=>{var b=WC();Ke(b,()=>({...h(u)}));var k=$(b);ke(k,()=>n()??Ue),I(b),w(m,b)};fe(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),ie(d)}oe(bd,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var HC=j("<input/>"),KC=j("<input/>");function Hg(t,e){ne(e,!0);let r=_(e,"value",15),n=Je(e,["$$slots","$$events","$$legacy","$$host","value"]);const i=C(()=>et(n,{"aria-hidden":"true",tabindex:-1,style:Jm}));var s={get value(){return r()},set value(u){r(u),y()}},o=W(),a=z(o);{var l=u=>{var d=HC();Ke(d,()=>({...h(i),value:r()}),void 0,void 0,void 0,void 0,!0),w(u,d)},c=u=>{var d=KC();Ke(d,()=>({...h(i)}),void 0,void 0,void 0,void 0,!0),Pc(d,r),w(u,d)};fe(a,u=>{h(i).type==="checkbox"?u(l):u(c,!1)})}return w(t,o),ie(s)}oe(Hg,{value:{}},[],[],{mode:"open"});const GC=["top","right","bottom","left"],fi=Math.min,pr=Math.max,El=Math.round,Tl=Math.floor,sn=t=>({x:t,y:t}),YC={left:"right",right:"left",bottom:"top",top:"bottom"},JC={start:"end",end:"start"};function wd(t,e,r){return pr(t,fi(e,r))}function Mn(t,e){return typeof t=="function"?t(e):t}function $n(t){return t.split("-")[0]}function ws(t){return t.split("-")[1]}function kd(t){return t==="x"?"y":"x"}function Sd(t){return t==="y"?"height":"width"}const QC=new Set(["top","bottom"]);function on(t){return QC.has($n(t))?"y":"x"}function xd(t){return kd(on(t))}function XC(t,e,r){r===void 0&&(r=!1);const n=ws(t),i=xd(t),s=Sd(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Al(o)),[o,Al(o)]}function eO(t){const e=Al(t);return[Ed(t),e,Ed(e)]}function Ed(t){return t.replace(/start|end/g,e=>JC[e])}const Kg=["left","right"],Gg=["right","left"],tO=["top","bottom"],rO=["bottom","top"];function nO(t,e,r){switch(t){case"top":case"bottom":return r?e?Gg:Kg:e?Kg:Gg;case"left":case"right":return e?tO:rO;default:return[]}}function iO(t,e,r,n){const i=ws(t);let s=nO($n(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Ed)))),s}function Al(t){return t.replace(/left|right|bottom|top/g,e=>YC[e])}function sO(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yg(t){return typeof t!="number"?sO(t):{top:t,right:t,bottom:t,left:t}}function Cl(t){const{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Jg(t,e,r){let{reference:n,floating:i}=t;const s=on(e),o=xd(e),a=Sd(o),l=$n(e),c=s==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:n.y-i.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(ws(e)){case"start":p[o]-=f*(r&&c?-1:1);break;case"end":p[o]+=f*(r&&c?-1:1);break}return p}async function oO(t,e){var r;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Mn(e,t),v=Yg(p),m=a[f?d==="floating"?"reference":"floating":d],b=Cl(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=d==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(O))?await(s.getScale==null?void 0:s.getScale(O))||{x:1,y:1}:{x:1,y:1},P=Cl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:O,strategy:l}):k);return{top:(b.top-P.top+v.top)/E.y,bottom:(P.bottom-b.bottom+v.bottom)/E.y,left:(b.left-P.left+v.left)/E.x,right:(P.right-b.right+v.right)/E.x}}const aO=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=Jg(c,n,l),f=n,p={},v=0;for(let m=0;m<a.length;m++){var g;const{name:b,fn:k}=a[m],{x:O,y:E,data:P,reset:A}=await k({x:u,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:c,platform:{...o,detectOverflow:(g=o.detectOverflow)!=null?g:oO},elements:{reference:t,floating:e}});u=O??u,d=E??d,p={...p,[b]:{...p[b],...P}},A&&v<=50&&(v++,typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(c=A.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:u,y:d}=Jg(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},lO=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Mn(t,e)||{};if(c==null)return{};const d=Yg(u),f={x:r,y:n},p=xd(i),v=Sd(p),g=await o.getDimensions(c),m=p==="y",b=m?"top":"left",k=m?"bottom":"right",O=m?"clientHeight":"clientWidth",E=s.reference[v]+s.reference[p]-f[p]-s.floating[v],P=f[p]-s.reference[p],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let D=A?A[O]:0;(!D||!await(o.isElement==null?void 0:o.isElement(A)))&&(D=a.floating[O]||s.floating[v]);const F=E/2-P/2,N=D/2-g[v]/2-1,B=fi(d[b],N),H=fi(d[k],N),Z=B,de=D-g[v]-H,X=D/2-g[v]/2+F,K=wd(Z,X,de),J=!l.arrow&&ws(i)!=null&&X!==K&&s.reference[v]/2-(X<Z?B:H)-g[v]/2<0,G=J?X<Z?X-Z:X-de:0;return{[p]:f[p]+G,data:{[p]:K,centerOffset:X-K-G,...J&&{alignmentOffset:G}},reset:J}}}),cO=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...m}=Mn(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=$n(i),k=on(a),O=$n(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),P=f||(O||!g?[Al(a)]:eO(a)),A=v!=="none";!f&&A&&P.push(...iO(a,g,v,E));const D=[a,...P],F=await l.detectOverflow(e,m),N=[];let B=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&N.push(F[b]),d){const X=XC(i,o,E);N.push(F[X[0]],F[X[1]])}if(B=[...B,{placement:i,overflows:N}],!N.every(X=>X<=0)){var H,Z;const X=(((H=s.flip)==null?void 0:H.index)||0)+1,K=D[X];if(K&&(!(d==="alignment"?k!==on(K):!1)||B.every(q=>on(q.placement)===k?q.overflows[0]>0:!0)))return{data:{index:X,overflows:B},reset:{placement:K}};let J=(Z=B.filter(G=>G.overflows[0]<=0).sort((G,q)=>G.overflows[1]-q.overflows[1])[0])==null?void 0:Z.placement;if(!J)switch(p){case"bestFit":{var de;const G=(de=B.filter(q=>{if(A){const Y=on(q.placement);return Y===k||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,ue)=>Y+ue,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:de[0];G&&(J=G);break}case"initialPlacement":J=a;break}if(i!==J)return{reset:{placement:J}}}return{}}}};function Qg(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Xg(t){return GC.some(e=>t[e]>=0)}const uO=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:i="referenceHidden",...s}=Mn(t,e);switch(i){case"referenceHidden":{const o=await n.detectOverflow(e,{...s,elementContext:"reference"}),a=Qg(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Xg(a)}}}case"escaped":{const o=await n.detectOverflow(e,{...s,altBoundary:!0}),a=Qg(o,r.floating);return{data:{escapedOffsets:a,escaped:Xg(a)}}}default:return{}}}}},ev=new Set(["left","top"]);async function dO(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=$n(r),a=ws(r),l=on(r)==="y",c=ev.has(o)?-1:1,u=s&&l?-1:1,d=Mn(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const fO=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await dO(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},hO=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:k,y:O}=b;return{x:k,y:O}}},...c}=Mn(t,e),u={x:r,y:n},d=await s.detectOverflow(e,c),f=on($n(i)),p=kd(f);let v=u[p],g=u[f];if(o){const b=p==="y"?"top":"left",k=p==="y"?"bottom":"right",O=v+d[b],E=v-d[k];v=wd(O,v,E)}if(a){const b=f==="y"?"top":"left",k=f==="y"?"bottom":"right",O=g+d[b],E=g-d[k];g=wd(O,g,E)}const m=l.fn({...e,[p]:v,[f]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[f]:a}}}}}},pO=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Mn(t,e),u={x:r,y:n},d=on(i),f=kd(d);let p=u[f],v=u[d];const g=Mn(a,e),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const O=f==="y"?"height":"width",E=s.reference[f]-s.floating[O]+m.mainAxis,P=s.reference[f]+s.reference[O]-m.mainAxis;p<E?p=E:p>P&&(p=P)}if(c){var b,k;const O=f==="y"?"width":"height",E=ev.has($n(i)),P=s.reference[d]-s.floating[O]+(E&&((b=o.offset)==null?void 0:b[d])||0)+(E?0:m.crossAxis),A=s.reference[d]+s.reference[O]+(E?0:((k=o.offset)==null?void 0:k[d])||0)-(E?m.crossAxis:0);v<P?v=P:v>A&&(v=A)}return{[f]:p,[d]:v}}}},mO=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Mn(t,e),u=await o.detectOverflow(e,c),d=$n(i),f=ws(i),p=on(i)==="y",{width:v,height:g}=s.floating;let m,b;d==="top"||d==="bottom"?(m=d,b=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,m=f==="end"?"top":"bottom");const k=g-u.top-u.bottom,O=v-u.left-u.right,E=fi(g-u[m],k),P=fi(v-u[b],O),A=!e.middlewareData.shift;let D=E,F=P;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(F=O),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(D=k),A&&!f){const B=pr(u.left,0),H=pr(u.right,0),Z=pr(u.top,0),de=pr(u.bottom,0);p?F=v-2*(B!==0||H!==0?B+H:pr(u.left,u.right)):D=g-2*(Z!==0||de!==0?Z+de:pr(u.top,u.bottom))}await l({...e,availableWidth:F,availableHeight:D});const N=await o.getDimensions(a.floating);return v!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function Ol(){return typeof window<"u"}function ks(t){return tv(t)?(t.nodeName||"").toLowerCase():"#document"}function mr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function an(t){var e;return(e=(tv(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function tv(t){return Ol()?t instanceof Node||t instanceof mr(t).Node:!1}function zr(t){return Ol()?t instanceof Element||t instanceof mr(t).Element:!1}function ln(t){return Ol()?t instanceof HTMLElement||t instanceof mr(t).HTMLElement:!1}function rv(t){return!Ol()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof mr(t).ShadowRoot}const gO=new Set(["inline","contents"]);function Bo(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Zr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!gO.has(i)}const vO=new Set(["table","td","th"]);function yO(t){return vO.has(ks(t))}const _O=[":popover-open",":modal"];function Dl(t){return _O.some(e=>{try{return t.matches(e)}catch{return!1}})}const bO=["transform","translate","scale","rotate","perspective"],wO=["transform","translate","scale","rotate","perspective","filter"],kO=["paint","layout","strict","content"];function Td(t){const e=Ad(),r=zr(t)?Zr(t):t;return bO.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||wO.some(n=>(r.willChange||"").includes(n))||kO.some(n=>(r.contain||"").includes(n))}function SO(t){let e=hi(t);for(;ln(e)&&!Ss(e);){if(Td(e))return e;if(Dl(e))return null;e=hi(e)}return null}function Ad(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xO=new Set(["html","body","#document"]);function Ss(t){return xO.has(ks(t))}function Zr(t){return mr(t).getComputedStyle(t)}function Il(t){return zr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function hi(t){if(ks(t)==="html")return t;const e=t.assignedSlot||t.parentNode||rv(t)&&t.host||an(t);return rv(e)?e.host:e}function nv(t){const e=hi(t);return Ss(e)?t.ownerDocument?t.ownerDocument.body:t.body:ln(e)&&Bo(e)?e:nv(e)}function jo(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=nv(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=mr(i);if(s){const a=Cd(o);return e.concat(o,o.visualViewport||[],Bo(i)?i:[],a&&r?jo(a):[])}return e.concat(i,jo(i,[],r))}function Cd(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function iv(t){const e=Zr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ln(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=El(r)!==s||El(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Od(t){return zr(t)?t:t.contextElement}function xs(t){const e=Od(t);if(!ln(e))return sn(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=iv(e);let o=(s?El(r.width):r.width)/n,a=(s?El(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const EO=sn(0);function sv(t){const e=mr(t);return!Ad()||!e.visualViewport?EO:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function TO(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==mr(t)?!1:e}function zi(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Od(t);let o=sn(1);e&&(n?zr(n)&&(o=xs(n)):o=xs(t));const a=TO(s,r,n)?sv(s):sn(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=mr(s),p=n&&zr(n)?mr(n):n;let v=f,g=Cd(v);for(;g&&n&&p!==v;){const m=xs(g),b=g.getBoundingClientRect(),k=Zr(g),O=b.left+(g.clientLeft+parseFloat(k.paddingLeft))*m.x,E=b.top+(g.clientTop+parseFloat(k.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=O,c+=E,v=mr(g),g=Cd(v)}}return Cl({width:u,height:d,x:l,y:c})}function Pl(t,e){const r=Il(t).scrollLeft;return e?e.left+r:zi(an(t)).left+r}function ov(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Pl(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function AO(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t;const s=i==="fixed",o=an(n),a=e?Dl(e.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=sn(1);const u=sn(0),d=ln(n);if((d||!d&&!s)&&((ks(n)!=="body"||Bo(o))&&(l=Il(n)),ln(n))){const p=zi(n);c=xs(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const f=o&&!d&&!s?ov(o,l):sn(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function CO(t){return Array.from(t.getClientRects())}function OO(t){const e=an(t),r=Il(t),n=t.ownerDocument.body,i=pr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=pr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Pl(t);const a=-r.scrollTop;return Zr(n).direction==="rtl"&&(o+=pr(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}const av=25;function DO(t,e){const r=mr(t),n=an(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Ad();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Pl(n);if(c<=0){const u=n.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(n.clientWidth-d.clientWidth-p);v<=av&&(s-=v)}else c<=av&&(s+=c);return{width:s,height:o,x:a,y:l}}const IO=new Set(["absolute","fixed"]);function PO(t,e){const r=zi(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=ln(t)?xs(t):sn(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function lv(t,e,r){let n;if(e==="viewport")n=DO(t,r);else if(e==="document")n=OO(an(t));else if(zr(e))n=PO(e,r);else{const i=sv(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Cl(n)}function cv(t,e){const r=hi(t);return r===e||!zr(r)||Ss(r)?!1:Zr(r).position==="fixed"||cv(r,e)}function MO(t,e){const r=e.get(t);if(r)return r;let n=jo(t,[],!1).filter(a=>zr(a)&&ks(a)!=="body"),i=null;const s=Zr(t).position==="fixed";let o=s?hi(t):t;for(;zr(o)&&!Ss(o);){const a=Zr(o),l=Td(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&IO.has(i.position)||Bo(o)&&!l&&cv(t,o))?n=n.filter(u=>u!==o):i=a,o=hi(o)}return e.set(t,n),n}function $O(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?Dl(e)?[]:MO(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,u)=>{const d=lv(e,u,i);return c.top=pr(d.top,c.top),c.right=fi(d.right,c.right),c.bottom=fi(d.bottom,c.bottom),c.left=pr(d.left,c.left),c},lv(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function NO(t){const{width:e,height:r}=iv(t);return{width:e,height:r}}function FO(t,e,r){const n=ln(e),i=an(e),s=r==="fixed",o=zi(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=sn(0);function c(){l.x=Pl(i)}if(n||!n&&!s)if((ks(e)!=="body"||Bo(i))&&(a=Il(e)),n){const p=zi(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else i&&c();s&&!n&&i&&c();const u=i&&!n&&!s?ov(i,a):sn(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function Dd(t){return Zr(t).position==="static"}function uv(t,e){if(!ln(t)||Zr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return an(t)===r&&(r=r.ownerDocument.body),r}function dv(t,e){const r=mr(t);if(Dl(t))return r;if(!ln(t)){let i=hi(t);for(;i&&!Ss(i);){if(zr(i)&&!Dd(i))return i;i=hi(i)}return r}let n=uv(t,e);for(;n&&yO(n)&&Dd(n);)n=uv(n,e);return n&&Ss(n)&&Dd(n)&&!Td(n)?r:n||SO(t)||r}const RO=async function(t){const e=this.getOffsetParent||dv,r=this.getDimensions,n=await r(t.floating);return{reference:FO(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function LO(t){return Zr(t).direction==="rtl"}const zO={convertOffsetParentRelativeRectToViewportRelativeRect:AO,getDocumentElement:an,getClippingRect:$O,getOffsetParent:dv,getElementRects:RO,getClientRects:CO,getDimensions:NO,getScale:xs,isElement:zr,isRTL:LO};function fv(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ZO(t,e){let r=null,n;const i=an(t);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||e(),!f||!p)return;const v=Tl(d),g=Tl(i.clientWidth-(u+f)),m=Tl(i.clientHeight-(d+p)),b=Tl(u),O={rootMargin:-v+"px "+-g+"px "+-m+"px "+-b+"px",threshold:pr(0,fi(1,l))||1};let E=!0;function P(A){const D=A[0].intersectionRatio;if(D!==l){if(!E)return o();D?o(!1,D):n=setTimeout(()=>{o(!1,1e-7)},1e3)}D===1&&!fv(c,t.getBoundingClientRect())&&o(),E=!1}try{r=new IntersectionObserver(P,{...O,root:i.ownerDocument})}catch{r=new IntersectionObserver(P,O)}r.observe(t)}return o(!0),s}function VO(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Od(t),u=i||s?[...c?jo(c):[],...jo(e)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const d=c&&a?ZO(c,r):null;let f=-1,p=null;o&&(p=new ResizeObserver(b=>{let[k]=b;k&&k.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var O;(O=p)==null||O.observe(e)})),r()}),c&&!l&&p.observe(c),p.observe(e));let v,g=l?zi(t):null;l&&m();function m(){const b=zi(t);g&&!fv(g,b)&&r(),g=b,v=requestAnimationFrame(m)}return r(),()=>{var b;u.forEach(k=>{i&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),d?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const UO=fO,BO=hO,jO=cO,qO=mO,WO=uO,HO=lO,KO=pO,GO=(t,e,r)=>{const n=new Map,i={platform:zO,...r},s={...i.platform,_c:n};return aO(t,e,{...i,platform:s})};function Zi(t){return typeof t=="function"?t():t}function hv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pv(t,e){const r=hv(t);return Math.round(e*r)/r}function mv(t){return{[`--bits-${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${t}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${t}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${t}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function YO(t){const e=t.whileElementsMounted,r=C(()=>Zi(t.open)??!0),n=C(()=>Zi(t.middleware)),i=C(()=>Zi(t.transform)??!0),s=C(()=>Zi(t.placement)??"bottom"),o=C(()=>Zi(t.strategy)??"absolute"),a=C(()=>Zi(t.sideOffset)??0),l=C(()=>Zi(t.alignOffset)??0),c=t.reference;let u=le(0),d=le(0);const f=Nr(null);let p=le(Be(h(o))),v=le(Be(h(s))),g=le(Be({})),m=le(!1);const b=C(()=>{const D=f.current?pv(f.current,h(u)):h(u),F=f.current?pv(f.current,h(d)):h(d);return h(i)?{position:h(p),left:"0",top:"0",transform:`translate(${D}px, ${F}px)`,...f.current&&hv(f.current)>=1.5&&{willChange:"transform"}}:{position:h(p),left:`${D}px`,top:`${F}px`}});let k;function O(){c.current===null||f.current===null||GO(c.current,f.current,{middleware:h(n),placement:h(s),strategy:h(o)}).then(D=>{if(!h(r)&&h(u)!==0&&h(d)!==0){const F=Math.max(Math.abs(h(a)),Math.abs(h(l)),15);if(D.x<=F&&D.y<=F)return}M(u,D.x,!0),M(d,D.y,!0),M(p,D.strategy,!0),M(v,D.placement,!0),M(g,D.middlewareData,!0),M(m,!0)})}function E(){typeof k=="function"&&(k(),k=void 0)}function P(){if(E(),e===void 0){O();return}c.current===null||f.current===null||(k=e(c.current,f.current,O))}function A(){h(r)||M(m,!1)}return _e(O),_e(P),_e(A),_e(()=>E),{floating:f,reference:c,get strategy(){return h(p)},get placement(){return h(v)},get middlewareData(){return h(g)},get isPositioned(){return h(m)},get floatingStyles(){return h(b)},get update(){return O}}}const JO={top:"bottom",right:"left",bottom:"top",left:"right"},Id=new In("Floating.Root"),gv=new In("Floating.Content"),Pd=new In("Floating.Root");class Ml{static create(e=!1){return e?Pd.set(new Ml):Id.set(new Ml)}anchorNode=Nr(null);customAnchorNode=Nr(null);triggerNode=Nr(null);constructor(){_e(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class $l{static create(e,r=!1){return r?gv.set(new $l(e,Pd.get())):gv.set(new $l(e,Id.get()))}opts;root;contentRef=Nr(null);wrapperRef=Nr(null);arrowRef=Nr(null);contentAttachment=lt(this.contentRef);wrapperAttachment=lt(this.wrapperRef);arrowAttachment=lt(this.arrowRef);arrowId=Nr(di());#e=C(()=>{if(typeof this.opts.style=="string")return Co(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new V1(()=>this.arrowRef.current??void 0);#n=C(()=>this.#r?.width??0);#i=C(()=>this.#r?.height??0);#s=C(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=C(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=C(()=>h(this.#a).length>0);get hasExplicitBoundaries(){return h(this.#o)}set hasExplicitBoundaries(e){M(this.#o,e)}#l=C(()=>({padding:this.opts.collisionPadding.current,boundary:h(this.#a).filter(tA),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return h(this.#l)}set detectOverflowOptions(e){M(this.#l,e)}#c=le(void 0);#d=le(void 0);#u=le(void 0);#f=le(void 0);#h=C(()=>[UO({mainAxis:this.opts.sideOffset.current+h(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&BO({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?KO():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&jO({...this.detectOverflowOptions}),qO({...this.detectOverflowOptions,apply:({rects:e,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=e.reference;M(this.#c,r,!0),M(this.#d,n,!0),M(this.#u,i,!0),M(this.#f,s,!0)}}),this.arrowRef.current&&HO({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),QO({arrowWidth:h(this.#n),arrowHeight:h(this.#i)}),this.opts.hideWhenDetached.current&&WO({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return h(this.#h)}set middleware(e){M(this.#h,e)}floating;#p=C(()=>XO(this.floating.placement));get placedSide(){return h(this.#p)}set placedSide(e){M(this.#p,e)}#m=C(()=>eD(this.floating.placement));get placedAlign(){return h(this.#m)}set placedAlign(e){M(this.#m,e)}#g=C(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return h(this.#g)}set arrowX(e){M(this.#g,e)}#v=C(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return h(this.#v)}set arrowY(e){M(this.#v,e)}#y=C(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return h(this.#y)}set cannotCenterArrow(e){M(this.#y,e)}#_=le();get contentZIndex(){return h(this.#_)}set contentZIndex(e){M(this.#_,e,!0)}#k=C(()=>JO[this.placedSide]);get arrowBaseSide(){return h(this.#k)}set arrowBaseSide(e){M(this.#k,e)}#b=C(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${h(this.#c)}px`,"--bits-floating-available-height":`${h(this.#d)}px`,"--bits-floating-anchor-width":`${h(this.#u)}px`,"--bits-floating-anchor-height":`${h(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...h(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return h(this.#b)}set wrapperProps(e){M(this.#b,e)}#w=C(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Do({...h(this.#e)}),...this.contentAttachment}));get props(){return h(this.#w)}set props(e){M(this.#w,e)}#S=C(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return h(this.#S)}set arrowStyle(e){M(this.#S,e)}constructor(e,r){this.opts=e,this.root=r,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),ut(()=>e.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=YO({strategy:()=>this.opts.strategy.current,placement:()=>h(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>VO(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),_e(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),ut(()=>this.contentRef.current,n=>{if(!n)return;const i=ng(n);this.contentZIndex=i.getComputedStyle(n).zIndex}),_e(()=>{this.floating.floating.current=this.wrapperRef.current})}}class Nl{static create(e,r=!1){return r?new Nl(e,Pd.get()):new Nl(e,Id.get())}opts;root;constructor(e,r){this.opts=e,this.root=r,e.virtualEl&&e.virtualEl.current?r.triggerNode=c1(e.virtualEl.current):r.triggerNode=e.ref}}function QO(t){return{name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:i}=e,o=i.arrow?.centerOffset!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=Md(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+l/2;let v="",g="";return c==="bottom"?(v=o?d:`${f}px`,g=`${-l}px`):c==="top"?(v=o?d:`${f}px`,g=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,g=o?d:`${p}px`):c==="left"&&(v=`${n.floating.width+l}px`,g=o?d:`${p}px`),{data:{x:v,y:g}}}}}function Md(t){const[e,r="center"]=t.split("-");return[e,r]}function XO(t){return Md(t)[0]}function eD(t){return Md(t)[1]}function vv(t,e){ne(e,!0);let r=_(e,"children",7),n=_(e,"tooltip",7,!1);Ml.create(n());var i={get children(){return r()},set children(a){r(a),y()},get tooltip(){return n()},set tooltip(a=!1){n(a),y()}},s=W(),o=z(s);return ke(o,()=>r()??Ue),w(t,s),ie(i)}oe(vv,{children:{},tooltip:{}},[],[],{mode:"open"});function yv(t,e){ne(e,!0);let r=_(e,"id",7),n=_(e,"children",7),i=_(e,"virtualEl",7),s=_(e,"ref",7),o=_(e,"tooltip",7,!1);Nl.create({id:R(()=>r()),virtualEl:R(()=>i()),ref:s()},o());var a={get id(){return r()},set id(u){r(u),y()},get children(){return n()},set children(u){n(u),y()},get virtualEl(){return i()},set virtualEl(u){i(u),y()},get ref(){return s()},set ref(u){s(u),y()},get tooltip(){return o()},set tooltip(u=!1){o(u),y()}},l=W(),c=z(l);return ke(c,()=>n()??Ue),w(t,l),ie(a)}oe(yv,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function _v(t,e){ne(e,!0);let r=_(e,"content",7),n=_(e,"side",7,"bottom"),i=_(e,"sideOffset",7,0),s=_(e,"align",7,"center"),o=_(e,"alignOffset",7,0),a=_(e,"id",7),l=_(e,"arrowPadding",7,0),c=_(e,"avoidCollisions",7,!0),u=_(e,"collisionBoundary",23,()=>[]),d=_(e,"collisionPadding",7,0),f=_(e,"hideWhenDetached",7,!1),p=_(e,"onPlaced",7,()=>{}),v=_(e,"sticky",7,"partial"),g=_(e,"updatePositionStrategy",7,"optimized"),m=_(e,"strategy",7,"fixed"),b=_(e,"dir",7,"ltr"),k=_(e,"style",23,()=>({})),O=_(e,"wrapperId",23,di),E=_(e,"customAnchor",7,null),P=_(e,"enabled",7),A=_(e,"tooltip",7,!1);const D=$l.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>s()),alignOffset:R(()=>o()),id:R(()=>a()),arrowPadding:R(()=>l()),avoidCollisions:R(()=>c()),collisionBoundary:R(()=>u()),collisionPadding:R(()=>d()),hideWhenDetached:R(()=>f()),onPlaced:R(()=>p()),sticky:R(()=>v()),updatePositionStrategy:R(()=>g()),strategy:R(()=>m()),dir:R(()=>b()),style:R(()=>k()),enabled:R(()=>P()),wrapperId:R(()=>O()),customAnchor:R(()=>E())},A()),F=C(()=>et(D.wrapperProps,{style:{pointerEvents:"auto"}}));var N={get content(){return r()},set content(Z){r(Z),y()},get side(){return n()},set side(Z="bottom"){n(Z),y()},get sideOffset(){return i()},set sideOffset(Z=0){i(Z),y()},get align(){return s()},set align(Z="center"){s(Z),y()},get alignOffset(){return o()},set alignOffset(Z=0){o(Z),y()},get id(){return a()},set id(Z){a(Z),y()},get arrowPadding(){return l()},set arrowPadding(Z=0){l(Z),y()},get avoidCollisions(){return c()},set avoidCollisions(Z=!0){c(Z),y()},get collisionBoundary(){return u()},set collisionBoundary(Z=[]){u(Z),y()},get collisionPadding(){return d()},set collisionPadding(Z=0){d(Z),y()},get hideWhenDetached(){return f()},set hideWhenDetached(Z=!1){f(Z),y()},get onPlaced(){return p()},set onPlaced(Z=()=>{}){p(Z),y()},get sticky(){return v()},set sticky(Z="partial"){v(Z),y()},get updatePositionStrategy(){return g()},set updatePositionStrategy(Z="optimized"){g(Z),y()},get strategy(){return m()},set strategy(Z="fixed"){m(Z),y()},get dir(){return b()},set dir(Z="ltr"){b(Z),y()},get style(){return k()},set style(Z={}){k(Z),y()},get wrapperId(){return O()},set wrapperId(Z=di()){O(Z),y()},get customAnchor(){return E()},set customAnchor(Z=null){E(Z),y()},get enabled(){return P()},set enabled(Z){P(Z),y()},get tooltip(){return A()},set tooltip(Z=!1){A(Z),y()}},B=W(),H=z(B);return ke(H,()=>r()??Ue,()=>({props:D.props,wrapperProps:h(F)})),w(t,B),ie(N)}oe(_v,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function bv(t,e){ne(e,!0);let r=_(e,"content",7),n=_(e,"onPlaced",7);kn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),y()},get onPlaced(){return n()},set onPlaced(a){n(a),y()}},s=W(),o=z(s);return ke(o,()=>r()??Ue,()=>({props:{},wrapperProps:{}})),w(t,s),ie(i)}oe(bv,{content:{},onPlaced:{}},[],[],{mode:"open"});function wv(t,e){ne(e,!0);let r=_(e,"content",7),n=_(e,"isStatic",7,!1),i=_(e,"onPlaced",7),s=Je(e,["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);var o={get content(){return r()},set content(d){r(d),y()},get isStatic(){return n()},set isStatic(d=!1){n(d),y()},get onPlaced(){return i()},set onPlaced(d){i(d),y()}},a=W(),l=z(a);{var c=d=>{bv(d,{get content(){return r()},get onPlaced(){return i()}})},u=d=>{_v(d,Qn({get content(){return r()},get onPlaced(){return i()}},()=>s))};fe(l,d=>{n()?d(c):d(u,!1)})}return w(t,a),ie(o)}oe(wv,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var tD=j("<!> <!>",1);function $d(t,e){ne(e,!0);let r=_(e,"popper",7),n=_(e,"onEscapeKeydown",7),i=_(e,"escapeKeydownBehavior",7),s=_(e,"preventOverflowTextSelection",7),o=_(e,"id",7),a=_(e,"onPointerDown",7),l=_(e,"onPointerUp",7),c=_(e,"side",7),u=_(e,"sideOffset",7),d=_(e,"align",7),f=_(e,"alignOffset",7),p=_(e,"arrowPadding",7),v=_(e,"avoidCollisions",7),g=_(e,"collisionBoundary",7),m=_(e,"collisionPadding",7),b=_(e,"sticky",7),k=_(e,"hideWhenDetached",7),O=_(e,"updatePositionStrategy",7),E=_(e,"strategy",7),P=_(e,"dir",7),A=_(e,"preventScroll",7),D=_(e,"wrapperId",7),F=_(e,"style",7),N=_(e,"onPlaced",7),B=_(e,"onInteractOutside",7),H=_(e,"onCloseAutoFocus",7),Z=_(e,"onOpenAutoFocus",7),de=_(e,"onFocusOutside",7),X=_(e,"interactOutsideBehavior",7,"close"),K=_(e,"loop",7),J=_(e,"trapFocus",7,!0),G=_(e,"isValidEvent",7,()=>!1),q=_(e,"customAnchor",7,null),Y=_(e,"isStatic",7,!1),ue=_(e,"enabled",7),ee=_(e,"ref",7),ve=_(e,"tooltip",7,!1),L=_(e,"contentPointerEvents",7,"auto"),ye=Je(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);var U={get popper(){return r()},set popper(V){r(V),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(V){n(V),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(V){i(V),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(V){s(V),y()},get id(){return o()},set id(V){o(V),y()},get onPointerDown(){return a()},set onPointerDown(V){a(V),y()},get onPointerUp(){return l()},set onPointerUp(V){l(V),y()},get side(){return c()},set side(V){c(V),y()},get sideOffset(){return u()},set sideOffset(V){u(V),y()},get align(){return d()},set align(V){d(V),y()},get alignOffset(){return f()},set alignOffset(V){f(V),y()},get arrowPadding(){return p()},set arrowPadding(V){p(V),y()},get avoidCollisions(){return v()},set avoidCollisions(V){v(V),y()},get collisionBoundary(){return g()},set collisionBoundary(V){g(V),y()},get collisionPadding(){return m()},set collisionPadding(V){m(V),y()},get sticky(){return b()},set sticky(V){b(V),y()},get hideWhenDetached(){return k()},set hideWhenDetached(V){k(V),y()},get updatePositionStrategy(){return O()},set updatePositionStrategy(V){O(V),y()},get strategy(){return E()},set strategy(V){E(V),y()},get dir(){return P()},set dir(V){P(V),y()},get preventScroll(){return A()},set preventScroll(V){A(V),y()},get wrapperId(){return D()},set wrapperId(V){D(V),y()},get style(){return F()},set style(V){F(V),y()},get onPlaced(){return N()},set onPlaced(V){N(V),y()},get onInteractOutside(){return B()},set onInteractOutside(V){B(V),y()},get onCloseAutoFocus(){return H()},set onCloseAutoFocus(V){H(V),y()},get onOpenAutoFocus(){return Z()},set onOpenAutoFocus(V){Z(V),y()},get onFocusOutside(){return de()},set onFocusOutside(V){de(V),y()},get interactOutsideBehavior(){return X()},set interactOutsideBehavior(V="close"){X(V),y()},get loop(){return K()},set loop(V){K(V),y()},get trapFocus(){return J()},set trapFocus(V=!0){J(V),y()},get isValidEvent(){return G()},set isValidEvent(V=()=>!1){G(V),y()},get customAnchor(){return q()},set customAnchor(V=null){q(V),y()},get isStatic(){return Y()},set isStatic(V=!1){Y(V),y()},get enabled(){return ue()},set enabled(V){ue(V),y()},get ref(){return ee()},set ref(V){ee(V),y()},get tooltip(){return ve()},set tooltip(V=!1){ve(V),y()},get contentPointerEvents(){return L()},set contentPointerEvents(V="auto"){L(V),y()}};return wv(t,{get isStatic(){return Y()},get id(){return o()},get side(){return c()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return v()},get collisionBoundary(){return g()},get collisionPadding(){return m()},get sticky(){return b()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return O()},get strategy(){return E()},get dir(){return P()},get wrapperId(){return D()},get style(){return F()},get onPlaced(){return N()},get customAnchor(){return q()},get enabled(){return ue()},get tooltip(){return ve()},content:(we,T)=>{let Xe=()=>T?.().props,Ze=()=>T?.().wrapperProps;var We=tD(),yt=z(We);{var Ve=Et=>{ju(Et,{get preventScroll(){return A()}})},Xt=Et=>{var jt=W(),er=z(jt);{var Ct=Ot=>{ju(Ot,{get preventScroll(){return A()}})};fe(er,Ot=>{e.forceMount||Ot(Ct)},!0)}w(Et,jt)};fe(yt,Et=>{e.forceMount&&ue()?Et(Ve):Et(Xt,!1)})}var ht=te(yt,2);xg(ht,{get onOpenAutoFocus(){return Z()},get onCloseAutoFocus(){return H()},get loop(){return K()},get enabled(){return ue()},get trapFocus(){return J()},get forceMount(){return e.forceMount},get ref(){return ee()},focusScope:(jt,er)=>{let Ct=()=>er?.().props;Sg(jt,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return ue()},get ref(){return ee()},children:(Ot,Zn)=>{kg(Ot,{get id(){return o()},get onInteractOutside(){return B()},get onFocusOutside(){return de()},get interactOutsideBehavior(){return X()},get isValidEvent(){return G()},get enabled(){return ue()},get ref(){return ee()},children:(Br,jr)=>{let tr=()=>jr?.().props;Tg(Br,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return ue()},get ref(){return ee()},children:(qt,rr)=>{var gi=W(),un=z(gi);{let Ns=C(()=>({props:et(ye,Xe(),tr(),Ct(),{style:{pointerEvents:L()}}),wrapperProps:Ze()}));ke(un,()=>r()??Ue,()=>h(Ns))}w(qt,gi)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),w(we,We)},$$slots:{content:!0}}),ie(U)}oe($d,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:"open"});function kv(t,e){ne(e,!0);let r=_(e,"popper",7),n=_(e,"open",7),i=_(e,"onEscapeKeydown",7),s=_(e,"escapeKeydownBehavior",7),o=_(e,"preventOverflowTextSelection",7),a=_(e,"id",7),l=_(e,"onPointerDown",7),c=_(e,"onPointerUp",7),u=_(e,"side",7),d=_(e,"sideOffset",7),f=_(e,"align",7),p=_(e,"alignOffset",7),v=_(e,"arrowPadding",7),g=_(e,"avoidCollisions",7),m=_(e,"collisionBoundary",7),b=_(e,"collisionPadding",7),k=_(e,"sticky",7),O=_(e,"hideWhenDetached",7),E=_(e,"updatePositionStrategy",7),P=_(e,"strategy",7),A=_(e,"dir",7),D=_(e,"preventScroll",7),F=_(e,"wrapperId",7),N=_(e,"style",7),B=_(e,"onPlaced",7),H=_(e,"onInteractOutside",7),Z=_(e,"onCloseAutoFocus",7),de=_(e,"onOpenAutoFocus",7),X=_(e,"onFocusOutside",7),K=_(e,"interactOutsideBehavior",7,"close"),J=_(e,"loop",7),G=_(e,"trapFocus",7,!0),q=_(e,"isValidEvent",7,()=>!1),Y=_(e,"customAnchor",7,null),ue=_(e,"isStatic",7,!1),ee=_(e,"ref",7),ve=_(e,"shouldRender",7),L=Je(e,["$$slots","$$events","$$legacy","$$host","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var ye={get popper(){return r()},set popper(T){r(T),y()},get open(){return n()},set open(T){n(T),y()},get onEscapeKeydown(){return i()},set onEscapeKeydown(T){i(T),y()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(T){s(T),y()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(T){o(T),y()},get id(){return a()},set id(T){a(T),y()},get onPointerDown(){return l()},set onPointerDown(T){l(T),y()},get onPointerUp(){return c()},set onPointerUp(T){c(T),y()},get side(){return u()},set side(T){u(T),y()},get sideOffset(){return d()},set sideOffset(T){d(T),y()},get align(){return f()},set align(T){f(T),y()},get alignOffset(){return p()},set alignOffset(T){p(T),y()},get arrowPadding(){return v()},set arrowPadding(T){v(T),y()},get avoidCollisions(){return g()},set avoidCollisions(T){g(T),y()},get collisionBoundary(){return m()},set collisionBoundary(T){m(T),y()},get collisionPadding(){return b()},set collisionPadding(T){b(T),y()},get sticky(){return k()},set sticky(T){k(T),y()},get hideWhenDetached(){return O()},set hideWhenDetached(T){O(T),y()},get updatePositionStrategy(){return E()},set updatePositionStrategy(T){E(T),y()},get strategy(){return P()},set strategy(T){P(T),y()},get dir(){return A()},set dir(T){A(T),y()},get preventScroll(){return D()},set preventScroll(T){D(T),y()},get wrapperId(){return F()},set wrapperId(T){F(T),y()},get style(){return N()},set style(T){N(T),y()},get onPlaced(){return B()},set onPlaced(T){B(T),y()},get onInteractOutside(){return H()},set onInteractOutside(T){H(T),y()},get onCloseAutoFocus(){return Z()},set onCloseAutoFocus(T){Z(T),y()},get onOpenAutoFocus(){return de()},set onOpenAutoFocus(T){de(T),y()},get onFocusOutside(){return X()},set onFocusOutside(T){X(T),y()},get interactOutsideBehavior(){return K()},set interactOutsideBehavior(T="close"){K(T),y()},get loop(){return J()},set loop(T){J(T),y()},get trapFocus(){return G()},set trapFocus(T=!0){G(T),y()},get isValidEvent(){return q()},set isValidEvent(T=()=>!1){q(T),y()},get customAnchor(){return Y()},set customAnchor(T=null){Y(T),y()},get isStatic(){return ue()},set isStatic(T=!1){ue(T),y()},get ref(){return ee()},set ref(T){ee(T),y()},get shouldRender(){return ve()},set shouldRender(T){ve(T),y()}},U=W(),V=z(U);{var we=T=>{$d(T,Qn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return o()},get id(){return a()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return u()},get sideOffset(){return d()},get align(){return f()},get alignOffset(){return p()},get arrowPadding(){return v()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return b()},get sticky(){return k()},get hideWhenDetached(){return O()},get updatePositionStrategy(){return E()},get strategy(){return P()},get dir(){return A()},get preventScroll(){return D()},get wrapperId(){return F()},get style(){return N()},get onPlaced(){return B()},get customAnchor(){return Y()},get isStatic(){return ue()},get enabled(){return n()},get onInteractOutside(){return H()},get onCloseAutoFocus(){return Z()},get onOpenAutoFocus(){return de()},get interactOutsideBehavior(){return K()},get loop(){return J()},get trapFocus(){return G()},get isValidEvent(){return q()},get onFocusOutside(){return X()},forceMount:!1,get ref(){return ee()}},()=>L))};fe(V,T=>{ve()&&T(we)})}return w(t,U),ie(ye)}oe(kv,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:"open"});function Sv(t,e){ne(e,!0);let r=_(e,"popper",7),n=_(e,"onEscapeKeydown",7),i=_(e,"escapeKeydownBehavior",7),s=_(e,"preventOverflowTextSelection",7),o=_(e,"id",7),a=_(e,"onPointerDown",7),l=_(e,"onPointerUp",7),c=_(e,"side",7),u=_(e,"sideOffset",7),d=_(e,"align",7),f=_(e,"alignOffset",7),p=_(e,"arrowPadding",7),v=_(e,"avoidCollisions",7),g=_(e,"collisionBoundary",7),m=_(e,"collisionPadding",7),b=_(e,"sticky",7),k=_(e,"hideWhenDetached",7),O=_(e,"updatePositionStrategy",7),E=_(e,"strategy",7),P=_(e,"dir",7),A=_(e,"preventScroll",7),D=_(e,"wrapperId",7),F=_(e,"style",7),N=_(e,"onPlaced",7),B=_(e,"onInteractOutside",7),H=_(e,"onCloseAutoFocus",7),Z=_(e,"onOpenAutoFocus",7),de=_(e,"onFocusOutside",7),X=_(e,"interactOutsideBehavior",7,"close"),K=_(e,"loop",7),J=_(e,"trapFocus",7,!0),G=_(e,"isValidEvent",7,()=>!1),q=_(e,"customAnchor",7,null),Y=_(e,"isStatic",7,!1),ue=_(e,"enabled",7),ee=Je(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);var ve={get popper(){return r()},set popper(L){r(L),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(L){n(L),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(L){i(L),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(L){s(L),y()},get id(){return o()},set id(L){o(L),y()},get onPointerDown(){return a()},set onPointerDown(L){a(L),y()},get onPointerUp(){return l()},set onPointerUp(L){l(L),y()},get side(){return c()},set side(L){c(L),y()},get sideOffset(){return u()},set sideOffset(L){u(L),y()},get align(){return d()},set align(L){d(L),y()},get alignOffset(){return f()},set alignOffset(L){f(L),y()},get arrowPadding(){return p()},set arrowPadding(L){p(L),y()},get avoidCollisions(){return v()},set avoidCollisions(L){v(L),y()},get collisionBoundary(){return g()},set collisionBoundary(L){g(L),y()},get collisionPadding(){return m()},set collisionPadding(L){m(L),y()},get sticky(){return b()},set sticky(L){b(L),y()},get hideWhenDetached(){return k()},set hideWhenDetached(L){k(L),y()},get updatePositionStrategy(){return O()},set updatePositionStrategy(L){O(L),y()},get strategy(){return E()},set strategy(L){E(L),y()},get dir(){return P()},set dir(L){P(L),y()},get preventScroll(){return A()},set preventScroll(L){A(L),y()},get wrapperId(){return D()},set wrapperId(L){D(L),y()},get style(){return F()},set style(L){F(L),y()},get onPlaced(){return N()},set onPlaced(L){N(L),y()},get onInteractOutside(){return B()},set onInteractOutside(L){B(L),y()},get onCloseAutoFocus(){return H()},set onCloseAutoFocus(L){H(L),y()},get onOpenAutoFocus(){return Z()},set onOpenAutoFocus(L){Z(L),y()},get onFocusOutside(){return de()},set onFocusOutside(L){de(L),y()},get interactOutsideBehavior(){return X()},set interactOutsideBehavior(L="close"){X(L),y()},get loop(){return K()},set loop(L){K(L),y()},get trapFocus(){return J()},set trapFocus(L=!0){J(L),y()},get isValidEvent(){return G()},set isValidEvent(L=()=>!1){G(L),y()},get customAnchor(){return q()},set customAnchor(L=null){q(L),y()},get isStatic(){return Y()},set isStatic(L=!1){Y(L),y()},get enabled(){return ue()},set enabled(L){ue(L),y()}};return $d(t,Qn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return o()},get onPointerDown(){return a()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return v()},get collisionBoundary(){return g()},get collisionPadding(){return m()},get sticky(){return b()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return O()},get strategy(){return E()},get dir(){return P()},get preventScroll(){return A()},get wrapperId(){return D()},get style(){return F()},get onPlaced(){return N()},get customAnchor(){return q()},get isStatic(){return Y()},get enabled(){return ue()},get onInteractOutside(){return B()},get onCloseAutoFocus(){return H()},get onOpenAutoFocus(){return Z()},get interactOutsideBehavior(){return X()},get loop(){return K()},get trapFocus(){return J()},get isValidEvent(){return G()},get onFocusOutside(){return de()}},()=>ee,{forceMount:!0})),ie(ve)}oe(Sv,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:"open"});const Fl=sl({component:"date-field",parts:["input","label","segment"]}),Es={day:{min:1,max:t=>{const e=t.segmentValues.month,r=t.value.current??t.placeholder.current;return Ro(e?r.set({month:Number.parseInt(e)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(t,e)=>e.placeholder.current?`${t} - ${e.formatter.fullMonth(Jt(e.placeholder.current.set({month:t})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:t=>t.hourCycle.current===12?1:0,max:t=>t.hourCycle.current===24?23:t.hourCycle.current===12||Rg(t.locale.current)===12?12:23,cycle:1,canBeZero:!0,padZero:!0},minute:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0},second:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0}},pi=new In("DateField.Root");class Nd{static create(e,r){return pi.set(new Nd(e,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=di();formatter;initialSegments;#e=le();get segmentValues(){return h(this.#e)}set segmentValues(e){M(this.#e,e,!0)}announcer;#t=C(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return h(this.#t)}set readonlySegmentsSet(e){M(this.#t,e)}segmentStates=$g();#r=le(null);#n=le(null);#i=le(null);get descriptionNode(){return h(this.#i)}set descriptionNode(e){M(this.#i,e,!0)}#s=le(null);get validationNode(){return h(this.#s)}set validationNode(e){M(this.#s,e,!0)}states=$g();#a=le(null);get dayPeriodNode(){return h(this.#a)}set dayPeriodNode(e){M(this.#a,e,!0)}rangeRoot=void 0;#o=le("");get name(){return h(this.#o)}set name(e){M(this.#o,e,!0)}domContext=new bs(()=>null);constructor(e,r){this.rangeRoot=r,this.value=e.value,this.placeholder=r?r.opts.placeholder:e.placeholder,this.validate=r?Nr(void 0):e.validate,this.minValue=r?r.opts.minValue:e.minValue,this.maxValue=r?r.opts.maxValue:e.maxValue,this.disabled=r?r.opts.disabled:e.disabled,this.readonly=r?r.opts.readonly:e.readonly,this.granularity=r?r.opts.granularity:e.granularity,this.readonlySegments=r?r.opts.readonlySegments:e.readonlySegments,this.hourCycle=r?r.opts.hourCycle:e.hourCycle,this.locale=r?r.opts.locale:e.locale,this.hideTimeZone=r?r.opts.hideTimeZone:e.hideTimeZone,this.required=r?r.opts.required:e.required,this.onInvalid=r?r.opts.onInvalid:e.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:e.errorMessageId,this.isInvalidProp=e.isInvalidProp,this.formatter=Zg({initialLocale:this.locale.current,monthFormat:R(()=>"long"),yearFormat:R(()=>"numeric")}),this.initialSegments=Gu(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=_l(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),_e(()=>{Ge(()=>{this.initialSegments=Gu(this.inferredGranularity)})}),kn(()=>{this.announcer=_l(this.domContext.getDocument())}),_s(()=>{r||dC(this.descriptionId,this.domContext.getDocument())}),_e(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),_e(()=>{if(r)return;if(this.value.current){const i=Ge(()=>this.descriptionId);uC({id:i,formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()})}const n=Ge(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ge(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),_e(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),_e(()=>{this.value.current===void 0&&(this.segmentValues=Gu(this.inferredGranularity))}),ut(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(e){this.name=e}setFieldNode(e){M(this.#r,e,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:h(this.#r)}setLabelNode(e){M(this.#n,e,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:h(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(e){this.value.current=e}syncSegmentValues(e){const r=wl.map(n=>{const i=e[n];if(n==="month"){if(this.states.month.updating)return[n,this.states.month.updating];if(i<10)return[n,`0${i}`]}if(n==="day"){if(this.states.day.updating)return[n,this.states.day.updating];if(i<10)return[n,`0${i}`]}if(n==="year"){if(this.states.year.updating)return[n,this.states.year.updating];const o=4-`${i}`.length;if(o>0)return[n,`${"0".repeat(o)}${i}`]}return[n,`${i}`]});if("hour"in e){const n=Wu.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Jt(e))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`];if(e[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}return[s,`${e[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#c=C(()=>{const e=this.value.current;if(!e)return!1;const r=this.validate.current?.(e);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&Li(e,n))return{reason:"min"};const i=this.maxValue.current;return i&&Li(i,e)?{reason:"max"}:!1});get validationStatus(){return h(this.#c)}set validationStatus(e){M(this.#c,e)}#d=C(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return h(this.#d)}set isInvalid(e){M(this.#d,e)}#u=C(()=>{const e=this.granularity.current;return e||lC(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return h(this.#u)}set inferredGranularity(e){M(this.#u,e)}#f=C(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return h(this.#f)}set dateRef(e){M(this.#f,e)}#h=C(()=>rC({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return h(this.#h)}set allSegmentContent(e){M(this.#h,e)}#p=C(()=>this.allSegmentContent.arr);get segmentContents(){return h(this.#p)}set segmentContents(e){M(this.#p,e)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"}};#m(e){return`${e} ${this.getLabelNode()?.id??""}`}updateSegment(e,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(e))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(aC(o)){const c=o[e],u=r;if(e==="month"){const d=u(c);if(this.states.month.updating=d,d!==null&&o.day!==null){const f=l.set({month:Number.parseInt(d)}),p=Ro(Jt(f));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[e]:d}}else if(e==="dayPeriod"){const d=u(c);this.states.dayPeriod.updating=d;const f=this.value.current;if(f&&"hour"in f){const p=f.hour;d==="AM"?p>=12&&(o.hour=`${p-12}`):d==="PM"&&p<12&&(o.hour=`${p+12}`)}a={...o,[e]:d}}else if(e==="hour"){const d=u(c);if(this.states.hour.updating=d,d!==null&&o.dayPeriod!==null){const f=this.formatter.dayPeriod(Jt(l.set({hour:Number.parseInt(d)})),this.hourCycle.current);(f==="AM"||f==="PM")&&(o.dayPeriod=f)}a={...o,[e]:d}}else if(e==="minute"){const d=u(c);this.states.minute.updating=d,a={...o,[e]:d}}else if(e==="second"){const d=u(c);this.states.second.updating=d,a={...o,[e]:d}}else if(e==="year"){const d=u(c);this.states.year.updating=d,a={...o,[e]:d}}else if(e==="day"){const d=u(c);this.states.day.updating=d,a={...o,[e]:d}}else{const d=u(c);a={...o,[e]:d}}}else if(kl(e)){const c=o[e],u=r,d=u(c);if(e==="month"&&d!==null&&o.day!==null){this.states.month.updating=d;const f=l.set({month:Number.parseInt(d)}),p=Ro(Jt(f));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[e]:d}}else if(e==="year"){const f=u(c);this.states.year.updating=f,a={...o,[e]:f}}else if(e==="day"){const f=u(c);this.states.day.updating=f,a={...o,[e]:f}}else a={...o,[e]:d}}this.segmentValues=a,oC(a,h(this.#r))?this.setValue(sC({segmentObj:a,fieldNode:h(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(e){this.disabled.current&&e.preventDefault()}getBaseSegmentAttrs(e,r){const n=this.readonlySegmentsSet.has(e),i={"aria-invalid":Du(this.isInvalid),"aria-disabled":Fr(this.disabled.current),"aria-readonly":Fr(this.readonly.current||n),"data-invalid":qe(this.isInvalid),"data-disabled":qe(this.disabled.current),"data-readonly":qe(this.readonly.current||n),"data-segment":`${e}`,[Fl.segment]:""};if(e==="literal")return i;const s=this.descriptionNode?.id,o=cC(r,h(this.#r))&&s,a=this.errorMessageId?.current,l=o?`${s} ${this.isInvalid&&a?a:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}}class Fd{static create(e){return new Fd(e,pi.get())}opts;root;domContext;attachment;constructor(e,r){this.opts=e,this.root=r,this.domContext=new bs(e.ref),this.root.domContext=this.domContext,this.attachment=lt(e.ref,n=>this.root.setFieldNode(n)),ut(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=C(()=>{if(!(!Pn||!this.domContext.getElementById(this.root.descriptionId)))return this.root.descriptionId});#t=C(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":h(this.#e),"aria-disabled":Fr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":qe(this.root.disabled.current),[Fl.input]:"",...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class Rd{static create(){return new Rd(pi.get())}root;#e=C(()=>this.root.name!=="");get shouldRender(){return h(this.#e)}set shouldRender(e){M(this.#e,e)}#t=C(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return h(this.#t)}set isoValue(e){M(this.#t,e)}constructor(e){this.root=e}#r=C(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return h(this.#r)}set props(e){M(this.#r,e)}}class Ld{static create(e){return new Ld(e,pi.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=lt(e.ref,n=>this.root.setLabelNode(n))}onclick(e){if(this.root.disabled.current)return;const r=pC(this.root.getFieldNode());r&&r.focus()}#e=C(()=>({id:this.opts.id.current,"data-invalid":qe(this.root.isInvalid),"data-disabled":qe(this.root.disabled.current),[Fl.label]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class Ts{opts;root;announcer;part;config;attachment;constructor(e,r,n,i){this.opts=e,this.root=r,this.part=n,this.config=i,this.announcer=r.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=lt(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,r=!0){const n=String(e);return r&&this.config.padZero&&n.length===1?`0${e}`:n}onkeydown(e){const r=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in r))&&(e.key!==ll&&e.preventDefault(),!!Yu(e.key))){if(Ud(e.key)){this.#i(r);return}if(Bd(e.key)){this.#s(r);return}if(cl(e.key)){this.#a(e);return}if(jd(e.key)){this.#o(e);return}Zo(e.key)&&zo(e,this.root.getFieldNode())}}#i(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#s(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#a(e){const r=Number.parseInt(e.key);let n=!1;const i=this.#e(),s=Math.floor(i/10),o=r===0,a=this.part;this.root.updateSegment(this.part,l=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(l=null,this.root.states[a].hasLeftFocus=!1),l===null)return o?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||r>s)&&(n=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),n&&String(r).length===1?(this.announcer.announce(r),`0${r}`):`${r}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return r!==0?(n=!0,this.root.states[a].lastKeyZero=!1,`0${r}`):this.part==="hour"&&r===0&&this.root.hourCycle.current===24?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&r===0?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):l;const c=Number.parseInt(l+r.toString());return c>i?(n=!0,`0${r}`):(n=!0,`${c}`)}),n&&Lg(e,this.root.getFieldNode())}#o(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1);let n=!1;this.root.updateSegment(this.part,i=>{if(i===null)return n=!0,this.announcer.announce(null),null;if(i.length===2&&i.startsWith("0"))return this.announcer.announce(null),null;const s=i.toString();if(s.length===1)return this.announcer.announce(null),null;const o=Number.parseInt(s.slice(0,-1));return this.announcer.announce(this.#r(o)),`${o}`}),n&&zg(e,this.root.getFieldNode())}onfocusout(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,n=>n&&n.length===1?`0${n}`:n)}getSegmentProps(){const e=this.root.segmentValues,r=this.root.placeholder.current,n=e[this.part]===null;let i=r;e[this.part]&&(i=r.set({[this.part]:Number.parseInt(e[this.part])}));const s=i[this.part],o=this.#t(),a=this.#e();let l=n?"Empty":`${s}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(l=n?"Empty":`${s} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":s,"aria-valuetext":l}}#l=C(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return h(this.#l)}set props(e){M(this.#l,e)}}class rD extends Ts{#e=[];#t=0;constructor(e,r){super(e,r,"year",Es.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==ll&&e.preventDefault(),!!Yu(e.key))){if(Ud(e.key)){this.#r(),super.onkeydown(e);return}if(Bd(e.key)){this.#r(),super.onkeydown(e);return}if(cl(e.key)){this.#i(e);return}if(jd(e.key)){this.#s(e);return}Zo(e.key)&&zo(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let r=!1;const n=Number.parseInt(e.key);this.root.updateSegment("year",i=>{if(this.root.states.year.hasLeftFocus&&(i=null,this.root.states.year.hasLeftFocus=!1),i===null)return this.announcer.announce(n),`000${n}`;const s=i.toString()+n.toString(),o=Number.parseInt(s);if(String(o).length<4)return this.#t>0&&this.#e.length<=this.#t&&s.length<=4?(this.announcer.announce(o),s):(this.announcer.announce(o),xv(o));this.announcer.announce(o),r=!0;const l=`${o}`;return l.length>4?l.slice(0,4):l}),(this.#e.length===4||this.#e.length===this.#t)&&(r=!0),r&&Lg(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let r=!1;this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus=!1,n===null)return r=!0,this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=i.slice(0,-1);return this.announcer.announce(s),`${s}`}),r&&zg(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",r=>r&&r.length!==4?xv(Number.parseInt(r)):r)}}class nD extends Ts{constructor(e,r){super(e,r,"day",Es.day)}}class iD extends Ts{constructor(e,r){super(e,r,"month",Es.month)}}class sD extends Ts{constructor(e,r){super(e,r,"hour",Es.hour)}onkeydown(e){if(cl(e.key)){const r=this.root.updateSegment.bind(this.root);this.root.updateSegment=(n,i)=>{const s=r(n,i);return n==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),s}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}}class oD extends Ts{constructor(e,r){super(e,r,"minute",Es.minute)}}class aD extends Ts{constructor(e,r){super(e,r,"second",Es.second)}}class zd{static create(e){return new zd(e,pi.get())}opts;root;attachment;#e;constructor(e,r){this.opts=e,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=lt(e.ref,n=>this.root.dayPeriodNode=n)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==ll&&e.preventDefault(),!!cD(e.key))){if(Ud(e.key)||Bd(e.key)){this.root.updateSegment("dayPeriod",r=>{if(r==="AM")return this.#e.announce("PM"),"PM";const n="AM";return this.#e.announce(n),n});return}jd(e.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),(e.key===$u||e.key===og||Mu)&&this.root.updateSegment("dayPeriod",()=>{const r=e.key===$u||e.key===Mu?"AM":"PM";return this.#e.announce(r),r}),Zo(e.key)&&zo(e,this.root.getFieldNode())}}#t=C(()=>{const e=this.root.segmentValues;if(!("dayPeriod"in e))return;const r=0,n=12,i=e.dayPeriod==="AM"?0:12,s=e.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class Zd{static create(e){return new Zd(e,pi.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(e.ref)}#e=C(()=>({id:this.opts.id.current,"aria-hidden":Du(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class Vd{static create(e){return new Vd(e,pi.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=lt(e.ref)}onkeydown(e){e.key!==ll&&e.preventDefault(),!this.root.disabled.current&&Zo(e.key)&&zo(e,this.root.getFieldNode())}#e=C(()=>({role:"textbox",id:this.opts.id.current,"aria-label":"timezone, ",style:{caretColor:"transparent"},onkeydown:this.onkeydown,...this.root.getBaseSegmentAttrs("timeZoneName",this.opts.id.current),"data-readonly":qe(!0),...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class lD{static create(e,r){const n=pi.get();switch(e){case"day":return new nD(r,n);case"month":return new iD(r,n);case"year":return new rD(r,n);case"hour":return new sD(r,n);case"minute":return new oD(r,n);case"second":return new aD(r,n);case"dayPeriod":return new zd(r,n);case"literal":return new Zd(r,n);case"timeZoneName":return new Vd(r,n)}}}function cD(t){return Yu(t)||t===$u||t===og||t===Mu||t===Q1}function Ud(t){return t===al}function Bd(t){return t===ol}function jd(t){return t===sg}function xv(t){const r=4-String(t).length;return`${"0".repeat(r)}${t}`}function Ev(t,e){ne(e,!1);const r=Rd.create();Fc();var n=W(),i=z(n);{var s=o=>{Hg(o,Qn(()=>r.props))};fe(i,o=>{r.shouldRender&&o(s)})}w(t,n),ie()}oe(Ev,{},[],[],{mode:"open"});var uD=j("<div><!></div>"),dD=j("<!> <!>",1);function Tv(t,e){const r=kt();ne(e,!0);let n=_(e,"id",23,()=>Fe(r)),i=_(e,"ref",15,null),s=_(e,"name",7,""),o=_(e,"children",7),a=_(e,"child",7),l=Je(e,["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]);const c=Fd.create({id:R(()=>n()),ref:R(()=>i(),b=>i(b)),name:R(()=>s())}),u=C(()=>et(l,c.props));var d={get id(){return n()},set id(b=Fe(r)){n(b),y()},get ref(){return i()},set ref(b=null){i(b),y()},get name(){return s()},set name(b=""){s(b),y()},get children(){return o()},set children(b){o(b),y()},get child(){return a()},set child(b){a(b),y()}},f=dD(),p=z(f);{var v=b=>{var k=W(),O=z(k);ke(O,a,()=>({props:h(u),segments:c.root.segmentContents})),w(b,k)},g=b=>{var k=uD();Ke(k,()=>({...h(u)}));var O=$(k);ke(O,()=>o()??Ue,()=>({segments:c.root.segmentContents})),I(k),w(b,k)};fe(p,b=>{a()?b(v):b(g,!1)})}var m=te(p,2);return Ev(m,{}),w(t,f),ie(d)}oe(Tv,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var fD=j("<div><!></div>");function Av(t,e){const r=kt();ne(e,!0);let n=_(e,"id",23,()=>Fe(r)),i=_(e,"ref",15,null),s=_(e,"children",7),o=_(e,"child",7),a=Je(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]);const l=Ld.create({id:R(()=>n()),ref:R(()=>i(),g=>i(g))}),c=C(()=>et(a,l.props));var u={get id(){return n()},set id(g=Fe(r)){n(g),y()},get ref(){return i()},set ref(g=null){i(g),y()},get children(){return s()},set children(g){s(g),y()},get child(){return o()},set child(g){o(g),y()}},d=W(),f=z(d);{var p=g=>{var m=W(),b=z(m);ke(b,o,()=>({props:h(c)})),w(g,m)},v=g=>{var m=fD();Ke(m,()=>({...h(c)}));var b=$(m);ke(b,()=>s()??Ue),I(m),w(g,m)};fe(f,g=>{o()?g(p):g(v,!1)})}return w(t,d),ie(u)}oe(Av,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var hD=j("<span><!></span>");function Cv(t,e){const r=kt();ne(e,!0);let n=_(e,"id",23,()=>Fe(r)),i=_(e,"ref",15,null),s=_(e,"children",7),o=_(e,"child",7),a=_(e,"part",7),l=Je(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]);const c=lD.create(a(),{id:R(()=>n()),ref:R(()=>i(),m=>i(m))}),u=C(()=>et(l,c.props));var d={get id(){return n()},set id(m=Fe(r)){n(m),y()},get ref(){return i()},set ref(m=null){i(m),y()},get children(){return s()},set children(m){s(m),y()},get child(){return o()},set child(m){o(m),y()},get part(){return a()},set part(m){a(m),y()}},f=W(),p=z(f);{var v=m=>{var b=W(),k=z(b);ke(k,o,()=>({props:h(u)})),w(m,b)},g=m=>{var b=hD();Ke(b,()=>({...h(u)}));var k=$(b);ke(k,()=>s()??Ue),I(b),w(m,b)};fe(p,m=>{o()?m(v):m(g,!1)})}return w(t,f),ie(d)}oe(Cv,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});const Ov=new In("DatePicker.Root");class qd{static create(e){return Ov.set(new qd(e))}opts;constructor(e){this.opts=e}}function Dv(t,e){const[r,n]=t;let i=!1;const s=e.length;for(let o=0,a=s-1;o<s;a=o++){const[l,c]=e[o]??[0,0],[u,d]=e[a]??[0,0];c>=n!=d>=n&&r<=(u-l)*(n-c)/(d-c)+l&&(i=!i)}return i}function Iv(t,e){return t[0]>=e.left&&t[0]<=e.right&&t[1]>=e.top&&t[1]<=e.bottom}function pD(t,e){const r=t.left+t.width/2,n=t.top+t.height/2,i=e.left+e.width/2,s=e.top+e.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}class mD{#e;#t;#r=null;#n=null;constructor(e){this.#e=e,this.#t=e.buffer??1,ut([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#r=null,this.#n=null;return}const s=il(r),o=d=>{this.#i(d,r,n)},a=d=>{const f=d.relatedTarget;$o(f)&&n.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="content")},l=()=>{this.#r=null,this.#n=null},c=()=>{this.#r=null,this.#n=null},u=d=>{const f=d.relatedTarget;$o(f)&&r.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="trigger")};return[wt(s,"pointermove",o),wt(r,"pointerleave",a),wt(r,"pointerenter",l),wt(n,"pointerenter",c),wt(n,"pointerleave",u)].reduce((d,f)=>()=>{d(),f()},()=>{})})}#i(e,r,n){if(!this.#r||!this.#n)return;const i=[e.clientX,e.clientY],s=r.getBoundingClientRect(),o=n.getBoundingClientRect();if(this.#n==="content"&&Iv(i,o)){this.#r=null,this.#n=null;return}if(this.#n==="trigger"&&Iv(i,s)){this.#r=null,this.#n=null;return}const a=pD(s,o),l=this.#s(s,o,a);if(l&&Dv(i,l))return;const c=this.#n==="content"?o:s,u=this.#a(this.#r,c,a,this.#n);Dv(i,u)||(this.#r=null,this.#n=null,this.#e.onPointerExit())}#s(e,r,n){const i=this.#t;switch(n){case"top":return[[Math.min(e.left,r.left)-i,e.top],[Math.min(e.left,r.left)-i,r.bottom],[Math.max(e.right,r.right)+i,r.bottom],[Math.max(e.right,r.right)+i,e.top]];case"bottom":return[[Math.min(e.left,r.left)-i,e.bottom],[Math.min(e.left,r.left)-i,r.top],[Math.max(e.right,r.right)+i,r.top],[Math.max(e.right,r.right)+i,e.bottom]];case"left":return[[e.left,Math.min(e.top,r.top)-i],[r.right,Math.min(e.top,r.top)-i],[r.right,Math.max(e.bottom,r.bottom)+i],[e.left,Math.max(e.bottom,r.bottom)+i]];case"right":return[[e.right,Math.min(e.top,r.top)-i],[r.left,Math.min(e.top,r.top)-i],[r.left,Math.max(e.bottom,r.bottom)+i],[e.right,Math.max(e.bottom,r.bottom)+i]]}}#a(e,r,n,i){const s=this.#t*4,[o,a]=e;switch(i==="trigger"?this.#o(n):n){case"top":return[[o-s,a+s],[o+s,a+s],[r.right+s,r.bottom],[r.right+s,r.top],[r.left-s,r.top],[r.left-s,r.bottom]];case"bottom":return[[o-s,a-s],[o+s,a-s],[r.right+s,r.top],[r.right+s,r.bottom],[r.left-s,r.bottom],[r.left-s,r.top]];case"left":return[[o+s,a-s],[o+s,a+s],[r.right,r.bottom+s],[r.left,r.bottom+s],[r.left,r.top-s],[r.right,r.top-s]];case"right":return[[o-s,a-s],[o-s,a+s],[r.left,r.bottom+s],[r.right,r.bottom+s],[r.right,r.top-s],[r.left,r.top-s]]}}#o(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const Wd=sl({component:"popover",parts:["root","trigger","content","close","overlay"]}),Hd=new In("Popover.Root");class Kd{static create(e){return Hd.set(new Kd(e))}opts;#e=le(null);get contentNode(){return h(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=le(null);get triggerNode(){return h(this.#t)}set triggerNode(e){M(this.#t,e,!0)}#r=le(null);get overlayNode(){return h(this.#r)}set overlayNode(e){M(this.#r,e,!0)}overlayPresence;#n=le(!1);get openedViaHover(){return h(this.#n)}set openedViaHover(e){M(this.#n,e,!0)}#i=le(!1);get hasInteractedWithContent(){return h(this.#i)}set hasInteractedWithContent(e){M(this.#i,e,!0)}#s=le(!1);get hoverCooldown(){return h(this.#s)}set hoverCooldown(e){M(this.#s,e,!0)}#a=le(0);get closeDelay(){return h(this.#a)}set closeDelay(e){M(this.#a,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new lg({ref:R(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new lg({ref:R(()=>this.overlayNode),open:this.opts.open}),ut(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#c())})}setDomContext(e){this.#l=e}#c(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#c(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#c(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#c(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#c(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#c()}markInteraction(){this.hasInteractedWithContent=!0,this.#c()}}class Gd{static create(e){return new Gd(e,Hd.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=le(!1);constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new bs(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),ut(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||ul(e)||(M(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(ul(e)||(M(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#s(),h(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}h(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===Iu||e.key===Pu)&&(e.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=C(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Fr(this.root.opts.open.current),"data-state":ig(this.root.opts.open.current),"aria-controls":this.#a(),[Wd.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#o)}set props(e){M(this.#o,e)}}class Yd{static create(e){return new Yd(e,Hd.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=lt(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new mD({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const r=e.target;$o(r)&&xA(r)&&this.root.markInteraction()}onpointerenter(e){ul(e)||this.root.cancelDelayedClose()}onpointerleave(e){ul(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!$o(e.target))return;const r=e.target.closest(Wd.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if($o(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=C(()=>({open:this.root.opts.open.current}));get snippetProps(){return h(this.#e)}set snippetProps(e){M(this.#e,e)}#t=C(()=>({id:this.opts.id.current,tabindex:-1,"data-state":ig(this.root.opts.open.current),[Wd.content]:"",style:{pointerEvents:"auto"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}function Pv(t,e){ne(e,!0);let r=_(e,"open",15,!1),n=_(e,"onOpenChange",7,Te),i=_(e,"onOpenChangeComplete",7,Te),s=_(e,"value",15),o=_(e,"onValueChange",7,Te),a=_(e,"placeholder",15),l=_(e,"onPlaceholderChange",7,Te),c=_(e,"isDateUnavailable",7,()=>!1),u=_(e,"validate",7,Te),d=_(e,"onInvalid",7,Te),f=_(e,"minValue",7),p=_(e,"maxValue",7),v=_(e,"disabled",7,!1),g=_(e,"readonly",7,!1),m=_(e,"granularity",7),b=_(e,"readonlySegments",23,()=>[]),k=_(e,"hourCycle",7),O=_(e,"locale",7),E=_(e,"hideTimeZone",7,!1),P=_(e,"required",7,!1),A=_(e,"calendarLabel",7,"Event"),D=_(e,"disableDaysOutsideMonth",7,!0),F=_(e,"preventDeselect",7,!1),N=_(e,"pagedNavigation",7,!1),B=_(e,"weekStartsOn",7),H=_(e,"weekdayFormat",7,"narrow"),Z=_(e,"isDateDisabled",7,()=>!1),de=_(e,"fixedWeeks",7,!1),X=_(e,"numberOfMonths",7,1),K=_(e,"closeOnDateSelect",7,!0),J=_(e,"initialFocus",7,!1),G=_(e,"errorMessageId",7),q=_(e,"children",7),Y=_(e,"monthFormat",7,"long"),ue=_(e,"yearFormat",7,"numeric");const ee=Og({granularity:m(),defaultValue:s(),minValue:f(),maxValue:p()});function ve(){a()===void 0&&a(ee)}ve(),ut.pre(()=>a(),()=>{ve()});function L(){K()&&r(!1)}const ye=qd.create({open:R(()=>r(),T=>{r(T),n()(T)}),value:R(()=>s(),T=>{s(T),o()(T)}),placeholder:R(()=>a(),T=>{a(T),l()(T)}),isDateUnavailable:R(()=>c()),minValue:R(()=>f()),maxValue:R(()=>p()),disabled:R(()=>v()),readonly:R(()=>g()),granularity:R(()=>m()),readonlySegments:R(()=>b()),hourCycle:R(()=>k()),locale:cg(()=>O()),hideTimeZone:R(()=>E()),required:R(()=>P()),calendarLabel:R(()=>A()),disableDaysOutsideMonth:R(()=>D()),preventDeselect:R(()=>F()),pagedNavigation:R(()=>N()),weekStartsOn:R(()=>B()),weekdayFormat:R(()=>H()),isDateDisabled:R(()=>Z()),fixedWeeks:R(()=>de()),numberOfMonths:R(()=>X()),initialFocus:R(()=>J()),onDateSelect:R(()=>L),defaultPlaceholder:ee,monthFormat:R(()=>Y()),yearFormat:R(()=>ue())});Kd.create({open:ye.opts.open,onOpenChangeComplete:R(()=>i())}),Nd.create({value:ye.opts.value,disabled:ye.opts.disabled,readonly:ye.opts.readonly,readonlySegments:ye.opts.readonlySegments,validate:R(()=>u()),onInvalid:R(()=>d()),minValue:ye.opts.minValue,maxValue:ye.opts.maxValue,granularity:ye.opts.granularity,hideTimeZone:ye.opts.hideTimeZone,hourCycle:ye.opts.hourCycle,locale:ye.opts.locale,required:ye.opts.required,placeholder:ye.opts.placeholder,errorMessageId:R(()=>G()),isInvalidProp:R(()=>{})});var U={get open(){return r()},set open(T=!1){r(T),y()},get onOpenChange(){return n()},set onOpenChange(T=Te){n(T),y()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(T=Te){i(T),y()},get value(){return s()},set value(T){s(T),y()},get onValueChange(){return o()},set onValueChange(T=Te){o(T),y()},get placeholder(){return a()},set placeholder(T){a(T),y()},get onPlaceholderChange(){return l()},set onPlaceholderChange(T=Te){l(T),y()},get isDateUnavailable(){return c()},set isDateUnavailable(T=()=>!1){c(T),y()},get validate(){return u()},set validate(T=Te){u(T),y()},get onInvalid(){return d()},set onInvalid(T=Te){d(T),y()},get minValue(){return f()},set minValue(T){f(T),y()},get maxValue(){return p()},set maxValue(T){p(T),y()},get disabled(){return v()},set disabled(T=!1){v(T),y()},get readonly(){return g()},set readonly(T=!1){g(T),y()},get granularity(){return m()},set granularity(T){m(T),y()},get readonlySegments(){return b()},set readonlySegments(T=[]){b(T),y()},get hourCycle(){return k()},set hourCycle(T){k(T),y()},get locale(){return O()},set locale(T){O(T),y()},get hideTimeZone(){return E()},set hideTimeZone(T=!1){E(T),y()},get required(){return P()},set required(T=!1){P(T),y()},get calendarLabel(){return A()},set calendarLabel(T="Event"){A(T),y()},get disableDaysOutsideMonth(){return D()},set disableDaysOutsideMonth(T=!0){D(T),y()},get preventDeselect(){return F()},set preventDeselect(T=!1){F(T),y()},get pagedNavigation(){return N()},set pagedNavigation(T=!1){N(T),y()},get weekStartsOn(){return B()},set weekStartsOn(T){B(T),y()},get weekdayFormat(){return H()},set weekdayFormat(T="narrow"){H(T),y()},get isDateDisabled(){return Z()},set isDateDisabled(T=()=>!1){Z(T),y()},get fixedWeeks(){return de()},set fixedWeeks(T=!1){de(T),y()},get numberOfMonths(){return X()},set numberOfMonths(T=1){X(T),y()},get closeOnDateSelect(){return K()},set closeOnDateSelect(T=!0){K(T),y()},get initialFocus(){return J()},set initialFocus(T=!1){J(T),y()},get errorMessageId(){return G()},set errorMessageId(T){G(T),y()},get children(){return q()},set children(T){q(T),y()},get monthFormat(){return Y()},set monthFormat(T="long"){Y(T),y()},get yearFormat(){return ue()},set yearFormat(T="numeric"){ue(T),y()}},V=W(),we=z(V);return Re(we,()=>vv,(T,Xe)=>{Xe(T,{children:(Ze,We)=>{var yt=W(),Ve=z(yt);ke(Ve,()=>q()??Ue),w(Ze,yt)},$$slots:{default:!0}})}),w(t,V),ie(U)}oe(Pv,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var gD=j("<div><!></div>");function Mv(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]);const l=Ov.get(),c=xl.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:R(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:R(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),u=C(()=>et(a,c.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()}},f=W(),p=z(f);{var v=m=>{var b=W(),k=z(b);{let O=C(()=>({props:h(u),...c.snippetProps}));ke(k,i,()=>h(O))}w(m,b)},g=m=>{var b=gD();Ke(b,()=>({...h(u)}));var k=$(b);ke(k,()=>n()??Ue,()=>c.snippetProps),I(b),w(m,b)};fe(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),ie(d)}oe(Mv,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var vD=j("<div><div><!></div></div>"),yD=j("<div><div><!></div></div>");function $v(t,e){const r=kt();ne(e,!0);let n=_(e,"child",7),i=_(e,"children",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=_(e,"forceMount",7,!1),l=_(e,"onOpenAutoFocus",7,Te),c=_(e,"onCloseAutoFocus",7,Te),u=_(e,"onEscapeKeydown",7,Te),d=_(e,"onInteractOutside",7,Te),f=_(e,"trapFocus",7,!0),p=_(e,"preventScroll",7,!1),v=_(e,"customAnchor",7,null),g=Je(e,["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor"]);const m=Yd.create({id:R(()=>o()),ref:R(()=>s(),N=>s(N)),onInteractOutside:R(()=>d()),onEscapeKeydown:R(()=>u()),customAnchor:R(()=>v())}),b=C(()=>et(g,m.props)),k=C(()=>f()&&m.shouldTrapFocus);function O(N){m.shouldTrapFocus||N.preventDefault(),l()(N)}var E={get child(){return n()},set child(N){n(N),y()},get children(){return i()},set children(N){i(N),y()},get ref(){return s()},set ref(N=null){s(N),y()},get id(){return o()},set id(N=Fe(r)){o(N),y()},get forceMount(){return a()},set forceMount(N=!1){a(N),y()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Te){l(N),y()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Te){c(N),y()},get onEscapeKeydown(){return u()},set onEscapeKeydown(N=Te){u(N),y()},get onInteractOutside(){return d()},set onInteractOutside(N=Te){d(N),y()},get trapFocus(){return f()},set trapFocus(N=!0){f(N),y()},get preventScroll(){return p()},set preventScroll(N=!1){p(N),y()},get customAnchor(){return v()},set customAnchor(N=null){v(N),y()}},P=W(),A=z(P);{var D=N=>{Sv(N,Qn(()=>h(b),()=>m.popperProps,{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return v()},onOpenAutoFocus:O,get onCloseAutoFocus(){return c()},get shouldRender(){return m.shouldRender},popper:(H,Z)=>{let de=()=>Z?.().props,X=()=>Z?.().wrapperProps;const K=C(()=>et(de(),{style:mv("popover")}));var J=W(),G=z(J);{var q=ue=>{var ee=W(),ve=z(ee);{let L=C(()=>({props:h(K),wrapperProps:X(),...m.snippetProps}));ke(ve,n,()=>h(L))}w(ue,ee)},Y=ue=>{var ee=vD();Ke(ee,()=>({...X()}));var ve=$(ee);Ke(ve,()=>({...h(K)}));var L=$(ve);ke(L,()=>i()??Ue),I(ve),I(ee),w(ue,ee)};fe(G,ue=>{n()?ue(q):ue(Y,!1)})}w(H,J)},$$slots:{popper:!0}}))},F=N=>{var B=W(),H=z(B);{var Z=de=>{kv(de,Qn(()=>h(b),()=>m.popperProps,{get ref(){return m.opts.ref},get open(){return m.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return v()},onOpenAutoFocus:O,get onCloseAutoFocus(){return c()},get shouldRender(){return m.shouldRender},popper:(K,J)=>{let G=()=>J?.().props,q=()=>J?.().wrapperProps;const Y=C(()=>et(G(),{style:mv("popover")}));var ue=W(),ee=z(ue);{var ve=ye=>{var U=W(),V=z(U);{let we=C(()=>({props:h(Y),wrapperProps:q(),...m.snippetProps}));ke(V,n,()=>h(we))}w(ye,U)},L=ye=>{var U=yD();Ke(U,()=>({...q()}));var V=$(U);Ke(V,()=>({...h(Y)}));var we=$(V);ke(we,()=>i()??Ue),I(V),I(U),w(ye,U)};fe(ee,ye=>{n()?ye(ve):ye(L,!1)})}w(K,ue)},$$slots:{popper:!0}}))};fe(H,de=>{a()||de(Z)},!0)}w(N,B)};fe(A,N=>{a()?N(D):N(F,!1)})}return w(t,P),ie(E)}oe($v,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{}},[],[],{mode:"open"});function Nv(t,e){ne(e,!0);let r=_(e,"ref",15,null),n=_(e,"onOpenAutoFocus",7),i=Je(e,["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);const s=C(()=>et({onOpenAutoFocus:n()},{onOpenAutoFocus:OC}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return $v(t,Qn(()=>h(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),ie(o)}oe(Nv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var _D=j("<button><!></button>");function Fv(t,e){const r=kt();ne(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=_(e,"type",7,"button"),l=_(e,"disabled",7,!1),c=_(e,"openOnHover",7,!1),u=_(e,"openDelay",7,700),d=_(e,"closeDelay",7,300),f=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const p=Gd.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m)),disabled:R(()=>!!l()),openOnHover:R(()=>c()),openDelay:R(()=>u()),closeDelay:R(()=>d())}),v=C(()=>et(f,p.props,{type:a()}));var g={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get type(){return a()},set type(m="button"){a(m),y()},get disabled(){return l()},set disabled(m=!1){l(m),y()},get openOnHover(){return c()},set openOnHover(m=!1){c(m),y()},get openDelay(){return u()},set openDelay(m=700){u(m),y()},get closeDelay(){return d()},set closeDelay(m=300){d(m),y()}};return yv(t,{get id(){return s()},get ref(){return p.opts.ref},children:(m,b)=>{var k=W(),O=z(k);{var E=A=>{var D=W(),F=z(D);ke(F,i,()=>({props:h(v)})),w(A,D)},P=A=>{var D=_D();Ke(D,()=>({...h(v)}));var F=$(D);ke(F,()=>n()??Ue),I(D),w(A,D)};fe(O,A=>{i()?A(E):A(P,!1)})}w(m,k)},$$slots:{default:!0}}),ie(g)}oe(Fv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});function Rv(t,e){ne(e,!0);let r=_(e,"ref",15,null),n=_(e,"onkeydown",7),i=Je(e,["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function s(l){if(Zo(l.key)){const u=l.currentTarget.closest(Fl.selector("input"));if(!u)return;zo(l,u)}}const o=C(()=>et({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),y()},get onkeydown(){return n()},set onkeydown(l){n(l),y()}};return Fv(t,Qn(()=>i,{"data-segment":"trigger"},()=>h(o),{get ref(){return r()},set ref(l){r(l)}})),ie(a)}oe(Rv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var bD=j("<!> <!>",1),wD=j("<!> <!> <!>",1),kD=j("<!> <!>",1),SD=j("<!> <!>",1),xD=j("<!> <!> <!>",1);function Lv(t,e){ne(e,!0);let r=_(e,"dateString",15),n=_(e,"labelClass",7),i=_(e,"inputClass",7),s=_(e,"labelText",7),o=le(Be(cs(dr())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);_e(()=>{r(h(o).toString())});var l={get dateString(){return r()},set dateString(d){r(d),y()},get labelClass(){return n()},set labelClass(d){n(d),y()},get inputClass(){return i()},set inputClass(d){i(d),y()},get labelText(){return s()},set labelText(d){s(d),y()}},c=W(),u=z(c);{let d=C(()=>S.locale||"de");Re(u,()=>Pv,(f,p)=>{p(f,{get locale(){return h(d)},weekStartsOn:1,isDateDisabled:v=>v.compare(cs(dr()))<0,get value(){return h(o)},set value(v){M(o,v,!0)},children:(v,g)=>{var m=xD(),b=z(m);Re(b,()=>Av,(E,P)=>{P(E,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(A,D)=>{var F=W(),N=z(F);{var B=H=>{var Z=W(),de=z(Z);ke(de,s),w(H,Z)};fe(N,H=>{s()&&H(B)})}w(A,F)},$$slots:{default:!0}})});var k=te(b,2);{const E=(P,A)=>{let D=()=>A?.().segments;var F=bD(),N=z(F);He(N,17,D,Gr,(H,Z)=>{let de=()=>h(Z).part,X=()=>h(Z).value;var K=W(),J=z(K);Re(J,()=>Cv,(G,q)=>{q(G,{get part(){return de()},children:(Y,ue)=>{Mt();var ee=Yt();ce(()=>se(ee,X())),w(Y,ee)},$$slots:{default:!0}})}),w(H,K)});var B=te(N,2);Re(B,()=>Rv,(H,Z)=>{Z(H,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),w(P,F)};Re(k,()=>Tv,(P,A)=>{A(P,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var O=te(k,2);Re(O,()=>Nv,(E,P)=>{P(E,{children:(A,D)=>{var F=W(),N=z(F);{const B=(H,Z)=>{let de=()=>Z?.().months,X=()=>Z?.().weekdays;var K=SD(),J=z(K);Re(J,()=>vd,(q,Y)=>{Y(q,{children:(ue,ee)=>{var ve=wD(),L=z(ve);Re(L,()=>bd,(V,we)=>{we(V,{class:"go-datepicker-previous"})});var ye=te(L,2);Re(ye,()=>yd,(V,we)=>{we(V,{class:"go-datepicker-selected-month"})});var U=te(ye,2);Re(U,()=>_d,(V,we)=>{we(V,{class:"go-datepicker-next"})}),w(ue,ve)},$$slots:{default:!0}})});var G=te(J,2);He(G,16,de,q=>q,(q,Y)=>{var ue=W(),ee=z(ue);Re(ee,()=>fd,(ve,L)=>{L(ve,{children:(ye,U)=>{var V=kD(),we=z(V);Re(we,()=>md,(Xe,Ze)=>{Ze(Xe,{children:(We,yt)=>{var Ve=W(),Xt=z(Ve);Re(Xt,()=>Uo,(ht,Et)=>{Et(ht,{children:(jt,er)=>{var Ct=W(),Ot=z(Ct);He(Ot,17,X,Gr,(Zn,mi)=>{var Br=W(),jr=z(Br);Re(jr,()=>gd,(tr,qt)=>{qt(tr,{children:(rr,gi)=>{Mt();var un=Yt();ce(()=>se(un,h(mi))),w(rr,un)},$$slots:{default:!0}})}),w(Zn,Br)}),w(jt,Ct)},$$slots:{default:!0}})}),w(We,Ve)},$$slots:{default:!0}})});var T=te(we,2);Re(T,()=>hd,(Xe,Ze)=>{Ze(Xe,{children:(We,yt)=>{var Ve=W(),Xt=z(Ve);He(Xt,16,()=>Y.weeks,ht=>ht,(ht,Et)=>{var jt=W(),er=z(jt);Re(er,()=>Uo,(Ct,Ot)=>{Ot(Ct,{children:(Zn,mi)=>{var Br=W(),jr=z(Br);He(jr,16,()=>Et,tr=>tr,(tr,qt,rr,gi)=>{var un=W(),Ns=z(un);Re(Ns,()=>pd,(Jo,Kl)=>{Kl(Jo,{get date(){return qt},get month(){return Y.value},children:(Fs,Qo)=>{var Tr=W(),vi=z(Tr);Re(vi,()=>dd,(Xo,ea)=>{ea(Xo,{})}),w(Fs,Tr)},$$slots:{default:!0}})}),w(tr,un)}),w(Zn,Br)},$$slots:{default:!0}})}),w(ht,jt)}),w(We,Ve)},$$slots:{default:!0}})}),w(ye,V)},$$slots:{default:!0}})}),w(q,ue)}),w(H,K)};Re(N,()=>Mv,(H,Z)=>{Z(H,{children:B,$$slots:{default:!0}})})}w(A,F)},$$slots:{default:!0}})}),w(v,m)},$$slots:{default:!0}})})}return w(t,c),ie(l)}oe(Lv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var ED=j('<span class="go-field-star" aria-hidden="true">*</span>'),TD=j(" <!>",1),AD=j("<label><!></label> <input/>",1),CD=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),OD=j("<label><!></label> <input/> <!>",1),DD=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),ID=j('<img src="" alt=""/> <option> </option>',1),PD=j('<option disabled hidden="" selected> </option> <!>',1),MD=j("<!>",1),$D=j("<label><!></label> <select><!></select>",1),ND=j('<img style="width: 60px" aria-hidden="true"/>'),FD=j('<span class="go-payment-mode-icons"></span>'),RD=j('<label><input type="radio"/> <!></label>'),LD=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),zD=j("<label> <input/></label>"),ZD=j("<fieldset><legend><!></legend> <!></fieldset>");function zv(t,e){ne(e,!0);const r=X=>{Mt();var K=TD(),J=z(K),G=te(J);{var q=Y=>{var ue=ED();w(Y,ue)};fe(G,Y=>{u().required&&Y(q)})}ce(()=>se(J,`${h(D)??""} `)),w(X,K)},n=X=>{var K=AD(),J=z(K),G=$(J);r(G),I(J);var q=te(J,2);Ke(q,()=>({...h(A),...g,class:p(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ce(()=>{lr(J,1,Sn(f())),Ae(J,"for",h(E))}),Pc(q,()=>u().value,Y=>u(u().value=Y,!0)),w(X,K)},i=X=>{var K=OD(),J=z(K),G=$(J);r(G),I(J);var q=te(J,2),Y=ve=>{const L=ve.currentTarget.files;u(u().value=L&&L[0]?L[0]:null,!0),h(b)?h(b).validateField(u()):u().validate()};Ke(q,()=>({...h(A),...g,class:p(),type:"file",accept:"image/*",name:u().key,onchange:Y}),void 0,void 0,void 0,void 0,!0);var ue=te(q,2);{var ee=ve=>{var L=CD(),ye=$(L),U=te(ye,2),V=$(U,!0);I(U),I(L),ce(we=>{Ae(L,"data-field-preview",u().key),Ae(ye,"src",h(N)),Ae(ye,"alt",we),se(V,u().value.name)},[()=>S.t("forms.file.preview_alt")||"User uploaded photo"]),w(ve,L)};fe(ue,ve=>{h(N)&&u().value instanceof File&&ve(ee)})}ce(()=>{lr(J,1,Sn(f())),Ae(J,"for",h(E))}),w(X,K)},s=X=>{var K=DD(),J=$(K);Ke(J,()=>({...h(A),...g,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var G=te(J,2),q=$(G);r(q),I(G),I(K),ce(()=>{lr(K,1,Sn(f())),Ae(K,"for",h(E))}),cb(J,()=>u().value===!0,Y=>{u(u().value=Y,!0)}),w(X,K)},o=X=>{var K=$D(),J=z(K),G=$(J);r(G),I(J);var q=te(J,2);Ke(q,()=>({...h(A),...g,name:u().key,class:p()})),ab(q,()=>{var Y=$(q),ue=MD(),ee=z(ue);{var ve=L=>{var ye=PD(),U=z(ye),V=$(U,!0);I(U),U.value=U.__value="";var we=te(U,2);He(we,17,()=>u().options(),T=>T.value,(T,Xe)=>{var Ze=ID(),We=te(z(Ze),2),yt=$(We,!0);I(We);var Ve={};ce(()=>{se(yt,h(Xe).label),Ve!==(Ve=h(Xe).value)&&(We.value=(We.__value=h(Xe).value)??"")}),w(T,Ze)}),ce(T=>se(V,T),[()=>S.t("common.choose")]),w(L,ye)};fe(ee,L=>{u().options&&L(ve)})}w(Y,ue)}),ce(()=>{lr(J,1,Sn(f())),Ae(J,"for",h(E))}),nb(q,()=>u().value,Y=>u(u().value=Y,!0)),w(X,K)},a=X=>{Lv(X,{get labelClass(){return f()},get inputClass(){return p()},get labelText(){return r},get dateString(){return u().value},set dateString(K){u(u().value=K,!0)}})},l=X=>{const K=C(()=>S.payment_modes?Object.values(S.payment_modes):[]);var J=LD(),G=$(J),q=$(G);r(q),I(G);var Y=te(G,2);He(Y,17,()=>h(K),ue=>ue.id,(ue,ee)=>{var ve=RD(),L=$(ve);Ta(L),L.__change=()=>{u(u().value=String(h(ee).id),!0)};var ye=te(L,2);{var U=V=>{var we=FD();He(we,20,()=>h(ee).icons,T=>T,(T,Xe)=>{const Ze=C(()=>F+Xe+".svg");var We=ND();ce(()=>{lr(We,1,Sn(Xe)),Ae(We,"src",h(Ze)),Ae(We,"alt",Xe+" icon")}),w(T,We)}),I(we),w(V,we)};fe(ye,V=>{h(ee).icons.length>0&&V(U)})}I(ve),ce((V,we,T)=>{Ae(L,"name",u().key),Lh(L,V),ib(L,we),Ae(L,"hidden",h(K).length===1),Ae(L,"aria-label",T)},[()=>String(h(ee).id),()=>h(K).length===1||String(h(ee).id)===String(u().value),()=>S.t(`cart.paymentMode.ariaLabel.${h(ee).name.toLowerCase()}`)]),w(ue,ve)}),I(J),ce(()=>{Ae(J,"aria-required",u().required),Ae(J,"aria-invalid",u().errors.length>0)}),w(X,J)},c=X=>{var K=ZD(),J=$(K),G=$(J);r(G),I(J);var q=te(J,2);{var Y=ue=>{var ee=W(),ve=z(ee);He(ve,17,()=>u().options,Gr,(L,ye)=>{var U=zD(),V=$(U),we=te(V);Ke(we,()=>({...h(A),...g,class:p(),type:"radio"}),void 0,void 0,void 0,void 0,!0),I(U),ce(()=>{lr(U,1,Sn(f())),Ae(U,"for",h(E)+h(ye)),se(V,`${h(ye)??""} `)}),Pc(we,()=>u().value,T=>u(u().value=T,!0)),w(L,U)}),w(ue,ee)};fe(q,ue=>{u().options&&ue(Y)})}I(K),w(X,K)};let u=_(e,"field",15),d=_(e,"describedByIds",7),f=_(e,"labelClass",7),p=_(e,"inputClass",7),v=_(e,"host",7),g=Je(e,["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]);const m=vs(v()),b=C(()=>m.value),k={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:s,select:o,radio:c,date:a,file:i,textarea:null,paymentMode:l},O=C(()=>k[u().type]);let E=C(()=>e.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function P(){u().type!=="checkbox"&&u().value&&(h(b)?h(b).validateField(u()):u().validate())}const A=C(()=>({id:h(E),"aria-describedby":d(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:P}));let D=C(()=>S.t(u().label)||u().label);const F="https://cdn.shop.platform.gomus.de/";let N=le(null);_e(()=>{const X=u().value;if(X instanceof File&&X.type.startsWith("image/")){const K=URL.createObjectURL(X);return M(N,K,!0),()=>{URL.revokeObjectURL(K),M(N,null)}}M(N,null)});var B={get field(){return u()},set field(X){u(X),y()},get describedByIds(){return d()},set describedByIds(X){d(X),y()},get labelClass(){return f()},set labelClass(X){f(X),y()},get inputClass(){return p()},set inputClass(X){p(X),y()},get host(){return v()},set host(X){v(X),y()}},H=W(),Z=z(H);{var de=X=>{var K=W(),J=z(K);ke(J,()=>h(O)),w(X,K)};fe(Z,X=>{h(O)&&X(de)})}return w(t,H),ie(B)}Hr(["change"]),oe(zv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var VD=j("<span> </span>"),UD=j("<li> </li>"),BD=j('<ul class="go-field-errors"></ul>'),jD=j("<!> <!> <!>",1);function qD(t,e){ne(e,!0);let r=_(e,"key",7),n=_(e,"required",7,!1),i=_(e,"labelClass",7),s=_(e,"inputClass",7),o=le(Be(hr.createField(r(),n())));const a=vs(e.$$host),l=C(()=>a.value),c=()=>h(o);let u=C(()=>h(o)?[...h(o).errors,...h(o).apiErrors].map(D=>S.t(D)):[]),d=C(()=>h(o)?.description),f=C(()=>h(u).length>0),p=C(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),v=C(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),g=C(()=>[h(d)&&h(p),h(f)&&h(v)].filter(Boolean).join(" ")||void 0);_e(()=>{e.$$host.classList.toggle("go-field",!0),e.$$host.classList.toggle("is-invalid",h(u).length>0)}),e.$$host.dataset.testid=r(),_e(()=>{h(o)&&(h(o).mounted=!0,h(o).value,Ge(()=>{h(o)?.errors.length&&h(l).validateField(h(o))}))});var m={getField:c,get key(){return r()},set key(D){r(D),y()},get required(){return n()},set required(D=!1){n(D),y()},get labelClass(){return i()},set labelClass(D){i(D),y()},get inputClass(){return s()},set inputClass(D){s(D),y()}},b=jD(),k=z(b);zv(k,{get describedByIds(){return h(g)},get labelClass(){return i()},get inputClass(){return s()},host:e.$$host,get field(){return h(o)},set field(D){M(o,D,!0)}});var O=te(k,2);{var E=D=>{var F=VD(),N=$(F,!0);I(F),ce(()=>{Ae(F,"id",h(p)),se(N,h(o).description)}),w(D,F)};fe(O,D=>{h(d)&&D(E)})}var P=te(O,2);{var A=D=>{var F=BD();He(F,21,()=>h(u),Gr,(N,B)=>{var H=UD(),Z=$(H,!0);I(H),ce(()=>se(Z,h(B))),w(N,H)}),I(F),ce(()=>Ae(F,"id",h(v))),w(D,F)};fe(P,D=>{h(f)&&D(A)})}return w(t,b),ie(m)}customElements.define("go-field",oe(qD,{key:{attribute:"key",reflect:!0,type:"String"},required:{attribute:"required",reflect:!0,type:"Boolean"},labelClass:{attribute:"label-class",reflect:!0,type:"String"},inputClass:{attribute:"input-class",reflect:!0,type:"String"}},[],["getField"]));var WD=j("<go-field></go-field>",2);function HD(t,e){ne(e,!0);let r=vs(e.$$host),n=C(()=>r.value),i=C(()=>h(n)?hr.getFormFields(h(n)?.formId):[]);var s=W(),o=z(s);He(o,17,()=>h(i),a=>a.key,(a,l)=>{var c=WD();ce(()=>xi(c,"key",h(l).key)),ce(()=>xi(c,"required",h(l).required)),w(a,c)}),w(t,s),ie()}customElements.define("go-all-fields",oe(HD,{},[],[]));var KD=j('<p aria-hidden="true"> </p>'),GD=j("<li> </li>"),YD=j('<ul class="go-error-feedback-api-errors"></ul>'),JD=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function QD(t,e){ne(e,!0);const r=vs(e.$$host),n=C(()=>r.value);_e(()=>{h(n)?.form?.addEventListener("go-after-validation",()=>{M(o,Tu(h(n)?.fields),!0)})});let i=le(0);setInterval(()=>{M(i,Tu(h(n)?.fields)||0,!0)},100);let s=C(()=>h(i)+(h(n)?.apiErrors?.length||0)),o=le(-1);_e(()=>{e.$$host.classList.toggle("is-invalid",h(s)>0),e.$$host.classList.toggle("go-feedback",!0),e.$$host.setAttribute("data-num-errors",h(s).toString())});var a=JD(),l=$(a),c=$(l);{var u=g=>{var m=Yt();ce(b=>se(m,b),[()=>S.t("forms.errorSummary",{count:h(o)})]),w(g,m)};fe(c,g=>{h(o)>0&&g(u)})}I(l);var d=te(l,2);{var f=g=>{var m=KD(),b=$(m,!0);I(m),ce(k=>se(b,k),[()=>S.t("forms.errorSummary",{count:h(i)})]),w(g,m)};fe(d,g=>{h(i)>0&&g(f)})}var p=te(d,2);{var v=g=>{var m=YD();He(m,21,()=>h(n)?.apiErrors,Gr,(b,k)=>{var O=GD(),E=$(O,!0);I(O),ce(()=>se(E,h(k))),w(b,O)}),I(m),w(g,m)};fe(p,g=>{h(n)&&Lc(h(n).apiErrors)&&h(n).apiErrors.length>0&&g(v)})}I(a),w(t,a),ie()}customElements.define("go-errors-feedback",oe(QD,{},[],[]));var XD=j('<div class="go-form-feedback"><!></div>');function eI(t,e){var r=XD(),n=$(r);Q_(n,e,"default",{}),I(r),w(t,r)}customElements.define("go-form-feedback",oe(eI,{},["default"],[]));function tI(t,e){ne(e,!0);let r=_(e,"buttonClass",7,"");kn(()=>{Ni(e.$$host,"button",{type:"submit",class:r()})});var n={get buttonClass(){return r()},set buttonClass(i=""){r(i),y()}};return ie(n)}customElements.define("go-submit",oe(tI,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var rI=j('<div aria-live="assertive"> </div>');function nI(t,e){ne(e,!0);const r=vs(e.$$host),n=C(()=>r.value);var i=W(),s=z(i);{var o=a=>{var l=rI();let c;var u=$(l,!0);I(l),ce(()=>{c=lr(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":h(n).successMessage}),se(u,h(n)?.successMessage)}),w(a,l)};fe(s,a=>{h(n)?.successMessage&&a(o)})}w(t,i),ie()}customElements.define("go-success-feedback",oe(nI,{},[],[]));var xr="INUMBER",As="IOP1",Cs="IOP2",Os="IOP3",Nn="IVAR",Vi="IVARNAME",Ds="IFUNCALL",Rl="IFUNDEF",Qt="IEXPR",Jd="IEXPREVAL",Ui="IMEMBER",Ll="IENDSTATEMENT",Is="IARRAY";function Le(t,e){this.type=t,this.value=e??0}Le.prototype.toString=function(){switch(this.type){case xr:case As:case Cs:case Os:case Nn:case Vi:case Ll:return this.value;case Ds:return"CALL "+this.value;case Rl:return"DEF "+this.value;case Is:return"ARRAY "+this.value;case Ui:return"."+this.value;default:return"Invalid Instruction"}};function zl(t){return new Le(As,t)}function Fn(t){return new Le(Cs,t)}function Zv(t){return new Le(Os,t)}function Qd(t,e,r,n,i){for(var s=[],o=[],a,l,c,u,d=0;d<t.length;d++){var f=t[d],p=f.type;if(p===xr||p===Vi)Array.isArray(f.value)?s.push.apply(s,Qd(f.value.map(function(v){return new Le(xr,v)}).concat(new Le(Is,f.value.length)),e,r,n,i)):s.push(f);else if(p===Nn&&i.hasOwnProperty(f.value))f=new Le(xr,i[f.value]),s.push(f);else if(p===Cs&&s.length>1)l=s.pop(),a=s.pop(),u=r[f.value],f=new Le(xr,u(a.value,l.value)),s.push(f);else if(p===Os&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),f.value==="?"?s.push(a.value?l.value:c.value):(u=n[f.value],f=new Le(xr,u(a.value,l.value,c.value)),s.push(f));else if(p===As&&s.length>0)a=s.pop(),u=e[f.value],f=new Le(xr,u(a.value)),s.push(f);else if(p===Qt){for(;s.length>0;)o.push(s.shift());o.push(new Le(Qt,Qd(f.value,e,r,n,i)))}else if(p===Ui&&s.length>0)a=s.pop(),s.push(new Le(xr,a.value[f.value]));else{for(;s.length>0;)o.push(s.shift());o.push(f)}}for(;s.length>0;)o.push(s.shift());return o}function Vv(t,e,r){for(var n=[],i=0;i<t.length;i++){var s=t[i],o=s.type;if(o===Nn&&s.value===e)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===As?c=zl(l.value):l.type===Cs?c=Fn(l.value):l.type===Os?c=Zv(l.value):c=new Le(l.type,l.value),n.push(c)}else o===Qt?n.push(new Le(Qt,Vv(s.value,e,r))):n.push(s)}return n}function Bi(t,e,r){var n=[],i,s,o,a,l,c;if(Xd(t))return Rn(t,r);for(var u=t.length,d=0;d<u;d++){var f=t[d],p=f.type;if(p===xr||p===Vi)n.push(f.value);else if(p===Cs)s=n.pop(),i=n.pop(),f.value==="and"?n.push(i?!!Bi(s,e,r):!1):f.value==="or"?n.push(i?!0:!!Bi(s,e,r)):f.value==="="?(a=e.binaryOps[f.value],n.push(a(i,Bi(s,e,r),r))):(a=e.binaryOps[f.value],n.push(a(Rn(i,r),Rn(s,r))));else if(p===Os)o=n.pop(),s=n.pop(),i=n.pop(),f.value==="?"?n.push(Bi(i?s:o,e,r)):(a=e.ternaryOps[f.value],n.push(a(Rn(i,r),Rn(s,r),Rn(o,r))));else if(p===Nn)if(f.value in e.functions)n.push(e.functions[f.value]);else if(f.value in e.unaryOps&&e.parser.isOperatorEnabled(f.value))n.push(e.unaryOps[f.value]);else{var v=r[f.value];if(v!==void 0)n.push(v);else throw new Error("undefined variable: "+f.value)}else if(p===As)i=n.pop(),a=e.unaryOps[f.value],n.push(a(Rn(i,r)));else if(p===Ds){for(c=f.value,l=[];c-- >0;)l.unshift(Rn(n.pop(),r));if(a=n.pop(),a.apply&&a.call)n.push(a.apply(void 0,l));else throw new Error(a+" is not a function")}else if(p===Rl)n.push((function(){for(var g=n.pop(),m=[],b=f.value;b-- >0;)m.unshift(n.pop());var k=n.pop(),O=function(){for(var E=Object.assign({},r),P=0,A=m.length;P<A;P++)E[m[P]]=arguments[P];return Bi(g,e,E)};return Object.defineProperty(O,"name",{value:k,writable:!1}),r[k]=O,O})());else if(p===Qt)n.push(iI(f,e));else if(p===Jd)n.push(f);else if(p===Ui)i=n.pop(),n.push(i[f.value]);else if(p===Ll)n.pop();else if(p===Is){for(c=f.value,l=[];c-- >0;)l.unshift(n.pop());n.push(l)}else throw new Error("invalid Expression")}if(n.length>1)throw new Error("invalid Expression (parity)");return n[0]===0?0:Rn(n[0],r)}function iI(t,e,r){return Xd(t)?t:{type:Jd,value:function(n){return Bi(t.value,e,n)}}}function Xd(t){return t&&t.type===Jd}function Rn(t,e){return Xd(t)?t.value(e):t}function ef(t,e){for(var r=[],n,i,s,o,a,l,c=0;c<t.length;c++){var u=t[c],d=u.type;if(d===xr)typeof u.value=="number"&&u.value<0?r.push("("+u.value+")"):Array.isArray(u.value)?r.push("["+u.value.map(Uv).join(", ")+"]"):r.push(Uv(u.value));else if(d===Cs)i=r.pop(),n=r.pop(),o=u.value,e?o==="^"?r.push("Math.pow("+n+", "+i+")"):o==="and"?r.push("(!!"+n+" && !!"+i+")"):o==="or"?r.push("(!!"+n+" || !!"+i+")"):o==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):o==="=="?r.push("("+n+" === "+i+")"):o==="!="?r.push("("+n+" !== "+i+")"):o==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+o+" "+i+")"):o==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+o+" "+i+")");else if(d===Os)if(s=r.pop(),i=r.pop(),n=r.pop(),o=u.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(d===Nn||d===Vi)r.push(u.value);else if(d===As)n=r.pop(),o=u.value,o==="-"||o==="+"?r.push("("+o+n+")"):e?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(d===Ds){for(l=u.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(d===Rl){for(i=r.pop(),l=u.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),e?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(d===Ui)n=r.pop(),r.push(n+"."+u.value);else if(d===Is){for(l=u.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(d===Qt)r.push("("+ef(u.value,e)+")");else if(d!==Ll)throw new Error("invalid Expression")}return r.length>1&&(e?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Uv(t){return typeof t=="string"?JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):t}function Ps(t,e){for(var r=0;r<t.length;r++)if(t[r]===e)return!0;return!1}function tf(t,e,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<t.length;s++){var o=t[s];o.type===Nn||o.type===Vi?!n&&!Ps(e,o.value)?e.push(o.value):(i!==null&&(Ps(e,i)||e.push(i)),i=o.value):o.type===Ui&&n&&i!==null?i+="."+o.value:o.type===Qt?tf(o.value,e,r):i!==null&&(Ps(e,i)||e.push(i),i=null)}i!==null&&!Ps(e,i)&&e.push(i)}function Vr(t,e){this.tokens=t,this.parser=e,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.functions=e.functions}Vr.prototype.simplify=function(t){return t=t||{},new Vr(Qd(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,t),this.parser)},Vr.prototype.substitute=function(t,e){return e instanceof Vr||(e=this.parser.parse(String(e))),new Vr(Vv(this.tokens,t,e),this.parser)},Vr.prototype.evaluate=function(t){return t=t||{},Bi(this.tokens,this,t)},Vr.prototype.toString=function(){return ef(this.tokens,!1)},Vr.prototype.symbols=function(t){t=t||{};var e=[];return tf(this.tokens,e,t),e},Vr.prototype.variables=function(t){t=t||{};var e=[];tf(this.tokens,e,t);var r=this.functions;return e.filter(function(n){return!(n in r)})},Vr.prototype.toJSFunction=function(t,e){var r=this,n=new Function(t,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+ef(this.simplify(e).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var qo="TEOF",Qe="TOP",Zl="TNUMBER",Bv="TSTRING",Ln="TPAREN",Ms="TBRACKET",Vl="TCOMMA",rf="TNAME",nf="TSEMICOLON";function jv(t,e,r){this.type=t,this.value=e,this.index=r}jv.prototype.toString=function(){return this.type+": "+this.value};function ct(t,e){this.pos=0,this.current=null,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.consts=t.consts,this.expression=e,this.savedPosition=0,this.savedCurrent=null,this.options=t.options,this.parser=t}ct.prototype.newToken=function(t,e,r){return new jv(t,e,r??this.pos)},ct.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},ct.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},ct.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(qo,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},ct.prototype.isString=function(){var t=!1,e=this.pos,r=this.expression.charAt(e);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,e+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(e+1,n);this.current=this.newToken(Bv,this.unescape(i),e),t=!0;break}n=this.expression.indexOf(r,n+1)}return t},ct.prototype.isParen=function(){var t=this.expression.charAt(this.pos);return t==="("||t===")"?(this.current=this.newToken(Ln,t),this.pos++,!0):!1},ct.prototype.isBracket=function(){var t=this.expression.charAt(this.pos);return(t==="["||t==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(Ms,t),this.pos++,!0):!1},ct.prototype.isComma=function(){var t=this.expression.charAt(this.pos);return t===","?(this.current=this.newToken(Vl,","),this.pos++,!0):!1},ct.prototype.isSemicolon=function(){var t=this.expression.charAt(this.pos);return t===";"?(this.current=this.newToken(nf,";"),this.pos++,!0):!1},ct.prototype.isConst=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(n in this.consts)return this.current=this.newToken(Zl,this.consts[n]),this.pos+=n.length,!0}return!1},ct.prototype.isNamedOp=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Qe,n),this.pos+=n.length,!0}return!1},ct.prototype.isName=function(){for(var t=this.pos,e=t,r=!1;e<this.expression.length;e++){var n=this.expression.charAt(e);if(n.toUpperCase()===n.toLowerCase()){if(e===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(e===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(t,e);return this.current=this.newToken(rf,i),this.pos+=i.length,!0}return!1},ct.prototype.isWhitespace=function(){for(var t=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===`
10
+ `||e==="\r")&&(t=!0,this.pos++,!(this.pos>=this.expression.length));)e=this.expression.charAt(this.pos);return t};var sI=/^[0-9a-f]{4}$/i;ct.prototype.unescape=function(t){var e=t.indexOf("\\");if(e<0)return t;for(var r=t.substring(0,e);e>=0;){var n=t.charAt(++e);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
11
+ `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=t.substring(e+1,e+5);sI.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),e+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++e;var s=t.indexOf("\\",e);r+=t.substring(e,s<0?t.length:s),e=s}return r},ct.prototype.isComment=function(){var t=this.expression.charAt(this.pos);return t==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},ct.prototype.isRadixInteger=function(){var t=this.pos;if(t>=this.expression.length-2||this.expression.charAt(t)!=="0")return!1;++t;var e,r;if(this.expression.charAt(t)==="x")e=16,r=/^[0-9a-f]$/i,++t;else if(this.expression.charAt(t)==="b")e=2,r=/^[01]$/i,++t;else return!1;for(var n=!1,i=t;t<this.expression.length;){var s=this.expression.charAt(t);if(r.test(s))t++,n=!0;else break}return n&&(this.current=this.newToken(Zl,parseInt(this.expression.substring(i,t),e)),this.pos=t),n},ct.prototype.isNumber=function(){for(var t=!1,e=this.pos,r=e,n=e,i=!1,s=!1,o;e<this.expression.length&&(o=this.expression.charAt(e),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,e++,t=s;if(t&&(n=e),o==="e"||o==="E"){e++;for(var a=!0,l=!1;e<this.expression.length;){if(o=this.expression.charAt(e),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;e++}l||(e=n)}return t?(this.current=this.newToken(Zl,parseFloat(this.expression.substring(r,e))),this.pos=e):this.pos=n,t},ct.prototype.isOperator=function(){var t=this.pos,e=this.expression.charAt(this.pos);if(e==="+"||e==="-"||e==="*"||e==="/"||e==="%"||e==="^"||e==="?"||e===":"||e===".")this.current=this.newToken(Qe,e);else if(e==="∙"||e==="•")this.current=this.newToken(Qe,"*");else if(e===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,">="),this.pos++):this.current=this.newToken(Qe,">");else if(e==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,"<="),this.pos++):this.current=this.newToken(Qe,"<");else if(e==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Qe,"||"),this.pos++;else return!1;else if(e==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,"=="),this.pos++):this.current=this.newToken(Qe,e);else if(e==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,"!="),this.pos++):this.current=this.newToken(Qe,e);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=t,!1)},ct.prototype.isOperatorEnabled=function(t){return this.parser.isOperatorEnabled(t)},ct.prototype.getCoordinates=function(){var t=0,e,r=-1;do t++,e=this.pos-r,r=this.expression.indexOf(`
12
+ `,r+1);while(r>=0&&r<this.pos);return{line:t,column:e}},ct.prototype.parseError=function(t){var e=this.getCoordinates();throw new Error("parse error ["+e.line+":"+e.column+"]: "+t)};function tt(t,e,r){this.parser=t,this.tokens=e,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}tt.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},tt.prototype.tokenMatches=function(t,e){return typeof e>"u"?!0:Array.isArray(e)?Ps(e,t.value):typeof e=="function"?e(t):t.value===e},tt.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},tt.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},tt.prototype.accept=function(t,e){return this.nextToken.type===t&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1},tt.prototype.expect=function(t,e){if(!this.accept(t,e)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(e||t))}},tt.prototype.parseAtom=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.accept(rf)||this.accept(Qe,r))t.push(new Le(Nn,this.current.value));else if(this.accept(Zl))t.push(new Le(xr,this.current.value));else if(this.accept(Bv))t.push(new Le(xr,this.current.value));else if(this.accept(Ln,"("))this.parseExpression(t),this.expect(Ln,")");else if(this.accept(Ms,"["))if(this.accept(Ms,"]"))t.push(new Le(Is,0));else{var n=this.parseArrayList(t);t.push(new Le(Is,n))}else throw new Error("unexpected "+this.nextToken)},tt.prototype.parseExpression=function(t){var e=[];this.parseUntilEndStatement(t,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(t,e)&&this.pushExpression(t,e))},tt.prototype.pushExpression=function(t,e){for(var r=0,n=e.length;r<n;r++)t.push(e[r])},tt.prototype.parseUntilEndStatement=function(t,e){return this.accept(nf)?(this.nextToken&&this.nextToken.type!==qo&&!(this.nextToken.type===Ln&&this.nextToken.value===")")&&e.push(new Le(Ll)),this.nextToken.type!==qo&&this.parseExpression(e),t.push(new Le(Qt,e)),!0):!1},tt.prototype.parseArrayList=function(t){for(var e=0;!this.accept(Ms,"]");)for(this.parseExpression(t),++e;this.accept(Vl);)this.parseExpression(t),++e;return e},tt.prototype.parseVariableAssignmentExpression=function(t){for(this.parseConditionalExpression(t);this.accept(Qe,"=");){var e=t.pop(),r=[],n=t.length-1;if(e.type===Ds){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=e.value+1;i<s;i++){var o=n-i;t[o].type===Nn&&(t[o]=new Le(Vi,t[o].value))}this.parseVariableAssignmentExpression(r),t.push(new Le(Qt,r)),t.push(new Le(Rl,e.value));continue}if(e.type!==Nn&&e.type!==Ui)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),t.push(new Le(Vi,e.value)),t.push(new Le(Qt,r)),t.push(Fn("="))}},tt.prototype.parseConditionalExpression=function(t){for(this.parseOrExpression(t);this.accept(Qe,"?");){var e=[],r=[];this.parseConditionalExpression(e),this.expect(Qe,":"),this.parseConditionalExpression(r),t.push(new Le(Qt,e)),t.push(new Le(Qt,r)),t.push(Zv("?"))}},tt.prototype.parseOrExpression=function(t){for(this.parseAndExpression(t);this.accept(Qe,"or");){var e=[];this.parseAndExpression(e),t.push(new Le(Qt,e)),t.push(Fn("or"))}},tt.prototype.parseAndExpression=function(t){for(this.parseComparison(t);this.accept(Qe,"and");){var e=[];this.parseComparison(e),t.push(new Le(Qt,e)),t.push(Fn("and"))}};var oI=["==","!=","<","<=",">=",">","in"];tt.prototype.parseComparison=function(t){for(this.parseAddSub(t);this.accept(Qe,oI);){var e=this.current;this.parseAddSub(t),t.push(Fn(e.value))}};var aI=["+","-","||"];tt.prototype.parseAddSub=function(t){for(this.parseTerm(t);this.accept(Qe,aI);){var e=this.current;this.parseTerm(t),t.push(Fn(e.value))}};var lI=["*","/","%"];tt.prototype.parseTerm=function(t){for(this.parseFactor(t);this.accept(Qe,lI);){var e=this.current;this.parseFactor(t),t.push(Fn(e.value))}},tt.prototype.parseFactor=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.save(),this.accept(Qe,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===Ln&&this.nextToken.value==="("){this.restore(),this.parseExponential(t);return}else if(this.nextToken.type===nf||this.nextToken.type===Vl||this.nextToken.type===qo||this.nextToken.type===Ln&&this.nextToken.value===")"){this.restore(),this.parseAtom(t);return}}var n=this.current;this.parseFactor(t),t.push(zl(n.value))}else this.parseExponential(t)},tt.prototype.parseExponential=function(t){for(this.parsePostfixExpression(t);this.accept(Qe,"^");)this.parseFactor(t),t.push(Fn("^"))},tt.prototype.parsePostfixExpression=function(t){for(this.parseFunctionCall(t);this.accept(Qe,"!");)t.push(zl("!"))},tt.prototype.parseFunctionCall=function(t){var e=this.tokens.unaryOps;function r(s){return s.value in e}if(this.accept(Qe,r)){var n=this.current;this.parseAtom(t),t.push(zl(n.value))}else for(this.parseMemberExpression(t);this.accept(Ln,"(");)if(this.accept(Ln,")"))t.push(new Le(Ds,0));else{var i=this.parseArgumentList(t);t.push(new Le(Ds,i))}},tt.prototype.parseArgumentList=function(t){for(var e=0;!this.accept(Ln,")");)for(this.parseExpression(t),++e;this.accept(Vl);)this.parseExpression(t),++e;return e},tt.prototype.parseMemberExpression=function(t){for(this.parseAtom(t);this.accept(Qe,".")||this.accept(Ms,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(rf),t.push(new Le(Ui,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(t),this.expect(Ms,"]"),t.push(Fn("["))}else throw new Error("unexpected symbol: "+e.value)}};function cI(t,e){return Number(t)+Number(e)}function uI(t,e){return t-e}function dI(t,e){return t*e}function fI(t,e){return t/e}function hI(t,e){return t%e}function pI(t,e){return Array.isArray(t)&&Array.isArray(e)?t.concat(e):""+t+e}function mI(t,e){return t===e}function gI(t,e){return t!==e}function vI(t,e){return t>e}function yI(t,e){return t<e}function _I(t,e){return t>=e}function bI(t,e){return t<=e}function wI(t,e){return!!(t&&e)}function kI(t,e){return!!(t||e)}function SI(t,e){return Ps(e,t)}function xI(t){return(Math.exp(t)-Math.exp(-t))/2}function EI(t){return(Math.exp(t)+Math.exp(-t))/2}function TI(t){return t===1/0?1:t===-1/0?-1:(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))}function AI(t){return t===-1/0?t:Math.log(t+Math.sqrt(t*t+1))}function CI(t){return Math.log(t+Math.sqrt(t*t-1))}function OI(t){return Math.log((1+t)/(1-t))/2}function qv(t){return Math.log(t)*Math.LOG10E}function DI(t){return-t}function II(t){return!t}function PI(t){return t<0?Math.ceil(t):Math.floor(t)}function MI(t){return Math.random()*(t||1)}function Wv(t){return of(t+1)}function $I(t){return isFinite(t)&&t===Math.round(t)}var NI=4.7421875,sf=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function of(t){var e,r;if($I(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var n=t-2,i=t-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*of(1-t));if(t>=171.35)return 1/0;if(t>85){var s=t*t,o=s*t,a=o*t,l=a*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*t))}--t,r=sf[0];for(var c=1;c<sf.length;++c)r+=sf[c]/(t+c);return e=t+NI+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*r}function FI(t){return Array.isArray(t)?t.length:String(t).length}function Hv(){for(var t=0,e=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;e<n?(i=e/n,t=t*i*i+1,e=n):n>0?(i=n/e,t+=i*i):t+=n}return e===1/0?1/0:e*Math.sqrt(t)}function Kv(t,e,r){return t?e:r}function RI(t,e){return typeof e>"u"||+e==0?Math.round(t):(t=+t,e=-+e,isNaN(t)||!(typeof e=="number"&&e%1===0)?NaN:(t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function LI(t,e,r){return r&&(r[t]=e),e}function zI(t,e){return t[e|0]}function ZI(t){return arguments.length===1&&Array.isArray(t)?Math.max.apply(Math,t):Math.max.apply(Math,arguments)}function VI(t){return arguments.length===1&&Array.isArray(t)?Math.min.apply(Math,t):Math.min.apply(Math,arguments)}function UI(t,e){if(typeof t!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(r,n){return t(r,n)})}function BI(t,e,r){if(typeof t!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return t(n,i,s)},e)}function jI(t,e){if(typeof t!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(r,n){return t(r,n)})}function qI(t,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(t)}function WI(t,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(t)}function HI(t){return(t>0)-(t<0)||+t}var Gv=1/3;function KI(t){return t<0?-Math.pow(-t,Gv):Math.pow(t,Gv)}function GI(t){return Math.exp(t)-1}function YI(t){return Math.log(1+t)}function JI(t){return Math.log(t)/Math.LN2}function ji(t){this.options=t||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||xI,cosh:Math.cosh||EI,tanh:Math.tanh||TI,asinh:Math.asinh||AI,acosh:Math.acosh||CI,atanh:Math.atanh||OI,sqrt:Math.sqrt,cbrt:Math.cbrt||KI,log:Math.log,log2:Math.log2||JI,ln:Math.log,lg:Math.log10||qv,log10:Math.log10||qv,expm1:Math.expm1||GI,log1p:Math.log1p||YI,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||PI,"-":DI,"+":Number,exp:Math.exp,not:II,length:FI,"!":Wv,sign:Math.sign||HI},this.binaryOps={"+":cI,"-":uI,"*":dI,"/":fI,"%":hI,"^":Math.pow,"||":pI,"==":mI,"!=":gI,">":vI,"<":yI,">=":_I,"<=":bI,and:wI,or:kI,in:SI,"=":LI,"[":zI},this.ternaryOps={"?":Kv},this.functions={random:MI,fac:Wv,min:VI,max:ZI,hypot:Math.hypot||Hv,pyt:Math.hypot||Hv,pow:Math.pow,atan2:Math.atan2,if:Kv,gamma:of,roundTo:RI,map:UI,fold:BI,filter:jI,indexOf:qI,join:WI},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}ji.prototype.parse=function(t){var e=[],r=new tt(this,new ct(this,t),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(e),r.expect(qo,"EOF"),new Vr(e,this)},ji.prototype.evaluate=function(t,e){return this.parse(t).evaluate(e)};var Yv=new ji;ji.parse=function(t){return Yv.parse(t)},ji.evaluate=function(t,e){return Yv.parse(t).evaluate(e)};var Jv={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function QI(t){return Jv.hasOwnProperty(t)?Jv[t]:t}ji.prototype.isOperatorEnabled=function(t){var e=QI(t),r=this.options.operators||{};return!(e in r)||!!r[e]};const XI=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,eP=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,tP=/(__optional\("[^"]+"\))\.length\b/g,rP=new ji({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Qv=new Map;function nP(t){return t.replace(XI,e=>e.includes("?.")?`__optional("${e.replace(/\?\./g,".")}")`:e).replace(eP,(e,r)=>`__length(${r})`).replace(tP,(e,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function iP(t){const e=Qv.get(t);if(e)return e;const r=rP.parse(nP(t));return Qv.set(t,r),r}function sP(t,e){if(t==null||typeof t!="string")return t;const r={data:e,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=iP(t);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${t}) in go-if: ${n.message}`)}}const Xv=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price"],oP={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.selectedDate)return;const{quotas:e}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));S.capacityManager.addQuotas(e)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTimeslot)return;const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));S.capacityManager.addQuotas(n);const i=ci(r,e.selectedTime),s=li(i,e.selectedTime);for(const o of s)t.preCart.addItem(xt(o,{time:e.selectedTime}))}},aP={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate)return;const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));S.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=ci(r,s),a=li(o,s);for(const l of a)t.preCart.addItem(xt(l,{time:s}))}},lP={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e)return;const r=await S.asyncFetch(()=>S.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));for(const n of Object.values(r))t.preCart.addItem(xt(ja(n)))}},cP={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!(await S.asyncFetch(()=>S.getEvent(e.eventIds[0]))).tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),date_id:t.dateId}));S.capacityManager.addQuotas(i);const s=ci(n,e.selectedTime),o=li(s,e.selectedTime);for(const a of o)t.preCart.addItem(xt(a,{time:e.selectedTime}))}},uP={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate)return;const r=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:e.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=ci(n,o),l=li(a,o);for(const c of l)t.preCart.addItem(xt(c,{time:o}))}},dP={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!e.selectedTimeslot)return;const r=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=ci(n,e.selectedTime),o=li(s,e.selectedTime);for(const a of o)t.preCart.addItem(xt(a,{time:e.selectedTime}))}},fP={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||t.dateId===void 0)return;const r=await S.asyncFetch(()=>S.getEventDetailsOnDate(e.eventIds[0],t.dateId));if(r.prices?.length){for(const n of r.prices){const i=du(n,r.id,{event_title:r.event_title});t.preCart.addItem(xt(i,{time:r.start_time}))}r.seats&&S.capacityManager.addSeats(r.id,r.seats)}}},hP=7200*1e3;function Ul(t,e,r){const n=Date.parse(r);return t.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===e&&o>=n&&o<=n+hP&&(i.seats?.available??0)>0})}async function Bl(t){if(!t?.selectedDate)return;const{quotas:e}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));S.capacityManager.addQuotas(e)}const pP={"ticket:timeslot":oP,"ticket:day":aP,"ticket:annual":lP,"event:admission":cP,"event:admission:day":uP,"event:admission:timeslot":dP,"event:price":fP,"events:admission":{name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>Bl(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=Ul(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=ci(o,i.start_time),c=li(l,i.start_time);for(const u of c)t.preCart.addItem(xt(u,{time:i.start_time}))}}},"events:admission:day":{name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>Bl(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=Ul(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=Object.values(a)[0],c=l?Object.keys(l.capacities)[0]:i.start_time,u=ci(o,c),d=li(u,c);for(const f of d)t.preCart.addItem(xt(f,{time:c}))}}},"events:admission:timeslot":{name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>Bl(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=Ul(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=ci(o,i.start_time),c=li(l,i.start_time);for(const u of c)t.preCart.addItem(xt(u,{time:i.start_time}))}}},"events:price":{name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>Bl(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=Ul(r,e.selectedDate.toString(),e.selectedTime),i=t.query;for(const s of n){if(!s.prices?.length)continue;const o=i?s.prices.filter(a=>a.title?.includes(i)):s.prices;for(const a of o){const l=du(a,s.id,{event_title:s.event_title});t.preCart.addItem(xt(l,{time:s.start_time}))}s.seats&&S.capacityManager.addSeats(s.id,s.seats)}}}};function qi(t){const e=pP[t];return e||console.warn(`[ticket-selection] Unknown filter "${t}". Valid filters: ${Xv.join(", ")}`),e}const ey=Xv;let mP=0;class gP{uid=mP++;#e=le();get filters(){return h(this.#e)}set filters(e){M(this.#e,e,!0)}#t=le();get eventIds(){return h(this.#t)}set eventIds(e){M(this.#t,e,!0)}#r=le();get museumIds(){return h(this.#r)}set museumIds(e){M(this.#r,e,!0)}#n=le();get exhibitionIds(){return h(this.#n)}set exhibitionIds(e){M(this.#n,e,!0)}#i=le();get ticketIds(){return h(this.#i)}set ticketIds(e){M(this.#i,e,!0)}#s=le();get ticketGroupIds(){return h(this.#s)}set ticketGroupIds(e){M(this.#s,e,!0)}#a=le();get selectedDate(){return h(this.#a)}set selectedDate(e){M(this.#a,e,!0)}#o=le();get selectedTimeslot(){return h(this.#o)}set selectedTimeslot(e){M(this.#o,e,!0)}#l=C(()=>this.selectedTimeslot);get selectedTime(){return h(this.#l)}set selectedTime(e){M(this.#l,e)}#c=le(Be([]));get ticketSegments(){return h(this.#c)}set ticketSegments(e){M(this.#c,e,!0)}#d=C(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return h(this.#d)}set preCarts(e){M(this.#d,e)}#u=le();get timeslotDetails(){return h(this.#u)}set timeslotDetails(e){M(this.#u,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>qi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>qi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>qi(e).isTicketsVisible(this))}}const ty="go-ticket-selection",vP=fs(ty),zn=hs(ty);function yP(t,e){ne(e,!0);let r=_(e,"when",7),n=_(e,"then",7,"show");const i=zn(e.$$host),s=C(()=>i.value),o=J0(e.$$host),a=C(()=>o.value),l=vs(e.$$host),c=C(()=>l.value),u=ys(e.$$host),d=C(()=>u.value);let f=C(()=>({ticketSelection:h(s),personalizationDetails:h(a),formData:h(c)?.formData,cart:S.cart,cartView:h(d)}));const p=k=>{M(f,k)},v=()=>h(f);let g=C(()=>sP(r(),h(f))),m=null;_e(()=>{const k=e.$$host;if(h(g)&&n()==="show")m&&(k.appendChild(m),m=null);else if(!m&&k.childNodes.length>0)for(m=document.createDocumentFragment();k.firstChild;)m.appendChild(k.firstChild)});var b={_setData:p,_getData:v,get when(){return r()},set when(k){r(k),y()},get then(){return n()},set then(k="show"){n(k),y()}};return ie(b)}customElements.define("go-if",oe(yP,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function ry(t,e){ne(e,!0);let r=_(e,"apiUrl",7),n=_(e,"shopDomain",7),i=_(e,"locale",7);i(i()||localStorage.getItem("lang")||"en"),_e(()=>{(n()!==S.shopDomain||r()!==S.apiUrl||i()!==S.locale)&&(S.load(r(),n(),i()),console.warn("shop loaded due to prop change"))});var s={get apiUrl(){return r()},set apiUrl(o){r(o),y()},get shopDomain(){return n()},set shopDomain(o){n(o),y()},get locale(){return i()},set locale(o){i(o),y()}};return ie(s)}customElements.define("gomus-init",oe(ry,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function _P(t,e){ne(e,!0);let r=_(e,"apiDomain",7),n=_(e,"shopDomain",7),i=_(e,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),y()},get shopDomain(){return n()},set shopDomain(a){n(a),y()},get locale(){return i()},set locale(a){i(a),y()}};return ry(t,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ie(o)}customElements.define("go-init",oe(_P,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function bP(t,e){ne(e,!0);const r=_(e,"to",7),n=C(()=>ot.config.urls[r()]),i=Ni(e.$$host,"a");_e(()=>{if(!h(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",h(n)())}),i.addEventListener("click",o=>{if(o.preventDefault(),!ot.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}ot.config.navigateTo(ot.config.urls[r()]())});var s={get to(){return r()},set to(o){r(o),y()}};return ie(s)}customElements.define("go-link",oe(bP,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));class wP{#e=le();get token(){return h(this.#e)}set token(e){M(this.#e,e,!0)}constructor(e){this.token=e}get order(){return this.token?oc(S.order(this.token)):void 0}downloadLink(e,r){if(this.order?.is_valid)switch(e.type){case"Event":return`${S.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?ot.config.urls.annualTicketPersonalizationList?.()?ot.config.urls.annualTicketPersonalizationList(this.token):S.urls?.annualTicketPersonalizationList(this.token):`${S.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}&barcode_id=${r}`}}}const ny="go-order-details",kP=fs(ny),iy=hs(ny);function SP(t,e){ne(e,!0);let r=_(e,"token",7);const n=new wP(r());kP(e.$$host,n),kn(()=>{S.cart.clearItems(),S.auth.isGuest()&&S.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return ie(i)}customElements.define("go-order",oe(SP,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var xP=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),EP=j('<br/> <span class="go-order-item-quantities"> </span>',1),TP=j('<a aria-label="iCal link"> </a>'),AP=j('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function sy(t,e){ne(e,!0);let r=_(e,"item",7),n=_(e,"orderDetails",7);var i={get item(){return r()},set item(P){r(P),y()},get orderDetails(){return n()},set orderDetails(P){n(P),y()}},s=AP(),o=$(s),a=$(o),l=te($(a),2),c=$(l),u=$(c,!0);I(c);var d=te(c,2);{var f=P=>{var A=xP(),D=z(A),F=$(D,!0);I(D);var N=te(D,2),B=$(N,!0);I(N),ce((H,Z)=>{se(F,H),se(B,Z)},[()=>ko(r().attributes.start_time,{month:"numeric",day:"numeric"},S.locale),()=>wo(r().attributes.start_time)]),w(P,A)};fe(d,P=>{r().attributes.start_time&&P(f)})}var p=te(d,2);He(p,17,()=>r().attributes.quantities,P=>P.id,(P,A)=>{var D=EP(),F=te(z(D),2),N=$(F);I(F),ce(()=>se(N,`${h(A).quantity??""} x ${h(A).title??""}`)),w(P,D)});var v=te(p,2),g=$(v,!0);I(v),I(l);var m=te(l,2),b=$(m,!0);I(m);var k=te(m,4),O=$(k);{var E=P=>{var A=TP(),D=$(A,!0);I(A),ce(F=>{Ae(A,"href",S.apiUrl+r().attributes.ical_url),se(D,F)},[()=>S.t("common.calendar")]),w(P,A)};fe(O,P=>{r().attributes.ical_url&&P(E)})}return I(k),I(a),I(o),I(s),ce((P,A,D)=>{se(u,r().attributes.title),Ae(v,"href",P),se(g,A),se(b,D)},[()=>n().downloadLink(r()),()=>S.t("common.download"),()=>Ba(r().price_cents)]),w(t,s),ie(i)}oe(sy,{item:{},orderDetails:{}},[],[],{mode:"open"});var CP=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),OP=j('<span class="go-cart-item-date"> </span>'),DP=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),IP=j('<br/> <a class="go-ticket-personalization"> </a>',1),PP=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),MP=j('<a aria-label="iCal link"> </a>'),$P=j('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),NP=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),FP=j('<a class="go-ticket-personalization"> </a>'),RP=j('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function oy(t,e){ne(e,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${S.locale}.svg`;let n=_(e,"item",7),i=_(e,"orderDetails",7);var s={get item(){return n()},set item(u){n(u),y()},get orderDetails(){return i()},set orderDetails(u){i(u),y()}},o=W(),a=z(o);{var l=u=>{var d=W(),f=z(d);He(f,17,()=>({length:n().attributes.quantity}),Gr,(p,v,g)=>{var m=$P(),b=$(m),k=$(b),O=$(k);O.textContent="1";var E=te(O,2),P=$(E),A=$(P,!0);I(P);var D=te(P,2);{var F=q=>{const Y=C(()=>n().attributes.barcodes[g]?.id);var ue=DP(),ee=z(ue);{var ve=V=>{var we=CP(),T=z(we),Xe=$(T,!0);I(T);var Ze=te(T,2),We=$(Ze,!0);I(Ze),ce((yt,Ve)=>{se(Xe,yt),se(We,Ve)},[()=>ko(n().attributes.start_time,{month:"numeric",day:"numeric"},S.locale),()=>wo(n().attributes.start_time)]),w(V,we)},L=V=>{var we=W(),T=z(we);{var Xe=Ze=>{var We=OP(),yt=$(We,!0);I(We),ce(Ve=>se(yt,Ve),[()=>ko(n().attributes.start_time,{month:"numeric",day:"numeric"},S.locale)]),w(Ze,We)};fe(T,Ze=>{n().attributes.ticket_type==="normal"&&Ze(Xe)},!0)}w(V,we)};fe(ee,V=>{n().attributes.ticket_type==="time_slot"?V(ve):V(L,!1)})}var ye=te(ee,4),U=$(ye,!0);I(ye),ce((V,we)=>{Ae(ye,"href",V),se(U,we)},[()=>i().downloadLink(n(),h(Y)),()=>S.t("common.download")]),w(q,ue)},N=q=>{var Y=IP(),ue=te(z(Y),2),ee=$(ue,!0);I(ue),ce((ve,L)=>{Ae(ue,"href",ve),se(ee,L)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),w(q,Y)};fe(D,q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?q(F):q(N,!1)})}I(E);var B=te(E,2),H=$(B,!0);I(B);var Z=te(B,2),de=$(Z);{var X=q=>{var Y=PP(),ue=$(Y);I(Y),ce(()=>{Ae(Y,"href",S.apiUrl+n().attributes.barcodes[g]?.passbook_url),Ae(ue,"src",r)}),w(q,Y)};fe(de,q=>{n().attributes.barcodes[g]&&n().attributes.barcodes[g]?.passbook_url&&q(X)})}I(Z);var K=te(Z,2),J=$(K);{var G=q=>{var Y=MP(),ue=$(Y,!0);I(Y),ce(ee=>{Ae(Y,"href",S.apiUrl+n().attributes.ical_url),se(ue,ee)},[()=>S.t("common.calendar")]),w(q,Y)};fe(J,q=>{n().attributes.ical_url&&q(G)})}I(K),I(k),I(b),I(m),ce(q=>{se(A,n().attributes.title),se(H,q)},[()=>Ba(n().price_cents)]),w(p,m)}),w(u,d)},c=u=>{var d=RP(),f=$(d),p=$(f),v=$(p),g=$(v,!0);I(v);var m=te(v,2),b=$(m),k=$(b,!0);I(b);var O=te(b,2);{var E=F=>{var N=NP(),B=$(N,!0);I(N),ce((H,Z)=>{Ae(N,"href",H),se(B,Z)},[()=>i().downloadLink(n()),()=>S.t("common.download")]),w(F,N)},P=F=>{var N=FP(),B=$(N,!0);I(N),ce((H,Z)=>{Ae(N,"href",H),se(B,Z)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),w(F,N)};fe(O,F=>{n().attributes.is_voucher?F(E):F(P,!1)})}I(m);var A=te(m,2),D=$(A,!0);I(A),Mt(2),I(p),I(f),I(d),ce(F=>{se(g,n().attributes.quantity),se(k,n().attributes.title),se(D,F)},[()=>Ba(n().price_cents)]),w(u,d)};fe(a,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(l):u(c,!1)})}return w(t,o),ie(s)}oe(oy,{item:{},orderDetails:{}},[],[],{mode:"open"});var LP=j('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function zP(t,e){ne(e,!0);const r=iy(e.$$host),n=C(()=>r.value);let i=C(()=>h(n)?.order);var s=W(),o=z(s);{var a=l=>{var c=LP(),u=$(c),d=$(u),f=$(d),p=$(f,!0);I(f);var v=te(f,2),g=$(v,!0);I(v);var m=te(v,2),b=$(m,!0);I(m),Mt(2),I(d),I(u);var k=te(u,2);He(k,17,()=>h(i).items,D=>D.id,(D,F)=>{var N=W(),B=z(N);{var H=de=>{oy(de,{get item(){return h(F)},get orderDetails(){return h(n)}})},Z=de=>{var X=W(),K=z(X);{var J=G=>{sy(G,{get item(){return h(F)},get orderDetails(){return h(n)}})};fe(K,G=>{h(F).type==="Event"&&G(J)},!0)}w(de,X)};fe(B,de=>{h(F).type==="Ticket"?de(H):de(Z,!1)})}w(D,N)});var O=te(k,2),E=$(O),P=te($(E),4),A=$(P,!0);I(P),Mt(2),I(E),I(O),I(c),ce((D,F,N,B)=>{se(p,D),se(g,F),se(b,N),se(A,B)},[()=>S.t("common.table.count"),()=>S.t("common.table.product"),()=>S.t("common.table.price"),()=>S.t("common.table.total",{value:Ba(h(i).total_price_cents)})]),w(l,c)};fe(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),ie()}customElements.define("go-order-breakdown",oe(zP,{},[],[]));function ZP(t,e){ne(e,!0);const r=iy(e.$$host),n=C(()=>r.value);let i=C(()=>h(n)?.order);Mt();var s=Yt();ce(()=>se(s,h(i)?.id)),w(t,s),ie()}customElements.define("go-order-invoice-id",oe(ZP,{},[],[]));var VP=j("<go-form></go-form>",2);function UP(t,e){ne(e,!1),hr.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const o=i.target.details,a=await S.updatePassword(o.formData);a.data?(o.successMessage=S.t("user.passwordSuccess.desc.title"),o.apiErrors=[]):o.apiErrors=a.error?.errors||a.error||a.errors}Fc();var n=VP();xi(n,"formId","passwordResetForm"),kc("submit",n,r),w(t,n),ie()}customElements.define("go-profile-password",oe(UP,{},[],[]));var BP=j("<go-form></go-form>",2);function jP(t,e){ne(e,!0),hr.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=le(void 0);const n=C(()=>S.validateToken());kn(async()=>{await S.waitForAllFetches(),await Rc(()=>h(r).details),await Rc(()=>h(n).data),h(r).details.fill(h(n).data)});var i=BP();xi(i,"formId","accountDetailsForm"),Vh(i,s=>M(r,s),()=>h(r)),w(t,i),ie()}customElements.define("go-profile-details",oe(jP,{},[],[]));var qP=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function WP(t,e){ne(e,!0);const r=C(()=>S.validateToken()),n=C(()=>h(r)?.data);var i=W(),s=z(i);{var o=l=>{var c=qP(),u=z(c),d=$(u);I(u);var f=te(u,2),p=$(f,!0);I(f),ce(()=>{se(d,`${h(n).name??""}
13
+ ${h(n).surname??""}`),se(p,h(n).email)}),w(l,c)},a=l=>{var c=Yt();ce(u=>se(c,u),[()=>S.t("user.login.desc.text")]),w(l,c)};fe(s,l=>{h(n)?l(o):l(a,!1)})}w(t,i),ie()}customElements.define("go-profile-overview",oe(WP,{},[],[]));function HP(t,e){ne(e,!0);function r(p){if(!p)return;const v=[];for(const g of p.split(",")){const m=g.trim();m&&(ey.includes(m)?v.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${ey.join(", ")}`))}return v.length?v:void 0}let n=_(e,"filters",7),i=_(e,"eventIds",7),s=_(e,"museumIds",7),o=_(e,"exhibitionIds",7),a=_(e,"selectedDate",7),l=_(e,"selectedTimeslot",7),c=_(e,"ticketIds",7),u=_(e,"ticketGroupIds",7);const d=new gP;_e(()=>{e.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),_e(()=>{d.filters=r(n()),d.eventIds=Dn(i()),d.museumIds=Dn(s()),d.exhibitionIds=Dn(o()),d.ticketIds=Dn(c()),d.ticketGroupIds=Dn(u()),d.selectedTimeslot=l(),a()&&(d.selectedDate=iu(a()))}),_e(()=>{d.selectedDate&&Ge(()=>{a(d.selectedDate.toString())})}),vP(e.$$host,d);var f={details:d,get filters(){return n()},set filters(p){n(p),y()},get eventIds(){return i()},set eventIds(p){i(p),y()},get museumIds(){return s()},set museumIds(p){s(p),y()},get exhibitionIds(){return o()},set exhibitionIds(p){o(p),y()},get selectedDate(){return a()},set selectedDate(p){a(p),y()},get selectedTimeslot(){return l()},set selectedTimeslot(p){l(p),y()},get ticketIds(){return c()},set ticketIds(p){c(p),y()},get ticketGroupIds(){return u()},set ticketGroupIds(p){u(p),y()}};return ie(f)}customElements.define("go-ticket-selection",oe(HP,{filters:{attribute:"filters",reflect:!0,type:"String"},eventIds:{attribute:"event-ids",reflect:!0,type:"String"},ticketIds:{attribute:"ticket-ids",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},exhibitionIds:{attribute:"exhibition-ids",reflect:!0,type:"String"},selectedDate:{attribute:"selected-date",reflect:!0,type:"String"},selectedTimeslot:{attribute:"selected-timeslot",reflect:!0,type:"String"}},[],["details"]));function KP(t,e){ne(e,!0);const r=zn(e.$$host),n=C(()=>r.value);_e(()=>{e.$$host.style.display=h(n)?.isTicketsVisible?"block":"none",e.$$host.classList.toggle("is-hidden",!h(n)?.isTicketsVisible),e.$$host.classList.toggle("is-visible",h(n)?.isTicketsVisible)}),ie()}customElements.define("go-tickets",oe(KP,{},[],[]));function GP(t,e){ne(e,!0);const r=zn(e.$$host),n=C(()=>r.value),i=C(()=>Ei(h(n)?.preCarts||[],o=>o.items.length)),s=C(()=>!h(n)?.isTicketsVisible||h(n)?.isTicketsVisible&&h(i)===0);_e(()=>{e.$$host.style.display=h(s)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(s)),e.$$host.classList.toggle("is-visible",h(s))}),ie()}customElements.define("go-tickets-empty",oe(GP,{},[],[]));function YP(t,e){ne(e,!0);const r=zn(e.$$host),n=C(()=>r.value);let i=C(()=>Ei(h(n)?.preCarts||[],o=>o.totalPriceCents));Mt();var s=Yt();ce(o=>se(s,o),[()=>kr(h(i))]),w(t,s),ie()}customElements.define("go-tickets-sum",oe(YP,{},[],[]));class JP{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){M(this.#e,e)}#t=le(Be(us()));get preCart(){return h(this.#t)}set preCart(e){M(this.#t,e,!0)}#r=le();get filters(){return h(this.#r)}set filters(e){M(this.#r,e,!0)}#n=le();get dateId(){return h(this.#n)}set dateId(e){M(this.#n,e,!0)}#i=le();get limit(){return h(this.#i)}set limit(e){M(this.#i,e,!0)}#s=le();get query(){return h(this.#s)}set query(e){M(this.#s,e,!0)}#a=le(Be([]));get ticketGroupIds(){return h(this.#a)}set ticketGroupIds(e){M(this.#a,e,!0)}#o=le(Be([]));get languageIds(){return h(this.#o)}set languageIds(e){M(this.#o,e,!0)}#l=le(Be([]));get catchWordIds(){return h(this.#l)}set catchWordIds(e){M(this.#l,e,!0)}#c=le(Be([]));get museumIds(){return h(this.#c)}set museumIds(e){M(this.#c,e,!0)}constructor(e,r){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=C(()=>r.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=us([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=us();const e=this.effectiveFilters.filter(r=>r!=="custom");await Promise.all(e.map(r=>qi(r).loadProducts(this)))}}const ay="go-ticket-segment",QP=fs(ay),af=hs(ay);function XP(t,e){ne(e,!0);const r=_(e,"filters",7),n=_(e,"dateId",7),i=_(e,"query",7),s=_(e,"limit",7),o=_(e,"ticketGroupIds",7),a=_(e,"languageIds",7),l=_(e,"catchWordIds",7),c=_(e,"museumIds",7);function u(m){if(!m)return;const b=m.split(",").map(k=>k.trim()).filter(Boolean);return b.length?b:void 0}const d=zn(e.$$host),f=d.value,p=new JP(u(r()),d);QP(e.$$host,p),_e(()=>{p.filters=u(r()),p.dateId=n(),p.query=i(),p.limit=s(),p.ticketGroupIds=Dn(o()),p.languageIds=Dn(a()),p.catchWordIds=Dn(l()),p.museumIds=Dn(c())}),_e(()=>{p.dateId,p.filters,p.ticketGroupIds,p.museumIds,p.languageIds,p.catchWordIds,p.query,p.limit,f?.filters,f?.selectedTimeslot,f?.selectedTime,f?.selectedDate,f?.museumIds,Ge(()=>{p.loadTickets()})}),_e(()=>{f&&Ge(()=>f?.addTicketSegment(p))});const v=C(()=>p.preCart.items.length);_e(()=>{e.$$host.classList.toggle("is-empty",h(v)===0)});var g={details:p,get filters(){return r()},set filters(m){r(m),y()},get dateId(){return n()},set dateId(m){n(m),y()},get query(){return i()},set query(m){i(m),y()},get limit(){return s()},set limit(m){s(m),y()},get ticketGroupIds(){return o()},set ticketGroupIds(m){o(m),y()},get languageIds(){return a()},set languageIds(m){a(m),y()},get catchWordIds(){return l()},set catchWordIds(m){l(m),y()},get museumIds(){return c()},set museumIds(m){c(m),y()}};return ie(g)}customElements.define("go-ticket-segment",oe(XP,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"}},[],["details"]));function eM(t,e){ne(e,!0);const n=zn(e.$$host).value,s=af(e.$$host).value,o=C(()=>s?.preCart.items.length),a=C(()=>!n?.isTicketsVisible||n?.isTicketsVisible&&h(o)===0);_e(()=>{e.$$host.style.display=h(a)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(a)),e.$$host.classList.toggle("is-visible",h(a))}),ie()}customElements.define("go-ticket-segment-empty",oe(eM,{},[],[]));const{entries:ly,setPrototypeOf:cy,isFrozen:tM,getPrototypeOf:rM,getOwnPropertyDescriptor:nM}=Object;let{freeze:Vt,seal:Er,create:lf}=Object,{apply:cf,construct:uf}=typeof Reflect<"u"&&Reflect;Vt||(Vt=function(e){return e}),Er||(Er=function(e){return e}),cf||(cf=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return e.apply(r,i)}),uf||(uf=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new e(...n)});const jl=Bt(Array.prototype.forEach),iM=Bt(Array.prototype.lastIndexOf),uy=Bt(Array.prototype.pop),Wo=Bt(Array.prototype.push),sM=Bt(Array.prototype.splice),ql=Bt(String.prototype.toLowerCase),df=Bt(String.prototype.toString),ff=Bt(String.prototype.match),Ho=Bt(String.prototype.replace),oM=Bt(String.prototype.indexOf),aM=Bt(String.prototype.trim),Ur=Bt(Object.prototype.hasOwnProperty),Ut=Bt(RegExp.prototype.test),Ko=lM(TypeError);function Bt(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return cf(t,e,n)}}function lM(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return uf(t,r)}}function Ie(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ql;cy&&cy(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const s=r(i);s!==i&&(tM(e)||(e[n]=s),i=s)}t[i]=!0}return t}function cM(t){for(let e=0;e<t.length;e++)Ur(t,e)||(t[e]=null);return t}function cn(t){const e=lf(null);for(const[r,n]of ly(t))Ur(t,r)&&(Array.isArray(n)?e[r]=cM(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=cn(n):e[r]=n);return e}function Go(t,e){for(;t!==null;){const n=nM(t,e);if(n){if(n.get)return Bt(n.get);if(typeof n.value=="function")return Bt(n.value)}t=rM(t)}function r(){return null}return r}const dy=Vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hf=Vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pf=Vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uM=Vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mf=Vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),dM=Vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fy=Vt(["#text"]),hy=Vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),gf=Vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),py=Vt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Wl=Vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fM=Er(/\{\{[\w\W]*|[\w\W]*\}\}/gm),hM=Er(/<%[\w\W]*|[\w\W]*%>/gm),pM=Er(/\$\{[\w\W]*/gm),mM=Er(/^data-[\-\w.\u00B7-\uFFFF]+$/),gM=Er(/^aria-[\-\w]+$/),my=Er(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vM=Er(/^(?:\w+script|data):/i),yM=Er(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gy=Er(/^html$/i),_M=Er(/^[a-z][.\w]*(-[.\w]+)+$/i);var vy=Object.freeze({__proto__:null,ARIA_ATTR:gM,ATTR_WHITESPACE:yM,CUSTOM_ELEMENT:_M,DATA_ATTR:mM,DOCTYPE_NAME:gy,ERB_EXPR:hM,IS_ALLOWED_URI:my,IS_SCRIPT_OR_DATA:vM,MUSTACHE_EXPR:fM,TMPLIT_EXPR:pM});const Yo={element:1,text:3,progressingInstruction:7,comment:8,document:9},bM=function(){return typeof window>"u"?null:window},wM=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},yy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _y(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bM();const e=be=>_y(be);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==Yo.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=t,v=l.prototype,g=Go(v,"cloneNode"),m=Go(v,"remove"),b=Go(v,"nextSibling"),k=Go(v,"childNodes"),O=Go(v,"parentNode");if(typeof o=="function"){const be=r.createElement("template");be.content&&be.content.ownerDocument&&(r=be.content.ownerDocument)}let E,P="";const{implementation:A,createNodeIterator:D,createDocumentFragment:F,getElementsByTagName:N}=r,{importNode:B}=n;let H=yy();e.isSupported=typeof ly=="function"&&typeof O=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Z,ERB_EXPR:de,TMPLIT_EXPR:X,DATA_ATTR:K,ARIA_ATTR:J,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:q,CUSTOM_ELEMENT:Y}=vy;let{IS_ALLOWED_URI:ue}=vy,ee=null;const ve=Ie({},[...dy,...hf,...pf,...mf,...fy]);let L=null;const ye=Ie({},[...hy,...gf,...py,...Wl]);let U=Object.seal(lf(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,we=null;const T=Object.seal(lf(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Xe=!0,Ze=!0,We=!1,yt=!0,Ve=!1,Xt=!0,ht=!1,Et=!1,jt=!1,er=!1,Ct=!1,Ot=!1,Zn=!0,mi=!1;const Br="user-content-";let jr=!0,tr=!1,qt={},rr=null;const gi=Ie({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let un=null;const Ns=Ie({},["audio","video","img","source","image","track"]);let Jo=null;const Kl=Ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Fs="http://www.w3.org/1998/Math/MathML",Qo="http://www.w3.org/2000/svg",Tr="http://www.w3.org/1999/xhtml";let vi=Tr,Xo=!1,ea=null;const jM=Ie({},[Fs,Qo,Tr],df);let Gl=Ie({},["mi","mo","mn","ms","mtext"]),Yl=Ie({},["annotation-xml"]);const qM=Ie({},["title","style","font","a","script"]);let ta=null;const WM=["application/xhtml+xml","text/html"],HM="text/html";let pt=null,Rs=null;const KM=r.createElement("form"),Sy=function(x){return x instanceof RegExp||x instanceof Function},vf=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rs&&Rs===x)){if((!x||typeof x!="object")&&(x={}),x=cn(x),ta=WM.indexOf(x.PARSER_MEDIA_TYPE)===-1?HM:x.PARSER_MEDIA_TYPE,pt=ta==="application/xhtml+xml"?df:ql,ee=Ur(x,"ALLOWED_TAGS")?Ie({},x.ALLOWED_TAGS,pt):ve,L=Ur(x,"ALLOWED_ATTR")?Ie({},x.ALLOWED_ATTR,pt):ye,ea=Ur(x,"ALLOWED_NAMESPACES")?Ie({},x.ALLOWED_NAMESPACES,df):jM,Jo=Ur(x,"ADD_URI_SAFE_ATTR")?Ie(cn(Kl),x.ADD_URI_SAFE_ATTR,pt):Kl,un=Ur(x,"ADD_DATA_URI_TAGS")?Ie(cn(Ns),x.ADD_DATA_URI_TAGS,pt):Ns,rr=Ur(x,"FORBID_CONTENTS")?Ie({},x.FORBID_CONTENTS,pt):gi,V=Ur(x,"FORBID_TAGS")?Ie({},x.FORBID_TAGS,pt):cn({}),we=Ur(x,"FORBID_ATTR")?Ie({},x.FORBID_ATTR,pt):cn({}),qt=Ur(x,"USE_PROFILES")?x.USE_PROFILES:!1,Xe=x.ALLOW_ARIA_ATTR!==!1,Ze=x.ALLOW_DATA_ATTR!==!1,We=x.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ve=x.SAFE_FOR_TEMPLATES||!1,Xt=x.SAFE_FOR_XML!==!1,ht=x.WHOLE_DOCUMENT||!1,er=x.RETURN_DOM||!1,Ct=x.RETURN_DOM_FRAGMENT||!1,Ot=x.RETURN_TRUSTED_TYPE||!1,jt=x.FORCE_BODY||!1,Zn=x.SANITIZE_DOM!==!1,mi=x.SANITIZE_NAMED_PROPS||!1,jr=x.KEEP_CONTENT!==!1,tr=x.IN_PLACE||!1,ue=x.ALLOWED_URI_REGEXP||my,vi=x.NAMESPACE||Tr,Gl=x.MATHML_TEXT_INTEGRATION_POINTS||Gl,Yl=x.HTML_INTEGRATION_POINTS||Yl,U=x.CUSTOM_ELEMENT_HANDLING||{},x.CUSTOM_ELEMENT_HANDLING&&Sy(x.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=x.CUSTOM_ELEMENT_HANDLING.tagNameCheck),x.CUSTOM_ELEMENT_HANDLING&&Sy(x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ve&&(Ze=!1),Ct&&(er=!0),qt&&(ee=Ie({},fy),L=[],qt.html===!0&&(Ie(ee,dy),Ie(L,hy)),qt.svg===!0&&(Ie(ee,hf),Ie(L,gf),Ie(L,Wl)),qt.svgFilters===!0&&(Ie(ee,pf),Ie(L,gf),Ie(L,Wl)),qt.mathMl===!0&&(Ie(ee,mf),Ie(L,py),Ie(L,Wl))),x.ADD_TAGS&&(typeof x.ADD_TAGS=="function"?T.tagCheck=x.ADD_TAGS:(ee===ve&&(ee=cn(ee)),Ie(ee,x.ADD_TAGS,pt))),x.ADD_ATTR&&(typeof x.ADD_ATTR=="function"?T.attributeCheck=x.ADD_ATTR:(L===ye&&(L=cn(L)),Ie(L,x.ADD_ATTR,pt))),x.ADD_URI_SAFE_ATTR&&Ie(Jo,x.ADD_URI_SAFE_ATTR,pt),x.FORBID_CONTENTS&&(rr===gi&&(rr=cn(rr)),Ie(rr,x.FORBID_CONTENTS,pt)),x.ADD_FORBID_CONTENTS&&(rr===gi&&(rr=cn(rr)),Ie(rr,x.ADD_FORBID_CONTENTS,pt)),jr&&(ee["#text"]=!0),ht&&Ie(ee,["html","head","body"]),ee.table&&(Ie(ee,["tbody"]),delete V.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=x.TRUSTED_TYPES_POLICY,P=E.createHTML("")}else E===void 0&&(E=wM(p,i)),E!==null&&typeof P=="string"&&(P=E.createHTML(""));Vt&&Vt(x),Rs=x}},xy=Ie({},[...hf,...pf,...uM]),Ey=Ie({},[...mf,...dM]),GM=function(x){let ae=O(x);(!ae||!ae.tagName)&&(ae={namespaceURI:vi,tagName:"template"});const me=ql(x.tagName),it=ql(ae.tagName);return ea[x.namespaceURI]?x.namespaceURI===Qo?ae.namespaceURI===Tr?me==="svg":ae.namespaceURI===Fs?me==="svg"&&(it==="annotation-xml"||Gl[it]):!!xy[me]:x.namespaceURI===Fs?ae.namespaceURI===Tr?me==="math":ae.namespaceURI===Qo?me==="math"&&Yl[it]:!!Ey[me]:x.namespaceURI===Tr?ae.namespaceURI===Qo&&!Yl[it]||ae.namespaceURI===Fs&&!Gl[it]?!1:!Ey[me]&&(qM[me]||!xy[me]):!!(ta==="application/xhtml+xml"&&ea[x.namespaceURI]):!1},dn=function(x){Wo(e.removed,{element:x});try{O(x).removeChild(x)}catch{m(x)}},Wi=function(x,ae){try{Wo(e.removed,{attribute:ae.getAttributeNode(x),from:ae})}catch{Wo(e.removed,{attribute:null,from:ae})}if(ae.removeAttribute(x),x==="is")if(er||Ct)try{dn(ae)}catch{}else try{ae.setAttribute(x,"")}catch{}},Ty=function(x){let ae=null,me=null;if(jt)x="<remove></remove>"+x;else{const dt=ff(x,/^[\r\n\t ]+/);me=dt&&dt[0]}ta==="application/xhtml+xml"&&vi===Tr&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const it=E?E.createHTML(x):x;if(vi===Tr)try{ae=new f().parseFromString(it,ta)}catch{}if(!ae||!ae.documentElement){ae=A.createDocument(vi,"template",null);try{ae.documentElement.innerHTML=Xo?P:it}catch{}}const Dt=ae.body||ae.documentElement;return x&&me&&Dt.insertBefore(r.createTextNode(me),Dt.childNodes[0]||null),vi===Tr?N.call(ae,ht?"html":"body")[0]:ht?ae.documentElement:Dt},Ay=function(x){return D.call(x.ownerDocument||x,x,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},yf=function(x){return x instanceof d&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof u)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},Cy=function(x){return typeof a=="function"&&x instanceof a};function Vn(be,x,ae){jl(be,me=>{me.call(e,x,ae,Rs)})}const Oy=function(x){let ae=null;if(Vn(H.beforeSanitizeElements,x,null),yf(x))return dn(x),!0;const me=pt(x.nodeName);if(Vn(H.uponSanitizeElement,x,{tagName:me,allowedTags:ee}),Xt&&x.hasChildNodes()&&!Cy(x.firstElementChild)&&Ut(/<[/\w!]/g,x.innerHTML)&&Ut(/<[/\w!]/g,x.textContent)||x.nodeType===Yo.progressingInstruction||Xt&&x.nodeType===Yo.comment&&Ut(/<[/\w]/g,x.data))return dn(x),!0;if(!(T.tagCheck instanceof Function&&T.tagCheck(me))&&(!ee[me]||V[me])){if(!V[me]&&Iy(me)&&(U.tagNameCheck instanceof RegExp&&Ut(U.tagNameCheck,me)||U.tagNameCheck instanceof Function&&U.tagNameCheck(me)))return!1;if(jr&&!rr[me]){const it=O(x)||x.parentNode,Dt=k(x)||x.childNodes;if(Dt&&it){const dt=Dt.length;for(let nr=dt-1;nr>=0;--nr){const Un=g(Dt[nr],!0);Un.__removalCount=(x.__removalCount||0)+1,it.insertBefore(Un,b(x))}}}return dn(x),!0}return x instanceof l&&!GM(x)||(me==="noscript"||me==="noembed"||me==="noframes")&&Ut(/<\/no(script|embed|frames)/i,x.innerHTML)?(dn(x),!0):(Ve&&x.nodeType===Yo.text&&(ae=x.textContent,jl([Z,de,X],it=>{ae=Ho(ae,it," ")}),x.textContent!==ae&&(Wo(e.removed,{element:x.cloneNode()}),x.textContent=ae)),Vn(H.afterSanitizeElements,x,null),!1)},Dy=function(x,ae,me){if(Zn&&(ae==="id"||ae==="name")&&(me in r||me in KM))return!1;if(!(Ze&&!we[ae]&&Ut(K,ae))){if(!(Xe&&Ut(J,ae))){if(!(T.attributeCheck instanceof Function&&T.attributeCheck(ae,x))){if(!L[ae]||we[ae]){if(!(Iy(x)&&(U.tagNameCheck instanceof RegExp&&Ut(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x))&&(U.attributeNameCheck instanceof RegExp&&Ut(U.attributeNameCheck,ae)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(ae,x))||ae==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&Ut(U.tagNameCheck,me)||U.tagNameCheck instanceof Function&&U.tagNameCheck(me))))return!1}else if(!Jo[ae]){if(!Ut(ue,Ho(me,q,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&x!=="script"&&oM(me,"data:")===0&&un[x])){if(!(We&&!Ut(G,Ho(me,q,"")))){if(me)return!1}}}}}}}return!0},Iy=function(x){return x!=="annotation-xml"&&ff(x,Y)},Py=function(x){Vn(H.beforeSanitizeAttributes,x,null);const{attributes:ae}=x;if(!ae||yf(x))return;const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let it=ae.length;for(;it--;){const Dt=ae[it],{name:dt,namespaceURI:nr,value:Un}=Dt,Ls=pt(dt),_f=Un;let Tt=dt==="value"?_f:aM(_f);if(me.attrName=Ls,me.attrValue=Tt,me.keepAttr=!0,me.forceKeepAttr=void 0,Vn(H.uponSanitizeAttribute,x,me),Tt=me.attrValue,mi&&(Ls==="id"||Ls==="name")&&(Wi(dt,x),Tt=Br+Tt),Xt&&Ut(/((--!?|])>)|<\/(style|title|textarea)/i,Tt)){Wi(dt,x);continue}if(Ls==="attributename"&&ff(Tt,"href")){Wi(dt,x);continue}if(me.forceKeepAttr)continue;if(!me.keepAttr){Wi(dt,x);continue}if(!yt&&Ut(/\/>/i,Tt)){Wi(dt,x);continue}Ve&&jl([Z,de,X],$y=>{Tt=Ho(Tt,$y," ")});const My=pt(x.nodeName);if(!Dy(My,Ls,Tt)){Wi(dt,x);continue}if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!nr)switch(p.getAttributeType(My,Ls)){case"TrustedHTML":{Tt=E.createHTML(Tt);break}case"TrustedScriptURL":{Tt=E.createScriptURL(Tt);break}}if(Tt!==_f)try{nr?x.setAttributeNS(nr,dt,Tt):x.setAttribute(dt,Tt),yf(x)?dn(x):uy(e.removed)}catch{Wi(dt,x)}}Vn(H.afterSanitizeAttributes,x,null)},YM=function be(x){let ae=null;const me=Ay(x);for(Vn(H.beforeSanitizeShadowDOM,x,null);ae=me.nextNode();)Vn(H.uponSanitizeShadowNode,ae,null),Oy(ae),Py(ae),ae.content instanceof s&&be(ae.content);Vn(H.afterSanitizeShadowDOM,x,null)};return e.sanitize=function(be){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,me=null,it=null,Dt=null;if(Xo=!be,Xo&&(be="<!-->"),typeof be!="string"&&!Cy(be))if(typeof be.toString=="function"){if(be=be.toString(),typeof be!="string")throw Ko("dirty is not a string, aborting")}else throw Ko("toString is not a function");if(!e.isSupported)return be;if(Et||vf(x),e.removed=[],typeof be=="string"&&(tr=!1),tr){if(be.nodeName){const Un=pt(be.nodeName);if(!ee[Un]||V[Un])throw Ko("root node is forbidden and cannot be sanitized in-place")}}else if(be instanceof a)ae=Ty("<!---->"),me=ae.ownerDocument.importNode(be,!0),me.nodeType===Yo.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?ae=me:ae.appendChild(me);else{if(!er&&!Ve&&!ht&&be.indexOf("<")===-1)return E&&Ot?E.createHTML(be):be;if(ae=Ty(be),!ae)return er?null:Ot?P:""}ae&&jt&&dn(ae.firstChild);const dt=Ay(tr?be:ae);for(;it=dt.nextNode();)Oy(it),Py(it),it.content instanceof s&&YM(it.content);if(tr)return be;if(er){if(Ct)for(Dt=F.call(ae.ownerDocument);ae.firstChild;)Dt.appendChild(ae.firstChild);else Dt=ae;return(L.shadowroot||L.shadowrootmode)&&(Dt=B.call(n,Dt,!0)),Dt}let nr=ht?ae.outerHTML:ae.innerHTML;return ht&&ee["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&Ut(gy,ae.ownerDocument.doctype.name)&&(nr="<!DOCTYPE "+ae.ownerDocument.doctype.name+`>
14
+ `+nr),Ve&&jl([Z,de,X],Un=>{nr=Ho(nr,Un," ")}),E&&Ot?E.createHTML(nr):nr},e.setConfig=function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vf(be),Et=!0},e.clearConfig=function(){Rs=null,Et=!1},e.isValidAttribute=function(be,x,ae){Rs||vf({});const me=pt(be),it=pt(x);return Dy(me,it,ae)},e.addHook=function(be,x){typeof x=="function"&&Wo(H[be],x)},e.removeHook=function(be,x){if(x!==void 0){const ae=iM(H[be],x);return ae===-1?void 0:sM(H[be],ae,1)[0]}return uy(H[be])},e.removeHooks=function(be){H[be]=[]},e.removeAllHooks=function(){H=yy()},e}var kM=_y(),SM=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),xM=j("<option> </option>"),EM=j('<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""><!></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>');function by(t,e){ne(e,!0);const r=p=>{var v=SM(),g=z(v),m=$(g);I(g);var b=te(g,2),k=$(b,!0);I(b),ce(O=>{se(m,`${i().product.eventTitle??""} - ${O??""}`),se(k,i().product.title)},[()=>wo(i().time)]),w(p,v)},n=p=>{Mt();var v=Yt();ce(()=>se(v,i().product.title)),w(p,v)};let i=_(e,"item",7),s=_(e,"details",7),o=le(void 0);_e(()=>{s().preCart.items.map(p=>p.quantity),Ge(()=>{M(o,S.capacityManager.capacity(S.cart,i(),s().preCart),!0)})});function a(p,v,g){const m=v;p.quantity=parseInt(m.value)}let l=n;So(i().product)&&(l=r);var c={get item(){return i()},set item(p){i(p),y()},get details(){return s()},set details(p){s(p),y()}},u=W(),d=z(u);{var f=p=>{var v=EM(),g=$(v),m=$(g),b=$(m),k=$(b);l(k),I(b);var O=te(b,2),E=$(O);J_(E,()=>kM.sanitize(i().product.description)),I(O);var P=te(O,2),A=$(P,!0);I(P);var D=te(P,2),F=$(D);F.__change=N=>a(i(),N.target,s()?.ticketSelectionDetails),He(F,21,()=>zm(h(o).min,h(o).max),N=>N.value,(N,B)=>{var H=xM(),Z=$(H,!0);I(H);var de={};ce(()=>{Cc(H,i().quantity===h(B).value),se(Z,h(B).label),de!==(de=h(B).value)&&(H.value=(H.__value=h(B).value)??"")}),w(N,H)}),I(F),I(D),I(m),I(g),I(v),ce(N=>{lr(g,1,Sn(["go-tickets-item",h(o).bookedOut&&"is-booked-out"])),Ae(g,"data-testid",i().uuid),se(A,i().price_formatted),Ae(F,"aria-label",N)},[()=>S.t("cart.content.table.edit")]),w(p,v)};fe(d,p=>{h(o)&&!h(o).unavailable&&p(f)})}return w(t,u),ie(c)}Hr(["change"]),oe(by,{item:{},details:{}},[],[],{mode:"open"});var TM=j('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function AM(t,e){ne(e,!0);const r=af(e.$$host),n=C(()=>r.value),i=C(()=>h(n)?.preCart?.items.length&&h(n)?.preCart?.items.length>0);var s=W(),o=z(s);{var a=l=>{var c=TM(),u=$(c),d=$(u),f=$(d),p=$(f,!0);I(f);var v=te(f,2),g=$(v,!0);I(v);var m=te(v,2),b=$(m,!0);I(m);var k=te(m,2),O=$(k,!0);I(k),I(d),I(u);var E=te(u,2);He(E,17,()=>h(n).preCart.items,P=>P.uuid,(P,A)=>{by(P,{get item(){return h(A)},get details(){return h(n)}})}),I(c),ce((P,A,D,F)=>{se(p,P),se(g,A),se(b,D),se(O,F)},[()=>S.t("product.detail.table.title"),()=>S.t("product.detail.table.desc"),()=>S.t("product.detail.table.price"),()=>S.t("product.detail.table.quantity")]),w(l,c)};fe(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),ie()}customElements.define("go-ticket-segment-body",oe(AM,{},[],[]));function CM(t,e){ne(e,!0);const r=af(e.$$host),n=C(()=>r.value);Mt();var i=Yt();ce(()=>se(i,h(n)?.preCart.totalFormatted)),w(t,i),ie()}customElements.define("go-ticket-segment-sum",oe(CM,{},[],[]));let OM=class{#e;get tsd(){return h(this.#e)}set tsd(e){M(this.#e,e)}#t=le(Be([]));get timeslots(){return h(this.#t)}set timeslots(e){M(this.#t,e,!0)}constructor(e){e&&(this.#e=C(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}this.timeslots=S.capacityManager.quotaManager.timeslotsOn(e).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}};var DM=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),IM=j('<ul data-testid="timeslots"></ul>');function PM(t,e){ne(e,!0);const r=[],n=zn(e.$$host),i=new OM(n);_e(()=>{const d=i.tsd;if(!d)return;const f=d.filters,p=d.selectedDate;Ge(async()=>{f?.length&&p&&await Promise.all(f.map(v=>qi(v).loadTimeslots(d))),i.recalculateCapacities()})});const s=(d,f)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:f},bubbles:!0,composed:!0}))},o=d=>{s(d.target,i.tsd?.selectedTimeslot)};_e(()=>{const d=i.tsd;if(!d)return;const f=i.timeslots;if(f.length!==1)return;const p=f[0];p.available&&d.selectedTimeslot!==p.startAt&&(d.selectedTimeslot=p.startAt,s(e.$$host,p.startAt))});var a={details:i},l=W(),c=z(l);{var u=d=>{var f=IM();He(f,20,()=>i.timeslots,p=>p,(p,v)=>{const g=C(()=>v.capacity===0),m=C(()=>h(g)||!v.available),b=C(()=>i.tsd?.selectedTimeslot===v.startAt);var k=DM(),O=$(k),E=$(O),P=te(E);Ta(P),P.__change=o;var A;I(O),I(k),ce(()=>{lr(k,1,Sn({"go-timeslot":!0,"is-sold-out":h(g),"is-disabled":h(m),"is-selected":h(b)})),se(E,`${v.timeFormatted??""} `),P.disabled=h(m),Ae(P,"aria-disabled",h(m)),A!==(A=v.startAt)&&(P.value=(P.__value=v.startAt)??"")}),lb(r,[],P,()=>(v.startAt,i.tsd.selectedTimeslot),D=>i.tsd.selectedTimeslot=D),w(p,k)}),I(f),w(d,f)};fe(c,d=>{i.tsd?.isTimeslotsVisible&&d(u)})}return w(t,l),ie(a)}Hr(["change"]),customElements.define("go-timeslots",oe(PM,{},[],["details"]));class MM{#e=le();get details(){return h(this.#e)}set details(e){M(this.#e,e,!0)}#t=le(Be(cs(dr())));get startAt(){return h(this.#t)}set startAt(e){M(this.#t,e,!0)}#r=le(void 0);get selected(){return h(this.#r)}set selected(e){M(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(r=>qi(r).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}isDateDisabled(e){return this.dates?e.compare(cs(dr()))<0||this.dates[e.toString()]=="unavailable":e.compare(cs(dr()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>qi(e).apiToken).filter(Boolean)}params(e){return this.details?{by_bookable:!0,"by_ticket_types[]":this.apiFilters,"by_ticket_ids[]":this.details.ticketIds,"by_ticket_group_ids[]":this.details.ticketGroupIds,"by_museum_ids[]":this.details.museumIds,"by_exhibition_ids[]":this.details.exhibitionIds,"by_event_ids[]":this.details.eventIds,depth:"availability_status",start_at:e.toString(),end_at:e.add({months:1}).toString()}:{}}fetchPeriod(){const e=this.startAt.set({day:1});return[e.subtract({months:1}),e,e.add({months:1}),e.add({months:2})]}eventsDates(){const e=S.calendar.bind(S);return this.fetchPeriod().reduce((r,n)=>cr(r,e(this.params(n))),{})}ticketsDates(){const e=S.ticketsCalendar.bind(S);return this.fetchPeriod().reduce((r,n)=>cr(r,e(this.params(n))),{})}}var $M=j("<!> <!> <!>",1),NM=j("<div> </div>"),FM=j("<!> <!>",1),RM=j("<!> <!>",1),LM=j('<div data-calendar-wrapper=""><!></div>');function wy(t,e){ne(e,!0);let r=_(e,"calendarClass",7),n=le(void 0);const i=r();_e(()=>{h(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),y()}},o=LM(),a=$(o);{const l=(c,u)=>{let d=()=>u?.().months,f=()=>u?.().weekdays;var p=RM(),v=z(p);Re(v,()=>vd,(m,b)=>{b(m,{children:(k,O)=>{var E=$M(),P=z(E);Re(P,()=>bd,(F,N)=>{N(F,{class:"go-calendar-prev-button",children:(B,H)=>{Mt();var Z=Yt("Prev");w(B,Z)},$$slots:{default:!0}})});var A=te(P,2);Re(A,()=>yd,(F,N)=>{N(F,{class:"go-calendar-heading"})});var D=te(A,2);Re(D,()=>_d,(F,N)=>{N(F,{class:"go-calendar-next-button",children:(B,H)=>{Mt();var Z=Yt("Next");w(B,Z)},$$slots:{default:!0}})}),w(k,E)},$$slots:{default:!0}})});var g=te(v,2);He(g,17,d,Gr,(m,b)=>{var k=W(),O=z(k);Re(O,()=>fd,(E,P)=>{P(E,{class:"go-calendar-grid",children:(A,D)=>{var F=FM(),N=z(F);Re(N,()=>md,(H,Z)=>{Z(H,{class:"go-calendar-grid-head",children:(de,X)=>{var K=W(),J=z(K);Re(J,()=>Uo,(G,q)=>{q(G,{class:"go-calendar-grid-row",children:(Y,ue)=>{var ee=W(),ve=z(ee);He(ve,17,f,Gr,(L,ye,U,V)=>{var we=W(),T=z(we);Re(T,()=>gd,(Xe,Ze)=>{Ze(Xe,{children:(We,yt)=>{var Ve=NM(),Xt=$(Ve,!0);I(Ve),ce(ht=>se(Xt,ht),[()=>h(ye).slice(0,2)]),w(We,Ve)},$$slots:{default:!0}})}),w(L,we)}),w(Y,ee)},$$slots:{default:!0}})}),w(de,K)},$$slots:{default:!0}})});var B=te(N,2);Re(B,()=>hd,(H,Z)=>{Z(H,{class:"go-calendar-grid-body",children:(de,X)=>{var K=W(),J=z(K);He(J,17,()=>h(b).weeks,Gr,(G,q,Y,ue)=>{var ee=W(),ve=z(ee);Re(ve,()=>Uo,(L,ye)=>{ye(L,{class:"go-calendar-grid-row",children:(U,V)=>{var we=W(),T=z(we);He(T,17,()=>h(q),Gr,(Xe,Ze,We,yt)=>{var Ve=W(),Xt=z(Ve);Re(Xt,()=>pd,(ht,Et)=>{Et(ht,{get date(){return h(Ze)},get month(){return h(b).value},class:"go-calendar-cell",children:(jt,er)=>{var Ct=W(),Ot=z(Ct);{let Zn=C(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(h(Ze)),"is-disabled":r().isDateDisabled(h(Ze)),"is-selected":r().selected?.compare(h(Ze))===0}));Re(Ot,()=>dd,(mi,Br)=>{Br(mi,{get class(){return h(Zn)},children:(jr,tr)=>{Mt();var qt=Yt();ce(()=>se(qt,h(Ze).day)),w(jr,qt)},$$slots:{default:!0}})})}w(jt,Ct)},$$slots:{default:!0}})}),w(Xe,Ve)}),w(U,we)},$$slots:{default:!0}})}),w(G,ee)}),w(de,K)},$$slots:{default:!0}})}),w(A,F)},$$slots:{default:!0}})}),w(m,k)}),w(c,p)};Re(a,()=>Wg,(c,u)=>{u(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return S.locale},isDateDisabled:d=>r().isDateDisabled(d),isDateUnavailable:d=>r().isDateUnavailable(d),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(d){r().selected=d},get placeholder(){return r().startAt},set placeholder(d){r().startAt=d},children:l,$$slots:{default:!0}})})}return I(o),Vh(o,l=>M(n,l),()=>h(n)),w(t,o),ie(s)}oe(wy,{calendarClass:{}},[],["details"],{mode:"open"});function zM(t,e){ne(e,!0);const r=new MM,n=r,i=zn(e.$$host),s=C(()=>i.value);_e(()=>{r.details=h(s)}),e.$$host.addEventListener("go-date-select",u=>{h(s)&&(h(s).selectedDate=u.detail.selected,h(s).selectedTimeslot=void 0)});var o={details:n},a=W(),l=z(a);{var c=u=>{wy(u,{get calendarClass(){return r}})};fe(l,u=>{h(s)?.isCalendarVisible&&u(c)})}return w(t,a),ie(o)}customElements.define("go-calendar",oe(zM,{},[],["details"]));class ZM{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){M(this.#e,e)}constructor(e){e&&(this.#e=C(()=>e.value))}addToCart(){if(!S.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,r=e.flatMap(n=>n.nonEmptyItems.map(i=>{const s=i.product.ticket_type!="annual"?i.time:void 0;return xt(i.product,{quantity:i.quantity,time:s})}));S.cart.addItems(r),e.forEach(n=>n.items.forEach(i=>i.quantity=0)),ot.config.urls.cart&&ot.config.navigateTo(ot.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(r=>r.items.some(n=>n.quantity>0)):!1}}var VM=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function UM(t,e){ne(e,!0);const r=zn(e.$$host),n=new ZM(r);var i={details:n},s=VM();s.__click=()=>n.addToCart();var o=$(s,!0);return I(s),ce((a,l,c)=>{s.disabled=a,Ae(s,"data-x",l),se(o,c)},[()=>!n.anyTicketsSelected(),()=>!n.anyTicketsSelected(),()=>S.t("common.actions.cart")]),w(t,s),ie(i)}Hr(["click"]),customElements.define("go-add-to-cart-button",oe(UM,{},[],["details"]));async function BM(t){const e=t.go;let r=e&&e._queue||[];console.log(r);for(const n of r)try{await ky[n.method](n.options)}catch(i){console.error(i)}t.go=ky,e&&(e._queue=null)}const ky={loaded:!0,config:t=>{ot.define(t)},init:async t=>{await S.load("https://"+t.api,t.shop,t.locale)}};(async()=>await BM(window))()})();