@gomusdev/web-components 3.10.1 → 3.11.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.
- package/README.md +13 -0
- package/dist-js/gomus-webcomponents.iife.js +33 -10
- package/dist-js/gomus-webcomponents.js +33 -10
- package/dist-js/gomus-webcomponents.min.iife.js +20 -20
- package/dist-js/gomus-webcomponents.min.js +3815 -3800
- package/dist-js/src/go/go.d.ts +11 -0
- package/dist-js/src/lib/helpers/shopCart.d.ts +5 -0
- package/dist-js/src/lib/stores/shop.svelte.d.ts +6 -2
- package/dist-js/src/main.d.ts +1 -4
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
(function(){var
|
|
1
|
+
(function(){var Oy=globalThis;(Oy.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var Bn={},ot=Symbol("uninitialized"),el=Symbol("filename"),Cy="http://www.w3.org/1999/xhtml",Dy="http://www.w3.org/2000/svg",Iy="http://www.w3.org/1998/Math/MathML",Py="@attach",po=Array.isArray,$y=Array.prototype.indexOf,mo=Array.prototype.includes,vo=Array.from,go=Object.keys,bn=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,fd=Object.getOwnPropertyDescriptors,hd=Object.prototype,My=Array.prototype,yo=Object.getPrototypeOf,pd=Object.isExtensible;function ls(e){return typeof e=="function"}var Me=()=>{};function Fy(e){return e()}function tl(e){for(var t=0;t<e.length;t++)e[t]()}function md(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}var Ny=1<<24,tr=1024,rr=2048,jn=4096,rl=8192,Ry=16384,nl=32768,vd=1<<25,us=65536,w2=1<<17,k2=1<<18,yi=1<<19,gd=1<<20,cs=1<<25,ds=65536,yd=1<<21,Ly=1<<22,bo=1<<23,Nr=Symbol("$state"),il=Symbol("legacy props"),zy=Symbol(""),Uy=Symbol("proxy path"),bd=Symbol("attributes"),sl=Symbol("class"),ol=Symbol("style"),al=Symbol("text"),fs=Symbol("form reset"),S2=Symbol("hmr anchor"),_o=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},hs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function qy(e){throw new Error("https://svelte.dev/e/invariant_violation")}function _d(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Vy(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function E2(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function x2(){throw new Error("https://svelte.dev/e/derived_references_self")}function wd(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function T2(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function By(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function jy(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Zy(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Wy(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Hy(){throw new Error("https://svelte.dev/e/hydration_failed")}function A2(){throw new Error("https://svelte.dev/e/invalid_snippet")}function Gy(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function O2(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function C2(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function Ky(){throw new Error("https://svelte.dev/e/set_context_after_init")}function Yy(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Jy(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xy(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Qy(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var D2="font-weight: bold",I2="font-weight: normal";function P2(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function $2(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function eb(){console.warn("https://svelte.dev/e/derived_inert")}function tb(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function rb(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function ps(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function M2(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function nb(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ll(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function F2(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function ib(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var _e=!1;function yt(e){_e=e}var Te;function ft(e){if(e===null)throw ps(),Bn;return Te=e}function Qr(){return ft(gr(Te))}function M(e){if(_e){if(gr(Te)!==null)throw ps(),Bn;Te=e}}function Tt(e=1){if(_e){for(var t=e,r=Te;t--;)r=gr(r);Te=r}}function ms(e=!0){for(var t=0,r=Te;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=gr(r);e&&r.remove(),r=i}}function ul(e){if(!e||e.nodeType!==8)throw ps(),Bn;return e.data}function kd(e){return e===this.v}function sb(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Sd(e){return!sb(e,this.v)}var Wt=!1,bi=!1,N2=!1;function ob(){bi=!0}var R2="font-weight: bold",L2="font-weight: normal";function z2(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var ab=[];function cl(e,t=!1,r=!1){return wo(e,new Map,"",ab,null,r)}function wo(e,t,r,n,i=null,s=!1){if(typeof e=="object"&&e!==null){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(po(e)){var a=Array(e.length);t.set(e,a),i!==null&&t.set(i,a);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(a[l]=wo(c,t,r,n,null,s))}return a}if(yo(e)===hd){a={},t.set(e,a),i!==null&&t.set(i,a);for(var d of Object.keys(e))a[d]=wo(e[d],t,r,n,null,s);return a}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return wo(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var U2=null;function Ed(e,t){return e.label=t,lb(e.v,t),e}function lb(e,t){return e?.[Uy]?.(t),e}function q2(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function V2(e){const t=new Error,r=ub();return r.length===0?null:(r.unshift(`
|
|
2
2
|
`),bn(t,"stack",{value:r.join(`
|
|
3
|
-
`)}),bn(t,"name",{value:e}),t)}function
|
|
4
|
-
`),n=[];for(let i=0;i<r.length;i++){const s=r[i],o=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];o.includes("svelte/src/internal")||o.includes("node_modules/.vite")||n.push(s)}}return n}function
|
|
3
|
+
`)}),bn(t,"name",{value:e}),t)}function ub(){const e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];const r=t.split(`
|
|
4
|
+
`),n=[];for(let i=0;i<r.length;i++){const s=r[i],o=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];o.includes("svelte/src/internal")||o.includes("node_modules/.vite")||n.push(s)}}return n}function B2(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var Ue=null;function _i(e){Ue=e}var cb=null;function j2(e){cb=e}var dl=null;function Z2(e){dl=e}function xd(e){return fl("getContext").get(e)}function db(e,t){const r=fl("setContext");if(Wt){var n=Ee.f;!Ae&&(n&32)!==0&&!Ue.i||Ky()}return r.set(e,t),t}function fb(e){return fl("hasContext").has(e)}function re(e,t=!1,r){Ue={p:Ue,i:!1,c:null,e:null,s:e,x:null,r:Ee,l:bi&&!t?{s:null,u:null,$:[]}:null}}function ne(e){var t=Ue,r=t.e;if(r!==null){t.e=null;for(var n of r)Yd(n)}return e!==void 0&&(t.x=e),t.i=!0,Ue=t.p,e??{}}function vs(){return!bi||Ue!==null&&Ue.l===null}function fl(e){return Ue===null&&_d(e),Ue.c??=new Map(hb(Ue)||void 0)}function hb(e){let t=e.p;for(;t!==null;){const r=t.c;if(r!==null)return r;t=t.p}return null}var Zn=[];function Td(){var e=Zn;Zn=[],tl(e)}function nr(e){if(Zn.length===0&&!ys){var t=Zn;queueMicrotask(()=>{t===Zn&&Td()})}Zn.push(e)}function pb(){for(;Zn.length>0;)Td()}var mb=new WeakMap;function Ad(e){var t=Ee;if(t===null)return Ae.f|=bo,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;_n(e,t)}function _n(e,t){for(;t!==null;){if((t.f&128)!==0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}function W2(e,t){const r=Fr(e,"message");if(!(r&&!r.configurable)){for(var n=kl?" ":" ",i=`
|
|
5
5
|
${n}in ${t.fn?.name||"<unknown>"}`,s=t.ctx;s!==null;)i+=`
|
|
6
|
-
${n}in ${s.function?.[
|
|
6
|
+
${n}in ${s.function?.[el].split("/").pop()}`,s=s.p;return{message:e.message+`
|
|
7
7
|
${i}
|
|
8
8
|
`,stack:e.stack?.split(`
|
|
9
9
|
`).filter(o=>!o.includes("svelte/src/internal")).join(`
|
|
10
|
-
`)}}}function j2(e){const t=pb.get(e);t&&(bn(e,"message",{value:t.message}),bn(e,"stack",{value:t.stack}))}var mb=~(rr|jn|tr);function it(e,t){e.f=e.f&mb|t}function fl(e){(e.f&512)!==0||e.deps===null?it(e,tr):it(e,jn)}function Ad(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=ds,Ad(t.deps))}function Od(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Ad(e.deps),it(e,tr)}var vb=!1,wo=!1;function gb(e){var t=wo;try{return wo=!1,[e(),wo]}finally{wo=t}}var ko=null,wi=null,ke=null,gs=null,At=null,hl=null,ys=!1,pl=!1,ki=null,So=null,Cd=0,Z2=new Set,yb=1,Si=class id{id=yb++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#s=0;#a=new Map;#o=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){wi===null?ko=wi=this:(wi.#r=this,this.#t=wi),wi=this}#m(){if(this.is_fork)return!0;for(const n of this.#a.keys()){for(var t=n,r=!1;t.parent!==null;){if(this.#h.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=this.#h.get(t);if(n){this.#h.delete(t);for(var i of n.d)it(i,rr),r(i);for(i of n.m)it(i,jn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Cd++>1e3&&(this.#b(),bb());for(const l of this.#c)this.#d.delete(l),it(l,rr),this.schedule(l);for(const l of this.#d)it(l,jn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=ki=[],n=[],i=So=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw $d(l),this.#m()||this.discard(),c}if(ke=null,i.length>0){var s=id.ensure();for(const l of i)s.schedule(l)}if(ki=null,So=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Pd(l,c);i.length>0&&ke.#v();return}const o=this.#w();if(o){this.#g(n),this.#g(r),o.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),gs=this,Dd(n),Dd(r),gs=null,this.#o?.resolve();var a=ke;if(this.#s===0&&(this.#l.length===0||a!==null)&&(this.#b(),Wt&&(this.#k(),ke=a)),this.#l.length>0)if(a!==null){const l=a;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else a=this;a!==null&&a.#v()}#y(t,r,n){t.f^=tr;for(var i=t.first;i!==null;){var s=i.f,o=(s&96)!==0;if(!(o&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){o?i.f^=tr:(s&4)!==0?r.push(i):Wt&&(s&16777224)!==0?n.push(i):Ss(i)&&((s&16)!==0&&this.#d.add(i),Ai(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var l=i.next;if(l!==null){i=l;break}i=i.parent}}}#w(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=t.#t}return null}#_(t){for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const s=this.async_deriveds.get(n);s&&i.promise.then(s.resolve).catch(s.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const a of i){var s=a.f;if((s&2)!==0)r(a);else{var o=a;s&4194320&&!this.async_deriveds.has(o)&&(this.#d.delete(o),it(o,rr),this.schedule(o))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),ke=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Od(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==ot&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),At?.set(t,r)),this.is_fork||(t.v=r)}activate(){ke=this}deactivate(){ke=null,At=null}flush(){try{pl=!0,ke=this,this.#v()}finally{Cd=0,hl=null,ki=null,So=null,pl=!1,ke=null,At=null,Wn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#o?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let d=ko;d!==null;d=d.#r){var t=d.id<this.id,r=[];for(const[u,[p,f]]of this.current){if(d.current.has(u)){var n=d.current.get(u)[0];if(t&&p!==n)d.current.set(u,[p,f]);else continue}r.push(u)}if(t)for(const[u,p]of this.async_deriveds){const f=d.async_deriveds.get(u);f&&p.promise.then(f.resolve).catch(f.reject)}if(d.#e){var i=[...d.current.keys()].filter(u=>!d.current.get(u)[1]&&!this.current.has(u));if(i.length===0)t&&d.discard();else if(r.length>0){if(t)for(const u of this.#p)d.unskip_effect(u,p=>{(p.f&4194320)!==0?d.schedule(p):d.#g([p])});d.activate();var s=new Set,o=new Map;for(var a of r)Id(a,i,s,o);o=new Map;var l=[...d.current].filter(([u,p])=>{const f=this.current.get(u);return f?f[0]!==p[0]||f[1]!==p[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&ml(u,l,o)&&((u.f&4194320)!==0?(it(u,rr),d.schedule(u)):d.#c.add(u));if(d.#l.length>0&&!d.#f){d.apply();for(var c of d.#l)d.#y(c,[],[]);d.#l=[]}d.deactivate()}}}}increment(t,r){if(this.#s+=1,t){let n=this.#a.get(r)??0;this.#a.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#a.get(r)??0;n===1?this.#a.delete(r):this.#a.set(r,n-1)}this.#f||(this.#f=!0,nr(()=>{this.#f=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)this.#c.add(n);for(const n of r)this.#d.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#o??=pd()).promise}static ensure(){if(ke===null){const t=ke=new id;!pl&&!ys&&nr(()=>{t.#e||t.flush()})}return ke}apply(){if(!Wt||!this.is_fork&&this.#t===null&&this.#r===null){At=null;return}At=new Map;for(const[r,[n]]of this.current)At.set(r,n);for(let r=ko;r!==null;r=r.#r)if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)At.has(n)||At.set(n,i)}}schedule(t){if(hl=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(ki!==null&&r===Ee&&(Wt||(Ae===null||(Ae.f&2)===0)&&!vb))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=tr}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?ko=r:t.#r=r,r===null?wi=t:r.#t=t,this.linked=!1}}};function y(e){var t=ys;ys=!0;try{var r;for(e&&(ke!==null&&!ke.is_fork&&ke.flush(),r=e());;){if(hb(),ke===null)return r;ke.flush()}}finally{ys=t}}function bb(){if(0){var e;for(const r of ke.current.keys())for(const[n,i]of r.updated??[])var t}try{Zy()}catch(r){_n(r,hl)}}var Rr=null;function Dd(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Ss(n)&&(Rr=new Set,Ai(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Qd(n),Rr?.size>0)){Wn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Rr.has(o)&&(Rr.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&24576)===0&&Ai(l)}}Rr.clear()}}Rr=null}}function Id(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&2)!==0?Id(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&ml(i,t,n)&&(it(i,rr),vl(i))}}function ml(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(po.call(t,i))return!0;if((i.f&2)!==0&&ml(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function vl(e){ke.schedule(e)}function Pd(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),it(e,tr);for(var r=e.first;r!==null;)Pd(r,t),r=r.next}}function $d(e){it(e,tr);for(var t=e.first;t!==null;)$d(t),t=t.next}function gl(e){let t=0,r=wn(0),n;return()=>{El()&&(h(r),Ti(()=>(t===0&&(n=Ne(()=>e(()=>Lr(r)))),t+=1,()=>{nr(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var _b=us|yi;function wb(e,t,r,n){new kb(e,t,r,n)}var kb=class{parent;is_pending=!1;transform_error;#e;#t=_e?Te:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=gl(()=>(this.#f=wn(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=Ee;s.b=this,s.f|=128,r(i)},this.parent=Ee.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=ks(()=>{if(_e){const i=this.#t;Qr();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));this.#y(o)}else s?this.#w():this.#v()}else this.#_()},_b),_e&&(this.#e=Te)}#v(){try{this.#s=Nt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=Nt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#a=Nt(()=>e(this.#e)),nr(()=>{var t=this.#l=document.createDocumentFragment(),r=Ft();t.append(r),this.#s=this.#k(()=>Nt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Hn(this.#a,()=>{this.#a=null}),this.#g(ke))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#s=Nt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();Al(this.#s,e);const t=this.#r.pending;this.#a=Nt(()=>t(this.#e))}else this.#g(ke)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Od(e,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#k(e){var t=Ee,r=Ae,n=Ue;sr(this.#i),Rt(this.#i),_i(this.#i.ctx);try{return Si.ensure(),e()}catch(i){return Td(i),null}finally{sr(t),Rt(r),_i(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#c+=e,this.#c===0&&(this.#g(t),this.#a&&Hn(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(e,t){this.#b(e,t),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,nr(()=>{this.#d=!1,this.#f&&xi(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),h(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;ke?.is_fork?(this.#s&&ke.skip_effect(this.#s),this.#a&&ke.skip_effect(this.#a),this.#o&&ke.skip_effect(this.#o),ke.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(mt(this.#s),this.#s=null),this.#a&&(mt(this.#a),this.#a=null),this.#o&&(mt(this.#o),this.#o=null),_e&&(ft(this.#t),Tt(),ft(ms()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){nb();return}n=!0,i&&Xy(),this.#o!==null&&Hn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},o=a=>{try{i=!0,t?.(a,s),i=!1}catch(l){_n(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return Nt(()=>{var l=Ee;l.b=this,l.f|=128,r(this.#e,()=>a,()=>s)})}catch(l){return _n(l,this.#i.parent),null}}))};nr(()=>{var a;try{a=this.transform_error(e)}catch(l){_n(l,this.#i&&this.#i.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,l=>_n(l,this.#i&&this.#i.parent)):o(a)})}};function Md(e,t,r,n){const i=vs()?Ei:yl;var s=e.filter(f=>!f.settled),o=t.map(i);if(r.length===0&&s.length===0){n(o);return}var a=Ee,l=Sb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(f=>f.promise)):null;function d(f){if((a.f&16384)===0){l();try{n([...o,...f])}catch(g){_n(g,a)}Eo()}}var u=Fd();if(r.length===0){c.then(()=>d([])).finally(u);return}function p(){Promise.all(r.map(f=>xb(f))).then(d).catch(f=>_n(f,a)).finally(u)}c?c.then(()=>{l(),p(),Eo()}):p()}function Sb(){var e=Ee,t=Ae,r=Ue,n=ke;if(0)var i;return function(o=!0){sr(e),Rt(t),_i(r),o&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function Eo(e=!0){sr(null),Rt(null),_i(null),e&&ke?.deactivate()}function Fd(){var e=Ee,t=e.b,r=ke,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var Eb=null;function W2(e){Eb=e}var H2=new Set;function Ei(e){var t=2|rr;return Ee!==null&&(Ee.f|=yi),{ctx:Ue,deps:null,effects:null,equals:wd,f:t,fn:e,reactions:null,rv:0,v:ot,wv:0,parent:Ee,ac:null}}var xo=Symbol("obsolete");function xb(e,t,r){let n=Ee;n===null&&qy();var i=void 0,s=wn(ot),o=!Ae,a=new Set;return Lb(()=>{var l=Ee,c=pd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,f=>{f!==bo&&c.reject(f)}).finally(Eo)}catch(f){c.reject(f),Eo()}var d=ke;if(o){if((l.f&32768)!==0)var u=Fd();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(xo);else for(const f of a.values())f.reject(xo);a.add(c),d.async_deriveds.set(l,c)}const p=(f,g=void 0)=>{u?.(),a.delete(c),g!==xo&&(d.activate(),g?(s.f|=yo,xi(s,g)):((s.f&8388608)!==0&&(s.f^=yo),xi(s,f)),d.deactivate())};c.promise.then(p,f=>p(null,f||"unknown"))}),Do(()=>{for(const l of a)l.reject(xo)}),new Promise(l=>{function c(d){function u(){d===i?l(s):c(i)}d.then(u,u)}c(i)})}function D(e){const t=Ei(e);return Wt||nf(t),t}function yl(e){const t=Ei(e);return t.equals=kd,t}function Tb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)mt(t[r])}}var G2=[];function bl(e){var t,r=Ee,n=e.parent;if(!en&&n!==null&&e.v!==ot&&(n.f&24576)!==0)return Qy(),e.v;sr(n);try{e.f&=~ds,Tb(e),t=uf(e)}finally{sr(r)}return t}function Nd(e){var t=bl(e);if(!e.equals(t)&&(e.wv=af(),(!ke?.is_fork||e.deps===null)&&(ke!==null?(ke.capture(e,t,!0),gs?.capture(e,t,!0)):e.v=t,e.deps===null))){it(e,tr);return}en||(At!==null?(El()||ke?.is_fork)&&At.set(e,t):fl(e))}function Ab(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(bo),t.fn!==null&&(t.teardown=Me),t.ac=null,Es(t,0),Tl(t))}function Rd(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ai(t)}var bs=new Set,Wn=new Map;function K2(e){bs=e}var _l=!1;function Ob(){_l=!0}function wn(e,t){var r={f:0,v:e,reactions:null,equals:wd,rv:0,wv:0};return r}function te(e,t){const r=wn(e,t);return nf(r),r}function Ld(e,t=!1,r=!0){const n=wn(e);return t||(n.equals=kd),bi&&r&&Ue!==null&&Ue.l!==null&&(Ue.l.s??=[]).push(n),n}function I(e,t,r=!1){Ae!==null&&(!yr||(Ae.f&131072)!==0)&&vs()&&(Ae.f&4325394)!==0&&(zr===null||!zr.has(e))&&Jy();let n=r?Fe(t):t;return xi(e,n,So)}function xi(e,t,r=null){if(!e.equals(t)){Wn.set(e,en?t:e.v);var n=Si.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&bl(i),At===null&&fl(i)}e.wv=af(),Ud(e,rr,r),vs()&&Ee!==null&&(Ee.f&1024)!==0&&(Ee.f&96)===0&&(or===null?qb([e]):or.push(e)),!n.is_fork&&bs.size>0&&!_l&&zd()}return t}function zd(){_l=!1;for(const e of bs){(e.f&1024)!==0&&it(e,jn);let t;try{t=Ss(e)}catch{t=!0}t&&Ai(e)}bs.clear()}function Lr(e){I(e,e.v+1)}function Ud(e,t,r){var n=e.reactions;if(n!==null)for(var i=vs(),s=n.length,o=0;o<s;o++){var a=n[o],l=a.f;if(!(!i&&a===Ee)){var c=(l&rr)===0;if(c&&it(a,t),(l&131072)!==0)bs.add(a);else if((l&2)!==0){var d=a;At?.delete(d),(l&65536)===0&&(l&512&&(Ee===null||(Ee.f&2097152)===0)&&(a.f|=ds),Ud(d,jn,r))}else if(c){var u=a;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):vl(u)}}}}var Cb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Fe(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=go(e);if(t!==fd&&t!==$y)return e;var r=new Map,n=ho(e),i=te(0),s=null,o=tn,a=u=>{if(tn===o)return u();var p=Ae,f=tn;Rt(null),of(o);var g=u();return Rt(p),of(f),g};n&&r.set("length",te(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,Sd(i,`${l} version`);for(const[p,f]of r)Sd(f,Db(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ky();var g=r.get(p);return g===void 0?a(()=>{var m=te(f.value,s);return r.set(p,m),m}):I(g,f.value,!0),!0},deleteProperty(u,p){var f=r.get(p);if(f===void 0){if(p in u){const g=a(()=>te(ot,s));r.set(p,g),Lr(i)}}else I(f,ot),Lr(i);return!0},get(u,p,f){if(p===Nr)return e;var g=r.get(p),m=p in u;if(g===void 0&&(!m||Fr(u,p)?.writable)&&(g=a(()=>{var _=te(Fe(m?u[p]:ot),s);return _}),r.set(p,g)),g!==void 0){var v=h(g);return v===ot?void 0:v}return Reflect.get(u,p,f)},getOwnPropertyDescriptor(u,p){var f=Reflect.getOwnPropertyDescriptor(u,p);if(f&&"value"in f){var g=r.get(p);g&&(f.value=h(g))}else if(f===void 0){var m=r.get(p),v=m?.v;if(m!==void 0&&v!==ot)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(u,p){if(p===Nr)return!0;var f=r.get(p),g=f!==void 0&&f.v!==ot||Reflect.has(u,p);return(f!==void 0||Ee!==null&&(!g||Fr(u,p)?.writable))&&(f===void 0&&(f=a(()=>{var m=te(g?Fe(u[p]):ot,s);return m}),r.set(p,f)),h(f)===ot)?!1:g},set(u,p,f,g){var m=r.get(p),v=p in u;if(n&&p==="length")for(var _=f;_<m.v;_+=1){var k=r.get(_+"");k!==void 0?I(k,ot):_ in u&&(k=a(()=>te(ot,s)),r.set(_+"",k))}if(m===void 0)(!v||Fr(u,p)?.writable)&&(m=a(()=>te(void 0,s)),I(m,Fe(f)),r.set(p,m));else{v=m.v!==ot;var A=a(()=>Fe(f));I(m,A)}var E=Reflect.getOwnPropertyDescriptor(u,p);if(E?.set&&E.set.call(g,f),!v){if(n&&typeof p=="string"){var T=r.get("length"),O=Number(p);Number.isInteger(O)&&O>=T.v&&I(T,O+1)}Lr(i)}return!0},ownKeys(u){h(i);var p=Reflect.ownKeys(u).filter(m=>{var v=r.get(m);return v===void 0||v.v!==ot});for(var[f,g]of r)g.v!==ot&&!(f in u)&&p.push(f);return p},setPrototypeOf(){Yy()}})}function Db(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Cb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function _s(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function qd(e,t){return Object.is(_s(e),_s(t))}var Ib=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function Y2(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return Ib.has(r)?function(...s){Ob();var o=i.apply(this,s);return zd(),o}:i}})}function J2(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,o){const a=r.call(this,s,o);if(a===-1){for(let l=o??0;l<this.length;l+=1)if(_s(this[l])===s){al("array.indexOf(...)");break}}return a},e.lastIndexOf=function(s,o){const a=n.call(this,s,o??this.length-1);if(a===-1){for(let l=0;l<=(o??this.length-1);l+=1)if(_s(this[l])===s){al("array.lastIndexOf(...)");break}}return a},e.includes=function(s,o){const a=i.call(this,s,o);if(!a){for(let l=0;l<this.length;l+=1)if(_s(this[l])===s){al("array.includes(...)");break}}return a},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Vd,Pb,wl,Bd,jd;function kl(){if(Vd===void 0){Vd=window,Pb=document,wl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Bd=Fr(t,"firstChild").get,jd=Fr(t,"nextSibling").get,hd(e)&&(e[il]=void 0,e[yd]=null,e[sl]=void 0,e.__e=void 0),hd(r)&&(r[ol]=void 0)}}function Ft(e=""){return document.createTextNode(e)}function Ht(e){return Bd.call(e)}function gr(e){return jd.call(e)}function F(e,t){if(!_e)return Ht(e);var r=Ht(Te);if(r===null)r=Te.appendChild(Ft());else if(t&&r.nodeType!==3){var n=Ft();return r?.before(n),ft(n),n}return t&&Ao(r),ft(r),r}function q(e,t=!1){if(!_e){var r=Ht(e);return r instanceof Comment&&r.data===""?gr(r):r}if(t){if(Te?.nodeType!==3){var n=Ft();return Te?.before(n),ft(n),n}Ao(Te)}return Te}function X(e,t=1,r=!1){let n=_e?Te:e;for(var i;t--;)i=n,n=gr(n);if(!_e)return n;if(r){if(n?.nodeType!==3){var s=Ft();return n===null?i?.after(s):n.before(s),ft(s),s}Ao(n)}return ft(n),n}function Sl(e){e.textContent=""}function Zd(){return!Wt||Rr!==null?!1:(Ee.f&rl)!==0}function To(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function $b(e=""){return document.createComment(e)}function Ao(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Mb(e,t){if(t){const r=document.body;e.autofocus=!0,nr(()=>{document.activeElement===r&&e.focus()})}}function Fb(e){_e&&Ht(e)!==null&&Sl(e)}var Wd=!1;function Hd(){Wd||(Wd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[fs]?.()})},{capture:!0}))}function Oo(e){var t=Ae,r=Ee;Rt(null),sr(null);try{return e()}finally{Rt(t),sr(r)}}function Co(e,t,r,n=r){e.addEventListener(t,()=>Oo(r));const i=e[fs];i?e[fs]=()=>{i(),n(!0)}:e[fs]=()=>n(!0),Hd()}function Gd(e){Ee===null&&(Ae===null&&jy(e),By()),en&&Vy(e)}function Nb(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ir(e,t){var r=Ee;r!==null&&(r.f&8192)!==0&&(e|=tl);var n={ctx:Ue,deps:null,nodes:null,f:e|rr|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};ke?.register_created_effect(n);var i=n;if((e&4)!==0)ki!==null?ki.push(n):Si.ensure().schedule(n);else if(t!==null){try{Ai(n)}catch(o){throw mt(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&524288)===0&&(i=i.first,(e&16)!==0&&(e&65536)!==0&&i!==null&&(i.f|=us))}if(i!==null&&(i.parent=r,r!==null&&Nb(i,r),Ae!==null&&(Ae.f&2)!==0&&(e&64)===0)){var s=Ae;(s.effects??=[]).push(i)}return n}function El(){return Ae!==null&&!yr}function Do(e){const t=ir(8,null);return it(t,tr),t.teardown=e,t}function ge(e){Gd("$effect");var t=Ee.f;if(!Ae&&(t&32)!==0&&Ue!==null&&!Ue.i){var r=Ue;(r.e??=[]).push(e)}else return Kd(e)}function Kd(e){return ir(4|vd,e)}function xl(e){return Gd("$effect.pre"),ir(8|vd,e)}function ws(e){Si.ensure();const t=ir(64|yi,e);return()=>{mt(t)}}function Rb(e){Si.ensure();const t=ir(64|yi,e);return(r={})=>new Promise(n=>{r.outro?Hn(t,()=>{mt(t),n(void 0)}):(mt(t),n(void 0))})}function Io(e){return ir(4,e)}function Lb(e){return ir(Ry|yi,e)}function Ti(e,t=0){return ir(8|t,e)}function ce(e,t=[],r=[],n=[]){Md(n,t,r,i=>{ir(8,()=>{e(...i.map(h))})})}function ks(e,t=0){var r=ir(16|t,e);return r}function Yd(e,t=0){var r=ir(Fy|t,e);return r}function Nt(e){return ir(32|yi,e)}function Jd(e){var t=e.teardown;if(t!==null){const r=en,n=Ae;rf(!0),Rt(null);try{t.call(null)}finally{rf(r),Rt(n)}}}function Tl(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Oo(()=>{i.abort(bo)});var n=r.next;(r.f&64)!==0?r.parent=null:mt(r,t),r=n}}function zb(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&mt(t),t=r}}function mt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Xd(e.nodes.start,e.nodes.end),r=!0),e.f|=md,Tl(e,t&&!r),Es(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Jd(e),e.f^=md,e.f|=Ny;var i=e.parent;i!==null&&i.first!==null&&Qd(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Xd(e,t){for(;e!==null;){var r=e===t?null:gr(e);e.remove(),e=r}}function Qd(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Hn(e,t,r=!0){var n=[];ef(e,n,!0);var i=()=>{r&&mt(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function ef(e,t,r){if((e.f&8192)===0){e.f^=tl;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;ef(i,t,o?r:!1)}i=s}}}function Po(e){tf(e,!0)}function tf(e,t){if((e.f&8192)!==0){e.f^=tl,(e.f&1024)===0&&(it(e,rr),Si.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;tf(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Al(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:gr(r);t.append(r),r=i}}var Ub=null,$o=!1,en=!1;function rf(e){en=e}var Ae=null,yr=!1;function Rt(e){Ae=e}var Ee=null;function sr(e){Ee=e}var zr=null;function nf(e){Ae!==null&&(!Wt||(Ae.f&2)!==0)&&(zr??=new Set).add(e)}var Lt=null,Gt=0,or=null;function qb(e){or=e}var sf=1,Gn=0,tn=Gn;function of(e){tn=e}function af(){return++sf}function Ss(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~ds),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Ss(s)&&Nd(s),s.wv>e.wv)return!0}(t&512)!==0&&At===null&&it(e,tr)}return!1}function lf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Wt&&zr!==null&&zr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?lf(s,t,!1):t===s&&(r?it(s,rr):(s.f&1024)!==0&&it(s,jn),vl(s))}}function uf(e){var t=Lt,r=Gt,n=or,i=Ae,s=zr,o=Ue,a=yr,l=tn,c=e.f;Lt=null,Gt=0,or=null,Ae=(c&96)===0?e:null,zr=null,_i(e.ctx),yr=!1,tn=++Gn,e.ac!==null&&(Oo(()=>{e.ac.abort(bo)}),e.ac=null);try{e.f|=gd;var d=e.fn,u=d();e.f|=rl;var p=e.deps,f=ke?.is_fork;if(Lt!==null){var g;if(f||Es(e,Gt),p!==null&&Gt>0)for(p.length=Gt+Lt.length,g=0;g<Lt.length;g++)p[Gt+g]=Lt[g];else e.deps=p=Lt;if(El()&&(e.f&512)!==0)for(g=Gt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!f&&p!==null&&Gt<p.length&&(Es(e,Gt),p.length=Gt);if(vs()&&or!==null&&!yr&&p!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)lf(or[g],e);if(i!==null&&i!==e){if(Gn++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=Gn;if(t!==null)for(const m of t)m.rv=Gn;or!==null&&(n===null?n=or:n.push(...or))}return(e.f&8388608)!==0&&(e.f^=yo),u}catch(m){return Td(m)}finally{e.f^=gd,Lt=t,Gt=r,or=n,Ae=i,zr=s,_i(o),yr=a,tn=l}}function Vb(e,t){let r=t.reactions;if(r!==null){var n=Py.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(Lt===null||!po.call(Lt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~ds),s.v!==ot&&fl(s),Ab(s),Es(s,0)}}function Es(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Vb(e,r[n])}function Ai(e){var t=e.f;if((t&16384)===0){it(e,tr);var r=Ee,n=$o;if(Ee=e,$o=!0,0)var i,s;try{(t&16777232)!==0?zb(e):Tl(e),Jd(e);var o=uf(e);if(e.teardown=typeof o=="function"?o:null,e.wv=sf,0)for(var a of e.deps);}finally{$o=n,Ee=r}}}async function cf(){if(Wt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),y()}function h(e){var t=(e.f&2)!==0;if(Ub?.add(e),Ae!==null&&!yr&&!(Ee!==null&&(Ee.f&16384)!==0)&&(zr===null||!zr.has(e))){var r=Ae.deps;if((Ae.f&2097152)!==0)e.rv<Gn&&(e.rv=Gn,Lt===null&&r!==null&&r[Gt]===e?Gt++:Lt===null?Lt=[e]:Lt.push(e));else{Ae.deps??=[],po.call(Ae.deps,e)||Ae.deps.push(e);var n=e.reactions;n===null?e.reactions=[Ae]:po.call(n,Ae)||n.push(Ae)}}if(0){if(!yr&&Eb&&!Eb.warned&&(Eb.effect.f&2097152)===0&&!Eb.effect_deps.has(e))var i;if($2&&!yr&&R2!==null&&Ae!==null&&R2.reaction===Ae&&!e.trace){if(i)var s,o}}if(en&&Wn.has(e))return Wn.get(e);if(t){var a=e;if(en){var l=a.v;return((a.f&1024)===0&&a.reactions!==null||ff(a))&&(l=bl(a)),Wn.set(a,l),l}var c=(a.f&512)===0&&!yr&&Ae!==null&&($o||(Ae.f&512)!==0),d=(a.f&rl)===0;Ss(a)&&(c&&(a.f|=512),Nd(a)),c&&!d&&(Rd(a),df(a))}if(At?.has(e))return At.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function df(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&2)!==0&&(t.f&512)===0&&(Rd(t),df(t))}function ff(e){if(e.v===ot)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Wn.has(t)||(t.f&2)!==0&&ff(t))return!0;return!1}function Ne(e){var t=yr;try{return yr=!0,e()}finally{yr=t}}function Bb(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)Ol(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&Ol(r)}}}function Ol(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ol(e[n],t)}catch{}const r=go(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=dd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var xs=Symbol("events"),hf=new Set,Cl=new Set;function Dl(e,t,r,n={}){function i(s){if(n.capture||Il.call(t,s),!s.cancelBubble)return Oo(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?nr(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function vt(e,t,r,n={}){var i=Dl(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Mo(e,t,r,n,i){var s={capture:n,passive:i},o=Dl(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Do(()=>{t.removeEventListener(e,o,s)})}function at(e,t,r){(t[xs]??={})[e]=r}function br(e){for(var t=0;t<e.length;t++)hf.add(e[t]);for(var r of Cl)r(e)}var pf=null;function Il(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;pf=e;var o=0,a=pf===e&&e[xs];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[xs]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){bn(e,"currentTarget",{configurable:!0,get(){return s||r}});var d=Ae,u=Ee;Rt(null),sr(null);try{for(var p,f=[];s!==null&&s!==t;){try{var g=s[xs]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){p?f.push(m):p=m}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(p){for(let m of f)queueMicrotask(()=>{throw m});throw p}}finally{e[xs]=t,delete e.currentTarget,Rt(d),sr(u)}}}var jb=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function mf(e){return jb?.createHTML(e)??e}function Zb(e){var t=To("template");return t.innerHTML=mf(e.replaceAll("<!>","<!---->")),t.content}function _r(e,t){var r=Ee;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function j(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(_e)return _r(Te,null),Te;i===void 0&&(i=Zb(s?e:"<!>"+e),r||(i=Ht(i)));var o=n||wl?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Ht(o),l=o.lastChild;_r(a,l)}else _r(o,o);return o}}function zt(e=""){if(!_e){var t=Ft(e+"");return _r(t,t),t}var r=Te;return r.nodeType!==3?(r.before(r=Ft()),ft(r)):Ao(r),_r(r,r),r}function Y(){if(_e)return _r(Te,null),Te;var e=document.createDocumentFragment(),t=document.createComment(""),r=Ft();return e.append(t,r),_r(t,r),e}function x(e,t){if(_e){var r=Ee;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Te),Qr();return}e!==null&&e.before(t)}function ht(){if(_e&&Te&&Te.nodeType===8&&Te.textContent?.startsWith("$")){const e=Te.textContent.substring(1);return Qr(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var Wb=/\r/g;function Hb(e){e=e.replace(Wb,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function Gb(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var Kb=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Yb(e){return Kb.includes(e)}var Jb=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],Xb={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 Qb(e){return e=e.toLowerCase(),Xb[e]??e}var X2=[...Jb,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],e_=["touchstart","touchmove"];function t_(e){return e_.includes(e)}var r_=["$state","$state.raw","$derived","$derived.by"],Q2=[...r_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function n_(e){return e?.replace(/\//g,"/")}var vf=!0;function se(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[ol]??=e.nodeValue)&&(e[ol]=r,e.nodeValue=`${r}`)}function gf(e,t){return yf(e,t)}function i_(e,t){kl(),t.intro=t.intro??!1;const r=t.target,n=_e,i=Te;try{for(var s=Ht(r);s&&(s.nodeType!==8||s.data!=="[");)s=gr(s);if(!s)throw Bn;yt(!0),ft(s);const o=yf(e,{...t,anchor:s});return yt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
11
|
-
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Bn&&console.warn("Failed to hydrate: ",o),t.recover===!1&&
|
|
12
|
-
\r\f \v\uFEFF`];function p_(e,t,r){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||wf.includes(n[o-1]))&&(a===n.length||wf.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function kf(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var s=e[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Fl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function m_(e,t){if(t){var r="",n,i;if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Fl)),i&&l.push(...Object.keys(i).map(Fl));var c=0,d=-1;const m=e.length;for(var u=0;u<m;u++){var p=e[u];if(a?p==="/"&&e[u-1]==="*"&&(a=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?a=!0:p==='"'||p==="'"?s=p:p==="("?o++:p===")"&&o--,!a&&s===!1&&o===0){if(p===":"&&d===-1)d=u;else if(p===";"||u===m-1){if(d!==-1){var f=Fl(e.substring(c,d).trim());if(!l.includes(f)){p!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,d=-1}}}}return n&&(r+=kf(n)),i&&(r+=kf(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Ot(e,t,r,n,i,s){var o=e[il];if(_e||o!==r||o===void 0){var a=p_(r,n,s);(!_e||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[il]=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function Nl(e,t={},r,n){for(var i in r){var s=r[i];t[i]!==s&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,s,n))}}function v_(e,t,r,n){var i=e[sl];if(_e||i!==t){var s=m_(t,n);(!_e||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[sl]=t}else n&&(Array.isArray(n)?(Nl(e,r?.[0],n[0]),Nl(e,r?.[1],n[1],"important")):Nl(e,r,n));return n}function Ro(e,t,r=!1){if(e.multiple){if(t==null)return;if(!ho(t))return rb();for(var n of e.options)n.selected=t.includes(Os(n));return}for(n of e.options)if(qd(Os(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Sf(e){var t=new MutationObserver(()=>{Ro(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Do(()=>{t.disconnect()})}function g_(e,t,r=t){var n=new WeakSet,i=!0;Co(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),Os);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&Os(l)}r(a),e.__value=a,ke!==null&&n.add(ke)}),Io(()=>{var s=t();if(e===document.activeElement){var o=Wt?gs:ke;if(n.has(o))return}if(Ro(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=Os(a),r(s))}e.__value=s,i=!1}),Sf(e)}function Os(e){return"__value"in e?e.__value:e.value}var Cs=Symbol("class"),Ds=Symbol("style"),Ef=Symbol("is custom element"),xf=Symbol("is html"),y_=hs?"link":"LINK",Tf=hs?"input":"INPUT",b_=hs?"option":"OPTION",__=hs?"select":"SELECT",w_=hs?"progress":"PROGRESS";function Is(e){if(_e){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;pe(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;pe(e,"checked",null),e.checked=i}}};e[fs]=r,nr(r),Hd()}}function Rl(e,t){var r=Lo(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==w_)||(e.value=t??"")}function k_(e,t){var r=Lo(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Ll(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function pe(e,t,r,n){var i=Lo(e);if(_e&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===y_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[Ly]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ul(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Kn(e,t,r){var n=Ae,i=Ee;let s=_e;_e&&yt(!1),Rt(null),sr(null);try{t!=="style"&&(zl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Ul(e).includes(t):r&&typeof r=="object")?e[t]=r:pe(e,t,r==null?r:String(r))}finally{Rt(n),sr(i),s&&yt(!0)}}function S_(e,t,r,n,i=!1,s=!1){if(_e&&i&&e.nodeName===Tf){var o=e;(o.type==="checkbox"?"defaultChecked":"defaultValue")in r||Is(o)}var a=Lo(e),l=a[Ef],c=!a[xf];let d=_e&&l;d&&yt(!1);var u=t||{},p=e.nodeName===b_;for(var f in t)f in r||(r[f]=null);r.class?r.class=wr(r.class):(n||r[Cs])&&(r.class=null),r[Ds]&&(r.style??=null);var g=Ul(e);if(e.nodeName===Tf&&"type"in r&&("value"in r||"__value"in r)){var m=r.type;(m!==u.type||m===void 0&&e.hasAttribute("type"))&&(u.type=m,pe(e,"type",m,s))}for(const O in r){let $=r[O];if(p&&O==="value"&&$==null){e.value=e.__value="",u[O]=$;continue}if(O==="class"){Ot(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",$,n,t?.[Cs],r[Cs]),u[O]=$,u[Cs]=r[Cs];continue}if(O==="style"){v_(e,$,t?.[Ds],r[Ds]),u[O]=$,u[Ds]=r[Ds];continue}var v=u[O];if(!($===v&&!($===void 0&&e.hasAttribute(O)))){u[O]=$;var _=O[0]+O[1];if(_!=="$$")if(_==="on"){const R={},U="$$"+O;let N=O.slice(2);var k=Yb(N);if(Gb(N)&&(N=N.slice(0,-7),R.capture=!0),!k&&v){if($!=null)continue;e.removeEventListener(N,u[U],R),u[U]=null}if(k)at(N,e,$),br([N]);else if($!=null){let le=function(V){u[O].call(this,V)};var T=le;u[U]=Dl(N,e,le,R)}}else if(O==="style")pe(e,O,$);else if(O==="autofocus")Mb(e,!!$);else if(!l&&(O==="__value"||O==="value"&&$!=null))e.value=e.__value=$;else if(O==="selected"&&p)Ll(e,$);else{var A=O;c||(A=Qb(A));var E=A==="defaultValue"||A==="defaultChecked";if($==null&&!l&&!E)if(a[O]=null,A==="value"||A==="checked"){let R=e;const U=t===void 0;if(A==="value"){let N=R.defaultValue;R.removeAttribute(A),R.defaultValue=N,R.value=R.__value=U?N:null}else{let N=R.defaultChecked;R.removeAttribute(A),R.defaultChecked=N,R.checked=U?N:!1}}else e.removeAttribute(O);else E||g.includes(A)&&(l||typeof $!="string")?(e[A]=$,A in a&&(a[A]=ot)):typeof $!="function"&&pe(e,A,$,s)}}}return d&&yt(!0),u}function Re(e,t,r=[],n=[],i=[],s,o=!1,a=!1){Md(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===__,p=!1;if(Yd(()=>{var g=t(...l.map(h)),m=S_(e,c,g,s,o,a);p&&u&&"value"in g&&Ro(e,g.value);for(let _ of Object.getOwnPropertySymbols(d))g[_]||mt(d[_]);for(let _ of Object.getOwnPropertySymbols(g)){var v=g[_];_.description==="@attach"&&(!c||v!==c[_])&&(d[_]&&mt(d[_]),d[_]=Nt(()=>h_(e,()=>v))),m[_]=v}c=m}),u){var f=e;Io(()=>{Ro(f,c.value,!0),Sf(f)})}p=!0})}function Lo(e){return e[yd]??={[Ef]:e.nodeName.includes("-"),[xf]:e.namespaceURI===Oy}}var zl=new Map;function Ul(e){var t=e.getAttribute("is")||e.nodeName,r=zl.get(t);if(r)return r;zl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=dd(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=go(i)}return r}function rF(e,t,r){}function ql(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Af(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function E_(e,t){var r=Af(e.srcset),n=Af(t);return n.length===r.length&&n.every(([i,s],o)=>s===r[o][1]&&(ql(r[o][0],i)||ql(i,r[o][0])))}var Vl=null;function x_(){if(Vl===null){var e=To("select");e.innerHTML=mf("<option><span>t</span></option>"),Vl=e.firstChild?.firstChild?.nodeType===1}return Vl}function T_(e,t){var r=_e;x_()||(yt(!1),e.textContent="",e.append($b("")));try{t()}finally{r&&(_e?M(e):(yt(!0),ft(e)))}}function zo(e,t,r=t){var n=new WeakSet;Co(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=jl(e)?Zl(s):s,r(s),ke!==null&&n.add(ke),await cf(),s!==(s=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=s??"",a!==null){var c=e.value.length;o===a&&a===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=o,e.selectionEnd=Math.min(a,c))}}}),(_e&&e.defaultValue!==e.value||Ne(t)==null&&e.value)&&(r(jl(e)?Zl(e.value):e.value),ke!==null&&n.add(ke)),Ti(()=>{var i=t();if(e===document.activeElement){var s=Wt?gs:ke;if(n.has(s))return}jl(e)&&i===Zl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Bl=new Set;function A_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=e;let a=!1;if(t!==null)for(var l of t)o=o[l]??=[];o.push(r),Co(r,"change",()=>{var c=r.__value;s&&(c=Of(o,c,r.checked)),i(c)},()=>i(s?[]:null)),Ti(()=>{var c=n();if(_e&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=qd(r.__value,c)}),Do(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Bl.has(o)||(Bl.add(o),nr(()=>{o.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),Bl.delete(o)})),nr(()=>{if(a){var c;s?c=Of(o,c,r.checked):c=o.find(d=>d.checked)?.__value,i(c)}})}function O_(e,t,r=t){Co(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(_e&&e.defaultChecked!==e.checked||Ne(t)==null)&&r(e.checked),Ti(()=>{var n=t();e.checked=!!n})}function Of(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function jl(e){var t=e.type;return t==="number"||t==="range"}function Zl(e){return e===""?null:+e}function Wl(e,t){return e===t||e?.[Nr]===t}function Hl(e={},t,r,n){var i=Ue.r,s=Ee;return Io(()=>{var o,a;return Ti(()=>{o=a,a=n?.()||[],Ne(()=>{Wl(r(...a),e)||(t(e,...a),o&&Wl(r(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{a&&Wl(r(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function Gl(e=!1){const t=Ue,r=t.l.u;if(!r)return;let n=()=>Bb(t.s);if(e){let i=0,s={};const o=Ei(()=>{let a=!1;const l=t.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&&xl(()=>{Cf(t,n),el(r.b)}),ge(()=>{const i=Ne(()=>r.m.map(My));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ge(()=>{Cf(t,n),el(r.a)})}function Cf(e,t){if(e.l.s)for(const r of e.l.s)h(r);t()}var C_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function je(e,t,r){return new Proxy({props:e,exclude:t},C_)}var D_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ls(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let i=e.props[n];ls(i)&&(i=i());const s=Fr(i,t);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ls(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Fr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Nr||t===nl)return!1;for(let r of e.props)if(ls(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(ls(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function Sn(...e){return new Proxy({props:e},D_)}function b(e,t,r,n){var i=!bi||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=n,l=!0,c=void 0,d=()=>o&&i?(c??=Ei(n),h(c)):(l&&(l=!1,a=o?Ne(n):n),a);let u;if(s){var p=Nr in e||nl in e;u=Fr(e,t)?.set??(p&&t in e?E=>e[t]=E:void 0)}var f,g=!1;s?[f,g]=gb(()=>e[t]):f=e[t],f===void 0&&n!==void 0&&(f=d(),u&&(i&&Hy(t),u(f)));var m;if(i?m=()=>{var E=e[t];return E===void 0?d():(l=!0,E)}:m=()=>{var E=e[t];return E!==void 0&&(a=void 0),E===void 0?a:E},i&&(r&4)===0)return m;if(u){var v=e.$$legacy;return(function(E,T){return arguments.length>0?((!i||!T||v||g)&&u(T?m():E),E):m()})}var _=!1,k=((r&1)!==0?Ei:yl)(()=>(_=!1,m()));s&&h(k);var A=Ee;return(function(E,T){if(arguments.length>0){const O=T?h(k):i&&s?Fe(E):E;return I(k,O),_=!0,a!==void 0&&(a=O),E}return en&&_||(A.f&16384)!==0?k.v:h(k)})}function I_(e){return new P_(e)}var P_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var o=Ld(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return h(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===nl?!0:(h(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return I(t.get(s)??r(s,o),o),Reflect.set(i,s,o)}});this.#t=(e.hydrate?i_:gf)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Wt&&(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=n.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||bn(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{s_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const r=(...n)=>t.call(this,...n);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(n=>n!==r)}}$destroy(){this.#t.$destroy()}},Df;typeof HTMLElement=="function"&&(Df=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const o=To("slot");i!=="default"&&(o.name=i),x(s,o)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=$_(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=Uo(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=I_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ws(()=>{Ti(()=>{this.$$r=!0;for(const i of vo(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Uo(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const o=this.$$c.$on(i,s);this.$$l_u.set(s,o)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Uo(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return vo(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Uo(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function $_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ie(e,t,r,n,i,s){let o=class extends Df{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return vo(t).map(a=>(t[a].attribute||a).toLowerCase())}};return vo(t).forEach(a=>{bn(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Uo(a,l,t),this.$$d[a]=l;var c=this.$$c;c&&(Fr(c,a)?.get?c[a]=l:c.$set({[a]:l}))}})}),n.forEach(a=>{bn(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),e.element=o,o}var If={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:e=>`/#/checkout/failure?payment_error=${e}`,checkoutSuccess:e=>`/#/checkout/success?ORDERID=${e}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:e=>"/#/tickets/combi?group="+e,dayTickets:()=>"/#/tickets/day",eventGroup:N_,event:e=>"/#/product/event/"+e,events:()=>"/#/products/events",exhibition:e=>"/#/exhibition/"+e,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:e=>"/#/merchandise/detail/"+e,merchandises:()=>"/#/merchandise/list",museum:e=>"/#/museum/"+e,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:e=>"/#/tickets/filters?group="+e,tour:e=>"/#/product/tour/"+e,tours:()=>"/#/products/tours",toursGroup:R_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},M_={...If,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function F_(e){return e==="angular"?If:M_}function N_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function R_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function L_(e){return new Promise(t=>setTimeout(t,e))}function Pf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function z_(e){return typeof e=="boolean"}function Kl(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=e();if(a){r(a);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}var Yl=Array.isArray,$f=e=>!!e&&e.constructor===Object,U_=e=>typeof e=="string"||e instanceof String,q_=e=>{try{return Number(e)===e}catch{return!1}},V_=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Mf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function En(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var B_=(e,t,r=!1)=>{if(!e)return[];const n=(s,o)=>t(s)-t(o),i=(s,o)=>t(o)-t(s);return e.slice().sort(r===!0?i:n)};function j_(e,t){const r=t??(n=>n);return Mf(e,(n,i)=>r(n)>r(i)?n:i)}function Jl(e,t){const r=t??(n=>n);return Mf(e,(n,i)=>r(n)<r(i)?n:i)}var Z_=(e,t)=>{const r=e.reduce((n,i)=>{const s=t?t(i):i;return n[s]||(n[s]=i),n},{});return Object.values(r)},Ff=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},W_=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},kt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:$f(e[n])?kt(e[n],i):i}),{}),Nf=class{#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&&Pf(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Pf(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 t=JSON.parse(e);if(!($f(t)&&"uid"in t&&"client"in t&&"accessToken"in t&&"expiry"in t))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(t)}},H_=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,s=e.headers;t&&!s.has("uid")&&s.set("uid",t),r&&!s.has("client")&&s.set("client",r),n&&!s.has("access-token")&&s.set("access-token",n),i&&!s.has("expiry")&&s.set("expiry",String(i)),n&&!s.has("token-type")&&s.set("token-type","Bearer")}onResponse({response:e}){const t=e.headers.get("access-token"),r=e.headers.get("client"),n=e.headers.get("uid"),i=parseInt(e.headers.get("expiry")||"");return t&&r&&n&&i&&this.auth.signIn({uid:n,client:r,accessToken:t,expiry:i}),e}},Rf;function W(e,t,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(e))return;a._zod.traits.add(e),t(a,l);const c=o.prototype,d=Object.keys(c);for(let u=0;u<d.length;u++){const p=d[u];p in a||(a[p]=c[p].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();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(e)}),Object.defineProperty(o,"name",{value:e}),o}var Oi=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Lf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Rf=globalThis).__zod_globalConfig??(Rf.__zod_globalConfig={});var qo=globalThis.__zod_globalConfig;function Yn(e){return e&&Object.assign(qo,e),qo}function zf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function Xl(e,t){return typeof t=="bigint"?t.toString():t}function Ql(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function eu(e){return e==null}function tu(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function G_(e,t){const r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var Uf=Symbol("evaluating");function Ve(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Uf)return n===void 0&&(n=Uf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Jn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function xn(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function qf(e){return JSON.stringify(e)}function K_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Vf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Y_=Ql(()=>{if(qo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Ps(e){if(Vo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Vo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Bf(e){return Ps(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var J_=new Set(["string","number","symbol"]);function Bo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Tn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function X_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Q_={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ew(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Tn(e,xn(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Jn(this,"shape",i),i},checks:[]}))}function tw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");return Tn(e,xn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Jn(this,"shape",i),i},checks:[]}))}function rw(e,t){if(!Ps(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Tn(e,xn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Jn(this,"shape",n),n}}))}function nw(e,t){if(!Ps(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Tn(e,xn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Jn(this,"shape",r),r}}))}function iw(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return Tn(e,xn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Jn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function sw(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");return Tn(t,xn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)s[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return Jn(this,"shape",s),s},checks:[]}))}function ow(e,t,r){return Tn(t,xn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Jn(this,"shape",i),i}}))}function Ci(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function aw(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function jf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function jo(e){return typeof e=="string"?e:e?.message}function Xn(e,t,r){const n=e.message?e.message:jo(e.inst?._zod.def?.error?.(e))??jo(t?.error?.(e))??jo(r.customError?.(e))??jo(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:o,...a}=e;return a.path??(a.path=[]),a.message=n,t?.reportInput&&(a.input=o),a}function ru(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function $s(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Zf=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Xl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Wf=W("$ZodError",Zf),Hf=W("$ZodError",Zf,{Parent:Error});function lw(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function uw(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>n({issues:a},[...s,...o.path]));else if(o.code==="invalid_key")n({issues:o.issues},[...s,...o.path]);else if(o.code==="invalid_element")n({issues:o.issues},[...s,...o.path]);else{const a=[...s,...o.path];if(a.length===0)r._errors.push(t(o));else{let l=r,c=0;for(;c<a.length;){const d=a[c];c!==a.length-1?l[d]=l[d]||{_errors:[]}:(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(o))),l=l[d],c++}}}};return n(e),r}var nu=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new Oi;if(o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Yn())));throw Vf(a,i?.callee),a}return o.value},iu=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Yn())));throw Vf(a,i?.callee),a}return o.value},Zo=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Oi;return s.issues.length?{success:!1,error:new(e??Wf)(s.issues.map(o=>Xn(o,i,Yn())))}:{success:!0,data:s.value}},cw=Zo(Hf),Wo=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(o=>Xn(o,i,Yn())))}:{success:!0,data:s.value}},dw=Wo(Hf),fw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return nu(e)(t,r,i)},hw=e=>(t,r,n)=>nu(e)(t,r,n),pw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return iu(e)(t,r,i)},mw=e=>async(t,r,n)=>iu(e)(t,r,n),vw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Zo(e)(t,r,i)},gw=e=>(t,r,n)=>Zo(e)(t,r,n),yw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Wo(e)(t,r,i)},bw=e=>async(t,r,n)=>Wo(e)(t,r,n),_w=/^[cC][0-9a-z]{6,}$/,ww=/^[0-9a-z]+$/,kw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Sw=/^[0-9a-vA-V]{20}$/,Ew=/^[A-Za-z0-9]{27}$/,xw=/^[a-zA-Z0-9_-]{21}$/,Tw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Aw=/^([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})$/,Gf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/,Ow=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Cw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Dw(){return new RegExp(Cw,"u")}var Iw=/^(?:(?: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])$/,Pw=/^(([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}|:))$/,$w=/^((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])$/,Mw=/^(([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])$/,Fw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kf=/^[A-Za-z0-9_-]*$/,Nw=/^https?$/,Rw=/^\+[1-9]\d{6,14}$/,Yf="(?:(?:\\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])))",Lw=new RegExp(`^${Yf}$`);function Jf(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zw(e){return new RegExp(`^${Jf(e)}$`)}function Uw(e){const t=Jf({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Yf}T(?:${n})$`)}var qw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Vw=/^-?\d+$/,Bw=/^-?\d+(?:\.\d+)?$/,jw=/^[^A-Z]*$/,Zw=/^[^a-z]*$/,Ut=W("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Xf={number:"number",bigint:"bigint",object:"date"},Qf=W("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=Xf[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eh=W("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=Xf[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ww=W("$ZodCheckMultipleOf",(e,t)=>{Ut.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):G_(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Hw=W("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=Q_[t.format];e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,a.minimum=i,a.maximum=s,r&&(a.pattern=Vw)}),e._zod.check=o=>{const a=o.value;if(r){if(!Number.isInteger(a)){o.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}a<i&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>s&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Gw=W("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!eu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const s=ru(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Kw=W("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!eu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const s=ru(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Yw=W("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!eu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,s=i.length;if(s===t.length)return;const o=ru(i),a=s>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ho=W("$ZodCheckStringFormat",(e,t)=>{var r,n;Ut.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Jw=W("$ZodCheckRegex",(e,t)=>{Ho.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Xw=W("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=jw),Ho.init(e,t)}),Qw=W("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Zw),Ho.init(e,t)}),e0=W("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=Bo(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),t0=W("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${Bo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),r0=W("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${Bo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),n0=W("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),i0=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
|
|
10
|
+
`)}}}function H2(e){const t=mb.get(e);t&&(bn(e,"message",{value:t.message}),bn(e,"stack",{value:t.stack}))}var vb=~(rr|jn|tr);function it(e,t){e.f=e.f&vb|t}function hl(e){(e.f&512)!==0||e.deps===null?it(e,tr):it(e,jn)}function Od(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=ds,Od(t.deps))}function Cd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Od(e.deps),it(e,tr)}var gb=!1,ko=!1;function yb(e){var t=ko;try{return ko=!1,[e(),ko]}finally{ko=t}}var So=null,wi=null,ke=null,gs=null,At=null,pl=null,ys=!1,ml=!1,ki=null,Eo=null,Dd=0,G2=new Set,bb=1,Si=class sd{id=bb++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#s=0;#a=new Map;#o=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){wi===null?So=wi=this:(wi.#r=this,this.#t=wi),wi=this}#m(){if(this.is_fork)return!0;for(const n of this.#a.keys()){for(var t=n,r=!1;t.parent!==null;){if(this.#h.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=this.#h.get(t);if(n){this.#h.delete(t);for(var i of n.d)it(i,rr),r(i);for(i of n.m)it(i,jn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Dd++>1e3&&(this.#b(),_b());for(const l of this.#c)this.#d.delete(l),it(l,rr),this.schedule(l);for(const l of this.#d)it(l,jn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=ki=[],n=[],i=Eo=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Md(l),this.#m()||this.discard(),c}if(ke=null,i.length>0){var s=sd.ensure();for(const l of i)s.schedule(l)}if(ki=null,Eo=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)$d(l,c);i.length>0&&ke.#v();return}const o=this.#w();if(o){this.#g(n),this.#g(r),o.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),gs=this,Id(n),Id(r),gs=null,this.#o?.resolve();var a=ke;if(this.#s===0&&(this.#l.length===0||a!==null)&&(this.#b(),Wt&&(this.#k(),ke=a)),this.#l.length>0)if(a!==null){const l=a;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else a=this;a!==null&&a.#v()}#y(t,r,n){t.f^=tr;for(var i=t.first;i!==null;){var s=i.f,o=(s&96)!==0;if(!(o&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){o?i.f^=tr:(s&4)!==0?r.push(i):Wt&&(s&16777224)!==0?n.push(i):Ss(i)&&((s&16)!==0&&this.#d.add(i),Ai(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var l=i.next;if(l!==null){i=l;break}i=i.parent}}}#w(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=t.#t}return null}#_(t){for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const s=this.async_deriveds.get(n);s&&i.promise.then(s.resolve).catch(s.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const a of i){var s=a.f;if((s&2)!==0)r(a);else{var o=a;s&4194320&&!this.async_deriveds.has(o)&&(this.#d.delete(o),it(o,rr),this.schedule(o))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),ke=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Cd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==ot&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),At?.set(t,r)),this.is_fork||(t.v=r)}activate(){ke=this}deactivate(){ke=null,At=null}flush(){try{ml=!0,ke=this,this.#v()}finally{Dd=0,pl=null,ki=null,Eo=null,ml=!1,ke=null,At=null,Wn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#o?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let d=So;d!==null;d=d.#r){var t=d.id<this.id,r=[];for(const[u,[p,f]]of this.current){if(d.current.has(u)){var n=d.current.get(u)[0];if(t&&p!==n)d.current.set(u,[p,f]);else continue}r.push(u)}if(t)for(const[u,p]of this.async_deriveds){const f=d.async_deriveds.get(u);f&&p.promise.then(f.resolve).catch(f.reject)}if(d.#e){var i=[...d.current.keys()].filter(u=>!d.current.get(u)[1]&&!this.current.has(u));if(i.length===0)t&&d.discard();else if(r.length>0){if(t)for(const u of this.#p)d.unskip_effect(u,p=>{(p.f&4194320)!==0?d.schedule(p):d.#g([p])});d.activate();var s=new Set,o=new Map;for(var a of r)Pd(a,i,s,o);o=new Map;var l=[...d.current].filter(([u,p])=>{const f=this.current.get(u);return f?f[0]!==p[0]||f[1]!==p[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&vl(u,l,o)&&((u.f&4194320)!==0?(it(u,rr),d.schedule(u)):d.#c.add(u));if(d.#l.length>0&&!d.#f){d.apply();for(var c of d.#l)d.#y(c,[],[]);d.#l=[]}d.deactivate()}}}}increment(t,r){if(this.#s+=1,t){let n=this.#a.get(r)??0;this.#a.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#a.get(r)??0;n===1?this.#a.delete(r):this.#a.set(r,n-1)}this.#f||(this.#f=!0,nr(()=>{this.#f=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)this.#c.add(n);for(const n of r)this.#d.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#o??=md()).promise}static ensure(){if(ke===null){const t=ke=new sd;!ml&&!ys&&nr(()=>{t.#e||t.flush()})}return ke}apply(){if(!Wt||!this.is_fork&&this.#t===null&&this.#r===null){At=null;return}At=new Map;for(const[r,[n]]of this.current)At.set(r,n);for(let r=So;r!==null;r=r.#r)if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)At.has(n)||At.set(n,i)}}schedule(t){if(pl=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(ki!==null&&r===Ee&&(Wt||(Ae===null||(Ae.f&2)===0)&&!gb))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=tr}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?So=r:t.#r=r,r===null?wi=t:r.#t=t,this.linked=!1}}};function y(e){var t=ys;ys=!0;try{var r;for(e&&(ke!==null&&!ke.is_fork&&ke.flush(),r=e());;){if(pb(),ke===null)return r;ke.flush()}}finally{ys=t}}function _b(){if(0){var e;for(const r of ke.current.keys())for(const[n,i]of r.updated??[])var t}try{Wy()}catch(r){_n(r,pl)}}var Rr=null;function Id(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Ss(n)&&(Rr=new Set,Ai(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&ef(n),Rr?.size>0)){Wn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Rr.has(o)&&(Rr.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&24576)===0&&Ai(l)}}Rr.clear()}}Rr=null}}function Pd(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&2)!==0?Pd(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&vl(i,t,n)&&(it(i,rr),gl(i))}}function vl(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(mo.call(t,i))return!0;if((i.f&2)!==0&&vl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function gl(e){ke.schedule(e)}function $d(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),it(e,tr);for(var r=e.first;r!==null;)$d(r,t),r=r.next}}function Md(e){it(e,tr);for(var t=e.first;t!==null;)Md(t),t=t.next}function yl(e){let t=0,r=wn(0),n;return()=>{xl()&&(h(r),Ti(()=>(t===0&&(n=Ne(()=>e(()=>Lr(r)))),t+=1,()=>{nr(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var wb=us|yi;function kb(e,t,r,n){new Sb(e,t,r,n)}var Sb=class{parent;is_pending=!1;transform_error;#e;#t=_e?Te:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=yl(()=>(this.#f=wn(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=Ee;s.b=this,s.f|=128,r(i)},this.parent=Ee.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=ks(()=>{if(_e){const i=this.#t;Qr();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));this.#y(o)}else s?this.#w():this.#v()}else this.#_()},wb),_e&&(this.#e=Te)}#v(){try{this.#s=Nt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=Nt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#a=Nt(()=>e(this.#e)),nr(()=>{var t=this.#l=document.createDocumentFragment(),r=Ft();t.append(r),this.#s=this.#k(()=>Nt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Hn(this.#a,()=>{this.#a=null}),this.#g(ke))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#s=Nt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();Ol(this.#s,e);const t=this.#r.pending;this.#a=Nt(()=>t(this.#e))}else this.#g(ke)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Cd(e,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#k(e){var t=Ee,r=Ae,n=Ue;sr(this.#i),Rt(this.#i),_i(this.#i.ctx);try{return Si.ensure(),e()}catch(i){return Ad(i),null}finally{sr(t),Rt(r),_i(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#c+=e,this.#c===0&&(this.#g(t),this.#a&&Hn(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(e,t){this.#b(e,t),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,nr(()=>{this.#d=!1,this.#f&&xi(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),h(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;ke?.is_fork?(this.#s&&ke.skip_effect(this.#s),this.#a&&ke.skip_effect(this.#a),this.#o&&ke.skip_effect(this.#o),ke.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(mt(this.#s),this.#s=null),this.#a&&(mt(this.#a),this.#a=null),this.#o&&(mt(this.#o),this.#o=null),_e&&(ft(this.#t),Tt(),ft(ms()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){ib();return}n=!0,i&&Qy(),this.#o!==null&&Hn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},o=a=>{try{i=!0,t?.(a,s),i=!1}catch(l){_n(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return Nt(()=>{var l=Ee;l.b=this,l.f|=128,r(this.#e,()=>a,()=>s)})}catch(l){return _n(l,this.#i.parent),null}}))};nr(()=>{var a;try{a=this.transform_error(e)}catch(l){_n(l,this.#i&&this.#i.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,l=>_n(l,this.#i&&this.#i.parent)):o(a)})}};function Fd(e,t,r,n){const i=vs()?Ei:bl;var s=e.filter(f=>!f.settled),o=t.map(i);if(r.length===0&&s.length===0){n(o);return}var a=Ee,l=Eb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(f=>f.promise)):null;function d(f){if((a.f&16384)===0){l();try{n([...o,...f])}catch(g){_n(g,a)}xo()}}var u=Nd();if(r.length===0){c.then(()=>d([])).finally(u);return}function p(){Promise.all(r.map(f=>Tb(f))).then(d).catch(f=>_n(f,a)).finally(u)}c?c.then(()=>{l(),p(),xo()}):p()}function Eb(){var e=Ee,t=Ae,r=Ue,n=ke;if(0)var i;return function(o=!0){sr(e),Rt(t),_i(r),o&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function xo(e=!0){sr(null),Rt(null),_i(null),e&&ke?.deactivate()}function Nd(){var e=Ee,t=e.b,r=ke,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var xb=null;function K2(e){xb=e}var Y2=new Set;function Ei(e){var t=2|rr;return Ee!==null&&(Ee.f|=yi),{ctx:Ue,deps:null,effects:null,equals:kd,f:t,fn:e,reactions:null,rv:0,v:ot,wv:0,parent:Ee,ac:null}}var To=Symbol("obsolete");function Tb(e,t,r){let n=Ee;n===null&&Vy();var i=void 0,s=wn(ot),o=!Ae,a=new Set;return zb(()=>{var l=Ee,c=md();i=c.promise;try{Promise.resolve(e()).then(c.resolve,f=>{f!==_o&&c.reject(f)}).finally(xo)}catch(f){c.reject(f),xo()}var d=ke;if(o){if((l.f&32768)!==0)var u=Nd();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(To);else for(const f of a.values())f.reject(To);a.add(c),d.async_deriveds.set(l,c)}const p=(f,g=void 0)=>{u?.(),a.delete(c),g!==To&&(d.activate(),g?(s.f|=bo,xi(s,g)):((s.f&8388608)!==0&&(s.f^=bo),xi(s,f)),d.deactivate())};c.promise.then(p,f=>p(null,f||"unknown"))}),Io(()=>{for(const l of a)l.reject(To)}),new Promise(l=>{function c(d){function u(){d===i?l(s):c(i)}d.then(u,u)}c(i)})}function D(e){const t=Ei(e);return Wt||sf(t),t}function bl(e){const t=Ei(e);return t.equals=Sd,t}function Ab(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)mt(t[r])}}var J2=[];function _l(e){var t,r=Ee,n=e.parent;if(!en&&n!==null&&e.v!==ot&&(n.f&24576)!==0)return eb(),e.v;sr(n);try{e.f&=~ds,Ab(e),t=cf(e)}finally{sr(r)}return t}function Rd(e){var t=_l(e);if(!e.equals(t)&&(e.wv=lf(),(!ke?.is_fork||e.deps===null)&&(ke!==null?(ke.capture(e,t,!0),gs?.capture(e,t,!0)):e.v=t,e.deps===null))){it(e,tr);return}en||(At!==null?(xl()||ke?.is_fork)&&At.set(e,t):hl(e))}function Ob(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(_o),t.fn!==null&&(t.teardown=Me),t.ac=null,Es(t,0),Al(t))}function Ld(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ai(t)}var bs=new Set,Wn=new Map;function X2(e){bs=e}var wl=!1;function Cb(){wl=!0}function wn(e,t){var r={f:0,v:e,reactions:null,equals:kd,rv:0,wv:0};return r}function te(e,t){const r=wn(e,t);return sf(r),r}function zd(e,t=!1,r=!0){const n=wn(e);return t||(n.equals=Sd),bi&&r&&Ue!==null&&Ue.l!==null&&(Ue.l.s??=[]).push(n),n}function I(e,t,r=!1){Ae!==null&&(!yr||(Ae.f&131072)!==0)&&vs()&&(Ae.f&4325394)!==0&&(zr===null||!zr.has(e))&&Xy();let n=r?Fe(t):t;return xi(e,n,Eo)}function xi(e,t,r=null){if(!e.equals(t)){Wn.set(e,en?t:e.v);var n=Si.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&_l(i),At===null&&hl(i)}e.wv=lf(),qd(e,rr,r),vs()&&Ee!==null&&(Ee.f&1024)!==0&&(Ee.f&96)===0&&(or===null?Vb([e]):or.push(e)),!n.is_fork&&bs.size>0&&!wl&&Ud()}return t}function Ud(){wl=!1;for(const e of bs){(e.f&1024)!==0&&it(e,jn);let t;try{t=Ss(e)}catch{t=!0}t&&Ai(e)}bs.clear()}function Lr(e){I(e,e.v+1)}function qd(e,t,r){var n=e.reactions;if(n!==null)for(var i=vs(),s=n.length,o=0;o<s;o++){var a=n[o],l=a.f;if(!(!i&&a===Ee)){var c=(l&rr)===0;if(c&&it(a,t),(l&131072)!==0)bs.add(a);else if((l&2)!==0){var d=a;At?.delete(d),(l&65536)===0&&(l&512&&(Ee===null||(Ee.f&2097152)===0)&&(a.f|=ds),qd(d,jn,r))}else if(c){var u=a;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):gl(u)}}}}var Db=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Fe(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=yo(e);if(t!==hd&&t!==My)return e;var r=new Map,n=po(e),i=te(0),s=null,o=tn,a=u=>{if(tn===o)return u();var p=Ae,f=tn;Rt(null),af(o);var g=u();return Rt(p),af(f),g};n&&r.set("length",te(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,Ed(i,`${l} version`);for(const[p,f]of r)Ed(f,Ib(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Yy();var g=r.get(p);return g===void 0?a(()=>{var m=te(f.value,s);return r.set(p,m),m}):I(g,f.value,!0),!0},deleteProperty(u,p){var f=r.get(p);if(f===void 0){if(p in u){const g=a(()=>te(ot,s));r.set(p,g),Lr(i)}}else I(f,ot),Lr(i);return!0},get(u,p,f){if(p===Nr)return e;var g=r.get(p),m=p in u;if(g===void 0&&(!m||Fr(u,p)?.writable)&&(g=a(()=>{var _=te(Fe(m?u[p]:ot),s);return _}),r.set(p,g)),g!==void 0){var v=h(g);return v===ot?void 0:v}return Reflect.get(u,p,f)},getOwnPropertyDescriptor(u,p){var f=Reflect.getOwnPropertyDescriptor(u,p);if(f&&"value"in f){var g=r.get(p);g&&(f.value=h(g))}else if(f===void 0){var m=r.get(p),v=m?.v;if(m!==void 0&&v!==ot)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(u,p){if(p===Nr)return!0;var f=r.get(p),g=f!==void 0&&f.v!==ot||Reflect.has(u,p);return(f!==void 0||Ee!==null&&(!g||Fr(u,p)?.writable))&&(f===void 0&&(f=a(()=>{var m=te(g?Fe(u[p]):ot,s);return m}),r.set(p,f)),h(f)===ot)?!1:g},set(u,p,f,g){var m=r.get(p),v=p in u;if(n&&p==="length")for(var _=f;_<m.v;_+=1){var k=r.get(_+"");k!==void 0?I(k,ot):_ in u&&(k=a(()=>te(ot,s)),r.set(_+"",k))}if(m===void 0)(!v||Fr(u,p)?.writable)&&(m=a(()=>te(void 0,s)),I(m,Fe(f)),r.set(p,m));else{v=m.v!==ot;var A=a(()=>Fe(f));I(m,A)}var E=Reflect.getOwnPropertyDescriptor(u,p);if(E?.set&&E.set.call(g,f),!v){if(n&&typeof p=="string"){var T=r.get("length"),C=Number(p);Number.isInteger(C)&&C>=T.v&&I(T,C+1)}Lr(i)}return!0},ownKeys(u){h(i);var p=Reflect.ownKeys(u).filter(m=>{var v=r.get(m);return v===void 0||v.v!==ot});for(var[f,g]of r)g.v!==ot&&!(f in u)&&p.push(f);return p},setPrototypeOf(){Jy()}})}function Ib(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Db.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function _s(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function Vd(e,t){return Object.is(_s(e),_s(t))}var Pb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function Q2(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return Pb.has(r)?function(...s){Cb();var o=i.apply(this,s);return Ud(),o}:i}})}function eF(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,o){const a=r.call(this,s,o);if(a===-1){for(let l=o??0;l<this.length;l+=1)if(_s(this[l])===s){ll("array.indexOf(...)");break}}return a},e.lastIndexOf=function(s,o){const a=n.call(this,s,o??this.length-1);if(a===-1){for(let l=0;l<=(o??this.length-1);l+=1)if(_s(this[l])===s){ll("array.lastIndexOf(...)");break}}return a},e.includes=function(s,o){const a=i.call(this,s,o);if(!a){for(let l=0;l<this.length;l+=1)if(_s(this[l])===s){ll("array.includes(...)");break}}return a},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Bd,$b,kl,jd,Zd;function Sl(){if(Bd===void 0){Bd=window,$b=document,kl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;jd=Fr(t,"firstChild").get,Zd=Fr(t,"nextSibling").get,pd(e)&&(e[sl]=void 0,e[bd]=null,e[ol]=void 0,e.__e=void 0),pd(r)&&(r[al]=void 0)}}function Ft(e=""){return document.createTextNode(e)}function Ht(e){return jd.call(e)}function gr(e){return Zd.call(e)}function F(e,t){if(!_e)return Ht(e);var r=Ht(Te);if(r===null)r=Te.appendChild(Ft());else if(t&&r.nodeType!==3){var n=Ft();return r?.before(n),ft(n),n}return t&&Oo(r),ft(r),r}function q(e,t=!1){if(!_e){var r=Ht(e);return r instanceof Comment&&r.data===""?gr(r):r}if(t){if(Te?.nodeType!==3){var n=Ft();return Te?.before(n),ft(n),n}Oo(Te)}return Te}function X(e,t=1,r=!1){let n=_e?Te:e;for(var i;t--;)i=n,n=gr(n);if(!_e)return n;if(r){if(n?.nodeType!==3){var s=Ft();return n===null?i?.after(s):n.before(s),ft(s),s}Oo(n)}return ft(n),n}function El(e){e.textContent=""}function Wd(){return!Wt||Rr!==null?!1:(Ee.f&nl)!==0}function Ao(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Mb(e=""){return document.createComment(e)}function Oo(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Fb(e,t){if(t){const r=document.body;e.autofocus=!0,nr(()=>{document.activeElement===r&&e.focus()})}}function Nb(e){_e&&Ht(e)!==null&&El(e)}var Hd=!1;function Gd(){Hd||(Hd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[fs]?.()})},{capture:!0}))}function Co(e){var t=Ae,r=Ee;Rt(null),sr(null);try{return e()}finally{Rt(t),sr(r)}}function Do(e,t,r,n=r){e.addEventListener(t,()=>Co(r));const i=e[fs];i?e[fs]=()=>{i(),n(!0)}:e[fs]=()=>n(!0),Gd()}function Kd(e){Ee===null&&(Ae===null&&Zy(e),jy()),en&&By(e)}function Rb(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ir(e,t){var r=Ee;r!==null&&(r.f&8192)!==0&&(e|=rl);var n={ctx:Ue,deps:null,nodes:null,f:e|rr|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};ke?.register_created_effect(n);var i=n;if((e&4)!==0)ki!==null?ki.push(n):Si.ensure().schedule(n);else if(t!==null){try{Ai(n)}catch(o){throw mt(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&524288)===0&&(i=i.first,(e&16)!==0&&(e&65536)!==0&&i!==null&&(i.f|=us))}if(i!==null&&(i.parent=r,r!==null&&Rb(i,r),Ae!==null&&(Ae.f&2)!==0&&(e&64)===0)){var s=Ae;(s.effects??=[]).push(i)}return n}function xl(){return Ae!==null&&!yr}function Io(e){const t=ir(8,null);return it(t,tr),t.teardown=e,t}function ge(e){Kd("$effect");var t=Ee.f;if(!Ae&&(t&32)!==0&&Ue!==null&&!Ue.i){var r=Ue;(r.e??=[]).push(e)}else return Yd(e)}function Yd(e){return ir(4|gd,e)}function Tl(e){return Kd("$effect.pre"),ir(8|gd,e)}function ws(e){Si.ensure();const t=ir(64|yi,e);return()=>{mt(t)}}function Lb(e){Si.ensure();const t=ir(64|yi,e);return(r={})=>new Promise(n=>{r.outro?Hn(t,()=>{mt(t),n(void 0)}):(mt(t),n(void 0))})}function Po(e){return ir(4,e)}function zb(e){return ir(Ly|yi,e)}function Ti(e,t=0){return ir(8|t,e)}function ce(e,t=[],r=[],n=[]){Fd(n,t,r,i=>{ir(8,()=>{e(...i.map(h))})})}function ks(e,t=0){var r=ir(16|t,e);return r}function Jd(e,t=0){var r=ir(Ny|t,e);return r}function Nt(e){return ir(32|yi,e)}function Xd(e){var t=e.teardown;if(t!==null){const r=en,n=Ae;nf(!0),Rt(null);try{t.call(null)}finally{nf(r),Rt(n)}}}function Al(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Co(()=>{i.abort(_o)});var n=r.next;(r.f&64)!==0?r.parent=null:mt(r,t),r=n}}function Ub(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&mt(t),t=r}}function mt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Qd(e.nodes.start,e.nodes.end),r=!0),e.f|=vd,Al(e,t&&!r),Es(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Xd(e),e.f^=vd,e.f|=Ry;var i=e.parent;i!==null&&i.first!==null&&ef(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qd(e,t){for(;e!==null;){var r=e===t?null:gr(e);e.remove(),e=r}}function ef(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Hn(e,t,r=!0){var n=[];tf(e,n,!0);var i=()=>{r&&mt(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function tf(e,t,r){if((e.f&8192)===0){e.f^=rl;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;tf(i,t,o?r:!1)}i=s}}}function $o(e){rf(e,!0)}function rf(e,t){if((e.f&8192)!==0){e.f^=rl,(e.f&1024)===0&&(it(e,rr),Si.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;rf(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Ol(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:gr(r);t.append(r),r=i}}var qb=null,Mo=!1,en=!1;function nf(e){en=e}var Ae=null,yr=!1;function Rt(e){Ae=e}var Ee=null;function sr(e){Ee=e}var zr=null;function sf(e){Ae!==null&&(!Wt||(Ae.f&2)!==0)&&(zr??=new Set).add(e)}var Lt=null,Gt=0,or=null;function Vb(e){or=e}var of=1,Gn=0,tn=Gn;function af(e){tn=e}function lf(){return++of}function Ss(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~ds),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Ss(s)&&Rd(s),s.wv>e.wv)return!0}(t&512)!==0&&At===null&&it(e,tr)}return!1}function uf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Wt&&zr!==null&&zr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?uf(s,t,!1):t===s&&(r?it(s,rr):(s.f&1024)!==0&&it(s,jn),gl(s))}}function cf(e){var t=Lt,r=Gt,n=or,i=Ae,s=zr,o=Ue,a=yr,l=tn,c=e.f;Lt=null,Gt=0,or=null,Ae=(c&96)===0?e:null,zr=null,_i(e.ctx),yr=!1,tn=++Gn,e.ac!==null&&(Co(()=>{e.ac.abort(_o)}),e.ac=null);try{e.f|=yd;var d=e.fn,u=d();e.f|=nl;var p=e.deps,f=ke?.is_fork;if(Lt!==null){var g;if(f||Es(e,Gt),p!==null&&Gt>0)for(p.length=Gt+Lt.length,g=0;g<Lt.length;g++)p[Gt+g]=Lt[g];else e.deps=p=Lt;if(xl()&&(e.f&512)!==0)for(g=Gt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!f&&p!==null&&Gt<p.length&&(Es(e,Gt),p.length=Gt);if(vs()&&or!==null&&!yr&&p!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)uf(or[g],e);if(i!==null&&i!==e){if(Gn++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=Gn;if(t!==null)for(const m of t)m.rv=Gn;or!==null&&(n===null?n=or:n.push(...or))}return(e.f&8388608)!==0&&(e.f^=bo),u}catch(m){return Ad(m)}finally{e.f^=yd,Lt=t,Gt=r,or=n,Ae=i,zr=s,_i(o),yr=a,tn=l}}function Bb(e,t){let r=t.reactions;if(r!==null){var n=$y.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(Lt===null||!mo.call(Lt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~ds),s.v!==ot&&hl(s),Ob(s),Es(s,0)}}function Es(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Bb(e,r[n])}function Ai(e){var t=e.f;if((t&16384)===0){it(e,tr);var r=Ee,n=Mo;if(Ee=e,Mo=!0,0)var i,s;try{(t&16777232)!==0?Ub(e):Al(e),Xd(e);var o=cf(e);if(e.teardown=typeof o=="function"?o:null,e.wv=of,0)for(var a of e.deps);}finally{Mo=n,Ee=r}}}async function df(){if(Wt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),y()}function h(e){var t=(e.f&2)!==0;if(qb?.add(e),Ae!==null&&!yr&&!(Ee!==null&&(Ee.f&16384)!==0)&&(zr===null||!zr.has(e))){var r=Ae.deps;if((Ae.f&2097152)!==0)e.rv<Gn&&(e.rv=Gn,Lt===null&&r!==null&&r[Gt]===e?Gt++:Lt===null?Lt=[e]:Lt.push(e));else{Ae.deps??=[],mo.call(Ae.deps,e)||Ae.deps.push(e);var n=e.reactions;n===null?e.reactions=[Ae]:mo.call(n,Ae)||n.push(Ae)}}if(0){if(!yr&&xb&&!xb.warned&&(xb.effect.f&2097152)===0&&!xb.effect_deps.has(e))var i;if(N2&&!yr&&U2!==null&&Ae!==null&&U2.reaction===Ae&&!e.trace){if(i)var s,o}}if(en&&Wn.has(e))return Wn.get(e);if(t){var a=e;if(en){var l=a.v;return((a.f&1024)===0&&a.reactions!==null||hf(a))&&(l=_l(a)),Wn.set(a,l),l}var c=(a.f&512)===0&&!yr&&Ae!==null&&(Mo||(Ae.f&512)!==0),d=(a.f&nl)===0;Ss(a)&&(c&&(a.f|=512),Rd(a)),c&&!d&&(Ld(a),ff(a))}if(At?.has(e))return At.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function ff(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&2)!==0&&(t.f&512)===0&&(Ld(t),ff(t))}function hf(e){if(e.v===ot)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Wn.has(t)||(t.f&2)!==0&&hf(t))return!0;return!1}function Ne(e){var t=yr;try{return yr=!0,e()}finally{yr=t}}function jb(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)Cl(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&Cl(r)}}}function Cl(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Cl(e[n],t)}catch{}const r=yo(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=fd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var xs=Symbol("events"),pf=new Set,Dl=new Set;function Il(e,t,r,n={}){function i(s){if(n.capture||Pl.call(t,s),!s.cancelBubble)return Co(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?nr(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function vt(e,t,r,n={}){var i=Il(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Fo(e,t,r,n,i){var s={capture:n,passive:i},o=Il(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Io(()=>{t.removeEventListener(e,o,s)})}function at(e,t,r){(t[xs]??={})[e]=r}function br(e){for(var t=0;t<e.length;t++)pf.add(e[t]);for(var r of Dl)r(e)}var mf=null;function Pl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;mf=e;var o=0,a=mf===e&&e[xs];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[xs]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){bn(e,"currentTarget",{configurable:!0,get(){return s||r}});var d=Ae,u=Ee;Rt(null),sr(null);try{for(var p,f=[];s!==null&&s!==t;){try{var g=s[xs]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){p?f.push(m):p=m}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(p){for(let m of f)queueMicrotask(()=>{throw m});throw p}}finally{e[xs]=t,delete e.currentTarget,Rt(d),sr(u)}}}var Zb=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function vf(e){return Zb?.createHTML(e)??e}function Wb(e){var t=Ao("template");return t.innerHTML=vf(e.replaceAll("<!>","<!---->")),t.content}function _r(e,t){var r=Ee;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function j(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(_e)return _r(Te,null),Te;i===void 0&&(i=Wb(s?e:"<!>"+e),r||(i=Ht(i)));var o=n||kl?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Ht(o),l=o.lastChild;_r(a,l)}else _r(o,o);return o}}function zt(e=""){if(!_e){var t=Ft(e+"");return _r(t,t),t}var r=Te;return r.nodeType!==3?(r.before(r=Ft()),ft(r)):Oo(r),_r(r,r),r}function Y(){if(_e)return _r(Te,null),Te;var e=document.createDocumentFragment(),t=document.createComment(""),r=Ft();return e.append(t,r),_r(t,r),e}function x(e,t){if(_e){var r=Ee;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Te),Qr();return}e!==null&&e.before(t)}function ht(){if(_e&&Te&&Te.nodeType===8&&Te.textContent?.startsWith("$")){const e=Te.textContent.substring(1);return Qr(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var Hb=/\r/g;function Gb(e){e=e.replace(Hb,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function Kb(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var Yb=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Jb(e){return Yb.includes(e)}var Xb=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],Qb={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 e_(e){return e=e.toLowerCase(),Qb[e]??e}var tF=[...Xb,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],t_=["touchstart","touchmove"];function r_(e){return t_.includes(e)}var n_=["$state","$state.raw","$derived","$derived.by"],rF=[...n_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function i_(e){return e?.replace(/\//g,"/")}var gf=!0;function se(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[al]??=e.nodeValue)&&(e[al]=r,e.nodeValue=`${r}`)}function yf(e,t){return bf(e,t)}function s_(e,t){Sl(),t.intro=t.intro??!1;const r=t.target,n=_e,i=Te;try{for(var s=Ht(r);s&&(s.nodeType!==8||s.data!=="[");)s=gr(s);if(!s)throw Bn;yt(!0),ft(s);const o=bf(e,{...t,anchor:s});return yt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
11
|
+
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Bn&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Hy(),Sl(),El(r),yt(!1),yf(e,t)}finally{yt(n),ft(i)}}var No=new Map;function bf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){Sl();var l=void 0,c=Lb(()=>{var d=r??t.appendChild(Ft());kb(d,{pending:()=>{}},f=>{re({});var g=Ue;if(s&&(g.c=s),i&&(n.$$events=i),_e&&_r(f,null),gf=o,l=e(f,n)||{},gf=!0,_e&&(Ee.nodes.end=Te,Te===null||Te.nodeType!==8||Te.data!=="]"))throw ps(),Bn;ne()},a);var u=new Set,p=f=>{for(var g=0;g<f.length;g++){var m=f[g];if(!u.has(m)){u.add(m);var v=r_(m);for(const A of[t,document]){var _=No.get(A);_===void 0&&(_=new Map,No.set(A,_));var k=_.get(m);k===void 0?(A.addEventListener(m,Pl,{passive:v}),_.set(m,1)):_.set(m,k+1)}}}};return p(vo(pf)),Dl.add(p),()=>{for(var f of u)for(const v of[t,document]){var g=No.get(v),m=g.get(f);--m==0?(v.removeEventListener(f,Pl),g.delete(f),g.size===0&&No.delete(v)):g.set(f,m)}Dl.delete(p),d!==r&&d.parentNode?.removeChild(d)}});return $l.set(l,c),l}var $l=new WeakMap;function o_(e,t){const r=$l.get(e);return r?($l.delete(e),r(t)):Promise.resolve()}var Ml=class{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#s=e=>{if(this.#e.has(e)){var t=this.#e.get(e),r=this.#t.get(t);if(r)$o(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&($o(n.effect),this.#t.set(t,n.effect),this.#r.delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const o=this.#r.get(s);o&&(mt(o.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const o=()=>{if(Array.from(this.#e.values()).includes(i)){var a=document.createDocumentFragment();Ol(s,a),a.append(Ft()),this.#r.set(i,{effect:s,fragment:a})}else mt(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Hn(s,o,!1)):o()}}};#a=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,n]of this.#r)t.includes(r)||(mt(n.effect),this.#r.delete(r))};ensure(e,t){var r=ke,n=Wd();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(n){var i=document.createDocumentFragment(),s=Ft();i.append(s),this.#r.set(e,{effect:Nt(()=>t(s)),fragment:i})}else this.#t.set(e,Nt(()=>t(this.anchor)));if(this.#e.set(r,e),n){for(const[o,a]of this.#t)o===e?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of this.#r)o===e?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(this.#s),r.ondiscard(this.#a)}else _e&&(this.anchor=Te),this.#s(r)}};function we(e,t,...r){var n=new Ml(e);ks(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},us)}if(0)var FF;function rn(e){Ue===null&&_d("onMount"),bi&&Ue.l!==null?a_(Ue).m.push(e):ge(()=>{const t=Ne(e);if(typeof t=="function")return t})}function a_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function l_(){return Symbol(Py)}function de(e,t,r=!1){var n;_e&&(n=Te,Qr());var i=new Ml(e),s=r?us:0;function o(a,l){if(_e){var c=ul(n);if(a!==parseInt(c.substring(1))){var d=ms();ft(d),i.anchor=d,yt(!1),i.ensure(a,l),yt(!0);return}}i.ensure(a,l)}ks(()=>{var a=!1;t((l,c=0)=>{a=!0,o(c,l)}),a||o(-1,null)},s)}function Ur(e,t){return t}function u_(e,t,r){for(var n=[],i=t.length,s,o=t.length,a=0;a<i;a++){let u=t[a];Hn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var p=e.outrogroups;Fl(e,vo(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=n.length===0&&r!==null;if(l){var c=r,d=c.parentNode;El(d),d.append(c),e.items.clear()}Fl(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Fl(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const o of e.pending.values())for(const a of o)n.add(e.items.get(a).e)}for(var i=0;i<t.length;i++){var s=t[i];n?.has(s)?(s.f|=cs,Ol(s,document.createDocumentFragment())):mt(t[i],r)}}var _f;function qe(e,t,r,n,i,s=null){var o=e,a=new Map;if((t&4)!==0){var l=e;o=_e?ft(Ht(l)):l.appendChild(Ft())}_e&&Qr();var c=null,d=bl(()=>{var _=r();return po(_)?_:_==null?[]:vo(_)}),u,p=new Map,f=!0;function g(_){(v.effect.f&16384)===0&&(v.pending.delete(_),v.fallback=c,c_(v,u,o,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?$o(c):(c.f^=cs,As(c,null,o)):Hn(c,()=>{c=null})))}function m(_){v.pending.delete(_)}var v={effect:ks(()=>{u=h(d);var _=u.length;let k=!1;_e&&ul(o)==="[!"!=(_===0)&&(o=ms(),ft(o),yt(!1),k=!0);for(var A=new Set,E=ke,T=Wd(),C=0;C<_;C+=1){_e&&Te.nodeType===8&&Te.data==="]"&&(o=Te,k=!0,yt(!1));var $=u[C],R=n($,C);if(0)var U;var N=f?null:a.get(R);N?(N.v&&xi(N.v,$),N.i&&xi(N.i,C),T&&E.unskip_effect(N.e)):(N=d_(a,f?o:_f??=Ft(),$,R,C,i,t,r),f||(N.e.f|=cs),a.set(R,N)),A.add(R)}if(_===0&&s&&!c&&(f?c=Nt(()=>s(o)):(c=Nt(()=>s(_f??=Ft())),c.f|=cs)),_>A.size&&wd("","",""),_e&&_>0&&ft(ms()),!f)if(p.set(E,A),T){for(const[le,V]of a)A.has(le)||E.skip_effect(V.e);E.oncommit(g),E.ondiscard(m)}else g(E);k&&yt(!0),h(d)}),flags:t,items:a,pending:p,outrogroups:null,fallback:c};f=!1,_e&&(o=Te)}function Ts(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function c_(e,t,r,n,i){var s=(n&8)!==0,o=t.length,a=e.items,l=Ts(e.effect.first),c,d=null,u,p=[],f=[],g,m,v,_;if(s)for(_=0;_<o;_+=1)g=t[_],m=i(g,_),v=a.get(m).e,(v.f&33554432)===0&&(v.nodes?.a?.measure(),(u??=new Set).add(v));for(_=0;_<o;_+=1){if(g=t[_],m=i(g,_),v=a.get(m).e,e.outrogroups!==null)for(const N of e.outrogroups)N.pending.delete(v),N.done.delete(v);if((v.f&8192)!==0&&($o(v),s&&(v.nodes?.a?.unfix(),(u??=new Set).delete(v))),(v.f&33554432)!==0)if(v.f^=cs,v===l)As(v,null,r);else{var k=d?d.next:l;v===e.effect.last&&(e.effect.last=v.prev),v.prev&&(v.prev.next=v.next),v.next&&(v.next.prev=v.prev),kn(e,d,v),kn(e,v,k),As(v,k,r),d=v,p=[],f=[],l=Ts(d.next);continue}if(v!==l){if(c!==void 0&&c.has(v)){if(p.length<f.length){var A=f[0],E;d=A.prev;var T=p[0],C=p[p.length-1];for(E=0;E<p.length;E+=1)As(p[E],A,r);for(E=0;E<f.length;E+=1)c.delete(f[E]);kn(e,T.prev,C.next),kn(e,d,T),kn(e,C,A),l=A,d=C,_-=1,p=[],f=[]}else c.delete(v),As(v,l,r),kn(e,v.prev,v.next),kn(e,v,d===null?e.effect.first:d.next),kn(e,d,v),d=v;continue}for(p=[],f=[];l!==null&&l!==v;)(c??=new Set).add(l),f.push(l),l=Ts(l.next);if(l===null)continue}(v.f&33554432)===0&&p.push(v),d=v,l=Ts(v.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Fl(e,vo(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var $=[];if(c!==void 0)for(v of c)(v.f&8192)===0&&$.push(v);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&$.push(l),l=Ts(l.next);var R=$.length;if(R>0){var U=(n&4)!==0&&o===0?r:null;if(s){for(_=0;_<R;_+=1)$[_].nodes?.a?.measure();for(_=0;_<R;_+=1)$[_].nodes?.a?.fix()}u_(e,$,U)}}s&&nr(()=>{if(u!==void 0)for(v of u)v.nodes?.a?.apply()})}function d_(e,t,r,n,i,s,o,a){var l=(o&1)!==0?(o&16)===0?zd(r,!1,!1):wn(r):null,c=(o&2)!==0?wn(i):null;return{v:l,i:c,e:Nt(()=>(s(t,l??r,c??i,a),()=>{e.delete(n)}))}}function As(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var o=gr(n);if(s.before(n),n===i)return;n=o}}function kn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function nF(e,t){const r=new Map,n=e.length;for(let i=0;i<n;i++){const s=t(e[i],i);if(r.has(s)){const o=String(r.get(s)),a=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),wd(o,a,l)}r.set(s,i)}}function iF(e,t,r){if(!t||t===Gb(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:dl?.[el]&&(n=`in ${dl[el]}`),rb(i_(n))}function f_(e,t,r=!1,n=!1,i=!1,s=!1){var o=e,a="";if(r){var l=e;_e&&(o=ft(Ht(l)))}ce(()=>{var c=Ee;if(a===(a=t()??"")){_e&&Qr();return}if(r&&!_e){c.nodes=null,l.innerHTML=a,a!==""&&_r(Ht(l),l.lastChild);return}if(c.nodes!==null&&(Qd(c.nodes.start,c.nodes.end),c.nodes=null),a!==""){if(_e){for(var d=Te.data,u=Qr(),p=u;u!==null&&(u.nodeType!==8||u.data!=="");)p=u,u=gr(u);if(u===null)throw ps(),Bn;_r(Te,p),o=ft(u);return}var f=Ao(n?"svg":i?"math":"template",n?Dy:i?Iy:void 0);f.innerHTML=a;var g=n||i?f:f.content;if(_r(Ht(g),g.lastChild),n||i)for(;Ht(g);)o.before(Ht(g));else o.before(g)}})}function h_(e,t,r,n,i){_e&&Qr();var s=t.$$slots?.[r],o=!1;s===!0&&(s=t[r==="default"?"children":r],o=!0),s===void 0?i!==null&&i(e):s(e,o?()=>n:n)}function De(e,t,r){var n;_e&&(n=Te,Qr());var i=new Ml(e);ks(()=>{var s=t()??null;if(_e&&ul(n)==="["!=(s!==null)){var o=ms();ft(o),i.anchor=o,yt(!1),i.ensure(s,s&&(a=>r(a,s))),yt(!0);return}i.ensure(s,s&&(a=>r(a,s)))},us)}function p_(e,t){var r=void 0,n;Jd(()=>{r!==(r=t())&&(n&&(mt(n),n=null),r&&(n=Nt(()=>{Po(()=>r(e))})))})}function wf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=wf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ro(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=wf(e))&&(n&&(n+=" "),n+=t);return n}function wr(e){return typeof e=="object"?Ro(e):e??""}var kf=[...`
|
|
12
|
+
\r\f \v\uFEFF`];function m_(e,t,r){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||kf.includes(n[o-1]))&&(a===n.length||kf.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function Sf(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var s=e[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Nl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function v_(e,t){if(t){var r="",n,i;if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).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 c=0,d=-1;const m=e.length;for(var u=0;u<m;u++){var p=e[u];if(a?p==="/"&&e[u-1]==="*"&&(a=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?a=!0:p==='"'||p==="'"?s=p:p==="("?o++:p===")"&&o--,!a&&s===!1&&o===0){if(p===":"&&d===-1)d=u;else if(p===";"||u===m-1){if(d!==-1){var f=Nl(e.substring(c,d).trim());if(!l.includes(f)){p!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,d=-1}}}}return n&&(r+=Sf(n)),i&&(r+=Sf(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Ot(e,t,r,n,i,s){var o=e[sl];if(_e||o!==r||o===void 0){var a=m_(r,n,s);(!_e||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[sl]=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function Rl(e,t={},r,n){for(var i in r){var s=r[i];t[i]!==s&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,s,n))}}function g_(e,t,r,n){var i=e[ol];if(_e||i!==t){var s=v_(t,n);(!_e||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[ol]=t}else n&&(Array.isArray(n)?(Rl(e,r?.[0],n[0]),Rl(e,r?.[1],n[1],"important")):Rl(e,r,n));return n}function Lo(e,t,r=!1){if(e.multiple){if(t==null)return;if(!po(t))return nb();for(var n of e.options)n.selected=t.includes(Os(n));return}for(n of e.options)if(Vd(Os(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Ef(e){var t=new MutationObserver(()=>{Lo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Io(()=>{t.disconnect()})}function y_(e,t,r=t){var n=new WeakSet,i=!0;Do(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),Os);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&Os(l)}r(a),e.__value=a,ke!==null&&n.add(ke)}),Po(()=>{var s=t();if(e===document.activeElement){var o=Wt?gs:ke;if(n.has(o))return}if(Lo(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=Os(a),r(s))}e.__value=s,i=!1}),Ef(e)}function Os(e){return"__value"in e?e.__value:e.value}var Cs=Symbol("class"),Ds=Symbol("style"),xf=Symbol("is custom element"),Tf=Symbol("is html"),b_=hs?"link":"LINK",Af=hs?"input":"INPUT",__=hs?"option":"OPTION",w_=hs?"select":"SELECT",k_=hs?"progress":"PROGRESS";function Is(e){if(_e){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;pe(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;pe(e,"checked",null),e.checked=i}}};e[fs]=r,nr(r),Gd()}}function Ll(e,t){var r=zo(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==k_)||(e.value=t??"")}function S_(e,t){var r=zo(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function zl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function pe(e,t,r,n){var i=zo(e);if(_e&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===b_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[zy]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ql(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Kn(e,t,r){var n=Ae,i=Ee;let s=_e;_e&&yt(!1),Rt(null),sr(null);try{t!=="style"&&(Ul.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?ql(e).includes(t):r&&typeof r=="object")?e[t]=r:pe(e,t,r==null?r:String(r))}finally{Rt(n),sr(i),s&&yt(!0)}}function E_(e,t,r,n,i=!1,s=!1){if(_e&&i&&e.nodeName===Af){var o=e;(o.type==="checkbox"?"defaultChecked":"defaultValue")in r||Is(o)}var a=zo(e),l=a[xf],c=!a[Tf];let d=_e&&l;d&&yt(!1);var u=t||{},p=e.nodeName===__;for(var f in t)f in r||(r[f]=null);r.class?r.class=wr(r.class):(n||r[Cs])&&(r.class=null),r[Ds]&&(r.style??=null);var g=ql(e);if(e.nodeName===Af&&"type"in r&&("value"in r||"__value"in r)){var m=r.type;(m!==u.type||m===void 0&&e.hasAttribute("type"))&&(u.type=m,pe(e,"type",m,s))}for(const C in r){let $=r[C];if(p&&C==="value"&&$==null){e.value=e.__value="",u[C]=$;continue}if(C==="class"){Ot(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",$,n,t?.[Cs],r[Cs]),u[C]=$,u[Cs]=r[Cs];continue}if(C==="style"){g_(e,$,t?.[Ds],r[Ds]),u[C]=$,u[Ds]=r[Ds];continue}var v=u[C];if(!($===v&&!($===void 0&&e.hasAttribute(C)))){u[C]=$;var _=C[0]+C[1];if(_!=="$$")if(_==="on"){const R={},U="$$"+C;let N=C.slice(2);var k=Jb(N);if(Kb(N)&&(N=N.slice(0,-7),R.capture=!0),!k&&v){if($!=null)continue;e.removeEventListener(N,u[U],R),u[U]=null}if(k)at(N,e,$),br([N]);else if($!=null){let le=function(V){u[C].call(this,V)};var T=le;u[U]=Il(N,e,le,R)}}else if(C==="style")pe(e,C,$);else if(C==="autofocus")Fb(e,!!$);else if(!l&&(C==="__value"||C==="value"&&$!=null))e.value=e.__value=$;else if(C==="selected"&&p)zl(e,$);else{var A=C;c||(A=e_(A));var E=A==="defaultValue"||A==="defaultChecked";if($==null&&!l&&!E)if(a[C]=null,A==="value"||A==="checked"){let R=e;const U=t===void 0;if(A==="value"){let N=R.defaultValue;R.removeAttribute(A),R.defaultValue=N,R.value=R.__value=U?N:null}else{let N=R.defaultChecked;R.removeAttribute(A),R.defaultChecked=N,R.checked=U?N:!1}}else e.removeAttribute(C);else E||g.includes(A)&&(l||typeof $!="string")?(e[A]=$,A in a&&(a[A]=ot)):typeof $!="function"&&pe(e,A,$,s)}}}return d&&yt(!0),u}function Re(e,t,r=[],n=[],i=[],s,o=!1,a=!1){Fd(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===w_,p=!1;if(Jd(()=>{var g=t(...l.map(h)),m=E_(e,c,g,s,o,a);p&&u&&"value"in g&&Lo(e,g.value);for(let _ of Object.getOwnPropertySymbols(d))g[_]||mt(d[_]);for(let _ of Object.getOwnPropertySymbols(g)){var v=g[_];_.description==="@attach"&&(!c||v!==c[_])&&(d[_]&&mt(d[_]),d[_]=Nt(()=>p_(e,()=>v))),m[_]=v}c=m}),u){var f=e;Po(()=>{Lo(f,c.value,!0),Ef(f)})}p=!0})}function zo(e){return e[bd]??={[xf]:e.nodeName.includes("-"),[Tf]:e.namespaceURI===Cy}}var Ul=new Map;function ql(e){var t=e.getAttribute("is")||e.nodeName,r=Ul.get(t);if(r)return r;Ul.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=fd(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=yo(i)}return r}function sF(e,t,r){}function Vl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Of(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function x_(e,t){var r=Of(e.srcset),n=Of(t);return n.length===r.length&&n.every(([i,s],o)=>s===r[o][1]&&(Vl(r[o][0],i)||Vl(i,r[o][0])))}var Bl=null;function T_(){if(Bl===null){var e=Ao("select");e.innerHTML=vf("<option><span>t</span></option>"),Bl=e.firstChild?.firstChild?.nodeType===1}return Bl}function A_(e,t){var r=_e;T_()||(yt(!1),e.textContent="",e.append(Mb("")));try{t()}finally{r&&(_e?M(e):(yt(!0),ft(e)))}}function Uo(e,t,r=t){var n=new WeakSet;Do(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Zl(e)?Wl(s):s,r(s),ke!==null&&n.add(ke),await df(),s!==(s=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=s??"",a!==null){var c=e.value.length;o===a&&a===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=o,e.selectionEnd=Math.min(a,c))}}}),(_e&&e.defaultValue!==e.value||Ne(t)==null&&e.value)&&(r(Zl(e)?Wl(e.value):e.value),ke!==null&&n.add(ke)),Ti(()=>{var i=t();if(e===document.activeElement){var s=Wt?gs:ke;if(n.has(s))return}Zl(e)&&i===Wl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var jl=new Set;function O_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=e;let a=!1;if(t!==null)for(var l of t)o=o[l]??=[];o.push(r),Do(r,"change",()=>{var c=r.__value;s&&(c=Cf(o,c,r.checked)),i(c)},()=>i(s?[]:null)),Ti(()=>{var c=n();if(_e&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Vd(r.__value,c)}),Io(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),jl.has(o)||(jl.add(o),nr(()=>{o.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),jl.delete(o)})),nr(()=>{if(a){var c;s?c=Cf(o,c,r.checked):c=o.find(d=>d.checked)?.__value,i(c)}})}function C_(e,t,r=t){Do(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(_e&&e.defaultChecked!==e.checked||Ne(t)==null)&&r(e.checked),Ti(()=>{var n=t();e.checked=!!n})}function Cf(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function Zl(e){var t=e.type;return t==="number"||t==="range"}function Wl(e){return e===""?null:+e}function Hl(e,t){return e===t||e?.[Nr]===t}function Gl(e={},t,r,n){var i=Ue.r,s=Ee;return Po(()=>{var o,a;return Ti(()=>{o=a,a=n?.()||[],Ne(()=>{Hl(r(...a),e)||(t(e,...a),o&&Hl(r(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{a&&Hl(r(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function Kl(e=!1){const t=Ue,r=t.l.u;if(!r)return;let n=()=>jb(t.s);if(e){let i=0,s={};const o=Ei(()=>{let a=!1;const l=t.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&&Tl(()=>{Df(t,n),tl(r.b)}),ge(()=>{const i=Ne(()=>r.m.map(Fy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ge(()=>{Df(t,n),tl(r.a)})}function Df(e,t){if(e.l.s)for(const r of e.l.s)h(r);t()}var D_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function je(e,t,r){return new Proxy({props:e,exclude:t},D_)}var I_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ls(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let i=e.props[n];ls(i)&&(i=i());const s=Fr(i,t);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ls(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Fr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Nr||t===il)return!1;for(let r of e.props)if(ls(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(ls(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function Sn(...e){return new Proxy({props:e},I_)}function b(e,t,r,n){var i=!bi||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=n,l=!0,c=void 0,d=()=>o&&i?(c??=Ei(n),h(c)):(l&&(l=!1,a=o?Ne(n):n),a);let u;if(s){var p=Nr in e||il in e;u=Fr(e,t)?.set??(p&&t in e?E=>e[t]=E:void 0)}var f,g=!1;s?[f,g]=yb(()=>e[t]):f=e[t],f===void 0&&n!==void 0&&(f=d(),u&&(i&&Gy(t),u(f)));var m;if(i?m=()=>{var E=e[t];return E===void 0?d():(l=!0,E)}:m=()=>{var E=e[t];return E!==void 0&&(a=void 0),E===void 0?a:E},i&&(r&4)===0)return m;if(u){var v=e.$$legacy;return(function(E,T){return arguments.length>0?((!i||!T||v||g)&&u(T?m():E),E):m()})}var _=!1,k=((r&1)!==0?Ei:bl)(()=>(_=!1,m()));s&&h(k);var A=Ee;return(function(E,T){if(arguments.length>0){const C=T?h(k):i&&s?Fe(E):E;return I(k,C),_=!0,a!==void 0&&(a=C),E}return en&&_||(A.f&16384)!==0?k.v:h(k)})}function P_(e){return new $_(e)}var $_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var o=zd(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return h(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===il?!0:(h(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return I(t.get(s)??r(s,o),o),Reflect.set(i,s,o)}});this.#t=(e.hydrate?s_:yf)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Wt&&(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=n.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||bn(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{o_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const r=(...n)=>t.call(this,...n);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(n=>n!==r)}}$destroy(){this.#t.$destroy()}},If;typeof HTMLElement=="function"&&(If=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const o=Ao("slot");i!=="default"&&(o.name=i),x(s,o)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=M_(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=qo(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=P_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ws(()=>{Ti(()=>{this.$$r=!0;for(const i of go(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=qo(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const o=this.$$c.$on(i,s);this.$$l_u.set(s,o)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=qo(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return go(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function qo(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function M_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ie(e,t,r,n,i,s){let o=class extends If{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return go(t).map(a=>(t[a].attribute||a).toLowerCase())}};return go(t).forEach(a=>{bn(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=qo(a,l,t),this.$$d[a]=l;var c=this.$$c;c&&(Fr(c,a)?.get?c[a]=l:c.$set({[a]:l}))}})}),n.forEach(a=>{bn(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),e.element=o,o}var Pf={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:e=>`/#/checkout/failure?payment_error=${e}`,checkoutSuccess:e=>`/#/checkout/success?ORDERID=${e}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:e=>"/#/tickets/combi?group="+e,dayTickets:()=>"/#/tickets/day",eventGroup:R_,event:e=>"/#/product/event/"+e,events:()=>"/#/products/events",exhibition:e=>"/#/exhibition/"+e,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:e=>"/#/merchandise/detail/"+e,merchandises:()=>"/#/merchandise/list",museum:e=>"/#/museum/"+e,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:e=>"/#/tickets/filters?group="+e,tour:e=>"/#/product/tour/"+e,tours:()=>"/#/products/tours",toursGroup:L_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},F_={...Pf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function N_(e){return e==="angular"?Pf:F_}function R_(e){return`/#/products/events?category_id=${(O.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function L_(e){return`/#/products/tours?category_id=${(O.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function z_(e){return new Promise(t=>setTimeout(t,e))}function $f(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function U_(e){return typeof e=="boolean"}function Yl(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=e();if(a){r(a);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}var Jl=Array.isArray,Mf=e=>!!e&&e.constructor===Object,q_=e=>typeof e=="string"||e instanceof String,V_=e=>{try{return Number(e)===e}catch{return!1}},B_=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Ff=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function En(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var j_=(e,t,r=!1)=>{if(!e)return[];const n=(s,o)=>t(s)-t(o),i=(s,o)=>t(o)-t(s);return e.slice().sort(r===!0?i:n)};function Z_(e,t){const r=t??(n=>n);return Ff(e,(n,i)=>r(n)>r(i)?n:i)}function Xl(e,t){const r=t??(n=>n);return Ff(e,(n,i)=>r(n)<r(i)?n:i)}var W_=(e,t)=>{const r=e.reduce((n,i)=>{const s=t?t(i):i;return n[s]||(n[s]=i),n},{});return Object.values(r)},Nf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},H_=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},kt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:Mf(e[n])?kt(e[n],i):i}),{}),Rf=class{#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&&$f(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!$f(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 t=JSON.parse(e);if(!(Mf(t)&&"uid"in t&&"client"in t&&"accessToken"in t&&"expiry"in t))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(t)}},G_=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,s=e.headers;t&&!s.has("uid")&&s.set("uid",t),r&&!s.has("client")&&s.set("client",r),n&&!s.has("access-token")&&s.set("access-token",n),i&&!s.has("expiry")&&s.set("expiry",String(i)),n&&!s.has("token-type")&&s.set("token-type","Bearer")}onResponse({response:e}){const t=e.headers.get("access-token"),r=e.headers.get("client"),n=e.headers.get("uid"),i=parseInt(e.headers.get("expiry")||"");return t&&r&&n&&i&&this.auth.signIn({uid:n,client:r,accessToken:t,expiry:i}),e}},Lf;function W(e,t,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(e))return;a._zod.traits.add(e),t(a,l);const c=o.prototype,d=Object.keys(c);for(let u=0;u<d.length;u++){const p=d[u];p in a||(a[p]=c[p].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();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(e)}),Object.defineProperty(o,"name",{value:e}),o}var Oi=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},zf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Lf=globalThis).__zod_globalConfig??(Lf.__zod_globalConfig={});var Vo=globalThis.__zod_globalConfig;function Yn(e){return e&&Object.assign(Vo,e),Vo}function Uf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function Ql(e,t){return typeof t=="bigint"?t.toString():t}function eu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function tu(e){return e==null}function ru(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function K_(e,t){const r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var qf=Symbol("evaluating");function Ve(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==qf)return n===void 0&&(n=qf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Jn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function xn(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Vf(e){return JSON.stringify(e)}function Y_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Bf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Bo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var J_=eu(()=>{if(Vo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Ps(e){if(Bo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Bo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function jf(e){return Ps(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var X_=new Set(["string","number","symbol"]);function jo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Tn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Q_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var ew={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Tn(e,xn(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Jn(this,"shape",i),i},checks:[]}))}function rw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");return Tn(e,xn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Jn(this,"shape",i),i},checks:[]}))}function nw(e,t){if(!Ps(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Tn(e,xn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Jn(this,"shape",n),n}}))}function iw(e,t){if(!Ps(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Tn(e,xn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Jn(this,"shape",r),r}}))}function sw(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return Tn(e,xn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Jn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ow(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");return Tn(t,xn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)s[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return Jn(this,"shape",s),s},checks:[]}))}function aw(e,t,r){return Tn(t,xn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Jn(this,"shape",i),i}}))}function Ci(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function lw(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Zf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Zo(e){return typeof e=="string"?e:e?.message}function Xn(e,t,r){const n=e.message?e.message:Zo(e.inst?._zod.def?.error?.(e))??Zo(t?.error?.(e))??Zo(r.customError?.(e))??Zo(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:o,...a}=e;return a.path??(a.path=[]),a.message=n,t?.reportInput&&(a.input=o),a}function nu(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function $s(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Wf=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ql,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Hf=W("$ZodError",Wf),Gf=W("$ZodError",Wf,{Parent:Error});function uw(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function cw(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>n({issues:a},[...s,...o.path]));else if(o.code==="invalid_key")n({issues:o.issues},[...s,...o.path]);else if(o.code==="invalid_element")n({issues:o.issues},[...s,...o.path]);else{const a=[...s,...o.path];if(a.length===0)r._errors.push(t(o));else{let l=r,c=0;for(;c<a.length;){const d=a[c];c!==a.length-1?l[d]=l[d]||{_errors:[]}:(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(o))),l=l[d],c++}}}};return n(e),r}var iu=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new Oi;if(o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Yn())));throw Bf(a,i?.callee),a}return o.value},su=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Yn())));throw Bf(a,i?.callee),a}return o.value},Wo=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Oi;return s.issues.length?{success:!1,error:new(e??Hf)(s.issues.map(o=>Xn(o,i,Yn())))}:{success:!0,data:s.value}},dw=Wo(Gf),Ho=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(o=>Xn(o,i,Yn())))}:{success:!0,data:s.value}},fw=Ho(Gf),hw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return iu(e)(t,r,i)},pw=e=>(t,r,n)=>iu(e)(t,r,n),mw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return su(e)(t,r,i)},vw=e=>async(t,r,n)=>su(e)(t,r,n),gw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Wo(e)(t,r,i)},yw=e=>(t,r,n)=>Wo(e)(t,r,n),bw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ho(e)(t,r,i)},_w=e=>async(t,r,n)=>Ho(e)(t,r,n),ww=/^[cC][0-9a-z]{6,}$/,kw=/^[0-9a-z]+$/,Sw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ew=/^[0-9a-vA-V]{20}$/,xw=/^[A-Za-z0-9]{27}$/,Tw=/^[a-zA-Z0-9_-]{21}$/,Aw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ow=/^([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})$/,Kf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/,Cw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Iw(){return new RegExp(Dw,"u")}var Pw=/^(?:(?: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])$/,$w=/^(([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}|:))$/,Mw=/^((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])$/,Fw=/^(([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])$/,Nw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yf=/^[A-Za-z0-9_-]*$/,Rw=/^https?$/,Lw=/^\+[1-9]\d{6,14}$/,Jf="(?:(?:\\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])))",zw=new RegExp(`^${Jf}$`);function Xf(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Uw(e){return new RegExp(`^${Xf(e)}$`)}function qw(e){const t=Xf({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Jf}T(?:${n})$`)}var Vw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Bw=/^-?\d+$/,jw=/^-?\d+(?:\.\d+)?$/,Zw=/^[^A-Z]*$/,Ww=/^[^a-z]*$/,Ut=W("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Qf={number:"number",bigint:"bigint",object:"date"},eh=W("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=Qf[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),th=W("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=Qf[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hw=W("$ZodCheckMultipleOf",(e,t)=>{Ut.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):K_(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Gw=W("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=ew[t.format];e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,a.minimum=i,a.maximum=s,r&&(a.pattern=Bw)}),e._zod.check=o=>{const a=o.value;if(r){if(!Number.isInteger(a)){o.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}a<i&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>s&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Kw=W("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!tu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const s=nu(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Yw=W("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!tu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const s=nu(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Jw=W("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!tu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,s=i.length;if(s===t.length)return;const o=nu(i),a=s>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Go=W("$ZodCheckStringFormat",(e,t)=>{var r,n;Ut.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Xw=W("$ZodCheckRegex",(e,t)=>{Go.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Qw=W("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Zw),Go.init(e,t)}),e0=W("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ww),Go.init(e,t)}),t0=W("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=jo(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),r0=W("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${jo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),n0=W("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${jo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),i0=W("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),s0=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
|
|
13
13
|
`).filter(i=>i),r=Math.min(...t.map(i=>i.length-i.trimStart().length)),n=t.map(i=>i.slice(r)).map(i=>" ".repeat(this.indent*2)+i);for(const i of n)this.content.push(i)}compile(){const e=Function,t=this?.args,r=[...(this?.content??[""]).map(n=>` ${n}`)];return new e(...t,r.join(`
|
|
14
|
-
`))}},
|
|
14
|
+
`))}},o0={major:4,minor:4,patch:3},lt=W("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=o0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(o,a,l)=>{let c=Ci(o),d;for(const u of a){if(u._zod.def.when){if(lw(o)||!u._zod.def.when(o))continue}else if(c)continue;const p=o.issues.length,f=u._zod.check(o);if(f instanceof Promise&&l?.async===!1)throw new Oi;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,o.issues.length!==p&&(c||(c=Ci(o,p)))});else{if(o.issues.length===p)continue;c||(c=Ci(o,p))}}return d?d.then(()=>o):o},s=(o,a,l)=>{if(Ci(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new Oi;return c.then(d=>e._zod.parse(d,l))}return e._zod.parse(c,l)};e._zod.run=(o,a)=>{if(a.skipChecks)return e._zod.parse(o,a);if(a.direction==="backward"){const c=e._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(d=>s(d,o,a)):s(c,o,a)}const l=e._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new Oi;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Ve(e,"~standard",()=>({validate:i=>{try{const s=dw(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return fw(e,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),ou=W("$ZodString",(e,t)=>{lt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vw(e._zod.bag),e._zod.parse=(r,n)=>{if(t.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:e}),r}}),Ye=W("$ZodStringFormat",(e,t)=>{Go.init(e,t),ou.init(e,t)}),a0=W("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ow),Ye.init(e,t)}),l0=W("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Kf(r))}else t.pattern??(t.pattern=Kf());Ye.init(e,t)}),u0=W("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Cw),Ye.init(e,t)}),c0=W("$ZodURL",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===Rw.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),d0=W("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Iw()),Ye.init(e,t)}),f0=W("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Tw),Ye.init(e,t)}),h0=W("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ww),Ye.init(e,t)}),p0=W("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=kw),Ye.init(e,t)}),m0=W("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Sw),Ye.init(e,t)}),v0=W("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ew),Ye.init(e,t)}),g0=W("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=xw),Ye.init(e,t)}),y0=W("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qw(t)),Ye.init(e,t)}),b0=W("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zw),Ye.init(e,t)}),_0=W("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Uw(t)),Ye.init(e,t)}),w0=W("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Aw),Ye.init(e,t)}),k0=W("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Pw),Ye.init(e,t),e._zod.bag.format="ipv4"}),S0=W("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=$w),Ye.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),E0=W("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Mw),Ye.init(e,t)}),x0=W("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Fw),Ye.init(e,t),e._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:e,continue:!t.abort})}}});function rh(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var T0=W("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Nw),Ye.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{rh(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function A0(e){if(!Yf.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return rh(t.padEnd(Math.ceil(t.length/4)*4,"="))}var O0=W("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Yf),Ye.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{A0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),C0=W("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Lw),Ye.init(e,t)});function D0(e,t=null){try{const r=e.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||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}var I0=W("$ZodJWT",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{D0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),nh=W("$ZodNumber",(e,t)=>{lt.init(e,t),e._zod.pattern=e._zod.bag.pattern??jw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),P0=W("$ZodNumberFormat",(e,t)=>{Gw.init(e,t),nh.init(e,t)}),$0=W("$ZodUnknown",(e,t)=>{lt.init(e,t),e._zod.parse=r=>r}),M0=W("$ZodNever",(e,t)=>{lt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function ih(e,t,r){e.issues.length&&t.issues.push(...Zf(r,e.issues)),t.value[r]=e.value}var F0=W("$ZodArray",(e,t)=>{lt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],l=t.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(c=>ih(c,r,o))):ih(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function Ko(e,t,r,n,i,s){const o=r in n;if(e.issues.length){if(i&&s&&!o)return;t.issues.push(...Zf(r,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?o&&(t.value[r]=void 0):t.value[r]=e.value}function sh(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Q_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function oh(e,t,r,n,i,s){const o=[],a=i.keySet,l=i.catchall._zod,c=l.def.type,d=l.optin==="optional",u=l.optout==="optional";for(const p in t){if(p==="__proto__"||a.has(p))continue;if(c==="never"){o.push(p);continue}const f=l.run({value:t[p],issues:[]},n);f instanceof Promise?e.push(f.then(g=>Ko(g,r,p,t,d,u))):Ko(f,r,p,t,d,u)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var N0=W("$ZodObject",(e,t)=>{if(lt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const o=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...o};return Object.defineProperty(t,"shape",{value:a}),a}})}const r=eu(()=>sh(t));Ve(e._zod,"propValues",()=>{const o=t.shape,a={};for(const l in o){const c=o[l]._zod;if(c.values){a[l]??(a[l]=new Set);for(const d of c.values)a[l].add(d)}}return a});const n=Bo,i=t.catchall;let s;e._zod.parse=(o,a)=>{s??(s=r.value);const l=o.value;if(!n(l))return o.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),o;o.value={};const c=[],d=s.shape;for(const u of s.keys){const p=d[u],f=p._zod.optin==="optional",g=p._zod.optout==="optional",m=p._zod.run({value:l[u],issues:[]},a);m instanceof Promise?c.push(m.then(v=>Ko(v,o,u,l,f,g))):Ko(m,o,u,l,f,g)}return i?oh(c,l,o,a,r.value,e):c.length?Promise.all(c).then(()=>o):o}}),R0=W("$ZodObjectJIT",(e,t)=>{N0.init(e,t);const r=e._zod.parse,n=eu(()=>sh(t)),i=p=>{const f=new s0(["shape","payload","ctx"]),g=n.value,m=A=>{const E=Vf(A);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};f.write("const input = payload.value;");const v=Object.create(null);let _=0;for(const A of g.keys)v[A]=`key_${_++}`;f.write("const newResult = {};");for(const A of g.keys){const E=v[A],T=Vf(A),C=p[A],$=C?._zod?.optin==="optional",R=C?._zod?.optout==="optional";f.write(`const ${E} = ${m(A)};`),$&&R?f.write(`
|
|
15
15
|
if (${E}.issues.length) {
|
|
16
16
|
if (${T} in input) {
|
|
17
17
|
payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
|
|
@@ -70,16 +70,16 @@ ${i}
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");const k=f.compile();return(A,E)=>k(p,A,E)};let s;const o=Vo,a=!qo.jitless,c=a&&Y_.value,d=t.catchall;let u;e._zod.parse=(p,f)=>{u??(u=n.value);const g=p.value;return o(g)?a&&c&&f?.async===!1&&f.jitless!==!0?(s||(s=i(t.shape)),p=s(p,f),d?sh([],g,p,f,u,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function oh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Ci(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(o=>Xn(o,n,Yn())))}),t)}var R0=W("$ZodUnion",(e,t)=>{lt.init(e,t),Ve(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ve(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ve(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Ve(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>tu(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let s=!1;const o=[];for(const a of t.options){const l=a._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)o.push(l),s=!0;else{if(l.issues.length===0)return l;o.push(l)}}return s?Promise.all(o).then(a=>oh(a,n,e,i)):oh(o,n,e,i)}}),L0=W("$ZodIntersection",(e,t)=>{lt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([a,l])=>ah(r,a,l)):ah(r,s,o)}});function ou(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ps(e)&&Ps(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const o=ou(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],o=ou(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 ah(e,t,r){const n=new Map;let i;for(const a of t.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 e.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 e.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&e.issues.push({...i,keys:s}),Ci(e))return e;const o=ou(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var z0=W("$ZodEnum",(e,t)=>{lt.init(e,t);const r=zf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>J_.has(typeof i)).map(i=>typeof i=="string"?Bo(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),U0=W("$ZodTransform",(e,t)=>{lt.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Lf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new Oi;return r.value=i,r.fallback=!0,r}});function lh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var uh=W("$ZodOptional",(e,t)=>{lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ve(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${tu(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(o=>lh(o,i)):lh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),q0=W("$ZodExactOptional",(e,t)=>{uh.init(e,t),Ve(e._zod,"values",()=>t.innerType._zod.values),Ve(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),V0=W("$ZodNullable",(e,t)=>{lt.init(e,t),Ve(e._zod,"optin",()=>t.innerType._zod.optin),Ve(e._zod,"optout",()=>t.innerType._zod.optout),Ve(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${tu(r.source)}|null)$`):void 0}),Ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),B0=W("$ZodDefault",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>ch(s,t)):ch(i,t)}});function ch(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var j0=W("$ZodPrefault",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),Z0=W("$ZodNonOptional",(e,t)=>{lt.init(e,t),Ve(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>dh(s,e)):dh(i,e)}});function dh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var W0=W("$ZodCatch",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ve(e._zod,"optout",()=>t.innerType._zod.optout),Ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(o=>Xn(o,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Xn(s,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),H0=W("$ZodPipe",(e,t)=>{lt.init(e,t),Ve(e._zod,"values",()=>t.in._zod.values),Ve(e._zod,"optin",()=>t.in._zod.optin),Ve(e._zod,"optout",()=>t.out._zod.optout),Ve(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(o=>Ko(o,t.in,n)):Ko(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Ko(s,t.out,n)):Ko(i,t.out,n)}});function Ko(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var G0=W("$ZodReadonly",(e,t)=>{lt.init(e,t),Ve(e._zod,"propValues",()=>t.innerType._zod.propValues),Ve(e._zod,"values",()=>t.innerType._zod.values),Ve(e._zod,"optin",()=>t.innerType?._zod?.optin),Ve(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(fh):fh(i)}});function fh(e){return e.value=Object.freeze(e.value),e}var K0=W("$ZodCustom",(e,t)=>{Ut.init(e,t),lt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>hh(s,r,n,e));hh(i,r,n,e)}});function hh(e,t,r,n){if(!e){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),t.issues.push($s(i))}}var ph,Y0=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function J0(){return new Y0}(ph=globalThis).__zod_globalRegistry??(ph.__zod_globalRegistry=J0());var Ms=globalThis.__zod_globalRegistry;function X0(e,t){return new e({type:"string",...be(t)})}function Q0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function mh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function ek(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function tk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function rk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function nk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function ik(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function sk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function ok(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function ak(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function lk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function uk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function ck(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function dk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function fk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function hk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function pk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function mk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function vk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function gk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function yk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function bk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function _k(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function wk(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function kk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function Sk(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function Ek(e,t){return new e({type:"number",checks:[],...be(t)})}function xk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function Tk(e){return new e({type:"unknown"})}function Ak(e,t){return new e({type:"never",...be(t)})}function vh(e,t){return new Qf({check:"less_than",...be(t),value:e,inclusive:!1})}function au(e,t){return new Qf({check:"less_than",...be(t),value:e,inclusive:!0})}function gh(e,t){return new eh({check:"greater_than",...be(t),value:e,inclusive:!1})}function lu(e,t){return new eh({check:"greater_than",...be(t),value:e,inclusive:!0})}function yh(e,t){return new Ww({check:"multiple_of",...be(t),value:e})}function bh(e,t){return new Gw({check:"max_length",...be(t),maximum:e})}function Yo(e,t){return new Kw({check:"min_length",...be(t),minimum:e})}function _h(e,t){return new Yw({check:"length_equals",...be(t),length:e})}function Ok(e,t){return new Jw({check:"string_format",format:"regex",...be(t),pattern:e})}function Ck(e){return new Xw({check:"string_format",format:"lowercase",...be(e)})}function Dk(e){return new Qw({check:"string_format",format:"uppercase",...be(e)})}function Ik(e,t){return new e0({check:"string_format",format:"includes",...be(t),includes:e})}function Pk(e,t){return new t0({check:"string_format",format:"starts_with",...be(t),prefix:e})}function $k(e,t){return new r0({check:"string_format",format:"ends_with",...be(t),suffix:e})}function Di(e){return new n0({check:"overwrite",tx:e})}function Mk(e){return Di(t=>t.normalize(e))}function Fk(){return Di(e=>e.trim())}function Nk(){return Di(e=>e.toLowerCase())}function Rk(){return Di(e=>e.toUpperCase())}function Lk(){return Di(e=>K_(e))}function zk(e,t,r){return new e({type:"array",element:t,...be(r)})}function Uk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...be(r)})}function qk(e,t){const r=Vk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push($s(i,n.value,r._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push($s(s))}},e(n.value,n)),t);return r}function Vk(e,t){const r=new Ut({check:"custom",...be(t)});return r._zod.check=e,r}function wh(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ms,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function bt(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o);const a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,c);else{const u=o.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const d=e._zod.parent;d&&(o.ref||(o.ref=d),bt(d,t,c),t.seen.get(d).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),t.io==="input"&&Ct(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function kh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of e.seen.entries()){const a=e.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=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(o[0])?.id,u=e.external.uri??(f=>f);if(d)return{ref:u(d)};const p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${u("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const l=`#/${a}/`,c=o[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},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 d=a.schema;for(const u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(const o of e.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
73
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");const k=f.compile();return(A,E)=>k(p,A,E)};let s;const o=Bo,a=!Vo.jitless,c=a&&J_.value,d=t.catchall;let u;e._zod.parse=(p,f)=>{u??(u=n.value);const g=p.value;return o(g)?a&&c&&f?.async===!1&&f.jitless!==!0?(s||(s=i(t.shape)),p=s(p,f),d?oh([],g,p,f,u,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function ah(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Ci(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(o=>Xn(o,n,Yn())))}),t)}var L0=W("$ZodUnion",(e,t)=>{lt.init(e,t),Ve(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ve(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ve(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Ve(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>ru(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let s=!1;const o=[];for(const a of t.options){const l=a._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)o.push(l),s=!0;else{if(l.issues.length===0)return l;o.push(l)}}return s?Promise.all(o).then(a=>ah(a,n,e,i)):ah(o,n,e,i)}}),z0=W("$ZodIntersection",(e,t)=>{lt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([a,l])=>lh(r,a,l)):lh(r,s,o)}});function au(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ps(e)&&Ps(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const o=au(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],o=au(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 lh(e,t,r){const n=new Map;let i;for(const a of t.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 e.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 e.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&e.issues.push({...i,keys:s}),Ci(e))return e;const o=au(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var U0=W("$ZodEnum",(e,t)=>{lt.init(e,t);const r=Uf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>X_.has(typeof i)).map(i=>typeof i=="string"?jo(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),q0=W("$ZodTransform",(e,t)=>{lt.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new zf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new Oi;return r.value=i,r.fallback=!0,r}});function uh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var ch=W("$ZodOptional",(e,t)=>{lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ve(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${ru(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(o=>uh(o,i)):uh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),V0=W("$ZodExactOptional",(e,t)=>{ch.init(e,t),Ve(e._zod,"values",()=>t.innerType._zod.values),Ve(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),B0=W("$ZodNullable",(e,t)=>{lt.init(e,t),Ve(e._zod,"optin",()=>t.innerType._zod.optin),Ve(e._zod,"optout",()=>t.innerType._zod.optout),Ve(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${ru(r.source)}|null)$`):void 0}),Ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),j0=W("$ZodDefault",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>dh(s,t)):dh(i,t)}});function dh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Z0=W("$ZodPrefault",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),W0=W("$ZodNonOptional",(e,t)=>{lt.init(e,t),Ve(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>fh(s,e)):fh(i,e)}});function fh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var H0=W("$ZodCatch",(e,t)=>{lt.init(e,t),e._zod.optin="optional",Ve(e._zod,"optout",()=>t.innerType._zod.optout),Ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(o=>Xn(o,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Xn(s,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),G0=W("$ZodPipe",(e,t)=>{lt.init(e,t),Ve(e._zod,"values",()=>t.in._zod.values),Ve(e._zod,"optin",()=>t.in._zod.optin),Ve(e._zod,"optout",()=>t.out._zod.optout),Ve(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(o=>Yo(o,t.in,n)):Yo(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Yo(s,t.out,n)):Yo(i,t.out,n)}});function Yo(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var K0=W("$ZodReadonly",(e,t)=>{lt.init(e,t),Ve(e._zod,"propValues",()=>t.innerType._zod.propValues),Ve(e._zod,"values",()=>t.innerType._zod.values),Ve(e._zod,"optin",()=>t.innerType?._zod?.optin),Ve(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(hh):hh(i)}});function hh(e){return e.value=Object.freeze(e.value),e}var Y0=W("$ZodCustom",(e,t)=>{Ut.init(e,t),lt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>ph(s,r,n,e));ph(i,r,n,e)}});function ph(e,t,r,n){if(!e){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),t.issues.push($s(i))}}var mh,J0=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function X0(){return new J0}(mh=globalThis).__zod_globalRegistry??(mh.__zod_globalRegistry=X0());var Ms=globalThis.__zod_globalRegistry;function Q0(e,t){return new e({type:"string",...be(t)})}function ek(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function vh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function tk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function rk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function nk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function ik(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function sk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function ok(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function ak(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function lk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function uk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function ck(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function dk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function fk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function hk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function pk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function mk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function vk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function gk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function yk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function bk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function _k(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function wk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function kk(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function Sk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function Ek(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function xk(e,t){return new e({type:"number",checks:[],...be(t)})}function Tk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function Ak(e){return new e({type:"unknown"})}function Ok(e,t){return new e({type:"never",...be(t)})}function gh(e,t){return new eh({check:"less_than",...be(t),value:e,inclusive:!1})}function lu(e,t){return new eh({check:"less_than",...be(t),value:e,inclusive:!0})}function yh(e,t){return new th({check:"greater_than",...be(t),value:e,inclusive:!1})}function uu(e,t){return new th({check:"greater_than",...be(t),value:e,inclusive:!0})}function bh(e,t){return new Hw({check:"multiple_of",...be(t),value:e})}function _h(e,t){return new Kw({check:"max_length",...be(t),maximum:e})}function Jo(e,t){return new Yw({check:"min_length",...be(t),minimum:e})}function wh(e,t){return new Jw({check:"length_equals",...be(t),length:e})}function Ck(e,t){return new Xw({check:"string_format",format:"regex",...be(t),pattern:e})}function Dk(e){return new Qw({check:"string_format",format:"lowercase",...be(e)})}function Ik(e){return new e0({check:"string_format",format:"uppercase",...be(e)})}function Pk(e,t){return new t0({check:"string_format",format:"includes",...be(t),includes:e})}function $k(e,t){return new r0({check:"string_format",format:"starts_with",...be(t),prefix:e})}function Mk(e,t){return new n0({check:"string_format",format:"ends_with",...be(t),suffix:e})}function Di(e){return new i0({check:"overwrite",tx:e})}function Fk(e){return Di(t=>t.normalize(e))}function Nk(){return Di(e=>e.trim())}function Rk(){return Di(e=>e.toLowerCase())}function Lk(){return Di(e=>e.toUpperCase())}function zk(){return Di(e=>Y_(e))}function Uk(e,t,r){return new e({type:"array",element:t,...be(r)})}function qk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...be(r)})}function Vk(e,t){const r=Bk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push($s(i,n.value,r._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push($s(s))}},e(n.value,n)),t);return r}function Bk(e,t){const r=new Ut({check:"custom",...be(t)});return r._zod.check=e,r}function kh(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ms,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function bt(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o);const a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,c);else{const u=o.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const d=e._zod.parent;d&&(o.ref||(o.ref=d),bt(d,t,c),t.seen.get(d).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),t.io==="input"&&Ct(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Sh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of e.seen.entries()){const a=e.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=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(o[0])?.id,u=e.external.uri??(f=>f);if(d)return{ref:u(d)};const p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${u("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const l=`#/${a}/`,c=o[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},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 d=a.schema;for(const u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(const o of e.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
74
74
|
|
|
75
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const a=o[1];if(t===o[0]){s(o);continue}if(e.external){const l=e.external.registry.get(o[0])?.id;if(t!==o[0]&&l){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&e.reused==="ref"){s(o);continue}}}function Sh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const l=e.seen.get(a);if(l.ref===null)return;const c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);const f=e.seen.get(u),g=f.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,d),a._zod.parent===u)for(const m in c)m==="$ref"||m==="allOf"||m in d||delete c[m];if(g.$ref&&f.def)for(const m in c)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(c[m])===JSON.stringify(f.def[m])&&delete c[m]}const p=a._zod.parent;if(p&&p!==u){n(p);const f=e.seen.get(p);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(const g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g])&&delete c[g]}e.override({zodSchema:a,jsonSchema:c,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())n(a[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(a)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const o=e.external?.defs??{};for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Jo(t,"input",e.processors),output:Jo(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Ct(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ct(n.element,r);if(n.type==="set")return Ct(n.valueType,r);if(n.type==="lazy")return Ct(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 Ct(n.innerType,r);if(n.type==="intersection")return Ct(n.left,r)||Ct(n.right,r);if(n.type==="record"||n.type==="map")return Ct(n.keyType,r)||Ct(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ct(n.in,r)||Ct(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Ct(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Ct(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Ct(i,r))return!0;return!!(n.rest&&Ct(n.rest,r))}return!1}var Bk=(e,t={})=>r=>{const n=wh({...r,processors:t});return bt(e,n),kh(n,e),Sh(n,e)},Jo=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=wh({...i??{},target:s,io:t,processors:r});return bt(e,o),kh(o,e),Sh(o,e)},jk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zk=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=jk[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const d=[...l];d.length===1?i.pattern=d[0].source:d.length>1&&(i.allOf=[...d.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},Wk=(e,t,r,n)=>{const i=r,{minimum:s,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";const u=typeof d=="number"&&d>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(o??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";u?f?(i.minimum=d,i.exclusiveMinimum=!0):i.exclusiveMinimum=d:typeof s=="number"&&(i.minimum=s),p?f?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},Hk=(e,t,r,n)=>{r.not={}},Gk=(e,t,r,n)=>{},Kk=(e,t,r,n)=>{const i=e._zod.def,s=zf(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},Yk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Jk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Xk=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=bt(s.element,t,{...n,path:[...n.path,"items"]})},Qk=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const o=s.shape;for(const c in o)i.properties[c]=bt(o[c],t,{...n,path:[...n.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const d=s.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=bt(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},eS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>bt(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},tS=(e,t,r,n)=>{const i=e._zod.def,s=bt(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=bt(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]]},rS=(e,t,r,n)=>{const i=e._zod.def,s=bt(i.innerType,t,n),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},nS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},iS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},sS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},oS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);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},aS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?s?i.out:i.in:i.out;bt(o,t,n);const a=t.seen.get(e);a.ref=o},lS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},Eh=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},uS=W("ZodISODateTime",(e,t)=>{g0.init(e,t),Xe.init(e,t)});function cS(e){return _k(uS,e)}var dS=W("ZodISODate",(e,t)=>{y0.init(e,t),Xe.init(e,t)});function fS(e){return wk(dS,e)}var hS=W("ZodISOTime",(e,t)=>{b0.init(e,t),Xe.init(e,t)});function pS(e){return kk(hS,e)}var mS=W("ZodISODuration",(e,t)=>{_0.init(e,t),Xe.init(e,t)});function vS(e){return Sk(mS,e)}var gS=(e,t)=>{Wf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>uw(e,r)},flatten:{value:r=>lw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Xl,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Xl,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=W("ZodError",gS,{Parent:Error}),yS=nu(ar),bS=iu(ar),_S=Zo(ar),wS=Wo(ar),kS=fw(ar),SS=hw(ar),ES=pw(ar),xS=mw(ar),TS=vw(ar),AS=gw(ar),OS=yw(ar),CS=bw(ar),xh=new WeakMap;function Fs(e,t,r){const n=Object.getPrototypeOf(e);let i=xh.get(n);if(i||(i=new Set,xh.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const o=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const a=o.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var ut=W("ZodType",(e,t)=>(lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Jo(e,"input"),output:Jo(e,"output")}}),e.toJSONSchema=Bk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>yS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>_S(e,r,n),e.parseAsync=async(r,n)=>bS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>wS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>kS(e,r,n),e.decode=(r,n)=>SS(e,r,n),e.encodeAsync=async(r,n)=>ES(e,r,n),e.decodeAsync=async(r,n)=>xS(e,r,n),e.safeEncode=(r,n)=>TS(e,r,n),e.safeDecode=(r,n)=>AS(e,r,n),e.safeEncodeAsync=async(r,n)=>OS(e,r,n),e.safeDecodeAsync=async(r,n)=>CS(e,r,n),Fs(e,"ZodType",{check(...r){const n=this.def;return this.clone(xn(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return Tn(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(_1(r,n))},superRefine(r,n){return this.check(w1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return $h(this)},exactOptional(){return l1(this)},nullable(){return Mh(this)},nullish(){return $h(Mh(this))},nonoptional(r){return p1(this,r)},array(){return Ih(this)},or(r){return t1([this,r])},and(r){return n1(this,r)},transform(r){return Nh(this,o1(r))},default(r){return d1(this,r)},prefault(r){return h1(this,r)},catch(r){return v1(this,r)},pipe(r){return Nh(this,r)},readonly(){return b1(this)},describe(r){const n=this.clone();return Ms.add(n,{description:r}),n},meta(...r){if(r.length===0)return Ms.get(this);const n=this.clone();return Ms.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Ms.get(e)?.description},configurable:!0}),e)),Th=W("_ZodString",(e,t)=>{su.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Zk(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fs(e,"_ZodString",{regex(...n){return this.check(Ok(...n))},includes(...n){return this.check(Ik(...n))},startsWith(...n){return this.check(Pk(...n))},endsWith(...n){return this.check($k(...n))},min(...n){return this.check(Yo(...n))},max(...n){return this.check(bh(...n))},length(...n){return this.check(_h(...n))},nonempty(...n){return this.check(Yo(1,...n))},lowercase(n){return this.check(Ck(n))},uppercase(n){return this.check(Dk(n))},trim(){return this.check(Fk())},normalize(...n){return this.check(Mk(...n))},toLowerCase(){return this.check(Nk())},toUpperCase(){return this.check(Rk())},slugify(){return this.check(Lk())}})}),DS=W("ZodString",(e,t)=>{su.init(e,t),Th.init(e,t),e.email=r=>e.check(Q0(IS,r)),e.url=r=>e.check(ik(PS,r)),e.jwt=r=>e.check(bk(HS,r)),e.emoji=r=>e.check(sk($S,r)),e.guid=r=>e.check(mh(Ah,r)),e.uuid=r=>e.check(ek(Xo,r)),e.uuidv4=r=>e.check(tk(Xo,r)),e.uuidv6=r=>e.check(rk(Xo,r)),e.uuidv7=r=>e.check(nk(Xo,r)),e.nanoid=r=>e.check(ok(MS,r)),e.guid=r=>e.check(mh(Ah,r)),e.cuid=r=>e.check(ak(FS,r)),e.cuid2=r=>e.check(lk(NS,r)),e.ulid=r=>e.check(uk(RS,r)),e.base64=r=>e.check(vk(jS,r)),e.base64url=r=>e.check(gk(ZS,r)),e.xid=r=>e.check(ck(LS,r)),e.ksuid=r=>e.check(dk(zS,r)),e.ipv4=r=>e.check(fk(US,r)),e.ipv6=r=>e.check(hk(qS,r)),e.cidrv4=r=>e.check(pk(VS,r)),e.cidrv6=r=>e.check(mk(BS,r)),e.e164=r=>e.check(yk(WS,r)),e.datetime=r=>e.check(cS(r)),e.date=r=>e.check(fS(r)),e.time=r=>e.check(pS(r)),e.duration=r=>e.check(vS(r))});function lr(e){return X0(DS,e)}var Xe=W("ZodStringFormat",(e,t)=>{Ye.init(e,t),Th.init(e,t)}),IS=W("ZodEmail",(e,t)=>{l0.init(e,t),Xe.init(e,t)}),Ah=W("ZodGUID",(e,t)=>{o0.init(e,t),Xe.init(e,t)}),Xo=W("ZodUUID",(e,t)=>{a0.init(e,t),Xe.init(e,t)}),PS=W("ZodURL",(e,t)=>{u0.init(e,t),Xe.init(e,t)}),$S=W("ZodEmoji",(e,t)=>{c0.init(e,t),Xe.init(e,t)}),MS=W("ZodNanoID",(e,t)=>{d0.init(e,t),Xe.init(e,t)}),FS=W("ZodCUID",(e,t)=>{f0.init(e,t),Xe.init(e,t)}),NS=W("ZodCUID2",(e,t)=>{h0.init(e,t),Xe.init(e,t)}),RS=W("ZodULID",(e,t)=>{p0.init(e,t),Xe.init(e,t)}),LS=W("ZodXID",(e,t)=>{m0.init(e,t),Xe.init(e,t)}),zS=W("ZodKSUID",(e,t)=>{v0.init(e,t),Xe.init(e,t)}),US=W("ZodIPv4",(e,t)=>{w0.init(e,t),Xe.init(e,t)}),qS=W("ZodIPv6",(e,t)=>{k0.init(e,t),Xe.init(e,t)}),VS=W("ZodCIDRv4",(e,t)=>{S0.init(e,t),Xe.init(e,t)}),BS=W("ZodCIDRv6",(e,t)=>{E0.init(e,t),Xe.init(e,t)}),jS=W("ZodBase64",(e,t)=>{x0.init(e,t),Xe.init(e,t)}),ZS=W("ZodBase64URL",(e,t)=>{A0.init(e,t),Xe.init(e,t)}),WS=W("ZodE164",(e,t)=>{O0.init(e,t),Xe.init(e,t)}),HS=W("ZodJWT",(e,t)=>{D0.init(e,t),Xe.init(e,t)}),Oh=W("ZodNumber",(e,t)=>{rh.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Wk(e,n,i,s),Fs(e,"ZodNumber",{gt(n,i){return this.check(gh(n,i))},gte(n,i){return this.check(lu(n,i))},min(n,i){return this.check(lu(n,i))},lt(n,i){return this.check(vh(n,i))},lte(n,i){return this.check(au(n,i))},max(n,i){return this.check(au(n,i))},int(n){return this.check(Ch(n))},safe(n){return this.check(Ch(n))},positive(n){return this.check(gh(0,n))},nonnegative(n){return this.check(lu(0,n))},negative(n){return this.check(vh(0,n))},nonpositive(n){return this.check(au(0,n))},multipleOf(n,i){return this.check(yh(n,i))},step(n,i){return this.check(yh(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ns(e){return Ek(Oh,e)}var GS=W("ZodNumberFormat",(e,t)=>{I0.init(e,t),Oh.init(e,t)});function Ch(e){return xk(GS,e)}var KS=W("ZodUnknown",(e,t)=>{P0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gk(e,r,n,i)});function Dh(){return Tk(KS)}var YS=W("ZodNever",(e,t)=>{$0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hk(e,r,n,i)});function JS(e){return Ak(YS,e)}var XS=W("ZodArray",(e,t)=>{M0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Xk(e,r,n,i),e.element=t.element,Fs(e,"ZodArray",{min(r,n){return this.check(Yo(r,n))},nonempty(r){return this.check(Yo(1,r))},max(r,n){return this.check(bh(r,n))},length(r,n){return this.check(_h(r,n))},unwrap(){return this.element}})});function Ih(e,t){return zk(XS,e,t)}var QS=W("ZodObject",(e,t)=>{N0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qk(e,r,n,i),Ve(e,"shape",()=>t.shape),Fs(e,"ZodObject",{keyof(){return i1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Dh()})},loose(){return this.clone({...this._zod.def,catchall:Dh()})},strict(){return this.clone({...this._zod.def,catchall:JS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return rw(this,r)},safeExtend(r){return nw(this,r)},merge(r){return iw(this,r)},pick(r){return ew(this,r)},omit(r){return tw(this,r)},partial(...r){return sw(Ph,this,r[0])},required(...r){return ow(Fh,this,r[0])}})});function uu(e,t){return new QS({type:"object",shape:e??{},...be(t)})}var e1=W("ZodUnion",(e,t)=>{R0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>eS(e,r,n,i),e.options=t.options});function t1(e,t){return new e1({type:"union",options:e,...be(t)})}var r1=W("ZodIntersection",(e,t)=>{L0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tS(e,r,n,i)});function n1(e,t){return new r1({type:"intersection",left:e,right:t})}var cu=W("ZodEnum",(e,t)=>{z0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Kk(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const o of n)if(r.has(o))s[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new cu({...t,checks:[],...be(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const o of n)if(r.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new cu({...t,checks:[],...be(i),entries:s})}});function i1(e,t){return new cu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...be(t)})}var s1=W("ZodTransform",(e,t)=>{U0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Jk(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Lf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push($s(s,r.value,t));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push($s(o))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function o1(e){return new s1({type:"transform",transform:e})}var Ph=W("ZodOptional",(e,t)=>{uh.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Eh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $h(e){return new Ph({type:"optional",innerType:e})}var a1=W("ZodExactOptional",(e,t)=>{q0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Eh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function l1(e){return new a1({type:"optional",innerType:e})}var u1=W("ZodNullable",(e,t)=>{V0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Mh(e){return new u1({type:"nullable",innerType:e})}var c1=W("ZodDefault",(e,t)=>{B0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>iS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function d1(e,t){return new c1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Bf(t)}})}var f1=W("ZodPrefault",(e,t)=>{j0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>sS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function h1(e,t){return new f1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Bf(t)}})}var Fh=W("ZodNonOptional",(e,t)=>{Z0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>nS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function p1(e,t){return new Fh({type:"nonoptional",innerType:e,...be(t)})}var m1=W("ZodCatch",(e,t)=>{W0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>oS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function v1(e,t){return new m1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var g1=W("ZodPipe",(e,t)=>{H0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>aS(e,r,n,i),e.in=t.in,e.out=t.out});function Nh(e,t){return new g1({type:"pipe",in:e,out:t})}var y1=W("ZodReadonly",(e,t)=>{G0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function b1(e){return new y1({type:"readonly",innerType:e})}var Rh=W("ZodCustom",(e,t)=>{K0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Yk(e,r,n,i)});function _1(e,t={}){return Uk(Rh,e,t)}function w1(e,t){return qk(e,t)}function k1(e,t={}){const r=new Rh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...be(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var S1=uu({id:Ns(),customer:uu({customer_salutation_id:Ns().positive({message:"user.fieldErrors.titleRequire"}),name:lr().min(1,{message:"user.fieldErrors.nameRequire"}),surname:lr().min(1,{message:"user.fieldErrors.surnameRequire"}),email:lr().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:lr().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:lr().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:lr().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:lr().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Ns().positive().default(60),language_id:Ns().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),nF=uu({ticket_sale_id:Ns(),start_at:lr().date(),personalizations:Ih(S1)});function du(e,t){return e-t*Math.floor(e/t)}var Lh=1721426;function Qo(e,t,r,n){t=fu(e,t);let i=t-1,s=-2;return r<=2?s=0:ea(t)&&(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(e){return e%4===0&&(e%100!==0||e%400===0)}function fu(e,t){return e==="BC"?1-t:t}function E1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var x1={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]},Ii=class{fromJulianDay(e){let t=e,r=t-Lh,n=Math.floor(r/146097),i=du(r,146097),s=Math.floor(i/36524),o=du(i,36524),a=Math.floor(o/1461),l=du(o,1461),c=Math.floor(l/365),[d,u]=E1(n*400+s*100+a*4+c+(s!==4&&c!==4?1:0)),p=t-Qo(d,u,1,1),f=2;t<Qo(d,u,3,1)?f=0:ea(u)&&(f=1);let g=Math.floor(((p+f)*12+373)/367);return new Us(d,u,g,t-Qo(d,u,g,1)+1)}toJulianDay(e){return Qo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return x1[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"}},T1={"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 An(e,t){return t=Kt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function hu(e,t){return t=Kt(t,e.calendar),e=mu(e),t=mu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function A1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function O1(e,t){return An(e,Qn(t))}var C1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function zh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?C1[r]:M1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function D1(e){return Vr(Date.now(),e)}function Qn(e){return R1(D1(e))}function Uh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function qh(e,t){return Vh(e)-Vh(t)}function Vh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var pu=null,I1=!1;function qt(){return pu==null&&(pu=new Intl.DateTimeFormat().resolvedOptions().timeZone),pu}function Bh(){return I1}function mu(e){return e.subtract({days:e.day-1})}function P1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var jh=new Map,vu=new Map;function $1(e){if(Intl.Locale){let r=jh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&jh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function M1(e){let t=vu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return vu.set(e,t),t.firstDay}let r=$1(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&T1[r]||0};vu.set(e,t)}return t.firstDay}function On(e){return e=Kt(e,new Ii),Zh(fu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Zh(e,t,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(e,t-1,r),a.getTime()}function Rs(e,t){if(t==="UTC")return 0;if(e>0&&t===qt()&&!Bh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=Hh(e,t);return Zh(r,n,i,s,o,a,0)-Math.floor(e/1e3)*1e3}var Wh=new Map;function Hh(e,t){let r=Wh.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Wh.set(t,r));let n=r.formatToParts(new Date(e)),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}}var ta=864e5;function F1(e,t){let r=On(e);return Gh(e,t,r-Rs(r-ta,t),r-Rs(r+ta,t))}function Gh(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>N1(e,t,i))}function N1(e,t,r){let n=Hh(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function qr(e,t,r="compatible"){let n=Cn(e);if(t==="UTC")return On(n);if(t===qt()&&r==="compatible"&&!Bh()){n=Kt(n,new Ii);let l=new Date,c=fu(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=On(n),s=Rs(i-ta,t),o=Rs(i+ta,t),a=Gh(n,t,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 Kh(e,t,r="compatible"){return new Date(qr(e,t,r))}function Vr(e,t){let r=Rs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new Dn(i<1?"BC":"AD",i<1?-i+1:i,s,o,t,r,a,l,c,d)}function R1(e){return new Us(e.calendar,e.era,e.year,e.month,e.day)}function Cn(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Pi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function L1(e){return new X1(e.hour,e.minute,e.second,e.millisecond)}function Kt(e,t){if(A1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,ei(n),n}function z1(e,t,r){return e instanceof Dn?e.timeZone===t?e:Yh(e,t):Vr(qr(e,t,r),t)}function U1(e){let t=On(e)-e.offset;return new Date(t)}function Yh(e,t){return Kt(Vr(On(e)-e.offset,t),e.calendar)}var Ls=36e5;function ra(e,t){let r=e.copy(),n="hour"in r?ep(r,t):0;gu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,yu(r),Jh(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,q1(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 gu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function yu(e){for(;e.month<1;)gu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gu(e,1)}function q1(e){for(;e.day<1;)e.month--,yu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,yu(e)}function Jh(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ei(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Jh(e)}function bu(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function Xh(e,t){return ra(e,bu(t))}function _u(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),ei(r),r}function zs(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),Qh(r),r}function V1(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=na(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=na(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=na(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=na(e.hour,24),t}function Qh(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function na(e,t){let r=e%t;return r<0&&(r+=t),r}function ep(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,V1(e)}function tp(e,t){let r=e.copy();return ep(r,t),r}function B1(e,t){return tp(e,bu(t))}function wu(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),o=s.indexOf(e.era);if(o<0)throw new Error("Invalid era: "+e.era);o=nn(o,r,0,s.length-1,n?.round),i.era=s[o],ei(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=nn(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=nn(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=nn(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),ei(i),i}function ku(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=nn(s,r,o,a,n?.round);break}case"minute":i.minute=nn(e.minute,r,0,59,n?.round);break;case"second":i.second=nn(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=nn(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function nn(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function rp(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=qr(ra(Cn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=On(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,Kt(Vr(r,e.timeZone),e.calendar)}function j1(e,t){return rp(e,bu(t))}function Z1(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let o=Cn(e),a=Kt(zs(o,{hour:i}),new Ii),l=[qr(a,e.timeZone,"earlier"),qr(a,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===a.day)[0],c=Kt(zs(o,{hour:s}),new Ii),d=[qr(c,e.timeZone,"earlier"),qr(c,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===c.day).pop(),u=On(e)-e.offset,p=Math.floor(u/Ls),f=u%Ls;return u=nn(p,r,Math.floor(l/Ls),Math.floor(d/Ls),n?.round)*Ls+f,Kt(Vr(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return ku(e,t,r,n);case"era":case"year":case"month":case"day":return Kt(Vr(qr(wu(Cn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function W1(e,t,r){let n=Cn(e),i=zs(_u(n,t),t);return i.compare(n)===0?e:Kt(Vr(qr(i,e.timeZone,r),e.timeZone),e.calendar)}var H1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,G1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,K1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Su=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,Y1=["hours","minutes","seconds"],iF=["years","months","weeks","days",...Y1];function ia(e){let t=e.match(H1);if(!t)throw Su.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Us(Le(t[1],0,9999),Le(t[2],1,12),1);return r.day=Le(t[3],1,r.calendar.getDaysInMonth(r)),r}function np(e){let t=e.match(G1);if(!t)throw Su.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Le(t[1],-9999,9999),n=new Pi(r<1?"BC":"AD",r<1?-r+1:r,Le(t[2],1,12),1,t[4]?Le(t[4],0,23):0,t[5]?Le(t[5],0,59):0,t[6]?Le(t[6],0,59):0,t[7]?Le(t[7],0,1/0)*1e3:0);return n.day=Le(t[3],0,n.calendar.getDaysInMonth(n)),n}function ip(e,t){let r=e.match(K1);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Le(r[1],-9999,9999),i=new Dn(n<1?"BC":"AD",n<1?-n+1:n,Le(r[2],1,12),1,r[11],0,r[4]?Le(r[4],0,23):0,r[5]?Le(r[5],0,59):0,r[6]?Le(r[6],0,59):0,r[7]?Le(r[7],0,1/0)*1e3:0);i.day=Le(r[3],0,i.calendar.getDaysInMonth(i));let s=Cn(i),o;if(r[8]){let a=Le(r[8],-23,23);if(i.offset=Math.sign(a)*(Math.abs(a)*36e5+Le(r[9]??"0",0,59)*6e4+Le(r[10]??"0",0,59)*1e3),o=On(i)-i.offset,!F1(s,i.timeZone).includes(o))throw new Error(`Offset ${lp(i.offset)} is invalid for ${Eu(i)} in ${i.timeZone}`)}else o=qr(Cn(s),i.timeZone,t);return Vr(o,i.timeZone)}function sp(e,t){let r=e.match(Su);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Le(r[1],-9999,9999),i=new Dn(n<1?"BC":"AD",n<1?-n+1:n,Le(r[2],1,12),1,t,0,r[4]?Le(r[4],0,23):0,r[5]?Le(r[5],0,59):0,r[6]?Le(r[6],0,59):0,r[7]?Le(r[7],0,1/0)*1e3:0);return i.day=Le(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Le(r[8],-23,23)*36e5+Le(r[9]??"0",0,59)*6e4),Yh(i,t)}function Le(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function op(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function ap(e){let t=Kt(e,new Ii),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Eu(e){return`${ap(e)}T${op(e)}`}function lp(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function J1(e){return`${Eu(e)}${lp(e.offset)}[${e.timeZone}]`}function xu(e){let t=typeof e[0]=="object"?e.shift():new Ii,r;if(typeof e[0]=="string")r=e.shift();else{let o=t.getEras();r=o[o.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var Us=class sd{#e;constructor(...t){let[r,n,i,s,o]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,ei(this)}copy(){return this.era?new sd(this.calendar,this.era,this.year,this.month,this.day):new sd(this.calendar,this.year,this.month,this.day)}add(t){return ra(this,t)}subtract(t){return Xh(this,t)}set(t){return _u(this,t)}cycle(t,r,n){return wu(this,t,r,n)}toDate(t){return Kh(this,t)}toString(){return ap(this)}compare(t){return Uh(this,t)}},X1=class Jg{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,Qh(this)}copy(){return new Jg(this.hour,this.minute,this.second,this.millisecond)}add(t){return tp(this,t)}subtract(t){return B1(this,t)}set(t){return zs(this,t)}cycle(t,r,n){return ku(this,t,r,n)}toString(){return op(this)}compare(t){return qh(this,t)}},Pi=class od{#e;constructor(...t){let[r,n,i,s,o]=xu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ei(this)}copy(){return this.era?new od(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new od(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ra(this,t)}subtract(t){return Xh(this,t)}set(t){return _u(zs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return wu(this,t,r,n);default:return ku(this,t,r,n)}}toDate(t,r){return Kh(this,t,r)}toString(){return Eu(this)}compare(t){let r=Uh(this,t);return r===0?qh(this,Cn(t)):r}},Dn=class ad{#e;constructor(...t){let[r,n,i,s,o]=xu(t),a=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ei(this)}copy(){return this.era?new ad(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new ad(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return rp(this,t)}subtract(t){return j1(this,t)}set(t,r){return W1(this,t,r)}cycle(t,r,n){return Z1(this,t,r,n)}toDate(){return U1(this)}toString(){return J1(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-z1(t,this.timeZone).toDate().getTime()}},Tu=new Map,kr=class{constructor(e,t={}){this.formatter=up(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return tE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=rE(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}},Q1={true:{ja:"h11"},false:{}};function up(e,t={}){if(typeof t.hour12=="boolean"&&eE()){t={...t};let i=Q1[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Tu.has(r))return Tu.get(r);let n=new Intl.DateTimeFormat(e,t);return Tu.set(r,n),n}var Au=null;function eE(){return Au==null&&(Au=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Au}var Ou=null;function tE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function rE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=up(e,{...t,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 qs(e){return L1(sp(e,"Europe/Berlin")).toString().slice(0,-3)}function Vs(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=sp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new kr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function sa(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function Cu(e){return e?.type==="Ticket"}function oa(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function In(e,t=""){return B_(Object.values(e).map(r=>oa(r,{selectedTime:t})),r=>r.shop_order)}function Pn(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var nE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!Cu(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager;s.clearPrecart();for(const l of[...n.items,...t.items]){const c=l.product;Cu(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 Bs(e){return e?.type==="Event"}function iE(e){return Bs(e)&&e.subtype==="scale"}function sE(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};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=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Du(e,t,r){return sE(e,t,r)}var oE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!Bs(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const o=Math.min(s.max||100,s.max_per_registration||100,s.available??100),a={max_per_registration:o,available:100,overbook:!1,...s};let l=o;a.overbook&&(l=Math.min(a.max||100,a.max_per_registration||100));const c=n.totalQuantity,d=En(t.items.filter(p=>n.items.some(f=>f.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-d-c+r.quantity,0);return{max:u,min:a.min??0,unavailable:a.available===0,bookedOut:u===0}},aE=function(e,t,r,n){if(e.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 lE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=En(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(o=>({timeslot:t,ticket:o,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r){return(Jl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.capacity))??0)+this.getPrecartItemQuantity(t)},totalCapacity(t,r){return Jl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(o=>r.includes(o))));const i=V_(n,s=>s.timeSlot);return Object.values(i).map(s=>j_(Z_(s.flatMap(o=>o.tickets)).map(o=>Jl(s.filter(a=>a.tickets.includes(o)),a=>a.capacity)).filter(o=>o!==null),o=>o.capacity)??s[0]).sort((s,o)=>s.timeSlot.localeCompare(o.timeSlot))}}}function uE(e){let t=0;ws(()=>{ge(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function pt(e,t){return{quantity:0,time:"",...t??{},type:e.type,product:e,orderAttributes(){const r={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(e.type){case"Ticket":return{...r,time:this.time,quantity:this.quantity};case"Event":switch(e.subtype){case"flat":return{...r,quantity:this.quantity};case"scale":return{...r,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...r,quantity:this.quantity};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const r=[];return this.time&&r.push(`time: ${this.time}`),iE(this.product)&&r.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&r.push("discounted"),r.length>0?` (${r.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 ur(this.price_cents)},get final_price_cents(){const r=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*r},get final_price_formatted(){return ur(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return ur(this.total_price_cents)}}}var sF=15*6e4;function aa(){return typeof window<"u"&&typeof localStorage<"u"}function cE(e,t){if(aa())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Iu(e){if(!aa())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function cp(e){if(aa())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function dp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var fp="go-cart",la=(e,t)=>localStorage.setItem(fp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function dE(e){const t=e.product.type;switch(t){case"Ticket":return hp(e)?pt(oa(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity}):void 0;case"Event":return hp(e)?pt(Du(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return pt(dp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function fE(e){let t=[],r=[],n;try{const i=localStorage.getItem(fp);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),la([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(dE).filter(vE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.items)}catch(i){return console.error(i),la([],[]),[]}}function hE(e){fE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});la(e.items||[],e.coupons||[]),ws(()=>{ge(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,la(e.items||[],e.coupons||[]))})})}var pE=e=>new Date<new Date(e),mE=e=>ia(e.slice(0,10)).compare(Qn(qt()))>=0,hp=e=>e.time?e.product.subtype==="day"?mE(e.time):pE(e.time):!0,vE=e=>e!==void 0,gE=0;function $i(e,t=20){const r={items:Fe([]),coupons:Fe([]),paymentModeId:void 0,uid:`cart-${gE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,En(this.items,n=>n.total_price_cents))},get totalQuantity(){return En(this.items,n=>n.quantity)},get valueVoucherCents(){return En(this.coupons.filter(n=>n.kind==="valueVoucher"),n=>n.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(n=>n.uuid+":"+n.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(n=>({type:n.type,attributes:n.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??C.settings?.defaultPaymentModeId,coupons:this.coupons.map(n=>n.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return ur(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(n){for(let i=this.items.length-1;i>=0;i--)this.items[i].uuid===n.uuid&&this.items.splice(i,1)},addItem(n){const i=this.items.find(s=>s.uuid===n.uuid);i?i.quantity+=n.quantity:this.items.push(n)},addItems(n){n.forEach(i=>this.addItem(i))},addCoupon(n){const i={...n,code:n.code.toUpperCase()};this.coupons.some(s=>s.code===i.code)||this.coupons.push(i)},removeCoupon(n){const i=n.toUpperCase(),s=this.coupons.findIndex(o=>o.code===i);s>-1&&this.coupons.splice(s,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(n=>r.addItem(pt(n))),r}function ur(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function yE(){const e=Fe($i());return hE(e),uE(e),e}var Mi="go-capacity";function pp(e,t){const r=Iu(Mi);cE(Mi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function mp(e){const t=Iu(Mi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){cp(Mi);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function bE(e){aa()&&window.addEventListener("storage",t=>{if(t.key===Mi&&mp(e),t.key==="go-cart"){const r=Iu("go-cart");(!r||!r.items||r.items.length===0)&&cp(Mi)}})}function vp(){const e={allSeats:{},allQuotas:{},quotaManager:lE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&pp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&pp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product.subtype;switch(n){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${n}`)}case"Event":const i=t.product.subtype;switch(i){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Coupon":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:nE,seats:oE,unlimited:aE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ne(()=>s(this,t,r,n))}};return mp(e),bE(e),e}function gp(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var yp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},_E=class extends yp{constructor(){super()}get isLoggedIn(){try{const e=gp("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=gp("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},wE=class extends yp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},kE=e=>{switch(e){case"angular":return new _E;case"jmb":return new wE;default:throw new Error("Unhandled shop type: "+e)}};function SE(e){return e==null||typeof e=="string"&&e.trim()===""}function EE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||SE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function xE(e,t){return EE(e,t)}var TE={withStackTrace:!1},bp=(e,t,r=TE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ti(e,t,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(d){try{c(n.next(d))}catch(u){o(u)}}function l(d){try{c(n.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function _p(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Br(e){return this instanceof Br?(this.v=e,this):new Br(e)}function wp(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(f){return function(g){return Promise.resolve(g).then(f,u)}}function a(f,g){n[f]&&(i[f]=function(m){return new Promise(function(v,_){s.push([f,m,v,_])>1||l(f,m)})},g&&(i[f]=g(i[f])))}function l(f,g){try{c(n[f](g))}catch(m){p(s[0][3],m)}}function c(f){f.value instanceof Br?Promise.resolve(f.value.v).then(d,u):p(s[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function p(f,g){f(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function AE(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(o){return(r=!r)?{value:Br(e[i](o)),done:!1}:s?s(o):o}:s}}function OE(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof _p=="function"?_p(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[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)}}var ri=class vr{constructor(t){this._promise=t}static fromSafePromise(t){return new vr(t.then(r=>new Zr(r)))}static fromPromise(t,r){return new vr(t.then(n=>new Zr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new vr(ti(this,void 0,void 0,function*(){try{return new Zr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return CE(t)}static combineWithAllErrors(t){return DE(t)}map(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Zr(yield t(r.value))})))}andThrough(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Zr(r.value)})))}andTee(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Zr(r.value)})))}orTee(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isOk())return new Zr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Zr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new vr(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof vr?n._promise:n}))}orElse(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Zr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return wp(this,arguments,function*(){return yield Br(yield Br(yield*AE(OE(yield Br(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return wp(this,arguments,function*(){const r=yield Br(this._promise);return r.isErr()&&(yield yield Br(ua(r.error))),yield Br(r.value)})}};function ua(e){return new ri(Promise.resolve(new Sr(e)))}var oF=ri.fromPromise,aF=ri.fromSafePromise,lF=ri.fromThrowable,kp=e=>{let t=$n([]);for(const r of e)if(r.isErr()){t=jr(r.error);break}else t.map(n=>n.push(r.value));return t},CE=e=>ri.fromSafePromise(Promise.all(e)).andThen(kp),Sp=e=>{let t=$n([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=jr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},DE=e=>ri.fromSafePromise(Promise.all(e)).andThen(Sp),Pu;(function(e){function t(i,s){return(...o)=>{try{return $n(i(...o))}catch(a){return jr(s?s(a):a)}}}e.fromThrowable=t;function r(i){return kp(i)}e.combine=r;function n(i){return Sp(i)}e.combineWithAllErrors=n})(Pu||(Pu={}));function $n(e){return new Zr(e)}function jr(e){return new Sr(e)}var Zr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $n(e(this.value))}mapErr(e){return $n(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return $n(this.value)}orTee(e){return $n(this.value)}orElse(e){return $n(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ri.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw bp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return jr(this.error)}mapErr(e){return jr(e(this.error))}andThrough(e){return jr(this.error)}andTee(e){return jr(this.error)}orTee(e){try{e(this.error)}catch{}return jr(this.error)}andThen(e){return jr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return ua(this.error)}asyncAndThrough(e){return ua(this.error)}asyncMap(e){return ua(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield jr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw bp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},uF=Pu.fromThrowable,IE=/\{[^{}]+\}/g,PE=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function $E(){return Math.random().toString(36).slice(2,11)}function ME(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:o,headers:a,requestInitExt:l=void 0,...c}={...e};l=PE()?l:void 0,t=Op(t);const d=[];async function u(p,f){const{baseUrl:g,fetch:m=n,Request:v=r,headers:_,params:k={},parseAs:A="json",querySerializer:E,bodySerializer:T=s??NE,pathSerializer:O,body:$,middleware:R=[],...U}=f||{};let N=t;g&&(N=Op(g)??t);let le=typeof i=="function"?i:Tp(i);E&&(le=typeof E=="function"?E:Tp({...typeof i=="object"?i:{},...E}));const V=O||o||FE,ae=$===void 0?void 0:T($,Ap(a,_,k.header)),me=Ap(ae===void 0||ae instanceof FormData?{}:{"Content-Type":"application/json"},a,_,k.header),J=[...d,...R],oe={redirect:"follow",...c,...U,body:ae,headers:me};let G,Q,K=new v(RE(p,{baseUrl:N,params:k,querySerializer:le,pathSerializer:V}),oe),H;for(const P in U)P in K||(K[P]=U[P]);if(J.length){G=$E(),Q=Object.freeze({baseUrl:N,fetch:m,parseAs:A,querySerializer:le,bodySerializer:T,pathSerializer:V});for(const P of J)if(P&&typeof P=="object"&&typeof P.onRequest=="function"){const ue=await P.onRequest({request:K,schemaPath:p,params:k,options:Q,id:G});if(ue)if(ue instanceof v)K=ue;else if(ue instanceof Response){H=ue;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!H){try{H=await m(K,l)}catch(P){let ue=P;if(J.length)for(let z=J.length-1;z>=0;z--){const ve=J[z];if(ve&&typeof ve=="object"&&typeof ve.onError=="function"){const fe=await ve.onError({request:K,error:ue,schemaPath:p,params:k,options:Q,id:G});if(fe){if(fe instanceof Response){ue=void 0,H=fe;break}if(fe instanceof Error){ue=fe;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ue)throw ue}if(J.length)for(let P=J.length-1;P>=0;P--){const ue=J[P];if(ue&&typeof ue=="object"&&typeof ue.onResponse=="function"){const z=await ue.onResponse({request:K,response:H,schemaPath:p,params:k,options:Q,id:G});if(z){if(!(z instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");H=z}}}}const B=H.headers.get("Content-Length");if(H.status===204||K.method==="HEAD"||B==="0"&&!H.headers.get("Transfer-Encoding")?.includes("chunked"))return H.ok?{data:void 0,response:H}:{error:void 0,response:H};if(H.ok)return{data:await(async()=>{if(A==="stream")return H.body;if(A==="json"&&!B){const ue=await H.text();return ue?JSON.parse(ue):void 0}return await H[A]()})(),response:H};let ee=await H.text();try{ee=JSON.parse(ee)}catch{}return{error:ee,response:H}}return{request(p,f,g){return u(f,{...g,method:p.toUpperCase()})},GET(p,f){return u(p,{...f,method:"GET"})},PUT(p,f){return u(p,{...f,method:"PUT"})},POST(p,f){return u(p,{...f,method:"POST"})},DELETE(p,f){return u(p,{...f,method:"DELETE"})},OPTIONS(p,f){return u(p,{...f,method:"OPTIONS"})},HEAD(p,f){return u(p,{...f,method:"HEAD"})},PATCH(p,f){return u(p,{...f,method:"PATCH"})},TRACE(p,f){return u(p,{...f,method:"TRACE"})},use(...p){for(const f of p)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");d.push(f)}},eject(...p){for(const f of p){const g=d.indexOf(f);g!==-1&&d.splice(g,1)}}}}function ca(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Ep(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const a in t)n.push(a,r.allowReserved===!0?t[a]:encodeURIComponent(t[a]));const o=n.join(",");switch(r.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const a=r.style==="deepObject"?`${e}[${o}]`:o;n.push(ca(a,t[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function xp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?t:t.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(ca(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Tp(e){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)){if(s.length===0)continue;n.push(xp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Ep(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ca(i,s,e))}}return n.join("&")}}function FE(e,t){let r=e;for(const n of e.match(IE)??[]){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)),!t||t[i]===void 0||t[i]===null)continue;const a=t[i];if(Array.isArray(a)){r=r.replace(n,xp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,Ep(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${ca(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function NE(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function RE(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function Ap(...e){const t=new Headers;for(const r of e){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)t.delete(i);else if(Array.isArray(s))for(const o of s)t.append(i,o);else s!==void 0&&t.set(i,s)}return t}function Op(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function LE(e,t){return ME({baseUrl:e,headers:{"X-Shop-Url":t}})}var zE="/api/v4/calendar",UE="/api/v4/tickets/calendar",qE="/api/v4/auth/validate_token",VE="/api/v4/tickets/list_and_quotas",BE="/api/v4/tickets",jE="/api/v4/auth/sign_in",ZE="/api/v4/auth",WE="/api/v4/orders/withdrawals",Cp={SHOP_GUEST:10,SHOP:20},HE=class{type;#e=te(Fe({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),h(this.#e).urls=F_(this.type),h(this.#e).currentUser=kE(this.type),h(this.#e).apiUrl=e,h(this.#e).shopDomain=t,h(this.#e).locale=r||"de",this.#t={},h(this.#e).client=LE(e,t),h(this.#e).capacityManager=vp(),h(this.#e).cart=yE(),h(this.#e).auth=new Nf,h(this.#e).client.use(new H_(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return h(this.#e).capacityManager||(h(this.#e).capacityManager=vp()),h(this.#e).capacityManager}get cart(){return h(this.#e).cart}get auth(){return h(this.#e).auth||(h(this.#e).auth=new Nf),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,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}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(qE,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(UE,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(zE,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(VE,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:kt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(BE,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:kt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:kt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(jE,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=kt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Cp.SHOP_GUEST:Cp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(ZE,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(WE,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:kt({per_page:100},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 t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}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,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),h(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),o=!this.#t[s],a=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(o||a)&&this.apiGet(e,i,n.path).then(l=>{l&&(h(this.#e)[t]=r===""?l:l[r])}),h(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}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,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:kt(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,o=xE(r,i);if(Object.keys(o).length>0)return{error:{errors:o}};const a=this.client[t.method];return await a(e,{body:r,params:kt(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await L_(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=kt(i,{params:{query:t}})),e&&(i=kt(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#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.")}},C=new HE;function Fi(e){return function(t,r){if(t)t.addEventListener(e,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.")}}var GE=class Xg{host;KEY;pollDuration;#e=te(Fe({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new Xg(null,null);return r.value=t,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(t){h(this.#e).value=t}};function Ni(e){return function(t,r={pollDuration:1e3}){if(t){const n=new GE(t,e,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.")}}var KE={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},YE=class{defaultConfig=kt(KE,window.customOptions);override=this.defaultConfig;#e=te(Fe(this.defaultConfig));get options(){return h(this.#e)}set options(e){I(this.#e,e,!0)}constructor(){this.update()}update(){const e=kt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=kt(this.override,e),this.update(),this}default(e){return this.defaultConfig=kt(this.defaultConfig,e),this.update(),this}},We=new YE,Dp=class{#e=te();get token(){return h(this.#e)}set token(e){I(this.#e,e,!0)}#t=te();get ticketSaleId(){return h(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){if(this.token)return ul(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return ul(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return We.config.urls.annualTicketPersonalizationForm?We.config.urls.annualTicketPersonalizationForm(this.token,e.id):C.urls.annualTicketPersonalizationForm(this.token,e.id)}},Ip="go-annual-ticket-personalization",Pp=Fi(Ip),JE=Ni(Ip),XE=j("<li><a> </a></li>"),QE=j('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function ex(e,t){re(t,!0);let r=b(t,"token",7);const n=new Dp;Pp(t.$$host,n),ge(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=Y(),a=q(o),l=c=>{var d=Y(),u=q(d);qe(u,17,()=>h(i).ticket_sales,p=>p.id,(p,f)=>{var g=QE(),m=F(g),v=F(m,!0);M(m);var _=X(m,2),k=F(_,!0);M(_);var A=X(_,2),E=T=>{var O=XE(),$=F(O),R=F($,!0);M($),M(O),ce((U,N)=>{pe($,"href",U),se(R,N)},[()=>n.goToPersonalization(h(f)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),x(T,O)};de(A,T=>{h(f).status=="not_ready_to_send"&&T(E)}),M(g),ce(T=>{pe(g,"data-ticket-sale-id",h(f).id),se(v,h(f).title),se(k,T)},[()=>C.t("ticket.annual.personalization.detail.title",{count:h(f).personalizations.length})]),x(p,g)}),x(c,d)};return de(a,c=>{h(i)&&c(l)}),x(e,o),ne(s)}customElements.define("go-annual-ticket-personalization",ie(ex,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var tx={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>C.customerSalutations.map(e=>({label:e.salutation,value:e.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:lr().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:lr().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:lr().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:()=>C.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>C.locales.map(e=>({label:C.t(`languages.${e.locale}`),value:e.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:lr().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:k1(File)},withdrawalFirstName:{key:"withdrawalFirstName",apiKey:"first_name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},withdrawalLastName:{key:"withdrawalLastName",apiKey:"last_name",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},orderNumber:{key:"orderNumber",apiKey:"order_id",type:"text",label:"withdrawal.form.orderNumber",placeholder:"",description:"",autocomplete:"off"},withdrawalNote:{key:"withdrawalNote",apiKey:"note",type:"textarea",label:"withdrawal.form.note",placeholder:"",description:"",autocomplete:"off"},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(C.payment_modes?Object.values(C.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function rx(e,t){return{...e,errors:e.errors||[],value:e.value??nx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){ix(this)}}}function nx(e){return e==="checkbox"?!1:e==="file"?null:""}function ix(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var cr=class Xa{static#e={};static defineForm(t){We.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){We.default({fields:t})}static{Xa.defineFields(tx)}static setRequiredApiKeys(t,r){Xa.#e[t]=r}static getFormOptions(t){return We.config.forms[t]}static createField(t,r){const n=Xa.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return rx(n,r)}static getFormFields(t){return sx(t)}static getFieldInit(t){return We.config.fields[t]}};function sx(e){const t=We.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function $u(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function ox(e,t){re(t,!0);let r=b(t,"token",7),n=b(t,"ticketSaleId",7),i;const s=new Dp;Pp(t.$$host,s),ge(()=>{s.token=r(),s.ticketSaleId=n()}),cr.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const m=s.ticketSale.personalizations.length,v=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),_=Ff(m,(T,O)=>{const $=v[O-1].details;return T.push($),T},[]);if(_.forEach(T=>{T.fields.forEach(O=>{T.validateField(O)})}),!Ff(m,(T,O)=>_[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const T=_.map(async($,R)=>{const U=s.ticketSale.personalizations[R].id,N=$.fields.find(V=>V.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const le=await C.uploadPersonalizationPhoto(r(),U,N);return le.error?{ok:!1,error:le.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(T)).find($=>!$.ok);if(O){i.details.apiErrors=[O.error];return}}const k={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:_.map((T,O)=>{const $=W_(T.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:$}})}},A=await C.finalizePersonalizations(r(),k);if(A.error){i.details.apiErrors=[A.error.error];return}const E=We.config.forms.personalization?.beforeSubmit;E&&E(k),We.config.urls.annualTicketPersonalizationFormSubmit?.()&&We.config.navigateTo(We.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function p(){return a?!0:(a=t.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),a.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function f(m){if(!p()||!a||!l||!c)return;const v=a.parentElement;if(!v)return;const _=Math.max(m,1),k=Array.from(v.querySelectorAll("go-personalization-form"));for(;k.length<_;){const E=l.cloneNode(!0);u(E),v.insertBefore(E,c),k.push(E)}for(;k.length>_;){const E=k.pop();E&&E!==a&&E.remove()}const A=s.ticketSale?.personalizations??[];k.forEach((E,T)=>{const O=A[T];O&&(E.dataset.personalizationId=String(O.id))}),d=_}rn(()=>{p(),t.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ge(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==d&&f(m)});var g={details:s,get token(){return r()},set token(m){r(m),y()},get ticketSaleId(){return n()},set ticketSaleId(m){n(m),y()}};return ne(g)}customElements.define("go-annual-ticket-personalization-form",ie(ox,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var ax=class{formId;form;#e=te(Fe([]));#t=D(()=>$u(this.fields)==0);get isValid(){return h(this.#t)}set isValid(e){I(this.#t,e)}#r=te();get successMessage(){return h(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(r){return q_(r)||z_(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return h(this.#e)}set apiErrors(e){if(this.fields.forEach(t=>t.apiErrors=[]),Yl(e)){I(this.#e,e,!0);return}if(e.errors&&Yl(e.errors)&&I(this.#e,e.errors,!0),U_(e.error)){I(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.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(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},$p="go-form-details",lx=Fi($p),Ri=Ni($p);function Mn(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var ux=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 cx(e,t){re(t,!0);let r=b(t,"formId",7),n=b(t,"custom",7);const i=new ax(r(),t.$$host);lx(t.$$host,i);async function s(d){d.preventDefault(),d.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",d)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",d)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}rn(()=>{const d=Mn(t.$$host,"form",{novalidate:!0});d.addEventListener("submit",s),i.form=d});var o={details:i,get formId(){return r()},set formId(d){r(d),y()},get custom(){return n()},set custom(d){n(d),y()}},a=Y(),l=q(a),c=d=>{var u=ux(),p=q(u),f=X(p,2),g=X(f,2),m=F(g,!0);M(g),ce(v=>se(m,v),[()=>C.t(cr.getFormOptions(r())?.submitLabel||"Submit")]),x(d,u)};return de(l,d=>{n()||d(c)}),x(e,a),ne(o)}customElements.define("go-form",ie(cx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var dx=j("<go-form></go-form>",2);function fx(e,t){re(t,!0);let r=b(t,"custom",7,!1);cr.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(o){const a=o.target.details,l=await C.passwordReset(a.formData);l.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),a.successMessage=l.data.message,a.apiErrors=[]):a.apiErrors=l.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),y()}},s=dx();return Kn(s,"formId","passwordReset"),ce(()=>Kn(s,"custom",r())),Mo("submit",s,n),x(e,s),ne(i)}customElements.define("go-password-reset",ie(fx,{custom:{}},[],[]));function hx(e,t){re(t,!0),cr.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=b(t,"custom",7,!1);async function n(i){const s=i.target.details,o=await C.signIn(s.formData);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return Mn(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-in",ie(hx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function px(e,t){re(t,!0);let r=b(t,"custom",7,!1);cr.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(i){const s=i.target.details,o=await C.signUp(s.formData,!1);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return Mn(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-up",ie(px,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function mx(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function Mp(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function vx(e){return mx(Mp(e),0)}function gx(e){const t=Mp(e);if(t&&typeof t=="object"){const r=Object.keys(t);if(r.length>0)return Number(r[0])}}function yx(e,t){const r=$i(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,o=gx(s),a=e.items.find(l=>l.type.toLowerCase()===i.type.toLowerCase()&&l.product.id===s.id&&(!s.time||l.time===s.time)&&(o===void 0||Bs(l.product)&&l.product.scale_price_id===o));if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(bx(a,s))}),r}function bx(e,t){const r=vx(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return pt({...e.product,price_cents:n},{quantity:r,time:e.time,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var _x=class{#e=te();get displayCart(){return h(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=te(!1);get preview(){return h(this.#t)}set preview(e){I(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return C.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=C.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await C.createCart({items:t,coupons:r});if(n?.data){this.displayCart=yx(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Fp="go-cart-details",wx=Fi(Fp),Li=Ni(Fp),kx=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Np(e,t){re(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(o){r(o),y()}},i=kx(),s=F(i,!0);return M(i),ce(()=>se(s,r().product.title)),x(e,i),ne(n)}ie(Np,{cartItem:{}},[],[],{mode:"open"});var Sx=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),Ex=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 Rp(e,t){re(t,!0);let r=b(t,"cartItem",7);if(!Bs(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(f){r(f),y()}},s=Ex(),o=q(s),a=F(o),l=F(a,!0);M(a);var c=X(a),d=F(c,!0);M(c),M(o);var u=X(o),p=f=>{var g=Sx(),m=q(g),v=F(m,!0);M(m);var _=X(m),k=F(_,!0);M(_),ce((A,E)=>{se(v,A),se(k,E)},[()=>Vs(r().time,{month:"numeric",day:"numeric"},C.locale),()=>qs(r().time)]),x(f,g)};return de(u,f=>{r().time&&f(p)}),ce(()=>{se(l,n.event_title),se(d,n.title)}),x(e,s),ne(i)}ie(Rp,{cartItem:{}},[],[],{mode:"open"});var xx=j('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),Tx=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Ax=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Lp(e,t){re(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=Ax(),s=q(i),o=F(s,!0);M(s);var a=X(s,2),l=c=>{var d=Tx(),u=q(d),p=F(u,!0);M(u);var f=X(u,2),g=m=>{var v=xx(),_=F(v,!0);M(v),ce(k=>se(_,k),[()=>qs(r().time)]),x(m,v)};de(f,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),ce(m=>se(p,m),[()=>Vs(r().time,{month:"numeric",day:"numeric"},C.locale)]),x(c,d)};return de(a,c=>{r().time&&c(l)}),ce(()=>se(o,r().product.title)),x(e,i),ne(n)}ie(Lp,{cartItem:{}},[],[],{mode:"open"});function zp(e,{min:t,max:r}){const n=e===0?Math.max(t,1):e+1;return n>r?e:n}function Ox(e,{min:t}){return e<=t?0:e-1}function Cx(e,{min:t,max:r}){if(!Number.isFinite(e)||e<=0)return 0;let n=Math.floor(e);return n<t&&(n=t),n>r&&(n=r),n}function Dx(e,{min:t,max:r}){return e<0||e>r?!1:e===0||e>=t}function Up(e,t){return zp(e,t)>e}function qp(e){return e>0}var Ix=j('<div class="go-quantity-stepper" role="group"><button type="button" class="go-quantity-stepper-button go-quantity-stepper-decrement" tabindex="-1"><span aria-hidden="true">−</span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Mu(e,t){const r=ht();re(t,!0);let n=b(t,"value",7),i=b(t,"min",7),s=b(t,"max",7),o=b(t,"label",7),a=b(t,"decreaseLabel",7),l=b(t,"increaseLabel",7),c=b(t,"onChange",7),d,u=te(!1);const p=D(()=>!qp(n())),f=D(()=>!Up(n(),{min:i(),max:s()}));function g(U){U!==n()&&c()(U)}function m(){qp(n())&&g(Ox(n(),{min:i(),max:s()}))}function v(){Up(n(),{min:i(),max:s()})&&g(zp(n(),{min:i(),max:s()}))}function _(){const U=Cx(parseInt(d.value,10),{min:i(),max:s()});I(u,!1),d.value=String(U),g(U)}function k(){const U=d.value.trim();I(u,!(/^\d+$/.test(U)&&Dx(parseInt(U,10),{min:i(),max:s()})))}function A(U){switch(U.key){case"ArrowUp":U.preventDefault(),v();break;case"ArrowDown":U.preventDefault(),m();break;case"Home":U.preventDefault(),g(0);break;case"End":U.preventDefault(),g(s());break;case"Enter":U.preventDefault(),_();break}}var E={get value(){return n()},set value(U){n(U),y()},get min(){return i()},set min(U){i(U),y()},get max(){return s()},set max(U){s(U),y()},get label(){return o()},set label(U){o(U),y()},get decreaseLabel(){return a()},set decreaseLabel(U){a(U),y()},get increaseLabel(){return l()},set increaseLabel(U){l(U),y()},get onChange(){return c()},set onChange(U){c(U),y()}},T=Ix(),O=F(T),$=X(O,2);Is($),pe($,"aria-valuemin",0),Hl($,U=>d=U,()=>d);var R=X($,2);return M(T),ce(()=>{pe(T,"aria-label",o()),pe(O,"title",a()),pe(O,"aria-controls",r),pe(O,"aria-disabled",h(p)),pe($,"id",r),pe($,"aria-label",o()),Rl($,n()),pe($,"aria-valuenow",n()),pe($,"aria-valuemax",s()),pe($,"aria-invalid",h(u)?"true":void 0),pe(R,"title",l()),pe(R,"aria-controls",r),pe(R,"aria-disabled",h(f))}),at("click",O,m),at("input",$,k),at("change",$,_),Mo("blur",$,_),at("keydown",$,A),at("click",R,v),x(e,T),ne(E)}br(["click","input","change","keydown"]),ie(Mu,{value:{},min:{},max:{},label:{},decreaseLabel:{},increaseLabel:{},onChange:{}},[],[],{mode:"open"});function Vp(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[da(n)];if(t<e)return e>n?[da(e)]:[];const i=Math.max(e,n),s=[da(n)];for(let o=i;o<=t;o++)o!==n&&s.push(da(o));return s}function da(e){return{value:e,label:e.toString()}}var Px=j('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),$x=j('<span class="go-cart-item-price-discounted"> </span>'),Mx=j("<span> </span>"),Fx=j("<option> </option>"),Nx=j('<select class="go-cart-item-select"></select>'),Rx=j('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),Lx=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 Bp(e,t){re(t,!0);const r=D(()=>We.config.quantityStepper);let n=b(t,"displayItem",7),i=b(t,"displayCart",7),s=b(t,"preview",7),o=te(void 0);const a=D(()=>C.cart?.items.find(v=>v.uuid===(n().display?.reference_uuid??n().uuid))),l=$i();ge(()=>{C.cart?.items.map(v=>v.quantity),Ne(()=>{I(o,C.capacityManager.capacity(i(),n(),l),!0)})});function c(v){if(!h(a)){console.error("(CartItem) Could not find main item for line",n());return}h(a).quantity=Math.max(0,h(a).quantity-n().quantity+v)}function d(v){c(parseInt(v.value,10))}function u(){if(!h(a)){console.error("(CartItem) Could not find main item for line",n());return}const v=Math.max(0,h(a).quantity-n().quantity);v===0?C.cart?.deleteItem(h(a)):h(a).quantity=v}var p={get displayItem(){return n()},set displayItem(v){n(v),y()},get displayCart(){return i()},set displayCart(v){i(v),y()},get preview(){return s()},set preview(v){s(v),y()}},f=Y(),g=q(f),m=v=>{var _=Lx(),k=F(_),A=F(k),E=F(A),T=B=>{Lp(B,{get cartItem(){return n()}})},O=B=>{Rp(B,{get cartItem(){return n()}})},$=B=>{Np(B,{get cartItem(){return n()}})};de(E,B=>{n().product.type==="Ticket"?B(T):n().product.type==="Event"?B(O,1):n().product.type==="Coupon"&&B($,2)}),M(A);var R=X(A,2),U=F(R),N=B=>{var ee=Px(),P=q(ee),ue=F(P,!0);M(P);var z=X(P,2),ve=F(z,!0);M(z),ce((fe,w)=>{se(ue,fe),se(ve,w)},[()=>ur(n().display.originalPrice),()=>ur(n().final_price_cents)]),x(B,ee)},le=B=>{var ee=$x(),P=F(ee,!0);M(ee),ce(ue=>se(P,ue),[()=>ur(n().final_price_cents)]),x(B,ee)};de(U,B=>{n().display?.discounted?B(N):B(le,-1)}),M(R);var V=X(R,2),ae=F(V),me=B=>{var ee=Mx(),P=F(ee,!0);M(ee),ce(()=>se(P,n().quantity)),x(B,ee)},J=B=>{{let ee=D(()=>n().quantity??0),P=D(()=>C.t("quantity.decrease")),ue=D(()=>C.t("quantity.increase"));Mu(B,{get value(){return h(ee)},get min(){return h(o).min},get max(){return h(o).max},get label(){return n().product.title},get decreaseLabel(){return h(P)},get increaseLabel(){return h(ue)},onChange:c})}},oe=B=>{var ee=Nx();qe(ee,21,()=>Vp(h(o).min,h(o).max,{floor:1}),P=>P.value,(P,ue)=>{var z=Fx(),ve=F(z,!0);M(z);var fe={};ce(()=>{Ll(z,n().quantity===h(ue).value),se(ve,h(ue).label),fe!==(fe=h(ue).value)&&(z.value=(z.__value=h(ue).value)??"")}),x(P,z)}),M(ee),ce(P=>pe(ee,"aria-label",P),[()=>C.t("cart.content.table.edit")]),at("change",ee,P=>d(P.target)),x(B,ee)};de(ae,B=>{s()?B(me):h(r)?B(J,1):B(oe,-1)}),M(V);var G=X(V,2),Q=B=>{var ee=Rx(),P=F(ee);M(ee),ce(ue=>pe(P,"aria-label",ue),[()=>C.t("cart.item.remove")]),at("click",P,u),x(B,ee)};de(G,B=>{s()||B(Q)});var K=X(G,2),H=F(K,!0);M(K),M(k),M(_),ce(B=>se(H,B),[()=>ur(n().total_price_cents)]),x(v,_)};return de(g,v=>{h(o)&&v(m)}),x(e,f),ne(p)}br(["change","click"]),ie(Bp,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var zx=j('<li class="go-cart-header-remove"></li>'),Ux=j('<li class="go-cart-item"><!></li>'),qx=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 Vx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=qx(),c=F(l),d=F(c),u=F(d),p=F(u,!0);M(u);var f=X(u,2),g=F(f,!0);M(f);var m=X(f,2),v=F(m,!0);M(m);var _=X(m,2),k=O=>{var $=zx();x(O,$)};de(_,O=>{h(n).preview||O(k)});var A=X(_,2),E=F(A,!0);M(A),M(d),M(c);var T=X(c,2);qe(T,17,()=>h(n).displayCart.items,O=>O.uuid,(O,$)=>{var R=Ux();Bp(F(R),{get displayItem(){return h($)},get displayCart(){return h(n).displayCart},get preview(){return h(n).preview}}),M(R),x(O,R)}),M(l),ce((O,$,R,U)=>{se(p,O),se(g,$),se(v,R),se(E,U)},[()=>C.t("cart.content.table.desc"),()=>C.t("cart.content.table.price"),()=>C.t("cart.content.table.quantity"),()=>C.t("cart.content.table.total")]),x(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)}),x(e,i),ne()}customElements.define("go-cart-items",ie(Vx,{},[],[]));var Bx=j('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),jx=j('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),Zx=j('<ol data-testid="cart-coupons"></ol>');function Wx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Zx();qe(l,21,()=>h(n).displayCart.coupons,c=>c.code,(c,d)=>{var u=jx();let p;var f=F(u),g=F(f),m=F(g),v=F(m,!0);M(m);var _=X(m,2),k=A=>{var E=Bx(),T=F(E);M(E),ce(O=>pe(T,"aria-label",O),[()=>C.t("cart.coupons.remove")]),at("click",T,()=>C.cart?.removeCoupon(h(d).code)),x(A,E)};de(_,A=>{h(n).preview||A(k)}),M(g),M(f),M(u),ce(()=>{p=Ot(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!h(d).applied}),se(v,h(d).code)}),x(c,u)}),M(l),x(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.coupons.length>0&&a(o)}),x(e,i),ne()}br(["click"]),customElements.define("go-cart-coupons",ie(Wx,{},[],[]));var Hx=j('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function Gx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Hx(),c=F(l,!0);M(l),ce(d=>se(c,d),[()=>ur(h(n).totalPriceCents)]),x(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)}),x(e,i),ne()}customElements.define("go-cart-total-amount",ie(Gx,{},[],[]));function Kx(e,t){re(t,!0);const r=b(t,"preview",7,!1),n=new _x;wx(t.$$host,n),ge(()=>{n.preview=r()}),ge(()=>{C.cart&&(C.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),C.cart.coupons.map(s=>s.code).join("|"),Ne(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let o=!0;for(const a of s){const l=await a.flush?.();l&&!l.success&&(o=!1)}return o}return t.$$host.addEventListener("click",async s=>{const o=s.target.closest("go-submit");if(!o)return;const a=o.closest("go-form");if(a&&t.$$host.contains(a))return;const l=await i();l&&t.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:l},bubbles:!0,composed:!0}))}),ne({get preview(){return r()},set preview(s=!1){r(s),y()}})}customElements.define("go-cart",ie(Kx,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var Yx=j('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function Jx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Yx(),c=F(l,!0);M(l),ce(d=>se(c,d),[()=>ur(h(n).subtotalPriceCents)]),x(a,l)};de(s,a=>{h(n)&&C.cart?.items.length&&a(o)}),x(e,i),ne()}customElements.define("go-cart-subtotal-amount",ie(Jx,{},[],[]));var Xx=j('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function Qx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Xx(),c=X(F(l),1,!0);M(l),ce(d=>se(c,d),[()=>ur(h(n).discountedAmountCents)]),x(a,l)};de(s,a=>{h(n)&&h(n).discountedAmountCents>0&&a(o)}),x(e,i),ne()}customElements.define("go-cart-discounted-amount",ie(Qx,{},[],[]));function eT(e,t){re(t,!0),Mn(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),ne()}customElements.define("go-cart-empty",ie(eT,{},[],[]));function tT(e,t){re(t,!0);let r=D(()=>C.cart?.items.length);Tt();var n=zt();ce(()=>se(n,h(r))),x(e,n),ne()}customElements.define("go-cart-counter",ie(tT,{},[],[]));function rT(e,t){re(t,!0);let r=b(t,"custom",7,!1),n=D(()=>C.cart);return cr.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}]}),Mn(t.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),t.$$host.addEventListener("submit",async i=>{const s=i.target;if(!h(n))return;const o=await C.signUp(s.details.formData,!0);if(o.error){s.details.apiErrors=o.error.errors;return}const a=s.details.fieldValue("paymentMode");h(n).paymentModeId=a==null?void 0:String(a);const l=await C.checkout(h(n).orderData());if(l.error){s.details.apiErrors=l.error;return}const c=We.config.forms.checkoutGuest?.beforeSubmit;c&&await c(s.details.formData);const d=l.data.meta.payment_url;We.config.navigateTo?.(d)}),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-checkout-form",ie(rT,{custom:{}},[],[]));var nT="TokenActions::ApplyOrderDiscount";async function iT(e){if(!C.cart)throw new Error("(go-coupon-redemption): cart not found");const t=C.cart,r=await C.asyncFetch(()=>C.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===nT?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?oT(e,r):r.value_cents&&r.value_cents>0?sT(e,r.value_cents):Fu([C.t("cart.coupon.form.errors.notValid")]):Fu([C.t("cart.coupon.form.errors.notValid")])}function sT(e,t){return C.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function oT(e,t){const r=(await C.asyncFetch(()=>C.tickets({"by_ticket_ids[]":[t.is_voucher_for]}))).find(i=>i.id===t.is_voucher_for);if(!r)return Fu([C.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return C.cart.addItem(pt(oa(n),{quantity:1})),C.cart.addCoupon({code:e,kind:"serviceVoucher"}),{success:!0}}function Fu(e){return{success:!1,errors:e}}var aT=j("<go-form></go-form>",2);function lT(e,t){re(t,!0),cr.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(u=>u.key==="token"),c=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const d=await iT(c);return d.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),d):(a.details.apiErrors=d.errors,d)}async function n(a){await r(a.target)}async function i(){const a=t.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=aT();return Kn(o,"formId","couponRedemption"),Mo("submit",o,n),x(e,o),ne(s)}customElements.define("go-coupon-redemption",ie(lT,{},[],["flush"])),sb();var uT=class{#e=te();get campaign(){return h(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=te();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 t=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");En(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!C.currentUser?.isAuthenticated||C.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",C.urls.cart()),window.location.replace(C.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",C.urls.cart()),window.location.replace(C.urls.cart())}},Dt=new uT,cT=j('<img alt="logo"/>'),dT=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 jp(e,t){re(t,!0);let r=b(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(m){r(m),y()}},s=dT();let o;var a=F(s),l=F(a),c=m=>{var v=cT();ce(_=>pe(v,"src",_),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(m,v)};de(l,m=>{r().picture.thumbnail&&m(c)}),M(a);var d=X(a,2),u=F(d),p=F(u,!0);M(u);var f=X(u,2),g=F(f,!0);return M(f),M(d),M(s),ce(()=>{o=Ot(s,1,"go-donation-campaign",null,o,{selected:Dt.campaign?.id===r()?.id}),se(p,h(n)["donations.headline"]),se(g,h(n)["donations.shop.info"])}),at("click",s,()=>Dt.selectCampaign(r())),at("keydown",s,m=>{m.key==="Enter"&&Dt.selectCampaign(r())}),x(e,s),ne(i)}br(["click","keydown"]),ie(jp,{campaign:{}},[],[],{mode:"open"});function fT(e,t){return t=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:t}).format(e):new Intl.NumberFormat("de-DE",{style:"currency",currency:t}).format(e)}function sn(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}var hT=j("<button> </button>"),pT=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>'),mT=j('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Zp(e,t){re(t,!0);const r=Dt.campaign?.guest_limit/100;let n=te(void 0);function i(p){Dt.amount=p,I(n,null)}function s(p){const f=document.getElementById("donationForm");f.checkValidity()?Dt.amount=p.target.valueAsNumber*100:(Dt.amount=void 0,f.reportValidity())}var o=mT(),a=F(o),l=F(a,!0);M(a);var c=X(a,2);qe(c,20,()=>Dt.campaign?.options,p=>p,(p,f)=>{var g=hT();let m;var v=F(g,!0);M(g),ce(_=>{m=Ot(g,1,"btn btn-default",null,m,{selected:Dt.amount===f}),se(v,_)},[()=>fT(f/100,C.currency)]),at("click",g,()=>i(f)),x(p,g)}),M(c);var d=X(c,2),u=p=>{var f=pT(),g=F(f),m=F(g),v=F(m,!0);M(m);var _=X(m,2);Is(_),M(g),M(f),ce((k,A)=>{se(v,k),pe(_,"max",r),pe(_,"placeholder",A),Rl(_,h(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),at("input",_,s),x(p,f)};de(d,p=>{Dt.campaign?.free_donations&&p(u)}),M(o),ce(p=>se(l,p),[()=>C.t("donations.selection.title")]),x(e,o),ne()}br(["click","input"]),ie(Zp,{},[],[],{mode:"open"});var vT=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 gT(e,t){re(t,!1),rn(()=>{C.donations?.campaigns?.length==1&&Dt.selectCampaign(C.donations?.campaigns[0])}),Gl();var r=Y(),n=q(r),i=s=>{var o=vT(),a=F(o);qe(a,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{jp(m,{get campaign(){return h(v)}})});var l=X(a,2),c=m=>{Zp(m,{})};de(l,m=>{Dt.campaign&&m(c)});var d=X(l,2),u=F(d),p=F(u,!0);M(u);var f=X(u,2),g=F(f,!0);M(f),M(d),M(o),ce((m,v)=>{se(p,m),f.disabled=!Dt.amount,se(g,v)},[()=>C.t("donations.actions.continueWithoutDonation"),()=>C.t("donations.actions.addToCart")]),at("click",u,function(...m){Dt.skipDonation?.apply(this,m)}),at("click",f,function(...m){Dt.addDonationToCart?.apply(this,m)}),x(s,o)};de(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),x(e,r),ne()}br(["click"]),customElements.define("go-donations",ie(gT,{},[],[]));function yT(e){return typeof e=="function"}function js(e){return e!==null&&typeof e=="object"}var bT=["string","number","bigint","boolean"];function Nu(e){return e==null||bT.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Nu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var fa=Symbol("box"),Wp=Symbol("is-writable");function L(e,t){const r=D(e);return t?{[fa]:!0,[Wp]:!0,get current(){return h(r)},set current(n){t(n)}}:{[fa]:!0,get current(){return e()}}}function Hp(e){return js(e)&&fa in e}function _T(e){return Hp(e)?e:yT(e)?L(e):Er(e)}function Er(e){let t=te(Fe(e));return{[fa]:!0,[Wp]:!0,get current(){return h(t)},set current(r){I(t,r,!0)}}}function Gp(...e){return function(t){for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):r.current?.call(this,t)}}}var Kp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wT=/\n/g,kT=/^\s*/,ST=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ET=/^:\s*/,xT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,TT=/^[;\s]*/,AT=/^\s+|\s+$/g,OT=`
|
|
76
|
-
`,
|
|
77
|
-
`)}function Hs(e={}){return
|
|
78
|
-
`," ")}var
|
|
79
|
-
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var em={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%)"},WT=Hs(em),tm=typeof window<"u"?window:void 0,cF=typeof window<"u"?window.document:void 0,dF=typeof window<"u"?window.navigator:void 0,fF=typeof window<"u"?window.location:void 0;function HT(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var GT=class extends Map{#e=new Map;#t=te(0);#r=te(0);#n=tn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return tn===this.#n?te(e):wn(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else return h(this.#t),!1;return h(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else{h(this.#t);return}return h(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),o=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),I(this.#r,super.size),Lr(o);else if(i!==t){Lr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Lr(o)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),I(r,-1)),n&&(I(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;I(this.#r,0);for(var t of e.values())I(t,-1);Lr(this.#t),e.clear()}}#s(){h(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#i(0);e.set(t,r)}}for([,r]of this.#e)h(r)}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}},KT=class{#e;#t;constructor(e={}){const{window:t=tm,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=gl(n=>{const i=vt(t,"focusin",n),s=vt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?HT(this.#e):null}},hF=new KT;function YT(e){return typeof e=="function"}var It=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return db(this.#t)}get(){const e=Ed(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Ed(this.#t);return t===void 0?e:t}set(e){return cb(this.#t,e)}};function JT(e,t){switch(e){case"post":ge(t);break;case"pre":xl(t);break}}function Ru(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;JT(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=Ne(()=>r(a,o));return o=a,l})}function rm(e,t,r){const n=ws(()=>{let i=!1;Ru(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});ge(()=>n)}function tt(e,t,r){Ru(e,"post",t,r)}function XT(e,t,r){Ru(e,"pre",t,r)}tt.pre=XT;function QT(e,t){rm(e,"post",t)}function eA(e,t){rm(e,"pre",t)}QT.pre=eA;function nm(e){return YT(e)?e():e}var tA=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(h(this.#o)?.(),this.getSize().width));#a=D(()=>(h(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=nm(this.#n);if(e)return gl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,o=Array.isArray(s)?s:[s];this.#e.width=o.reduce((a,l)=>Math.max(a,l.inlineSize),0),this.#e.height=o.reduce((a,l)=>Math.max(a,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??tm,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=nm(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),a=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-o,height:r-s-a}}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 rA(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const o=await e(...i);n&&(n(o),n=null)},t)})}function nA(e,t){let r=0,n=null;return(...i)=>{const s=Date.now();return r&&s-r<t?n??Promise.resolve(void 0):(r=s,n=e(...i),n)}}function im(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=te(Fe(o)),d=te(!1),u=te(void 0),p=te(Fe([]));const f=()=>{h(p).forEach(A=>A()),I(p,[],!0)},g=A=>{I(p,[...h(p),A],!0)},m=async(A,E,T=!1)=>{try{I(d,!0),I(u,void 0),f();const O=new AbortController;g(()=>O.abort());const $=await t(A,E,{data:h(c),refetching:T,onCleanup:g,signal:O.signal});return I(c,$,!0),$}catch(O){O instanceof DOMException&&O.name==="AbortError"||I(u,O,!0);return}finally{I(d,!1)}},v=a?rA(m,a):l?nA(m,l):m,_=Array.isArray(e)?e:[e];let k;return n((A,E)=>{s&&k||(k=A,v(Array.isArray(e)?A:A[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return h(c)},get loading(){return h(d)},get error(){return h(u)},mutate:A=>{I(c,A,!0)},refetch:A=>{const E=_.map(T=>T());return v(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],A??!0)}}}function iA(e,t,r){return im(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];tt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function sA(e,t,r){return im(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],o=()=>s.map(a=>a());tt.pre(o,(a,l)=>{n(a,l??[])},i)})}iA.pre=sA;function ii(e){ge(()=>()=>{e()})}function oA(e,t){return setTimeout(t,e)}function Gs(e){cf().then(e)}var aA=1,lA=9,uA=11;function Lu(e){return js(e)&&e.nodeType===aA&&typeof e.nodeName=="string"}function sm(e){return js(e)&&e.nodeType===lA}function cA(e){return js(e)&&e.constructor?.name==="VisualViewport"}function dA(e){return js(e)&&e.nodeType!==void 0}function om(e){return dA(e)&&e.nodeType===uA&&"host"in e}function fA(e,t){if(!e||!t||!Lu(e)||!Lu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&om(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ha(e){return sm(e)?e:cA(e)?e.document:e?.ownerDocument??document}function am(e){return om(e)?am(e.host):sm(e)?e.defaultView??window:Lu(e)?e.ownerDocument?.defaultView??window:window}function hA(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var zi=class{element;#e=D(()=>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=L(e):this.element=e}getDocument=()=>ha(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>hA(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,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Qe(e,t){return{[a_()]:r=>Hp(e)?(e.current=r,Ne(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Ne(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function xr(e){return e?"true":"false"}function zu(e){return e?"true":void 0}function ze(e){return e?"":void 0}function lm(e){return e?"open":"closed"}function pA(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var mA=class{#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(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function pa(e){const t=new mA(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Uu="ArrowDown",um="ArrowLeft",cm="ArrowRight",qu="ArrowUp",vA="Backspace",gA="Enter",pF="Escape",mF=" ",vF="Tab",gF="a",yF="P",bF="A",_F="p",on=typeof document<"u",dm=yA();function yA(){return on&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Tr(e){return e instanceof HTMLElement}function si(e){return e instanceof Element}function bA(e){return e instanceof Element||e instanceof SVGElement}function ma(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Fn(e){return e===null}function va(e){return e.pointerType==="touch"}function _A(e){return e!==null}var wA=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ii(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const o=t.getAnimations();if(o.length===0){n();return}Promise.all(o.map(a=>a.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(a=>a.pending||a.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const o="data-starting-style";if(!t.hasAttribute(o)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(o)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[o]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Gs(t):t()}},fm=class{#e;#t;#r;#n=te(!1);#i=te(void 0);#s=!1;#a=null;constructor(e){this.#e=e,I(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new wA({ref:this.#e.ref,afterTick:this.#e.open}),ii(()=>this.#o()),tt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}if(t&&I(this.#n,!0),I(this.#i,t?"starting":"ending",!0),t&&(this.#a=window.requestAnimationFrame(()=>{this.#a=null,this.#e.open.current&&I(this.#i,void 0)})),!this.#t){t||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return h(this.#n)}get transitionStatus(){return h(this.#i)}#o(){this.#a!==null&&(window.cancelAnimationFrame(this.#a),this.#a=null)}};function Se(){}function Ce(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var kA=new It("BitsConfig");function SA(){const e=new EA(null,{});return kA.getOr(e).opts}var EA=class{opts;constructor(e,t){const r=xA(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function xA(e,t){return r=>L(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function hm(e,t){return r=>{const n=SA();return L(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var pm=hm(e=>e.defaultLocale,"en"),wF=hm(e=>e.defaultPortalTo,"body"),TA=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const n=i=>{t(i)};return vt(e,this.eventName,n,r)}};function mm(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function vm(e,t){return e===t||e.contains(t)}function gm(e){return e?.ownerDocument??document}function AA(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var ym=["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] *)"],ga=ym.join(","),bm=typeof Element>"u",oi=bm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ya=!bm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ba=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return i===""||i==="true"||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ba(t.parentNode))},OA=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},_m=function(t,r,n){if(ba(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ga));return r&&oi.call(t,ga)&&i.unshift(t),i=i.filter(n),i},_a=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!ba(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=_a(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{oi.call(o,ga)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!ba(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=_a(c===!0?o.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else s.unshift.apply(s,o.children)}}return i},wm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},km=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||OA(t))&&!wm(t)?0:t.tabIndex},CA=function(t,r){var n=km(t);return n<0&&r&&!wm(t)?0:n},DA=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Sm=function(t){return t.tagName==="INPUT"},IA=function(t){return Sm(t)&&t.type==="hidden"},PA=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},$A=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},MA=function(t){if(!t.name)return!0;var r=t.form||ya(t),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(t.name));else try{i=n(t.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=$A(i,t.form);return!s||s===t},FA=function(t){return Sm(t)&&t.type==="radio"},NA=function(t){return FA(t)&&!MA(t)},RA=function(t){var r,n=t&&ya(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,d,u;n=ya(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((d=i)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},Em=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},LA=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var s=oi.call(t,"details>summary:first-of-type")?t.parentElement:t;if(oi.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var o=t;t;){var a=t.parentElement,l=ya(t);if(a&&!a.shadowRoot&&i(a)===!0)return Em(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if(RA(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Em(t);return!1},zA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.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 oi.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},wa=function(t,r){return!(r.disabled||IA(r)||LA(r,t)||PA(r)||zA(r))},Vu=function(t,r){return!(NA(r)||km(r)<0||!wa(t,r))},UA=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},xm=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=CA(a,o),c=o?xm(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)},qA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=_a([t],r.includeContainer,{filter:Vu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:UA}):n=_m(t,r.includeContainer,Vu.bind(null,r)),xm(n)},VA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=_a([t],r.includeContainer,{filter:wa.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=_m(t,r.includeContainer,wa.bind(null,r)),n},BA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return oi.call(t,ga)===!1?!1:Vu(r,t)},jA=ym.concat("iframe:not([inert]):not([inert] *)").join(","),ZA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return oi.call(t,jA)===!1?!1:wa(r,t)};function WA(e,t){if(t<=0)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Bu(e,t){return e>=0&&e<t.length}var HA="data-context-menu-trigger",GA="data-context-menu-content",kF=new It("Menu.Root"),SF=new It("Menu.Root | Menu.Sub"),EF=new It("Menu.Content"),xF=new It("Menu.Group | Menu.RadioGroup"),TF=new It("Menu.RadioGroup"),AF=new It("Menu.CheckboxGroup"),OF=new TA("bitsmenuopen",{bubbles:!1,cancelable:!0}),CF=pa({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;var KA=class Qg{static create(t){return new Qg(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Se;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#a=t.onFocusOutside,ge(()=>{this.#s=gm(this.opts.ref.current)});let r=Se;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};tt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return oA(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ii(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Gs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return Ws(vt(this.#s,"pointerdown",Ws(this.#h,this.#f),{capture:!0}),vt(this.#s,"pointerdown",Ws(this.#p,this.#d)),vt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=Tm(t)),this.#e.current(t)};#d=mm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||XA(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=Tm(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=vt(this.#s,"click",this.#c,{once:!0})):this.#e.current(n)},10);#h=t=>{this.#r[t.type]=!0};#p=t=>{this.#r[t.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=JA(this.opts.ref.current))};#m=t=>this.opts.ref.current?vm(this.opts.ref.current,t):!1;#v=mm(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#y(){return Object.values(this.#r).some(Boolean)}#w=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#w,onblurcapture:this.#_}};function YA(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function JA(e){const t=[...globalThis.bitsDismissableLayers],r=YA(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function XA(e,t){const r=e.target;if(!bA(r))return!1;const n=!!r.closest(`[${HA}]`),i=!!t.closest(`[${GA}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:gm(r).documentElement.contains(r)&&!vm(t,r)&&AA(e,t)}function Tm(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,o)=>o==="currentTarget"?t:o==="target"?r:o==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:o==="defaultPrevented"?i:o in s?s[o]:e[o]})}function Am(e,t){re(t,!0);let r=b(t,"interactOutsideBehavior",7,"close"),n=b(t,"onInteractOutside",7,Se),i=b(t,"onFocusOutside",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"isValidEvent",7,()=>!1),c=b(t,"ref",7);const d=KA.create({id:L(()=>s()),interactOutsideBehavior:L(()=>r()),onInteractOutside:L(()=>n()),enabled:L(()=>a()),onFocusOutside:L(()=>i()),isValidEvent:L(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),y()},get onInteractOutside(){return n()},set onInteractOutside(g=Se){n(g),y()},get onFocusOutside(){return i()},set onFocusOutside(g=Se){i(g),y()},get id(){return s()},set id(g){s(g),y()},get children(){return o()},set children(g){o(g),y()},get enabled(){return a()},set enabled(g){a(g),y()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),y()},get ref(){return c()},set ref(g){c(g),y()}},p=Y(),f=q(p);return we(f,()=>o()??Me,()=>({props:d.props})),x(e,p),ne(u)}ie(Am,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var QA=class ey{static create(t){return new ey(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new zi(this.opts.ref);let r=Se;tt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>vt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!eO(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}};function eO(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function Om(e,t){re(t,!0);let r=b(t,"escapeKeydownBehavior",7,"close"),n=b(t,"onEscapeKeydown",7,Se),i=b(t,"children",7),s=b(t,"enabled",7),o=b(t,"ref",7);QA.create({escapeKeydownBehavior:L(()=>r()),onEscapeKeydown:L(()=>n()),enabled:L(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(d="close"){r(d),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(d=Se){n(d),y()},get children(){return i()},set children(d){i(d),y()},get enabled(){return s()},set enabled(d){s(d),y()},get ref(){return o()},set ref(d){o(d),y()}},l=Y(),c=q(l);return we(c,()=>i()??Me),x(e,l),ne(a)}ie(Om,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var tO=class ty{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new ty),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#e.current=this.#e.current.filter(i=>i!==t),this.#e.current.unshift(t)}unregister(t){this.#e.current=this.#e.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(t,r){this.#t.set(t,r)}getFocusMemory(t){return this.#t.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}},rO=class ry{#e=!1;#t=null;#r=tO.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,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 t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.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 t=this.#t,r=t.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(a)if(t.contains(a))this.#r.setFocusMemory(this,a);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&ZA(l))o.preventDefault(),l.focus();else{const c=this.#c(),d=this.#d()[0];(c||d||t).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length===0)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(vt(r,"focusin",n,{capture:!0}),vt(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#c(),l=this.#d()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?qA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?VA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return tt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new ry(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ii(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function Cm(e,t){re(t,!0);let r=b(t,"enabled",7,!1),n=b(t,"trapFocus",7,!1),i=b(t,"loop",7,!1),s=b(t,"onCloseAutoFocus",7,Se),o=b(t,"onOpenAutoFocus",7,Se),a=b(t,"focusScope",7),l=b(t,"ref",7);const c=rO.use({enabled:L(()=>r()),trap:L(()=>n()),loop:i(),onCloseAutoFocus:L(()=>s()),onOpenAutoFocus:L(()=>o()),ref:l()});var d={get enabled(){return r()},set enabled(f=!1){r(f),y()},get trapFocus(){return n()},set trapFocus(f=!1){n(f),y()},get loop(){return i()},set loop(f=!1){i(f),y()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(f=Se){s(f),y()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(f=Se){o(f),y()},get focusScope(){return a()},set focusScope(f){a(f),y()},get ref(){return l()},set ref(f){l(f),y()}},u=Y(),p=q(u);return we(p,()=>a()??Me,()=>({props:c.props})),x(e,u),ne(d)}ie(Cm,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var Dm=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var nO=class ny{static create(t){return new ny(t)}opts;domContext;#e=Se;#t=!1;#r=Dm;#n=Dm;constructor(t){this.opts=t,this.domContext=new zi(t.ref);let r=Se;tt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ws(vt(this.domContext.getDocument(),"pointerdown",this.#a),vt(this.domContext.getDocument(),"pointerup",Gp(this.#o,this.#s)))}#s=t=>{this.#n(t)};#a=t=>{const r=this.opts.ref.current,n=t.target;!Tr(r)||!Tr(n)||!this.#t||!sO(this)||!fA(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=iO(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},Im=e=>e.style.userSelect||e.style.webkitUserSelect;function iO(e,t){const r=Im(t),n=Im(e);return ka(t,"none"),ka(e,"text"),()=>{ka(t,r),ka(e,n)}}function ka(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function sO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function Pm(e,t){re(t,!0);let r=b(t,"preventOverflowTextSelection",7,!0),n=b(t,"onPointerDown",7,Se),i=b(t,"onPointerUp",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"ref",7);nO.create({id:L(()=>s()),onPointerDown:L(()=>n()),onPointerUp:L(()=>i()),enabled:L(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),y()},get onPointerDown(){return n()},set onPointerDown(p=Se){n(p),y()},get onPointerUp(){return i()},set onPointerUp(p=Se){i(p),y()},get id(){return s()},set id(p){s(p),y()},get children(){return o()},set children(p){o(p),y()},get enabled(){return a()},set enabled(p){a(p),y()},get ref(){return l()},set ref(p){l(p),y()}},d=Y(),u=q(d);return we(u,()=>o()??Me),x(e,d),ne(c)}ie(Pm,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Nn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var oO=class{#e;#t=0;#r=te();#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=ws(()=>{I(this.#r,this.#e(...e),!0)})),ge(()=>()=>{this.#i()}),h(this.#r)}},Sa=new GT,Ea=te(null),ju=null,Ks=null,Ys=!1,$m=L(()=>{for(const e of Sa.values())if(e)return!0;return!1}),Zu=null,aO=new oO(()=>{function e(){document.body.setAttribute("style",h(Ea)??""),document.body.style.removeProperty("--scrollbar-width"),dm&&ju?.(),I(Ea,null)}function t(){Ks!==null&&(window.clearTimeout(Ks),Ks=null)}function r(i,s){t(),Ys=!0,Zu=Date.now();const o=Zu,a=()=>{Ks=null,Zu===o&&(Mm(Sa)?Ys=!1:(Ys=!1,s()))},l=i===null?24:i;Ks=window.setTimeout(a,l)}function n(){h(Ea)===null&&Sa.size===0&&!Ys&&I(Ea,document.body.getAttribute("style"),!0)}return tt(()=>$m.current,()=>{if(!$m.current)return;n(),Ys=!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,l={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",dm&&(ju=vt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Gs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ii(()=>()=>{ju?.()}),{get lockMap(){return Sa},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),lO=class{#e=Nn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=aO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=L(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ii(()=>{if(this.#n.lockMap.delete(this.#e),Mm(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function Mm(e){for(const[t,r]of e)if(r)return!0;return!1}function Wu(e,t){re(t,!0);let r=b(t,"preventScroll",7,!0),n=b(t,"restoreScrollDelay",7,null);return r()&&new lO(r(),()=>n()),ne({get preventScroll(){return r()},set preventScroll(i=!0){r(i),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),y()}})}ie(Wu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function uO(e){if(!on||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const s=e.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!Tr(t)){const i=e.createElement("div");i.style.cssText=WT,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!Tr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Tr(s)?s:null}}}function xa(e){const t=uO(e);function r(n,i="assertive",s=7500){if(!t||!on||!e)return;const o=t.getLog(i),a=e.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}}var cO={defaultValue:void 0,granularity:"day"};function Fm(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...cO,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let s=new Date;n&&s<n.toDate(qt())?s=n.toDate(qt()):i&&s>i.toDate(qt())&&(s=i.toDate(qt()));const o=s.getFullYear(),a=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Pi(o,a,l,0,0,0):new Us(o,a,l)}}function Nm(e,t){let r;return t instanceof Dn?r=ip(e):t instanceof Pi?r=np(e):r=ia(e),r.calendar!==t.calendar?Kt(r,t.calendar):r}function Vt(e,t=qt()){return e instanceof Dn?e.toDate():e.toDate(t)}function dO(e){if(e instanceof Us)return"date";if(e instanceof Pi)return"datetime";if(e instanceof Dn)return"zoneddatetime";throw new Error("Unknown date type")}function fO(e,t){switch(t){case"date":return ia(e);case"datetime":return np(e);case"zoneddatetime":return ip(e);default:throw new Error(`Unknown date type: ${t}`)}}function hO(e){return e instanceof Pi}function Hu(e){return e instanceof Dn}function Ta(e){return hO(e)||Hu(e)}function Js(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function ai(e,t){return e.compare(t)<0}function pO(e,t){return e.compare(t)>0}function Rm(e,t,r){const n=zh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function Lm(e,t,r){const n=zh(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}var Aa=["day","month","year"],Oa=["hour","minute","second","dayPeriod"],zm=["literal","timeZoneName"],Xs=[...Aa,...Oa],Um=[...Xs,...zm],mO=[...Oa,...zm],DF=Um.filter(e=>e!=="literal"),IF=mO.filter(e=>e!=="literal"),vO=["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"],gO=["year","month","day"],Gu={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 yO(e){if(qm(e))return Gu[e];{const t=kO(e);return qm(t)?Gu[t]:Gu.en}}function Ku(e,t,r){return bO(e)?yO(r)[e]:wO(e)?t:_O(e)?"––":""}function qm(e){return vO.includes(e)}function bO(e){return gO.includes(e)}function _O(e){return e==="hour"||e==="minute"||e==="second"}function wO(e){return e==="era"||e==="dayPeriod"}function kO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function Yu(e){const t=["hour","minute","second"],r=Xs.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:e==="day"?!t.includes(n):!0);return Object.fromEntries(r)}function SO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!Bm(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];Fn(c)?a[l]=Ku(l,"AM",n):a[l]=c}else a[l]=o(l);return a},{});function o(a){if("hour"in t){const l=t[a],c=typeof l=="string"&&l?.startsWith("0"),d=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!Fn(l)&&!Fn(d)){const u=r.part(i.set({[a]:l}),a,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&Zm(n)===12;if(a==="hour"&&p){if(d>12){const f=d-12;return f===0?"12":f<10?`0${f}`:`${f}`}return d===0?"12":d<10?`0${d}`:`${d}`}return a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return Ku(a,"",n)}else{if(Ca(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Fn(l))return Ku(a,"",n);{const d=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:c&&d.length===1?`0${d}`:d}}return""}}return s}function EO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,TO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!Bm(a.type)?{part:a.type,value:a.value}:{part:a.type,value:i[a.type]}).filter(a=>!(Fn(a.part)||Fn(a.value)||a.part==="timeZoneName"&&(!Hu(r)||s)))}function xO(e){const t=SO(e);return{obj:t,arr:EO({contentObj:t,...e})}}function TO(e,t){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:t===24?"h23":void 0,hour12:t===24?!1:void 0};return e==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),e==="hour"&&delete r.minute,e==="minute"&&delete r.second,r}function Vm(){return Xs.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Ca(e){return Aa.includes(e)}function Bm(e){return Xs.includes(e)}function AO(e){return Um.includes(e)}function jm(e){return!on||!e?[]:Da(e).map(t=>t.dataset.segment).filter(t=>Xs.includes(t))}function OO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=jm(r);let s=n;for(const o of i)if("hour"in t){const a=t[o];if(Fn(a))continue;s=s.set({[o]:t[o]})}else if(Ca(o)){const a=t[o];if(Fn(a))continue;s=s.set({[o]:t[o]})}return s}function CO(e,t){const r=jm(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Ca(n)&&e[n]===null)return!1;return!0}function DO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Oa.includes(t)||Aa.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function IO(e,t){return t||(Ta(e)?"minute":"day")}function Ju(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||ma(e))}function PO(e,t){if(!on)return!1;const r=Da(t);return r.length?r[0].id===e:!1}function $O(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!on)return;const s=r.selectedDate(n),o=i.getElementById(t);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Hs({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function MO(e,t){if(!on)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function Zm(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(t=>t.type==="hour")?.value==="1"?12:24}function Qs(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=Xu(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function FO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function NO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function Xu(e,t){const r=Da(t);return r.length?{next:FO(e,r),prev:NO(e,r)}:{next:null,prev:null}}function Wm(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=Xu(r,t);n&&n.focus()}function Hm(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=Xu(r,t);n&&n.focus()}function eo(e){return e==="ArrowRight"||e==="ArrowLeft"}function Da(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Tr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!AO(r)||r==="literal")}):[]}function RO(e){return Da(e)[0]}var LO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Gm(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new kr(t,g).format(f)}function s(f,g=!0){return Ta(f)&&g?i(Vt(f),{dateStyle:"long",timeStyle:"long"}):i(Vt(f),{dateStyle:"long"})}function o(f){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new kr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new kr(t,{month:e.monthFormat.current}).format(f)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new kr(t,{year:e.yearFormat.current}).format(f)}`}function a(f){return new kr(t,{month:"long"}).format(f)}function l(f){return new kr(t,{year:"numeric"}).format(f)}function c(f,g){return Hu(f)?new kr(t,{...g,timeZone:f.timeZone}).formatToParts(Vt(f)):new kr(t,g).formatToParts(Vt(f))}function d(f,g="narrow"){return new kr(t,{weekday:g}).format(f)}function u(f,g=void 0){return new kr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(f,g,m={}){const v=c(f,{...LO,...m}).find(_=>_.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function zO(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function Km(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function Qu(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=Js(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=mu(t),l=P1(t),c=r!==void 0?Rm(a,r,"en-US"):Rm(a,0,i),d=r!==void 0?Lm(l,r,"en-US"):Lm(l,0,i),u=Km(c.subtract({days:1}),a),p=Km(l,d.add({days:1})),f=u.length+o.length+p.length;if(n&&f<42){const m=42-f;let v=p[p.length-1];v||(v=t.add({months:1}).set({day:1}));let _=m;p.length===0&&(_=m-1,p.push(v));const k=Array.from({length:_},(A,E)=>{const T=E+1;return v.add({days:T})});p.push(...k)}const g=u.concat(o,p);return{value:t,dates:g,weeks:WA(g,7)}}function to(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(Qu({...n,dateObj:r})),i;i.push(Qu({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(Qu({...n,dateObj:o}))}return i}function ec(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function Ym(e,t){const r=e.getAttribute("data-value");r&&(t.current=Nm(r,t.current))}function UO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=ec(n);if(!l.length)return;const c=l.indexOf(e)+t;if(Bu(c,l)){const d=l[c];return Ym(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Gs(()=>{const u=ec(n);if(!u.length)return;const p=u.length-Math.abs(c);if(Bu(p,u)){const f=u[p];return Ym(f,r),f.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Gs(()=>{const u=ec(n);if(!u.length)return;const p=c-l.length;if(Bu(p,u))return u[p].focus()})}}var Jm=[Uu,qu,um,cm],Xm=[gA," "];function qO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!zO(i)||!Jm.includes(e.key)&&!Xm.includes(e.key))return;e.preventDefault();const s={[Uu]:7,[qu]:-7,[um]:-1,[cm]:1};if(Jm.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(Xm.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,Nm(o,n))}}function VO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),d=to({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function BO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),d=to({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function jO({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Vt(i),r)):[]}function ZO(e){ge(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Ne(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(to({...o,dateObj:s}))})})}function WO({calendarNode:e,label:t,accessibleHeadingId:r}){const n=ha(e),i=n.createElement("div");i.style.cssText=Hs({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=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function HO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){ge(()=>{e.current,Ne(()=>{t().some(a=>hu(a,e.current))||o(to({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function GO({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;return n?pO(n.add({months:1}).set({day:1}),e):!1}function KO({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?ai(n.subtract({months:1}).set({day:35}),e):!1}function YO({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Vt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Vt(e[0].value),i=Vt(e[e.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 JO({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":ze(r),"data-disabled":ze(n),"data-readonly":ze(i)}}function XO(e){const t=ha(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function QO(e){if(!on)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return fO(n,i)}function eC({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&ai(a,n.current)||i.current&&ai(i.current,a))}tt(()=>e.current,()=>{e.current&&t.current&&An(t.current,r)&&o(r)&&(t.current=QO(e.current)??r)})}function tC(e,t){return!e||!t?e:Ta(e)&&Ta(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var rC=pa({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 nC(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const o=r-100;n=e.placeholderYear<o?e.placeholderYear-10:o}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}var Ar=new It("Calendar.Root | RangeCalender.Root"),Qm=class iy{static create(t){return Ar.set(new iy(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return h(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Nn();domContext;attachment;#t=te(Fe([]));get months(){return h(this.#t)}set months(t){I(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=Qe(this.opts.ref),this.domContext=new zi(t.ref),this.announcer=xa(null),this.formatter=Gm({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),rn(()=>{this.announcer=xa(this.domContext.getDocument())}),this.months=to({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(),HO({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}),ZO({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),tt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),tt(()=>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)}),eC({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=D(()=>jO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return h(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>Ne(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return h(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>nC({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return h(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){ge(()=>{if(Ne(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){ge(()=>{if(this.opts.ref.current)return WO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){xl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){VO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){BO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,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(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=D(()=>GO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return h(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>KO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return h(this.#u)}set isPrevButtonDisabled(t){I(this.#u,t)}#c=D(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return h(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,YO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return h(this.#d)}set headingValue(t){I(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return h(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>hu(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&ai(t,r)||n&&ai(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>An(n,t)):r?An(r,t):!1}shiftFocus(t,r){return UO({node:t,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})}#p(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,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 i=this.handleSingleUpdate(n,r);i?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(i,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=tC(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const s=[r];return this.#p(s)?s:[r]}if(!Array.isArray(t))return;const n=t.findIndex(s=>An(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(o=>!An(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&An(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){qO({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return h(this.#f)}set snippetProps(t){I(this.#f,t)}getBitsAttr=t=>rC.getAttr(t);#m=D(()=>({...JO({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(t){I(this.#m,t)}},iC=class sy{static create(t){return new sy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},ev=new It("Calendar.Cell | RangeCalendar.Cell"),sC=class oy{static create(t){return ev.set(new oy(t,Ar.get()))}opts;root;#e=D(()=>Vt(this.opts.date.current));get cellDate(){return h(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return h(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>O1(this.opts.date.current,qt()));get isDateToday(){return h(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!hu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return h(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return h(this.#i)}set isOutsideVisibleMonths(t){I(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return h(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>An(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return h(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return h(this.#o)}set isSelectedDate(t){I(this.#o,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return h(this.#l)}set labelText(t){I(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return h(this.#u)}set snippetProps(t){I(this.#u,t)}#c=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return h(this.#c)}set ariaDisabled(t){I(this.#c,t)}#d=D(()=>({"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":dO(this.opts.date.current),"data-disabled":ze(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return h(this.#d)}set sharedDataAttrs(t){I(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":xr(this.isSelectedDate),"aria-disabled":xr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return h(this.#h)}set props(t){I(this.#h,t)}},oC=class ay{static create(t){return new ay(t,ev.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}#e=D(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#t=D(()=>({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(t){I(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":xr(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(t){I(this.#r,t)}},aC=class ly{static create(t){return new ly(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":xr(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(t){I(this.#t,t)}},lC=class uy{static create(t){return new uy(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":xr(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(t){I(this.#t,t)}},uC=class cy{static create(t){return new cy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":xr(this.root.opts.readonly.current),"aria-disabled":xr(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(t){I(this.#e,t)}},cC=class dy{static create(t){return new dy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},dC=class fy{static create(t){return new fy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},fC=class hy{static create(t){return new hy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},hC=class py{static create(t){return new py(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},pC=class my{static create(t){return new my(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},mC=new Set(["$$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"]),vC=j("<div><!></div>");function tv(e,t){re(t,!0);let r=b(t,"child",7),n=b(t,"children",7),i=b(t,"id",23,Nn),s=b(t,"ref",15,null),o=b(t,"value",15),a=b(t,"onValueChange",7,Se),l=b(t,"placeholder",15),c=b(t,"onPlaceholderChange",7,Se),d=b(t,"weekdayFormat",7,"narrow"),u=b(t,"weekStartsOn",7),p=b(t,"pagedNavigation",7,!1),f=b(t,"isDateDisabled",7,()=>!1),g=b(t,"isDateUnavailable",7,()=>!1),m=b(t,"fixedWeeks",7,!1),v=b(t,"numberOfMonths",7,1),_=b(t,"locale",7),k=b(t,"calendarLabel",7,"Event"),A=b(t,"disabled",7,!1),E=b(t,"readonly",7,!1),T=b(t,"minValue",7,void 0),O=b(t,"maxValue",7,void 0),$=b(t,"preventDeselect",7,!1),R=b(t,"type",7),U=b(t,"disableDaysOutsideMonth",7,!0),N=b(t,"initialFocus",7,!1),le=b(t,"maxDays",7),V=b(t,"monthFormat",7,"long"),ae=b(t,"yearFormat",7,"numeric"),me=je(t,mC);const J=Fm({defaultValue:o(),minValue:T(),maxValue:O()});function oe(){l()===void 0&&l(J)}oe(),tt.pre(()=>l(),()=>{oe()});function G(){o()===void 0&&o(R()==="single"?void 0:[])}G(),tt.pre(()=>o(),()=>{G()});const Q=Qm.create({id:L(()=>i()),ref:L(()=>s(),z=>s(z)),weekdayFormat:L(()=>d()),weekStartsOn:L(()=>u()),pagedNavigation:L(()=>p()),isDateDisabled:L(()=>f()),isDateUnavailable:L(()=>g()),fixedWeeks:L(()=>m()),numberOfMonths:L(()=>v()),locale:pm(()=>_()),calendarLabel:L(()=>k()),readonly:L(()=>E()),disabled:L(()=>A()),minValue:L(()=>T()),maxValue:L(()=>O()),disableDaysOutsideMonth:L(()=>U()),initialFocus:L(()=>N()),maxDays:L(()=>le()),placeholder:L(()=>l(),z=>{l(z),c()(z)}),preventDeselect:L(()=>$()),value:L(()=>o(),z=>{o(z),a()(z)}),type:L(()=>R()),monthFormat:L(()=>V()),yearFormat:L(()=>ae()),defaultPlaceholder:J}),K=D(()=>He(me,Q.props));var H={get child(){return r()},set child(z){r(z),y()},get children(){return n()},set children(z){n(z),y()},get id(){return i()},set id(z=Nn()){i(z),y()},get ref(){return s()},set ref(z=null){s(z),y()},get value(){return o()},set value(z){o(z),y()},get onValueChange(){return a()},set onValueChange(z=Se){a(z),y()},get placeholder(){return l()},set placeholder(z){l(z),y()},get onPlaceholderChange(){return c()},set onPlaceholderChange(z=Se){c(z),y()},get weekdayFormat(){return d()},set weekdayFormat(z="narrow"){d(z),y()},get weekStartsOn(){return u()},set weekStartsOn(z){u(z),y()},get pagedNavigation(){return p()},set pagedNavigation(z=!1){p(z),y()},get isDateDisabled(){return f()},set isDateDisabled(z=()=>!1){f(z),y()},get isDateUnavailable(){return g()},set isDateUnavailable(z=()=>!1){g(z),y()},get fixedWeeks(){return m()},set fixedWeeks(z=!1){m(z),y()},get numberOfMonths(){return v()},set numberOfMonths(z=1){v(z),y()},get locale(){return _()},set locale(z){_(z),y()},get calendarLabel(){return k()},set calendarLabel(z="Event"){k(z),y()},get disabled(){return A()},set disabled(z=!1){A(z),y()},get readonly(){return E()},set readonly(z=!1){E(z),y()},get minValue(){return T()},set minValue(z=void 0){T(z),y()},get maxValue(){return O()},set maxValue(z=void 0){O(z),y()},get preventDeselect(){return $()},set preventDeselect(z=!1){$(z),y()},get type(){return R()},set type(z){R(z),y()},get disableDaysOutsideMonth(){return U()},set disableDaysOutsideMonth(z=!0){U(z),y()},get initialFocus(){return N()},set initialFocus(z=!1){N(z),y()},get maxDays(){return le()},set maxDays(z){le(z),y()},get monthFormat(){return V()},set monthFormat(z="long"){V(z),y()},get yearFormat(){return ae()},set yearFormat(z="numeric"){ae(z),y()}},B=Y(),ee=q(B),P=z=>{var ve=Y(),fe=q(ve);{let w=D(()=>({props:h(K),...Q.snippetProps}));we(fe,r,()=>h(w))}x(z,ve)},ue=z=>{var ve=vC();Re(ve,()=>({...h(K)}));var fe=F(ve);we(fe,()=>n()??Me,()=>Q.snippetProps),M(ve),x(z,ve)};return de(ee,z=>{r()?z(P):z(ue,-1)}),x(e,B),ne(H)}ie(tv,{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 gC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),yC=j("<div><!></div>");function tc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,gC);const l=oC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);{let k=D(()=>({props:h(c),...l.snippetProps}));we(_,i,()=>h(k))}x(m,v)},g=m=>{var v=yC();Re(v,()=>({...h(c)}));var _=F(v),k=E=>{var T=Y(),O=q(T);we(O,()=>n()??Me,()=>l.snippetProps),x(E,T)},A=E=>{var T=zt();ce(()=>se(T,l.cell.opts.date.current.day)),x(E,T)};de(_,E=>{n()?E(k):E(A,-1)}),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(tc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var bC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),_C=j("<table><!></table>");function rc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,bC);const l=uC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=_C();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(rc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var wC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),kC=j("<tbody><!></tbody>");function nc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,wC);const l=cC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=kC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(nc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var SC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),EC=j("<td><!></td>");function ic(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"date",7),l=b(t,"month",7),c=je(t,SC);const d=sC.create({id:L(()=>o()),ref:L(()=>s(),_=>s(_)),date:L(()=>a()),month:L(()=>l())}),u=D(()=>He(c,d.props));var p={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(_=Ce(r)){o(_),y()},get date(){return a()},set date(_){a(_),y()},get month(){return l()},set month(_){l(_),y()}},f=Y(),g=q(f),m=_=>{var k=Y(),A=q(k);{let E=D(()=>({props:h(u),...d.snippetProps}));we(A,i,()=>h(E))}x(_,k)},v=_=>{var k=EC();Re(k,()=>({...h(u)}));var A=F(k);we(A,()=>n()??Me,()=>d.snippetProps),M(k),x(_,k)};return de(g,_=>{i()?_(m):_(v,-1)}),x(e,f),ne(p)}ie(ic,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var xC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),TC=j("<thead><!></thead>");function sc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,xC);const l=dC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=TC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(sc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var AC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),OC=j("<th><!></th>");function oc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,AC);const l=hC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=OC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(oc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var CC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),DC=j("<tr><!></tr>");function ro(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,CC);const l=fC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=DC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(ro,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var IC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),PC=j("<header><!></header>");function ac(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,IC);const l=pC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=PC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(ac,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var $C=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),MC=j("<div><!></div>");function lc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,$C);const l=iC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c),headingValue:l.root.headingValue})),x(m,v)},g=m=>{var v=MC();Re(v,()=>({...h(c)}));var _=F(v),k=E=>{var T=Y(),O=q(T);we(O,()=>n()??Me,()=>({headingValue:l.root.headingValue})),x(E,T)},A=E=>{var T=zt();ce(()=>se(T,l.root.headingValue)),x(E,T)};de(_,E=>{n()?E(k):E(A,-1)}),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(lc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var FC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),NC=j("<button><!></button>");function uc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,FC);const c=aC.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>He(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,i,()=>({props:h(d)})),x(v,_)},m=v=>{var _=NC();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>n()??Me),M(_),x(v,_)};return de(f,v=>{i()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(uc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var RC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),LC=j("<button><!></button>");function cc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,RC);const c=lC.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>He(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,i,()=>({props:h(d)})),x(v,_)},m=v=>{var _=LC();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>n()??Me),M(_),x(v,_)};return de(f,v=>{i()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(cc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var zC=new Set(["$$slots","$$events","$$legacy","$$host","value"]),rv=j("<input/>");function nv(e,t){re(t,!0);let r=b(t,"value",15),n=je(t,zC);const i=D(()=>He(n,{"aria-hidden":"true",tabindex:-1,style:{...em,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),y()}},o=Y(),a=q(o),l=d=>{var u=rv();Re(u,()=>({...h(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(d,u)},c=d=>{var u=rv();Re(u,()=>({...h(i)}),void 0,void 0,void 0,void 0,!0),zo(u,r),x(d,u)};return de(a,d=>{h(i).type==="checkbox"?d(l):d(c,-1)}),x(e,o),ne(s)}ie(nv,{value:{}},[],[],{mode:"open"});var UC=["top","right","bottom","left"],Rn=Math.min,Yt=Math.max,Ia=Math.round,Pa=Math.floor,Wr=e=>({x:e,y:e}),qC={left:"right",right:"left",bottom:"top",top:"bottom"};function dc(e,t,r){return Yt(e,Rn(t,r))}function an(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function Ui(e){return e.split("-")[1]}function fc(e){return e==="x"?"y":"x"}function hc(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function pc(e){return fc(Hr(e))}function VC(e,t,r){r===void 0&&(r=!1);const n=Ui(e),i=pc(e),s=hc(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=$a(o)),[o,$a(o)]}function BC(e){const t=$a(e);return[mc(e),t,mc(t)]}function mc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var iv=["left","right"],sv=["right","left"],jC=["top","bottom"],ZC=["bottom","top"];function WC(e,t,r){switch(e){case"top":case"bottom":return r?t?sv:iv:t?iv:sv;case"left":case"right":return t?jC:ZC;default:return[]}}function HC(e,t,r,n){const i=Ui(e);let s=WC(ln(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(mc)))),s}function $a(e){const t=ln(e);return qC[t]+e.slice(t.length)}function GC(e){return{top:0,right:0,bottom:0,left:0,...e}}function ov(e){return typeof e!="number"?GC(e):{top:e,right:e,bottom:e,left:e}}function Ma(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function av(e,t,r){let{reference:n,floating:i}=e;const s=Hr(t),o=pc(t),a=hc(o),l=ln(t),c=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-i.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-i.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Ui(t)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}async function KC(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=an(t,e),g=ov(f),m=a[p?u==="floating"?"reference":"floating":u],v=Ma(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:d,strategy:l})),_=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},E=Ma(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:k,strategy:l}):_);return{top:(v.top-E.top+g.top)/A.y,bottom:(E.bottom-v.bottom+g.bottom)/A.y,left:(v.left-E.left+g.left)/A.x,right:(E.right-v.right+g.right)/A.x}}var YC=50,JC=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:KC},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=av(c,n,l),p=n,f=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:_,fn:k}=v,{x:A,y:E,data:T,reset:O}=await k({x:d,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=A??d,u=E??u,g[_]={...g[_],...T},O&&f<YC&&(f++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=av(c,p,l)),m=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:g}},XC=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=an(e,t)||{};if(c==null)return{};const u=ov(d),p={x:r,y:n},f=pc(i),g=hc(f),m=await o.getDimensions(c),v=f==="y",_=v?"top":"left",k=v?"bottom":"right",A=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[f]-p[f]-s.floating[g],T=p[f]-s.reference[f],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=O?O[A]:0;(!$||!await(o.isElement==null?void 0:o.isElement(O)))&&($=a.floating[A]||s.floating[g]);const R=E/2-T/2,U=$/2-m[g]/2-1,N=Rn(u[_],U),le=Rn(u[k],U),V=N,ae=$-m[g]-le,me=$/2-m[g]/2+R,J=dc(V,me,ae),oe=!l.arrow&&Ui(i)!=null&&me!==J&&s.reference[g]/2-(me<V?N:le)-m[g]/2<0,G=oe?me<V?me-V:me-ae:0;return{[f]:p[f]+G,data:{[f]:J,centerOffset:me-J-G,...oe&&{alignmentOffset:G}},reset:oe}}}),QC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=an(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=ln(i),k=Hr(a),A=ln(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(A||!m?[$a(a)]:BC(a)),O=g!=="none";!p&&O&&T.push(...HC(a,m,g,E));const $=[a,...T],R=await l.detectOverflow(t,v),U=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&U.push(R[_]),u){const me=VC(i,o,E);U.push(R[me[0]],R[me[1]])}if(N=[...N,{placement:i,overflows:U}],!U.every(me=>me<=0)){var le,V;const me=(((le=s.flip)==null?void 0:le.index)||0)+1,J=$[me];if(J&&(!(u==="alignment"&&k!==Hr(J))||N.every(G=>Hr(G.placement)===k?G.overflows[0]>0:!0)))return{data:{index:me,overflows:N},reset:{placement:J}};let oe=(V=N.filter(G=>G.overflows[0]<=0).sort((G,Q)=>G.overflows[1]-Q.overflows[1])[0])==null?void 0:V.placement;if(!oe)switch(f){case"bestFit":{var ae;const G=(ae=N.filter(Q=>{if(O){const K=Hr(Q.placement);return K===k||K==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(K=>K>0).reduce((K,H)=>K+H,0)]).sort((Q,K)=>Q[1]-K[1])[0])==null?void 0:ae[0];G&&(oe=G);break}case"initialPlacement":oe=a;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function lv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uv(e){return UC.some(t=>e[t]>=0)}var eD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=an(e,t);switch(i){case"referenceHidden":{const o=lv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:uv(o)}}}case"escaped":{const o=lv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:uv(o)}}}default:return{}}}}},cv=new Set(["left","top"]);async function tD(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ln(r),a=Ui(r),l=Hr(r)==="y",c=cv.has(o)?-1:1,d=s&&l?-1:1,u=an(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}var rD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await tD(t,e);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}}}}},nD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:_=>{let{x:k,y:A}=_;return{x:k,y:A}}},...c}=an(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),p=Hr(ln(i)),f=fc(p);let g=d[f],m=d[p];if(o){const _=f==="y"?"top":"left",k=f==="y"?"bottom":"right",A=g+u[_],E=g-u[k];g=dc(A,g,E)}if(a){const _=p==="y"?"top":"left",k=p==="y"?"bottom":"right",A=m+u[_],E=m-u[k];m=dc(A,m,E)}const v=l.fn({...t,[f]:g,[p]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[p]:a}}}}}},iD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=an(e,t),d={x:r,y:n},u=Hr(i),p=fc(u);let f=d[p],g=d[u];const m=an(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const A=p==="y"?"height":"width",E=s.reference[p]-s.floating[A]+v.mainAxis,T=s.reference[p]+s.reference[A]-v.mainAxis;f<E?f=E:f>T&&(f=T)}if(c){var _,k;const A=p==="y"?"width":"height",E=cv.has(ln(i)),T=s.reference[u]-s.floating[A]+(E&&((_=o.offset)==null?void 0:_[u])||0)+(E?0:v.crossAxis),O=s.reference[u]+s.reference[A]+(E?0:((k=o.offset)==null?void 0:k[u])||0)-(E?v.crossAxis:0);g<T?g=T:g>O&&(g=O)}return{[p]:f,[u]:g}}}},sD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=an(e,t),d=await o.detectOverflow(t,c),u=ln(i),p=Ui(i),f=Hr(i)==="y",{width:g,height:m}=s.floating;let v,_;u==="top"||u==="bottom"?(v=u,_=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=u,v=p==="end"?"top":"bottom");const k=m-d.top-d.bottom,A=g-d.left-d.right,E=Rn(m-d[v],k),T=Rn(g-d[_],A),O=!t.middlewareData.shift;let $=E,R=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=A),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=k),O&&!p){const N=Yt(d.left,0),le=Yt(d.right,0),V=Yt(d.top,0),ae=Yt(d.bottom,0);f?R=g-2*(N!==0||le!==0?N+le:Yt(d.left,d.right)):$=m-2*(V!==0||ae!==0?V+ae:Yt(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:$});const U=await o.getDimensions(a.floating);return g!==U.width||m!==U.height?{reset:{rects:!0}}:{}}}};function Fa(){return typeof window<"u"}function qi(e){return dv(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gr(e){var t;return(t=(dv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dv(e){return Fa()?e instanceof Node||e instanceof Jt(e).Node:!1}function Or(e){return Fa()?e instanceof Element||e instanceof Jt(e).Element:!1}function un(e){return Fa()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function fv(e){return!Fa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function no(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function oD(e){return/^(table|td|th)$/.test(qi(e))}function Na(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var aD=/transform|translate|scale|rotate|perspective|filter/,lD=/paint|layout|strict|content/,li=e=>!!e&&e!=="none",vc;function gc(e){const t=Or(e)?Cr(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!yc()&&(li(t.backdropFilter)||li(t.filter))||aD.test(t.willChange||"")||lD.test(t.contain||"")}function uD(e){let t=Ln(e);for(;un(t)&&!Vi(t);){if(gc(t))return t;if(Na(t))return null;t=Ln(t)}return null}function yc(){return vc==null&&(vc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vc}function Vi(e){return/^(html|body|#document)$/.test(qi(e))}function Cr(e){return Jt(e).getComputedStyle(e)}function Ra(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fv(e)&&e.host||Gr(e);return fv(t)?t.host:t}function hv(e){const t=Ln(e);return Vi(t)?e.ownerDocument?e.ownerDocument.body:e.body:un(t)&&no(t)?t:hv(t)}function io(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=hv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(i);if(s){const a=bc(o);return t.concat(o,o.visualViewport||[],no(i)?i:[],a&&r?io(a):[])}else return t.concat(i,io(i,[],r))}function bc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pv(e){const t=Cr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=un(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=Ia(r)!==s||Ia(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function _c(e){return Or(e)?e:e.contextElement}function Bi(e){const t=_c(e);if(!un(t))return Wr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=pv(t);let o=(s?Ia(r.width):r.width)/n,a=(s?Ia(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var cD=Wr(0);function mv(e){const t=Jt(e);return!yc()||!t.visualViewport?cD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Jt(e)?!1:t}function ui(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=_c(e);let o=Wr(1);t&&(n?Or(n)&&(o=Bi(n)):o=Bi(e));const a=dD(s,r,n)?mv(s):Wr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s){const p=Jt(s),f=n&&Or(n)?Jt(n):n;let g=p,m=bc(g);for(;m&&n&&f!==g;){const v=Bi(m),_=m.getBoundingClientRect(),k=Cr(m),A=_.left+(m.clientLeft+parseFloat(k.paddingLeft))*v.x,E=_.top+(m.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=A,c+=E,g=Jt(m),m=bc(g)}}return Ma({width:d,height:u,x:l,y:c})}function La(e,t){const r=Ra(e).scrollLeft;return t?t.left+r:ui(Gr(e)).left+r}function vv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-La(e,r),y:r.top+t.scrollTop}}function fD(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Gr(n),a=t?Na(t.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Wr(1);const d=Wr(0),u=un(n);if((u||!u&&!s)&&((qi(n)!=="body"||no(o))&&(l=Ra(n)),u)){const f=ui(n);c=Bi(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=o&&!u&&!s?vv(o,l):Wr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function hD(e){return Array.from(e.getClientRects())}function pD(e){const t=Gr(e),r=Ra(e),n=e.ownerDocument.body,i=Yt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Yt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+La(e);const a=-r.scrollTop;return Cr(n).direction==="rtl"&&(o+=Yt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var gv=25;function mD(e,t){const r=Jt(e),n=Gr(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const d=yc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=La(n);if(c<=0){const d=n.ownerDocument,u=d.body,p=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-f);g<=gv&&(s-=g)}else c<=gv&&(s+=c);return{width:s,height:o,x:a,y:l}}function vD(e,t){const r=ui(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=un(e)?Bi(e):Wr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function yv(e,t,r){let n;if(t==="viewport")n=mD(e,r);else if(t==="document")n=pD(Gr(e));else if(Or(t))n=vD(t,r);else{const i=mv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ma(n)}function bv(e,t){const r=Ln(e);return r===t||!Or(r)||Vi(r)?!1:Cr(r).position==="fixed"||bv(r,t)}function gD(e,t){const r=t.get(e);if(r)return r;let n=io(e,[],!1).filter(a=>Or(a)&&qi(a)!=="body"),i=null;const s=Cr(e).position==="fixed";let o=s?Ln(e):e;for(;Or(o)&&!Vi(o);){const a=Cr(o),l=gc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||no(o)&&!l&&bv(e,o))?n=n.filter(c=>c!==o):i=a,o=Ln(o)}return t.set(e,n),n}function yD(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Na(t)?[]:gD(t,this._c):[].concat(r),n],o=yv(t,s[0],i);let a=o.top,l=o.right,c=o.bottom,d=o.left;for(let u=1;u<s.length;u++){const p=yv(t,s[u],i);a=Yt(p.top,a),l=Rn(p.right,l),c=Rn(p.bottom,c),d=Yt(p.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function bD(e){const{width:t,height:r}=pv(e);return{width:t,height:r}}function _D(e,t,r){const n=un(t),i=Gr(t),s=r==="fixed",o=ui(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Wr(0);function c(){l.x=La(i)}if(n||!n&&!s)if((qi(t)!=="body"||no(i))&&(a=Ra(t)),n){const u=ui(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const d=i&&!n&&!s?vv(i,a):Wr(0);return{x:o.left+a.scrollLeft-l.x-d.x,y:o.top+a.scrollTop-l.y-d.y,width:o.width,height:o.height}}function wc(e){return Cr(e).position==="static"}function _v(e,t){if(!un(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gr(e)===r&&(r=r.ownerDocument.body),r}function wv(e,t){const r=Jt(e);if(Na(e))return r;if(!un(e)){let i=Ln(e);for(;i&&!Vi(i);){if(Or(i)&&!wc(i))return i;i=Ln(i)}return r}let n=_v(e,t);for(;n&&oD(n)&&wc(n);)n=_v(n,t);return n&&Vi(n)&&wc(n)&&!gc(n)?r:n||uD(e)||r}var wD=async function(e){const t=this.getOffsetParent||wv,r=this.getDimensions,n=await r(e.floating);return{reference:_D(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function kD(e){return Cr(e).direction==="rtl"}var SD={convertOffsetParentRelativeRectToViewportRelativeRect:fD,getDocumentElement:Gr,getClippingRect:yD,getOffsetParent:wv,getElementRects:wD,getClientRects:hD,getDimensions:bD,getScale:Bi,isElement:Or,isRTL:kD};function kv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ED(e,t){let r=null,n;const i=Gr(e);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=e.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(a||t(),!p||!f)return;const g=Pa(u),m=Pa(i.clientWidth-(d+p)),v=Pa(i.clientHeight-(u+f)),_=Pa(d),k={rootMargin:-g+"px "+-m+"px "+-v+"px "+-_+"px",threshold:Yt(0,Rn(1,l))||1};let A=!0;function E(T){const O=T[0].intersectionRatio;if(O!==l){if(!A)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!kv(c,e.getBoundingClientRect())&&o(),A=!1}try{r=new IntersectionObserver(E,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,k)}r.observe(e)}return o(!0),s}function xD(e,t,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=_c(e),d=i||s?[...c?io(c):[],...t?io(t):[]]:[];d.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const u=c&&a?ED(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(_=>{let[k]=_;k&&k.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=f)==null||A.observe(t)})),r()}),c&&!l&&f.observe(c),t&&f.observe(t));let g,m=l?ui(e):null;l&&v();function v(){const _=ui(e);m&&!kv(m,_)&&r(),m=_,g=requestAnimationFrame(v)}return r(),()=>{var _;d.forEach(k=>{i&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var TD=rD,AD=nD,OD=QC,CD=sD,DD=eD,ID=XC,PD=iD,$D=(e,t,r)=>{const n=new Map,i={platform:SD,...r},s={...i.platform,_c:n};return JC(e,t,{...i,platform:s})};function ci(e){return typeof e=="function"?e():e}function Sv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ev(e,t){const r=Sv(e);return Math.round(t*r)/r}function xv(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function MD(e){const t=e.whileElementsMounted,r=D(()=>ci(e.open)??!0),n=D(()=>ci(e.middleware)),i=D(()=>ci(e.transform)??!0),s=D(()=>ci(e.placement)??"bottom"),o=D(()=>ci(e.strategy)??"absolute"),a=D(()=>ci(e.sideOffset)??0),l=D(()=>ci(e.alignOffset)??0),c=e.reference;let d=te(0),u=te(0);const p=Er(null);let f=te(Fe(h(o))),g=te(Fe(h(s))),m=te(Fe({})),v=te(!1),_=!1,k=0;const A=D(()=>{const N=p.current?Ev(p.current,h(d)):h(d),le=p.current?Ev(p.current,h(u)):h(u);return h(i)?{position:h(f),left:"0",top:"0",transform:`translate(${N}px, ${le}px)`,...p.current&&Sv(p.current)>=1.5&&{willChange:"transform"}}:{position:h(f),left:`${N}px`,top:`${le}px`}});let E;function T(){if(c.current===null||p.current===null)return;const N=c.current,le=p.current,V=++k;$D(N,le,{middleware:h(n),placement:h(s),strategy:h(o)}).then(ae=>{if(V===k&&!(c.current!==N||p.current!==le)){if(FD(N)){I(m,{...h(m),hide:{...h(m).hide,referenceHidden:!0}},!0);return}if(!h(r)&&h(d)!==0&&h(u)!==0){const me=Math.max(Math.abs(h(a)),Math.abs(h(l)),15);if(ae.x<=me&&ae.y<=me)return}I(d,ae.x,!0),I(u,ae.y,!0),I(f,ae.strategy,!0),I(g,ae.placement,!0),I(m,ae.middlewareData,!0),I(v,!0)}})}function O(){typeof E=="function"&&(E(),E=void 0),k++}function $(){if(O(),t===void 0){T();return}h(r)&&(c.current===null||p.current===null||(E=t(c.current,p.current,T)))}function R(){!h(r)&&p.current===null&&I(v,!1)}function U(){return[h(n),h(s),h(o),h(a),h(l),h(r)]}return ge(()=>{t===void 0&&h(r)&&T()}),ge($),ge(()=>{if(t!==void 0){if(U(),!h(r)){_=!1;return}if(!h(v)){_=!1;return}if(!_){_=!0;return}T()}}),ge(R),ge(()=>O),{floating:p,reference:c,get strategy(){return h(f)},get placement(){return h(g)},get middlewareData(){return h(m)},get isPositioned(){return h(v)},get floatingStyles(){return h(A)},get update(){return T}}}function FD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var ND={top:"bottom",right:"left",bottom:"top",left:"right"},kc=new It("Floating.Root"),Tv=new It("Floating.Content"),Sc=new It("Floating.Root"),RD=class ld{static create(t=!1){return t?Sc.set(new ld):kc.set(new ld)}anchorNode=Er(null);customAnchorNode=Er(null);triggerNode=Er(null);constructor(){ge(()=>{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})}},LD=class ud{static create(t,r=!1){return r?Tv.set(new ud(t,Sc.get())):Tv.set(new ud(t,kc.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=Qe(this.contentRef);wrapperAttachment=Qe(this.wrapperRef);arrowAttachment=Qe(this.arrowRef);arrowId=Er(Nn());#e=D(()=>{if(typeof this.opts.style=="string")return Zs(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new tA(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=D(()=>h(this.#a).length>0);get hasExplicitBoundaries(){return h(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:h(this.#a).filter(_A),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return h(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=te(void 0);#c=te(void 0);#d=te(void 0);#h=te(void 0);#p=D(()=>[TD({mainAxis:this.opts.sideOffset.current+h(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&AD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?PD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&OD({...this.detectOverflowOptions}),CD({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;I(this.#u,r,!0),I(this.#c,n,!0),I(this.#d,i,!0),I(this.#h,s,!0)}}),this.arrowRef.current&&ID({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),UD({arrowWidth:h(this.#n),arrowHeight:h(this.#i)}),this.opts.hideWhenDetached.current&&DD({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return h(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>qD(this.floating.placement));get placedSide(){return h(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>VD(this.floating.placement));get placedAlign(){return h(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return h(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return h(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return h(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=te();get contentZIndex(){return h(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>ND[this.placedSide]);get arrowBaseSide(){return h(this.#g)}set arrowBaseSide(t){I(this.#g,t)}#k=D(()=>({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.#c)}px`,"--bits-floating-anchor-width":`${h(this.#d)}px`,"--bits-floating-anchor-height":`${h(this.#h)}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.#k)}set wrapperProps(t){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Hs({...h(this.#e)}),...this.contentAttachment}));get props(){return h(this.#b)}set props(t){I(this.#b,t)}#S=D(()=>({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(t){I(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),tt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=MD({strategy:()=>this.opts.strategy.current,placement:()=>h(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>xD(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ge(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),tt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=am(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const o=i.getComputedStyle(n).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),ge(()=>{this.floating.floating.current=this.wrapperRef.current})}},zD=class cd{static create(t,r=!1){return r?new cd(t,Sc.get()):new cd(t,kc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=_T(t.virtualEl.current):r.triggerNode=t.ref}};function UD(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,c]=Ec(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,p=(i.arrow?.y??0)+a/2;let f="",g="";return l==="bottom"?(f=s?d:`${u}px`,g=`${-a}px`):l==="top"?(f=s?d:`${u}px`,g=`${n.floating.height+a}px`):l==="right"?(f=`${-a}px`,g=s?d:`${p}px`):l==="left"&&(f=`${n.floating.width+a}px`,g=s?d:`${p}px`),{data:{x:f,y:g}}}}}function Ec(e){const[t,r="center"]=e.split("-");return[t,r]}function qD(e){return Ec(e)[0]}function VD(e){return Ec(e)[1]}function Av(e,t){re(t,!0);let r=b(t,"children",7),n=b(t,"tooltip",7,!1);RD.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=Y(),o=q(s);return we(o,()=>r()??Me),x(e,s),ne(i)}ie(Av,{children:{},tooltip:{}},[],[],{mode:"open"});function Ov(e,t){re(t,!0);let r=b(t,"id",7),n=b(t,"children",7),i=b(t,"virtualEl",7),s=b(t,"ref",7),o=b(t,"tooltip",7,!1);zD.create({id:L(()=>r()),virtualEl:L(()=>i()),ref:s()},o());var a={get id(){return r()},set id(d){r(d),y()},get children(){return n()},set children(d){n(d),y()},get virtualEl(){return i()},set virtualEl(d){i(d),y()},get ref(){return s()},set ref(d){s(d),y()},get tooltip(){return o()},set tooltip(d=!1){o(d),y()}},l=Y(),c=q(l);return we(c,()=>n()??Me),x(e,l),ne(a)}ie(Ov,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function Cv(e,t){re(t,!0);let r=b(t,"content",7),n=b(t,"side",7,"bottom"),i=b(t,"sideOffset",7,0),s=b(t,"align",7,"center"),o=b(t,"alignOffset",7,0),a=b(t,"id",7),l=b(t,"arrowPadding",7,0),c=b(t,"avoidCollisions",7,!0),d=b(t,"collisionBoundary",23,()=>[]),u=b(t,"collisionPadding",7,0),p=b(t,"hideWhenDetached",7,!1),f=b(t,"onPlaced",7,()=>{}),g=b(t,"sticky",7,"partial"),m=b(t,"updatePositionStrategy",7,"optimized"),v=b(t,"strategy",7,"fixed"),_=b(t,"dir",7,"ltr"),k=b(t,"style",23,()=>({})),A=b(t,"wrapperId",23,Nn),E=b(t,"customAnchor",7,null),T=b(t,"enabled",7),O=b(t,"tooltip",7,!1);const $=LD.create({side:L(()=>n()),sideOffset:L(()=>i()),align:L(()=>s()),alignOffset:L(()=>o()),id:L(()=>a()),arrowPadding:L(()=>l()),avoidCollisions:L(()=>c()),collisionBoundary:L(()=>d()),collisionPadding:L(()=>u()),hideWhenDetached:L(()=>p()),onPlaced:L(()=>f()),sticky:L(()=>g()),updatePositionStrategy:L(()=>m()),strategy:L(()=>v()),dir:L(()=>_()),style:L(()=>k()),enabled:L(()=>T()),wrapperId:L(()=>A()),customAnchor:L(()=>E())},O()),R=D(()=>He($.wrapperProps,{style:{pointerEvents:"auto"}}));var U={get content(){return r()},set content(V){r(V),y()},get side(){return n()},set side(V="bottom"){n(V),y()},get sideOffset(){return i()},set sideOffset(V=0){i(V),y()},get align(){return s()},set align(V="center"){s(V),y()},get alignOffset(){return o()},set alignOffset(V=0){o(V),y()},get id(){return a()},set id(V){a(V),y()},get arrowPadding(){return l()},set arrowPadding(V=0){l(V),y()},get avoidCollisions(){return c()},set avoidCollisions(V=!0){c(V),y()},get collisionBoundary(){return d()},set collisionBoundary(V=[]){d(V),y()},get collisionPadding(){return u()},set collisionPadding(V=0){u(V),y()},get hideWhenDetached(){return p()},set hideWhenDetached(V=!1){p(V),y()},get onPlaced(){return f()},set onPlaced(V=()=>{}){f(V),y()},get sticky(){return g()},set sticky(V="partial"){g(V),y()},get updatePositionStrategy(){return m()},set updatePositionStrategy(V="optimized"){m(V),y()},get strategy(){return v()},set strategy(V="fixed"){v(V),y()},get dir(){return _()},set dir(V="ltr"){_(V),y()},get style(){return k()},set style(V={}){k(V),y()},get wrapperId(){return A()},set wrapperId(V=Nn()){A(V),y()},get customAnchor(){return E()},set customAnchor(V=null){E(V),y()},get enabled(){return T()},set enabled(V){T(V),y()},get tooltip(){return O()},set tooltip(V=!1){O(V),y()}},N=Y(),le=q(N);return we(le,()=>r()??Me,()=>({props:$.props,wrapperProps:h(R)})),x(e,N),ne(U)}ie(Cv,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function Dv(e,t){re(t,!0);let r=b(t,"content",7),n=b(t,"onPlaced",7);rn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),y()},get onPlaced(){return n()},set onPlaced(a){n(a),y()}},s=Y(),o=q(s);return we(o,()=>r()??Me,()=>({props:{},wrapperProps:{}})),x(e,s),ne(i)}ie(Dv,{content:{},onPlaced:{}},[],[],{mode:"open"});var BD=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function Iv(e,t){re(t,!0);let r=b(t,"content",7),n=b(t,"isStatic",7,!1),i=b(t,"onPlaced",7),s=je(t,BD);var o={get content(){return r()},set content(u){r(u),y()},get isStatic(){return n()},set isStatic(u=!1){n(u),y()},get onPlaced(){return i()},set onPlaced(u){i(u),y()}},a=Y(),l=q(a),c=u=>{Dv(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{Cv(u,Sn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return de(l,u=>{n()?u(c):u(d,-1)}),x(e,a),ne(o)}ie(Iv,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var jD=new Set(["$$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"]),ZD=j("<!> <!>",1);function xc(e,t){re(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),p=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),k=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),T=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),R=b(t,"style",7),U=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),le=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),ae=b(t,"onFocusOutside",7),me=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),oe=b(t,"trapFocus",7,!0),G=b(t,"isValidEvent",7,()=>!1),Q=b(t,"customAnchor",7,null),K=b(t,"isStatic",7,!1),H=b(t,"enabled",7),B=b(t,"ref",7),ee=b(t,"tooltip",7,!1),P=b(t,"contentPointerEvents",7,"auto"),ue=je(t,jD);const z=D(()=>O()??!0),ve=D(()=>E()??(h(z)?"fixed":"absolute"));var fe={get popper(){return r()},set popper(w){r(w),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),y()},get id(){return o()},set id(w){o(w),y()},get onPointerDown(){return a()},set onPointerDown(w){a(w),y()},get onPointerUp(){return l()},set onPointerUp(w){l(w),y()},get side(){return c()},set side(w){c(w),y()},get sideOffset(){return d()},set sideOffset(w){d(w),y()},get align(){return u()},set align(w){u(w),y()},get alignOffset(){return p()},set alignOffset(w){p(w),y()},get arrowPadding(){return f()},set arrowPadding(w){f(w),y()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),y()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),y()},get collisionPadding(){return v()},set collisionPadding(w){v(w),y()},get sticky(){return _()},set sticky(w){_(w),y()},get hideWhenDetached(){return k()},set hideWhenDetached(w){k(w),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(w){A(w),y()},get strategy(){return E()},set strategy(w){E(w),y()},get dir(){return T()},set dir(w){T(w),y()},get preventScroll(){return O()},set preventScroll(w){O(w),y()},get wrapperId(){return $()},set wrapperId(w){$(w),y()},get style(){return R()},set style(w){R(w),y()},get onPlaced(){return U()},set onPlaced(w){U(w),y()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),y()},get onCloseAutoFocus(){return le()},set onCloseAutoFocus(w){le(w),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(w){V(w),y()},get onFocusOutside(){return ae()},set onFocusOutside(w){ae(w),y()},get interactOutsideBehavior(){return me()},set interactOutsideBehavior(w="close"){me(w),y()},get loop(){return J()},set loop(w){J(w),y()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),y()},get isValidEvent(){return G()},set isValidEvent(w=()=>!1){G(w),y()},get customAnchor(){return Q()},set customAnchor(w=null){Q(w),y()},get isStatic(){return K()},set isStatic(w=!1){K(w),y()},get enabled(){return H()},set enabled(w){H(w),y()},get ref(){return B()},set ref(w){B(w),y()},get tooltip(){return ee()},set tooltip(w=!1){ee(w),y()},get contentPointerEvents(){return P()},set contentPointerEvents(w="auto"){P(w),y()}};return Iv(e,{get isStatic(){return K()},get id(){return o()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return A()},get strategy(){return h(ve)},get dir(){return T()},get wrapperId(){return $()},get style(){return R()},get onPlaced(){return U()},get customAnchor(){return Q()},get enabled(){return H()},get tooltip(){return ee()},content:(Be,Pe)=>{let Je=()=>Pe?.().props,Et=()=>Pe?.().wrapperProps;var Ke=ZD(),Xt=q(Ke),dt=Mt=>{Wu(Mt,{get preventScroll(){return h(z)}})},Qt=Mt=>{Wu(Mt,{get preventScroll(){return h(z)}})};de(Xt,Mt=>{t.forceMount&&H()?Mt(dt):t.forceMount||Mt(Qt,1)});var xt=X(Xt,2);Cm(xt,{get onOpenAutoFocus(){return V()},get onCloseAutoFocus(){return le()},get loop(){return J()},get enabled(){return H()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return B()},focusScope:(er,jt)=>{let hr=()=>jt?.().props;Om(er,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return H()},get ref(){return B()},children:(Ir,Pr)=>{Am(Ir,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return ae()},get interactOutsideBehavior(){return me()},get isValidEvent(){return G()},get enabled(){return H()},get ref(){return B()},children:($r,pr)=>{let Jr=()=>pr?.().props;Pm($r,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return H()},get ref(){return B()},children:(Xr,wt)=>{var Un=Y(),ns=q(Un);{let is=D(()=>({props:He(ue,Je(),Jr(),hr(),{style:{pointerEvents:P()}}),wrapperProps:Et()}));we(ns,()=>r()??Me,()=>h(is))}x(Xr,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(Be,Ke)},$$slots:{content:!0}}),ne(fe)}ie(xc,{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"});var WD=new Set(["$$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"]);function Pv(e,t){re(t,!0);let r=b(t,"popper",7),n=b(t,"open",7),i=b(t,"onEscapeKeydown",7),s=b(t,"escapeKeydownBehavior",7),o=b(t,"preventOverflowTextSelection",7),a=b(t,"id",7),l=b(t,"onPointerDown",7),c=b(t,"onPointerUp",7),d=b(t,"side",7),u=b(t,"sideOffset",7),p=b(t,"align",7),f=b(t,"alignOffset",7),g=b(t,"arrowPadding",7),m=b(t,"avoidCollisions",7),v=b(t,"collisionBoundary",7),_=b(t,"collisionPadding",7),k=b(t,"sticky",7),A=b(t,"hideWhenDetached",7),E=b(t,"updatePositionStrategy",7),T=b(t,"strategy",7),O=b(t,"dir",7),$=b(t,"preventScroll",7),R=b(t,"wrapperId",7),U=b(t,"style",7),N=b(t,"onPlaced",7),le=b(t,"onInteractOutside",7),V=b(t,"onCloseAutoFocus",7),ae=b(t,"onOpenAutoFocus",7),me=b(t,"onFocusOutside",7),J=b(t,"interactOutsideBehavior",7,"close"),oe=b(t,"loop",7),G=b(t,"trapFocus",7,!0),Q=b(t,"isValidEvent",7,()=>!1),K=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),B=b(t,"ref",7),ee=b(t,"shouldRender",7),P=je(t,WD);var ue={get popper(){return r()},set popper(w){r(w),y()},get open(){return n()},set open(w){n(w),y()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),y()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),y()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(w){o(w),y()},get id(){return a()},set id(w){a(w),y()},get onPointerDown(){return l()},set onPointerDown(w){l(w),y()},get onPointerUp(){return c()},set onPointerUp(w){c(w),y()},get side(){return d()},set side(w){d(w),y()},get sideOffset(){return u()},set sideOffset(w){u(w),y()},get align(){return p()},set align(w){p(w),y()},get alignOffset(){return f()},set alignOffset(w){f(w),y()},get arrowPadding(){return g()},set arrowPadding(w){g(w),y()},get avoidCollisions(){return m()},set avoidCollisions(w){m(w),y()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),y()},get collisionPadding(){return _()},set collisionPadding(w){_(w),y()},get sticky(){return k()},set sticky(w){k(w),y()},get hideWhenDetached(){return A()},set hideWhenDetached(w){A(w),y()},get updatePositionStrategy(){return E()},set updatePositionStrategy(w){E(w),y()},get strategy(){return T()},set strategy(w){T(w),y()},get dir(){return O()},set dir(w){O(w),y()},get preventScroll(){return $()},set preventScroll(w){$(w),y()},get wrapperId(){return R()},set wrapperId(w){R(w),y()},get style(){return U()},set style(w){U(w),y()},get onPlaced(){return N()},set onPlaced(w){N(w),y()},get onInteractOutside(){return le()},set onInteractOutside(w){le(w),y()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(w){V(w),y()},get onOpenAutoFocus(){return ae()},set onOpenAutoFocus(w){ae(w),y()},get onFocusOutside(){return me()},set onFocusOutside(w){me(w),y()},get interactOutsideBehavior(){return J()},set interactOutsideBehavior(w="close"){J(w),y()},get loop(){return oe()},set loop(w){oe(w),y()},get trapFocus(){return G()},set trapFocus(w=!0){G(w),y()},get isValidEvent(){return Q()},set isValidEvent(w=()=>!1){Q(w),y()},get customAnchor(){return K()},set customAnchor(w=null){K(w),y()},get isStatic(){return H()},set isStatic(w=!1){H(w),y()},get ref(){return B()},set ref(w){B(w),y()},get shouldRender(){return ee()},set shouldRender(w){ee(w),y()}},z=Y(),ve=q(z),fe=w=>{xc(w,Sn({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 d()},get sideOffset(){return u()},get align(){return p()},get alignOffset(){return f()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return _()},get sticky(){return k()},get hideWhenDetached(){return A()},get updatePositionStrategy(){return E()},get strategy(){return T()},get dir(){return O()},get preventScroll(){return $()},get wrapperId(){return R()},get style(){return U()},get onPlaced(){return N()},get customAnchor(){return K()},get isStatic(){return H()},get enabled(){return n()},get onInteractOutside(){return le()},get onCloseAutoFocus(){return V()},get onOpenAutoFocus(){return ae()},get interactOutsideBehavior(){return J()},get loop(){return oe()},get trapFocus(){return G()},get isValidEvent(){return Q()},get onFocusOutside(){return me()},forceMount:!1,get ref(){return B()}},()=>P))};return de(ve,w=>{ee()&&w(fe)}),x(e,z),ne(ue)}ie(Pv,{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"});var HD=new Set(["$$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"]);function $v(e,t){re(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),p=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),k=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),T=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),R=b(t,"style",7),U=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),le=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),ae=b(t,"onFocusOutside",7),me=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),oe=b(t,"trapFocus",7,!0),G=b(t,"isValidEvent",7,()=>!1),Q=b(t,"customAnchor",7,null),K=b(t,"isStatic",7,!1),H=b(t,"enabled",7),B=je(t,HD);var ee={get popper(){return r()},set popper(P){r(P),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(P){n(P),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(P){i(P),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(P){s(P),y()},get id(){return o()},set id(P){o(P),y()},get onPointerDown(){return a()},set onPointerDown(P){a(P),y()},get onPointerUp(){return l()},set onPointerUp(P){l(P),y()},get side(){return c()},set side(P){c(P),y()},get sideOffset(){return d()},set sideOffset(P){d(P),y()},get align(){return u()},set align(P){u(P),y()},get alignOffset(){return p()},set alignOffset(P){p(P),y()},get arrowPadding(){return f()},set arrowPadding(P){f(P),y()},get avoidCollisions(){return g()},set avoidCollisions(P){g(P),y()},get collisionBoundary(){return m()},set collisionBoundary(P){m(P),y()},get collisionPadding(){return v()},set collisionPadding(P){v(P),y()},get sticky(){return _()},set sticky(P){_(P),y()},get hideWhenDetached(){return k()},set hideWhenDetached(P){k(P),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(P){A(P),y()},get strategy(){return E()},set strategy(P){E(P),y()},get dir(){return T()},set dir(P){T(P),y()},get preventScroll(){return O()},set preventScroll(P){O(P),y()},get wrapperId(){return $()},set wrapperId(P){$(P),y()},get style(){return R()},set style(P){R(P),y()},get onPlaced(){return U()},set onPlaced(P){U(P),y()},get onInteractOutside(){return N()},set onInteractOutside(P){N(P),y()},get onCloseAutoFocus(){return le()},set onCloseAutoFocus(P){le(P),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(P){V(P),y()},get onFocusOutside(){return ae()},set onFocusOutside(P){ae(P),y()},get interactOutsideBehavior(){return me()},set interactOutsideBehavior(P="close"){me(P),y()},get loop(){return J()},set loop(P){J(P),y()},get trapFocus(){return oe()},set trapFocus(P=!0){oe(P),y()},get isValidEvent(){return G()},set isValidEvent(P=()=>!1){G(P),y()},get customAnchor(){return Q()},set customAnchor(P=null){Q(P),y()},get isStatic(){return K()},set isStatic(P=!1){K(P),y()},get enabled(){return H()},set enabled(P){H(P),y()}};return xc(e,Sn({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 d()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return A()},get strategy(){return E()},get dir(){return T()},get preventScroll(){return O()},get wrapperId(){return $()},get style(){return R()},get onPlaced(){return U()},get customAnchor(){return Q()},get isStatic(){return K()},get enabled(){return H()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return le()},get onOpenAutoFocus(){return V()},get interactOutsideBehavior(){return me()},get loop(){return J()},get trapFocus(){return oe()},get isValidEvent(){return G()},get onFocusOutside(){return ae()}},()=>B,{forceMount:!0})),ne(ee)}ie($v,{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"});var za=pa({component:"date-field",parts:["input","label","segment"]}),ji={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return Js(t?r.set({month:Number.parseInt(t)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(e,t)=>t.placeholder.current?`${e} - ${t.formatter.fullMonth(Vt(t.placeholder.current.set({month:e})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:e=>e.hourCycle.current===12?1:0,max:e=>e.hourCycle.current===24?23:e.hourCycle.current===12||Zm(e.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 It("DateField.Root"),GD=class vy{static create(t,r){return zn.set(new vy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Nn();formatter;initialSegments;#e=te();get segmentValues(){return h(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return h(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=Vm();#r=te(null);#n=te(null);#i=te(null);get descriptionNode(){return h(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=te(null);get validationNode(){return h(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=Vm();#a=te(null);get dayPeriodNode(){return h(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=te("");get name(){return h(this.#o)}set name(t){I(this.#o,t,!0)}domContext=new zi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?Er(void 0):t.validate,this.minValue=r?r.opts.minValue:t.minValue,this.maxValue=r?r.opts.maxValue:t.maxValue,this.disabled=r?r.opts.disabled:t.disabled,this.readonly=r?r.opts.readonly:t.readonly,this.granularity=r?r.opts.granularity:t.granularity,this.readonlySegments=r?r.opts.readonlySegments:t.readonlySegments,this.hourCycle=r?r.opts.hourCycle:t.hourCycle,this.locale=r?r.opts.locale:t.locale,this.hideTimeZone=r?r.opts.hideTimeZone:t.hideTimeZone,this.required=r?r.opts.required:t.required,this.onInvalid=r?r.opts.onInvalid:t.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:t.errorMessageId,this.isInvalidProp=t.isInvalidProp,this.formatter=Gm({initialLocale:this.locale.current,monthFormat:L(()=>"long"),yearFormat:L(()=>"numeric")}),this.initialSegments=Yu(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=xa(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),ge(()=>{Ne(()=>{this.initialSegments=Yu(this.inferredGranularity)})}),rn(()=>{this.announcer=xa(this.domContext.getDocument())}),ii(()=>{r||MO(this.descriptionId,this.domContext.getDocument())}),ge(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ge(()=>{if(r)return;this.value.current&&$O({id:Ne(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Ne(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ne(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ge(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ge(()=>{this.value.current===void 0&&(this.segmentValues=Yu(this.inferredGranularity))}),tt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){I(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:h(this.#r)}setLabelNode(t){I(this.#n,t,!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(t){this.value.current=t}syncSegmentValues(t){const r=Aa.map(n=>{const i=t[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 s=4-`${i}`.length;if(s>0)return[n,`${"0".repeat(s)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=Oa.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Vt(t))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`];if(t[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}return[s,`${t[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=D(()=>{const t=this.value.current;if(!t)return!1;const r=this.validate.current?.(t);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&ai(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&ai(i,t)?{reason:"max"}:!1});get validationStatus(){return h(this.#u)}set validationStatus(t){I(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return h(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||IO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return h(this.#d)}set inferredGranularity(t){I(this.#d,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return h(this.#h)}set dateRef(t){I(this.#h,t)}#p=D(()=>xO({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.#p)}set allSegmentContent(t){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return h(this.#f)}set segmentContents(t){I(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(DO(o)){const c=o[t],d=r;if(t==="month"){const u=d(c);if(this.states.month.updating=u,u!==null&&o.day!==null){const p=Js(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[t]:u}}else if(t==="dayPeriod"){const u=d(c);this.states.dayPeriod.updating=u;const p=this.value.current;if(p&&"hour"in p){const f=p.hour;u==="AM"?f>=12&&(o.hour=`${f-12}`):u==="PM"&&f<12&&(o.hour=`${f+12}`)}a={...o,[t]:u}}else if(t==="hour"){const u=d(c);if(this.states.hour.updating=u,u!==null&&o.dayPeriod!==null){const p=this.formatter.dayPeriod(Vt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(o.dayPeriod=p)}a={...o,[t]:u}}else if(t==="minute"){const u=d(c);this.states.minute.updating=u,a={...o,[t]:u}}else if(t==="second"){const u=d(c);this.states.second.updating=u,a={...o,[t]:u}}else if(t==="year"){const u=d(c);this.states.year.updating=u,a={...o,[t]:u}}else if(t==="day"){const u=d(c);this.states.day.updating=u,a={...o,[t]:u}}else{const u=d(c);a={...o,[t]:u}}}else if(Ca(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const p=Js(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[t]:u}}else if(t==="year"){const p=d(c);this.states.year.updating=p,a={...o,[t]:p}}else if(t==="day"){const p=d(c);this.states.day.updating=p,a={...o,[t]:p}}else a={...o,[t]:u}}this.segmentValues=a,CO(a,h(this.#r))?this.setValue(OO({segmentObj:a,fieldNode:h(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":zu(this.isInvalid),"aria-disabled":xr(this.disabled.current),"aria-readonly":xr(this.readonly.current||n),"data-invalid":ze(this.isInvalid),"data-disabled":ze(this.disabled.current),"data-readonly":ze(this.readonly.current||n),"data-segment":`${t}`,[za.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=PO(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}}},KD=class gy{static create(t){return new gy(t,zn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new zi(t.ref),this.root.domContext=this.domContext,this.attachment=Qe(t.ref,n=>this.root.setFieldNode(n)),tt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(on&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=D(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":h(this.#e),"aria-disabled":xr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":ze(this.root.disabled.current),[za.input]:"",...this.attachment}));get props(){return h(this.#t)}set props(t){I(this.#t,t)}},YD=class yy{static create(){return new yy(zn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return h(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return h(this.#t)}set isoValue(t){I(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return h(this.#r)}set props(t){I(this.#r,t)}},JD=class by{static create(t){return new by(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=RO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":ze(this.root.isInvalid),"data-disabled":ze(this.root.disabled.current),[za.label]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#e)}set props(t){I(this.#e,t)}},Zi=class{opts;root;announcer;part;config;attachment;constructor(e,t,r,n){this.opts=e,this.root=t,this.part=r,this.config=n,this.announcer=t.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=Qe(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,t=!0){const r=String(e);return t&&this.config.padZero&&r.length===1?`0${e}`:r}onkeydown(e){const t=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 t))&&(e.key!=="Tab"&&e.preventDefault(),!!Ju(e.key))){if(Tc(e.key)){this.#i(t);return}if(Ac(e.key)){this.#s(t);return}if(ma(e.key)){this.#a(e);return}if(Oc(e.key)){this.#o(e);return}eo(e.key)&&Qs(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#a(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,o=this.part;this.root.updateSegment(this.part,a=>{if(o in this.root.states&&this.root.states[o].hasLeftFocus&&(a=null,this.root.states[o].hasLeftFocus=!1),a===null)return s?(o in this.root.states&&(this.root.states[o].lastKeyZero=!0),this.announcer.announce("0"),"0"):(o in this.root.states&&(this.root.states[o].lastKeyZero||t>i)&&(r=!0),o in this.root.states&&(this.root.states[o].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(o in this.root.states&&this.root.states[o].lastKeyZero)return t!==0?(r=!0,this.root.states[o].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):a;const l=Number.parseInt(a+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&Wm(e,this.root.getFieldNode())}#o(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&Hm(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),o=this.#e();let a=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(a=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":a}}#l=D(()=>({...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)}},XD=class extends Zi{#e=[];#t=0;constructor(e,t){super(e,t,"year",ji.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!Ju(e.key))){if(Tc(e.key)){this.#r(),super.onkeydown(e);return}if(Ac(e.key)){this.#r(),super.onkeydown(e);return}if(ma(e.key)){this.#i(e);return}if(Oc(e.key)){this.#s(e);return}eo(e.key)&&Qs(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let t=!1;const r=Number.parseInt(e.key);this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus&&(n=null,this.root.states.year.hasLeftFocus=!1),n===null)return this.announcer.announce(r),`000${r}`;const i=n.toString()+r.toString(),s=Number.parseInt(i);if(String(s).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(s),i):(this.announcer.announce(s),Mv(s));this.announcer.announce(s),t=!0;const o=`${s}`;return o.length>4?o.slice(0,4):o}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&Wm(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let t=!1;this.root.updateSegment("year",r=>{if(this.root.states.year.hasLeftFocus=!1,r===null)return t=!0,this.announcer.announce(null),null;const n=r.toString();if(n.length===1)return this.announcer.announce(null),null;const i=n.slice(0,-1);return this.announcer.announce(i),`${i}`}),t&&Hm(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",t=>t&&t.length!==4?Mv(Number.parseInt(t)):t)}},QD=class extends Zi{constructor(e,t){super(e,t,"day",ji.day)}},eI=class extends Zi{constructor(e,t){super(e,t,"month",ji.month)}},tI=class extends Zi{constructor(e,t){super(e,t,"hour",ji.hour)}onkeydown(e){if(ma(e.key)){const t=this.root.updateSegment.bind(this.root);this.root.updateSegment=(r,n)=>{const i=t(r,n);return r==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),i}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}},rI=class extends Zi{constructor(e,t){super(e,t,"minute",ji.minute)}},nI=class extends Zi{constructor(e,t){super(e,t,"second",ji.second)}},iI=class _y{static create(t){return new _y(t,zn.get())}opts;root;attachment;#e;constructor(t,r){this.opts=t,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!lI(t.key))){if(Tc(t.key)||Ac(t.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}Oc(t.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),t.key==="A"||t.key,this.root.updateSegment("dayPeriod",()=>{const r=t.key==="A"||t.key==="a"?"AM":"PM";return this.#e.announce(r),r}),eo(t.key)&&Qs(t,this.root.getFieldNode())}}#t=D(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,s=t.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(t){I(this.#t,t)}},sI=class wy{static create(t){return new wy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(t.ref)}#e=D(()=>({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(t){I(this.#e,t)}},oI=class ky{static create(t){return new ky(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&eo(t.key)&&Qs(t,this.root.getFieldNode())}#e=D(()=>({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(t){I(this.#e,t)}},aI=class{static create(e,t){const r=zn.get();switch(e){case"day":return new QD(t,r);case"month":return new eI(t,r);case"year":return new XD(t,r);case"hour":return new tI(t,r);case"minute":return new rI(t,r);case"second":return new nI(t,r);case"dayPeriod":return new iI(t,r);case"literal":return new sI(t,r);case"timeZoneName":return new oI(t,r)}}};function lI(e){return Ju(e)||e==="A"||e==="P"||e==="a"||e==="p"}function Tc(e){return e===qu}function Ac(e){return e===Uu}function Oc(e){return e===vA}function Mv(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function Fv(e,t){re(t,!1);const r=YD.create();Gl();var n=Y(),i=q(n),s=o=>{nv(o,Sn(()=>r.props))};de(i,o=>{r.shouldRender&&o(s)}),x(e,n),ne()}ie(Fv,{},[],[],{mode:"open"});var uI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),cI=j("<div><!></div>"),dI=j("<!> <!>",1);function Nv(e,t){const r=ht();re(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"name",7,""),o=b(t,"children",7),a=b(t,"child",7),l=je(t,uI);const c=KD.create({id:L(()=>n()),ref:L(()=>i(),v=>i(v)),name:L(()=>s())}),d=D(()=>He(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get name(){return s()},set name(v=""){s(v),y()},get children(){return o()},set children(v){o(v),y()},get child(){return a()},set child(v){a(v),y()}},p=dI(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,a,()=>({props:h(d),segments:c.root.segmentContents})),x(v,_)},m=v=>{var _=cI();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>o()??Me,()=>({segments:c.root.segmentContents})),M(_),x(v,_)};return de(f,v=>{a()?v(g):v(m,-1)}),Fv(X(f,2),{}),x(e,p),ne(u)}ie(Nv,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var fI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),hI=j("<div><!></div>");function Rv(e,t){const r=ht();re(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=je(t,fI);const l=JD.create({id:L(()=>n()),ref:L(()=>i(),m=>i(m))}),c=D(()=>He(a,l.props));var d={get id(){return n()},set id(m=Ce(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()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,o,()=>({props:h(c)})),x(m,v)},g=m=>{var v=hI();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>s()??Me),M(v),x(m,v)};return de(p,m=>{o()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(Rv,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var pI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),mI=j("<span><!></span>");function Lv(e,t){const r=ht();re(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=b(t,"part",7),l=je(t,pI);const c=aI.create(a(),{id:L(()=>n()),ref:L(()=>i(),v=>i(v))}),d=D(()=>He(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get children(){return s()},set children(v){s(v),y()},get child(){return o()},set child(v){o(v),y()},get part(){return a()},set part(v){a(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,o,()=>({props:h(d)})),x(v,_)},m=v=>{var _=mI();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>s()??Me),M(_),x(v,_)};return de(f,v=>{o()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(Lv,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var zv=new It("DatePicker.Root"),vI=class Sy{static create(t){return zv.set(new Sy(t))}opts;constructor(t){this.opts=t}};function Cc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let o=0,a=s-1;o<s;a=o++){const[l,c]=t[o]??[0,0],[d,u]=t[a]??[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function Dc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function Uv(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}var gI=class{#e;#t;#r;#n=null;#i=null;#s=[];#a=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#c(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#d(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#d(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())},this.#r))}constructor(e){this.#e=e,this.#t=e.buffer??1;const t=e.transitIntentTimeout;this.#r=typeof t=="number"&&t>0?t:null,tt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#a=null,this.#f();return}this.#a&&this.#a!==r&&this.#f(),this.#a=r;const s=ha(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const p=u.relatedTarget;if(si(p)&&n.contains(p))return;const f=this.#e.ignoredTargets?.()??[];si(p)&&f.some(g=>g===p||g.contains(p))||(this.#s=si(p)&&f.length>0?f.filter(g=>p.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},d=u=>{const p=u.relatedTarget;si(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[vt(s,"pointermove",o),vt(r,"pointerleave",a),vt(r,"pointerenter",l),vt(n,"pointerenter",c),vt(n,"pointerleave",d)].reduce((u,p)=>()=>{u(),p()},()=>{})})}#p(e,t,r){if(!this.#n||!this.#i)return;this.#u(),this.#h();const n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(this.#i==="content"&&Dc(e,i)){this.#f();return}if(this.#i==="trigger"&&Dc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(Dc(e,c))return;const d=Uv(n,c),u=this.#m(n,c,d);if(u&&Cc(e,u))return}const s=Uv(n,i),o=this.#m(n,i,s);if(o&&Cc(e,o))return;const a=this.#i==="content"?i:n;Cc(e,this.#v(this.#n,a,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#d()}#m(e,t,r){const n=this.#t;switch(r){case"top":return[[Math.min(e.left,t.left)-n,e.top],[Math.min(e.left,t.left)-n,t.bottom],[Math.max(e.right,t.right)+n,t.bottom],[Math.max(e.right,t.right)+n,e.top]];case"bottom":return[[Math.min(e.left,t.left)-n,e.bottom],[Math.min(e.left,t.left)-n,t.top],[Math.max(e.right,t.right)+n,t.top],[Math.max(e.right,t.right)+n,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-n],[t.right,Math.min(e.top,t.top)-n],[t.right,Math.max(e.bottom,t.bottom)+n],[e.left,Math.max(e.bottom,t.bottom)+n]];case"right":return[[e.right,Math.min(e.top,t.top)-n],[t.left,Math.min(e.top,t.top)-n],[t.left,Math.max(e.bottom,t.bottom)+n],[e.right,Math.max(e.bottom,t.bottom)+n]]}}#v(e,t,r,n){const i=this.#t*4,[s,o]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,o+i],[s+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,o-i],[s+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},Ic=pa({component:"popover",parts:["root","trigger","content","close","overlay"]}),Pc=new It("Popover.Root"),yI=class Ey{static create(t){return Pc.set(new Ey(t))}opts;#e=te(null);get contentNode(){return h(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=te(null);get triggerNode(){return h(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=te(null);get overlayNode(){return h(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=te(!1);get openedViaHover(){return h(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=te(!1);get hasInteractedWithContent(){return h(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=te(!1);get hoverCooldown(){return h(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=te(0);get closeDelay(){return h(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new fm({ref:L(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new fm({ref:L(()=>this.overlayNode),open:this.opts.open}),tt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#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()}},bI=class xy{static create(t){return new xy(t,Pc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=te(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new zi(t.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),tt(()=>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(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||va(t)||(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(t){this.opts.disabled.current||this.opts.openOnHover.current&&(va(t)||(I(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.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(t){this.opts.disabled.current||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":xr(this.root.opts.open.current),"data-state":lm(this.root.opts.open.current),"aria-controls":this.#a(),[Ic.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(t){I(this.#o,t)}},_I=class Ty{static create(t){return new Ty(t,Pc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(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 gI({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(t){this.root.markInteraction()}onfocusin(t){const r=t.target;si(r)&&BA(r)&&this.root.markInteraction()}onpointerenter(t){va(t)||this.root.cancelDelayedClose()}onpointerleave(t){va(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!si(t.target))return;const r=t.target.closest(Ic.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(si(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=D(()=>({open:this.root.opts.open.current}));get snippetProps(){return h(this.#e)}set snippetProps(t){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":lm(this.root.opts.open.current),...pA(this.root.contentPresence.transitionStatus),[Ic.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#t)}set props(t){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function qv(e,t){re(t,!0);let r=b(t,"open",15,!1),n=b(t,"onOpenChange",7,Se),i=b(t,"onOpenChangeComplete",7,Se),s=b(t,"value",15),o=b(t,"onValueChange",7,Se),a=b(t,"placeholder",15),l=b(t,"onPlaceholderChange",7,Se),c=b(t,"isDateUnavailable",7,()=>!1),d=b(t,"validate",7,Se),u=b(t,"onInvalid",7,Se),p=b(t,"minValue",7),f=b(t,"maxValue",7),g=b(t,"disabled",7,!1),m=b(t,"readonly",7,!1),v=b(t,"granularity",7),_=b(t,"readonlySegments",23,()=>[]),k=b(t,"hourCycle",7),A=b(t,"locale",7),E=b(t,"hideTimeZone",7,!1),T=b(t,"required",7,!1),O=b(t,"calendarLabel",7,"Event"),$=b(t,"disableDaysOutsideMonth",7,!0),R=b(t,"preventDeselect",7,!1),U=b(t,"pagedNavigation",7,!1),N=b(t,"weekStartsOn",7),le=b(t,"weekdayFormat",7,"narrow"),V=b(t,"isDateDisabled",7,()=>!1),ae=b(t,"fixedWeeks",7,!1),me=b(t,"numberOfMonths",7,1),J=b(t,"closeOnDateSelect",7,!0),oe=b(t,"initialFocus",7,!1),G=b(t,"errorMessageId",7),Q=b(t,"children",7),K=b(t,"monthFormat",7,"long"),H=b(t,"yearFormat",7,"numeric");const B=Fm({granularity:v(),defaultValue:s(),minValue:p(),maxValue:f()});function ee(){a()===void 0&&a(B)}ee(),tt.pre(()=>a(),()=>{ee()});function P(){J()&&r(!1)}const ue=vI.create({open:L(()=>r(),w=>{r(w),n()(w)}),value:L(()=>s(),w=>{s(w),o()(w)}),placeholder:L(()=>a(),w=>{a(w),l()(w)}),isDateUnavailable:L(()=>c()),minValue:L(()=>p()),maxValue:L(()=>f()),disabled:L(()=>g()),readonly:L(()=>m()),granularity:L(()=>v()),readonlySegments:L(()=>_()),hourCycle:L(()=>k()),locale:pm(()=>A()),hideTimeZone:L(()=>E()),required:L(()=>T()),calendarLabel:L(()=>O()),disableDaysOutsideMonth:L(()=>$()),preventDeselect:L(()=>R()),pagedNavigation:L(()=>U()),weekStartsOn:L(()=>N()),weekdayFormat:L(()=>le()),isDateDisabled:L(()=>V()),fixedWeeks:L(()=>ae()),numberOfMonths:L(()=>me()),initialFocus:L(()=>oe()),onDateSelect:L(()=>P),defaultPlaceholder:B,monthFormat:L(()=>K()),yearFormat:L(()=>H())});yI.create({open:ue.opts.open,onOpenChangeComplete:L(()=>i())}),GD.create({value:ue.opts.value,disabled:ue.opts.disabled,readonly:ue.opts.readonly,readonlySegments:ue.opts.readonlySegments,validate:L(()=>d()),onInvalid:L(()=>u()),minValue:ue.opts.minValue,maxValue:ue.opts.maxValue,granularity:ue.opts.granularity,hideTimeZone:ue.opts.hideTimeZone,hourCycle:ue.opts.hourCycle,locale:ue.opts.locale,required:ue.opts.required,placeholder:ue.opts.placeholder,errorMessageId:L(()=>G()),isInvalidProp:L(()=>{})});var z={get open(){return r()},set open(w=!1){r(w),y()},get onOpenChange(){return n()},set onOpenChange(w=Se){n(w),y()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Se){i(w),y()},get value(){return s()},set value(w){s(w),y()},get onValueChange(){return o()},set onValueChange(w=Se){o(w),y()},get placeholder(){return a()},set placeholder(w){a(w),y()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Se){l(w),y()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),y()},get validate(){return d()},set validate(w=Se){d(w),y()},get onInvalid(){return u()},set onInvalid(w=Se){u(w),y()},get minValue(){return p()},set minValue(w){p(w),y()},get maxValue(){return f()},set maxValue(w){f(w),y()},get disabled(){return g()},set disabled(w=!1){g(w),y()},get readonly(){return m()},set readonly(w=!1){m(w),y()},get granularity(){return v()},set granularity(w){v(w),y()},get readonlySegments(){return _()},set readonlySegments(w=[]){_(w),y()},get hourCycle(){return k()},set hourCycle(w){k(w),y()},get locale(){return A()},set locale(w){A(w),y()},get hideTimeZone(){return E()},set hideTimeZone(w=!1){E(w),y()},get required(){return T()},set required(w=!1){T(w),y()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),y()},get disableDaysOutsideMonth(){return $()},set disableDaysOutsideMonth(w=!0){$(w),y()},get preventDeselect(){return R()},set preventDeselect(w=!1){R(w),y()},get pagedNavigation(){return U()},set pagedNavigation(w=!1){U(w),y()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),y()},get weekdayFormat(){return le()},set weekdayFormat(w="narrow"){le(w),y()},get isDateDisabled(){return V()},set isDateDisabled(w=()=>!1){V(w),y()},get fixedWeeks(){return ae()},set fixedWeeks(w=!1){ae(w),y()},get numberOfMonths(){return me()},set numberOfMonths(w=1){me(w),y()},get closeOnDateSelect(){return J()},set closeOnDateSelect(w=!0){J(w),y()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),y()},get errorMessageId(){return G()},set errorMessageId(w){G(w),y()},get children(){return Q()},set children(w){Q(w),y()},get monthFormat(){return K()},set monthFormat(w="long"){K(w),y()},get yearFormat(){return H()},set yearFormat(w="numeric"){H(w),y()}},ve=Y(),fe=q(ve);return De(fe,()=>Av,(w,Be)=>{Be(w,{children:(Pe,Je)=>{var Et=Y(),Ke=q(Et);we(Ke,()=>Q()??Me),x(Pe,Et)},$$slots:{default:!0}})}),x(e,ve),ne(z)}ie(qv,{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 wI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),kI=j("<div><!></div>");function Vv(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=je(t,wI);const l=zv.get(),c=Qm.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),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:L(()=>"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:L(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),d=D(()=>He(a,c.props));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);{let A=D(()=>({props:h(d),...c.snippetProps}));we(k,i,()=>h(A))}x(v,_)},m=v=>{var _=kI();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>n()??Me,()=>c.snippetProps),M(_),x(v,_)};return de(f,v=>{i()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(Vv,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var SI=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),Bv=j("<div><div><!></div></div>");function jv(e,t){const r=ht();re(t,!0);let n=b(t,"child",7),i=b(t,"children",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"forceMount",7,!1),l=b(t,"onOpenAutoFocus",7,Se),c=b(t,"onCloseAutoFocus",7,Se),d=b(t,"onEscapeKeydown",7,Se),u=b(t,"onInteractOutside",7,Se),p=b(t,"trapFocus",7,!0),f=b(t,"preventScroll",7,!1),g=b(t,"customAnchor",7,null),m=b(t,"style",7),v=je(t,SI);const _=_I.create({id:L(()=>o()),ref:L(()=>s(),N=>s(N)),onInteractOutside:L(()=>u()),onEscapeKeydown:L(()=>d()),customAnchor:L(()=>g())}),k=D(()=>He(v,_.props)),A=D(()=>p()&&_.shouldTrapFocus);function E(N){_.shouldTrapFocus||N.preventDefault(),l()(N)}var T={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=Ce(r)){o(N),y()},get forceMount(){return a()},set forceMount(N=!1){a(N),y()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Se){l(N),y()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Se){c(N),y()},get onEscapeKeydown(){return d()},set onEscapeKeydown(N=Se){d(N),y()},get onInteractOutside(){return u()},set onInteractOutside(N=Se){u(N),y()},get trapFocus(){return p()},set trapFocus(N=!0){p(N),y()},get preventScroll(){return f()},set preventScroll(N=!1){f(N),y()},get customAnchor(){return g()},set customAnchor(N=null){g(N),y()},get style(){return m()},set style(N){m(N),y()}},O=Y(),$=q(O),R=N=>{$v(N,Sn(()=>h(k),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return h(A)},get preventScroll(){return f()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,ae)=>{let me=()=>ae?.().props,J=()=>ae?.().wrapperProps;const oe=D(()=>He(me(),{style:xv("popover")},{style:m()}));var G=Y(),Q=q(G),K=B=>{var ee=Y(),P=q(ee);{let ue=D(()=>({props:h(oe),wrapperProps:J(),..._.snippetProps}));we(P,n,()=>h(ue))}x(B,ee)},H=B=>{var ee=Bv();Re(ee,()=>({...J()}));var P=F(ee);Re(P,()=>({...h(oe)}));var ue=F(P);we(ue,()=>i()??Me),M(P),M(ee),x(B,ee)};de(Q,B=>{n()?B(K):B(H,-1)}),x(V,G)},$$slots:{popper:!0}}))},U=N=>{Pv(N,Sn(()=>h(k),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return h(A)},get preventScroll(){return f()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,ae)=>{let me=()=>ae?.().props,J=()=>ae?.().wrapperProps;const oe=D(()=>He(me(),{style:xv("popover")},{style:m()}));var G=Y(),Q=q(G),K=B=>{var ee=Y(),P=q(ee);{let ue=D(()=>({props:h(oe),wrapperProps:J(),..._.snippetProps}));we(P,n,()=>h(ue))}x(B,ee)},H=B=>{var ee=Bv();Re(ee,()=>({...J()}));var P=F(ee);Re(P,()=>({...h(oe)}));var ue=F(P);we(ue,()=>i()??Me),M(P),M(ee),x(B,ee)};de(Q,B=>{n()?B(K):B(H,-1)}),x(V,G)},$$slots:{popper:!0}}))};return de($,N=>{a()?N(R):a()||N(U,1)}),x(e,O),ne(T)}ie(jv,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var EI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function Zv(e,t){re(t,!0);let r=b(t,"ref",15,null),n=b(t,"onOpenAutoFocus",7),i=je(t,EI);const s=D(()=>He({onOpenAutoFocus:n()},{onOpenAutoFocus:XO}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return jv(e,Sn(()=>h(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),ne(o)}ie(Zv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var xI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),TI=j("<button><!></button>");function Wv(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"type",7,"button"),l=b(t,"disabled",7,!1),c=b(t,"openOnHover",7,!1),d=b(t,"openDelay",7,700),u=b(t,"closeDelay",7,300),p=je(t,xI);const f=bI.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),disabled:L(()=>!!l()),openOnHover:L(()=>c()),openDelay:L(()=>d()),closeDelay:L(()=>u())}),g=D(()=>He(p,f.props,{type:a()}));var m={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get type(){return a()},set type(v="button"){a(v),y()},get disabled(){return l()},set disabled(v=!1){l(v),y()},get openOnHover(){return c()},set openOnHover(v=!1){c(v),y()},get openDelay(){return d()},set openDelay(v=700){d(v),y()},get closeDelay(){return u()},set closeDelay(v=300){u(v),y()}};return Ov(e,{get id(){return s()},get ref(){return f.opts.ref},children:(v,_)=>{var k=Y(),A=q(k),E=O=>{var $=Y(),R=q($);we(R,i,()=>({props:h(g)})),x(O,$)},T=O=>{var $=TI();Re($,()=>({...h(g)}));var R=F($);we(R,()=>n()??Me),M($),x(O,$)};de(A,O=>{i()?O(E):O(T,-1)}),x(v,k)},$$slots:{default:!0}}),ne(m)}ie(Wv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var AI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Hv(e,t){re(t,!0);let r=b(t,"ref",15,null),n=b(t,"onkeydown",7),i=je(t,AI);function s(l){if(eo(l.key)){const c=l.currentTarget.closest(za.selector("input"));if(!c)return;Qs(l,c)}}const o=D(()=>He({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 Wv(e,Sn(()=>i,{"data-segment":"trigger"},()=>h(o),{get ref(){return r()},set ref(l){r(l)}})),ne(a)}ie(Hv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var $c=j("<!> <!>",1),Gv=j("<!> <!> <!>",1);function Kv(e,t){re(t,!0);let r=b(t,"dateString",15),n=b(t,"labelClass",7),i=b(t,"inputClass",7),s=b(t,"labelText",7),o=te(Fe(Qn(qt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ge(()=>{r(h(o).toString())});var l={get dateString(){return r()},set dateString(u){r(u),y()},get labelClass(){return n()},set labelClass(u){n(u),y()},get inputClass(){return i()},set inputClass(u){i(u),y()},get labelText(){return s()},set labelText(u){s(u),y()}},c=Y(),d=q(c);{let u=D(()=>C.locale||"de");De(d,()=>qv,(p,f)=>{f(p,{get locale(){return h(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Qn(qt()))<0,get value(){return h(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=Gv(),_=q(v);De(_,()=>Rv,(E,T)=>{T(E,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(O,$)=>{var R=Y(),U=q(R),N=le=>{var V=Y(),ae=q(V);we(ae,s),x(le,V)};de(U,le=>{s()&&le(N)}),x(O,R)},$$slots:{default:!0}})});var k=X(_,2);{const E=(T,O)=>{let $=()=>O?.().segments;var R=$c(),U=q(R);qe(U,17,$,Ur,(le,V)=>{let ae=()=>h(V).part,me=()=>h(V).value;var J=Y(),oe=q(J);De(oe,()=>Lv,(G,Q)=>{Q(G,{get part(){return ae()},children:(K,H)=>{Tt();var B=zt();ce(()=>se(B,me())),x(K,B)},$$slots:{default:!0}})}),x(le,J)});var N=X(U,2);De(N,()=>Hv,(le,V)=>{V(le,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),x(T,R)};De(k,()=>Nv,(T,O)=>{O(T,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var A=X(k,2);De(A,()=>Zv,(E,T)=>{T(E,{children:(O,$)=>{var R=Y(),U=q(R);{const N=(le,V)=>{let ae=()=>V?.().months,me=()=>V?.().weekdays;var J=$c(),oe=q(J);De(oe,()=>ac,(Q,K)=>{K(Q,{children:(H,B)=>{var ee=Gv(),P=q(ee);De(P,()=>cc,(ve,fe)=>{fe(ve,{class:"go-datepicker-previous"})});var ue=X(P,2);De(ue,()=>lc,(ve,fe)=>{fe(ve,{class:"go-datepicker-selected-month"})});var z=X(ue,2);De(z,()=>uc,(ve,fe)=>{fe(ve,{class:"go-datepicker-next"})}),x(H,ee)},$$slots:{default:!0}})});var G=X(oe,2);qe(G,16,ae,Q=>Q,(Q,K)=>{var H=Y(),B=q(H);De(B,()=>rc,(ee,P)=>{P(ee,{children:(ue,z)=>{var ve=$c(),fe=q(ve);De(fe,()=>sc,(Be,Pe)=>{Pe(Be,{children:(Je,Et)=>{var Ke=Y(),Xt=q(Ke);De(Xt,()=>ro,(dt,Qt)=>{Qt(dt,{children:(xt,Mt)=>{var er=Y(),jt=q(er);qe(jt,17,me,Ur,(hr,Ir)=>{var Pr=Y(),vn=q(Pr);De(vn,()=>oc,($r,pr)=>{pr($r,{children:(Jr,Xr)=>{Tt();var wt=zt();ce(()=>se(wt,h(Ir))),x(Jr,wt)},$$slots:{default:!0}})}),x(hr,Pr)}),x(xt,er)},$$slots:{default:!0}})}),x(Je,Ke)},$$slots:{default:!0}})});var w=X(fe,2);De(w,()=>nc,(Be,Pe)=>{Pe(Be,{children:(Je,Et)=>{var Ke=Y(),Xt=q(Ke);qe(Xt,16,()=>K.weeks,dt=>dt,(dt,Qt)=>{var xt=Y(),Mt=q(xt);De(Mt,()=>ro,(er,jt)=>{jt(er,{children:(hr,Ir)=>{var Pr=Y(),vn=q(Pr);qe(vn,16,()=>Qt,$r=>$r,($r,pr,Jr,Xr)=>{var wt=Y(),Un=q(wt);De(Un,()=>ic,(ns,is)=>{is(ns,{get date(){return pr},get month(){return K.value},children:(uo,Jc)=>{var vi=Y(),ss=q(vi);De(ss,()=>tc,(mr,qn)=>{qn(mr,{})}),x(uo,vi)},$$slots:{default:!0}})}),x($r,wt)}),x(hr,Pr)},$$slots:{default:!0}})}),x(dt,xt)}),x(Je,Ke)},$$slots:{default:!0}})}),x(ue,ve)},$$slots:{default:!0}})}),x(Q,H)}),x(le,J)};De(U,()=>Vv,(le,V)=>{V(le,{children:N,$$slots:{default:!0}})})}x(O,R)},$$slots:{default:!0}})}),x(g,v)},$$slots:{default:!0}})})}return x(e,c),ne(l)}ie(Kv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var OI=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),CI=j('<span class="go-field-star" aria-hidden="true">*</span>'),DI=j(" <!>",1),II=j("<label><!></label> <input/>",1),PI=j("<label><!></label> <textarea></textarea>",1),$I=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),MI=j("<label><!></label> <input/> <!>",1),FI=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),NI=j('<img src="" alt=""/> <option> </option>',1),RI=j('<option disabled="" hidden="" selected=""> </option> <!>',1),LI=j("<!>",1),zI=j("<label><!></label> <select><!></select>",1),UI=j('<img style="width: 60px" aria-hidden="true"/>'),qI=j('<span class="go-payment-mode-icons"></span>'),VI=j('<label><input type="radio"/> <!></label>'),BI=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),jI=j("<label> <input/></label>"),ZI=j("<fieldset><legend><!></legend> <!></fieldset>");function Yv(e,t){re(t,!0);const r=J=>{Tt();var oe=DI(),G=q(oe),Q=X(G),K=H=>{var B=CI();x(H,B)};de(Q,H=>{u().required&&H(K)}),ce(()=>se(G,`${h(R)??""} `)),x(J,oe)},n=J=>{var oe=II(),G=q(oe);r(F(G)),M(G);var Q=X(G,2);Re(Q,()=>({...h($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),zo(Q,()=>u().value,K=>u(u().value=K,!0)),x(J,oe)},i=J=>{var oe=PI(),G=q(oe);r(F(G)),M(G);var Q=X(G,2);Fb(Q),Re(Q,()=>({...h($),...v,class:g(),placeholder:u().placeholder,name:u().key})),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),zo(Q,()=>u().value,K=>u(u().value=K,!0)),x(J,oe)},s=J=>{var oe=MI(),G=q(oe);r(F(G)),M(G);var Q=X(G,2),K=ee=>{const P=ee.currentTarget.files;u(u().value=P&&P[0]?P[0]:null,!0),h(k)?h(k).validateField(u()):u().validate()};Re(Q,()=>({...h($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:K}),void 0,void 0,void 0,void 0,!0);var H=X(Q,2),B=ee=>{var P=$I(),ue=F(P),z=X(ue,2),ve=F(z,!0);M(z),M(P),ce(fe=>{pe(P,"data-field-preview",u().key),pe(ue,"src",h(N)),pe(ue,"alt",fe),se(ve,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),x(ee,P)};de(H,ee=>{h(N)&&u().value instanceof File&&ee(B)}),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),x(J,oe)},o=J=>{var oe=FI(),G=F(oe);Re(G,()=>({...h($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var Q=X(G,2);r(F(Q)),M(Q),M(oe),ce(()=>{Ot(oe,1,wr(f())),pe(oe,"for",h(T))}),O_(G,()=>u().value===!0,K=>{u(u().value=K,!0)}),x(J,oe)},a=J=>{var oe=zI(),G=q(oe);r(F(G)),M(G);var Q=X(G,2);Re(Q,()=>({...h($),...v,name:u().key,class:g()})),T_(Q,()=>{var K=F(Q),H=LI(),B=q(H),ee=P=>{var ue=RI(),z=q(ue),ve=F(z,!0);M(z),z.value=z.__value="";var fe=X(z,2);qe(fe,17,()=>u().options(),w=>w.value,(w,Be)=>{var Pe=NI(),Je=X(q(Pe),2),Et=F(Je,!0);M(Je);var Ke={};ce(()=>{se(Et,h(Be).label),Ke!==(Ke=h(Be).value)&&(Je.value=(Je.__value=h(Be).value)??"")}),x(w,Pe)}),ce(w=>se(ve,w),[()=>C.t("common.choose")]),x(P,ue)};de(B,P=>{u().options&&P(ee)}),x(K,H)}),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),g_(Q,()=>u().value,K=>u(u().value=K,!0)),x(J,oe)},l=J=>{Kv(J,{get labelClass(){return f()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(oe){u(u().value=oe,!0)}})},c=J=>{const oe=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var G=BI(),Q=F(G);r(F(Q)),M(Q);var K=X(Q,2);qe(K,17,()=>h(oe),H=>H.id,(H,B)=>{var ee=VI(),P=F(ee);Is(P);var ue=X(P,2),z=ve=>{var fe=qI();qe(fe,20,()=>h(B).icons,w=>w,(w,Be)=>{const Pe=D(()=>U+Be+".svg");var Je=UI();ce(()=>{Ot(Je,1,wr(Be)),pe(Je,"src",h(Pe)),pe(Je,"alt",Be+" icon")}),x(w,Je)}),M(fe),x(ve,fe)};de(ue,ve=>{h(B).icons.length>0&&ve(z)}),M(ee),ce((ve,fe,w)=>{pe(P,"name",u().key),Rl(P,ve),k_(P,fe),pe(P,"hidden",h(oe).length===1),pe(P,"aria-label",w)},[()=>String(h(B).id),()=>h(oe).length===1||String(h(B).id)===String(u().value),()=>C.t(`cart.paymentMode.ariaLabel.${h(B).name.toLowerCase()}`)]),at("change",P,()=>{u(u().value=String(h(B).id),!0)}),x(H,ee)}),M(G),ce(()=>{pe(G,"aria-required",u().required),pe(G,"aria-invalid",u().errors.length>0)}),x(J,G)},d=J=>{var oe=ZI(),G=F(oe);r(F(G)),M(G);var Q=X(G,2),K=H=>{var B=Y(),ee=q(B);qe(ee,17,()=>u().options,Ur,(P,ue)=>{var z=jI(),ve=F(z),fe=X(ve);Re(fe,()=>({...h($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),M(z),ce(()=>{Ot(z,1,wr(f())),pe(z,"for",h(T)+h(ue)),se(ve,`${h(ue)??""} `)}),zo(fe,()=>u().value,w=>u(u().value=w,!0)),x(P,z)}),x(H,B)};de(Q,H=>{u().options&&H(K)}),M(oe),x(J,oe)};let u=b(t,"field",15),p=b(t,"describedByIds",7),f=b(t,"labelClass",7),g=b(t,"inputClass",7),m=b(t,"host",7),v=je(t,OI);const _=Ri(m()),k=D(()=>_.value),A={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:o,select:a,radio:d,date:l,file:s,textarea:i,paymentMode:c},E=D(()=>A[u().type]);let T=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(h(k)?h(k).validateField(u()):u().validate())}const $=D(()=>({id:h(T),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let R=D(()=>C.t(u().label)||u().label);const U="https://cdn.shop.platform.gomus.de/";let N=te(null);ge(()=>{const J=u().value;if(J instanceof File&&J.type.startsWith("image/")){const oe=URL.createObjectURL(J);return I(N,oe,!0),()=>{URL.revokeObjectURL(oe),I(N,null)}}I(N,null)});var le={get field(){return u()},set field(J){u(J),y()},get describedByIds(){return p()},set describedByIds(J){p(J),y()},get labelClass(){return f()},set labelClass(J){f(J),y()},get inputClass(){return g()},set inputClass(J){g(J),y()},get host(){return m()},set host(J){m(J),y()}},V=Y(),ae=q(V),me=J=>{var oe=Y(),G=q(oe);we(G,()=>h(E)),x(J,oe)};return de(ae,J=>{h(E)&&J(me)}),x(e,V),ne(le)}br(["change"]),ie(Yv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var WI=j("<span> </span>"),HI=j("<li> </li>"),GI=j('<ul class="go-field-errors"></ul>'),KI=j("<!> <!> <!>",1);function YI(e,t){re(t,!0);let r=b(t,"key",7),n=b(t,"required",7,!1),i=b(t,"labelClass",7),s=b(t,"inputClass",7),o=te(Fe(cr.createField(r(),n())));const a=Ri(t.$$host),l=D(()=>a.value),c=()=>h(o);let d=D(()=>h(o)?[...h(o).errors,...h(o).apiErrors].map($=>C.t($)):[]),u=D(()=>h(o)?.description),p=D(()=>h(d).length>0),f=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),m=D(()=>[h(u)&&h(f),h(p)&&h(g)].filter(Boolean).join(" ")||void 0);ge(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",h(d).length>0)}),t.$$host.dataset.testid=r(),ge(()=>{h(o)&&(h(o).mounted=!0,h(o).value,Ne(()=>{h(o)?.errors.length&&h(l).validateField(h(o))}))});var v={getField:c,get key(){return r()},set key($){r($),y()},get required(){return n()},set required($=!1){n($),y()},get labelClass(){return i()},set labelClass($){i($),y()},get inputClass(){return s()},set inputClass($){s($),y()}},_=KI(),k=q(_);Yv(k,{get describedByIds(){return h(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return h(o)},set field($){I(o,$,!0)}});var A=X(k,2),E=$=>{var R=WI(),U=F(R,!0);M(R),ce(()=>{pe(R,"id",h(f)),se(U,h(o).description)}),x($,R)};de(A,$=>{h(u)&&$(E)});var T=X(A,2),O=$=>{var R=GI();qe(R,21,()=>h(d),Ur,(U,N)=>{var le=HI(),V=F(le,!0);M(le),ce(()=>se(V,h(N))),x(U,le)}),M(R),ce(()=>pe(R,"id",h(g))),x($,R)};return de(T,$=>{h(p)&&$(O)}),x(e,_),ne(v)}customElements.define("go-field",ie(YI,{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 JI=j("<go-field></go-field>",2);function XI(e,t){re(t,!0);let r=Ri(t.$$host),n=D(()=>r.value),i=D(()=>h(n)?cr.getFormFields(h(n)?.formId):[]);var s=Y(),o=q(s);qe(o,17,()=>h(i),a=>a.key,(a,l)=>{var c=JI();ce(()=>Kn(c,"key",h(l).key)),ce(()=>Kn(c,"required",h(l).required)),x(a,c)}),x(e,s),ne()}customElements.define("go-all-fields",ie(XI,{},[],[]));var QI=j('<p aria-hidden="true"> </p>'),eP=j("<li> </li>"),tP=j('<ul class="go-error-feedback-api-errors"></ul>'),rP=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function nP(e,t){re(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);ge(()=>{h(n)?.form?.addEventListener("go-after-validation",()=>{I(o,$u(h(n)?.fields),!0)})});let i=te(0);setInterval(()=>{I(i,$u(h(n)?.fields)||0,!0)},100);let s=D(()=>h(i)+(h(n)?.apiErrors?.length||0)),o=te(-1);ge(()=>{t.$$host.classList.toggle("is-invalid",h(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",h(s).toString())});var a=rP(),l=F(a),c=F(l),d=v=>{var _=zt();ce(k=>se(_,k),[()=>C.t("forms.errorSummary",{count:h(o)})]),x(v,_)};de(c,v=>{h(o)>0&&v(d)}),M(l);var u=X(l,2),p=v=>{var _=QI(),k=F(_,!0);M(_),ce(A=>se(k,A),[()=>C.t("forms.errorSummary",{count:h(i)})]),x(v,_)};de(u,v=>{h(i)>0&&v(p)});var f=X(u,2),g=v=>{var _=tP();qe(_,21,()=>h(n)?.apiErrors,Ur,(k,A)=>{var E=eP(),T=F(E,!0);M(E),ce(()=>se(T,h(A))),x(k,E)}),M(_),x(v,_)},m=D(()=>h(n)&&Yl(h(n).apiErrors)&&h(n).apiErrors.length>0);de(f,v=>{h(m)&&v(g)}),M(a),x(e,a),ne()}customElements.define("go-errors-feedback",ie(nP,{},[],[]));var iP=j('<div class="go-form-feedback"><!></div>');function sP(e,t){var r=iP(),n=F(r);f_(n,t,"default",{},null),M(r),x(e,r)}customElements.define("go-form-feedback",ie(sP,{},["default"],[]));function oP(e,t){re(t,!0);let r=b(t,"buttonClass",7,"");return rn(()=>{Mn(t.$$host,"button",{type:"submit",class:r()})}),ne({get buttonClass(){return r()},set buttonClass(n=""){r(n),y()}})}customElements.define("go-submit",ie(oP,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var aP=j('<div aria-live="assertive"> </div>');function lP(e,t){re(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=aP();let c;var d=F(l,!0);M(l),ce(()=>{c=Ot(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":h(n).successMessage}),se(d,h(n)?.successMessage)}),x(a,l)};de(s,a=>{h(n)?.successMessage&&a(o)}),x(e,i),ne()}customElements.define("go-success-feedback",ie(lP,{},[],[]));var dr="INUMBER",Wi="IOP1",Hi="IOP2",Gi="IOP3",cn="IVAR",di="IVARNAME",Ki="IFUNCALL",Ua="IFUNDEF",Bt="IEXPR",Mc="IEXPREVAL",fi="IMEMBER",qa="IENDSTATEMENT",Yi="IARRAY";function Ie(e,t){this.type=e,this.value=t??0}Ie.prototype.toString=function(){switch(this.type){case dr:case Wi:case Hi:case Gi:case cn:case di:case qa:return this.value;case Ki:return"CALL "+this.value;case Ua:return"DEF "+this.value;case Yi:return"ARRAY "+this.value;case fi:return"."+this.value;default:return"Invalid Instruction"}};function Va(e){return new Ie(Wi,e)}function dn(e){return new Ie(Hi,e)}function Jv(e){return new Ie(Gi,e)}function Fc(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var p=e[u],f=p.type;if(f===dr||f===di)Array.isArray(p.value)?s.push.apply(s,Fc(p.value.map(function(g){return new Ie(dr,g)}).concat(new Ie(Yi,p.value.length)),t,r,n,i)):s.push(p);else if(f===cn&&i.hasOwnProperty(p.value))p=new Ie(dr,i[p.value]),s.push(p);else if(f===Hi&&s.length>1)l=s.pop(),a=s.pop(),d=r[p.value],p=new Ie(dr,d(a.value,l.value)),s.push(p);else if(f===Gi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),p.value==="?"?s.push(a.value?l.value:c.value):(d=n[p.value],p=new Ie(dr,d(a.value,l.value,c.value)),s.push(p));else if(f===Wi&&s.length>0)a=s.pop(),d=t[p.value],p=new Ie(dr,d(a.value)),s.push(p);else if(f===Bt){for(;s.length>0;)o.push(s.shift());o.push(new Ie(Bt,Fc(p.value,t,r,n,i)))}else if(f===fi&&s.length>0)a=s.pop(),s.push(new Ie(dr,a.value[p.value]));else{for(;s.length>0;)o.push(s.shift());o.push(p)}}for(;s.length>0;)o.push(s.shift());return o}function Xv(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],o=s.type;if(o===cn&&s.value===t)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===Wi?c=Va(l.value):l.type===Hi?c=dn(l.value):l.type===Gi?c=Jv(l.value):c=new Ie(l.type,l.value),n.push(c)}else o===Bt?n.push(new Ie(Bt,Xv(s.value,t,r))):n.push(s)}return n}function hi(e,t,r){var n=[],i,s,o,a,l,c;if(Nc(e))return fn(e,r);for(var d=e.length,u=0;u<d;u++){var p=e[u],f=p.type;if(f===dr||f===di)n.push(p.value);else if(f===Hi)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!hi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!hi(s,t,r)):p.value==="="?(a=t.binaryOps[p.value],n.push(a(i,hi(s,t,r),r))):(a=t.binaryOps[p.value],n.push(a(fn(i,r),fn(s,r))));else if(f===Gi)o=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(hi(i?s:o,t,r)):(a=t.ternaryOps[p.value],n.push(a(fn(i,r),fn(s,r),fn(o,r))));else if(f===cn)if(p.value in t.functions)n.push(t.functions[p.value]);else if(p.value in t.unaryOps&&t.parser.isOperatorEnabled(p.value))n.push(t.unaryOps[p.value]);else{var g=r[p.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+p.value)}else if(f===Wi)i=n.pop(),a=t.unaryOps[p.value],n.push(a(fn(i,r)));else if(f===Ki){for(c=p.value,l=[];c-- >0;)l.unshift(fn(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(f===Ua)n.push((function(){for(var m=n.pop(),v=[],_=p.value;_-- >0;)v.unshift(n.pop());var k=n.pop(),A=function(){for(var E=Object.assign({},r),T=0,O=v.length;T<O;T++)E[v[T]]=arguments[T];return hi(m,t,E)};return Object.defineProperty(A,"name",{value:k,writable:!1}),r[k]=A,A})());else if(f===Bt)n.push(uP(p,t));else if(f===Mc)n.push(p);else if(f===fi)i=n.pop(),n.push(i[p.value]);else if(f===qa)n.pop();else if(f===Yi){for(c=p.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:fn(n[0],r)}function uP(e,t,r){return Nc(e)?e:{type:Mc,value:function(n){return hi(e.value,t,n)}}}function Nc(e){return e&&e.type===Mc}function fn(e,t){return Nc(e)?e.value(t):e}function Rc(e,t){for(var r=[],n,i,s,o,a,l,c=0;c<e.length;c++){var d=e[c],u=d.type;if(u===dr)typeof d.value=="number"&&d.value<0?r.push("("+d.value+")"):Array.isArray(d.value)?r.push("["+d.value.map(Qv).join(", ")+"]"):r.push(Qv(d.value));else if(u===Hi)i=r.pop(),n=r.pop(),o=d.value,t?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(u===Gi)if(s=r.pop(),i=r.pop(),n=r.pop(),o=d.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===cn||u===di)r.push(d.value);else if(u===Wi)n=r.pop(),o=d.value,o==="-"||o==="+"?r.push("("+o+n+")"):t?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(u===Ki){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(u===Ua){for(i=r.pop(),l=d.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(u===fi)n=r.pop(),r.push(n+"."+d.value);else if(u===Yi){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(u===Bt)r.push("("+Rc(d.value,t)+")");else if(u!==qa)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Qv(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function Ji(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Lc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var o=e[s];o.type===cn||o.type===di?!n&&!Ji(t,o.value)?t.push(o.value):(i!==null&&(Ji(t,i)||t.push(i)),i=o.value):o.type===fi&&n&&i!==null?i+="."+o.value:o.type===Bt?Lc(o.value,t,r):i!==null&&(Ji(t,i)||t.push(i),i=null)}i!==null&&!Ji(t,i)&&t.push(i)}function Dr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Dr.prototype.simplify=function(e){return e=e||{},new Dr(Fc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Dr.prototype.substitute=function(e,t){return t instanceof Dr||(t=this.parser.parse(String(t))),new Dr(Xv(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},hi(this.tokens,this,e)},Dr.prototype.toString=function(){return Rc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Lc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Lc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Dr.prototype.toJSFunction=function(e,t){var r=this,n=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+Rc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var so="TEOF",Ze="TOP",Ba="TNUMBER",eg="TSTRING",hn="TPAREN",Xi="TBRACKET",ja="TCOMMA",zc="TNAME",Uc="TSEMICOLON";function tg(e,t,r){this.type=e,this.value=t,this.index=r}tg.prototype.toString=function(){return this.type+": "+this.value};function rt(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}rt.prototype.newToken=function(e,t,r){return new tg(e,t,r??this.pos)},rt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},rt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},rt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(so,"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)+'"')},rt.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,t+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(t+1,n);this.current=this.newToken(eg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},rt.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(hn,e),this.pos++,!0):!1},rt.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(Xi,e),this.pos++,!0):!1},rt.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(ja,","),this.pos++,!0):!1},rt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Uc,";"),this.pos++,!0):!1},rt.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(n in this.consts)return this.current=this.newToken(Ba,this.consts[n]),this.pos+=n.length,!0}return!1},rt.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ze,n),this.pos+=n.length,!0}return!1},rt.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(t===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(e,t);return this.current=this.newToken(zc,i),this.pos+=i.length,!0}return!1},rt.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
|
|
80
|
-
`||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var
|
|
81
|
-
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);
|
|
82
|
-
`,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},rt.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ge(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ge.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ge.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?Ji(t,e.value):typeof t=="function"?t(e):e.value===t},Ge.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ge.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ge.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ge.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},Ge.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(zc)||this.accept(Ze,r))e.push(new Ie(cn,this.current.value));else if(this.accept(Ba))e.push(new Ie(dr,this.current.value));else if(this.accept(eg))e.push(new Ie(dr,this.current.value));else if(this.accept(hn,"("))this.parseExpression(e),this.expect(hn,")");else if(this.accept(Xi,"["))if(this.accept(Xi,"]"))e.push(new Ie(Yi,0));else{var n=this.parseArrayList(e);e.push(new Ie(Yi,n))}else throw new Error("unexpected "+this.nextToken)},Ge.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ge.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ge.prototype.parseUntilEndStatement=function(e,t){return this.accept(Uc)?(this.nextToken&&this.nextToken.type!==so&&!(this.nextToken.type===hn&&this.nextToken.value===")")&&t.push(new Ie(qa)),this.nextToken.type!==so&&this.parseExpression(t),e.push(new Ie(Bt,t)),!0):!1},Ge.prototype.parseArrayList=function(e){for(var t=0;!this.accept(Xi,"]");)for(this.parseExpression(e),++t;this.accept(ja);)this.parseExpression(e),++t;return t},Ge.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ze,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Ki){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var o=n-i;e[o].type===cn&&(e[o]=new Ie(di,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new Ie(Bt,r)),e.push(new Ie(Ua,t.value));continue}if(t.type!==cn&&t.type!==fi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ie(di,t.value)),e.push(new Ie(Bt,r)),e.push(dn("="))}},Ge.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ze,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ze,":"),this.parseConditionalExpression(r),e.push(new Ie(Bt,t)),e.push(new Ie(Bt,r)),e.push(Jv("?"))}},Ge.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ze,"or");){var t=[];this.parseAndExpression(t),e.push(new Ie(Bt,t)),e.push(dn("or"))}},Ge.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ze,"and");){var t=[];this.parseComparison(t),e.push(new Ie(Bt,t)),e.push(dn("and"))}};var dP=["==","!=","<","<=",">=",">","in"];Ge.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,dP);){var t=this.current;this.parseAddSub(e),e.push(dn(t.value))}};var fP=["+","-","||"];Ge.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,fP);){var t=this.current;this.parseTerm(e),e.push(dn(t.value))}};var hP=["*","/","%"];Ge.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,hP);){var t=this.current;this.parseFactor(e),e.push(dn(t.value))}},Ge.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ze,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===hn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Uc||this.nextToken.type===ja||this.nextToken.type===so||this.nextToken.type===hn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Va(n.value))}else this.parseExponential(e)},Ge.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(dn("^"))},Ge.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Va("!"))},Ge.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ze,r)){var n=this.current;this.parseAtom(e),e.push(Va(n.value))}else for(this.parseMemberExpression(e);this.accept(hn,"(");)if(this.accept(hn,")"))e.push(new Ie(Ki,0));else{var i=this.parseArgumentList(e);e.push(new Ie(Ki,i))}},Ge.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(hn,")");)for(this.parseExpression(e),++t;this.accept(ja);)this.parseExpression(e),++t;return t},Ge.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ze,".")||this.accept(Xi,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(zc),e.push(new Ie(fi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(Xi,"]"),e.push(dn("["))}else throw new Error("unexpected symbol: "+t.value)}};function pP(e,t){return Number(e)+Number(t)}function mP(e,t){return e-t}function vP(e,t){return e*t}function gP(e,t){return e/t}function yP(e,t){return e%t}function bP(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function _P(e,t){return e===t}function wP(e,t){return e!==t}function kP(e,t){return e>t}function SP(e,t){return e<t}function EP(e,t){return e>=t}function xP(e,t){return e<=t}function TP(e,t){return!!(e&&t)}function AP(e,t){return!!(e||t)}function OP(e,t){return Ji(t,e)}function CP(e){return(Math.exp(e)-Math.exp(-e))/2}function DP(e){return(Math.exp(e)+Math.exp(-e))/2}function IP(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function PP(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function $P(e){return Math.log(e+Math.sqrt(e*e-1))}function MP(e){return Math.log((1+e)/(1-e))/2}function rg(e){return Math.log(e)*Math.LOG10E}function FP(e){return-e}function NP(e){return!e}function RP(e){return e<0?Math.ceil(e):Math.floor(e)}function LP(e){return Math.random()*(e||1)}function ng(e){return Vc(e+1)}function zP(e){return isFinite(e)&&e===Math.round(e)}var UP=4.7421875,qc=[.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 Vc(e){var t,r;if(zP(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Vc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,o=s*e,a=o*e,l=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=qc[0];for(var c=1;c<qc.length;++c)r+=qc[c]/(e+c);return t=e+UP+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function qP(e){return Array.isArray(e)?e.length:String(e).length}function ig(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function sg(e,t,r){return e?t:r}function VP(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function BP(e,t,r){return r&&(r[e]=t),t}function jP(e,t){return e[t|0]}function ZP(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function WP(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function HP(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function GP(e,t,r){if(typeof e!="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 e(n,i,s)},t)}function KP(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function YP(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function JP(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function XP(e){return(e>0)-(e<0)||+e}var og=1/3;function QP(e){return e<0?-Math.pow(-e,og):Math.pow(e,og)}function e$(e){return Math.exp(e)-1}function t$(e){return Math.log(1+e)}function r$(e){return Math.log(e)/Math.LN2}function pi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||CP,cosh:Math.cosh||DP,tanh:Math.tanh||IP,asinh:Math.asinh||PP,acosh:Math.acosh||$P,atanh:Math.atanh||MP,sqrt:Math.sqrt,cbrt:Math.cbrt||QP,log:Math.log,log2:Math.log2||r$,ln:Math.log,lg:Math.log10||rg,log10:Math.log10||rg,expm1:Math.expm1||e$,log1p:Math.log1p||t$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||RP,"-":FP,"+":Number,exp:Math.exp,not:NP,length:qP,"!":ng,sign:Math.sign||XP},this.binaryOps={"+":pP,"-":mP,"*":vP,"/":gP,"%":yP,"^":Math.pow,"||":bP,"==":_P,"!=":wP,">":kP,"<":SP,">=":EP,"<=":xP,and:TP,or:AP,in:OP,"=":BP,"[":jP},this.ternaryOps={"?":sg},this.functions={random:LP,fac:ng,min:WP,max:ZP,hypot:Math.hypot||ig,pyt:Math.hypot||ig,pow:Math.pow,atan2:Math.atan2,if:sg,gamma:Vc,roundTo:VP,map:HP,fold:GP,filter:KP,indexOf:YP,join:JP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new Ge(this,new rt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(so,"EOF"),new Dr(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var ag=new pi;pi.parse=function(e){return ag.parse(e)},pi.evaluate=function(e,t){return ag.parse(e).evaluate(t)};var lg={"+":"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 n$(e){return lg.hasOwnProperty(e)?lg[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=n$(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var i$=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,s$=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,o$=/(__optional\("[^"]+"\))\.length\b/g,a$=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),ug=new Map;function l$(e){return e.replace(i$,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(s$,(t,r)=>`__length(${r})`).replace(o$,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function u$(e){const t=ug.get(e);if(t)return t;const r=a$.parse(l$(e));return ug.set(e,r),r}function c$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,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=u$(e);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 (${e}) in go-if: ${n.message}`)}}var cg=["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","coupon"],d$=7200*1e3;async function pn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await C.asyncFetch(()=>C.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const o=i.get(s.id);o&&(s.content=o)}}catch{}}function Za(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Wa(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===t&&o>=n&&o<=n+d$&&(i.seats?.available??0)>0})}async function Ha(e){if(!e?.selectedDate)return;const{quotas:t}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Za(e,t)}var f$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Za(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=In(Pn(r,t.selectedTime),t.selectedTime);await pn(e,i);for(const s of i)e.preCart.addItem(pt(s,{time:t.selectedTime}))}},h$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=In(Pn(r,s),s);await pn(e,o);for(const a of o)e.preCart.addItem(pt(a,{time:s}))}},p$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await C.asyncFetch(()=>C.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds})),n=Object.values(r).map(i=>oa(i));await pn(e,n);for(const i of n)e.preCart.addItem(pt(i))}},m$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await C.asyncFetch(()=>C.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Za(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=In(Pn(n,t.selectedTime),t.selectedTime);await pn(e,s);for(const o of s)e.preCart.addItem(pt(o,{time:t.selectedTime}))}},v$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=In(Pn(n,o),o);await pn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:o}))}},g$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await C.asyncFetch(()=>C.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Za(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=In(Pn(n,t.selectedTime),t.selectedTime);await pn(e,s);for(const o of s)e.preCart.addItem(pt(o,{time:t.selectedTime}))}},y$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await C.asyncFetch(()=>C.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=Du(n,r.id,{event_title:r.event_title});e.preCart.addItem(pt(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},b$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ha(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Wa(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=In(Pn(s,n.start_time),n.start_time);await pn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:n.start_time}))}}},_$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ha(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Wa(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Object.values(o)[0],l=a?Object.keys(a.capacities)[0]:n.start_time,c=In(Pn(s,l),l);await pn(e,c);for(const d of c)e.preCart.addItem(pt(d,{time:l}))}}},w$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ha(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Wa(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=In(Pn(s,n.start_time),n.start_time);await pn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:n.start_time}))}}},k$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ha(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Wa(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(o=>o.title?.includes(n)):i.prices;for(const o of s){const a=Du(o,i.id,{event_title:i.event_title});e.preCart.addItem(pt(a,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},S$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await C.asyncFetch(()=>C.getCoupons());for(const r of t??[])e.preCart.addItem(pt(dp(r)))}},E$={"ticket:timeslot":f$,"ticket:day":h$,"ticket:annual":p$,"event:admission":m$,"event:admission:day":v$,"event:admission:timeslot":g$,"event:price":y$,"events:admission":b$,"events:admission:day":_$,"events:admission:timeslot":w$,"events:price":k$,coupon:S$};function mi(e){const t=E$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${cg.join(", ")}`),t}var dg=cg,x$=0,T$=class{uid=x$++;#e=te();get filters(){return h(this.#e)}set filters(e){I(this.#e,e,!0)}#t=te();get eventIds(){return h(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=te();get museumIds(){return h(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=te();get exhibitionIds(){return h(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=te();get ticketIds(){return h(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=te();get ticketGroupIds(){return h(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=te();get selectedDate(){return h(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=te();get selectedTimeslot(){return h(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return h(this.#l)}set selectedTime(e){I(this.#l,e)}#u=te(Fe([]));get ticketSegments(){return h(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return h(this.#c)}set preCarts(e){I(this.#c,e)}#d=te();get timeslotDetails(){return h(this.#d)}set timeslotDetails(e){I(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>mi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>mi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>mi(e).isTicketsVisible(this))}},fg="go-ticket-selection",A$=Fi(fg),mn=Ni(fg);function O$(e,t){re(t,!0);let r=b(t,"when",7),n=b(t,"then",7,"show");const i=mn(t.$$host),s=D(()=>i.value),o=JE(t.$$host),a=D(()=>o.value),l=Ri(t.$$host),c=D(()=>l.value),d=Li(t.$$host),u=D(()=>d.value);let p=D(()=>({ticketSelection:h(s),personalizationDetails:h(a),formData:h(c)?.formData,cart:C.cart,cartView:h(u)}));const f=k=>{I(p,k)},g=()=>h(p);let m=D(()=>c$(r(),h(p))),v=null;ge(()=>{const k=t.$$host;if(h(m)&&n()==="show")v&&(k.appendChild(v),v=null);else if(!v&&k.childNodes.length>0)for(v=document.createDocumentFragment();k.firstChild;)v.appendChild(k.firstChild)});var _={_setData:f,_getData:g,get when(){return r()},set when(k){r(k),y()},get then(){return n()},set then(k="show"){n(k),y()}};return ne(_)}customElements.define("go-if",ie(O$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function hg(e,t){re(t,!0);let r=b(t,"apiUrl",7),n=b(t,"shopDomain",7),i=b(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ge(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ne({get apiUrl(){return r()},set apiUrl(s){r(s),y()},get shopDomain(){return n()},set shopDomain(s){n(s),y()},get locale(){return i()},set locale(s){i(s),y()}})}customElements.define("gomus-init",ie(hg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function C$(e,t){re(t,!0);let r=b(t,"apiDomain",7),n=b(t,"shopDomain",7),i=b(t,"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 hg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ne(o)}customElements.define("go-init",ie(C$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function D$(e,t){re(t,!0);const r=b(t,"to",7),n=D(()=>We.config.urls[r()]),i=Mn(t.$$host,"a");return ge(()=>{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",s=>{if(s.preventDefault(),!We.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}We.config.navigateTo(We.config.urls[r()]())}),ne({get to(){return r()},set to(s){r(s),y()}})}customElements.define("go-link",ie(D$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var I$=class{#e=te();get token(){return h(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return ul(C.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${C.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?We.config.urls.annualTicketPersonalizationList?.()?We.config.urls.annualTicketPersonalizationList(this.token):C.urls?.annualTicketPersonalizationList(this.token):`${C.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},pg="go-order-details",P$=Fi(pg),mg=Ni(pg);function $$(e,t){re(t,!0);let r=b(t,"token",7);const n=new I$(r());P$(t.$$host,n),rn(()=>{C.cart.clearItems(),C.auth.isGuest()&&C.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return ne(i)}customElements.define("go-order",ie($$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var M$=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),F$=j('<br/> <span class="go-order-item-quantities"> </span>',1),N$=j('<a aria-label="iCal link"> </a>'),R$=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 vg(e,t){re(t,!0);let r=b(t,"item",7),n=b(t,"orderDetails",7);var i={get item(){return r()},set item(T){r(T),y()},get orderDetails(){return n()},set orderDetails(T){n(T),y()}},s=R$(),o=F(s),a=F(o),l=X(F(a),2),c=F(l),d=F(c,!0);M(c);var u=X(c,2),p=T=>{var O=M$(),$=q(O),R=F($,!0);M($);var U=X($,2),N=F(U,!0);M(U),ce((le,V)=>{se(R,le),se(N,V)},[()=>Vs(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>qs(r().attributes.start_time)]),x(T,O)};de(u,T=>{r().attributes.start_time&&T(p)});var f=X(u,2);qe(f,17,()=>r().attributes.quantities,T=>T.id,(T,O)=>{var $=F$(),R=X(q($),2),U=F(R);M(R),ce(()=>se(U,`${h(O).quantity??""} x ${h(O).title??""}`)),x(T,$)});var g=X(f,2),m=F(g,!0);M(g),M(l);var v=X(l,2),_=F(v,!0);M(v);var k=X(v,4),A=F(k),E=T=>{var O=N$(),$=F(O,!0);M(O),ce(R=>{pe(O,"href",C.apiUrl+r().attributes.ical_url),se($,R)},[()=>C.t("common.calendar")]),x(T,O)};return de(A,T=>{r().attributes.ical_url&&T(E)}),M(k),M(a),M(o),M(s),ce((T,O,$)=>{se(d,r().attributes.title),pe(g,"href",T),se(m,O),se(_,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>sa(r().price_cents)]),x(e,s),ne(i)}ie(vg,{item:{},orderDetails:{}},[],[],{mode:"open"});var L$=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),z$=j('<span class="go-cart-item-date"> </span>'),U$=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),q$=j('<br/> <a class="go-ticket-personalization"> </a>',1),V$=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),B$=j('<a aria-label="iCal link"> </a>'),j$=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>'),Z$=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),W$=j('<a class="go-ticket-personalization"> </a>'),H$=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 gg(e,t){re(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${C.locale}.svg`;let n=b(t,"item",7),i=b(t,"orderDetails",7);var s={get item(){return n()},set item(d){n(d),y()},get orderDetails(){return i()},set orderDetails(d){i(d),y()}},o=Y(),a=q(o),l=d=>{var u=Y(),p=q(u);qe(p,17,()=>({length:n().attributes.quantity}),Ur,(f,g,m)=>{var v=j$(),_=F(v),k=F(_),A=F(k);A.textContent="1";var E=X(A,2),T=F(E),O=F(T,!0);M(T);var $=X(T,2),R=Q=>{const K=D(()=>n().attributes.barcodes[m]?.id);var H=U$(),B=q(H),ee=ve=>{var fe=L$(),w=q(fe),Be=F(w,!0);M(w);var Pe=X(w,2),Je=F(Pe,!0);M(Pe),ce((Et,Ke)=>{se(Be,Et),se(Je,Ke)},[()=>Vs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>qs(n().attributes.start_time)]),x(ve,fe)},P=ve=>{var fe=z$(),w=F(fe,!0);M(fe),ce(Be=>se(w,Be),[()=>Vs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),x(ve,fe)};de(B,ve=>{n().attributes.ticket_type==="time_slot"?ve(ee):n().attributes.ticket_type==="normal"&&ve(P,1)});var ue=X(B,4),z=F(ue,!0);M(ue),ce((ve,fe)=>{pe(ue,"href",ve),se(z,fe)},[()=>i().downloadLink(n(),h(K)),()=>C.t("common.download")]),x(Q,H)},U=Q=>{var K=q$(),H=X(q(K),2),B=F(H,!0);M(H),ce((ee,P)=>{pe(H,"href",ee),se(B,P)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),x(Q,K)};de($,Q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?Q(R):Q(U,-1)}),M(E);var N=X(E,2),le=F(N,!0);M(N);var V=X(N,2),ae=F(V),me=Q=>{var K=V$(),H=F(K);M(K),ce(()=>{pe(K,"href",C.apiUrl+n().attributes.barcodes[m]?.passbook_url),pe(H,"src",r)}),x(Q,K)};de(ae,Q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&Q(me)}),M(V);var J=X(V,2),oe=F(J),G=Q=>{var K=B$(),H=F(K,!0);M(K),ce(B=>{pe(K,"href",C.apiUrl+n().attributes.ical_url),se(H,B)},[()=>C.t("common.calendar")]),x(Q,K)};de(oe,Q=>{n().attributes.ical_url&&Q(G)}),M(J),M(k),M(_),M(v),ce(Q=>{se(O,n().attributes.title),se(le,Q)},[()=>sa(n().price_cents)]),x(f,v)}),x(d,u)},c=d=>{var u=H$(),p=F(u),f=F(p),g=F(f),m=F(g,!0);M(g);var v=X(g,2),_=F(v),k=F(_,!0);M(_);var A=X(_,2),E=R=>{var U=Z$(),N=F(U,!0);M(U),ce((le,V)=>{pe(U,"href",le),se(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),x(R,U)},T=R=>{var U=W$(),N=F(U,!0);M(U),ce((le,V)=>{pe(U,"href",le),se(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),x(R,U)};de(A,R=>{n().attributes.is_voucher?R(E):R(T,-1)}),M(v);var O=X(v,2),$=F(O,!0);M(O),Tt(2),M(f),M(p),M(u),ce(R=>{se(m,n().attributes.quantity),se(k,n().attributes.title),se($,R)},[()=>sa(n().price_cents)]),x(d,u)};return de(a,d=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?d(l):d(c,-1)}),x(e,o),ne(s)}ie(gg,{item:{},orderDetails:{}},[],[],{mode:"open"});var G$=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 K$(e,t){re(t,!0);const r=mg(t.$$host),n=D(()=>r.value);let i=D(()=>h(n)?.order);var s=Y(),o=q(s),a=l=>{var c=G$(),d=F(c),u=F(d),p=F(u),f=F(p,!0);M(p);var g=X(p,2),m=F(g,!0);M(g);var v=X(g,2),_=F(v,!0);M(v),Tt(2),M(u),M(d);var k=X(d,2);qe(k,17,()=>h(i).items,$=>$.id,($,R)=>{var U=Y(),N=q(U),le=ae=>{gg(ae,{get item(){return h(R)},get orderDetails(){return h(n)}})},V=ae=>{vg(ae,{get item(){return h(R)},get orderDetails(){return h(n)}})};de(N,ae=>{h(R).type==="Ticket"?ae(le):h(R).type==="Event"&&ae(V,1)}),x($,U)});var A=X(k,2),E=F(A),T=X(F(E),4),O=F(T,!0);M(T),Tt(2),M(E),M(A),M(c),ce(($,R,U,N)=>{se(f,$),se(m,R),se(_,U),se(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:sa(h(i).total_price_cents)})]),x(l,c)};de(o,l=>{h(i)&&h(n)&&l(a)}),x(e,s),ne()}customElements.define("go-order-breakdown",ie(K$,{},[],[]));function Y$(e,t){re(t,!0);const r=mg(t.$$host),n=D(()=>r.value);let i=D(()=>h(n)?.order);Tt();var s=zt();ce(()=>se(s,h(i)?.id)),x(e,s),ne()}customElements.define("go-order-invoice-id",ie(Y$,{},[],[]));var J$=j("<go-form></go-form>",2);function X$(e,t){re(t,!1),cr.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,o=await C.updatePassword(s.formData);o.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=o.error?.errors||o.error||o.errors}Gl();var n=J$();Kn(n,"formId","passwordResetForm"),Mo("submit",n,r),x(e,n),ne()}customElements.define("go-profile-password",ie(X$,{},[],[]));var Q$=j("<go-form></go-form>",2);function eM(e,t){re(t,!0),cr.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=te(void 0);const n=D(()=>C.validateToken());rn(async()=>{await C.waitForAllFetches(),await Kl(()=>h(r).details),await Kl(()=>h(n).data),h(r).details.fill(h(n).data)});var i=Q$();Kn(i,"formId","accountDetailsForm"),Hl(i,s=>I(r,s),()=>h(r)),x(e,i),ne()}customElements.define("go-profile-details",ie(eM,{},[],[]));var tM=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function rM(e,t){re(t,!0);const r=D(()=>C.validateToken()),n=D(()=>h(r)?.data);var i=Y(),s=q(i),o=l=>{var c=tM(),d=q(c),u=F(d);M(d);var p=X(d,2),f=F(p,!0);M(p),ce(()=>{se(u,`${h(n).name??""}
|
|
83
|
-
${h(n).surname??""}`),se(f,h(n).email)}),x(l,c)},a=l=>{var c=zt();ce(d=>se(c,d),[()=>
|
|
84
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pM(e,t){return dM(e)||fM(e,t)||mM(e,t)||hM()}function mM(e,t){if(e){if(typeof e=="string")return bg(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(e,t):void 0}}var _g=Object.entries,wg=Object.setPrototypeOf,vM=Object.isFrozen,gM=Object.getPrototypeOf,yM=Object.getOwnPropertyDescriptor,Pt=Object.freeze,fr=Object.seal,Qi=Object.create,kg=typeof Reflect<"u"&&Reflect,jc=kg.apply,Zc=kg.construct;Pt||(Pt=function(t){return t}),fr||(fr=function(t){return t}),jc||(jc=function(t,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 t.apply(r,i)}),Zc||(Zc=function(t){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 t(...n)});var es=ct(Array.prototype.forEach),bM=ct(Array.prototype.lastIndexOf),Sg=ct(Array.prototype.pop),ts=ct(Array.prototype.push),_M=ct(Array.prototype.splice),$t=Array.isArray,oo=ct(String.prototype.toLowerCase),Wc=ct(String.prototype.toString),Eg=ct(String.prototype.match),rs=ct(String.prototype.replace),xg=ct(String.prototype.indexOf),wM=ct(String.prototype.trim),kM=ct(Number.prototype.toString),SM=ct(Boolean.prototype.toString),Tg=typeof BigInt>"u"?null:ct(BigInt.prototype.toString),Ag=typeof Symbol>"u"?null:ct(Symbol.prototype.toString),nt=ct(Object.prototype.hasOwnProperty),ao=ct(Object.prototype.toString),_t=ct(RegExp.prototype.test),lo=EM(TypeError);function ct(e){return function(t){t instanceof RegExp&&(t.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 jc(e,t,n)}}function EM(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zc(e,r)}}function xe(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oo;if(wg&&wg(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(vM(t)||(t[n]=s),i=s)}e[i]=!0}return e}function xM(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function St(e){const t=Qi(null);for(const n of _g(e)){var r=pM(n,2);const i=r[0],s=r[1];nt(e,i)&&($t(s)?t[i]=xM(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=St(s):t[i]=s)}return t}function TM(e){switch(typeof e){case"string":return e;case"number":return kM(e);case"boolean":return SM(e);case"bigint":return Tg?Tg(e):"0";case"symbol":return Ag?Ag(e):"Symbol()";case"undefined":return ao(e);case"function":case"object":{if(e===null)return ao(e);const t=e,r=Kr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:ao(n)}return ao(e)}default:return ao(e)}}function Kr(e,t){for(;e!==null;){const n=yM(e,t);if(n){if(n.get)return ct(n.get);if(typeof n.value=="function")return ct(n.value)}e=gM(e)}function r(){return null}return r}function AM(e){try{return _t(e,""),!0}catch{return!1}}var Og=Pt(["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"]),Hc=Pt(["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"]),Gc=Pt(["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"]),OM=Pt(["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"]),Kc=Pt(["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"]),CM=Pt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cg=Pt(["#text"]),Dg=Pt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Yc=Pt(["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"]),Ig=Pt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Ga=Pt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),DM=fr(/{{[\w\W]*|^[\w\W]*}}/g),IM=fr(/<%[\w\W]*|^[\w\W]*%>/g),PM=fr(/\${[\w\W]*/g),$M=fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),MM=fr(/^aria-[\-\w]+$/),Pg=fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),FM=fr(/^(?:\w+script|data):/i),NM=fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),RM=fr(/^html$/i),LM=fr(/^[a-z][.\w]*(-[.\w]+)+$/i),Yr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},zM=function(){return typeof window>"u"?null:window},UM=function(t,r){if(typeof t!="object"||typeof t.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 t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},$g=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Mg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zM();const t=ye=>Mg(ye);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Yr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,o=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,u=a.prototype,p=Kr(u,"cloneNode"),f=Kr(u,"remove"),g=Kr(u,"nextSibling"),m=Kr(u,"childNodes"),v=Kr(u,"parentNode"),_=Kr(u,"shadowRoot"),k=Kr(u,"attributes"),A=o&&o.prototype?Kr(o.prototype,"nodeType"):null,E=o&&o.prototype?Kr(o.prototype,"nodeName"):null;if(typeof s=="function"){const ye=r.createElement("template");ye.content&&ye.content.ownerDocument&&(r=ye.content.ownerDocument)}let T,O="";const $=r,R=$.implementation,U=$.createNodeIterator,N=$.createDocumentFragment,le=$.getElementsByTagName,V=n.importNode;let ae=$g();t.isSupported=typeof _g=="function"&&typeof v=="function"&&R&&R.createHTMLDocument!==void 0;const me=DM,J=IM,oe=PM,G=$M,Q=MM,K=FM,H=NM,B=LM;let ee=Pg,P=null;const ue=xe({},[...Og,...Hc,...Gc,...Kc,...Cg]);let z=null;const ve=xe({},[...Dg,...Yc,...Ig,...Ga]);let fe=Object.seal(Qi(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}})),w=null,Be=null;const Pe=Object.seal(Qi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Je=!0,Et=!0,Ke=!1,Xt=!0,dt=!1,Qt=!0,xt=!1,Mt=!1,er=!1,jt=!1,hr=!1,Ir=!1,Pr=!0,vn=!1;const $r="user-content-";let pr=!0,Jr=!1,Xr={},wt=null;const Un=xe({},["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 ns=null;const is=xe({},["audio","video","img","source","image","track"]);let uo=null;const Jc=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vi="http://www.w3.org/1998/Math/MathML",ss="http://www.w3.org/2000/svg",mr="http://www.w3.org/1999/xhtml";let qn=mr,Xc=!1,Qc=null;const d2=xe({},[vi,ss,mr],Wc);let ed=xe({},["mi","mo","mn","ms","mtext"]),td=xe({},["annotation-xml"]);const f2=xe({},["title","style","font","a","script"]);let co=null;const h2=["application/xhtml+xml","text/html"],p2="text/html";let st=null,os=null;const m2=r.createElement("form"),zg=function(S){return S instanceof RegExp||S instanceof Function},rd=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(os&&os===S)return;(!S||typeof S!="object")&&(S={}),S=St(S),co=h2.indexOf(S.PARSER_MEDIA_TYPE)===-1?p2:S.PARSER_MEDIA_TYPE,st=co==="application/xhtml+xml"?Wc:oo,P=nt(S,"ALLOWED_TAGS")&&$t(S.ALLOWED_TAGS)?xe({},S.ALLOWED_TAGS,st):ue,z=nt(S,"ALLOWED_ATTR")&&$t(S.ALLOWED_ATTR)?xe({},S.ALLOWED_ATTR,st):ve,Qc=nt(S,"ALLOWED_NAMESPACES")&&$t(S.ALLOWED_NAMESPACES)?xe({},S.ALLOWED_NAMESPACES,Wc):d2,uo=nt(S,"ADD_URI_SAFE_ATTR")&&$t(S.ADD_URI_SAFE_ATTR)?xe(St(Jc),S.ADD_URI_SAFE_ATTR,st):Jc,ns=nt(S,"ADD_DATA_URI_TAGS")&&$t(S.ADD_DATA_URI_TAGS)?xe(St(is),S.ADD_DATA_URI_TAGS,st):is,wt=nt(S,"FORBID_CONTENTS")&&$t(S.FORBID_CONTENTS)?xe({},S.FORBID_CONTENTS,st):Un,w=nt(S,"FORBID_TAGS")&&$t(S.FORBID_TAGS)?xe({},S.FORBID_TAGS,st):St({}),Be=nt(S,"FORBID_ATTR")&&$t(S.FORBID_ATTR)?xe({},S.FORBID_ATTR,st):St({}),Xr=nt(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?St(S.USE_PROFILES):S.USE_PROFILES:!1,Je=S.ALLOW_ARIA_ATTR!==!1,Et=S.ALLOW_DATA_ATTR!==!1,Ke=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dt=S.SAFE_FOR_TEMPLATES||!1,Qt=S.SAFE_FOR_XML!==!1,xt=S.WHOLE_DOCUMENT||!1,jt=S.RETURN_DOM||!1,hr=S.RETURN_DOM_FRAGMENT||!1,Ir=S.RETURN_TRUSTED_TYPE||!1,er=S.FORCE_BODY||!1,Pr=S.SANITIZE_DOM!==!1,vn=S.SANITIZE_NAMED_PROPS||!1,pr=S.KEEP_CONTENT!==!1,Jr=S.IN_PLACE||!1,ee=AM(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:Pg,qn=typeof S.NAMESPACE=="string"?S.NAMESPACE:mr,ed=nt(S,"MATHML_TEXT_INTEGRATION_POINTS")&&S.MATHML_TEXT_INTEGRATION_POINTS&&typeof S.MATHML_TEXT_INTEGRATION_POINTS=="object"?St(S.MATHML_TEXT_INTEGRATION_POINTS):xe({},["mi","mo","mn","ms","mtext"]),td=nt(S,"HTML_INTEGRATION_POINTS")&&S.HTML_INTEGRATION_POINTS&&typeof S.HTML_INTEGRATION_POINTS=="object"?St(S.HTML_INTEGRATION_POINTS):xe({},["annotation-xml"]);const Z=nt(S,"CUSTOM_ELEMENT_HANDLING")&&S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING=="object"?St(S.CUSTOM_ELEMENT_HANDLING):Qi(null);if(fe=Qi(null),nt(Z,"tagNameCheck")&&zg(Z.tagNameCheck)&&(fe.tagNameCheck=Z.tagNameCheck),nt(Z,"attributeNameCheck")&&zg(Z.attributeNameCheck)&&(fe.attributeNameCheck=Z.attributeNameCheck),nt(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),dt&&(Et=!1),hr&&(jt=!0),Xr&&(P=xe({},Cg),z=Qi(null),Xr.html===!0&&(xe(P,Og),xe(z,Dg)),Xr.svg===!0&&(xe(P,Hc),xe(z,Yc),xe(z,Ga)),Xr.svgFilters===!0&&(xe(P,Gc),xe(z,Yc),xe(z,Ga)),Xr.mathMl===!0&&(xe(P,Kc),xe(z,Ig),xe(z,Ga))),Pe.tagCheck=null,Pe.attributeCheck=null,nt(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?Pe.tagCheck=S.ADD_TAGS:$t(S.ADD_TAGS)&&(P===ue&&(P=St(P)),xe(P,S.ADD_TAGS,st))),nt(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?Pe.attributeCheck=S.ADD_ATTR:$t(S.ADD_ATTR)&&(z===ve&&(z=St(z)),xe(z,S.ADD_ATTR,st))),nt(S,"ADD_URI_SAFE_ATTR")&&$t(S.ADD_URI_SAFE_ATTR)&&xe(uo,S.ADD_URI_SAFE_ATTR,st),nt(S,"FORBID_CONTENTS")&&$t(S.FORBID_CONTENTS)&&(wt===Un&&(wt=St(wt)),xe(wt,S.FORBID_CONTENTS,st)),nt(S,"ADD_FORBID_CONTENTS")&&$t(S.ADD_FORBID_CONTENTS)&&(wt===Un&&(wt=St(wt)),xe(wt,S.ADD_FORBID_CONTENTS,st)),pr&&(P["#text"]=!0),xt&&xe(P,["html","head","body"]),P.table&&(xe(P,["tbody"]),delete w.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw lo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw lo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=S.TRUSTED_TYPES_POLICY,O=T.createHTML("")}else T===void 0&&(T=UM(d,i)),T!==null&&typeof O=="string"&&(O=T.createHTML(""));(ae.uponSanitizeElement.length>0||ae.uponSanitizeAttribute.length>0)&&P===ue&&(P=St(P)),ae.uponSanitizeAttribute.length>0&&z===ve&&(z=St(z)),Pt&&Pt(S),os=S},Ug=xe({},[...Hc,...Gc,...OM]),qg=xe({},[...Kc,...CM]),v2=function(S){let Z=v(S);(!Z||!Z.tagName)&&(Z={namespaceURI:qn,tagName:"template"});const he=oo(S.tagName),Oe=oo(Z.tagName);return Qc[S.namespaceURI]?S.namespaceURI===ss?Z.namespaceURI===mr?he==="svg":Z.namespaceURI===vi?he==="svg"&&(Oe==="annotation-xml"||ed[Oe]):!!Ug[he]:S.namespaceURI===vi?Z.namespaceURI===mr?he==="math":Z.namespaceURI===ss?he==="math"&&td[Oe]:!!qg[he]:S.namespaceURI===mr?Z.namespaceURI===ss&&!td[Oe]||Z.namespaceURI===vi&&!ed[Oe]?!1:!qg[he]&&(f2[he]||!Ug[he]):!!(co==="application/xhtml+xml"&&Qc[S.namespaceURI]):!1},Mr=function(S){ts(t.removed,{element:S});try{v(S).removeChild(S)}catch{f(S)}},gi=function(S,Z){try{ts(t.removed,{attribute:Z.getAttributeNode(S),from:Z})}catch{ts(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(S),S==="is")if(jt||hr)try{Mr(Z)}catch{}else try{Z.setAttribute(S,"")}catch{}},Vg=function(S){let Z=null,he=null;if(er)S="<remove></remove>"+S;else{const et=Eg(S,/^[\r\n\t ]+/);he=et&&et[0]}co==="application/xhtml+xml"&&qn===mr&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Oe=T?T.createHTML(S):S;if(qn===mr)try{Z=new c().parseFromString(Oe,co)}catch{}if(!Z||!Z.documentElement){Z=R.createDocument(qn,"template",null);try{Z.documentElement.innerHTML=Xc?O:Oe}catch{}}const $e=Z.body||Z.documentElement;return S&&he&&$e.insertBefore(r.createTextNode(he),$e.childNodes[0]||null),qn===mr?le.call(Z,xt?"html":"body")[0]:xt?Z.documentElement:$e},Bg=function(S){return U.call(S.ownerDocument||S,S,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},jg=function(S){S.normalize();const Z=U.call(S.ownerDocument||S,S,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let he=Z.nextNode();for(;he;){let Oe=he.data;es([me,J,oe],$e=>{Oe=rs(Oe,$e," ")}),he.data=Oe,he=Z.nextNode()}},Ka=function(S){const Z=E?E(S):null;return typeof Z!="string"||st(Z)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==k(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==A(S)||S.childNodes!==m(S)},fo=function(S){if(!A||typeof S!="object"||S===null)return!1;try{return A(S)===Yr.documentFragment}catch{return!1}},Ya=function(S){if(!A||typeof S!="object"||S===null)return!1;try{return typeof A(S)=="number"}catch{return!1}};function gn(ye,S,Z){es(ye,he=>{he.call(t,S,Z,os)})}const Zg=function(S){let Z=null;if(gn(ae.beforeSanitizeElements,S,null),Ka(S))return Mr(S),!0;const he=st(S.nodeName);if(gn(ae.uponSanitizeElement,S,{tagName:he,allowedTags:P}),Qt&&S.hasChildNodes()&&!Ya(S.firstElementChild)&&_t(/<[/\w!]/g,S.innerHTML)&&_t(/<[/\w!]/g,S.textContent)||Qt&&S.namespaceURI===mr&&he==="style"&&Ya(S.firstElementChild)||S.nodeType===Yr.progressingInstruction||Qt&&S.nodeType===Yr.comment&&_t(/<[/\w]/g,S.data))return Mr(S),!0;if(w[he]||!(Pe.tagCheck instanceof Function&&Pe.tagCheck(he))&&!P[he]){if(!w[he]&&Hg(he)&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he)))return!1;if(pr&&!wt[he]){const Oe=v(S),$e=m(S);if($e&&Oe){const et=$e.length;for(let Zt=et-1;Zt>=0;--Zt){const Vn=p($e[Zt],!0);Oe.insertBefore(Vn,g(S))}}}return Mr(S),!0}return(A?A(S):S.nodeType)===Yr.element&&!v2(S)||(he==="noscript"||he==="noembed"||he==="noframes")&&_t(/<\/no(script|embed|frames)/i,S.innerHTML)?(Mr(S),!0):(dt&&S.nodeType===Yr.text&&(Z=S.textContent,es([me,J,oe],Oe=>{Z=rs(Z,Oe," ")}),S.textContent!==Z&&(ts(t.removed,{element:S.cloneNode()}),S.textContent=Z)),gn(ae.afterSanitizeElements,S,null),!1)},Wg=function(S,Z,he){if(Be[Z]||Pr&&(Z==="id"||Z==="name")&&(he in r||he in m2))return!1;const Oe=z[Z]||Pe.attributeCheck instanceof Function&&Pe.attributeCheck(Z,S);if(!(Et&&!Be[Z]&&_t(G,Z))){if(!(Je&&_t(Q,Z))){if(!Oe||Be[Z]){if(!(Hg(S)&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,S)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(S))&&(fe.attributeNameCheck instanceof RegExp&&_t(fe.attributeNameCheck,Z)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(Z,S))||Z==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he))))return!1}else if(!uo[Z]){if(!_t(ee,rs(he,H,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&S!=="script"&&xg(he,"data:")===0&&ns[S])){if(!(Ke&&!_t(K,rs(he,H,"")))){if(he)return!1}}}}}}return!0},g2=xe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Hg=function(S){return!g2[oo(S)]&&_t(B,S)},Gg=function(S){gn(ae.beforeSanitizeAttributes,S,null);const Z=S.attributes;if(!Z||Ka(S))return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let Oe=Z.length;for(;Oe--;){const $e=Z[Oe],et=$e.name,Zt=$e.namespaceURI,Vn=$e.value,yn=st(et),nd=Vn;let gt=et==="value"?nd:wM(nd);if(he.attrName=yn,he.attrValue=gt,he.keepAttr=!0,he.forceKeepAttr=void 0,gn(ae.uponSanitizeAttribute,S,he),gt=he.attrValue,vn&&(yn==="id"||yn==="name")&&xg(gt,$r)!==0&&(gi(et,S),gt=$r+gt),Qt&&_t(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){gi(et,S);continue}if(yn==="attributename"&&Eg(gt,"href")){gi(et,S);continue}if(he.forceKeepAttr)continue;if(!he.keepAttr){gi(et,S);continue}if(!Xt&&_t(/\/>/i,gt)){gi(et,S);continue}dt&&es([me,J,oe],Yg=>{gt=rs(gt,Yg," ")});const Kg=st(S.nodeName);if(!Wg(Kg,yn,gt)){gi(et,S);continue}if(T&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Zt)switch(d.getAttributeType(Kg,yn)){case"TrustedHTML":gt=T.createHTML(gt);break;case"TrustedScriptURL":gt=T.createScriptURL(gt);break}if(gt!==nd)try{Zt?S.setAttributeNS(Zt,et,gt):S.setAttribute(et,gt),Ka(S)?Mr(S):Sg(t.removed)}catch{gi(et,S)}}gn(ae.afterSanitizeAttributes,S,null)},Ja=function(S){let Z=null;const he=Bg(S);for(gn(ae.beforeSanitizeShadowDOM,S,null);Z=he.nextNode();)if(gn(ae.uponSanitizeShadowNode,Z,null),Zg(Z),Gg(Z),fo(Z.content)&&Ja(Z.content),(A?A(Z):Z.nodeType)===Yr.element){const Oe=_?_(Z):Z.shadowRoot;fo(Oe)&&(as(Oe),Ja(Oe))}gn(ae.afterSanitizeShadowDOM,S,null)},as=function(S){const Z=A?A(S):S.nodeType;if(Z===Yr.element){const $e=_?_(S):S.shadowRoot;fo($e)&&(as($e),Ja($e))}const he=m?m(S):S.childNodes;if(!he)return;const Oe=[];es(he,$e=>{ts(Oe,$e)});for(const $e of Oe)as($e);if(Z===Yr.element){const $e=E?E(S):null;if(typeof $e=="string"&&st($e)==="template"){const et=S.content;fo(et)&&as(et)}}};return t.sanitize=function(ye){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,he=null,Oe=null,$e=null;if(Xc=!ye,Xc&&(ye="<!-->"),typeof ye!="string"&&!Ya(ye)&&(ye=TM(ye),typeof ye!="string"))throw lo("dirty is not a string, aborting");if(!t.isSupported)return ye;if(Mt||rd(S),t.removed=[],typeof ye=="string"&&(Jr=!1),Jr){const Vn=E?E(ye):ye.nodeName;if(typeof Vn=="string"){const yn=st(Vn);if(!P[yn]||w[yn])throw lo("root node is forbidden and cannot be sanitized in-place")}if(Ka(ye))throw lo("root node is clobbered and cannot be sanitized in-place");as(ye)}else if(Ya(ye))Z=Vg("<!---->"),he=Z.ownerDocument.importNode(ye,!0),he.nodeType===Yr.element&&he.nodeName==="BODY"||he.nodeName==="HTML"?Z=he:Z.appendChild(he),as(he);else{if(!jt&&!dt&&!xt&&ye.indexOf("<")===-1)return T&&Ir?T.createHTML(ye):ye;if(Z=Vg(ye),!Z)return jt?null:Ir?O:""}Z&&er&&Mr(Z.firstChild);const et=Bg(Jr?ye:Z);for(;Oe=et.nextNode();)Zg(Oe),Gg(Oe),fo(Oe.content)&&Ja(Oe.content);if(Jr)return dt&&jg(ye),ye;if(jt){if(dt&&jg(Z),hr)for($e=N.call(Z.ownerDocument);Z.firstChild;)$e.appendChild(Z.firstChild);else $e=Z;return(z.shadowroot||z.shadowrootmode)&&($e=V.call(n,$e,!0)),$e}let Zt=xt?Z.outerHTML:Z.innerHTML;return xt&&P["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&_t(RM,Z.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
85
|
-
`+Zt),dt&&es([me,J,oe],Vn=>{Zt=rs(Zt,Vn," ")}),T&&Ir?T.createHTML(Zt):Zt},t.setConfig=function(){rd(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Mt=!0},t.clearConfig=function(){os=null,Mt=!1},t.isValidAttribute=function(ye,S,Z){return os||rd({}),Wg(st(ye),st(S),Z)},t.addHook=function(ye,S){typeof S=="function"&&ts(ae[ye],S)},t.removeHook=function(ye,S){if(S!==void 0){const Z=bM(ae[ye],S);return Z===-1?void 0:_M(ae[ye],Z,1)[0]}return Sg(ae[ye])},t.removeHooks=function(ye){ae[ye]=[]},t.removeAllHooks=function(){ae=$g()},t}var qM=Mg(),VM=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),BM=j('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),jM=j('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),ZM=j("<option> </option>"),WM=j('<select class="go-tickets-item-select"></select>'),HM=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=""><!></li></ul></article></li>');function Fg(e,t){const r=ht();re(t,!0);const n=k=>{var A=VM(),E=q(A),T=F(E);M(E);var O=X(E,2),$=F(O,!0);M(O),ce(R=>{se(T,`${s().product.event_title??""} - ${R??""}`),se($,s().product.title)},[()=>qs(s().time)]),x(k,A)},i=k=>{Tt();var A=zt();ce(()=>se(A,s().product.title)),x(k,A)};let s=b(t,"item",7),o=b(t,"details",7);const a=D(()=>We.config.quantityStepper);let l=te(void 0),c=te(!1);const d=D(()=>s().product?.content?.reduction_reason),u=`go-ticket-info-${r}`;ge(()=>{o().preCart.items.map(k=>k.quantity),C.cart?.items.map(k=>k.quantity),Ne(()=>{I(l,C.capacityManager.capacity(C.cart,s(),o().preCart),!0)})});function p(k,A,E){k.quantity=parseInt(A.value)}let f=i;Bs(s().product)&&(f=n);var g={get item(){return s()},set item(k){s(k),y()},get details(){return o()},set details(k){o(k),y()}},m=Y(),v=q(m),_=k=>{var A=HM(),E=F(A),T=F(E),O=F(T),$=F(O);f($),M(O);var R=X(O,2),U=K=>{var H=BM(),B=F(H);M(H),ce(ee=>{Ot(B,1,wr(["go-ticket-info-icon",h(c)&&"is-active"])),pe(B,"aria-expanded",h(c)),pe(B,"aria-controls",u),pe(B,"aria-label",ee)},[()=>C.t("ticket.list.additionalInfo")]),at("click",B,()=>I(c,!h(c))),x(K,H)};de(R,K=>{h(d)&&K(U)});var N=X(R,2);d_(N,()=>qM.sanitize(s().product.description),!0),M(N);var le=X(N,2),V=K=>{var H=jM(),B=F(H,!0);M(H),ce(ee=>{pe(H,"id",u),pe(H,"hidden",!h(c)),se(B,ee)},[()=>C.t(h(d))]),x(K,H)};de(le,K=>{h(d)&&K(V)});var ae=X(le,2),me=F(ae,!0);M(ae);var J=X(ae,2),oe=F(J),G=K=>{{let H=D(()=>C.t("quantity.decrease")),B=D(()=>C.t("quantity.increase"));Mu(K,{get value(){return s().quantity},get min(){return h(l).min},get max(){return h(l).max},get label(){return s().product.title},get decreaseLabel(){return h(H)},get increaseLabel(){return h(B)},onChange:ee=>s().quantity=ee})}},Q=K=>{var H=WM();qe(H,21,()=>Vp(h(l).min,h(l).max),B=>B.value,(B,ee)=>{var P=ZM(),ue=F(P,!0);M(P);var z={};ce(()=>{Ll(P,s().quantity===h(ee).value),se(ue,h(ee).label),z!==(z=h(ee).value)&&(P.value=(P.__value=h(ee).value)??"")}),x(B,P)}),M(H),ce(B=>pe(H,"aria-label",B),[()=>C.t("cart.content.table.edit")]),at("change",H,B=>p(s(),B.target,o()?.ticketSelectionDetails)),x(K,H)};de(oe,K=>{h(a)?K(G):K(Q,-1)}),M(J),M(T),M(E),M(A),ce(()=>{Ot(E,1,wr(["go-tickets-item",h(l).bookedOut&&"is-booked-out"])),pe(E,"data-testid",s().uuid),se(me,s().price_formatted)}),x(k,A)};return de(v,k=>{h(l)&&!h(l).unavailable&&k(_)}),x(e,m),ne(g)}br(["click","change"]),ie(Fg,{item:{},details:{}},[],[],{mode:"open"});var GM=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 KM(e,t){re(t,!0);const r=Bc(t.$$host),n=D(()=>r.value),i=D(()=>h(n)?.preCart?.items.length&&h(n)?.preCart?.items.length>0);var s=Y(),o=q(s),a=l=>{var c=GM(),d=F(c),u=F(d),p=F(u),f=F(p,!0);M(p);var g=X(p,2),m=F(g,!0);M(g);var v=X(g,2),_=F(v,!0);M(v);var k=X(v,2),A=F(k,!0);M(k),M(u),M(d);var E=X(d,2);qe(E,17,()=>h(n).preCart.items,T=>T.uuid,(T,O)=>{Fg(T,{get item(){return h(O)},get details(){return h(n)}})}),M(c),ce((T,O,$,R)=>{se(f,T),se(m,O),se(_,$),se(A,R)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),x(l,c)};de(o,l=>{h(i)&&h(n)&&l(a)}),x(e,s),ne()}customElements.define("go-ticket-segment-body",ie(KM,{},[],[]));function YM(e,t){re(t,!0);const r=Bc(t.$$host),n=D(()=>r.value);Tt();var i=zt();ce(()=>se(i,h(n)?.preCart.totalFormatted)),x(e,i),ne()}customElements.define("go-ticket-segment-sum",ie(YM,{},[],[]));var JM=class{#e;get tsd(){return h(this.#e)}set tsd(e){I(this.#e,e)}#t=te(Fe([]));get timeslots(){return h(this.#t)}set timeslots(e){I(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>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}const t=C.capacityManager.quotaManager;t.clearPrecart();for(const r of C.cart?.items??[]){const n=r.product;Cu(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}},XM=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),QM=j('<ul data-testid="timeslots"></ul>');function e2(e,t){re(t,!0);const r=[],n=new JM(mn(t.$$host));ge(()=>{const d=n.tsd;if(!d)return;const u=d.filters,p=d.selectedDate;Ne(async()=>{d.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(f=>mi(f).loadTimeslots(d))),n.recalculateCapacities()})}),ge(()=>{C.cart?.items.map(d=>d.quantity),Ne(()=>n.recalculateCapacities())});const i=(d,u)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=d=>{i(d.target,n.tsd?.selectedTimeslot)};ge(()=>{const d=n.tsd;if(!d)return;const u=n.timeslots;if(u.length!==1)return;const p=u[0];p.available&&d.selectedTimeslot!==p.startAt&&(d.selectedTimeslot=p.startAt,i(t.$$host,p.startAt))});var o={details:n},a=Y(),l=q(a),c=d=>{var u=QM();qe(u,20,()=>n.timeslots,p=>p,(p,f)=>{const g=D(()=>f.totalCapacity===0),m=D(()=>!h(g)&&f.capacity===0),v=D(()=>h(g)||h(m)||!f.available),_=D(()=>n.tsd?.selectedTimeslot===f.startAt);var k=XM(),A=F(k),E=F(A),T=X(E);Is(T);var O;M(A),M(k),ce(()=>{Ot(k,1,wr({"go-timeslot":!0,"is-unavailable":h(g),"is-sold-out":h(m),"is-disabled":h(v),"is-selected":h(_)})),se(E,`${f.timeFormatted??""} `),T.disabled=h(v),pe(T,"aria-disabled",h(v)),O!==(O=f.startAt)&&(T.value=(T.__value=f.startAt)??"")}),at("change",T,s),A_(r,[],T,()=>(f.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),x(p,k)}),M(u),x(d,u)};return de(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),x(e,a),ne(o)}br(["change"]),customElements.define("go-timeslots",ie(e2,{},[],["details"]));var t2=class{#e=te();get details(){return h(this.#e)}set details(e){I(this.#e,e,!0)}#t=te(Fe(Qn(qt())));get startAt(){return h(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=te(void 0);get selected(){return h(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>mi(e).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(Qn(qt()))<0||this.dates[e.toString()]=="unavailable":e.compare(Qn(qt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>mi(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=C.calendar.bind(C);return this.fetchPeriod().reduce((t,r)=>kt(t,e(this.params(r))),{})}ticketsDates(){const e=C.ticketsCalendar.bind(C);return this.fetchPeriod().reduce((t,r)=>kt(t,e(this.params(r))),{})}},r2=j("<!> <!> <!>",1),n2=j("<div> </div>"),Ng=j("<!> <!>",1),i2=j('<div data-calendar-wrapper=""><!></div>');function Rg(e,t){re(t,!0);let r=b(t,"calendarClass",7),n=te(void 0);const i=r();ge(()=>{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=i2(),a=F(o);{const l=(c,d)=>{let u=()=>d?.().months,p=()=>d?.().weekdays;var f=Ng(),g=q(f);De(g,()=>ac,(v,_)=>{_(v,{children:(k,A)=>{var E=r2(),T=q(E);De(T,()=>cc,(R,U)=>{U(R,{class:"go-calendar-prev-button",children:(N,le)=>{Tt();var V=zt("Prev");x(N,V)},$$slots:{default:!0}})});var O=X(T,2);De(O,()=>lc,(R,U)=>{U(R,{class:"go-calendar-heading"})});var $=X(O,2);De($,()=>uc,(R,U)=>{U(R,{class:"go-calendar-next-button",children:(N,le)=>{Tt();var V=zt("Next");x(N,V)},$$slots:{default:!0}})}),x(k,E)},$$slots:{default:!0}})});var m=X(g,2);qe(m,17,u,Ur,(v,_)=>{var k=Y(),A=q(k);De(A,()=>rc,(E,T)=>{T(E,{class:"go-calendar-grid",children:(O,$)=>{var R=Ng(),U=q(R);De(U,()=>sc,(le,V)=>{V(le,{class:"go-calendar-grid-head",children:(ae,me)=>{var J=Y(),oe=q(J);De(oe,()=>ro,(G,Q)=>{Q(G,{class:"go-calendar-grid-row",children:(K,H)=>{var B=Y(),ee=q(B);qe(ee,17,p,Ur,(P,ue,z,ve)=>{var fe=Y(),w=q(fe);De(w,()=>oc,(Be,Pe)=>{Pe(Be,{children:(Je,Et)=>{var Ke=n2(),Xt=F(Ke,!0);M(Ke),ce(dt=>se(Xt,dt),[()=>h(ue).slice(0,2)]),x(Je,Ke)},$$slots:{default:!0}})}),x(P,fe)}),x(K,B)},$$slots:{default:!0}})}),x(ae,J)},$$slots:{default:!0}})});var N=X(U,2);De(N,()=>nc,(le,V)=>{V(le,{class:"go-calendar-grid-body",children:(ae,me)=>{var J=Y(),oe=q(J);qe(oe,17,()=>h(_).weeks,Ur,(G,Q,K,H)=>{var B=Y(),ee=q(B);De(ee,()=>ro,(P,ue)=>{ue(P,{class:"go-calendar-grid-row",children:(z,ve)=>{var fe=Y(),w=q(fe);qe(w,17,()=>h(Q),Ur,(Be,Pe,Je,Et)=>{var Ke=Y(),Xt=q(Ke);De(Xt,()=>ic,(dt,Qt)=>{Qt(dt,{get date(){return h(Pe)},get month(){return h(_).value},class:"go-calendar-cell",children:(xt,Mt)=>{var er=Y(),jt=q(er);{let hr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(h(Pe)),"is-disabled":r().isDateDisabled(h(Pe)),"is-selected":r().selected?.compare(h(Pe))===0}));De(jt,()=>tc,(Ir,Pr)=>{Pr(Ir,{get class(){return h(hr)},children:(vn,$r)=>{Tt();var pr=zt();ce(()=>se(pr,h(Pe).day)),x(vn,pr)},$$slots:{default:!0}})})}x(xt,er)},$$slots:{default:!0}})}),x(Be,Ke)}),x(z,fe)},$$slots:{default:!0}})}),x(G,B)}),x(ae,J)},$$slots:{default:!0}})}),x(O,R)},$$slots:{default:!0}})}),x(v,k)}),x(c,f)};De(a,()=>tv,(c,d)=>{d(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return C.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return M(o),Hl(o,l=>I(n,l),()=>h(n)),x(e,o),ne(s)}ie(Rg,{calendarClass:{}},[],["details"],{mode:"open"});function s2(e,t){re(t,!0);const r=new t2,n=r,i=mn(t.$$host),s=D(()=>i.value);ge(()=>{r.details=h(s)}),t.$$host.addEventListener("go-date-select",d=>{h(s)&&(h(s).selectedDate=d.detail.selected,h(s).selectedTimeslot=void 0)});var o={details:n},a=Y(),l=q(a),c=d=>{Rg(d,{get calendarClass(){return r}})};return de(l,d=>{h(s)?.isCalendarVisible&&d(c)}),x(e,a),ne(o)}customElements.define("go-calendar",ie(s2,{},[],["details"]));var o2=class{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!C.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return pt(n.product,{quantity:n.quantity,time:i})}));C.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),We.config.urls.cart&&We.config.navigateTo(We.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},a2=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function l2(e,t){re(t,!0);const r=new o2(mn(t.$$host));var n={details:r},i=a2(),s=F(i,!0);return M(i),ce((o,a,l)=>{i.disabled=o,pe(i,"data-x",a),se(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),at("click",i,()=>r.addToCart()),x(e,i),ne(n)}br(["click"]),customElements.define("go-add-to-cart-button",ie(l2,{},[],["details"]));function u2(e,t){re(t,!0);let r=b(t,"custom",7,!1);cr.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,o=await C.withdrawal(s.formData);o.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error?.errors??[C.t("withdrawal.form.errors.requestFailed")]}return Mn(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-withdrawal-form",ie(u2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function c2(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)try{await Lg[n.method](n.options)}catch(i){console.error(i)}e.go=Lg,t&&(t._queue=null)}var Lg={loaded:!0,config:e=>{We.define(e)},init:async e=>{await C.load("https://"+e.api,e.shop,e.locale)}};(async()=>await c2(window))()})();
|
|
75
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const a=o[1];if(t===o[0]){s(o);continue}if(e.external){const l=e.external.registry.get(o[0])?.id;if(t!==o[0]&&l){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&e.reused==="ref"){s(o);continue}}}function Eh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const l=e.seen.get(a);if(l.ref===null)return;const c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);const f=e.seen.get(u),g=f.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,d),a._zod.parent===u)for(const m in c)m==="$ref"||m==="allOf"||m in d||delete c[m];if(g.$ref&&f.def)for(const m in c)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(c[m])===JSON.stringify(f.def[m])&&delete c[m]}const p=a._zod.parent;if(p&&p!==u){n(p);const f=e.seen.get(p);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(const g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g])&&delete c[g]}e.override({zodSchema:a,jsonSchema:c,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())n(a[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(a)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const o=e.external?.defs??{};for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xo(t,"input",e.processors),output:Xo(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Ct(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ct(n.element,r);if(n.type==="set")return Ct(n.valueType,r);if(n.type==="lazy")return Ct(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 Ct(n.innerType,r);if(n.type==="intersection")return Ct(n.left,r)||Ct(n.right,r);if(n.type==="record"||n.type==="map")return Ct(n.keyType,r)||Ct(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ct(n.in,r)||Ct(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Ct(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Ct(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Ct(i,r))return!0;return!!(n.rest&&Ct(n.rest,r))}return!1}var jk=(e,t={})=>r=>{const n=kh({...r,processors:t});return bt(e,n),Sh(n,e),Eh(n,e)},Xo=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=kh({...i??{},target:s,io:t,processors:r});return bt(e,o),Sh(o,e),Eh(o,e)},Zk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Wk=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Zk[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const d=[...l];d.length===1?i.pattern=d[0].source:d.length>1&&(i.allOf=[...d.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},Hk=(e,t,r,n)=>{const i=r,{minimum:s,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";const u=typeof d=="number"&&d>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(o??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";u?f?(i.minimum=d,i.exclusiveMinimum=!0):i.exclusiveMinimum=d:typeof s=="number"&&(i.minimum=s),p?f?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},Gk=(e,t,r,n)=>{r.not={}},Kk=(e,t,r,n)=>{},Yk=(e,t,r,n)=>{const i=e._zod.def,s=Uf(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},Jk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Xk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Qk=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=bt(s.element,t,{...n,path:[...n.path,"items"]})},eS=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const o=s.shape;for(const c in o)i.properties[c]=bt(o[c],t,{...n,path:[...n.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const d=s.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=bt(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},tS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>bt(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},rS=(e,t,r,n)=>{const i=e._zod.def,s=bt(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=bt(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]]},nS=(e,t,r,n)=>{const i=e._zod.def,s=bt(i.innerType,t,n),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},iS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},sS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},oS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},aS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);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},lS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?s?i.out:i.in:i.out;bt(o,t,n);const a=t.seen.get(e);a.ref=o},uS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},xh=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},cS=W("ZodISODateTime",(e,t)=>{y0.init(e,t),Xe.init(e,t)});function dS(e){return wk(cS,e)}var fS=W("ZodISODate",(e,t)=>{b0.init(e,t),Xe.init(e,t)});function hS(e){return kk(fS,e)}var pS=W("ZodISOTime",(e,t)=>{_0.init(e,t),Xe.init(e,t)});function mS(e){return Sk(pS,e)}var vS=W("ZodISODuration",(e,t)=>{w0.init(e,t),Xe.init(e,t)});function gS(e){return Ek(vS,e)}var yS=(e,t)=>{Hf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>cw(e,r)},flatten:{value:r=>uw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Ql,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Ql,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=W("ZodError",yS,{Parent:Error}),bS=iu(ar),_S=su(ar),wS=Wo(ar),kS=Ho(ar),SS=hw(ar),ES=pw(ar),xS=mw(ar),TS=vw(ar),AS=gw(ar),OS=yw(ar),CS=bw(ar),DS=_w(ar),Th=new WeakMap;function Fs(e,t,r){const n=Object.getPrototypeOf(e);let i=Th.get(n);if(i||(i=new Set,Th.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const o=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const a=o.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var ut=W("ZodType",(e,t)=>(lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xo(e,"input"),output:Xo(e,"output")}}),e.toJSONSchema=jk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>bS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>wS(e,r,n),e.parseAsync=async(r,n)=>_S(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>kS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>SS(e,r,n),e.decode=(r,n)=>ES(e,r,n),e.encodeAsync=async(r,n)=>xS(e,r,n),e.decodeAsync=async(r,n)=>TS(e,r,n),e.safeEncode=(r,n)=>AS(e,r,n),e.safeDecode=(r,n)=>OS(e,r,n),e.safeEncodeAsync=async(r,n)=>CS(e,r,n),e.safeDecodeAsync=async(r,n)=>DS(e,r,n),Fs(e,"ZodType",{check(...r){const n=this.def;return this.clone(xn(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return Tn(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(w1(r,n))},superRefine(r,n){return this.check(k1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return Mh(this)},exactOptional(){return u1(this)},nullable(){return Fh(this)},nullish(){return Mh(Fh(this))},nonoptional(r){return m1(this,r)},array(){return Ph(this)},or(r){return r1([this,r])},and(r){return i1(this,r)},transform(r){return Rh(this,a1(r))},default(r){return f1(this,r)},prefault(r){return p1(this,r)},catch(r){return g1(this,r)},pipe(r){return Rh(this,r)},readonly(){return _1(this)},describe(r){const n=this.clone();return Ms.add(n,{description:r}),n},meta(...r){if(r.length===0)return Ms.get(this);const n=this.clone();return Ms.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Ms.get(e)?.description},configurable:!0}),e)),Ah=W("_ZodString",(e,t)=>{ou.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Wk(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fs(e,"_ZodString",{regex(...n){return this.check(Ck(...n))},includes(...n){return this.check(Pk(...n))},startsWith(...n){return this.check($k(...n))},endsWith(...n){return this.check(Mk(...n))},min(...n){return this.check(Jo(...n))},max(...n){return this.check(_h(...n))},length(...n){return this.check(wh(...n))},nonempty(...n){return this.check(Jo(1,...n))},lowercase(n){return this.check(Dk(n))},uppercase(n){return this.check(Ik(n))},trim(){return this.check(Nk())},normalize(...n){return this.check(Fk(...n))},toLowerCase(){return this.check(Rk())},toUpperCase(){return this.check(Lk())},slugify(){return this.check(zk())}})}),IS=W("ZodString",(e,t)=>{ou.init(e,t),Ah.init(e,t),e.email=r=>e.check(ek(PS,r)),e.url=r=>e.check(sk($S,r)),e.jwt=r=>e.check(_k(GS,r)),e.emoji=r=>e.check(ok(MS,r)),e.guid=r=>e.check(vh(Oh,r)),e.uuid=r=>e.check(tk(Qo,r)),e.uuidv4=r=>e.check(rk(Qo,r)),e.uuidv6=r=>e.check(nk(Qo,r)),e.uuidv7=r=>e.check(ik(Qo,r)),e.nanoid=r=>e.check(ak(FS,r)),e.guid=r=>e.check(vh(Oh,r)),e.cuid=r=>e.check(lk(NS,r)),e.cuid2=r=>e.check(uk(RS,r)),e.ulid=r=>e.check(ck(LS,r)),e.base64=r=>e.check(gk(ZS,r)),e.base64url=r=>e.check(yk(WS,r)),e.xid=r=>e.check(dk(zS,r)),e.ksuid=r=>e.check(fk(US,r)),e.ipv4=r=>e.check(hk(qS,r)),e.ipv6=r=>e.check(pk(VS,r)),e.cidrv4=r=>e.check(mk(BS,r)),e.cidrv6=r=>e.check(vk(jS,r)),e.e164=r=>e.check(bk(HS,r)),e.datetime=r=>e.check(dS(r)),e.date=r=>e.check(hS(r)),e.time=r=>e.check(mS(r)),e.duration=r=>e.check(gS(r))});function lr(e){return Q0(IS,e)}var Xe=W("ZodStringFormat",(e,t)=>{Ye.init(e,t),Ah.init(e,t)}),PS=W("ZodEmail",(e,t)=>{u0.init(e,t),Xe.init(e,t)}),Oh=W("ZodGUID",(e,t)=>{a0.init(e,t),Xe.init(e,t)}),Qo=W("ZodUUID",(e,t)=>{l0.init(e,t),Xe.init(e,t)}),$S=W("ZodURL",(e,t)=>{c0.init(e,t),Xe.init(e,t)}),MS=W("ZodEmoji",(e,t)=>{d0.init(e,t),Xe.init(e,t)}),FS=W("ZodNanoID",(e,t)=>{f0.init(e,t),Xe.init(e,t)}),NS=W("ZodCUID",(e,t)=>{h0.init(e,t),Xe.init(e,t)}),RS=W("ZodCUID2",(e,t)=>{p0.init(e,t),Xe.init(e,t)}),LS=W("ZodULID",(e,t)=>{m0.init(e,t),Xe.init(e,t)}),zS=W("ZodXID",(e,t)=>{v0.init(e,t),Xe.init(e,t)}),US=W("ZodKSUID",(e,t)=>{g0.init(e,t),Xe.init(e,t)}),qS=W("ZodIPv4",(e,t)=>{k0.init(e,t),Xe.init(e,t)}),VS=W("ZodIPv6",(e,t)=>{S0.init(e,t),Xe.init(e,t)}),BS=W("ZodCIDRv4",(e,t)=>{E0.init(e,t),Xe.init(e,t)}),jS=W("ZodCIDRv6",(e,t)=>{x0.init(e,t),Xe.init(e,t)}),ZS=W("ZodBase64",(e,t)=>{T0.init(e,t),Xe.init(e,t)}),WS=W("ZodBase64URL",(e,t)=>{O0.init(e,t),Xe.init(e,t)}),HS=W("ZodE164",(e,t)=>{C0.init(e,t),Xe.init(e,t)}),GS=W("ZodJWT",(e,t)=>{I0.init(e,t),Xe.init(e,t)}),Ch=W("ZodNumber",(e,t)=>{nh.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Hk(e,n,i,s),Fs(e,"ZodNumber",{gt(n,i){return this.check(yh(n,i))},gte(n,i){return this.check(uu(n,i))},min(n,i){return this.check(uu(n,i))},lt(n,i){return this.check(gh(n,i))},lte(n,i){return this.check(lu(n,i))},max(n,i){return this.check(lu(n,i))},int(n){return this.check(Dh(n))},safe(n){return this.check(Dh(n))},positive(n){return this.check(yh(0,n))},nonnegative(n){return this.check(uu(0,n))},negative(n){return this.check(gh(0,n))},nonpositive(n){return this.check(lu(0,n))},multipleOf(n,i){return this.check(bh(n,i))},step(n,i){return this.check(bh(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ns(e){return xk(Ch,e)}var KS=W("ZodNumberFormat",(e,t)=>{P0.init(e,t),Ch.init(e,t)});function Dh(e){return Tk(KS,e)}var YS=W("ZodUnknown",(e,t)=>{$0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Kk(e,r,n,i)});function Ih(){return Ak(YS)}var JS=W("ZodNever",(e,t)=>{M0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gk(e,r,n,i)});function XS(e){return Ok(JS,e)}var QS=W("ZodArray",(e,t)=>{F0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qk(e,r,n,i),e.element=t.element,Fs(e,"ZodArray",{min(r,n){return this.check(Jo(r,n))},nonempty(r){return this.check(Jo(1,r))},max(r,n){return this.check(_h(r,n))},length(r,n){return this.check(wh(r,n))},unwrap(){return this.element}})});function Ph(e,t){return Uk(QS,e,t)}var e1=W("ZodObject",(e,t)=>{R0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>eS(e,r,n,i),Ve(e,"shape",()=>t.shape),Fs(e,"ZodObject",{keyof(){return s1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Ih()})},loose(){return this.clone({...this._zod.def,catchall:Ih()})},strict(){return this.clone({...this._zod.def,catchall:XS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return nw(this,r)},safeExtend(r){return iw(this,r)},merge(r){return sw(this,r)},pick(r){return tw(this,r)},omit(r){return rw(this,r)},partial(...r){return ow($h,this,r[0])},required(...r){return aw(Nh,this,r[0])}})});function cu(e,t){return new e1({type:"object",shape:e??{},...be(t)})}var t1=W("ZodUnion",(e,t)=>{L0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tS(e,r,n,i),e.options=t.options});function r1(e,t){return new t1({type:"union",options:e,...be(t)})}var n1=W("ZodIntersection",(e,t)=>{z0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rS(e,r,n,i)});function i1(e,t){return new n1({type:"intersection",left:e,right:t})}var du=W("ZodEnum",(e,t)=>{U0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Yk(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const o of n)if(r.has(o))s[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new du({...t,checks:[],...be(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const o of n)if(r.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new du({...t,checks:[],...be(i),entries:s})}});function s1(e,t){return new du({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...be(t)})}var o1=W("ZodTransform",(e,t)=>{q0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Xk(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new zf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push($s(s,r.value,t));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push($s(o))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function a1(e){return new o1({type:"transform",transform:e})}var $h=W("ZodOptional",(e,t)=>{ch.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Mh(e){return new $h({type:"optional",innerType:e})}var l1=W("ZodExactOptional",(e,t)=>{V0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function u1(e){return new l1({type:"optional",innerType:e})}var c1=W("ZodNullable",(e,t)=>{B0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>nS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Fh(e){return new c1({type:"nullable",innerType:e})}var d1=W("ZodDefault",(e,t)=>{j0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>sS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function f1(e,t){return new d1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():jf(t)}})}var h1=W("ZodPrefault",(e,t)=>{Z0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>oS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function p1(e,t){return new h1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():jf(t)}})}var Nh=W("ZodNonOptional",(e,t)=>{W0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>iS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function m1(e,t){return new Nh({type:"nonoptional",innerType:e,...be(t)})}var v1=W("ZodCatch",(e,t)=>{H0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>aS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function g1(e,t){return new v1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var y1=W("ZodPipe",(e,t)=>{G0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lS(e,r,n,i),e.in=t.in,e.out=t.out});function Rh(e,t){return new y1({type:"pipe",in:e,out:t})}var b1=W("ZodReadonly",(e,t)=>{K0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>uS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function _1(e){return new b1({type:"readonly",innerType:e})}var Lh=W("ZodCustom",(e,t)=>{Y0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Jk(e,r,n,i)});function w1(e,t={}){return qk(Lh,e,t)}function k1(e,t){return Vk(e,t)}function S1(e,t={}){const r=new Lh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...be(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var E1=cu({id:Ns(),customer:cu({customer_salutation_id:Ns().positive({message:"user.fieldErrors.titleRequire"}),name:lr().min(1,{message:"user.fieldErrors.nameRequire"}),surname:lr().min(1,{message:"user.fieldErrors.surnameRequire"}),email:lr().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:lr().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:lr().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:lr().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:lr().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Ns().positive().default(60),language_id:Ns().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),oF=cu({ticket_sale_id:Ns(),start_at:lr().date(),personalizations:Ph(E1)});function fu(e,t){return e-t*Math.floor(e/t)}var zh=1721426;function ea(e,t,r,n){t=hu(e,t);let i=t-1,s=-2;return r<=2?s=0:ta(t)&&(s=-1),zh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function ta(e){return e%4===0&&(e%100!==0||e%400===0)}function hu(e,t){return e==="BC"?1-t:t}function x1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var T1={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]},Ii=class{fromJulianDay(e){let t=e,r=t-zh,n=Math.floor(r/146097),i=fu(r,146097),s=Math.floor(i/36524),o=fu(i,36524),a=Math.floor(o/1461),l=fu(o,1461),c=Math.floor(l/365),[d,u]=x1(n*400+s*100+a*4+c+(s!==4&&c!==4?1:0)),p=t-ea(d,u,1,1),f=2;t<ea(d,u,3,1)?f=0:ta(u)&&(f=1);let g=Math.floor(((p+f)*12+373)/367);return new Us(d,u,g,t-ea(d,u,g,1)+1)}toJulianDay(e){return ea(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return T1[ta(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ta(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"}},A1={"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 An(e,t){return t=Kt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function pu(e,t){return t=Kt(t,e.calendar),e=vu(e),t=vu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function O1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function C1(e,t){return An(e,Qn(t))}var D1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Uh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?D1[r]:F1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function I1(e){return Vr(Date.now(),e)}function Qn(e){return L1(I1(e))}function qh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Vh(e,t){return Bh(e)-Bh(t)}function Bh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var mu=null,P1=!1;function qt(){return mu==null&&(mu=new Intl.DateTimeFormat().resolvedOptions().timeZone),mu}function jh(){return P1}function vu(e){return e.subtract({days:e.day-1})}function $1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Zh=new Map,gu=new Map;function M1(e){if(Intl.Locale){let r=Zh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Zh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function F1(e){let t=gu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return gu.set(e,t),t.firstDay}let r=M1(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&A1[r]||0};gu.set(e,t)}return t.firstDay}function On(e){return e=Kt(e,new Ii),Wh(hu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Wh(e,t,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(e,t-1,r),a.getTime()}function Rs(e,t){if(t==="UTC")return 0;if(e>0&&t===qt()&&!jh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=Gh(e,t);return Wh(r,n,i,s,o,a,0)-Math.floor(e/1e3)*1e3}var Hh=new Map;function Gh(e,t){let r=Hh.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Hh.set(t,r));let n=r.formatToParts(new Date(e)),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}}var ra=864e5;function N1(e,t){let r=On(e);return Kh(e,t,r-Rs(r-ra,t),r-Rs(r+ra,t))}function Kh(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>R1(e,t,i))}function R1(e,t,r){let n=Gh(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function qr(e,t,r="compatible"){let n=Cn(e);if(t==="UTC")return On(n);if(t===qt()&&r==="compatible"&&!jh()){n=Kt(n,new Ii);let l=new Date,c=hu(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=On(n),s=Rs(i-ra,t),o=Rs(i+ra,t),a=Kh(n,t,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 Yh(e,t,r="compatible"){return new Date(qr(e,t,r))}function Vr(e,t){let r=Rs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new Dn(i<1?"BC":"AD",i<1?-i+1:i,s,o,t,r,a,l,c,d)}function L1(e){return new Us(e.calendar,e.era,e.year,e.month,e.day)}function Cn(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Pi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function z1(e){return new Q1(e.hour,e.minute,e.second,e.millisecond)}function Kt(e,t){if(O1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,ei(n),n}function U1(e,t,r){return e instanceof Dn?e.timeZone===t?e:Jh(e,t):Vr(qr(e,t,r),t)}function q1(e){let t=On(e)-e.offset;return new Date(t)}function Jh(e,t){return Kt(Vr(On(e)-e.offset,t),e.calendar)}var Ls=36e5;function na(e,t){let r=e.copy(),n="hour"in r?tp(r,t):0;yu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,bu(r),Xh(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,V1(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 yu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function bu(e){for(;e.month<1;)yu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,yu(e,1)}function V1(e){for(;e.day<1;)e.month--,bu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,bu(e)}function Xh(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ei(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Xh(e)}function _u(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function Qh(e,t){return na(e,_u(t))}function wu(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),ei(r),r}function zs(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),ep(r),r}function B1(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ia(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ia(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ia(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ia(e.hour,24),t}function ep(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ia(e,t){let r=e%t;return r<0&&(r+=t),r}function tp(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,B1(e)}function rp(e,t){let r=e.copy();return tp(r,t),r}function j1(e,t){return rp(e,_u(t))}function ku(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),o=s.indexOf(e.era);if(o<0)throw new Error("Invalid era: "+e.era);o=nn(o,r,0,s.length-1,n?.round),i.era=s[o],ei(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=nn(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=nn(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=nn(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),ei(i),i}function Su(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=nn(s,r,o,a,n?.round);break}case"minute":i.minute=nn(e.minute,r,0,59,n?.round);break;case"second":i.second=nn(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=nn(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function nn(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function np(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=qr(na(Cn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=On(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,Kt(Vr(r,e.timeZone),e.calendar)}function Z1(e,t){return np(e,_u(t))}function W1(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let o=Cn(e),a=Kt(zs(o,{hour:i}),new Ii),l=[qr(a,e.timeZone,"earlier"),qr(a,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===a.day)[0],c=Kt(zs(o,{hour:s}),new Ii),d=[qr(c,e.timeZone,"earlier"),qr(c,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===c.day).pop(),u=On(e)-e.offset,p=Math.floor(u/Ls),f=u%Ls;return u=nn(p,r,Math.floor(l/Ls),Math.floor(d/Ls),n?.round)*Ls+f,Kt(Vr(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Su(e,t,r,n);case"era":case"year":case"month":case"day":return Kt(Vr(qr(ku(Cn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function H1(e,t,r){let n=Cn(e),i=zs(wu(n,t),t);return i.compare(n)===0?e:Kt(Vr(qr(i,e.timeZone,r),e.timeZone),e.calendar)}var G1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,K1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Y1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Eu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,J1=["hours","minutes","seconds"],aF=["years","months","weeks","days",...J1];function sa(e){let t=e.match(G1);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Us(Le(t[1],0,9999),Le(t[2],1,12),1);return r.day=Le(t[3],1,r.calendar.getDaysInMonth(r)),r}function ip(e){let t=e.match(K1);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Le(t[1],-9999,9999),n=new Pi(r<1?"BC":"AD",r<1?-r+1:r,Le(t[2],1,12),1,t[4]?Le(t[4],0,23):0,t[5]?Le(t[5],0,59):0,t[6]?Le(t[6],0,59):0,t[7]?Le(t[7],0,1/0)*1e3:0);return n.day=Le(t[3],0,n.calendar.getDaysInMonth(n)),n}function sp(e,t){let r=e.match(Y1);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Le(r[1],-9999,9999),i=new Dn(n<1?"BC":"AD",n<1?-n+1:n,Le(r[2],1,12),1,r[11],0,r[4]?Le(r[4],0,23):0,r[5]?Le(r[5],0,59):0,r[6]?Le(r[6],0,59):0,r[7]?Le(r[7],0,1/0)*1e3:0);i.day=Le(r[3],0,i.calendar.getDaysInMonth(i));let s=Cn(i),o;if(r[8]){let a=Le(r[8],-23,23);if(i.offset=Math.sign(a)*(Math.abs(a)*36e5+Le(r[9]??"0",0,59)*6e4+Le(r[10]??"0",0,59)*1e3),o=On(i)-i.offset,!N1(s,i.timeZone).includes(o))throw new Error(`Offset ${up(i.offset)} is invalid for ${xu(i)} in ${i.timeZone}`)}else o=qr(Cn(s),i.timeZone,t);return Vr(o,i.timeZone)}function op(e,t){let r=e.match(Eu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Le(r[1],-9999,9999),i=new Dn(n<1?"BC":"AD",n<1?-n+1:n,Le(r[2],1,12),1,t,0,r[4]?Le(r[4],0,23):0,r[5]?Le(r[5],0,59):0,r[6]?Le(r[6],0,59):0,r[7]?Le(r[7],0,1/0)*1e3:0);return i.day=Le(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Le(r[8],-23,23)*36e5+Le(r[9]??"0",0,59)*6e4),Jh(i,t)}function Le(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function ap(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function lp(e){let t=Kt(e,new Ii),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function xu(e){return`${lp(e)}T${ap(e)}`}function up(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function X1(e){return`${xu(e)}${up(e.offset)}[${e.timeZone}]`}function Tu(e){let t=typeof e[0]=="object"?e.shift():new Ii,r;if(typeof e[0]=="string")r=e.shift();else{let o=t.getEras();r=o[o.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var Us=class od{#e;constructor(...t){let[r,n,i,s,o]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,ei(this)}copy(){return this.era?new od(this.calendar,this.era,this.year,this.month,this.day):new od(this.calendar,this.year,this.month,this.day)}add(t){return na(this,t)}subtract(t){return Qh(this,t)}set(t){return wu(this,t)}cycle(t,r,n){return ku(this,t,r,n)}toDate(t){return Yh(this,t)}toString(){return lp(this)}compare(t){return qh(this,t)}},Q1=class Xg{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,ep(this)}copy(){return new Xg(this.hour,this.minute,this.second,this.millisecond)}add(t){return rp(this,t)}subtract(t){return j1(this,t)}set(t){return zs(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toString(){return ap(this)}compare(t){return Vh(this,t)}},Pi=class ad{#e;constructor(...t){let[r,n,i,s,o]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ei(this)}copy(){return this.era?new ad(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new ad(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return na(this,t)}subtract(t){return Qh(this,t)}set(t){return wu(zs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return ku(this,t,r,n);default:return Su(this,t,r,n)}}toDate(t,r){return Yh(this,t,r)}toString(){return xu(this)}compare(t){let r=qh(this,t);return r===0?Vh(this,Cn(t)):r}},Dn=class ld{#e;constructor(...t){let[r,n,i,s,o]=Tu(t),a=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ei(this)}copy(){return this.era?new ld(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new ld(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return np(this,t)}subtract(t){return Z1(this,t)}set(t,r){return H1(this,t,r)}cycle(t,r,n){return W1(this,t,r,n)}toDate(){return q1(this)}toString(){return X1(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-U1(t,this.timeZone).toDate().getTime()}},Au=new Map,kr=class{constructor(e,t={}){this.formatter=cp(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return rE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=nE(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}},eE={true:{ja:"h11"},false:{}};function cp(e,t={}){if(typeof t.hour12=="boolean"&&tE()){t={...t};let i=eE[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Au.has(r))return Au.get(r);let n=new Intl.DateTimeFormat(e,t);return Au.set(r,n),n}var Ou=null;function tE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Ou}var Cu=null;function rE(){return Cu==null&&(Cu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Cu}function nE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=cp(e,{...t,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 qs(e){return z1(op(e,"Europe/Berlin")).toString().slice(0,-3)}function Vs(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=op(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new kr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function oa(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function Du(e){return e?.type==="Ticket"}function aa(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function In(e,t=""){return j_(Object.values(e).map(r=>aa(r,{selectedTime:t})),r=>r.shop_order)}function Pn(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var iE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!Du(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager;s.clearPrecart();for(const l of[...n.items,...t.items]){const c=l.product;Du(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 Bs(e){return e?.type==="Event"}function sE(e){return Bs(e)&&e.subtype==="scale"}function oE(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};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=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Iu(e,t,r){return oE(e,t,r)}var aE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!Bs(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const o=Math.min(s.max||100,s.max_per_registration||100,s.available??100),a={max_per_registration:o,available:100,overbook:!1,...s};let l=o;a.overbook&&(l=Math.min(a.max||100,a.max_per_registration||100));const c=n.totalQuantity,d=En(t.items.filter(p=>n.items.some(f=>f.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-d-c+r.quantity,0);return{max:u,min:a.min??0,unavailable:a.available===0,bookedOut:u===0}},lE=function(e,t,r,n){if(e.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 uE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=En(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(o=>({timeslot:t,ticket:o,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r){return(Xl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.capacity))??0)+this.getPrecartItemQuantity(t)},totalCapacity(t,r){return Xl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(o=>r.includes(o))));const i=B_(n,s=>s.timeSlot);return Object.values(i).map(s=>Z_(W_(s.flatMap(o=>o.tickets)).map(o=>Xl(s.filter(a=>a.tickets.includes(o)),a=>a.capacity)).filter(o=>o!==null),o=>o.capacity)??s[0]).sort((s,o)=>s.timeSlot.localeCompare(o.timeSlot))}}}function cE(e){let t=0;ws(()=>{ge(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function pt(e,t){return{quantity:0,time:"",...t??{},type:e.type,product:e,orderAttributes(){const r={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(e.type){case"Ticket":return{...r,time:this.time,quantity:this.quantity};case"Event":switch(e.subtype){case"flat":return{...r,quantity:this.quantity};case"scale":return{...r,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...r,quantity:this.quantity};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const r=[];return this.time&&r.push(`time: ${this.time}`),sE(this.product)&&r.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&r.push("discounted"),r.length>0?` (${r.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 ur(this.price_cents)},get final_price_cents(){const r=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*r},get final_price_formatted(){return ur(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return ur(this.total_price_cents)}}}var lF=15*6e4;function la(){return typeof window<"u"&&typeof localStorage<"u"}function dE(e,t){if(la())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Pu(e){if(!la())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function dp(e){if(la())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function fp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var hp="go-cart",ua=(e,t)=>localStorage.setItem(hp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function fE(e){const t=e.product.type;switch(t){case"Ticket":return pp(e)?pt(aa(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity}):void 0;case"Event":return pp(e)?pt(Iu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return pt(fp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function hE(e){let t=[],r=[],n;try{const i=localStorage.getItem(hp);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),ua([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(fE).filter(gE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.items)}catch(i){return console.error(i),ua([],[]),[]}}function pE(e){hE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});ua(e.items||[],e.coupons||[]),ws(()=>{ge(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,ua(e.items||[],e.coupons||[]))})})}var mE=e=>new Date<new Date(e),vE=e=>sa(e.slice(0,10)).compare(Qn(qt()))>=0,pp=e=>e.time?e.product.subtype==="day"?vE(e.time):mE(e.time):!0,gE=e=>e!==void 0,yE=0;function $i(e,t=20){const r={items:Fe([]),coupons:Fe([]),paymentModeId:void 0,uid:`cart-${yE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,En(this.items,n=>n.total_price_cents))},get totalQuantity(){return En(this.items,n=>n.quantity)},get valueVoucherCents(){return En(this.coupons.filter(n=>n.kind==="valueVoucher"),n=>n.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(n=>n.uuid+":"+n.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(n=>({type:n.type,attributes:n.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??O.settings?.defaultPaymentModeId,coupons:this.coupons.map(n=>n.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return ur(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(n){for(let i=this.items.length-1;i>=0;i--)this.items[i].uuid===n.uuid&&this.items.splice(i,1)},addItem(n){const i=this.items.find(s=>s.uuid===n.uuid);i?i.quantity+=n.quantity:this.items.push(n)},addItems(n){n.forEach(i=>this.addItem(i))},addCoupon(n){const i={...n,code:n.code.toUpperCase()};this.coupons.some(s=>s.code===i.code)||this.coupons.push(i)},removeCoupon(n){const i=n.toUpperCase(),s=this.coupons.findIndex(o=>o.code===i);s>-1&&this.coupons.splice(s,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(n=>r.addItem(pt(n))),r}function ur(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function bE(){const e=Fe($i());return pE(e),cE(e),e}var Mi="go-capacity";function mp(e,t){const r=Pu(Mi);dE(Mi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function vp(e){const t=Pu(Mi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){dp(Mi);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function _E(e){la()&&window.addEventListener("storage",t=>{if(t.key===Mi&&vp(e),t.key==="go-cart"){const r=Pu("go-cart");(!r||!r.items||r.items.length===0)&&dp(Mi)}})}function gp(){const e={allSeats:{},allQuotas:{},quotaManager:uE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&mp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&mp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product.subtype;switch(n){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${n}`)}case"Event":const i=t.product.subtype;switch(i){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Coupon":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:iE,seats:aE,unlimited:lE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ne(()=>s(this,t,r,n))}};return vp(e),_E(e),e}function yp(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var bp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},wE=class extends bp{constructor(){super()}get isLoggedIn(){try{const e=yp("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=yp("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},kE=class extends bp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},SE=e=>{switch(e){case"angular":return new wE;case"jmb":return new kE;default:throw new Error("Unhandled shop type: "+e)}};function EE(e){return e==null||typeof e=="string"&&e.trim()===""}function xE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||EE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function TE(e,t){return xE(e,t)}var AE={withStackTrace:!1},_p=(e,t,r=AE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ti(e,t,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(d){try{c(n.next(d))}catch(u){o(u)}}function l(d){try{c(n.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function wp(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Br(e){return this instanceof Br?(this.v=e,this):new Br(e)}function kp(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(f){return function(g){return Promise.resolve(g).then(f,u)}}function a(f,g){n[f]&&(i[f]=function(m){return new Promise(function(v,_){s.push([f,m,v,_])>1||l(f,m)})},g&&(i[f]=g(i[f])))}function l(f,g){try{c(n[f](g))}catch(m){p(s[0][3],m)}}function c(f){f.value instanceof Br?Promise.resolve(f.value.v).then(d,u):p(s[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function p(f,g){f(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function OE(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(o){return(r=!r)?{value:Br(e[i](o)),done:!1}:s?s(o):o}:s}}function CE(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof wp=="function"?wp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[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)}}var ri=class vr{constructor(t){this._promise=t}static fromSafePromise(t){return new vr(t.then(r=>new Zr(r)))}static fromPromise(t,r){return new vr(t.then(n=>new Zr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new vr(ti(this,void 0,void 0,function*(){try{return new Zr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return DE(t)}static combineWithAllErrors(t){return IE(t)}map(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Zr(yield t(r.value))})))}andThrough(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Zr(r.value)})))}andTee(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Zr(r.value)})))}orTee(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isOk())return new Zr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Zr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new vr(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof vr?n._promise:n}))}orElse(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Zr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return kp(this,arguments,function*(){return yield Br(yield Br(yield*OE(CE(yield Br(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return kp(this,arguments,function*(){const r=yield Br(this._promise);return r.isErr()&&(yield yield Br(ca(r.error))),yield Br(r.value)})}};function ca(e){return new ri(Promise.resolve(new Sr(e)))}var uF=ri.fromPromise,cF=ri.fromSafePromise,dF=ri.fromThrowable,Sp=e=>{let t=$n([]);for(const r of e)if(r.isErr()){t=jr(r.error);break}else t.map(n=>n.push(r.value));return t},DE=e=>ri.fromSafePromise(Promise.all(e)).andThen(Sp),Ep=e=>{let t=$n([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=jr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},IE=e=>ri.fromSafePromise(Promise.all(e)).andThen(Ep),$u;(function(e){function t(i,s){return(...o)=>{try{return $n(i(...o))}catch(a){return jr(s?s(a):a)}}}e.fromThrowable=t;function r(i){return Sp(i)}e.combine=r;function n(i){return Ep(i)}e.combineWithAllErrors=n})($u||($u={}));function $n(e){return new Zr(e)}function jr(e){return new Sr(e)}var Zr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $n(e(this.value))}mapErr(e){return $n(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return $n(this.value)}orTee(e){return $n(this.value)}orElse(e){return $n(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ri.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw _p("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return jr(this.error)}mapErr(e){return jr(e(this.error))}andThrough(e){return jr(this.error)}andTee(e){return jr(this.error)}orTee(e){try{e(this.error)}catch{}return jr(this.error)}andThen(e){return jr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return ca(this.error)}asyncAndThrough(e){return ca(this.error)}asyncMap(e){return ca(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield jr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw _p("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},fF=$u.fromThrowable,PE=/\{[^{}]+\}/g,$E=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function ME(){return Math.random().toString(36).slice(2,11)}function FE(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:o,headers:a,requestInitExt:l=void 0,...c}={...e};l=$E()?l:void 0,t=Cp(t);const d=[];async function u(p,f){const{baseUrl:g,fetch:m=n,Request:v=r,headers:_,params:k={},parseAs:A="json",querySerializer:E,bodySerializer:T=s??RE,pathSerializer:C,body:$,middleware:R=[],...U}=f||{};let N=t;g&&(N=Cp(g)??t);let le=typeof i=="function"?i:Ap(i);E&&(le=typeof E=="function"?E:Ap({...typeof i=="object"?i:{},...E}));const V=C||o||NE,ae=$===void 0?void 0:T($,Op(a,_,k.header)),me=Op(ae===void 0||ae instanceof FormData?{}:{"Content-Type":"application/json"},a,_,k.header),J=[...d,...R],oe={redirect:"follow",...c,...U,body:ae,headers:me};let G,Q,K=new v(LE(p,{baseUrl:N,params:k,querySerializer:le,pathSerializer:V}),oe),H;for(const P in U)P in K||(K[P]=U[P]);if(J.length){G=ME(),Q=Object.freeze({baseUrl:N,fetch:m,parseAs:A,querySerializer:le,bodySerializer:T,pathSerializer:V});for(const P of J)if(P&&typeof P=="object"&&typeof P.onRequest=="function"){const ue=await P.onRequest({request:K,schemaPath:p,params:k,options:Q,id:G});if(ue)if(ue instanceof v)K=ue;else if(ue instanceof Response){H=ue;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!H){try{H=await m(K,l)}catch(P){let ue=P;if(J.length)for(let z=J.length-1;z>=0;z--){const ve=J[z];if(ve&&typeof ve=="object"&&typeof ve.onError=="function"){const fe=await ve.onError({request:K,error:ue,schemaPath:p,params:k,options:Q,id:G});if(fe){if(fe instanceof Response){ue=void 0,H=fe;break}if(fe instanceof Error){ue=fe;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ue)throw ue}if(J.length)for(let P=J.length-1;P>=0;P--){const ue=J[P];if(ue&&typeof ue=="object"&&typeof ue.onResponse=="function"){const z=await ue.onResponse({request:K,response:H,schemaPath:p,params:k,options:Q,id:G});if(z){if(!(z instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");H=z}}}}const B=H.headers.get("Content-Length");if(H.status===204||K.method==="HEAD"||B==="0"&&!H.headers.get("Transfer-Encoding")?.includes("chunked"))return H.ok?{data:void 0,response:H}:{error:void 0,response:H};if(H.ok)return{data:await(async()=>{if(A==="stream")return H.body;if(A==="json"&&!B){const ue=await H.text();return ue?JSON.parse(ue):void 0}return await H[A]()})(),response:H};let ee=await H.text();try{ee=JSON.parse(ee)}catch{}return{error:ee,response:H}}return{request(p,f,g){return u(f,{...g,method:p.toUpperCase()})},GET(p,f){return u(p,{...f,method:"GET"})},PUT(p,f){return u(p,{...f,method:"PUT"})},POST(p,f){return u(p,{...f,method:"POST"})},DELETE(p,f){return u(p,{...f,method:"DELETE"})},OPTIONS(p,f){return u(p,{...f,method:"OPTIONS"})},HEAD(p,f){return u(p,{...f,method:"HEAD"})},PATCH(p,f){return u(p,{...f,method:"PATCH"})},TRACE(p,f){return u(p,{...f,method:"TRACE"})},use(...p){for(const f of p)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");d.push(f)}},eject(...p){for(const f of p){const g=d.indexOf(f);g!==-1&&d.splice(g,1)}}}}function da(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function xp(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const a in t)n.push(a,r.allowReserved===!0?t[a]:encodeURIComponent(t[a]));const o=n.join(",");switch(r.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const a=r.style==="deepObject"?`${e}[${o}]`:o;n.push(da(a,t[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Tp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?t:t.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(da(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Ap(e){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)){if(s.length===0)continue;n.push(Tp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(xp(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(da(i,s,e))}}return n.join("&")}}function NE(e,t){let r=e;for(const n of e.match(PE)??[]){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)),!t||t[i]===void 0||t[i]===null)continue;const a=t[i];if(Array.isArray(a)){r=r.replace(n,Tp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,xp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${da(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function RE(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function LE(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function Op(...e){const t=new Headers;for(const r of e){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)t.delete(i);else if(Array.isArray(s))for(const o of s)t.append(i,o);else s!==void 0&&t.set(i,s)}return t}function Cp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function zE(e,t){return FE({baseUrl:e,headers:{"X-Shop-Url":t}})}var UE="/api/v4/calendar",qE="/api/v4/tickets/calendar",VE="/api/v4/auth/validate_token",BE="/api/v4/tickets/list_and_quotas",jE="/api/v4/tickets",ZE="/api/v4/auth/sign_in",WE="/api/v4/auth",HE="/api/v4/orders/withdrawals",Dp={SHOP_GUEST:10,SHOP:20},GE={error:{success:!1,errors:["Not signed in"]}},KE=class{type;#e=te(Fe({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),h(this.#e).urls=N_(this.type),h(this.#e).currentUser=SE(this.type),h(this.#e).apiUrl=e,h(this.#e).shopDomain=t,h(this.#e).locale=r||"de",this.#t={},h(this.#e).client=zE(e,t),h(this.#e).capacityManager=gp(),h(this.#e).cart=bE(),h(this.#e).auth=new Rf,h(this.#e).client.use(new G_(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return h(this.#e).capacityManager||(h(this.#e).capacityManager=gp()),h(this.#e).capacityManager}get cart(){return h(this.#e).cart}get auth(){return h(this.#e).auth||(h(this.#e).auth=new Rf),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,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}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)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(VE,"getCustomer","",{cache:5}):GE}ticketsCalendar(e){return this.fetchAndCache(qE,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(UE,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(BE,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:kt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(jE,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:kt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:kt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(ZE,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=kt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Dp.SHOP_GUEST:Dp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(WE,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(HE,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:kt({per_page:100},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 t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}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,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),h(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),o=!this.#t[s],a=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(o||a)&&this.apiGet(e,i,n.path).then(l=>{l&&(h(this.#e)[t]=r===""?l:l[r])}),h(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}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,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:kt(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,o=TE(r,i);if(Object.keys(o).length>0)return{error:{errors:o}};const a=this.client[t.method];return await a(e,{body:r,params:kt(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await z_(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=kt(i,{params:{query:t}})),e&&(i=kt(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#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.")}},O=new KE;function Fi(e){return function(t,r){if(t)t.addEventListener(e,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.")}}var YE=class Qg{host;KEY;pollDuration;#e=te(Fe({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new Qg(null,null);return r.value=t,r}load(){Yl(()=>(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(t){h(this.#e).value=t}};function Ni(e){return function(t,r={pollDuration:1e3}){if(t){const n=new YE(t,e,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.")}}var JE={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},XE=class{defaultConfig=kt(JE,window.customOptions);override=this.defaultConfig;#e=te(Fe(this.defaultConfig));get options(){return h(this.#e)}set options(e){I(this.#e,e,!0)}constructor(){this.update()}update(){const e=kt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=kt(this.override,e),this.update(),this}default(e){return this.defaultConfig=kt(this.defaultConfig,e),this.update(),this}},We=new XE,Ip=class{#e=te();get token(){return h(this.#e)}set token(e){I(this.#e,e,!0)}#t=te();get ticketSaleId(){return h(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){if(this.token)return cl(O.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return cl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return We.config.urls.annualTicketPersonalizationForm?We.config.urls.annualTicketPersonalizationForm(this.token,e.id):O.urls.annualTicketPersonalizationForm(this.token,e.id)}},Pp="go-annual-ticket-personalization",$p=Fi(Pp),QE=Ni(Pp),ex=j("<li><a> </a></li>"),tx=j('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function rx(e,t){re(t,!0);let r=b(t,"token",7);const n=new Ip;$p(t.$$host,n),ge(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=Y(),a=q(o),l=c=>{var d=Y(),u=q(d);qe(u,17,()=>h(i).ticket_sales,p=>p.id,(p,f)=>{var g=tx(),m=F(g),v=F(m,!0);M(m);var _=X(m,2),k=F(_,!0);M(_);var A=X(_,2),E=T=>{var C=ex(),$=F(C),R=F($,!0);M($),M(C),ce((U,N)=>{pe($,"href",U),se(R,N)},[()=>n.goToPersonalization(h(f)),()=>O.t("ticket.annual.personalization.list.personalize.add")]),x(T,C)};de(A,T=>{h(f).status=="not_ready_to_send"&&T(E)}),M(g),ce(T=>{pe(g,"data-ticket-sale-id",h(f).id),se(v,h(f).title),se(k,T)},[()=>O.t("ticket.annual.personalization.detail.title",{count:h(f).personalizations.length})]),x(p,g)}),x(c,d)};return de(a,c=>{h(i)&&c(l)}),x(e,o),ne(s)}customElements.define("go-annual-ticket-personalization",ie(rx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var nx={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>O.customerSalutations.map(e=>({label:e.salutation,value:e.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:lr().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:lr().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:lr().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:()=>O.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>O.locales.map(e=>({label:O.t(`languages.${e.locale}`),value:e.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:lr().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:S1(File)},withdrawalFirstName:{key:"withdrawalFirstName",apiKey:"first_name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},withdrawalLastName:{key:"withdrawalLastName",apiKey:"last_name",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},orderNumber:{key:"orderNumber",apiKey:"order_id",type:"text",label:"withdrawal.form.orderNumber",placeholder:"",description:"",autocomplete:"off"},withdrawalNote:{key:"withdrawalNote",apiKey:"note",type:"textarea",label:"withdrawal.form.note",placeholder:"",description:"",autocomplete:"off"},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(O.payment_modes?Object.values(O.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function ix(e,t){return{...e,errors:e.errors||[],value:e.value??sx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){ox(this)}}}function sx(e){return e==="checkbox"?!1:e==="file"?null:""}function ox(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var cr=class Qa{static#e={};static defineForm(t){We.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){We.default({fields:t})}static{Qa.defineFields(nx)}static setRequiredApiKeys(t,r){Qa.#e[t]=r}static getFormOptions(t){return We.config.forms[t]}static createField(t,r){const n=Qa.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return ix(n,r)}static getFormFields(t){return ax(t)}static getFieldInit(t){return We.config.fields[t]}};function ax(e){const t=We.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function Mu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function lx(e,t){re(t,!0);let r=b(t,"token",7),n=b(t,"ticketSaleId",7),i;const s=new Ip;$p(t.$$host,s),ge(()=>{s.token=r(),s.ticketSaleId=n()}),cr.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const m=s.ticketSale.personalizations.length,v=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),_=Nf(m,(T,C)=>{const $=v[C-1].details;return T.push($),T},[]);if(_.forEach(T=>{T.fields.forEach(C=>{T.validateField(C)})}),!Nf(m,(T,C)=>_[C-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const T=_.map(async($,R)=>{const U=s.ticketSale.personalizations[R].id,N=$.fields.find(V=>V.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const le=await O.uploadPersonalizationPhoto(r(),U,N);return le.error?{ok:!1,error:le.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),C=(await Promise.all(T)).find($=>!$.ok);if(C){i.details.apiErrors=[C.error];return}}const k={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:_.map((T,C)=>{const $=H_(T.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[C].id,customer:$}})}},A=await O.finalizePersonalizations(r(),k);if(A.error){i.details.apiErrors=[A.error.error];return}const E=We.config.forms.personalization?.beforeSubmit;E&&E(k),We.config.urls.annualTicketPersonalizationFormSubmit?.()&&We.config.navigateTo(We.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function p(){return a?!0:(a=t.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),a.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function f(m){if(!p()||!a||!l||!c)return;const v=a.parentElement;if(!v)return;const _=Math.max(m,1),k=Array.from(v.querySelectorAll("go-personalization-form"));for(;k.length<_;){const E=l.cloneNode(!0);u(E),v.insertBefore(E,c),k.push(E)}for(;k.length>_;){const E=k.pop();E&&E!==a&&E.remove()}const A=s.ticketSale?.personalizations??[];k.forEach((E,T)=>{const C=A[T];C&&(E.dataset.personalizationId=String(C.id))}),d=_}rn(()=>{p(),t.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ge(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==d&&f(m)});var g={details:s,get token(){return r()},set token(m){r(m),y()},get ticketSaleId(){return n()},set ticketSaleId(m){n(m),y()}};return ne(g)}customElements.define("go-annual-ticket-personalization-form",ie(lx,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var ux=class{formId;form;#e=te(Fe([]));#t=D(()=>Mu(this.fields)==0);get isValid(){return h(this.#t)}set isValid(e){I(this.#t,e)}#r=te();get successMessage(){return h(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(r){return V_(r)||U_(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return h(this.#e)}set apiErrors(e){if(this.fields.forEach(t=>t.apiErrors=[]),Jl(e)){I(this.#e,e,!0);return}if(e.errors&&Jl(e.errors)&&I(this.#e,e.errors,!0),q_(e.error)){I(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.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(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},Mp="go-form-details",cx=Fi(Mp),Ri=Ni(Mp);function Mn(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var dx=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 fx(e,t){re(t,!0);let r=b(t,"formId",7),n=b(t,"custom",7);const i=new ux(r(),t.$$host);cx(t.$$host,i);async function s(d){d.preventDefault(),d.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",d)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",d)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}rn(()=>{const d=Mn(t.$$host,"form",{novalidate:!0});d.addEventListener("submit",s),i.form=d});var o={details:i,get formId(){return r()},set formId(d){r(d),y()},get custom(){return n()},set custom(d){n(d),y()}},a=Y(),l=q(a),c=d=>{var u=dx(),p=q(u),f=X(p,2),g=X(f,2),m=F(g,!0);M(g),ce(v=>se(m,v),[()=>O.t(cr.getFormOptions(r())?.submitLabel||"Submit")]),x(d,u)};return de(l,d=>{n()||d(c)}),x(e,a),ne(o)}customElements.define("go-form",ie(fx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var hx=j("<go-form></go-form>",2);function px(e,t){re(t,!0);let r=b(t,"custom",7,!1);cr.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(o){const a=o.target.details,l=await O.passwordReset(a.formData);l.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),a.successMessage=l.data.message,a.apiErrors=[]):a.apiErrors=l.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),y()}},s=hx();return Kn(s,"formId","passwordReset"),ce(()=>Kn(s,"custom",r())),Fo("submit",s,n),x(e,s),ne(i)}customElements.define("go-password-reset",ie(px,{custom:{}},[],[]));function mx(e,t){re(t,!0),cr.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=b(t,"custom",7,!1);async function n(i){const s=i.target.details,o=await O.signIn(s.formData);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return Mn(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-in",ie(mx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function vx(e,t){re(t,!0);let r=b(t,"custom",7,!1);cr.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(i){const s=i.target.details,o=await O.signUp(s.formData,!1);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return Mn(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-up",ie(vx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function gx(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function Fp(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function yx(e){return gx(Fp(e),0)}function bx(e){const t=Fp(e);if(t&&typeof t=="object"){const r=Object.keys(t);if(r.length>0)return Number(r[0])}}function _x(e,t){const r=$i(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,o=bx(s),a=e.items.find(l=>l.type.toLowerCase()===i.type.toLowerCase()&&l.product.id===s.id&&(!s.time||l.time===s.time)&&(o===void 0||Bs(l.product)&&l.product.scale_price_id===o));if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(wx(a,s))}),r}function wx(e,t){const r=yx(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return pt({...e.product,price_cents:n},{quantity:r,time:e.time,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var kx=class{#e=te();get displayCart(){return h(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=te(!1);get preview(){return h(this.#t)}set preview(e){I(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return O.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=O.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await O.createCart({items:t,coupons:r});if(n?.data){this.displayCart=_x(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Np="go-cart-details",Sx=Fi(Np),Li=Ni(Np),Ex=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Rp(e,t){re(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(o){r(o),y()}},i=Ex(),s=F(i,!0);return M(i),ce(()=>se(s,r().product.title)),x(e,i),ne(n)}ie(Rp,{cartItem:{}},[],[],{mode:"open"});var xx=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),Tx=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 Lp(e,t){re(t,!0);let r=b(t,"cartItem",7);if(!Bs(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(f){r(f),y()}},s=Tx(),o=q(s),a=F(o),l=F(a,!0);M(a);var c=X(a),d=F(c,!0);M(c),M(o);var u=X(o),p=f=>{var g=xx(),m=q(g),v=F(m,!0);M(m);var _=X(m),k=F(_,!0);M(_),ce((A,E)=>{se(v,A),se(k,E)},[()=>Vs(r().time,{month:"numeric",day:"numeric"},O.locale),()=>qs(r().time)]),x(f,g)};return de(u,f=>{r().time&&f(p)}),ce(()=>{se(l,n.event_title),se(d,n.title)}),x(e,s),ne(i)}ie(Lp,{cartItem:{}},[],[],{mode:"open"});var Ax=j('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),Ox=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Cx=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function zp(e,t){re(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=Cx(),s=q(i),o=F(s,!0);M(s);var a=X(s,2),l=c=>{var d=Ox(),u=q(d),p=F(u,!0);M(u);var f=X(u,2),g=m=>{var v=Ax(),_=F(v,!0);M(v),ce(k=>se(_,k),[()=>qs(r().time)]),x(m,v)};de(f,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),ce(m=>se(p,m),[()=>Vs(r().time,{month:"numeric",day:"numeric"},O.locale)]),x(c,d)};return de(a,c=>{r().time&&c(l)}),ce(()=>se(o,r().product.title)),x(e,i),ne(n)}ie(zp,{cartItem:{}},[],[],{mode:"open"});function Up(e,{min:t,max:r}){const n=e===0?Math.max(t,1):e+1;return n>r?e:n}function Dx(e,{min:t}){return e<=t?0:e-1}function Ix(e,{min:t,max:r}){if(!Number.isFinite(e)||e<=0)return 0;let n=Math.floor(e);return n<t&&(n=t),n>r&&(n=r),n}function Px(e,{min:t,max:r}){return e<0||e>r?!1:e===0||e>=t}function qp(e,t){return Up(e,t)>e}function Vp(e){return e>0}var $x=j('<div class="go-quantity-stepper" role="group"><button type="button" class="go-quantity-stepper-button go-quantity-stepper-decrement" tabindex="-1"><span aria-hidden="true">−</span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Fu(e,t){const r=ht();re(t,!0);let n=b(t,"value",7),i=b(t,"min",7),s=b(t,"max",7),o=b(t,"label",7),a=b(t,"decreaseLabel",7),l=b(t,"increaseLabel",7),c=b(t,"onChange",7),d,u=te(!1);const p=D(()=>!Vp(n())),f=D(()=>!qp(n(),{min:i(),max:s()}));function g(U){U!==n()&&c()(U)}function m(){Vp(n())&&g(Dx(n(),{min:i(),max:s()}))}function v(){qp(n(),{min:i(),max:s()})&&g(Up(n(),{min:i(),max:s()}))}function _(){const U=Ix(parseInt(d.value,10),{min:i(),max:s()});I(u,!1),d.value=String(U),g(U)}function k(){const U=d.value.trim();I(u,!(/^\d+$/.test(U)&&Px(parseInt(U,10),{min:i(),max:s()})))}function A(U){switch(U.key){case"ArrowUp":U.preventDefault(),v();break;case"ArrowDown":U.preventDefault(),m();break;case"Home":U.preventDefault(),g(0);break;case"End":U.preventDefault(),g(s());break;case"Enter":U.preventDefault(),_();break}}var E={get value(){return n()},set value(U){n(U),y()},get min(){return i()},set min(U){i(U),y()},get max(){return s()},set max(U){s(U),y()},get label(){return o()},set label(U){o(U),y()},get decreaseLabel(){return a()},set decreaseLabel(U){a(U),y()},get increaseLabel(){return l()},set increaseLabel(U){l(U),y()},get onChange(){return c()},set onChange(U){c(U),y()}},T=$x(),C=F(T),$=X(C,2);Is($),pe($,"aria-valuemin",0),Gl($,U=>d=U,()=>d);var R=X($,2);return M(T),ce(()=>{pe(T,"aria-label",o()),pe(C,"title",a()),pe(C,"aria-controls",r),pe(C,"aria-disabled",h(p)),pe($,"id",r),pe($,"aria-label",o()),Ll($,n()),pe($,"aria-valuenow",n()),pe($,"aria-valuemax",s()),pe($,"aria-invalid",h(u)?"true":void 0),pe(R,"title",l()),pe(R,"aria-controls",r),pe(R,"aria-disabled",h(f))}),at("click",C,m),at("input",$,k),at("change",$,_),Fo("blur",$,_),at("keydown",$,A),at("click",R,v),x(e,T),ne(E)}br(["click","input","change","keydown"]),ie(Fu,{value:{},min:{},max:{},label:{},decreaseLabel:{},increaseLabel:{},onChange:{}},[],[],{mode:"open"});function Bp(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[fa(n)];if(t<e)return e>n?[fa(e)]:[];const i=Math.max(e,n),s=[fa(n)];for(let o=i;o<=t;o++)o!==n&&s.push(fa(o));return s}function fa(e){return{value:e,label:e.toString()}}var Mx=j('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),Fx=j('<span class="go-cart-item-price-discounted"> </span>'),Nx=j("<span> </span>"),Rx=j("<option> </option>"),Lx=j('<select class="go-cart-item-select"></select>'),zx=j('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),Ux=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 jp(e,t){re(t,!0);const r=D(()=>We.config.quantityStepper);let n=b(t,"displayItem",7),i=b(t,"displayCart",7),s=b(t,"preview",7),o=te(void 0);const a=D(()=>O.cart?.items.find(v=>v.uuid===(n().display?.reference_uuid??n().uuid))),l=$i();ge(()=>{O.cart?.items.map(v=>v.quantity),Ne(()=>{I(o,O.capacityManager.capacity(i(),n(),l),!0)})});function c(v){if(!h(a)){console.error("(CartItem) Could not find main item for line",n());return}h(a).quantity=Math.max(0,h(a).quantity-n().quantity+v)}function d(v){c(parseInt(v.value,10))}function u(){if(!h(a)){console.error("(CartItem) Could not find main item for line",n());return}const v=Math.max(0,h(a).quantity-n().quantity);v===0?O.cart?.deleteItem(h(a)):h(a).quantity=v}var p={get displayItem(){return n()},set displayItem(v){n(v),y()},get displayCart(){return i()},set displayCart(v){i(v),y()},get preview(){return s()},set preview(v){s(v),y()}},f=Y(),g=q(f),m=v=>{var _=Ux(),k=F(_),A=F(k),E=F(A),T=B=>{zp(B,{get cartItem(){return n()}})},C=B=>{Lp(B,{get cartItem(){return n()}})},$=B=>{Rp(B,{get cartItem(){return n()}})};de(E,B=>{n().product.type==="Ticket"?B(T):n().product.type==="Event"?B(C,1):n().product.type==="Coupon"&&B($,2)}),M(A);var R=X(A,2),U=F(R),N=B=>{var ee=Mx(),P=q(ee),ue=F(P,!0);M(P);var z=X(P,2),ve=F(z,!0);M(z),ce((fe,w)=>{se(ue,fe),se(ve,w)},[()=>ur(n().display.originalPrice),()=>ur(n().final_price_cents)]),x(B,ee)},le=B=>{var ee=Fx(),P=F(ee,!0);M(ee),ce(ue=>se(P,ue),[()=>ur(n().final_price_cents)]),x(B,ee)};de(U,B=>{n().display?.discounted?B(N):B(le,-1)}),M(R);var V=X(R,2),ae=F(V),me=B=>{var ee=Nx(),P=F(ee,!0);M(ee),ce(()=>se(P,n().quantity)),x(B,ee)},J=B=>{{let ee=D(()=>n().quantity??0),P=D(()=>O.t("quantity.decrease")),ue=D(()=>O.t("quantity.increase"));Fu(B,{get value(){return h(ee)},get min(){return h(o).min},get max(){return h(o).max},get label(){return n().product.title},get decreaseLabel(){return h(P)},get increaseLabel(){return h(ue)},onChange:c})}},oe=B=>{var ee=Lx();qe(ee,21,()=>Bp(h(o).min,h(o).max,{floor:1}),P=>P.value,(P,ue)=>{var z=Rx(),ve=F(z,!0);M(z);var fe={};ce(()=>{zl(z,n().quantity===h(ue).value),se(ve,h(ue).label),fe!==(fe=h(ue).value)&&(z.value=(z.__value=h(ue).value)??"")}),x(P,z)}),M(ee),ce(P=>pe(ee,"aria-label",P),[()=>O.t("cart.content.table.edit")]),at("change",ee,P=>d(P.target)),x(B,ee)};de(ae,B=>{s()?B(me):h(r)?B(J,1):B(oe,-1)}),M(V);var G=X(V,2),Q=B=>{var ee=zx(),P=F(ee);M(ee),ce(ue=>pe(P,"aria-label",ue),[()=>O.t("cart.item.remove")]),at("click",P,u),x(B,ee)};de(G,B=>{s()||B(Q)});var K=X(G,2),H=F(K,!0);M(K),M(k),M(_),ce(B=>se(H,B),[()=>ur(n().total_price_cents)]),x(v,_)};return de(g,v=>{h(o)&&v(m)}),x(e,f),ne(p)}br(["change","click"]),ie(jp,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var qx=j('<li class="go-cart-header-remove"></li>'),Vx=j('<li class="go-cart-item"><!></li>'),Bx=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 jx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Bx(),c=F(l),d=F(c),u=F(d),p=F(u,!0);M(u);var f=X(u,2),g=F(f,!0);M(f);var m=X(f,2),v=F(m,!0);M(m);var _=X(m,2),k=C=>{var $=qx();x(C,$)};de(_,C=>{h(n).preview||C(k)});var A=X(_,2),E=F(A,!0);M(A),M(d),M(c);var T=X(c,2);qe(T,17,()=>h(n).displayCart.items,C=>C.uuid,(C,$)=>{var R=Vx();jp(F(R),{get displayItem(){return h($)},get displayCart(){return h(n).displayCart},get preview(){return h(n).preview}}),M(R),x(C,R)}),M(l),ce((C,$,R,U)=>{se(p,C),se(g,$),se(v,R),se(E,U)},[()=>O.t("cart.content.table.desc"),()=>O.t("cart.content.table.price"),()=>O.t("cart.content.table.quantity"),()=>O.t("cart.content.table.total")]),x(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)}),x(e,i),ne()}customElements.define("go-cart-items",ie(jx,{},[],[]));var Zx=j('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),Wx=j('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),Hx=j('<ol data-testid="cart-coupons"></ol>');function Gx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Hx();qe(l,21,()=>h(n).displayCart.coupons,c=>c.code,(c,d)=>{var u=Wx();let p;var f=F(u),g=F(f),m=F(g),v=F(m,!0);M(m);var _=X(m,2),k=A=>{var E=Zx(),T=F(E);M(E),ce(C=>pe(T,"aria-label",C),[()=>O.t("cart.coupons.remove")]),at("click",T,()=>O.cart?.removeCoupon(h(d).code)),x(A,E)};de(_,A=>{h(n).preview||A(k)}),M(g),M(f),M(u),ce(()=>{p=Ot(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!h(d).applied}),se(v,h(d).code)}),x(c,u)}),M(l),x(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.coupons.length>0&&a(o)}),x(e,i),ne()}br(["click"]),customElements.define("go-cart-coupons",ie(Gx,{},[],[]));var Kx=j('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function Yx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Kx(),c=F(l,!0);M(l),ce(d=>se(c,d),[()=>ur(h(n).totalPriceCents)]),x(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)}),x(e,i),ne()}customElements.define("go-cart-total-amount",ie(Yx,{},[],[]));function Jx(e,t){re(t,!0);const r=b(t,"preview",7,!1),n=new kx;Sx(t.$$host,n),ge(()=>{n.preview=r()}),ge(()=>{O.cart&&(O.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),O.cart.coupons.map(s=>s.code).join("|"),Ne(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let o=!0;for(const a of s){const l=await a.flush?.();l&&!l.success&&(o=!1)}return o}return t.$$host.addEventListener("click",async s=>{const o=s.target.closest("go-submit");if(!o)return;const a=o.closest("go-form");if(a&&t.$$host.contains(a))return;const l=await i();l&&t.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:l},bubbles:!0,composed:!0}))}),ne({get preview(){return r()},set preview(s=!1){r(s),y()}})}customElements.define("go-cart",ie(Jx,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var Xx=j('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function Qx(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=Xx(),c=F(l,!0);M(l),ce(d=>se(c,d),[()=>ur(h(n).subtotalPriceCents)]),x(a,l)};de(s,a=>{h(n)&&O.cart?.items.length&&a(o)}),x(e,i),ne()}customElements.define("go-cart-subtotal-amount",ie(Qx,{},[],[]));var eT=j('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function tT(e,t){re(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=eT(),c=X(F(l),1,!0);M(l),ce(d=>se(c,d),[()=>ur(h(n).discountedAmountCents)]),x(a,l)};de(s,a=>{h(n)&&h(n).discountedAmountCents>0&&a(o)}),x(e,i),ne()}customElements.define("go-cart-discounted-amount",ie(tT,{},[],[]));function rT(e,t){re(t,!0),Mn(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),ne()}customElements.define("go-cart-empty",ie(rT,{},[],[]));function nT(e,t){re(t,!0);let r=D(()=>O.cart?.items.length);Tt();var n=zt();ce(()=>se(n,h(r))),x(e,n),ne()}customElements.define("go-cart-counter",ie(nT,{},[],[]));function iT(e,t){re(t,!0);let r=b(t,"custom",7,!1),n=D(()=>O.cart);return cr.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}]}),Mn(t.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),t.$$host.addEventListener("submit",async i=>{const s=i.target;if(!h(n))return;const o=await O.signUp(s.details.formData,!0);if(o.error){s.details.apiErrors=o.error.errors;return}const a=s.details.fieldValue("paymentMode");h(n).paymentModeId=a==null?void 0:String(a);const l=await O.checkout(h(n).orderData());if(l.error){s.details.apiErrors=l.error;return}const c=We.config.forms.checkoutGuest?.beforeSubmit;c&&await c(s.details.formData);const d=l.data.meta.payment_url;We.config.navigateTo?.(d)}),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-checkout-form",ie(iT,{custom:{}},[],[]));var sT="TokenActions::ApplyOrderDiscount";async function oT(e){if(!O.cart)throw new Error("(go-coupon-redemption): cart not found");const t=O.cart,r=await O.asyncFetch(()=>O.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===sT?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?lT(e,r):r.value_cents&&r.value_cents>0?aT(e,r.value_cents):Nu([O.t("cart.coupon.form.errors.notValid")]):Nu([O.t("cart.coupon.form.errors.notValid")])}function aT(e,t){return O.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function lT(e,t){const r=(await O.asyncFetch(()=>O.tickets({"by_ticket_ids[]":[t.is_voucher_for]}))).find(i=>i.id===t.is_voucher_for);if(!r)return Nu([O.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return O.cart.addItem(pt(aa(n),{quantity:1})),O.cart.addCoupon({code:e,kind:"serviceVoucher"}),{success:!0}}function Nu(e){return{success:!1,errors:e}}var uT=j("<go-form></go-form>",2);function cT(e,t){re(t,!0),cr.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(u=>u.key==="token"),c=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const d=await oT(c);return d.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),d):(a.details.apiErrors=d.errors,d)}async function n(a){await r(a.target)}async function i(){const a=t.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=uT();return Kn(o,"formId","couponRedemption"),Fo("submit",o,n),x(e,o),ne(s)}customElements.define("go-coupon-redemption",ie(cT,{},[],["flush"])),ob();var dT=class{#e=te();get campaign(){return h(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=te();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 t=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");En(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!O.currentUser?.isAuthenticated||O.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",O.urls.cart()),window.location.replace(O.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",O.urls.cart()),window.location.replace(O.urls.cart())}},Dt=new dT,fT=j('<img alt="logo"/>'),hT=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 Zp(e,t){re(t,!0);let r=b(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(m){r(m),y()}},s=hT();let o;var a=F(s),l=F(a),c=m=>{var v=fT();ce(_=>pe(v,"src",_),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(m,v)};de(l,m=>{r().picture.thumbnail&&m(c)}),M(a);var d=X(a,2),u=F(d),p=F(u,!0);M(u);var f=X(u,2),g=F(f,!0);return M(f),M(d),M(s),ce(()=>{o=Ot(s,1,"go-donation-campaign",null,o,{selected:Dt.campaign?.id===r()?.id}),se(p,h(n)["donations.headline"]),se(g,h(n)["donations.shop.info"])}),at("click",s,()=>Dt.selectCampaign(r())),at("keydown",s,m=>{m.key==="Enter"&&Dt.selectCampaign(r())}),x(e,s),ne(i)}br(["click","keydown"]),ie(Zp,{campaign:{}},[],[],{mode:"open"});function pT(e,t){return t=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:t}).format(e):new Intl.NumberFormat("de-DE",{style:"currency",currency:t}).format(e)}function sn(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}var mT=j("<button> </button>"),vT=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>'),gT=j('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Wp(e,t){re(t,!0);const r=Dt.campaign?.guest_limit/100;let n=te(void 0);function i(p){Dt.amount=p,I(n,null)}function s(p){const f=document.getElementById("donationForm");f.checkValidity()?Dt.amount=p.target.valueAsNumber*100:(Dt.amount=void 0,f.reportValidity())}var o=gT(),a=F(o),l=F(a,!0);M(a);var c=X(a,2);qe(c,20,()=>Dt.campaign?.options,p=>p,(p,f)=>{var g=mT();let m;var v=F(g,!0);M(g),ce(_=>{m=Ot(g,1,"btn btn-default",null,m,{selected:Dt.amount===f}),se(v,_)},[()=>pT(f/100,O.currency)]),at("click",g,()=>i(f)),x(p,g)}),M(c);var d=X(c,2),u=p=>{var f=vT(),g=F(f),m=F(g),v=F(m,!0);M(m);var _=X(m,2);Is(_),M(g),M(f),ce((k,A)=>{se(v,k),pe(_,"max",r),pe(_,"placeholder",A),Ll(_,h(n))},[()=>O.t("donations.selection.custom.label"),()=>O.t("donations.selection.custom.input.placeholder")]),at("input",_,s),x(p,f)};de(d,p=>{Dt.campaign?.free_donations&&p(u)}),M(o),ce(p=>se(l,p),[()=>O.t("donations.selection.title")]),x(e,o),ne()}br(["click","input"]),ie(Wp,{},[],[],{mode:"open"});var yT=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 bT(e,t){re(t,!1),rn(()=>{O.donations?.campaigns?.length==1&&Dt.selectCampaign(O.donations?.campaigns[0])}),Kl();var r=Y(),n=q(r),i=s=>{var o=yT(),a=F(o);qe(a,1,()=>O?.donations?.campaigns,m=>m.id,(m,v)=>{Zp(m,{get campaign(){return h(v)}})});var l=X(a,2),c=m=>{Wp(m,{})};de(l,m=>{Dt.campaign&&m(c)});var d=X(l,2),u=F(d),p=F(u,!0);M(u);var f=X(u,2),g=F(f,!0);M(f),M(d),M(o),ce((m,v)=>{se(p,m),f.disabled=!Dt.amount,se(g,v)},[()=>O.t("donations.actions.continueWithoutDonation"),()=>O.t("donations.actions.addToCart")]),at("click",u,function(...m){Dt.skipDonation?.apply(this,m)}),at("click",f,function(...m){Dt.addDonationToCart?.apply(this,m)}),x(s,o)};de(n,s=>{O.donations&&O.donations.campaigns&&s(i)}),x(e,r),ne()}br(["click"]),customElements.define("go-donations",ie(bT,{},[],[]));function _T(e){return typeof e=="function"}function js(e){return e!==null&&typeof e=="object"}var wT=["string","number","bigint","boolean"];function Ru(e){return e==null||wT.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Ru(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var ha=Symbol("box"),Hp=Symbol("is-writable");function L(e,t){const r=D(e);return t?{[ha]:!0,[Hp]:!0,get current(){return h(r)},set current(n){t(n)}}:{[ha]:!0,get current(){return e()}}}function Gp(e){return js(e)&&ha in e}function kT(e){return Gp(e)?e:_T(e)?L(e):Er(e)}function Er(e){let t=te(Fe(e));return{[ha]:!0,[Hp]:!0,get current(){return h(t)},set current(r){I(t,r,!0)}}}function Kp(...e){return function(t){for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):r.current?.call(this,t)}}}var Yp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ST=/\n/g,ET=/^\s*/,xT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,TT=/^:\s*/,AT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,OT=/^[;\s]*/,CT=/^\s+|\s+$/g,DT=`
|
|
76
|
+
`,Jp="/",Xp="*",ni="",IT="comment",PT="declaration";function $T(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var m=g.match(ST);m&&(r+=m.length);var v=g.lastIndexOf(DT);n=~v?g.length-v:n+g.length}function s(){var g={line:r,column:n};return function(m){return m.position=new o(g),c(),m}}function o(g){this.start=g,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function a(g){var m=new Error(t.source+":"+r+":"+n+": "+g);if(m.reason=g,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(g){var m=g.exec(e);if(m){var v=m[0];return i(v),e=e.slice(v.length),m}}function c(){l(ET)}function d(g){var m;for(g=g||[];m=u();)m!==!1&&g.push(m);return g}function u(){var g=s();if(!(Jp!=e.charAt(0)||Xp!=e.charAt(1))){for(var m=2;ni!=e.charAt(m)&&(Xp!=e.charAt(m)||Jp!=e.charAt(m+1));)++m;if(m+=2,ni===e.charAt(m-1))return a("End of comment missing");var v=e.slice(2,m-2);return n+=2,i(v),e=e.slice(m),n+=2,g({type:IT,comment:v})}}function p(){var g=s(),m=l(xT);if(m){if(u(),!l(TT))return a("property missing ':'");var v=l(AT),_=g({type:PT,property:Qp(m[0].replace(Yp,ni)),value:v?Qp(v[0].replace(Yp,ni)):ni});return l(OT),_}}function f(){var g=[];d(g);for(var m;m=p();)m!==!1&&(g.push(m),d(g));return g}return c(),f()}function Qp(e){return e?e.replace(CT,ni):ni}function MT(e,t){let r=null;if(!e||typeof e!="string")return r;const n=$T(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(r=r||{},r[o]=a)}),r}var FT=/\d/,NT=["-","_","/","."];function RT(e=""){if(!FT.test(e))return e!==e.toLowerCase()}function LT(e){const t=[];let r="",n,i;for(const s of e){const o=NT.includes(s);if(o===!0){t.push(r),r="",n=void 0;continue}const a=RT(s);if(i===!1){if(n===!1&&a===!0){t.push(r),r=s,n=a;continue}if(n===!0&&a===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=a;continue}}r+=s,n=a,i=o}return t.push(r),t}function em(e){return e?LT(e).map(t=>UT(t)).join(""):""}function zT(e){return qT(em(e||""))}function UT(e){return e?e[0].toUpperCase()+e.slice(1):""}function qT(e){return e?e[0].toLowerCase()+e.slice(1):""}function Zs(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[em(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[zT(n)]=i}return MT(e,r),t}function Ws(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function VT(e,t){const r=RegExp(e,"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,t):n}}var BT=VT(/[A-Z]/,e=>`-${e.toLowerCase()}`);function jT(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${BT(t)}: ${e[t]};`).join(`
|
|
77
|
+
`)}function Hs(e={}){return jT(e).replace(`
|
|
78
|
+
`," ")}var ZT=["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"],WT=new Set(ZT);function HT(e){return WT.has(e)}function He(...e){const t={...e[0]};for(let r=1;r<e.length;r++){const n=e[r];if(n){for(const i of Object.keys(n)){const s=t[i],o=n[i],a=typeof s=="function",l=typeof o=="function";if(a&&HT(i))t[i]=Kp(s,o);else if(a&&l)t[i]=Ws(s,o);else if(i==="class"){const c=Ru(s),d=Ru(o);c&&d?t[i]=Ro(s,o):c?t[i]=Ro(s):d&&(t[i]=Ro(o))}else if(i==="style"){const c=typeof s=="object",d=typeof o=="object",u=typeof s=="string",p=typeof o=="string";if(c&&d)t[i]={...s,...o};else if(c&&p){const f=Zs(o);t[i]={...s,...f}}else if(u&&d)t[i]={...Zs(s),...o};else if(u&&p){const f=Zs(s),g=Zs(o);t[i]={...f,...g}}else c?t[i]=s:d?t[i]=o:u?t[i]=s:p&&(t[i]=o)}else t[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(n)){const s=t[i],o=n[i];t[i]=o!==void 0?o:s}}}return typeof t.style=="object"&&(t.style=Hs(t.style).replaceAll(`
|
|
79
|
+
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var tm={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%)"},GT=Hs(tm),rm=typeof window<"u"?window:void 0,hF=typeof window<"u"?window.document:void 0,pF=typeof window<"u"?window.navigator:void 0,mF=typeof window<"u"?window.location:void 0;function KT(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var YT=class extends Map{#e=new Map;#t=te(0);#r=te(0);#n=tn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return tn===this.#n?te(e):wn(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else return h(this.#t),!1;return h(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else{h(this.#t);return}return h(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),o=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),I(this.#r,super.size),Lr(o);else if(i!==t){Lr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Lr(o)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),I(r,-1)),n&&(I(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;I(this.#r,0);for(var t of e.values())I(t,-1);Lr(this.#t),e.clear()}}#s(){h(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#i(0);e.set(t,r)}}for([,r]of this.#e)h(r)}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}},JT=class{#e;#t;constructor(e={}){const{window:t=rm,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=yl(n=>{const i=vt(t,"focusin",n),s=vt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?KT(this.#e):null}},vF=new JT;function XT(e){return typeof e=="function"}var It=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return fb(this.#t)}get(){const e=xd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=xd(this.#t);return t===void 0?e:t}set(e){return db(this.#t,e)}};function QT(e,t){switch(e){case"post":ge(t);break;case"pre":Tl(t);break}}function Lu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;QT(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=Ne(()=>r(a,o));return o=a,l})}function nm(e,t,r){const n=ws(()=>{let i=!1;Lu(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});ge(()=>n)}function tt(e,t,r){Lu(e,"post",t,r)}function eA(e,t,r){Lu(e,"pre",t,r)}tt.pre=eA;function tA(e,t){nm(e,"post",t)}function rA(e,t){nm(e,"pre",t)}tA.pre=rA;function im(e){return XT(e)?e():e}var nA=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(h(this.#o)?.(),this.getSize().width));#a=D(()=>(h(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=im(this.#n);if(e)return yl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,o=Array.isArray(s)?s:[s];this.#e.width=o.reduce((a,l)=>Math.max(a,l.inlineSize),0),this.#e.height=o.reduce((a,l)=>Math.max(a,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??rm,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=im(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),a=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-o,height:r-s-a}}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 iA(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const o=await e(...i);n&&(n(o),n=null)},t)})}function sA(e,t){let r=0,n=null;return(...i)=>{const s=Date.now();return r&&s-r<t?n??Promise.resolve(void 0):(r=s,n=e(...i),n)}}function sm(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=te(Fe(o)),d=te(!1),u=te(void 0),p=te(Fe([]));const f=()=>{h(p).forEach(A=>A()),I(p,[],!0)},g=A=>{I(p,[...h(p),A],!0)},m=async(A,E,T=!1)=>{try{I(d,!0),I(u,void 0),f();const C=new AbortController;g(()=>C.abort());const $=await t(A,E,{data:h(c),refetching:T,onCleanup:g,signal:C.signal});return I(c,$,!0),$}catch(C){C instanceof DOMException&&C.name==="AbortError"||I(u,C,!0);return}finally{I(d,!1)}},v=a?iA(m,a):l?sA(m,l):m,_=Array.isArray(e)?e:[e];let k;return n((A,E)=>{s&&k||(k=A,v(Array.isArray(e)?A:A[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return h(c)},get loading(){return h(d)},get error(){return h(u)},mutate:A=>{I(c,A,!0)},refetch:A=>{const E=_.map(T=>T());return v(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],A??!0)}}}function oA(e,t,r){return sm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];tt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function aA(e,t,r){return sm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],o=()=>s.map(a=>a());tt.pre(o,(a,l)=>{n(a,l??[])},i)})}oA.pre=aA;function ii(e){ge(()=>()=>{e()})}function lA(e,t){return setTimeout(t,e)}function Gs(e){df().then(e)}var uA=1,cA=9,dA=11;function zu(e){return js(e)&&e.nodeType===uA&&typeof e.nodeName=="string"}function om(e){return js(e)&&e.nodeType===cA}function fA(e){return js(e)&&e.constructor?.name==="VisualViewport"}function hA(e){return js(e)&&e.nodeType!==void 0}function am(e){return hA(e)&&e.nodeType===dA&&"host"in e}function pA(e,t){if(!e||!t||!zu(e)||!zu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&am(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function pa(e){return om(e)?e:fA(e)?e.document:e?.ownerDocument??document}function lm(e){return am(e)?lm(e.host):om(e)?e.defaultView??window:zu(e)?e.ownerDocument?.defaultView??window:window}function mA(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var zi=class{element;#e=D(()=>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=L(e):this.element=e}getDocument=()=>pa(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>mA(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,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Qe(e,t){return{[l_()]:r=>Gp(e)?(e.current=r,Ne(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Ne(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function xr(e){return e?"true":"false"}function Uu(e){return e?"true":void 0}function ze(e){return e?"":void 0}function um(e){return e?"open":"closed"}function vA(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var gA=class{#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(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function ma(e){const t=new gA(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var qu="ArrowDown",cm="ArrowLeft",dm="ArrowRight",Vu="ArrowUp",yA="Backspace",bA="Enter",gF="Escape",yF=" ",bF="Tab",_F="a",wF="P",kF="A",SF="p",on=typeof document<"u",fm=_A();function _A(){return on&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Tr(e){return e instanceof HTMLElement}function si(e){return e instanceof Element}function wA(e){return e instanceof Element||e instanceof SVGElement}function va(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Fn(e){return e===null}function ga(e){return e.pointerType==="touch"}function kA(e){return e!==null}var SA=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ii(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const o=t.getAnimations();if(o.length===0){n();return}Promise.all(o.map(a=>a.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(a=>a.pending||a.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const o="data-starting-style";if(!t.hasAttribute(o)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(o)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[o]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Gs(t):t()}},hm=class{#e;#t;#r;#n=te(!1);#i=te(void 0);#s=!1;#a=null;constructor(e){this.#e=e,I(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new SA({ref:this.#e.ref,afterTick:this.#e.open}),ii(()=>this.#o()),tt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}if(t&&I(this.#n,!0),I(this.#i,t?"starting":"ending",!0),t&&(this.#a=window.requestAnimationFrame(()=>{this.#a=null,this.#e.open.current&&I(this.#i,void 0)})),!this.#t){t||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return h(this.#n)}get transitionStatus(){return h(this.#i)}#o(){this.#a!==null&&(window.cancelAnimationFrame(this.#a),this.#a=null)}};function Se(){}function Ce(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var EA=new It("BitsConfig");function xA(){const e=new TA(null,{});return EA.getOr(e).opts}var TA=class{opts;constructor(e,t){const r=AA(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function AA(e,t){return r=>L(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function pm(e,t){return r=>{const n=xA();return L(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var mm=pm(e=>e.defaultLocale,"en"),EF=pm(e=>e.defaultPortalTo,"body"),OA=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const n=i=>{t(i)};return vt(e,this.eventName,n,r)}};function vm(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function gm(e,t){return e===t||e.contains(t)}function ym(e){return e?.ownerDocument??document}function CA(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var bm=["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] *)"],ya=bm.join(","),_m=typeof Element>"u",oi=_m?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ba=!_m&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},_a=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return i===""||i==="true"||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):_a(t.parentNode))},DA=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},wm=function(t,r,n){if(_a(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ya));return r&&oi.call(t,ya)&&i.unshift(t),i=i.filter(n),i},wa=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!_a(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=wa(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{oi.call(o,ya)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!_a(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=wa(c===!0?o.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else s.unshift.apply(s,o.children)}}return i},km=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Sm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||DA(t))&&!km(t)?0:t.tabIndex},IA=function(t,r){var n=Sm(t);return n<0&&r&&!km(t)?0:n},PA=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Em=function(t){return t.tagName==="INPUT"},$A=function(t){return Em(t)&&t.type==="hidden"},MA=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},FA=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},NA=function(t){if(!t.name)return!0;var r=t.form||ba(t),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(t.name));else try{i=n(t.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=FA(i,t.form);return!s||s===t},RA=function(t){return Em(t)&&t.type==="radio"},LA=function(t){return RA(t)&&!NA(t)},zA=function(t){var r,n=t&&ba(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,d,u;n=ba(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((d=i)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},xm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},UA=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var s=oi.call(t,"details>summary:first-of-type")?t.parentElement:t;if(oi.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var o=t;t;){var a=t.parentElement,l=ba(t);if(a&&!a.shadowRoot&&i(a)===!0)return xm(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if(zA(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return xm(t);return!1},qA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.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 oi.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},ka=function(t,r){return!(r.disabled||$A(r)||UA(r,t)||MA(r)||qA(r))},Bu=function(t,r){return!(LA(r)||Sm(r)<0||!ka(t,r))},VA=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Tm=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=IA(a,o),c=o?Tm(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(PA).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},BA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=wa([t],r.includeContainer,{filter:Bu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:VA}):n=wm(t,r.includeContainer,Bu.bind(null,r)),Tm(n)},jA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=wa([t],r.includeContainer,{filter:ka.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=wm(t,r.includeContainer,ka.bind(null,r)),n},ZA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return oi.call(t,ya)===!1?!1:Bu(r,t)},WA=bm.concat("iframe:not([inert]):not([inert] *)").join(","),HA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return oi.call(t,WA)===!1?!1:ka(r,t)};function GA(e,t){if(t<=0)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function ju(e,t){return e>=0&&e<t.length}var KA="data-context-menu-trigger",YA="data-context-menu-content",xF=new It("Menu.Root"),TF=new It("Menu.Root | Menu.Sub"),AF=new It("Menu.Content"),OF=new It("Menu.Group | Menu.RadioGroup"),CF=new It("Menu.RadioGroup"),DF=new It("Menu.CheckboxGroup"),IF=new OA("bitsmenuopen",{bubbles:!1,cancelable:!0}),PF=ma({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;var JA=class ey{static create(t){return new ey(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Se;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#a=t.onFocusOutside,ge(()=>{this.#s=ym(this.opts.ref.current)});let r=Se;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};tt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return lA(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ii(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Gs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return Ws(vt(this.#s,"pointerdown",Ws(this.#h,this.#f),{capture:!0}),vt(this.#s,"pointerdown",Ws(this.#p,this.#d)),vt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=Am(t)),this.#e.current(t)};#d=vm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||eO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=Am(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=vt(this.#s,"click",this.#c,{once:!0})):this.#e.current(n)},10);#h=t=>{this.#r[t.type]=!0};#p=t=>{this.#r[t.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=QA(this.opts.ref.current))};#m=t=>this.opts.ref.current?gm(this.opts.ref.current,t):!1;#v=vm(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#y(){return Object.values(this.#r).some(Boolean)}#w=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#w,onblurcapture:this.#_}};function XA(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function QA(e){const t=[...globalThis.bitsDismissableLayers],r=XA(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function eO(e,t){const r=e.target;if(!wA(r))return!1;const n=!!r.closest(`[${KA}]`),i=!!t.closest(`[${YA}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:ym(r).documentElement.contains(r)&&!gm(t,r)&&CA(e,t)}function Am(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,o)=>o==="currentTarget"?t:o==="target"?r:o==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:o==="defaultPrevented"?i:o in s?s[o]:e[o]})}function Om(e,t){re(t,!0);let r=b(t,"interactOutsideBehavior",7,"close"),n=b(t,"onInteractOutside",7,Se),i=b(t,"onFocusOutside",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"isValidEvent",7,()=>!1),c=b(t,"ref",7);const d=JA.create({id:L(()=>s()),interactOutsideBehavior:L(()=>r()),onInteractOutside:L(()=>n()),enabled:L(()=>a()),onFocusOutside:L(()=>i()),isValidEvent:L(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),y()},get onInteractOutside(){return n()},set onInteractOutside(g=Se){n(g),y()},get onFocusOutside(){return i()},set onFocusOutside(g=Se){i(g),y()},get id(){return s()},set id(g){s(g),y()},get children(){return o()},set children(g){o(g),y()},get enabled(){return a()},set enabled(g){a(g),y()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),y()},get ref(){return c()},set ref(g){c(g),y()}},p=Y(),f=q(p);return we(f,()=>o()??Me,()=>({props:d.props})),x(e,p),ne(u)}ie(Om,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var tO=class ty{static create(t){return new ty(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new zi(this.opts.ref);let r=Se;tt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>vt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!rO(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}};function rO(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function Cm(e,t){re(t,!0);let r=b(t,"escapeKeydownBehavior",7,"close"),n=b(t,"onEscapeKeydown",7,Se),i=b(t,"children",7),s=b(t,"enabled",7),o=b(t,"ref",7);tO.create({escapeKeydownBehavior:L(()=>r()),onEscapeKeydown:L(()=>n()),enabled:L(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(d="close"){r(d),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(d=Se){n(d),y()},get children(){return i()},set children(d){i(d),y()},get enabled(){return s()},set enabled(d){s(d),y()},get ref(){return o()},set ref(d){o(d),y()}},l=Y(),c=q(l);return we(c,()=>i()??Me),x(e,l),ne(a)}ie(Cm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var nO=class ry{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new ry),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#e.current=this.#e.current.filter(i=>i!==t),this.#e.current.unshift(t)}unregister(t){this.#e.current=this.#e.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(t,r){this.#t.set(t,r)}getFocusMemory(t){return this.#t.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}},iO=class ny{#e=!1;#t=null;#r=nO.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,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 t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.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 t=this.#t,r=t.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(a)if(t.contains(a))this.#r.setFocusMemory(this,a);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&HA(l))o.preventDefault(),l.focus();else{const c=this.#c(),d=this.#d()[0];(c||d||t).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length===0)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(vt(r,"focusin",n,{capture:!0}),vt(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#c(),l=this.#d()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?BA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?jA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return tt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new ny(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ii(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function Dm(e,t){re(t,!0);let r=b(t,"enabled",7,!1),n=b(t,"trapFocus",7,!1),i=b(t,"loop",7,!1),s=b(t,"onCloseAutoFocus",7,Se),o=b(t,"onOpenAutoFocus",7,Se),a=b(t,"focusScope",7),l=b(t,"ref",7);const c=iO.use({enabled:L(()=>r()),trap:L(()=>n()),loop:i(),onCloseAutoFocus:L(()=>s()),onOpenAutoFocus:L(()=>o()),ref:l()});var d={get enabled(){return r()},set enabled(f=!1){r(f),y()},get trapFocus(){return n()},set trapFocus(f=!1){n(f),y()},get loop(){return i()},set loop(f=!1){i(f),y()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(f=Se){s(f),y()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(f=Se){o(f),y()},get focusScope(){return a()},set focusScope(f){a(f),y()},get ref(){return l()},set ref(f){l(f),y()}},u=Y(),p=q(u);return we(p,()=>a()??Me,()=>({props:c.props})),x(e,u),ne(d)}ie(Dm,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var Im=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var sO=class iy{static create(t){return new iy(t)}opts;domContext;#e=Se;#t=!1;#r=Im;#n=Im;constructor(t){this.opts=t,this.domContext=new zi(t.ref);let r=Se;tt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ws(vt(this.domContext.getDocument(),"pointerdown",this.#a),vt(this.domContext.getDocument(),"pointerup",Kp(this.#o,this.#s)))}#s=t=>{this.#n(t)};#a=t=>{const r=this.opts.ref.current,n=t.target;!Tr(r)||!Tr(n)||!this.#t||!aO(this)||!pA(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=oO(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},Pm=e=>e.style.userSelect||e.style.webkitUserSelect;function oO(e,t){const r=Pm(t),n=Pm(e);return Sa(t,"none"),Sa(e,"text"),()=>{Sa(t,r),Sa(e,n)}}function Sa(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function aO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function $m(e,t){re(t,!0);let r=b(t,"preventOverflowTextSelection",7,!0),n=b(t,"onPointerDown",7,Se),i=b(t,"onPointerUp",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"ref",7);sO.create({id:L(()=>s()),onPointerDown:L(()=>n()),onPointerUp:L(()=>i()),enabled:L(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),y()},get onPointerDown(){return n()},set onPointerDown(p=Se){n(p),y()},get onPointerUp(){return i()},set onPointerUp(p=Se){i(p),y()},get id(){return s()},set id(p){s(p),y()},get children(){return o()},set children(p){o(p),y()},get enabled(){return a()},set enabled(p){a(p),y()},get ref(){return l()},set ref(p){l(p),y()}},d=Y(),u=q(d);return we(u,()=>o()??Me),x(e,d),ne(c)}ie($m,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Nn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var lO=class{#e;#t=0;#r=te();#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=ws(()=>{I(this.#r,this.#e(...e),!0)})),ge(()=>()=>{this.#i()}),h(this.#r)}},Ea=new YT,xa=te(null),Zu=null,Ks=null,Ys=!1,Mm=L(()=>{for(const e of Ea.values())if(e)return!0;return!1}),Wu=null,uO=new lO(()=>{function e(){document.body.setAttribute("style",h(xa)??""),document.body.style.removeProperty("--scrollbar-width"),fm&&Zu?.(),I(xa,null)}function t(){Ks!==null&&(window.clearTimeout(Ks),Ks=null)}function r(i,s){t(),Ys=!0,Wu=Date.now();const o=Wu,a=()=>{Ks=null,Wu===o&&(Fm(Ea)?Ys=!1:(Ys=!1,s()))},l=i===null?24:i;Ks=window.setTimeout(a,l)}function n(){h(xa)===null&&Ea.size===0&&!Ys&&I(xa,document.body.getAttribute("style"),!0)}return tt(()=>Mm.current,()=>{if(!Mm.current)return;n(),Ys=!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,l={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",fm&&(Zu=vt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Gs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ii(()=>()=>{Zu?.()}),{get lockMap(){return Ea},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),cO=class{#e=Nn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=uO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=L(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ii(()=>{if(this.#n.lockMap.delete(this.#e),Fm(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function Fm(e){for(const[t,r]of e)if(r)return!0;return!1}function Hu(e,t){re(t,!0);let r=b(t,"preventScroll",7,!0),n=b(t,"restoreScrollDelay",7,null);return r()&&new cO(r(),()=>n()),ne({get preventScroll(){return r()},set preventScroll(i=!0){r(i),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),y()}})}ie(Hu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function dO(e){if(!on||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const s=e.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!Tr(t)){const i=e.createElement("div");i.style.cssText=GT,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!Tr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Tr(s)?s:null}}}function Ta(e){const t=dO(e);function r(n,i="assertive",s=7500){if(!t||!on||!e)return;const o=t.getLog(i),a=e.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}}var fO={defaultValue:void 0,granularity:"day"};function Nm(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...fO,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let s=new Date;n&&s<n.toDate(qt())?s=n.toDate(qt()):i&&s>i.toDate(qt())&&(s=i.toDate(qt()));const o=s.getFullYear(),a=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Pi(o,a,l,0,0,0):new Us(o,a,l)}}function Rm(e,t){let r;return t instanceof Dn?r=sp(e):t instanceof Pi?r=ip(e):r=sa(e),r.calendar!==t.calendar?Kt(r,t.calendar):r}function Vt(e,t=qt()){return e instanceof Dn?e.toDate():e.toDate(t)}function hO(e){if(e instanceof Us)return"date";if(e instanceof Pi)return"datetime";if(e instanceof Dn)return"zoneddatetime";throw new Error("Unknown date type")}function pO(e,t){switch(t){case"date":return sa(e);case"datetime":return ip(e);case"zoneddatetime":return sp(e);default:throw new Error(`Unknown date type: ${t}`)}}function mO(e){return e instanceof Pi}function Gu(e){return e instanceof Dn}function Aa(e){return mO(e)||Gu(e)}function Js(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function ai(e,t){return e.compare(t)<0}function vO(e,t){return e.compare(t)>0}function Lm(e,t,r){const n=Uh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function zm(e,t,r){const n=Uh(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}var Oa=["day","month","year"],Ca=["hour","minute","second","dayPeriod"],Um=["literal","timeZoneName"],Xs=[...Oa,...Ca],qm=[...Xs,...Um],gO=[...Ca,...Um],$F=qm.filter(e=>e!=="literal"),MF=gO.filter(e=>e!=="literal"),yO=["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"],bO=["year","month","day"],Ku={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 _O(e){if(Vm(e))return Ku[e];{const t=EO(e);return Vm(t)?Ku[t]:Ku.en}}function Yu(e,t,r){return wO(e)?_O(r)[e]:SO(e)?t:kO(e)?"––":""}function Vm(e){return yO.includes(e)}function wO(e){return bO.includes(e)}function kO(e){return e==="hour"||e==="minute"||e==="second"}function SO(e){return e==="era"||e==="dayPeriod"}function EO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function Ju(e){const t=["hour","minute","second"],r=Xs.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:e==="day"?!t.includes(n):!0);return Object.fromEntries(r)}function xO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!jm(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];Fn(c)?a[l]=Yu(l,"AM",n):a[l]=c}else a[l]=o(l);return a},{});function o(a){if("hour"in t){const l=t[a],c=typeof l=="string"&&l?.startsWith("0"),d=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!Fn(l)&&!Fn(d)){const u=r.part(i.set({[a]:l}),a,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&Wm(n)===12;if(a==="hour"&&p){if(d>12){const f=d-12;return f===0?"12":f<10?`0${f}`:`${f}`}return d===0?"12":d<10?`0${d}`:`${d}`}return a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return Yu(a,"",n)}else{if(Da(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Fn(l))return Yu(a,"",n);{const d=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:c&&d.length===1?`0${d}`:d}}return""}}return s}function TO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,OO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!jm(a.type)?{part:a.type,value:a.value}:{part:a.type,value:i[a.type]}).filter(a=>!(Fn(a.part)||Fn(a.value)||a.part==="timeZoneName"&&(!Gu(r)||s)))}function AO(e){const t=xO(e);return{obj:t,arr:TO({contentObj:t,...e})}}function OO(e,t){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:t===24?"h23":void 0,hour12:t===24?!1:void 0};return e==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),e==="hour"&&delete r.minute,e==="minute"&&delete r.second,r}function Bm(){return Xs.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Da(e){return Oa.includes(e)}function jm(e){return Xs.includes(e)}function CO(e){return qm.includes(e)}function Zm(e){return!on||!e?[]:Ia(e).map(t=>t.dataset.segment).filter(t=>Xs.includes(t))}function DO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=Zm(r);let s=n;for(const o of i)if("hour"in t){const a=t[o];if(Fn(a))continue;s=s.set({[o]:t[o]})}else if(Da(o)){const a=t[o];if(Fn(a))continue;s=s.set({[o]:t[o]})}return s}function IO(e,t){const r=Zm(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Da(n)&&e[n]===null)return!1;return!0}function PO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Ca.includes(t)||Oa.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function $O(e,t){return t||(Aa(e)?"minute":"day")}function Xu(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||va(e))}function MO(e,t){if(!on)return!1;const r=Ia(t);return r.length?r[0].id===e:!1}function FO(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!on)return;const s=r.selectedDate(n),o=i.getElementById(t);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Hs({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function NO(e,t){if(!on)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function Wm(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(t=>t.type==="hour")?.value==="1"?12:24}function Qs(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=Qu(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function RO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function LO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function Qu(e,t){const r=Ia(t);return r.length?{next:RO(e,r),prev:LO(e,r)}:{next:null,prev:null}}function Hm(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=Qu(r,t);n&&n.focus()}function Gm(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=Qu(r,t);n&&n.focus()}function eo(e){return e==="ArrowRight"||e==="ArrowLeft"}function Ia(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Tr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!CO(r)||r==="literal")}):[]}function zO(e){return Ia(e)[0]}var UO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Km(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new kr(t,g).format(f)}function s(f,g=!0){return Aa(f)&&g?i(Vt(f),{dateStyle:"long",timeStyle:"long"}):i(Vt(f),{dateStyle:"long"})}function o(f){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new kr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new kr(t,{month:e.monthFormat.current}).format(f)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new kr(t,{year:e.yearFormat.current}).format(f)}`}function a(f){return new kr(t,{month:"long"}).format(f)}function l(f){return new kr(t,{year:"numeric"}).format(f)}function c(f,g){return Gu(f)?new kr(t,{...g,timeZone:f.timeZone}).formatToParts(Vt(f)):new kr(t,g).formatToParts(Vt(f))}function d(f,g="narrow"){return new kr(t,{weekday:g}).format(f)}function u(f,g=void 0){return new kr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(f,g,m={}){const v=c(f,{...UO,...m}).find(_=>_.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function qO(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function Ym(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function ec(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=Js(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=vu(t),l=$1(t),c=r!==void 0?Lm(a,r,"en-US"):Lm(a,0,i),d=r!==void 0?zm(l,r,"en-US"):zm(l,0,i),u=Ym(c.subtract({days:1}),a),p=Ym(l,d.add({days:1})),f=u.length+o.length+p.length;if(n&&f<42){const m=42-f;let v=p[p.length-1];v||(v=t.add({months:1}).set({day:1}));let _=m;p.length===0&&(_=m-1,p.push(v));const k=Array.from({length:_},(A,E)=>{const T=E+1;return v.add({days:T})});p.push(...k)}const g=u.concat(o,p);return{value:t,dates:g,weeks:GA(g,7)}}function to(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(ec({...n,dateObj:r})),i;i.push(ec({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(ec({...n,dateObj:o}))}return i}function tc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function Jm(e,t){const r=e.getAttribute("data-value");r&&(t.current=Rm(r,t.current))}function VO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=tc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(ju(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}),Gs(()=>{const u=tc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(ju(p,u)){const f=u[p];return Jm(f,r),f.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Gs(()=>{const u=tc(n);if(!u.length)return;const p=c-l.length;if(ju(p,u))return u[p].focus()})}}var Xm=[qu,Vu,cm,dm],Qm=[bA," "];function BO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!qO(i)||!Xm.includes(e.key)&&!Qm.includes(e.key))return;e.preventDefault();const s={[qu]:7,[Vu]:-7,[cm]:-1,[dm]:1};if(Xm.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(Qm.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,Rm(o,n))}}function jO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),d=to({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function ZO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),d=to({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function WO({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Vt(i),r)):[]}function HO(e){ge(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Ne(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(to({...o,dateObj:s}))})})}function GO({calendarNode:e,label:t,accessibleHeadingId:r}){const n=pa(e),i=n.createElement("div");i.style.cssText=Hs({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=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function KO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){ge(()=>{e.current,Ne(()=>{t().some(a=>pu(a,e.current))||o(to({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function YO({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;return n?vO(n.add({months:1}).set({day:1}),e):!1}function JO({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?ai(n.subtract({months:1}).set({day:35}),e):!1}function XO({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Vt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Vt(e[0].value),i=Vt(e[e.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 QO({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":ze(r),"data-disabled":ze(n),"data-readonly":ze(i)}}function eC(e){const t=pa(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function tC(e){if(!on)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return pO(n,i)}function rC({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&ai(a,n.current)||i.current&&ai(i.current,a))}tt(()=>e.current,()=>{e.current&&t.current&&An(t.current,r)&&o(r)&&(t.current=tC(e.current)??r)})}function nC(e,t){return!e||!t?e:Aa(e)&&Aa(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var iC=ma({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 sC(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const o=r-100;n=e.placeholderYear<o?e.placeholderYear-10:o}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}var Ar=new It("Calendar.Root | RangeCalender.Root"),ev=class sy{static create(t){return Ar.set(new sy(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return h(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Nn();domContext;attachment;#t=te(Fe([]));get months(){return h(this.#t)}set months(t){I(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=Qe(this.opts.ref),this.domContext=new zi(t.ref),this.announcer=Ta(null),this.formatter=Km({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),rn(()=>{this.announcer=Ta(this.domContext.getDocument())}),this.months=to({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(),KO({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}),HO({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),tt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),tt(()=>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)}),rC({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=D(()=>WO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return h(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>Ne(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return h(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>sC({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return h(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){ge(()=>{if(Ne(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){ge(()=>{if(this.opts.ref.current)return GO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){Tl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){jO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){ZO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,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(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=D(()=>YO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return h(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>JO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return h(this.#u)}set isPrevButtonDisabled(t){I(this.#u,t)}#c=D(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return h(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,XO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return h(this.#d)}set headingValue(t){I(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return h(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>pu(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&ai(t,r)||n&&ai(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>An(n,t)):r?An(r,t):!1}shiftFocus(t,r){return VO({node:t,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})}#p(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,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 i=this.handleSingleUpdate(n,r);i?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(i,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=nC(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const s=[r];return this.#p(s)?s:[r]}if(!Array.isArray(t))return;const n=t.findIndex(s=>An(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(o=>!An(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&An(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){BO({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return h(this.#f)}set snippetProps(t){I(this.#f,t)}getBitsAttr=t=>iC.getAttr(t);#m=D(()=>({...QO({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(t){I(this.#m,t)}},oC=class oy{static create(t){return new oy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Uu(!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(t){I(this.#e,t)}},tv=new It("Calendar.Cell | RangeCalendar.Cell"),aC=class ay{static create(t){return tv.set(new ay(t,Ar.get()))}opts;root;#e=D(()=>Vt(this.opts.date.current));get cellDate(){return h(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return h(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>C1(this.opts.date.current,qt()));get isDateToday(){return h(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!pu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return h(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return h(this.#i)}set isOutsideVisibleMonths(t){I(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return h(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>An(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return h(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return h(this.#o)}set isSelectedDate(t){I(this.#o,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return h(this.#l)}set labelText(t){I(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return h(this.#u)}set snippetProps(t){I(this.#u,t)}#c=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return h(this.#c)}set ariaDisabled(t){I(this.#c,t)}#d=D(()=>({"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":hO(this.opts.date.current),"data-disabled":ze(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return h(this.#d)}set sharedDataAttrs(t){I(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":xr(this.isSelectedDate),"aria-disabled":xr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return h(this.#h)}set props(t){I(this.#h,t)}},lC=class ly{static create(t){return new ly(t,tv.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}#e=D(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#t=D(()=>({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(t){I(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":xr(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(t){I(this.#r,t)}},uC=class uy{static create(t){return new uy(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":xr(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(t){I(this.#t,t)}},cC=class cy{static create(t){return new cy(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":xr(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(t){I(this.#t,t)}},dC=class dy{static create(t){return new dy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":xr(this.root.opts.readonly.current),"aria-disabled":xr(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(t){I(this.#e,t)}},fC=class fy{static create(t){return new fy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},hC=class hy{static create(t){return new hy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},pC=class py{static create(t){return new py(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},mC=class my{static create(t){return new my(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},vC=class vy{static create(t){return new vy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({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(t){I(this.#e,t)}},gC=new Set(["$$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"]),yC=j("<div><!></div>");function rv(e,t){re(t,!0);let r=b(t,"child",7),n=b(t,"children",7),i=b(t,"id",23,Nn),s=b(t,"ref",15,null),o=b(t,"value",15),a=b(t,"onValueChange",7,Se),l=b(t,"placeholder",15),c=b(t,"onPlaceholderChange",7,Se),d=b(t,"weekdayFormat",7,"narrow"),u=b(t,"weekStartsOn",7),p=b(t,"pagedNavigation",7,!1),f=b(t,"isDateDisabled",7,()=>!1),g=b(t,"isDateUnavailable",7,()=>!1),m=b(t,"fixedWeeks",7,!1),v=b(t,"numberOfMonths",7,1),_=b(t,"locale",7),k=b(t,"calendarLabel",7,"Event"),A=b(t,"disabled",7,!1),E=b(t,"readonly",7,!1),T=b(t,"minValue",7,void 0),C=b(t,"maxValue",7,void 0),$=b(t,"preventDeselect",7,!1),R=b(t,"type",7),U=b(t,"disableDaysOutsideMonth",7,!0),N=b(t,"initialFocus",7,!1),le=b(t,"maxDays",7),V=b(t,"monthFormat",7,"long"),ae=b(t,"yearFormat",7,"numeric"),me=je(t,gC);const J=Nm({defaultValue:o(),minValue:T(),maxValue:C()});function oe(){l()===void 0&&l(J)}oe(),tt.pre(()=>l(),()=>{oe()});function G(){o()===void 0&&o(R()==="single"?void 0:[])}G(),tt.pre(()=>o(),()=>{G()});const Q=ev.create({id:L(()=>i()),ref:L(()=>s(),z=>s(z)),weekdayFormat:L(()=>d()),weekStartsOn:L(()=>u()),pagedNavigation:L(()=>p()),isDateDisabled:L(()=>f()),isDateUnavailable:L(()=>g()),fixedWeeks:L(()=>m()),numberOfMonths:L(()=>v()),locale:mm(()=>_()),calendarLabel:L(()=>k()),readonly:L(()=>E()),disabled:L(()=>A()),minValue:L(()=>T()),maxValue:L(()=>C()),disableDaysOutsideMonth:L(()=>U()),initialFocus:L(()=>N()),maxDays:L(()=>le()),placeholder:L(()=>l(),z=>{l(z),c()(z)}),preventDeselect:L(()=>$()),value:L(()=>o(),z=>{o(z),a()(z)}),type:L(()=>R()),monthFormat:L(()=>V()),yearFormat:L(()=>ae()),defaultPlaceholder:J}),K=D(()=>He(me,Q.props));var H={get child(){return r()},set child(z){r(z),y()},get children(){return n()},set children(z){n(z),y()},get id(){return i()},set id(z=Nn()){i(z),y()},get ref(){return s()},set ref(z=null){s(z),y()},get value(){return o()},set value(z){o(z),y()},get onValueChange(){return a()},set onValueChange(z=Se){a(z),y()},get placeholder(){return l()},set placeholder(z){l(z),y()},get onPlaceholderChange(){return c()},set onPlaceholderChange(z=Se){c(z),y()},get weekdayFormat(){return d()},set weekdayFormat(z="narrow"){d(z),y()},get weekStartsOn(){return u()},set weekStartsOn(z){u(z),y()},get pagedNavigation(){return p()},set pagedNavigation(z=!1){p(z),y()},get isDateDisabled(){return f()},set isDateDisabled(z=()=>!1){f(z),y()},get isDateUnavailable(){return g()},set isDateUnavailable(z=()=>!1){g(z),y()},get fixedWeeks(){return m()},set fixedWeeks(z=!1){m(z),y()},get numberOfMonths(){return v()},set numberOfMonths(z=1){v(z),y()},get locale(){return _()},set locale(z){_(z),y()},get calendarLabel(){return k()},set calendarLabel(z="Event"){k(z),y()},get disabled(){return A()},set disabled(z=!1){A(z),y()},get readonly(){return E()},set readonly(z=!1){E(z),y()},get minValue(){return T()},set minValue(z=void 0){T(z),y()},get maxValue(){return C()},set maxValue(z=void 0){C(z),y()},get preventDeselect(){return $()},set preventDeselect(z=!1){$(z),y()},get type(){return R()},set type(z){R(z),y()},get disableDaysOutsideMonth(){return U()},set disableDaysOutsideMonth(z=!0){U(z),y()},get initialFocus(){return N()},set initialFocus(z=!1){N(z),y()},get maxDays(){return le()},set maxDays(z){le(z),y()},get monthFormat(){return V()},set monthFormat(z="long"){V(z),y()},get yearFormat(){return ae()},set yearFormat(z="numeric"){ae(z),y()}},B=Y(),ee=q(B),P=z=>{var ve=Y(),fe=q(ve);{let w=D(()=>({props:h(K),...Q.snippetProps}));we(fe,r,()=>h(w))}x(z,ve)},ue=z=>{var ve=yC();Re(ve,()=>({...h(K)}));var fe=F(ve);we(fe,()=>n()??Me,()=>Q.snippetProps),M(ve),x(z,ve)};return de(ee,z=>{r()?z(P):z(ue,-1)}),x(e,B),ne(H)}ie(rv,{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 bC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),_C=j("<div><!></div>");function rc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,bC);const l=lC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);{let k=D(()=>({props:h(c),...l.snippetProps}));we(_,i,()=>h(k))}x(m,v)},g=m=>{var v=_C();Re(v,()=>({...h(c)}));var _=F(v),k=E=>{var T=Y(),C=q(T);we(C,()=>n()??Me,()=>l.snippetProps),x(E,T)},A=E=>{var T=zt();ce(()=>se(T,l.cell.opts.date.current.day)),x(E,T)};de(_,E=>{n()?E(k):E(A,-1)}),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(rc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var wC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),kC=j("<table><!></table>");function nc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,wC);const l=dC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=kC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(nc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var SC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),EC=j("<tbody><!></tbody>");function ic(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,SC);const l=fC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=EC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(ic,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var xC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),TC=j("<td><!></td>");function sc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"date",7),l=b(t,"month",7),c=je(t,xC);const d=aC.create({id:L(()=>o()),ref:L(()=>s(),_=>s(_)),date:L(()=>a()),month:L(()=>l())}),u=D(()=>He(c,d.props));var p={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(_=Ce(r)){o(_),y()},get date(){return a()},set date(_){a(_),y()},get month(){return l()},set month(_){l(_),y()}},f=Y(),g=q(f),m=_=>{var k=Y(),A=q(k);{let E=D(()=>({props:h(u),...d.snippetProps}));we(A,i,()=>h(E))}x(_,k)},v=_=>{var k=TC();Re(k,()=>({...h(u)}));var A=F(k);we(A,()=>n()??Me,()=>d.snippetProps),M(k),x(_,k)};return de(g,_=>{i()?_(m):_(v,-1)}),x(e,f),ne(p)}ie(sc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var AC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),OC=j("<thead><!></thead>");function oc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,AC);const l=hC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=OC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(oc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var CC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),DC=j("<th><!></th>");function ac(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,CC);const l=mC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=DC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(ac,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var IC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),PC=j("<tr><!></tr>");function ro(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,IC);const l=pC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=PC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(ro,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var $C=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),MC=j("<header><!></header>");function lc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,$C);const l=vC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c)})),x(m,v)},g=m=>{var v=MC();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>n()??Me),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(lc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var FC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),NC=j("<div><!></div>");function uc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,FC);const l=oC.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,i,()=>({props:h(c),headingValue:l.root.headingValue})),x(m,v)},g=m=>{var v=NC();Re(v,()=>({...h(c)}));var _=F(v),k=E=>{var T=Y(),C=q(T);we(C,()=>n()??Me,()=>({headingValue:l.root.headingValue})),x(E,T)},A=E=>{var T=zt();ce(()=>se(T,l.root.headingValue)),x(E,T)};de(_,E=>{n()?E(k):E(A,-1)}),M(v),x(m,v)};return de(p,m=>{i()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(uc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var RC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),LC=j("<button><!></button>");function cc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,RC);const c=uC.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>He(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,i,()=>({props:h(d)})),x(v,_)},m=v=>{var _=LC();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>n()??Me),M(_),x(v,_)};return de(f,v=>{i()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(cc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var zC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),UC=j("<button><!></button>");function dc(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,zC);const c=cC.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>He(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,i,()=>({props:h(d)})),x(v,_)},m=v=>{var _=UC();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>n()??Me),M(_),x(v,_)};return de(f,v=>{i()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(dc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var qC=new Set(["$$slots","$$events","$$legacy","$$host","value"]),nv=j("<input/>");function iv(e,t){re(t,!0);let r=b(t,"value",15),n=je(t,qC);const i=D(()=>He(n,{"aria-hidden":"true",tabindex:-1,style:{...tm,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),y()}},o=Y(),a=q(o),l=d=>{var u=nv();Re(u,()=>({...h(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(d,u)},c=d=>{var u=nv();Re(u,()=>({...h(i)}),void 0,void 0,void 0,void 0,!0),Uo(u,r),x(d,u)};return de(a,d=>{h(i).type==="checkbox"?d(l):d(c,-1)}),x(e,o),ne(s)}ie(iv,{value:{}},[],[],{mode:"open"});var VC=["top","right","bottom","left"],Rn=Math.min,Yt=Math.max,Pa=Math.round,$a=Math.floor,Wr=e=>({x:e,y:e}),BC={left:"right",right:"left",bottom:"top",top:"bottom"};function fc(e,t,r){return Yt(e,Rn(t,r))}function an(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function Ui(e){return e.split("-")[1]}function hc(e){return e==="x"?"y":"x"}function pc(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function mc(e){return hc(Hr(e))}function jC(e,t,r){r===void 0&&(r=!1);const n=Ui(e),i=mc(e),s=pc(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Ma(o)),[o,Ma(o)]}function ZC(e){const t=Ma(e);return[vc(e),t,vc(t)]}function vc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var sv=["left","right"],ov=["right","left"],WC=["top","bottom"],HC=["bottom","top"];function GC(e,t,r){switch(e){case"top":case"bottom":return r?t?ov:sv:t?sv:ov;case"left":case"right":return t?WC:HC;default:return[]}}function KC(e,t,r,n){const i=Ui(e);let s=GC(ln(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(vc)))),s}function Ma(e){const t=ln(e);return BC[t]+e.slice(t.length)}function YC(e){return{top:0,right:0,bottom:0,left:0,...e}}function av(e){return typeof e!="number"?YC(e):{top:e,right:e,bottom:e,left:e}}function Fa(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function lv(e,t,r){let{reference:n,floating:i}=e;const s=Hr(t),o=mc(t),a=pc(o),l=ln(t),c=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-i.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-i.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Ui(t)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}async function JC(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=an(t,e),g=av(f),m=a[p?u==="floating"?"reference":"floating":u],v=Fa(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:d,strategy:l})),_=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},E=Fa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:k,strategy:l}):_);return{top:(v.top-E.top+g.top)/A.y,bottom:(E.bottom-v.bottom+g.bottom)/A.y,left:(v.left-E.left+g.left)/A.x,right:(E.right-v.right+g.right)/A.x}}var XC=50,QC=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:JC},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=lv(c,n,l),p=n,f=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:_,fn:k}=v,{x:A,y:E,data:T,reset:C}=await k({x:d,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=A??d,u=E??u,g[_]={...g[_],...T},C&&f<XC&&(f++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:d,y:u}=lv(c,p,l)),m=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:g}},eD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=an(e,t)||{};if(c==null)return{};const u=av(d),p={x:r,y:n},f=mc(i),g=pc(f),m=await o.getDimensions(c),v=f==="y",_=v?"top":"left",k=v?"bottom":"right",A=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[f]-p[f]-s.floating[g],T=p[f]-s.reference[f],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=C?C[A]:0;(!$||!await(o.isElement==null?void 0:o.isElement(C)))&&($=a.floating[A]||s.floating[g]);const R=E/2-T/2,U=$/2-m[g]/2-1,N=Rn(u[_],U),le=Rn(u[k],U),V=N,ae=$-m[g]-le,me=$/2-m[g]/2+R,J=fc(V,me,ae),oe=!l.arrow&&Ui(i)!=null&&me!==J&&s.reference[g]/2-(me<V?N:le)-m[g]/2<0,G=oe?me<V?me-V:me-ae:0;return{[f]:p[f]+G,data:{[f]:J,centerOffset:me-J-G,...oe&&{alignmentOffset:G}},reset:oe}}}),tD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=an(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=ln(i),k=Hr(a),A=ln(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(A||!m?[Ma(a)]:ZC(a)),C=g!=="none";!p&&C&&T.push(...KC(a,m,g,E));const $=[a,...T],R=await l.detectOverflow(t,v),U=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&U.push(R[_]),u){const me=jC(i,o,E);U.push(R[me[0]],R[me[1]])}if(N=[...N,{placement:i,overflows:U}],!U.every(me=>me<=0)){var le,V;const me=(((le=s.flip)==null?void 0:le.index)||0)+1,J=$[me];if(J&&(!(u==="alignment"&&k!==Hr(J))||N.every(G=>Hr(G.placement)===k?G.overflows[0]>0:!0)))return{data:{index:me,overflows:N},reset:{placement:J}};let oe=(V=N.filter(G=>G.overflows[0]<=0).sort((G,Q)=>G.overflows[1]-Q.overflows[1])[0])==null?void 0:V.placement;if(!oe)switch(f){case"bestFit":{var ae;const G=(ae=N.filter(Q=>{if(C){const K=Hr(Q.placement);return K===k||K==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(K=>K>0).reduce((K,H)=>K+H,0)]).sort((Q,K)=>Q[1]-K[1])[0])==null?void 0:ae[0];G&&(oe=G);break}case"initialPlacement":oe=a;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function uv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cv(e){return VC.some(t=>e[t]>=0)}var rD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=an(e,t);switch(i){case"referenceHidden":{const o=uv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:cv(o)}}}case"escaped":{const o=uv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:cv(o)}}}default:return{}}}}},dv=new Set(["left","top"]);async function nD(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ln(r),a=Ui(r),l=Hr(r)==="y",c=dv.has(o)?-1:1,d=s&&l?-1:1,u=an(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}var iD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await nD(t,e);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}}}}},sD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:_=>{let{x:k,y:A}=_;return{x:k,y:A}}},...c}=an(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),p=Hr(ln(i)),f=hc(p);let g=d[f],m=d[p];if(o){const _=f==="y"?"top":"left",k=f==="y"?"bottom":"right",A=g+u[_],E=g-u[k];g=fc(A,g,E)}if(a){const _=p==="y"?"top":"left",k=p==="y"?"bottom":"right",A=m+u[_],E=m-u[k];m=fc(A,m,E)}const v=l.fn({...t,[f]:g,[p]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[p]:a}}}}}},oD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=an(e,t),d={x:r,y:n},u=Hr(i),p=hc(u);let f=d[p],g=d[u];const m=an(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const A=p==="y"?"height":"width",E=s.reference[p]-s.floating[A]+v.mainAxis,T=s.reference[p]+s.reference[A]-v.mainAxis;f<E?f=E:f>T&&(f=T)}if(c){var _,k;const A=p==="y"?"width":"height",E=dv.has(ln(i)),T=s.reference[u]-s.floating[A]+(E&&((_=o.offset)==null?void 0:_[u])||0)+(E?0:v.crossAxis),C=s.reference[u]+s.reference[A]+(E?0:((k=o.offset)==null?void 0:k[u])||0)-(E?v.crossAxis:0);g<T?g=T:g>C&&(g=C)}return{[p]:f,[u]:g}}}},aD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=an(e,t),d=await o.detectOverflow(t,c),u=ln(i),p=Ui(i),f=Hr(i)==="y",{width:g,height:m}=s.floating;let v,_;u==="top"||u==="bottom"?(v=u,_=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=u,v=p==="end"?"top":"bottom");const k=m-d.top-d.bottom,A=g-d.left-d.right,E=Rn(m-d[v],k),T=Rn(g-d[_],A),C=!t.middlewareData.shift;let $=E,R=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=A),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=k),C&&!p){const N=Yt(d.left,0),le=Yt(d.right,0),V=Yt(d.top,0),ae=Yt(d.bottom,0);f?R=g-2*(N!==0||le!==0?N+le:Yt(d.left,d.right)):$=m-2*(V!==0||ae!==0?V+ae:Yt(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:$});const U=await o.getDimensions(a.floating);return g!==U.width||m!==U.height?{reset:{rects:!0}}:{}}}};function Na(){return typeof window<"u"}function qi(e){return fv(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gr(e){var t;return(t=(fv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fv(e){return Na()?e instanceof Node||e instanceof Jt(e).Node:!1}function Or(e){return Na()?e instanceof Element||e instanceof Jt(e).Element:!1}function un(e){return Na()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function hv(e){return!Na()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function no(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function lD(e){return/^(table|td|th)$/.test(qi(e))}function Ra(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var uD=/transform|translate|scale|rotate|perspective|filter/,cD=/paint|layout|strict|content/,li=e=>!!e&&e!=="none",gc;function yc(e){const t=Or(e)?Cr(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!bc()&&(li(t.backdropFilter)||li(t.filter))||uD.test(t.willChange||"")||cD.test(t.contain||"")}function dD(e){let t=Ln(e);for(;un(t)&&!Vi(t);){if(yc(t))return t;if(Ra(t))return null;t=Ln(t)}return null}function bc(){return gc==null&&(gc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gc}function Vi(e){return/^(html|body|#document)$/.test(qi(e))}function Cr(e){return Jt(e).getComputedStyle(e)}function La(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hv(e)&&e.host||Gr(e);return hv(t)?t.host:t}function pv(e){const t=Ln(e);return Vi(t)?e.ownerDocument?e.ownerDocument.body:e.body:un(t)&&no(t)?t:pv(t)}function io(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=pv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(i);if(s){const a=_c(o);return t.concat(o,o.visualViewport||[],no(i)?i:[],a&&r?io(a):[])}else return t.concat(i,io(i,[],r))}function _c(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mv(e){const t=Cr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=un(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=Pa(r)!==s||Pa(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function wc(e){return Or(e)?e:e.contextElement}function Bi(e){const t=wc(e);if(!un(t))return Wr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=mv(t);let o=(s?Pa(r.width):r.width)/n,a=(s?Pa(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var fD=Wr(0);function vv(e){const t=Jt(e);return!bc()||!t.visualViewport?fD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Jt(e)?!1:t}function ui(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=wc(e);let o=Wr(1);t&&(n?Or(n)&&(o=Bi(n)):o=Bi(e));const a=hD(s,r,n)?vv(s):Wr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s){const p=Jt(s),f=n&&Or(n)?Jt(n):n;let g=p,m=_c(g);for(;m&&n&&f!==g;){const v=Bi(m),_=m.getBoundingClientRect(),k=Cr(m),A=_.left+(m.clientLeft+parseFloat(k.paddingLeft))*v.x,E=_.top+(m.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=A,c+=E,g=Jt(m),m=_c(g)}}return Fa({width:d,height:u,x:l,y:c})}function za(e,t){const r=La(e).scrollLeft;return t?t.left+r:ui(Gr(e)).left+r}function gv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-za(e,r),y:r.top+t.scrollTop}}function pD(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Gr(n),a=t?Ra(t.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Wr(1);const d=Wr(0),u=un(n);if((u||!u&&!s)&&((qi(n)!=="body"||no(o))&&(l=La(n)),u)){const f=ui(n);c=Bi(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=o&&!u&&!s?gv(o,l):Wr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function mD(e){return Array.from(e.getClientRects())}function vD(e){const t=Gr(e),r=La(e),n=e.ownerDocument.body,i=Yt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Yt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+za(e);const a=-r.scrollTop;return Cr(n).direction==="rtl"&&(o+=Yt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var yv=25;function gD(e,t){const r=Jt(e),n=Gr(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const d=bc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=za(n);if(c<=0){const d=n.ownerDocument,u=d.body,p=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-f);g<=yv&&(s-=g)}else c<=yv&&(s+=c);return{width:s,height:o,x:a,y:l}}function yD(e,t){const r=ui(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=un(e)?Bi(e):Wr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function bv(e,t,r){let n;if(t==="viewport")n=gD(e,r);else if(t==="document")n=vD(Gr(e));else if(Or(t))n=yD(t,r);else{const i=vv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fa(n)}function _v(e,t){const r=Ln(e);return r===t||!Or(r)||Vi(r)?!1:Cr(r).position==="fixed"||_v(r,t)}function bD(e,t){const r=t.get(e);if(r)return r;let n=io(e,[],!1).filter(a=>Or(a)&&qi(a)!=="body"),i=null;const s=Cr(e).position==="fixed";let o=s?Ln(e):e;for(;Or(o)&&!Vi(o);){const a=Cr(o),l=yc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||no(o)&&!l&&_v(e,o))?n=n.filter(c=>c!==o):i=a,o=Ln(o)}return t.set(e,n),n}function _D(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ra(t)?[]:bD(t,this._c):[].concat(r),n],o=bv(t,s[0],i);let a=o.top,l=o.right,c=o.bottom,d=o.left;for(let u=1;u<s.length;u++){const p=bv(t,s[u],i);a=Yt(p.top,a),l=Rn(p.right,l),c=Rn(p.bottom,c),d=Yt(p.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function wD(e){const{width:t,height:r}=mv(e);return{width:t,height:r}}function kD(e,t,r){const n=un(t),i=Gr(t),s=r==="fixed",o=ui(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Wr(0);function c(){l.x=za(i)}if(n||!n&&!s)if((qi(t)!=="body"||no(i))&&(a=La(t)),n){const u=ui(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const d=i&&!n&&!s?gv(i,a):Wr(0);return{x:o.left+a.scrollLeft-l.x-d.x,y:o.top+a.scrollTop-l.y-d.y,width:o.width,height:o.height}}function kc(e){return Cr(e).position==="static"}function wv(e,t){if(!un(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gr(e)===r&&(r=r.ownerDocument.body),r}function kv(e,t){const r=Jt(e);if(Ra(e))return r;if(!un(e)){let i=Ln(e);for(;i&&!Vi(i);){if(Or(i)&&!kc(i))return i;i=Ln(i)}return r}let n=wv(e,t);for(;n&&lD(n)&&kc(n);)n=wv(n,t);return n&&Vi(n)&&kc(n)&&!yc(n)?r:n||dD(e)||r}var SD=async function(e){const t=this.getOffsetParent||kv,r=this.getDimensions,n=await r(e.floating);return{reference:kD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ED(e){return Cr(e).direction==="rtl"}var xD={convertOffsetParentRelativeRectToViewportRelativeRect:pD,getDocumentElement:Gr,getClippingRect:_D,getOffsetParent:kv,getElementRects:SD,getClientRects:mD,getDimensions:wD,getScale:Bi,isElement:Or,isRTL:ED};function Sv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function TD(e,t){let r=null,n;const i=Gr(e);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=e.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(a||t(),!p||!f)return;const g=$a(u),m=$a(i.clientWidth-(d+p)),v=$a(i.clientHeight-(u+f)),_=$a(d),k={rootMargin:-g+"px "+-m+"px "+-v+"px "+-_+"px",threshold:Yt(0,Rn(1,l))||1};let A=!0;function E(T){const C=T[0].intersectionRatio;if(C!==l){if(!A)return o();C?o(!1,C):n=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!Sv(c,e.getBoundingClientRect())&&o(),A=!1}try{r=new IntersectionObserver(E,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,k)}r.observe(e)}return o(!0),s}function AD(e,t,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=wc(e),d=i||s?[...c?io(c):[],...t?io(t):[]]:[];d.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const u=c&&a?TD(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(_=>{let[k]=_;k&&k.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=f)==null||A.observe(t)})),r()}),c&&!l&&f.observe(c),t&&f.observe(t));let g,m=l?ui(e):null;l&&v();function v(){const _=ui(e);m&&!Sv(m,_)&&r(),m=_,g=requestAnimationFrame(v)}return r(),()=>{var _;d.forEach(k=>{i&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var OD=iD,CD=sD,DD=tD,ID=aD,PD=rD,$D=eD,MD=oD,FD=(e,t,r)=>{const n=new Map,i={platform:xD,...r},s={...i.platform,_c:n};return QC(e,t,{...i,platform:s})};function ci(e){return typeof e=="function"?e():e}function Ev(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xv(e,t){const r=Ev(e);return Math.round(t*r)/r}function Tv(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function ND(e){const t=e.whileElementsMounted,r=D(()=>ci(e.open)??!0),n=D(()=>ci(e.middleware)),i=D(()=>ci(e.transform)??!0),s=D(()=>ci(e.placement)??"bottom"),o=D(()=>ci(e.strategy)??"absolute"),a=D(()=>ci(e.sideOffset)??0),l=D(()=>ci(e.alignOffset)??0),c=e.reference;let d=te(0),u=te(0);const p=Er(null);let f=te(Fe(h(o))),g=te(Fe(h(s))),m=te(Fe({})),v=te(!1),_=!1,k=0;const A=D(()=>{const N=p.current?xv(p.current,h(d)):h(d),le=p.current?xv(p.current,h(u)):h(u);return h(i)?{position:h(f),left:"0",top:"0",transform:`translate(${N}px, ${le}px)`,...p.current&&Ev(p.current)>=1.5&&{willChange:"transform"}}:{position:h(f),left:`${N}px`,top:`${le}px`}});let E;function T(){if(c.current===null||p.current===null)return;const N=c.current,le=p.current,V=++k;FD(N,le,{middleware:h(n),placement:h(s),strategy:h(o)}).then(ae=>{if(V===k&&!(c.current!==N||p.current!==le)){if(RD(N)){I(m,{...h(m),hide:{...h(m).hide,referenceHidden:!0}},!0);return}if(!h(r)&&h(d)!==0&&h(u)!==0){const me=Math.max(Math.abs(h(a)),Math.abs(h(l)),15);if(ae.x<=me&&ae.y<=me)return}I(d,ae.x,!0),I(u,ae.y,!0),I(f,ae.strategy,!0),I(g,ae.placement,!0),I(m,ae.middlewareData,!0),I(v,!0)}})}function C(){typeof E=="function"&&(E(),E=void 0),k++}function $(){if(C(),t===void 0){T();return}h(r)&&(c.current===null||p.current===null||(E=t(c.current,p.current,T)))}function R(){!h(r)&&p.current===null&&I(v,!1)}function U(){return[h(n),h(s),h(o),h(a),h(l),h(r)]}return ge(()=>{t===void 0&&h(r)&&T()}),ge($),ge(()=>{if(t!==void 0){if(U(),!h(r)){_=!1;return}if(!h(v)){_=!1;return}if(!_){_=!0;return}T()}}),ge(R),ge(()=>C),{floating:p,reference:c,get strategy(){return h(f)},get placement(){return h(g)},get middlewareData(){return h(m)},get isPositioned(){return h(v)},get floatingStyles(){return h(A)},get update(){return T}}}function RD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var LD={top:"bottom",right:"left",bottom:"top",left:"right"},Sc=new It("Floating.Root"),Av=new It("Floating.Content"),Ec=new It("Floating.Root"),zD=class ud{static create(t=!1){return t?Ec.set(new ud):Sc.set(new ud)}anchorNode=Er(null);customAnchorNode=Er(null);triggerNode=Er(null);constructor(){ge(()=>{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})}},UD=class cd{static create(t,r=!1){return r?Av.set(new cd(t,Ec.get())):Av.set(new cd(t,Sc.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=Qe(this.contentRef);wrapperAttachment=Qe(this.wrapperRef);arrowAttachment=Qe(this.arrowRef);arrowId=Er(Nn());#e=D(()=>{if(typeof this.opts.style=="string")return Zs(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new nA(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=D(()=>h(this.#a).length>0);get hasExplicitBoundaries(){return h(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:h(this.#a).filter(kA),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return h(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=te(void 0);#c=te(void 0);#d=te(void 0);#h=te(void 0);#p=D(()=>[OD({mainAxis:this.opts.sideOffset.current+h(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&CD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?MD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&DD({...this.detectOverflowOptions}),ID({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;I(this.#u,r,!0),I(this.#c,n,!0),I(this.#d,i,!0),I(this.#h,s,!0)}}),this.arrowRef.current&&$D({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),VD({arrowWidth:h(this.#n),arrowHeight:h(this.#i)}),this.opts.hideWhenDetached.current&&PD({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return h(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>BD(this.floating.placement));get placedSide(){return h(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>jD(this.floating.placement));get placedAlign(){return h(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return h(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return h(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return h(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=te();get contentZIndex(){return h(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>LD[this.placedSide]);get arrowBaseSide(){return h(this.#g)}set arrowBaseSide(t){I(this.#g,t)}#k=D(()=>({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.#c)}px`,"--bits-floating-anchor-width":`${h(this.#d)}px`,"--bits-floating-anchor-height":`${h(this.#h)}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.#k)}set wrapperProps(t){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Hs({...h(this.#e)}),...this.contentAttachment}));get props(){return h(this.#b)}set props(t){I(this.#b,t)}#S=D(()=>({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(t){I(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),tt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=ND({strategy:()=>this.opts.strategy.current,placement:()=>h(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>AD(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ge(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),tt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=lm(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const o=i.getComputedStyle(n).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),ge(()=>{this.floating.floating.current=this.wrapperRef.current})}},qD=class dd{static create(t,r=!1){return r?new dd(t,Ec.get()):new dd(t,Sc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=kT(t.virtualEl.current):r.triggerNode=t.ref}};function VD(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,c]=xc(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,p=(i.arrow?.y??0)+a/2;let f="",g="";return l==="bottom"?(f=s?d:`${u}px`,g=`${-a}px`):l==="top"?(f=s?d:`${u}px`,g=`${n.floating.height+a}px`):l==="right"?(f=`${-a}px`,g=s?d:`${p}px`):l==="left"&&(f=`${n.floating.width+a}px`,g=s?d:`${p}px`),{data:{x:f,y:g}}}}}function xc(e){const[t,r="center"]=e.split("-");return[t,r]}function BD(e){return xc(e)[0]}function jD(e){return xc(e)[1]}function Ov(e,t){re(t,!0);let r=b(t,"children",7),n=b(t,"tooltip",7,!1);zD.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=Y(),o=q(s);return we(o,()=>r()??Me),x(e,s),ne(i)}ie(Ov,{children:{},tooltip:{}},[],[],{mode:"open"});function Cv(e,t){re(t,!0);let r=b(t,"id",7),n=b(t,"children",7),i=b(t,"virtualEl",7),s=b(t,"ref",7),o=b(t,"tooltip",7,!1);qD.create({id:L(()=>r()),virtualEl:L(()=>i()),ref:s()},o());var a={get id(){return r()},set id(d){r(d),y()},get children(){return n()},set children(d){n(d),y()},get virtualEl(){return i()},set virtualEl(d){i(d),y()},get ref(){return s()},set ref(d){s(d),y()},get tooltip(){return o()},set tooltip(d=!1){o(d),y()}},l=Y(),c=q(l);return we(c,()=>n()??Me),x(e,l),ne(a)}ie(Cv,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function Dv(e,t){re(t,!0);let r=b(t,"content",7),n=b(t,"side",7,"bottom"),i=b(t,"sideOffset",7,0),s=b(t,"align",7,"center"),o=b(t,"alignOffset",7,0),a=b(t,"id",7),l=b(t,"arrowPadding",7,0),c=b(t,"avoidCollisions",7,!0),d=b(t,"collisionBoundary",23,()=>[]),u=b(t,"collisionPadding",7,0),p=b(t,"hideWhenDetached",7,!1),f=b(t,"onPlaced",7,()=>{}),g=b(t,"sticky",7,"partial"),m=b(t,"updatePositionStrategy",7,"optimized"),v=b(t,"strategy",7,"fixed"),_=b(t,"dir",7,"ltr"),k=b(t,"style",23,()=>({})),A=b(t,"wrapperId",23,Nn),E=b(t,"customAnchor",7,null),T=b(t,"enabled",7),C=b(t,"tooltip",7,!1);const $=UD.create({side:L(()=>n()),sideOffset:L(()=>i()),align:L(()=>s()),alignOffset:L(()=>o()),id:L(()=>a()),arrowPadding:L(()=>l()),avoidCollisions:L(()=>c()),collisionBoundary:L(()=>d()),collisionPadding:L(()=>u()),hideWhenDetached:L(()=>p()),onPlaced:L(()=>f()),sticky:L(()=>g()),updatePositionStrategy:L(()=>m()),strategy:L(()=>v()),dir:L(()=>_()),style:L(()=>k()),enabled:L(()=>T()),wrapperId:L(()=>A()),customAnchor:L(()=>E())},C()),R=D(()=>He($.wrapperProps,{style:{pointerEvents:"auto"}}));var U={get content(){return r()},set content(V){r(V),y()},get side(){return n()},set side(V="bottom"){n(V),y()},get sideOffset(){return i()},set sideOffset(V=0){i(V),y()},get align(){return s()},set align(V="center"){s(V),y()},get alignOffset(){return o()},set alignOffset(V=0){o(V),y()},get id(){return a()},set id(V){a(V),y()},get arrowPadding(){return l()},set arrowPadding(V=0){l(V),y()},get avoidCollisions(){return c()},set avoidCollisions(V=!0){c(V),y()},get collisionBoundary(){return d()},set collisionBoundary(V=[]){d(V),y()},get collisionPadding(){return u()},set collisionPadding(V=0){u(V),y()},get hideWhenDetached(){return p()},set hideWhenDetached(V=!1){p(V),y()},get onPlaced(){return f()},set onPlaced(V=()=>{}){f(V),y()},get sticky(){return g()},set sticky(V="partial"){g(V),y()},get updatePositionStrategy(){return m()},set updatePositionStrategy(V="optimized"){m(V),y()},get strategy(){return v()},set strategy(V="fixed"){v(V),y()},get dir(){return _()},set dir(V="ltr"){_(V),y()},get style(){return k()},set style(V={}){k(V),y()},get wrapperId(){return A()},set wrapperId(V=Nn()){A(V),y()},get customAnchor(){return E()},set customAnchor(V=null){E(V),y()},get enabled(){return T()},set enabled(V){T(V),y()},get tooltip(){return C()},set tooltip(V=!1){C(V),y()}},N=Y(),le=q(N);return we(le,()=>r()??Me,()=>({props:$.props,wrapperProps:h(R)})),x(e,N),ne(U)}ie(Dv,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function Iv(e,t){re(t,!0);let r=b(t,"content",7),n=b(t,"onPlaced",7);rn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),y()},get onPlaced(){return n()},set onPlaced(a){n(a),y()}},s=Y(),o=q(s);return we(o,()=>r()??Me,()=>({props:{},wrapperProps:{}})),x(e,s),ne(i)}ie(Iv,{content:{},onPlaced:{}},[],[],{mode:"open"});var ZD=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function Pv(e,t){re(t,!0);let r=b(t,"content",7),n=b(t,"isStatic",7,!1),i=b(t,"onPlaced",7),s=je(t,ZD);var o={get content(){return r()},set content(u){r(u),y()},get isStatic(){return n()},set isStatic(u=!1){n(u),y()},get onPlaced(){return i()},set onPlaced(u){i(u),y()}},a=Y(),l=q(a),c=u=>{Iv(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{Dv(u,Sn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return de(l,u=>{n()?u(c):u(d,-1)}),x(e,a),ne(o)}ie(Pv,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var WD=new Set(["$$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"]),HD=j("<!> <!>",1);function Tc(e,t){re(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),p=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),k=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),T=b(t,"dir",7),C=b(t,"preventScroll",7),$=b(t,"wrapperId",7),R=b(t,"style",7),U=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),le=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),ae=b(t,"onFocusOutside",7),me=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),oe=b(t,"trapFocus",7,!0),G=b(t,"isValidEvent",7,()=>!1),Q=b(t,"customAnchor",7,null),K=b(t,"isStatic",7,!1),H=b(t,"enabled",7),B=b(t,"ref",7),ee=b(t,"tooltip",7,!1),P=b(t,"contentPointerEvents",7,"auto"),ue=je(t,WD);const z=D(()=>C()??!0),ve=D(()=>E()??(h(z)?"fixed":"absolute"));var fe={get popper(){return r()},set popper(w){r(w),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),y()},get id(){return o()},set id(w){o(w),y()},get onPointerDown(){return a()},set onPointerDown(w){a(w),y()},get onPointerUp(){return l()},set onPointerUp(w){l(w),y()},get side(){return c()},set side(w){c(w),y()},get sideOffset(){return d()},set sideOffset(w){d(w),y()},get align(){return u()},set align(w){u(w),y()},get alignOffset(){return p()},set alignOffset(w){p(w),y()},get arrowPadding(){return f()},set arrowPadding(w){f(w),y()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),y()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),y()},get collisionPadding(){return v()},set collisionPadding(w){v(w),y()},get sticky(){return _()},set sticky(w){_(w),y()},get hideWhenDetached(){return k()},set hideWhenDetached(w){k(w),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(w){A(w),y()},get strategy(){return E()},set strategy(w){E(w),y()},get dir(){return T()},set dir(w){T(w),y()},get preventScroll(){return C()},set preventScroll(w){C(w),y()},get wrapperId(){return $()},set wrapperId(w){$(w),y()},get style(){return R()},set style(w){R(w),y()},get onPlaced(){return U()},set onPlaced(w){U(w),y()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),y()},get onCloseAutoFocus(){return le()},set onCloseAutoFocus(w){le(w),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(w){V(w),y()},get onFocusOutside(){return ae()},set onFocusOutside(w){ae(w),y()},get interactOutsideBehavior(){return me()},set interactOutsideBehavior(w="close"){me(w),y()},get loop(){return J()},set loop(w){J(w),y()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),y()},get isValidEvent(){return G()},set isValidEvent(w=()=>!1){G(w),y()},get customAnchor(){return Q()},set customAnchor(w=null){Q(w),y()},get isStatic(){return K()},set isStatic(w=!1){K(w),y()},get enabled(){return H()},set enabled(w){H(w),y()},get ref(){return B()},set ref(w){B(w),y()},get tooltip(){return ee()},set tooltip(w=!1){ee(w),y()},get contentPointerEvents(){return P()},set contentPointerEvents(w="auto"){P(w),y()}};return Pv(e,{get isStatic(){return K()},get id(){return o()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return A()},get strategy(){return h(ve)},get dir(){return T()},get wrapperId(){return $()},get style(){return R()},get onPlaced(){return U()},get customAnchor(){return Q()},get enabled(){return H()},get tooltip(){return ee()},content:(Be,Pe)=>{let Je=()=>Pe?.().props,Et=()=>Pe?.().wrapperProps;var Ke=HD(),Xt=q(Ke),dt=Mt=>{Hu(Mt,{get preventScroll(){return h(z)}})},Qt=Mt=>{Hu(Mt,{get preventScroll(){return h(z)}})};de(Xt,Mt=>{t.forceMount&&H()?Mt(dt):t.forceMount||Mt(Qt,1)});var xt=X(Xt,2);Dm(xt,{get onOpenAutoFocus(){return V()},get onCloseAutoFocus(){return le()},get loop(){return J()},get enabled(){return H()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return B()},focusScope:(er,jt)=>{let hr=()=>jt?.().props;Cm(er,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return H()},get ref(){return B()},children:(Ir,Pr)=>{Om(Ir,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return ae()},get interactOutsideBehavior(){return me()},get isValidEvent(){return G()},get enabled(){return H()},get ref(){return B()},children:($r,pr)=>{let Jr=()=>pr?.().props;$m($r,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return H()},get ref(){return B()},children:(Xr,wt)=>{var Un=Y(),ns=q(Un);{let is=D(()=>({props:He(ue,Je(),Jr(),hr(),{style:{pointerEvents:P()}}),wrapperProps:Et()}));we(ns,()=>r()??Me,()=>h(is))}x(Xr,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(Be,Ke)},$$slots:{content:!0}}),ne(fe)}ie(Tc,{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"});var GD=new Set(["$$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"]);function $v(e,t){re(t,!0);let r=b(t,"popper",7),n=b(t,"open",7),i=b(t,"onEscapeKeydown",7),s=b(t,"escapeKeydownBehavior",7),o=b(t,"preventOverflowTextSelection",7),a=b(t,"id",7),l=b(t,"onPointerDown",7),c=b(t,"onPointerUp",7),d=b(t,"side",7),u=b(t,"sideOffset",7),p=b(t,"align",7),f=b(t,"alignOffset",7),g=b(t,"arrowPadding",7),m=b(t,"avoidCollisions",7),v=b(t,"collisionBoundary",7),_=b(t,"collisionPadding",7),k=b(t,"sticky",7),A=b(t,"hideWhenDetached",7),E=b(t,"updatePositionStrategy",7),T=b(t,"strategy",7),C=b(t,"dir",7),$=b(t,"preventScroll",7),R=b(t,"wrapperId",7),U=b(t,"style",7),N=b(t,"onPlaced",7),le=b(t,"onInteractOutside",7),V=b(t,"onCloseAutoFocus",7),ae=b(t,"onOpenAutoFocus",7),me=b(t,"onFocusOutside",7),J=b(t,"interactOutsideBehavior",7,"close"),oe=b(t,"loop",7),G=b(t,"trapFocus",7,!0),Q=b(t,"isValidEvent",7,()=>!1),K=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),B=b(t,"ref",7),ee=b(t,"shouldRender",7),P=je(t,GD);var ue={get popper(){return r()},set popper(w){r(w),y()},get open(){return n()},set open(w){n(w),y()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),y()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),y()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(w){o(w),y()},get id(){return a()},set id(w){a(w),y()},get onPointerDown(){return l()},set onPointerDown(w){l(w),y()},get onPointerUp(){return c()},set onPointerUp(w){c(w),y()},get side(){return d()},set side(w){d(w),y()},get sideOffset(){return u()},set sideOffset(w){u(w),y()},get align(){return p()},set align(w){p(w),y()},get alignOffset(){return f()},set alignOffset(w){f(w),y()},get arrowPadding(){return g()},set arrowPadding(w){g(w),y()},get avoidCollisions(){return m()},set avoidCollisions(w){m(w),y()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),y()},get collisionPadding(){return _()},set collisionPadding(w){_(w),y()},get sticky(){return k()},set sticky(w){k(w),y()},get hideWhenDetached(){return A()},set hideWhenDetached(w){A(w),y()},get updatePositionStrategy(){return E()},set updatePositionStrategy(w){E(w),y()},get strategy(){return T()},set strategy(w){T(w),y()},get dir(){return C()},set dir(w){C(w),y()},get preventScroll(){return $()},set preventScroll(w){$(w),y()},get wrapperId(){return R()},set wrapperId(w){R(w),y()},get style(){return U()},set style(w){U(w),y()},get onPlaced(){return N()},set onPlaced(w){N(w),y()},get onInteractOutside(){return le()},set onInteractOutside(w){le(w),y()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(w){V(w),y()},get onOpenAutoFocus(){return ae()},set onOpenAutoFocus(w){ae(w),y()},get onFocusOutside(){return me()},set onFocusOutside(w){me(w),y()},get interactOutsideBehavior(){return J()},set interactOutsideBehavior(w="close"){J(w),y()},get loop(){return oe()},set loop(w){oe(w),y()},get trapFocus(){return G()},set trapFocus(w=!0){G(w),y()},get isValidEvent(){return Q()},set isValidEvent(w=()=>!1){Q(w),y()},get customAnchor(){return K()},set customAnchor(w=null){K(w),y()},get isStatic(){return H()},set isStatic(w=!1){H(w),y()},get ref(){return B()},set ref(w){B(w),y()},get shouldRender(){return ee()},set shouldRender(w){ee(w),y()}},z=Y(),ve=q(z),fe=w=>{Tc(w,Sn({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 d()},get sideOffset(){return u()},get align(){return p()},get alignOffset(){return f()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return _()},get sticky(){return k()},get hideWhenDetached(){return A()},get updatePositionStrategy(){return E()},get strategy(){return T()},get dir(){return C()},get preventScroll(){return $()},get wrapperId(){return R()},get style(){return U()},get onPlaced(){return N()},get customAnchor(){return K()},get isStatic(){return H()},get enabled(){return n()},get onInteractOutside(){return le()},get onCloseAutoFocus(){return V()},get onOpenAutoFocus(){return ae()},get interactOutsideBehavior(){return J()},get loop(){return oe()},get trapFocus(){return G()},get isValidEvent(){return Q()},get onFocusOutside(){return me()},forceMount:!1,get ref(){return B()}},()=>P))};return de(ve,w=>{ee()&&w(fe)}),x(e,z),ne(ue)}ie($v,{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"});var KD=new Set(["$$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"]);function Mv(e,t){re(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),p=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),k=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),T=b(t,"dir",7),C=b(t,"preventScroll",7),$=b(t,"wrapperId",7),R=b(t,"style",7),U=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),le=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),ae=b(t,"onFocusOutside",7),me=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),oe=b(t,"trapFocus",7,!0),G=b(t,"isValidEvent",7,()=>!1),Q=b(t,"customAnchor",7,null),K=b(t,"isStatic",7,!1),H=b(t,"enabled",7),B=je(t,KD);var ee={get popper(){return r()},set popper(P){r(P),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(P){n(P),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(P){i(P),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(P){s(P),y()},get id(){return o()},set id(P){o(P),y()},get onPointerDown(){return a()},set onPointerDown(P){a(P),y()},get onPointerUp(){return l()},set onPointerUp(P){l(P),y()},get side(){return c()},set side(P){c(P),y()},get sideOffset(){return d()},set sideOffset(P){d(P),y()},get align(){return u()},set align(P){u(P),y()},get alignOffset(){return p()},set alignOffset(P){p(P),y()},get arrowPadding(){return f()},set arrowPadding(P){f(P),y()},get avoidCollisions(){return g()},set avoidCollisions(P){g(P),y()},get collisionBoundary(){return m()},set collisionBoundary(P){m(P),y()},get collisionPadding(){return v()},set collisionPadding(P){v(P),y()},get sticky(){return _()},set sticky(P){_(P),y()},get hideWhenDetached(){return k()},set hideWhenDetached(P){k(P),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(P){A(P),y()},get strategy(){return E()},set strategy(P){E(P),y()},get dir(){return T()},set dir(P){T(P),y()},get preventScroll(){return C()},set preventScroll(P){C(P),y()},get wrapperId(){return $()},set wrapperId(P){$(P),y()},get style(){return R()},set style(P){R(P),y()},get onPlaced(){return U()},set onPlaced(P){U(P),y()},get onInteractOutside(){return N()},set onInteractOutside(P){N(P),y()},get onCloseAutoFocus(){return le()},set onCloseAutoFocus(P){le(P),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(P){V(P),y()},get onFocusOutside(){return ae()},set onFocusOutside(P){ae(P),y()},get interactOutsideBehavior(){return me()},set interactOutsideBehavior(P="close"){me(P),y()},get loop(){return J()},set loop(P){J(P),y()},get trapFocus(){return oe()},set trapFocus(P=!0){oe(P),y()},get isValidEvent(){return G()},set isValidEvent(P=()=>!1){G(P),y()},get customAnchor(){return Q()},set customAnchor(P=null){Q(P),y()},get isStatic(){return K()},set isStatic(P=!1){K(P),y()},get enabled(){return H()},set enabled(P){H(P),y()}};return Tc(e,Sn({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 d()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return A()},get strategy(){return E()},get dir(){return T()},get preventScroll(){return C()},get wrapperId(){return $()},get style(){return R()},get onPlaced(){return U()},get customAnchor(){return Q()},get isStatic(){return K()},get enabled(){return H()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return le()},get onOpenAutoFocus(){return V()},get interactOutsideBehavior(){return me()},get loop(){return J()},get trapFocus(){return oe()},get isValidEvent(){return G()},get onFocusOutside(){return ae()}},()=>B,{forceMount:!0})),ne(ee)}ie(Mv,{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"});var Ua=ma({component:"date-field",parts:["input","label","segment"]}),ji={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return Js(t?r.set({month:Number.parseInt(t)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(e,t)=>t.placeholder.current?`${e} - ${t.formatter.fullMonth(Vt(t.placeholder.current.set({month:e})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:e=>e.hourCycle.current===12?1:0,max:e=>e.hourCycle.current===24?23:e.hourCycle.current===12||Wm(e.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 It("DateField.Root"),YD=class gy{static create(t,r){return zn.set(new gy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Nn();formatter;initialSegments;#e=te();get segmentValues(){return h(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return h(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=Bm();#r=te(null);#n=te(null);#i=te(null);get descriptionNode(){return h(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=te(null);get validationNode(){return h(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=Bm();#a=te(null);get dayPeriodNode(){return h(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=te("");get name(){return h(this.#o)}set name(t){I(this.#o,t,!0)}domContext=new zi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?Er(void 0):t.validate,this.minValue=r?r.opts.minValue:t.minValue,this.maxValue=r?r.opts.maxValue:t.maxValue,this.disabled=r?r.opts.disabled:t.disabled,this.readonly=r?r.opts.readonly:t.readonly,this.granularity=r?r.opts.granularity:t.granularity,this.readonlySegments=r?r.opts.readonlySegments:t.readonlySegments,this.hourCycle=r?r.opts.hourCycle:t.hourCycle,this.locale=r?r.opts.locale:t.locale,this.hideTimeZone=r?r.opts.hideTimeZone:t.hideTimeZone,this.required=r?r.opts.required:t.required,this.onInvalid=r?r.opts.onInvalid:t.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:t.errorMessageId,this.isInvalidProp=t.isInvalidProp,this.formatter=Km({initialLocale:this.locale.current,monthFormat:L(()=>"long"),yearFormat:L(()=>"numeric")}),this.initialSegments=Ju(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Ta(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),ge(()=>{Ne(()=>{this.initialSegments=Ju(this.inferredGranularity)})}),rn(()=>{this.announcer=Ta(this.domContext.getDocument())}),ii(()=>{r||NO(this.descriptionId,this.domContext.getDocument())}),ge(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ge(()=>{if(r)return;this.value.current&&FO({id:Ne(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Ne(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ne(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ge(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ge(()=>{this.value.current===void 0&&(this.segmentValues=Ju(this.inferredGranularity))}),tt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){I(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:h(this.#r)}setLabelNode(t){I(this.#n,t,!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(t){this.value.current=t}syncSegmentValues(t){const r=Oa.map(n=>{const i=t[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 s=4-`${i}`.length;if(s>0)return[n,`${"0".repeat(s)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=Ca.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Vt(t))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`];if(t[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}return[s,`${t[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=D(()=>{const t=this.value.current;if(!t)return!1;const r=this.validate.current?.(t);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&ai(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&ai(i,t)?{reason:"max"}:!1});get validationStatus(){return h(this.#u)}set validationStatus(t){I(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return h(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||$O(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return h(this.#d)}set inferredGranularity(t){I(this.#d,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return h(this.#h)}set dateRef(t){I(this.#h,t)}#p=D(()=>AO({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.#p)}set allSegmentContent(t){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return h(this.#f)}set segmentContents(t){I(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(PO(o)){const c=o[t],d=r;if(t==="month"){const u=d(c);if(this.states.month.updating=u,u!==null&&o.day!==null){const p=Js(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[t]:u}}else if(t==="dayPeriod"){const u=d(c);this.states.dayPeriod.updating=u;const p=this.value.current;if(p&&"hour"in p){const f=p.hour;u==="AM"?f>=12&&(o.hour=`${f-12}`):u==="PM"&&f<12&&(o.hour=`${f+12}`)}a={...o,[t]:u}}else if(t==="hour"){const u=d(c);if(this.states.hour.updating=u,u!==null&&o.dayPeriod!==null){const p=this.formatter.dayPeriod(Vt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(o.dayPeriod=p)}a={...o,[t]:u}}else if(t==="minute"){const u=d(c);this.states.minute.updating=u,a={...o,[t]:u}}else if(t==="second"){const u=d(c);this.states.second.updating=u,a={...o,[t]:u}}else if(t==="year"){const u=d(c);this.states.year.updating=u,a={...o,[t]:u}}else if(t==="day"){const u=d(c);this.states.day.updating=u,a={...o,[t]:u}}else{const u=d(c);a={...o,[t]:u}}}else if(Da(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const p=Js(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[t]:u}}else if(t==="year"){const p=d(c);this.states.year.updating=p,a={...o,[t]:p}}else if(t==="day"){const p=d(c);this.states.day.updating=p,a={...o,[t]:p}}else a={...o,[t]:u}}this.segmentValues=a,IO(a,h(this.#r))?this.setValue(DO({segmentObj:a,fieldNode:h(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Uu(this.isInvalid),"aria-disabled":xr(this.disabled.current),"aria-readonly":xr(this.readonly.current||n),"data-invalid":ze(this.isInvalid),"data-disabled":ze(this.disabled.current),"data-readonly":ze(this.readonly.current||n),"data-segment":`${t}`,[Ua.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=MO(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}}},JD=class yy{static create(t){return new yy(t,zn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new zi(t.ref),this.root.domContext=this.domContext,this.attachment=Qe(t.ref,n=>this.root.setFieldNode(n)),tt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(on&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=D(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":h(this.#e),"aria-disabled":xr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":ze(this.root.disabled.current),[Ua.input]:"",...this.attachment}));get props(){return h(this.#t)}set props(t){I(this.#t,t)}},XD=class by{static create(){return new by(zn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return h(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return h(this.#t)}set isoValue(t){I(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return h(this.#r)}set props(t){I(this.#r,t)}},QD=class _y{static create(t){return new _y(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=zO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":ze(this.root.isInvalid),"data-disabled":ze(this.root.disabled.current),[Ua.label]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#e)}set props(t){I(this.#e,t)}},Zi=class{opts;root;announcer;part;config;attachment;constructor(e,t,r,n){this.opts=e,this.root=t,this.part=r,this.config=n,this.announcer=t.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=Qe(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,t=!0){const r=String(e);return t&&this.config.padZero&&r.length===1?`0${e}`:r}onkeydown(e){const t=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 t))&&(e.key!=="Tab"&&e.preventDefault(),!!Xu(e.key))){if(Ac(e.key)){this.#i(t);return}if(Oc(e.key)){this.#s(t);return}if(va(e.key)){this.#a(e);return}if(Cc(e.key)){this.#o(e);return}eo(e.key)&&Qs(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#a(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,o=this.part;this.root.updateSegment(this.part,a=>{if(o in this.root.states&&this.root.states[o].hasLeftFocus&&(a=null,this.root.states[o].hasLeftFocus=!1),a===null)return s?(o in this.root.states&&(this.root.states[o].lastKeyZero=!0),this.announcer.announce("0"),"0"):(o in this.root.states&&(this.root.states[o].lastKeyZero||t>i)&&(r=!0),o in this.root.states&&(this.root.states[o].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(o in this.root.states&&this.root.states[o].lastKeyZero)return t!==0?(r=!0,this.root.states[o].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):a;const l=Number.parseInt(a+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&Hm(e,this.root.getFieldNode())}#o(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&Gm(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),o=this.#e();let a=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(a=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":a}}#l=D(()=>({...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)}},eI=class extends Zi{#e=[];#t=0;constructor(e,t){super(e,t,"year",ji.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!Xu(e.key))){if(Ac(e.key)){this.#r(),super.onkeydown(e);return}if(Oc(e.key)){this.#r(),super.onkeydown(e);return}if(va(e.key)){this.#i(e);return}if(Cc(e.key)){this.#s(e);return}eo(e.key)&&Qs(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let t=!1;const r=Number.parseInt(e.key);this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus&&(n=null,this.root.states.year.hasLeftFocus=!1),n===null)return this.announcer.announce(r),`000${r}`;const i=n.toString()+r.toString(),s=Number.parseInt(i);if(String(s).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(s),i):(this.announcer.announce(s),Fv(s));this.announcer.announce(s),t=!0;const o=`${s}`;return o.length>4?o.slice(0,4):o}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&Hm(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let t=!1;this.root.updateSegment("year",r=>{if(this.root.states.year.hasLeftFocus=!1,r===null)return t=!0,this.announcer.announce(null),null;const n=r.toString();if(n.length===1)return this.announcer.announce(null),null;const i=n.slice(0,-1);return this.announcer.announce(i),`${i}`}),t&&Gm(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",t=>t&&t.length!==4?Fv(Number.parseInt(t)):t)}},tI=class extends Zi{constructor(e,t){super(e,t,"day",ji.day)}},rI=class extends Zi{constructor(e,t){super(e,t,"month",ji.month)}},nI=class extends Zi{constructor(e,t){super(e,t,"hour",ji.hour)}onkeydown(e){if(va(e.key)){const t=this.root.updateSegment.bind(this.root);this.root.updateSegment=(r,n)=>{const i=t(r,n);return r==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),i}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}},iI=class extends Zi{constructor(e,t){super(e,t,"minute",ji.minute)}},sI=class extends Zi{constructor(e,t){super(e,t,"second",ji.second)}},oI=class wy{static create(t){return new wy(t,zn.get())}opts;root;attachment;#e;constructor(t,r){this.opts=t,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!cI(t.key))){if(Ac(t.key)||Oc(t.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}Cc(t.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),t.key==="A"||t.key,this.root.updateSegment("dayPeriod",()=>{const r=t.key==="A"||t.key==="a"?"AM":"PM";return this.#e.announce(r),r}),eo(t.key)&&Qs(t,this.root.getFieldNode())}}#t=D(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,s=t.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(t){I(this.#t,t)}},aI=class ky{static create(t){return new ky(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Uu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return h(this.#e)}set props(t){I(this.#e,t)}},lI=class Sy{static create(t){return new Sy(t,zn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&eo(t.key)&&Qs(t,this.root.getFieldNode())}#e=D(()=>({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(t){I(this.#e,t)}},uI=class{static create(e,t){const r=zn.get();switch(e){case"day":return new tI(t,r);case"month":return new rI(t,r);case"year":return new eI(t,r);case"hour":return new nI(t,r);case"minute":return new iI(t,r);case"second":return new sI(t,r);case"dayPeriod":return new oI(t,r);case"literal":return new aI(t,r);case"timeZoneName":return new lI(t,r)}}};function cI(e){return Xu(e)||e==="A"||e==="P"||e==="a"||e==="p"}function Ac(e){return e===Vu}function Oc(e){return e===qu}function Cc(e){return e===yA}function Fv(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function Nv(e,t){re(t,!1);const r=XD.create();Kl();var n=Y(),i=q(n),s=o=>{iv(o,Sn(()=>r.props))};de(i,o=>{r.shouldRender&&o(s)}),x(e,n),ne()}ie(Nv,{},[],[],{mode:"open"});var dI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),fI=j("<div><!></div>"),hI=j("<!> <!>",1);function Rv(e,t){const r=ht();re(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"name",7,""),o=b(t,"children",7),a=b(t,"child",7),l=je(t,dI);const c=JD.create({id:L(()=>n()),ref:L(()=>i(),v=>i(v)),name:L(()=>s())}),d=D(()=>He(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get name(){return s()},set name(v=""){s(v),y()},get children(){return o()},set children(v){o(v),y()},get child(){return a()},set child(v){a(v),y()}},p=hI(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,a,()=>({props:h(d),segments:c.root.segmentContents})),x(v,_)},m=v=>{var _=fI();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>o()??Me,()=>({segments:c.root.segmentContents})),M(_),x(v,_)};return de(f,v=>{a()?v(g):v(m,-1)}),Nv(X(f,2),{}),x(e,p),ne(u)}ie(Rv,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var pI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),mI=j("<div><!></div>");function Lv(e,t){const r=ht();re(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=je(t,pI);const l=QD.create({id:L(()=>n()),ref:L(()=>i(),m=>i(m))}),c=D(()=>He(a,l.props));var d={get id(){return n()},set id(m=Ce(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()}},u=Y(),p=q(u),f=m=>{var v=Y(),_=q(v);we(_,o,()=>({props:h(c)})),x(m,v)},g=m=>{var v=mI();Re(v,()=>({...h(c)}));var _=F(v);we(_,()=>s()??Me),M(v),x(m,v)};return de(p,m=>{o()?m(f):m(g,-1)}),x(e,u),ne(d)}ie(Lv,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var vI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),gI=j("<span><!></span>");function zv(e,t){const r=ht();re(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=b(t,"part",7),l=je(t,vI);const c=uI.create(a(),{id:L(()=>n()),ref:L(()=>i(),v=>i(v))}),d=D(()=>He(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get children(){return s()},set children(v){s(v),y()},get child(){return o()},set child(v){o(v),y()},get part(){return a()},set part(v){a(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);we(k,o,()=>({props:h(d)})),x(v,_)},m=v=>{var _=gI();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>s()??Me),M(_),x(v,_)};return de(f,v=>{o()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(zv,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var Uv=new It("DatePicker.Root"),yI=class Ey{static create(t){return Uv.set(new Ey(t))}opts;constructor(t){this.opts=t}};function Dc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let o=0,a=s-1;o<s;a=o++){const[l,c]=t[o]??[0,0],[d,u]=t[a]??[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function Ic(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function qv(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}var bI=class{#e;#t;#r;#n=null;#i=null;#s=[];#a=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#c(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#d(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#d(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())},this.#r))}constructor(e){this.#e=e,this.#t=e.buffer??1;const t=e.transitIntentTimeout;this.#r=typeof t=="number"&&t>0?t:null,tt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#a=null,this.#f();return}this.#a&&this.#a!==r&&this.#f(),this.#a=r;const s=pa(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const p=u.relatedTarget;if(si(p)&&n.contains(p))return;const f=this.#e.ignoredTargets?.()??[];si(p)&&f.some(g=>g===p||g.contains(p))||(this.#s=si(p)&&f.length>0?f.filter(g=>p.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},d=u=>{const p=u.relatedTarget;si(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[vt(s,"pointermove",o),vt(r,"pointerleave",a),vt(r,"pointerenter",l),vt(n,"pointerenter",c),vt(n,"pointerleave",d)].reduce((u,p)=>()=>{u(),p()},()=>{})})}#p(e,t,r){if(!this.#n||!this.#i)return;this.#u(),this.#h();const n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(this.#i==="content"&&Ic(e,i)){this.#f();return}if(this.#i==="trigger"&&Ic(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(Ic(e,c))return;const d=qv(n,c),u=this.#m(n,c,d);if(u&&Dc(e,u))return}const s=qv(n,i),o=this.#m(n,i,s);if(o&&Dc(e,o))return;const a=this.#i==="content"?i:n;Dc(e,this.#v(this.#n,a,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#d()}#m(e,t,r){const n=this.#t;switch(r){case"top":return[[Math.min(e.left,t.left)-n,e.top],[Math.min(e.left,t.left)-n,t.bottom],[Math.max(e.right,t.right)+n,t.bottom],[Math.max(e.right,t.right)+n,e.top]];case"bottom":return[[Math.min(e.left,t.left)-n,e.bottom],[Math.min(e.left,t.left)-n,t.top],[Math.max(e.right,t.right)+n,t.top],[Math.max(e.right,t.right)+n,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-n],[t.right,Math.min(e.top,t.top)-n],[t.right,Math.max(e.bottom,t.bottom)+n],[e.left,Math.max(e.bottom,t.bottom)+n]];case"right":return[[e.right,Math.min(e.top,t.top)-n],[t.left,Math.min(e.top,t.top)-n],[t.left,Math.max(e.bottom,t.bottom)+n],[e.right,Math.max(e.bottom,t.bottom)+n]]}}#v(e,t,r,n){const i=this.#t*4,[s,o]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,o+i],[s+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,o-i],[s+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},Pc=ma({component:"popover",parts:["root","trigger","content","close","overlay"]}),$c=new It("Popover.Root"),_I=class xy{static create(t){return $c.set(new xy(t))}opts;#e=te(null);get contentNode(){return h(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=te(null);get triggerNode(){return h(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=te(null);get overlayNode(){return h(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=te(!1);get openedViaHover(){return h(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=te(!1);get hasInteractedWithContent(){return h(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=te(!1);get hoverCooldown(){return h(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=te(0);get closeDelay(){return h(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new hm({ref:L(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new hm({ref:L(()=>this.overlayNode),open:this.opts.open}),tt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#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()}},wI=class Ty{static create(t){return new Ty(t,$c.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=te(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new zi(t.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),tt(()=>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(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||ga(t)||(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(t){this.opts.disabled.current||this.opts.openOnHover.current&&(ga(t)||(I(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.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(t){this.opts.disabled.current||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":xr(this.root.opts.open.current),"data-state":um(this.root.opts.open.current),"aria-controls":this.#a(),[Pc.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(t){I(this.#o,t)}},kI=class Ay{static create(t){return new Ay(t,$c.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(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 bI({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(t){this.root.markInteraction()}onfocusin(t){const r=t.target;si(r)&&ZA(r)&&this.root.markInteraction()}onpointerenter(t){ga(t)||this.root.cancelDelayedClose()}onpointerleave(t){ga(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!si(t.target))return;const r=t.target.closest(Pc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(si(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=D(()=>({open:this.root.opts.open.current}));get snippetProps(){return h(this.#e)}set snippetProps(t){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":um(this.root.opts.open.current),...vA(this.root.contentPresence.transitionStatus),[Pc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#t)}set props(t){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function Vv(e,t){re(t,!0);let r=b(t,"open",15,!1),n=b(t,"onOpenChange",7,Se),i=b(t,"onOpenChangeComplete",7,Se),s=b(t,"value",15),o=b(t,"onValueChange",7,Se),a=b(t,"placeholder",15),l=b(t,"onPlaceholderChange",7,Se),c=b(t,"isDateUnavailable",7,()=>!1),d=b(t,"validate",7,Se),u=b(t,"onInvalid",7,Se),p=b(t,"minValue",7),f=b(t,"maxValue",7),g=b(t,"disabled",7,!1),m=b(t,"readonly",7,!1),v=b(t,"granularity",7),_=b(t,"readonlySegments",23,()=>[]),k=b(t,"hourCycle",7),A=b(t,"locale",7),E=b(t,"hideTimeZone",7,!1),T=b(t,"required",7,!1),C=b(t,"calendarLabel",7,"Event"),$=b(t,"disableDaysOutsideMonth",7,!0),R=b(t,"preventDeselect",7,!1),U=b(t,"pagedNavigation",7,!1),N=b(t,"weekStartsOn",7),le=b(t,"weekdayFormat",7,"narrow"),V=b(t,"isDateDisabled",7,()=>!1),ae=b(t,"fixedWeeks",7,!1),me=b(t,"numberOfMonths",7,1),J=b(t,"closeOnDateSelect",7,!0),oe=b(t,"initialFocus",7,!1),G=b(t,"errorMessageId",7),Q=b(t,"children",7),K=b(t,"monthFormat",7,"long"),H=b(t,"yearFormat",7,"numeric");const B=Nm({granularity:v(),defaultValue:s(),minValue:p(),maxValue:f()});function ee(){a()===void 0&&a(B)}ee(),tt.pre(()=>a(),()=>{ee()});function P(){J()&&r(!1)}const ue=yI.create({open:L(()=>r(),w=>{r(w),n()(w)}),value:L(()=>s(),w=>{s(w),o()(w)}),placeholder:L(()=>a(),w=>{a(w),l()(w)}),isDateUnavailable:L(()=>c()),minValue:L(()=>p()),maxValue:L(()=>f()),disabled:L(()=>g()),readonly:L(()=>m()),granularity:L(()=>v()),readonlySegments:L(()=>_()),hourCycle:L(()=>k()),locale:mm(()=>A()),hideTimeZone:L(()=>E()),required:L(()=>T()),calendarLabel:L(()=>C()),disableDaysOutsideMonth:L(()=>$()),preventDeselect:L(()=>R()),pagedNavigation:L(()=>U()),weekStartsOn:L(()=>N()),weekdayFormat:L(()=>le()),isDateDisabled:L(()=>V()),fixedWeeks:L(()=>ae()),numberOfMonths:L(()=>me()),initialFocus:L(()=>oe()),onDateSelect:L(()=>P),defaultPlaceholder:B,monthFormat:L(()=>K()),yearFormat:L(()=>H())});_I.create({open:ue.opts.open,onOpenChangeComplete:L(()=>i())}),YD.create({value:ue.opts.value,disabled:ue.opts.disabled,readonly:ue.opts.readonly,readonlySegments:ue.opts.readonlySegments,validate:L(()=>d()),onInvalid:L(()=>u()),minValue:ue.opts.minValue,maxValue:ue.opts.maxValue,granularity:ue.opts.granularity,hideTimeZone:ue.opts.hideTimeZone,hourCycle:ue.opts.hourCycle,locale:ue.opts.locale,required:ue.opts.required,placeholder:ue.opts.placeholder,errorMessageId:L(()=>G()),isInvalidProp:L(()=>{})});var z={get open(){return r()},set open(w=!1){r(w),y()},get onOpenChange(){return n()},set onOpenChange(w=Se){n(w),y()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Se){i(w),y()},get value(){return s()},set value(w){s(w),y()},get onValueChange(){return o()},set onValueChange(w=Se){o(w),y()},get placeholder(){return a()},set placeholder(w){a(w),y()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Se){l(w),y()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),y()},get validate(){return d()},set validate(w=Se){d(w),y()},get onInvalid(){return u()},set onInvalid(w=Se){u(w),y()},get minValue(){return p()},set minValue(w){p(w),y()},get maxValue(){return f()},set maxValue(w){f(w),y()},get disabled(){return g()},set disabled(w=!1){g(w),y()},get readonly(){return m()},set readonly(w=!1){m(w),y()},get granularity(){return v()},set granularity(w){v(w),y()},get readonlySegments(){return _()},set readonlySegments(w=[]){_(w),y()},get hourCycle(){return k()},set hourCycle(w){k(w),y()},get locale(){return A()},set locale(w){A(w),y()},get hideTimeZone(){return E()},set hideTimeZone(w=!1){E(w),y()},get required(){return T()},set required(w=!1){T(w),y()},get calendarLabel(){return C()},set calendarLabel(w="Event"){C(w),y()},get disableDaysOutsideMonth(){return $()},set disableDaysOutsideMonth(w=!0){$(w),y()},get preventDeselect(){return R()},set preventDeselect(w=!1){R(w),y()},get pagedNavigation(){return U()},set pagedNavigation(w=!1){U(w),y()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),y()},get weekdayFormat(){return le()},set weekdayFormat(w="narrow"){le(w),y()},get isDateDisabled(){return V()},set isDateDisabled(w=()=>!1){V(w),y()},get fixedWeeks(){return ae()},set fixedWeeks(w=!1){ae(w),y()},get numberOfMonths(){return me()},set numberOfMonths(w=1){me(w),y()},get closeOnDateSelect(){return J()},set closeOnDateSelect(w=!0){J(w),y()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),y()},get errorMessageId(){return G()},set errorMessageId(w){G(w),y()},get children(){return Q()},set children(w){Q(w),y()},get monthFormat(){return K()},set monthFormat(w="long"){K(w),y()},get yearFormat(){return H()},set yearFormat(w="numeric"){H(w),y()}},ve=Y(),fe=q(ve);return De(fe,()=>Ov,(w,Be)=>{Be(w,{children:(Pe,Je)=>{var Et=Y(),Ke=q(Et);we(Ke,()=>Q()??Me),x(Pe,Et)},$$slots:{default:!0}})}),x(e,ve),ne(z)}ie(Vv,{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 SI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),EI=j("<div><!></div>");function Bv(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=je(t,SI);const l=Uv.get(),c=ev.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),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:L(()=>"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:L(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),d=D(()=>He(a,c.props));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()}},p=Y(),f=q(p),g=v=>{var _=Y(),k=q(_);{let A=D(()=>({props:h(d),...c.snippetProps}));we(k,i,()=>h(A))}x(v,_)},m=v=>{var _=EI();Re(_,()=>({...h(d)}));var k=F(_);we(k,()=>n()??Me,()=>c.snippetProps),M(_),x(v,_)};return de(f,v=>{i()?v(g):v(m,-1)}),x(e,p),ne(u)}ie(Bv,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var xI=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),jv=j("<div><div><!></div></div>");function Zv(e,t){const r=ht();re(t,!0);let n=b(t,"child",7),i=b(t,"children",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"forceMount",7,!1),l=b(t,"onOpenAutoFocus",7,Se),c=b(t,"onCloseAutoFocus",7,Se),d=b(t,"onEscapeKeydown",7,Se),u=b(t,"onInteractOutside",7,Se),p=b(t,"trapFocus",7,!0),f=b(t,"preventScroll",7,!1),g=b(t,"customAnchor",7,null),m=b(t,"style",7),v=je(t,xI);const _=kI.create({id:L(()=>o()),ref:L(()=>s(),N=>s(N)),onInteractOutside:L(()=>u()),onEscapeKeydown:L(()=>d()),customAnchor:L(()=>g())}),k=D(()=>He(v,_.props)),A=D(()=>p()&&_.shouldTrapFocus);function E(N){_.shouldTrapFocus||N.preventDefault(),l()(N)}var T={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=Ce(r)){o(N),y()},get forceMount(){return a()},set forceMount(N=!1){a(N),y()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Se){l(N),y()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Se){c(N),y()},get onEscapeKeydown(){return d()},set onEscapeKeydown(N=Se){d(N),y()},get onInteractOutside(){return u()},set onInteractOutside(N=Se){u(N),y()},get trapFocus(){return p()},set trapFocus(N=!0){p(N),y()},get preventScroll(){return f()},set preventScroll(N=!1){f(N),y()},get customAnchor(){return g()},set customAnchor(N=null){g(N),y()},get style(){return m()},set style(N){m(N),y()}},C=Y(),$=q(C),R=N=>{Mv(N,Sn(()=>h(k),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return h(A)},get preventScroll(){return f()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,ae)=>{let me=()=>ae?.().props,J=()=>ae?.().wrapperProps;const oe=D(()=>He(me(),{style:Tv("popover")},{style:m()}));var G=Y(),Q=q(G),K=B=>{var ee=Y(),P=q(ee);{let ue=D(()=>({props:h(oe),wrapperProps:J(),..._.snippetProps}));we(P,n,()=>h(ue))}x(B,ee)},H=B=>{var ee=jv();Re(ee,()=>({...J()}));var P=F(ee);Re(P,()=>({...h(oe)}));var ue=F(P);we(ue,()=>i()??Me),M(P),M(ee),x(B,ee)};de(Q,B=>{n()?B(K):B(H,-1)}),x(V,G)},$$slots:{popper:!0}}))},U=N=>{$v(N,Sn(()=>h(k),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return h(A)},get preventScroll(){return f()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,ae)=>{let me=()=>ae?.().props,J=()=>ae?.().wrapperProps;const oe=D(()=>He(me(),{style:Tv("popover")},{style:m()}));var G=Y(),Q=q(G),K=B=>{var ee=Y(),P=q(ee);{let ue=D(()=>({props:h(oe),wrapperProps:J(),..._.snippetProps}));we(P,n,()=>h(ue))}x(B,ee)},H=B=>{var ee=jv();Re(ee,()=>({...J()}));var P=F(ee);Re(P,()=>({...h(oe)}));var ue=F(P);we(ue,()=>i()??Me),M(P),M(ee),x(B,ee)};de(Q,B=>{n()?B(K):B(H,-1)}),x(V,G)},$$slots:{popper:!0}}))};return de($,N=>{a()?N(R):a()||N(U,1)}),x(e,C),ne(T)}ie(Zv,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var TI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function Wv(e,t){re(t,!0);let r=b(t,"ref",15,null),n=b(t,"onOpenAutoFocus",7),i=je(t,TI);const s=D(()=>He({onOpenAutoFocus:n()},{onOpenAutoFocus:eC}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return Zv(e,Sn(()=>h(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),ne(o)}ie(Wv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var AI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),OI=j("<button><!></button>");function Hv(e,t){const r=ht();re(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"type",7,"button"),l=b(t,"disabled",7,!1),c=b(t,"openOnHover",7,!1),d=b(t,"openDelay",7,700),u=b(t,"closeDelay",7,300),p=je(t,AI);const f=wI.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),disabled:L(()=>!!l()),openOnHover:L(()=>c()),openDelay:L(()=>d()),closeDelay:L(()=>u())}),g=D(()=>He(p,f.props,{type:a()}));var m={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get type(){return a()},set type(v="button"){a(v),y()},get disabled(){return l()},set disabled(v=!1){l(v),y()},get openOnHover(){return c()},set openOnHover(v=!1){c(v),y()},get openDelay(){return d()},set openDelay(v=700){d(v),y()},get closeDelay(){return u()},set closeDelay(v=300){u(v),y()}};return Cv(e,{get id(){return s()},get ref(){return f.opts.ref},children:(v,_)=>{var k=Y(),A=q(k),E=C=>{var $=Y(),R=q($);we(R,i,()=>({props:h(g)})),x(C,$)},T=C=>{var $=OI();Re($,()=>({...h(g)}));var R=F($);we(R,()=>n()??Me),M($),x(C,$)};de(A,C=>{i()?C(E):C(T,-1)}),x(v,k)},$$slots:{default:!0}}),ne(m)}ie(Hv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var CI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Gv(e,t){re(t,!0);let r=b(t,"ref",15,null),n=b(t,"onkeydown",7),i=je(t,CI);function s(l){if(eo(l.key)){const c=l.currentTarget.closest(Ua.selector("input"));if(!c)return;Qs(l,c)}}const o=D(()=>He({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 Hv(e,Sn(()=>i,{"data-segment":"trigger"},()=>h(o),{get ref(){return r()},set ref(l){r(l)}})),ne(a)}ie(Gv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Mc=j("<!> <!>",1),Kv=j("<!> <!> <!>",1);function Yv(e,t){re(t,!0);let r=b(t,"dateString",15),n=b(t,"labelClass",7),i=b(t,"inputClass",7),s=b(t,"labelText",7),o=te(Fe(Qn(qt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ge(()=>{r(h(o).toString())});var l={get dateString(){return r()},set dateString(u){r(u),y()},get labelClass(){return n()},set labelClass(u){n(u),y()},get inputClass(){return i()},set inputClass(u){i(u),y()},get labelText(){return s()},set labelText(u){s(u),y()}},c=Y(),d=q(c);{let u=D(()=>O.locale||"de");De(d,()=>Vv,(p,f)=>{f(p,{get locale(){return h(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Qn(qt()))<0,get value(){return h(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=Kv(),_=q(v);De(_,()=>Lv,(E,T)=>{T(E,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(C,$)=>{var R=Y(),U=q(R),N=le=>{var V=Y(),ae=q(V);we(ae,s),x(le,V)};de(U,le=>{s()&&le(N)}),x(C,R)},$$slots:{default:!0}})});var k=X(_,2);{const E=(T,C)=>{let $=()=>C?.().segments;var R=Mc(),U=q(R);qe(U,17,$,Ur,(le,V)=>{let ae=()=>h(V).part,me=()=>h(V).value;var J=Y(),oe=q(J);De(oe,()=>zv,(G,Q)=>{Q(G,{get part(){return ae()},children:(K,H)=>{Tt();var B=zt();ce(()=>se(B,me())),x(K,B)},$$slots:{default:!0}})}),x(le,J)});var N=X(U,2);De(N,()=>Gv,(le,V)=>{V(le,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),x(T,R)};De(k,()=>Rv,(T,C)=>{C(T,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var A=X(k,2);De(A,()=>Wv,(E,T)=>{T(E,{children:(C,$)=>{var R=Y(),U=q(R);{const N=(le,V)=>{let ae=()=>V?.().months,me=()=>V?.().weekdays;var J=Mc(),oe=q(J);De(oe,()=>lc,(Q,K)=>{K(Q,{children:(H,B)=>{var ee=Kv(),P=q(ee);De(P,()=>dc,(ve,fe)=>{fe(ve,{class:"go-datepicker-previous"})});var ue=X(P,2);De(ue,()=>uc,(ve,fe)=>{fe(ve,{class:"go-datepicker-selected-month"})});var z=X(ue,2);De(z,()=>cc,(ve,fe)=>{fe(ve,{class:"go-datepicker-next"})}),x(H,ee)},$$slots:{default:!0}})});var G=X(oe,2);qe(G,16,ae,Q=>Q,(Q,K)=>{var H=Y(),B=q(H);De(B,()=>nc,(ee,P)=>{P(ee,{children:(ue,z)=>{var ve=Mc(),fe=q(ve);De(fe,()=>oc,(Be,Pe)=>{Pe(Be,{children:(Je,Et)=>{var Ke=Y(),Xt=q(Ke);De(Xt,()=>ro,(dt,Qt)=>{Qt(dt,{children:(xt,Mt)=>{var er=Y(),jt=q(er);qe(jt,17,me,Ur,(hr,Ir)=>{var Pr=Y(),vn=q(Pr);De(vn,()=>ac,($r,pr)=>{pr($r,{children:(Jr,Xr)=>{Tt();var wt=zt();ce(()=>se(wt,h(Ir))),x(Jr,wt)},$$slots:{default:!0}})}),x(hr,Pr)}),x(xt,er)},$$slots:{default:!0}})}),x(Je,Ke)},$$slots:{default:!0}})});var w=X(fe,2);De(w,()=>ic,(Be,Pe)=>{Pe(Be,{children:(Je,Et)=>{var Ke=Y(),Xt=q(Ke);qe(Xt,16,()=>K.weeks,dt=>dt,(dt,Qt)=>{var xt=Y(),Mt=q(xt);De(Mt,()=>ro,(er,jt)=>{jt(er,{children:(hr,Ir)=>{var Pr=Y(),vn=q(Pr);qe(vn,16,()=>Qt,$r=>$r,($r,pr,Jr,Xr)=>{var wt=Y(),Un=q(wt);De(Un,()=>sc,(ns,is)=>{is(ns,{get date(){return pr},get month(){return K.value},children:(co,Xc)=>{var vi=Y(),ss=q(vi);De(ss,()=>rc,(mr,qn)=>{qn(mr,{})}),x(co,vi)},$$slots:{default:!0}})}),x($r,wt)}),x(hr,Pr)},$$slots:{default:!0}})}),x(dt,xt)}),x(Je,Ke)},$$slots:{default:!0}})}),x(ue,ve)},$$slots:{default:!0}})}),x(Q,H)}),x(le,J)};De(U,()=>Bv,(le,V)=>{V(le,{children:N,$$slots:{default:!0}})})}x(C,R)},$$slots:{default:!0}})}),x(g,v)},$$slots:{default:!0}})})}return x(e,c),ne(l)}ie(Yv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var DI=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),II=j('<span class="go-field-star" aria-hidden="true">*</span>'),PI=j(" <!>",1),$I=j("<label><!></label> <input/>",1),MI=j("<label><!></label> <textarea></textarea>",1),FI=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),NI=j("<label><!></label> <input/> <!>",1),RI=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),LI=j('<img src="" alt=""/> <option> </option>',1),zI=j('<option disabled="" hidden="" selected=""> </option> <!>',1),UI=j("<!>",1),qI=j("<label><!></label> <select><!></select>",1),VI=j('<img style="width: 60px" aria-hidden="true"/>'),BI=j('<span class="go-payment-mode-icons"></span>'),jI=j('<label><input type="radio"/> <!></label>'),ZI=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),WI=j("<label> <input/></label>"),HI=j("<fieldset><legend><!></legend> <!></fieldset>");function Jv(e,t){re(t,!0);const r=J=>{Tt();var oe=PI(),G=q(oe),Q=X(G),K=H=>{var B=II();x(H,B)};de(Q,H=>{u().required&&H(K)}),ce(()=>se(G,`${h(R)??""} `)),x(J,oe)},n=J=>{var oe=$I(),G=q(oe);r(F(G)),M(G);var Q=X(G,2);Re(Q,()=>({...h($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),Uo(Q,()=>u().value,K=>u(u().value=K,!0)),x(J,oe)},i=J=>{var oe=MI(),G=q(oe);r(F(G)),M(G);var Q=X(G,2);Nb(Q),Re(Q,()=>({...h($),...v,class:g(),placeholder:u().placeholder,name:u().key})),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),Uo(Q,()=>u().value,K=>u(u().value=K,!0)),x(J,oe)},s=J=>{var oe=NI(),G=q(oe);r(F(G)),M(G);var Q=X(G,2),K=ee=>{const P=ee.currentTarget.files;u(u().value=P&&P[0]?P[0]:null,!0),h(k)?h(k).validateField(u()):u().validate()};Re(Q,()=>({...h($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:K}),void 0,void 0,void 0,void 0,!0);var H=X(Q,2),B=ee=>{var P=FI(),ue=F(P),z=X(ue,2),ve=F(z,!0);M(z),M(P),ce(fe=>{pe(P,"data-field-preview",u().key),pe(ue,"src",h(N)),pe(ue,"alt",fe),se(ve,u().value.name)},[()=>O.t("forms.file.preview_alt")||"User uploaded photo"]),x(ee,P)};de(H,ee=>{h(N)&&u().value instanceof File&&ee(B)}),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),x(J,oe)},o=J=>{var oe=RI(),G=F(oe);Re(G,()=>({...h($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var Q=X(G,2);r(F(Q)),M(Q),M(oe),ce(()=>{Ot(oe,1,wr(f())),pe(oe,"for",h(T))}),C_(G,()=>u().value===!0,K=>{u(u().value=K,!0)}),x(J,oe)},a=J=>{var oe=qI(),G=q(oe);r(F(G)),M(G);var Q=X(G,2);Re(Q,()=>({...h($),...v,name:u().key,class:g()})),A_(Q,()=>{var K=F(Q),H=UI(),B=q(H),ee=P=>{var ue=zI(),z=q(ue),ve=F(z,!0);M(z),z.value=z.__value="";var fe=X(z,2);qe(fe,17,()=>u().options(),w=>w.value,(w,Be)=>{var Pe=LI(),Je=X(q(Pe),2),Et=F(Je,!0);M(Je);var Ke={};ce(()=>{se(Et,h(Be).label),Ke!==(Ke=h(Be).value)&&(Je.value=(Je.__value=h(Be).value)??"")}),x(w,Pe)}),ce(w=>se(ve,w),[()=>O.t("common.choose")]),x(P,ue)};de(B,P=>{u().options&&P(ee)}),x(K,H)}),ce(()=>{Ot(G,1,wr(f())),pe(G,"for",h(T))}),y_(Q,()=>u().value,K=>u(u().value=K,!0)),x(J,oe)},l=J=>{Yv(J,{get labelClass(){return f()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(oe){u(u().value=oe,!0)}})},c=J=>{const oe=D(()=>O.payment_modes?Object.values(O.payment_modes):[]);var G=ZI(),Q=F(G);r(F(Q)),M(Q);var K=X(Q,2);qe(K,17,()=>h(oe),H=>H.id,(H,B)=>{var ee=jI(),P=F(ee);Is(P);var ue=X(P,2),z=ve=>{var fe=BI();qe(fe,20,()=>h(B).icons,w=>w,(w,Be)=>{const Pe=D(()=>U+Be+".svg");var Je=VI();ce(()=>{Ot(Je,1,wr(Be)),pe(Je,"src",h(Pe)),pe(Je,"alt",Be+" icon")}),x(w,Je)}),M(fe),x(ve,fe)};de(ue,ve=>{h(B).icons.length>0&&ve(z)}),M(ee),ce((ve,fe,w)=>{pe(P,"name",u().key),Ll(P,ve),S_(P,fe),pe(P,"hidden",h(oe).length===1),pe(P,"aria-label",w)},[()=>String(h(B).id),()=>h(oe).length===1||String(h(B).id)===String(u().value),()=>O.t(`cart.paymentMode.ariaLabel.${h(B).name.toLowerCase()}`)]),at("change",P,()=>{u(u().value=String(h(B).id),!0)}),x(H,ee)}),M(G),ce(()=>{pe(G,"aria-required",u().required),pe(G,"aria-invalid",u().errors.length>0)}),x(J,G)},d=J=>{var oe=HI(),G=F(oe);r(F(G)),M(G);var Q=X(G,2),K=H=>{var B=Y(),ee=q(B);qe(ee,17,()=>u().options,Ur,(P,ue)=>{var z=WI(),ve=F(z),fe=X(ve);Re(fe,()=>({...h($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),M(z),ce(()=>{Ot(z,1,wr(f())),pe(z,"for",h(T)+h(ue)),se(ve,`${h(ue)??""} `)}),Uo(fe,()=>u().value,w=>u(u().value=w,!0)),x(P,z)}),x(H,B)};de(Q,H=>{u().options&&H(K)}),M(oe),x(J,oe)};let u=b(t,"field",15),p=b(t,"describedByIds",7),f=b(t,"labelClass",7),g=b(t,"inputClass",7),m=b(t,"host",7),v=je(t,DI);const _=Ri(m()),k=D(()=>_.value),A={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:o,select:a,radio:d,date:l,file:s,textarea:i,paymentMode:c},E=D(()=>A[u().type]);let T=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function C(){u().type!=="checkbox"&&u().value&&(h(k)?h(k).validateField(u()):u().validate())}const $=D(()=>({id:h(T),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:C}));let R=D(()=>O.t(u().label)||u().label);const U="https://cdn.shop.platform.gomus.de/";let N=te(null);ge(()=>{const J=u().value;if(J instanceof File&&J.type.startsWith("image/")){const oe=URL.createObjectURL(J);return I(N,oe,!0),()=>{URL.revokeObjectURL(oe),I(N,null)}}I(N,null)});var le={get field(){return u()},set field(J){u(J),y()},get describedByIds(){return p()},set describedByIds(J){p(J),y()},get labelClass(){return f()},set labelClass(J){f(J),y()},get inputClass(){return g()},set inputClass(J){g(J),y()},get host(){return m()},set host(J){m(J),y()}},V=Y(),ae=q(V),me=J=>{var oe=Y(),G=q(oe);we(G,()=>h(E)),x(J,oe)};return de(ae,J=>{h(E)&&J(me)}),x(e,V),ne(le)}br(["change"]),ie(Jv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var GI=j("<span> </span>"),KI=j("<li> </li>"),YI=j('<ul class="go-field-errors"></ul>'),JI=j("<!> <!> <!>",1);function XI(e,t){re(t,!0);let r=b(t,"key",7),n=b(t,"required",7,!1),i=b(t,"labelClass",7),s=b(t,"inputClass",7),o=te(Fe(cr.createField(r(),n())));const a=Ri(t.$$host),l=D(()=>a.value),c=()=>h(o);let d=D(()=>h(o)?[...h(o).errors,...h(o).apiErrors].map($=>O.t($)):[]),u=D(()=>h(o)?.description),p=D(()=>h(d).length>0),f=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),m=D(()=>[h(u)&&h(f),h(p)&&h(g)].filter(Boolean).join(" ")||void 0);ge(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",h(d).length>0)}),t.$$host.dataset.testid=r(),ge(()=>{h(o)&&(h(o).mounted=!0,h(o).value,Ne(()=>{h(o)?.errors.length&&h(l).validateField(h(o))}))});var v={getField:c,get key(){return r()},set key($){r($),y()},get required(){return n()},set required($=!1){n($),y()},get labelClass(){return i()},set labelClass($){i($),y()},get inputClass(){return s()},set inputClass($){s($),y()}},_=JI(),k=q(_);Jv(k,{get describedByIds(){return h(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return h(o)},set field($){I(o,$,!0)}});var A=X(k,2),E=$=>{var R=GI(),U=F(R,!0);M(R),ce(()=>{pe(R,"id",h(f)),se(U,h(o).description)}),x($,R)};de(A,$=>{h(u)&&$(E)});var T=X(A,2),C=$=>{var R=YI();qe(R,21,()=>h(d),Ur,(U,N)=>{var le=KI(),V=F(le,!0);M(le),ce(()=>se(V,h(N))),x(U,le)}),M(R),ce(()=>pe(R,"id",h(g))),x($,R)};return de(T,$=>{h(p)&&$(C)}),x(e,_),ne(v)}customElements.define("go-field",ie(XI,{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 QI=j("<go-field></go-field>",2);function eP(e,t){re(t,!0);let r=Ri(t.$$host),n=D(()=>r.value),i=D(()=>h(n)?cr.getFormFields(h(n)?.formId):[]);var s=Y(),o=q(s);qe(o,17,()=>h(i),a=>a.key,(a,l)=>{var c=QI();ce(()=>Kn(c,"key",h(l).key)),ce(()=>Kn(c,"required",h(l).required)),x(a,c)}),x(e,s),ne()}customElements.define("go-all-fields",ie(eP,{},[],[]));var tP=j('<p aria-hidden="true"> </p>'),rP=j("<li> </li>"),nP=j('<ul class="go-error-feedback-api-errors"></ul>'),iP=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function sP(e,t){re(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);ge(()=>{h(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Mu(h(n)?.fields),!0)})});let i=te(0);setInterval(()=>{I(i,Mu(h(n)?.fields)||0,!0)},100);let s=D(()=>h(i)+(h(n)?.apiErrors?.length||0)),o=te(-1);ge(()=>{t.$$host.classList.toggle("is-invalid",h(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",h(s).toString())});var a=iP(),l=F(a),c=F(l),d=v=>{var _=zt();ce(k=>se(_,k),[()=>O.t("forms.errorSummary",{count:h(o)})]),x(v,_)};de(c,v=>{h(o)>0&&v(d)}),M(l);var u=X(l,2),p=v=>{var _=tP(),k=F(_,!0);M(_),ce(A=>se(k,A),[()=>O.t("forms.errorSummary",{count:h(i)})]),x(v,_)};de(u,v=>{h(i)>0&&v(p)});var f=X(u,2),g=v=>{var _=nP();qe(_,21,()=>h(n)?.apiErrors,Ur,(k,A)=>{var E=rP(),T=F(E,!0);M(E),ce(()=>se(T,h(A))),x(k,E)}),M(_),x(v,_)},m=D(()=>h(n)&&Jl(h(n).apiErrors)&&h(n).apiErrors.length>0);de(f,v=>{h(m)&&v(g)}),M(a),x(e,a),ne()}customElements.define("go-errors-feedback",ie(sP,{},[],[]));var oP=j('<div class="go-form-feedback"><!></div>');function aP(e,t){var r=oP(),n=F(r);h_(n,t,"default",{},null),M(r),x(e,r)}customElements.define("go-form-feedback",ie(aP,{},["default"],[]));function lP(e,t){re(t,!0);let r=b(t,"buttonClass",7,"");return rn(()=>{Mn(t.$$host,"button",{type:"submit",class:r()})}),ne({get buttonClass(){return r()},set buttonClass(n=""){r(n),y()}})}customElements.define("go-submit",ie(lP,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var uP=j('<div aria-live="assertive"> </div>');function cP(e,t){re(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=uP();let c;var d=F(l,!0);M(l),ce(()=>{c=Ot(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":h(n).successMessage}),se(d,h(n)?.successMessage)}),x(a,l)};de(s,a=>{h(n)?.successMessage&&a(o)}),x(e,i),ne()}customElements.define("go-success-feedback",ie(cP,{},[],[]));var dr="INUMBER",Wi="IOP1",Hi="IOP2",Gi="IOP3",cn="IVAR",di="IVARNAME",Ki="IFUNCALL",qa="IFUNDEF",Bt="IEXPR",Fc="IEXPREVAL",fi="IMEMBER",Va="IENDSTATEMENT",Yi="IARRAY";function Ie(e,t){this.type=e,this.value=t??0}Ie.prototype.toString=function(){switch(this.type){case dr:case Wi:case Hi:case Gi:case cn:case di:case Va:return this.value;case Ki:return"CALL "+this.value;case qa:return"DEF "+this.value;case Yi:return"ARRAY "+this.value;case fi:return"."+this.value;default:return"Invalid Instruction"}};function Ba(e){return new Ie(Wi,e)}function dn(e){return new Ie(Hi,e)}function Xv(e){return new Ie(Gi,e)}function Nc(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var p=e[u],f=p.type;if(f===dr||f===di)Array.isArray(p.value)?s.push.apply(s,Nc(p.value.map(function(g){return new Ie(dr,g)}).concat(new Ie(Yi,p.value.length)),t,r,n,i)):s.push(p);else if(f===cn&&i.hasOwnProperty(p.value))p=new Ie(dr,i[p.value]),s.push(p);else if(f===Hi&&s.length>1)l=s.pop(),a=s.pop(),d=r[p.value],p=new Ie(dr,d(a.value,l.value)),s.push(p);else if(f===Gi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),p.value==="?"?s.push(a.value?l.value:c.value):(d=n[p.value],p=new Ie(dr,d(a.value,l.value,c.value)),s.push(p));else if(f===Wi&&s.length>0)a=s.pop(),d=t[p.value],p=new Ie(dr,d(a.value)),s.push(p);else if(f===Bt){for(;s.length>0;)o.push(s.shift());o.push(new Ie(Bt,Nc(p.value,t,r,n,i)))}else if(f===fi&&s.length>0)a=s.pop(),s.push(new Ie(dr,a.value[p.value]));else{for(;s.length>0;)o.push(s.shift());o.push(p)}}for(;s.length>0;)o.push(s.shift());return o}function Qv(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],o=s.type;if(o===cn&&s.value===t)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===Wi?c=Ba(l.value):l.type===Hi?c=dn(l.value):l.type===Gi?c=Xv(l.value):c=new Ie(l.type,l.value),n.push(c)}else o===Bt?n.push(new Ie(Bt,Qv(s.value,t,r))):n.push(s)}return n}function hi(e,t,r){var n=[],i,s,o,a,l,c;if(Rc(e))return fn(e,r);for(var d=e.length,u=0;u<d;u++){var p=e[u],f=p.type;if(f===dr||f===di)n.push(p.value);else if(f===Hi)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!hi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!hi(s,t,r)):p.value==="="?(a=t.binaryOps[p.value],n.push(a(i,hi(s,t,r),r))):(a=t.binaryOps[p.value],n.push(a(fn(i,r),fn(s,r))));else if(f===Gi)o=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(hi(i?s:o,t,r)):(a=t.ternaryOps[p.value],n.push(a(fn(i,r),fn(s,r),fn(o,r))));else if(f===cn)if(p.value in t.functions)n.push(t.functions[p.value]);else if(p.value in t.unaryOps&&t.parser.isOperatorEnabled(p.value))n.push(t.unaryOps[p.value]);else{var g=r[p.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+p.value)}else if(f===Wi)i=n.pop(),a=t.unaryOps[p.value],n.push(a(fn(i,r)));else if(f===Ki){for(c=p.value,l=[];c-- >0;)l.unshift(fn(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(f===qa)n.push((function(){for(var m=n.pop(),v=[],_=p.value;_-- >0;)v.unshift(n.pop());var k=n.pop(),A=function(){for(var E=Object.assign({},r),T=0,C=v.length;T<C;T++)E[v[T]]=arguments[T];return hi(m,t,E)};return Object.defineProperty(A,"name",{value:k,writable:!1}),r[k]=A,A})());else if(f===Bt)n.push(dP(p,t));else if(f===Fc)n.push(p);else if(f===fi)i=n.pop(),n.push(i[p.value]);else if(f===Va)n.pop();else if(f===Yi){for(c=p.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:fn(n[0],r)}function dP(e,t,r){return Rc(e)?e:{type:Fc,value:function(n){return hi(e.value,t,n)}}}function Rc(e){return e&&e.type===Fc}function fn(e,t){return Rc(e)?e.value(t):e}function Lc(e,t){for(var r=[],n,i,s,o,a,l,c=0;c<e.length;c++){var d=e[c],u=d.type;if(u===dr)typeof d.value=="number"&&d.value<0?r.push("("+d.value+")"):Array.isArray(d.value)?r.push("["+d.value.map(eg).join(", ")+"]"):r.push(eg(d.value));else if(u===Hi)i=r.pop(),n=r.pop(),o=d.value,t?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(u===Gi)if(s=r.pop(),i=r.pop(),n=r.pop(),o=d.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===cn||u===di)r.push(d.value);else if(u===Wi)n=r.pop(),o=d.value,o==="-"||o==="+"?r.push("("+o+n+")"):t?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(u===Ki){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(u===qa){for(i=r.pop(),l=d.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(u===fi)n=r.pop(),r.push(n+"."+d.value);else if(u===Yi){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(u===Bt)r.push("("+Lc(d.value,t)+")");else if(u!==Va)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function eg(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function Ji(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function zc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var o=e[s];o.type===cn||o.type===di?!n&&!Ji(t,o.value)?t.push(o.value):(i!==null&&(Ji(t,i)||t.push(i)),i=o.value):o.type===fi&&n&&i!==null?i+="."+o.value:o.type===Bt?zc(o.value,t,r):i!==null&&(Ji(t,i)||t.push(i),i=null)}i!==null&&!Ji(t,i)&&t.push(i)}function Dr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Dr.prototype.simplify=function(e){return e=e||{},new Dr(Nc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Dr.prototype.substitute=function(e,t){return t instanceof Dr||(t=this.parser.parse(String(t))),new Dr(Qv(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},hi(this.tokens,this,e)},Dr.prototype.toString=function(){return Lc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return zc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];zc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Dr.prototype.toJSFunction=function(e,t){var r=this,n=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+Lc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var so="TEOF",Ze="TOP",ja="TNUMBER",tg="TSTRING",hn="TPAREN",Xi="TBRACKET",Za="TCOMMA",Uc="TNAME",qc="TSEMICOLON";function rg(e,t,r){this.type=e,this.value=t,this.index=r}rg.prototype.toString=function(){return this.type+": "+this.value};function rt(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}rt.prototype.newToken=function(e,t,r){return new rg(e,t,r??this.pos)},rt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},rt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},rt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(so,"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)+'"')},rt.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,t+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(t+1,n);this.current=this.newToken(tg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},rt.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(hn,e),this.pos++,!0):!1},rt.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(Xi,e),this.pos++,!0):!1},rt.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Za,","),this.pos++,!0):!1},rt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(qc,";"),this.pos++,!0):!1},rt.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(n in this.consts)return this.current=this.newToken(ja,this.consts[n]),this.pos+=n.length,!0}return!1},rt.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ze,n),this.pos+=n.length,!0}return!1},rt.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(t===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(e,t);return this.current=this.newToken(Uc,i),this.pos+=i.length,!0}return!1},rt.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
|
|
80
|
+
`||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var fP=/^[0-9a-f]{4}$/i;rt.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var r=e.substring(0,t);t>=0;){var n=e.charAt(++t);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+=`
|
|
81
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);fP.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++t;var s=e.indexOf("\\",t);r+=e.substring(t,s<0?e.length:s),t=s}return r},rt.prototype.isComment=function(){return this.expression.charAt(this.pos)==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},rt.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!=="0")return!1;++e;var t,r;if(this.expression.charAt(e)==="x")t=16,r=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)==="b")t=2,r=/^[01]$/i,++e;else return!1;for(var n=!1,i=e;e<this.expression.length;){var s=this.expression.charAt(e);if(r.test(s))e++,n=!0;else break}return n&&(this.current=this.newToken(ja,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},rt.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,o;t<this.expression.length&&(o=this.expression.charAt(t),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),o==="e"||o==="E"){t++;for(var a=!0,l=!1;t<this.expression.length;){if(o=this.expression.charAt(t),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(ja,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},rt.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(Ze,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ze,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,">="),this.pos++):this.current=this.newToken(Ze,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"<="),this.pos++):this.current=this.newToken(Ze,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ze,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"=="),this.pos++):this.current=this.newToken(Ze,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"!="),this.pos++):this.current=this.newToken(Ze,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},rt.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},rt.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
|
|
82
|
+
`,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},rt.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ge(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ge.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ge.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?Ji(t,e.value):typeof t=="function"?t(e):e.value===t},Ge.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ge.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ge.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ge.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},Ge.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Uc)||this.accept(Ze,r))e.push(new Ie(cn,this.current.value));else if(this.accept(ja))e.push(new Ie(dr,this.current.value));else if(this.accept(tg))e.push(new Ie(dr,this.current.value));else if(this.accept(hn,"("))this.parseExpression(e),this.expect(hn,")");else if(this.accept(Xi,"["))if(this.accept(Xi,"]"))e.push(new Ie(Yi,0));else{var n=this.parseArrayList(e);e.push(new Ie(Yi,n))}else throw new Error("unexpected "+this.nextToken)},Ge.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ge.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ge.prototype.parseUntilEndStatement=function(e,t){return this.accept(qc)?(this.nextToken&&this.nextToken.type!==so&&!(this.nextToken.type===hn&&this.nextToken.value===")")&&t.push(new Ie(Va)),this.nextToken.type!==so&&this.parseExpression(t),e.push(new Ie(Bt,t)),!0):!1},Ge.prototype.parseArrayList=function(e){for(var t=0;!this.accept(Xi,"]");)for(this.parseExpression(e),++t;this.accept(Za);)this.parseExpression(e),++t;return t},Ge.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ze,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Ki){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var o=n-i;e[o].type===cn&&(e[o]=new Ie(di,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new Ie(Bt,r)),e.push(new Ie(qa,t.value));continue}if(t.type!==cn&&t.type!==fi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ie(di,t.value)),e.push(new Ie(Bt,r)),e.push(dn("="))}},Ge.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ze,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ze,":"),this.parseConditionalExpression(r),e.push(new Ie(Bt,t)),e.push(new Ie(Bt,r)),e.push(Xv("?"))}},Ge.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ze,"or");){var t=[];this.parseAndExpression(t),e.push(new Ie(Bt,t)),e.push(dn("or"))}},Ge.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ze,"and");){var t=[];this.parseComparison(t),e.push(new Ie(Bt,t)),e.push(dn("and"))}};var hP=["==","!=","<","<=",">=",">","in"];Ge.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,hP);){var t=this.current;this.parseAddSub(e),e.push(dn(t.value))}};var pP=["+","-","||"];Ge.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,pP);){var t=this.current;this.parseTerm(e),e.push(dn(t.value))}};var mP=["*","/","%"];Ge.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,mP);){var t=this.current;this.parseFactor(e),e.push(dn(t.value))}},Ge.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ze,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===hn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===qc||this.nextToken.type===Za||this.nextToken.type===so||this.nextToken.type===hn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ba(n.value))}else this.parseExponential(e)},Ge.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(dn("^"))},Ge.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Ba("!"))},Ge.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ze,r)){var n=this.current;this.parseAtom(e),e.push(Ba(n.value))}else for(this.parseMemberExpression(e);this.accept(hn,"(");)if(this.accept(hn,")"))e.push(new Ie(Ki,0));else{var i=this.parseArgumentList(e);e.push(new Ie(Ki,i))}},Ge.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(hn,")");)for(this.parseExpression(e),++t;this.accept(Za);)this.parseExpression(e),++t;return t},Ge.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ze,".")||this.accept(Xi,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Uc),e.push(new Ie(fi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(Xi,"]"),e.push(dn("["))}else throw new Error("unexpected symbol: "+t.value)}};function vP(e,t){return Number(e)+Number(t)}function gP(e,t){return e-t}function yP(e,t){return e*t}function bP(e,t){return e/t}function _P(e,t){return e%t}function wP(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function kP(e,t){return e===t}function SP(e,t){return e!==t}function EP(e,t){return e>t}function xP(e,t){return e<t}function TP(e,t){return e>=t}function AP(e,t){return e<=t}function OP(e,t){return!!(e&&t)}function CP(e,t){return!!(e||t)}function DP(e,t){return Ji(t,e)}function IP(e){return(Math.exp(e)-Math.exp(-e))/2}function PP(e){return(Math.exp(e)+Math.exp(-e))/2}function $P(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function MP(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function FP(e){return Math.log(e+Math.sqrt(e*e-1))}function NP(e){return Math.log((1+e)/(1-e))/2}function ng(e){return Math.log(e)*Math.LOG10E}function RP(e){return-e}function LP(e){return!e}function zP(e){return e<0?Math.ceil(e):Math.floor(e)}function UP(e){return Math.random()*(e||1)}function ig(e){return Bc(e+1)}function qP(e){return isFinite(e)&&e===Math.round(e)}var VP=4.7421875,Vc=[.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 Bc(e){var t,r;if(qP(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Bc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,o=s*e,a=o*e,l=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Vc[0];for(var c=1;c<Vc.length;++c)r+=Vc[c]/(e+c);return t=e+VP+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function BP(e){return Array.isArray(e)?e.length:String(e).length}function sg(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function og(e,t,r){return e?t:r}function jP(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function ZP(e,t,r){return r&&(r[e]=t),t}function WP(e,t){return e[t|0]}function HP(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function GP(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function KP(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function YP(e,t,r){if(typeof e!="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 e(n,i,s)},t)}function JP(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function XP(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function QP(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function e$(e){return(e>0)-(e<0)||+e}var ag=1/3;function t$(e){return e<0?-Math.pow(-e,ag):Math.pow(e,ag)}function r$(e){return Math.exp(e)-1}function n$(e){return Math.log(1+e)}function i$(e){return Math.log(e)/Math.LN2}function pi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||IP,cosh:Math.cosh||PP,tanh:Math.tanh||$P,asinh:Math.asinh||MP,acosh:Math.acosh||FP,atanh:Math.atanh||NP,sqrt:Math.sqrt,cbrt:Math.cbrt||t$,log:Math.log,log2:Math.log2||i$,ln:Math.log,lg:Math.log10||ng,log10:Math.log10||ng,expm1:Math.expm1||r$,log1p:Math.log1p||n$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||zP,"-":RP,"+":Number,exp:Math.exp,not:LP,length:BP,"!":ig,sign:Math.sign||e$},this.binaryOps={"+":vP,"-":gP,"*":yP,"/":bP,"%":_P,"^":Math.pow,"||":wP,"==":kP,"!=":SP,">":EP,"<":xP,">=":TP,"<=":AP,and:OP,or:CP,in:DP,"=":ZP,"[":WP},this.ternaryOps={"?":og},this.functions={random:UP,fac:ig,min:GP,max:HP,hypot:Math.hypot||sg,pyt:Math.hypot||sg,pow:Math.pow,atan2:Math.atan2,if:og,gamma:Bc,roundTo:jP,map:KP,fold:YP,filter:JP,indexOf:XP,join:QP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new Ge(this,new rt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(so,"EOF"),new Dr(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var lg=new pi;pi.parse=function(e){return lg.parse(e)},pi.evaluate=function(e,t){return lg.parse(e).evaluate(t)};var ug={"+":"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 s$(e){return ug.hasOwnProperty(e)?ug[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=s$(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var o$=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,a$=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,l$=/(__optional\("[^"]+"\))\.length\b/g,u$=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),cg=new Map;function c$(e){return e.replace(o$,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(a$,(t,r)=>`__length(${r})`).replace(l$,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function d$(e){const t=cg.get(e);if(t)return t;const r=u$.parse(c$(e));return cg.set(e,r),r}function f$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,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=d$(e);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 (${e}) in go-if: ${n.message}`)}}var dg=["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","coupon"],h$=7200*1e3;async function pn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await O.asyncFetch(()=>O.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const o=i.get(s.id);o&&(s.content=o)}}catch{}}function Wa(e,t){O.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Ha(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===t&&o>=n&&o<=n+h$&&(i.seats?.available??0)>0})}async function Ga(e){if(!e?.selectedDate)return;const{quotas:t}=await O.asyncFetch(()=>O.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Wa(e,t)}var p$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await O.asyncFetch(()=>O.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));Wa(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const{tickets:r,quotas:n}=await O.asyncFetch(()=>O.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));O.capacityManager.addQuotas(n);const i=In(Pn(r,t.selectedTime),t.selectedTime);await pn(e,i);for(const s of i)e.preCart.addItem(pt(s,{time:t.selectedTime}))}},m$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await O.asyncFetch(()=>O.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));O.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=In(Pn(r,s),s);await pn(e,o);for(const a of o)e.preCart.addItem(pt(a,{time:s}))}},v$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await O.asyncFetch(()=>O.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds})),n=Object.values(r).map(i=>aa(i));await pn(e,n);for(const i of n)e.preCart.addItem(pt(i))}},g$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await O.asyncFetch(()=>O.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));Wa(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await O.asyncFetch(()=>O.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));O.capacityManager.addQuotas(i);const s=In(Pn(n,t.selectedTime),t.selectedTime);await pn(e,s);for(const o of s)e.preCart.addItem(pt(o,{time:t.selectedTime}))}},y$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await O.asyncFetch(()=>O.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));O.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=In(Pn(n,o),o);await pn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:o}))}},b$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await O.asyncFetch(()=>O.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));Wa(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await O.asyncFetch(()=>O.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));O.capacityManager.addQuotas(i);const s=In(Pn(n,t.selectedTime),t.selectedTime);await pn(e,s);for(const o of s)e.preCart.addItem(pt(o,{time:t.selectedTime}))}},_$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await O.asyncFetch(()=>O.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=Iu(n,r.id,{event_title:r.event_title});e.preCart.addItem(pt(i,{time:r.start_time}))}r.seats&&O.capacityManager.addSeats(r.id,r.seats)}}},w$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ga(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ha(await O.asyncFetch(()=>O.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await O.asyncFetch(()=>O.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));O.capacityManager.addQuotas(o);const a=In(Pn(s,n.start_time),n.start_time);await pn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:n.start_time}))}}},k$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ga(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ha(await O.asyncFetch(()=>O.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await O.asyncFetch(()=>O.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));O.capacityManager.addQuotas(o);const a=Object.values(o)[0],l=a?Object.keys(a.capacities)[0]:n.start_time,c=In(Pn(s,l),l);await pn(e,c);for(const d of c)e.preCart.addItem(pt(d,{time:l}))}}},S$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ga(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ha(await O.asyncFetch(()=>O.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await O.asyncFetch(()=>O.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await O.asyncFetch(()=>O.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));O.capacityManager.addQuotas(o);const a=In(Pn(s,n.start_time),n.start_time);await pn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:n.start_time}))}}},E$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Ga(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ha(await O.asyncFetch(()=>O.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(o=>o.title?.includes(n)):i.prices;for(const o of s){const a=Iu(o,i.id,{event_title:i.event_title});e.preCart.addItem(pt(a,{time:i.start_time}))}i.seats&&O.capacityManager.addSeats(i.id,i.seats)}}},x$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await O.asyncFetch(()=>O.getCoupons());for(const r of t??[])e.preCart.addItem(pt(fp(r)))}},T$={"ticket:timeslot":p$,"ticket:day":m$,"ticket:annual":v$,"event:admission":g$,"event:admission:day":y$,"event:admission:timeslot":b$,"event:price":_$,"events:admission":w$,"events:admission:day":k$,"events:admission:timeslot":S$,"events:price":E$,coupon:x$};function mi(e){const t=T$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${dg.join(", ")}`),t}var fg=dg,A$=0,O$=class{uid=A$++;#e=te();get filters(){return h(this.#e)}set filters(e){I(this.#e,e,!0)}#t=te();get eventIds(){return h(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=te();get museumIds(){return h(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=te();get exhibitionIds(){return h(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=te();get ticketIds(){return h(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=te();get ticketGroupIds(){return h(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=te();get selectedDate(){return h(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=te();get selectedTimeslot(){return h(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return h(this.#l)}set selectedTime(e){I(this.#l,e)}#u=te(Fe([]));get ticketSegments(){return h(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return h(this.#c)}set preCarts(e){I(this.#c,e)}#d=te();get timeslotDetails(){return h(this.#d)}set timeslotDetails(e){I(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>mi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>mi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>mi(e).isTicketsVisible(this))}},hg="go-ticket-selection",C$=Fi(hg),mn=Ni(hg);function D$(e,t){re(t,!0);let r=b(t,"when",7),n=b(t,"then",7,"show");const i=mn(t.$$host),s=D(()=>i.value),o=QE(t.$$host),a=D(()=>o.value),l=Ri(t.$$host),c=D(()=>l.value),d=Li(t.$$host),u=D(()=>d.value);let p=D(()=>({ticketSelection:h(s),personalizationDetails:h(a),formData:h(c)?.formData,cart:O.cart,cartView:h(u)}));const f=k=>{I(p,k)},g=()=>h(p);let m=D(()=>f$(r(),h(p))),v=null;ge(()=>{const k=t.$$host;if(h(m)&&n()==="show")v&&(k.appendChild(v),v=null);else if(!v&&k.childNodes.length>0)for(v=document.createDocumentFragment();k.firstChild;)v.appendChild(k.firstChild)});var _={_setData:f,_getData:g,get when(){return r()},set when(k){r(k),y()},get then(){return n()},set then(k="show"){n(k),y()}};return ne(_)}customElements.define("go-if",ie(D$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function pg(e,t){re(t,!0);let r=b(t,"apiUrl",7),n=b(t,"shopDomain",7),i=b(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ge(()=>{(n()!==O.shopDomain||r()!==O.apiUrl||i()!==O.locale)&&(O.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ne({get apiUrl(){return r()},set apiUrl(s){r(s),y()},get shopDomain(){return n()},set shopDomain(s){n(s),y()},get locale(){return i()},set locale(s){i(s),y()}})}customElements.define("gomus-init",ie(pg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function I$(e,t){re(t,!0);let r=b(t,"apiDomain",7),n=b(t,"shopDomain",7),i=b(t,"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 pg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ne(o)}customElements.define("go-init",ie(I$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function P$(e,t){re(t,!0);const r=b(t,"to",7),n=D(()=>We.config.urls[r()]),i=Mn(t.$$host,"a");return ge(()=>{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",s=>{if(s.preventDefault(),!We.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}We.config.navigateTo(We.config.urls[r()]())}),ne({get to(){return r()},set to(s){r(s),y()}})}customElements.define("go-link",ie(P$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var $$=class{#e=te();get token(){return h(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return cl(O.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${O.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${O.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?We.config.urls.annualTicketPersonalizationList?.()?We.config.urls.annualTicketPersonalizationList(this.token):O.urls?.annualTicketPersonalizationList(this.token):`${O.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${O.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},mg="go-order-details",M$=Fi(mg),vg=Ni(mg);function F$(e,t){re(t,!0);let r=b(t,"token",7);const n=new $$(r());M$(t.$$host,n),rn(()=>{O.cart.clearItems(),O.auth.isGuest()&&O.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return ne(i)}customElements.define("go-order",ie(F$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var N$=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),R$=j('<br/> <span class="go-order-item-quantities"> </span>',1),L$=j('<a aria-label="iCal link"> </a>'),z$=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 gg(e,t){re(t,!0);let r=b(t,"item",7),n=b(t,"orderDetails",7);var i={get item(){return r()},set item(T){r(T),y()},get orderDetails(){return n()},set orderDetails(T){n(T),y()}},s=z$(),o=F(s),a=F(o),l=X(F(a),2),c=F(l),d=F(c,!0);M(c);var u=X(c,2),p=T=>{var C=N$(),$=q(C),R=F($,!0);M($);var U=X($,2),N=F(U,!0);M(U),ce((le,V)=>{se(R,le),se(N,V)},[()=>Vs(r().attributes.start_time,{month:"numeric",day:"numeric"},O.locale),()=>qs(r().attributes.start_time)]),x(T,C)};de(u,T=>{r().attributes.start_time&&T(p)});var f=X(u,2);qe(f,17,()=>r().attributes.quantities,T=>T.id,(T,C)=>{var $=R$(),R=X(q($),2),U=F(R);M(R),ce(()=>se(U,`${h(C).quantity??""} x ${h(C).title??""}`)),x(T,$)});var g=X(f,2),m=F(g,!0);M(g),M(l);var v=X(l,2),_=F(v,!0);M(v);var k=X(v,4),A=F(k),E=T=>{var C=L$(),$=F(C,!0);M(C),ce(R=>{pe(C,"href",O.apiUrl+r().attributes.ical_url),se($,R)},[()=>O.t("common.calendar")]),x(T,C)};return de(A,T=>{r().attributes.ical_url&&T(E)}),M(k),M(a),M(o),M(s),ce((T,C,$)=>{se(d,r().attributes.title),pe(g,"href",T),se(m,C),se(_,$)},[()=>n().downloadLink(r()),()=>O.t("common.download"),()=>oa(r().price_cents)]),x(e,s),ne(i)}ie(gg,{item:{},orderDetails:{}},[],[],{mode:"open"});var U$=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),q$=j('<span class="go-cart-item-date"> </span>'),V$=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),B$=j('<br/> <a class="go-ticket-personalization"> </a>',1),j$=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),Z$=j('<a aria-label="iCal link"> </a>'),W$=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>'),H$=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),G$=j('<a class="go-ticket-personalization"> </a>'),K$=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 yg(e,t){re(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${O.locale}.svg`;let n=b(t,"item",7),i=b(t,"orderDetails",7);var s={get item(){return n()},set item(d){n(d),y()},get orderDetails(){return i()},set orderDetails(d){i(d),y()}},o=Y(),a=q(o),l=d=>{var u=Y(),p=q(u);qe(p,17,()=>({length:n().attributes.quantity}),Ur,(f,g,m)=>{var v=W$(),_=F(v),k=F(_),A=F(k);A.textContent="1";var E=X(A,2),T=F(E),C=F(T,!0);M(T);var $=X(T,2),R=Q=>{const K=D(()=>n().attributes.barcodes[m]?.id);var H=V$(),B=q(H),ee=ve=>{var fe=U$(),w=q(fe),Be=F(w,!0);M(w);var Pe=X(w,2),Je=F(Pe,!0);M(Pe),ce((Et,Ke)=>{se(Be,Et),se(Je,Ke)},[()=>Vs(n().attributes.start_time,{month:"numeric",day:"numeric"},O.locale),()=>qs(n().attributes.start_time)]),x(ve,fe)},P=ve=>{var fe=q$(),w=F(fe,!0);M(fe),ce(Be=>se(w,Be),[()=>Vs(n().attributes.start_time,{month:"numeric",day:"numeric"},O.locale)]),x(ve,fe)};de(B,ve=>{n().attributes.ticket_type==="time_slot"?ve(ee):n().attributes.ticket_type==="normal"&&ve(P,1)});var ue=X(B,4),z=F(ue,!0);M(ue),ce((ve,fe)=>{pe(ue,"href",ve),se(z,fe)},[()=>i().downloadLink(n(),h(K)),()=>O.t("common.download")]),x(Q,H)},U=Q=>{var K=B$(),H=X(q(K),2),B=F(H,!0);M(H),ce((ee,P)=>{pe(H,"href",ee),se(B,P)},[()=>i().downloadLink(n()),()=>O.t("common.personalize")]),x(Q,K)};de($,Q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?Q(R):Q(U,-1)}),M(E);var N=X(E,2),le=F(N,!0);M(N);var V=X(N,2),ae=F(V),me=Q=>{var K=j$(),H=F(K);M(K),ce(()=>{pe(K,"href",O.apiUrl+n().attributes.barcodes[m]?.passbook_url),pe(H,"src",r)}),x(Q,K)};de(ae,Q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&Q(me)}),M(V);var J=X(V,2),oe=F(J),G=Q=>{var K=Z$(),H=F(K,!0);M(K),ce(B=>{pe(K,"href",O.apiUrl+n().attributes.ical_url),se(H,B)},[()=>O.t("common.calendar")]),x(Q,K)};de(oe,Q=>{n().attributes.ical_url&&Q(G)}),M(J),M(k),M(_),M(v),ce(Q=>{se(C,n().attributes.title),se(le,Q)},[()=>oa(n().price_cents)]),x(f,v)}),x(d,u)},c=d=>{var u=K$(),p=F(u),f=F(p),g=F(f),m=F(g,!0);M(g);var v=X(g,2),_=F(v),k=F(_,!0);M(_);var A=X(_,2),E=R=>{var U=H$(),N=F(U,!0);M(U),ce((le,V)=>{pe(U,"href",le),se(N,V)},[()=>i().downloadLink(n()),()=>O.t("common.download")]),x(R,U)},T=R=>{var U=G$(),N=F(U,!0);M(U),ce((le,V)=>{pe(U,"href",le),se(N,V)},[()=>i().downloadLink(n()),()=>O.t("common.personalize")]),x(R,U)};de(A,R=>{n().attributes.is_voucher?R(E):R(T,-1)}),M(v);var C=X(v,2),$=F(C,!0);M(C),Tt(2),M(f),M(p),M(u),ce(R=>{se(m,n().attributes.quantity),se(k,n().attributes.title),se($,R)},[()=>oa(n().price_cents)]),x(d,u)};return de(a,d=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?d(l):d(c,-1)}),x(e,o),ne(s)}ie(yg,{item:{},orderDetails:{}},[],[],{mode:"open"});var Y$=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 J$(e,t){re(t,!0);const r=vg(t.$$host),n=D(()=>r.value);let i=D(()=>h(n)?.order);var s=Y(),o=q(s),a=l=>{var c=Y$(),d=F(c),u=F(d),p=F(u),f=F(p,!0);M(p);var g=X(p,2),m=F(g,!0);M(g);var v=X(g,2),_=F(v,!0);M(v),Tt(2),M(u),M(d);var k=X(d,2);qe(k,17,()=>h(i).items,$=>$.id,($,R)=>{var U=Y(),N=q(U),le=ae=>{yg(ae,{get item(){return h(R)},get orderDetails(){return h(n)}})},V=ae=>{gg(ae,{get item(){return h(R)},get orderDetails(){return h(n)}})};de(N,ae=>{h(R).type==="Ticket"?ae(le):h(R).type==="Event"&&ae(V,1)}),x($,U)});var A=X(k,2),E=F(A),T=X(F(E),4),C=F(T,!0);M(T),Tt(2),M(E),M(A),M(c),ce(($,R,U,N)=>{se(f,$),se(m,R),se(_,U),se(C,N)},[()=>O.t("common.table.count"),()=>O.t("common.table.product"),()=>O.t("common.table.price"),()=>O.t("common.table.total",{value:oa(h(i).total_price_cents)})]),x(l,c)};de(o,l=>{h(i)&&h(n)&&l(a)}),x(e,s),ne()}customElements.define("go-order-breakdown",ie(J$,{},[],[]));function X$(e,t){re(t,!0);const r=vg(t.$$host),n=D(()=>r.value);let i=D(()=>h(n)?.order);Tt();var s=zt();ce(()=>se(s,h(i)?.id)),x(e,s),ne()}customElements.define("go-order-invoice-id",ie(X$,{},[],[]));var Q$=j("<go-form></go-form>",2);function eM(e,t){re(t,!1),cr.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,o=await O.updatePassword(s.formData);o.data?(s.successMessage=O.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=o.error?.errors||o.error||o.errors}Kl();var n=Q$();Kn(n,"formId","passwordResetForm"),Fo("submit",n,r),x(e,n),ne()}customElements.define("go-profile-password",ie(eM,{},[],[]));var tM=j("<go-form></go-form>",2);function rM(e,t){re(t,!0),cr.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=te(void 0);const n=D(()=>O.getCustomer());rn(async()=>{await O.waitForAllFetches(),await Yl(()=>h(r).details),await Yl(()=>h(n).data),h(r).details.fill(h(n).data)});var i=tM();Kn(i,"formId","accountDetailsForm"),Gl(i,s=>I(r,s),()=>h(r)),x(e,i),ne()}customElements.define("go-profile-details",ie(rM,{},[],[]));var nM=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function iM(e,t){re(t,!0);const r=D(()=>O.getCustomer()),n=D(()=>h(r)?.data);var i=Y(),s=q(i),o=l=>{var c=nM(),d=q(c),u=F(d);M(d);var p=X(d,2),f=F(p,!0);M(p),ce(()=>{se(u,`${h(n).name??""}
|
|
83
|
+
${h(n).surname??""}`),se(f,h(n).email)}),x(l,c)},a=l=>{var c=zt();ce(d=>se(c,d),[()=>O.t("user.login.desc.text")]),x(l,c)};de(s,l=>{h(n)?l(o):l(a,-1)}),x(e,i),ne()}customElements.define("go-profile-overview",ie(iM,{},[],[]));function sM(e,t){re(t,!0);function r(f){if(!f)return;const g=[];for(const m of f.split(",")){const v=m.trim();v&&(fg.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${fg.join(", ")}`))}return g.length?g:void 0}let n=b(t,"filters",7),i=b(t,"eventIds",7),s=b(t,"museumIds",7),o=b(t,"exhibitionIds",7),a=b(t,"selectedDate",7),l=b(t,"selectedTimeslot",7),c=b(t,"ticketIds",7),d=b(t,"ticketGroupIds",7);const u=new O$;ge(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),ge(()=>{u.filters=r(n()),u.eventIds=sn(i()),u.museumIds=sn(s()),u.exhibitionIds=sn(o()),u.ticketIds=sn(c()),u.ticketGroupIds=sn(d()),u.selectedTimeslot=l(),a()&&(u.selectedDate=sa(a()))}),ge(()=>{u.selectedDate&&Ne(()=>{a(u.selectedDate.toString())})}),ge(()=>{u.selectedTimeslot,Ne(()=>{l(u.selectedTimeslot)})}),C$(t.$$host,u);var p={details:u,get filters(){return n()},set filters(f){n(f),y()},get eventIds(){return i()},set eventIds(f){i(f),y()},get museumIds(){return s()},set museumIds(f){s(f),y()},get exhibitionIds(){return o()},set exhibitionIds(f){o(f),y()},get selectedDate(){return a()},set selectedDate(f){a(f),y()},get selectedTimeslot(){return l()},set selectedTimeslot(f){l(f),y()},get ticketIds(){return c()},set ticketIds(f){c(f),y()},get ticketGroupIds(){return d()},set ticketGroupIds(f){d(f),y()}};return ne(p)}customElements.define("go-ticket-selection",ie(sM,{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 oM(e,t){re(t,!0);const r=mn(t.$$host),n=D(()=>r.value);ge(()=>{t.$$host.style.display=h(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!h(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",h(n)?.isTicketsVisible)}),ne()}customElements.define("go-tickets",ie(oM,{},[],[]));function aM(e,t){re(t,!0);const r=mn(t.$$host),n=D(()=>r.value),i=D(()=>En(h(n)?.preCarts||[],o=>o.items.length)),s=D(()=>!h(n)?.isTicketsVisible||h(n)?.isTicketsVisible&&h(i)===0);ge(()=>{t.$$host.style.display=h(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!h(s)),t.$$host.classList.toggle("is-visible",h(s))}),ne()}customElements.define("go-tickets-empty",ie(aM,{},[],[]));function lM(e,t){re(t,!0);const r=mn(t.$$host),n=D(()=>r.value);let i=D(()=>En(h(n)?.preCarts||[],o=>o.totalPriceCents));Tt();var s=zt();ce(o=>se(s,o),[()=>ur(h(i))]),x(e,s),ne()}customElements.define("go-tickets-sum",ie(lM,{},[],[]));var uM=class{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}#t=te(Fe($i()));get preCart(){return h(this.#t)}set preCart(e){I(this.#t,e,!0)}#r=te();get filters(){return h(this.#r)}set filters(e){I(this.#r,e,!0)}#n=te();get dateId(){return h(this.#n)}set dateId(e){I(this.#n,e,!0)}#i=te();get limit(){return h(this.#i)}set limit(e){I(this.#i,e,!0)}#s=te();get query(){return h(this.#s)}set query(e){I(this.#s,e,!0)}#a=te(Fe([]));get ticketGroupIds(){return h(this.#a)}set ticketGroupIds(e){I(this.#a,e,!0)}#o=te(Fe([]));get languageIds(){return h(this.#o)}set languageIds(e){I(this.#o,e,!0)}#l=te(Fe([]));get catchWordIds(){return h(this.#l)}set catchWordIds(e){I(this.#l,e,!0)}#u=te(Fe([]));get museumIds(){return h(this.#u)}set museumIds(e){I(this.#u,e,!0)}#c=te(!1);get withContent(){return h(this.#c)}set withContent(e){I(this.#c,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=D(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=$i([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=$i();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>mi(t).loadProducts(this)))}},bg="go-ticket-segment",cM=Fi(bg),jc=Ni(bg);function dM(e,t){re(t,!0);const r=b(t,"filters",7),n=b(t,"dateId",7),i=b(t,"query",7),s=b(t,"limit",7),o=b(t,"ticketGroupIds",7),a=b(t,"languageIds",7),l=b(t,"catchWordIds",7),c=b(t,"museumIds",7),d=b(t,"withContent",7);function u(_){if(!_)return;const k=_.split(",").map(A=>A.trim()).filter(Boolean);return k.length?k:void 0}const p=mn(t.$$host),f=p.value,g=new uM(u(r()),p);cM(t.$$host,g),ge(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=sn(o()),g.languageIds=sn(a()),g.catchWordIds=sn(l()),g.museumIds=sn(c()),g.withContent=!!d()}),ge(()=>{g.dateId,g.filters,g.ticketGroupIds,g.museumIds,g.languageIds,g.catchWordIds,g.query,g.limit,g.withContent,f?.filters,f?.selectedTimeslot,f?.selectedTime,f?.selectedDate,f?.museumIds,Ne(()=>{g.loadTickets()})}),ge(()=>{f&&Ne(()=>f?.addTicketSegment(g))});const m=D(()=>g.preCart.items.length);ge(()=>{t.$$host.classList.toggle("is-empty",h(m)===0)});var v={details:g,get filters(){return r()},set filters(_){r(_),y()},get dateId(){return n()},set dateId(_){n(_),y()},get query(){return i()},set query(_){i(_),y()},get limit(){return s()},set limit(_){s(_),y()},get ticketGroupIds(){return o()},set ticketGroupIds(_){o(_),y()},get languageIds(){return a()},set languageIds(_){a(_),y()},get catchWordIds(){return l()},set catchWordIds(_){l(_),y()},get museumIds(){return c()},set museumIds(_){c(_),y()},get withContent(){return d()},set withContent(_){d(_),y()}};return ne(v)}customElements.define("go-ticket-segment",ie(dM,{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"},withContent:{attribute:"with-content",reflect:!0,type:"Boolean"}},[],["details"]));function fM(e,t){re(t,!0);const r=mn(t.$$host).value,n=jc(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&h(i)===0);ge(()=>{t.$$host.style.display=h(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!h(s)),t.$$host.classList.toggle("is-visible",h(s))}),ne()}customElements.define("go-ticket-segment-empty",ie(fM,{},[],[]));function _g(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function hM(e){if(Array.isArray(e))return e}function pM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function mM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
84
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vM(e,t){return hM(e)||pM(e,t)||gM(e,t)||mM()}function gM(e,t){if(e){if(typeof e=="string")return _g(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_g(e,t):void 0}}var wg=Object.entries,kg=Object.setPrototypeOf,yM=Object.isFrozen,bM=Object.getPrototypeOf,_M=Object.getOwnPropertyDescriptor,Pt=Object.freeze,fr=Object.seal,Qi=Object.create,Sg=typeof Reflect<"u"&&Reflect,Zc=Sg.apply,Wc=Sg.construct;Pt||(Pt=function(t){return t}),fr||(fr=function(t){return t}),Zc||(Zc=function(t,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 t.apply(r,i)}),Wc||(Wc=function(t){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 t(...n)});var es=ct(Array.prototype.forEach),wM=ct(Array.prototype.lastIndexOf),Eg=ct(Array.prototype.pop),ts=ct(Array.prototype.push),kM=ct(Array.prototype.splice),$t=Array.isArray,oo=ct(String.prototype.toLowerCase),Hc=ct(String.prototype.toString),xg=ct(String.prototype.match),rs=ct(String.prototype.replace),Tg=ct(String.prototype.indexOf),SM=ct(String.prototype.trim),EM=ct(Number.prototype.toString),xM=ct(Boolean.prototype.toString),Ag=typeof BigInt>"u"?null:ct(BigInt.prototype.toString),Og=typeof Symbol>"u"?null:ct(Symbol.prototype.toString),nt=ct(Object.prototype.hasOwnProperty),ao=ct(Object.prototype.toString),_t=ct(RegExp.prototype.test),lo=TM(TypeError);function ct(e){return function(t){t instanceof RegExp&&(t.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 Zc(e,t,n)}}function TM(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wc(e,r)}}function xe(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oo;if(kg&&kg(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(yM(t)||(t[n]=s),i=s)}e[i]=!0}return e}function AM(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function St(e){const t=Qi(null);for(const n of wg(e)){var r=vM(n,2);const i=r[0],s=r[1];nt(e,i)&&($t(s)?t[i]=AM(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=St(s):t[i]=s)}return t}function OM(e){switch(typeof e){case"string":return e;case"number":return EM(e);case"boolean":return xM(e);case"bigint":return Ag?Ag(e):"0";case"symbol":return Og?Og(e):"Symbol()";case"undefined":return ao(e);case"function":case"object":{if(e===null)return ao(e);const t=e,r=Kr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:ao(n)}return ao(e)}default:return ao(e)}}function Kr(e,t){for(;e!==null;){const n=_M(e,t);if(n){if(n.get)return ct(n.get);if(typeof n.value=="function")return ct(n.value)}e=bM(e)}function r(){return null}return r}function CM(e){try{return _t(e,""),!0}catch{return!1}}var Cg=Pt(["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"]),Gc=Pt(["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"]),Kc=Pt(["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"]),DM=Pt(["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"]),Yc=Pt(["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"]),IM=Pt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dg=Pt(["#text"]),Ig=Pt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Jc=Pt(["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"]),Pg=Pt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Ka=Pt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),PM=fr(/{{[\w\W]*|^[\w\W]*}}/g),$M=fr(/<%[\w\W]*|^[\w\W]*%>/g),MM=fr(/\${[\w\W]*/g),FM=fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),NM=fr(/^aria-[\-\w]+$/),$g=fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),RM=fr(/^(?:\w+script|data):/i),LM=fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zM=fr(/^html$/i),UM=fr(/^[a-z][.\w]*(-[.\w]+)+$/i),Yr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},qM=function(){return typeof window>"u"?null:window},VM=function(t,r){if(typeof t!="object"||typeof t.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 t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Mg=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Fg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qM();const t=ye=>Fg(ye);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Yr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,o=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,u=a.prototype,p=Kr(u,"cloneNode"),f=Kr(u,"remove"),g=Kr(u,"nextSibling"),m=Kr(u,"childNodes"),v=Kr(u,"parentNode"),_=Kr(u,"shadowRoot"),k=Kr(u,"attributes"),A=o&&o.prototype?Kr(o.prototype,"nodeType"):null,E=o&&o.prototype?Kr(o.prototype,"nodeName"):null;if(typeof s=="function"){const ye=r.createElement("template");ye.content&&ye.content.ownerDocument&&(r=ye.content.ownerDocument)}let T,C="";const $=r,R=$.implementation,U=$.createNodeIterator,N=$.createDocumentFragment,le=$.getElementsByTagName,V=n.importNode;let ae=Mg();t.isSupported=typeof wg=="function"&&typeof v=="function"&&R&&R.createHTMLDocument!==void 0;const me=PM,J=$M,oe=MM,G=FM,Q=NM,K=RM,H=LM,B=UM;let ee=$g,P=null;const ue=xe({},[...Cg,...Gc,...Kc,...Yc,...Dg]);let z=null;const ve=xe({},[...Ig,...Jc,...Pg,...Ka]);let fe=Object.seal(Qi(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}})),w=null,Be=null;const Pe=Object.seal(Qi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Je=!0,Et=!0,Ke=!1,Xt=!0,dt=!1,Qt=!0,xt=!1,Mt=!1,er=!1,jt=!1,hr=!1,Ir=!1,Pr=!0,vn=!1;const $r="user-content-";let pr=!0,Jr=!1,Xr={},wt=null;const Un=xe({},["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 ns=null;const is=xe({},["audio","video","img","source","image","track"]);let co=null;const Xc=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vi="http://www.w3.org/1998/Math/MathML",ss="http://www.w3.org/2000/svg",mr="http://www.w3.org/1999/xhtml";let qn=mr,Qc=!1,ed=null;const p2=xe({},[vi,ss,mr],Hc);let td=xe({},["mi","mo","mn","ms","mtext"]),rd=xe({},["annotation-xml"]);const m2=xe({},["title","style","font","a","script"]);let fo=null;const v2=["application/xhtml+xml","text/html"],g2="text/html";let st=null,os=null;const y2=r.createElement("form"),Ug=function(S){return S instanceof RegExp||S instanceof Function},nd=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(os&&os===S)return;(!S||typeof S!="object")&&(S={}),S=St(S),fo=v2.indexOf(S.PARSER_MEDIA_TYPE)===-1?g2:S.PARSER_MEDIA_TYPE,st=fo==="application/xhtml+xml"?Hc:oo,P=nt(S,"ALLOWED_TAGS")&&$t(S.ALLOWED_TAGS)?xe({},S.ALLOWED_TAGS,st):ue,z=nt(S,"ALLOWED_ATTR")&&$t(S.ALLOWED_ATTR)?xe({},S.ALLOWED_ATTR,st):ve,ed=nt(S,"ALLOWED_NAMESPACES")&&$t(S.ALLOWED_NAMESPACES)?xe({},S.ALLOWED_NAMESPACES,Hc):p2,co=nt(S,"ADD_URI_SAFE_ATTR")&&$t(S.ADD_URI_SAFE_ATTR)?xe(St(Xc),S.ADD_URI_SAFE_ATTR,st):Xc,ns=nt(S,"ADD_DATA_URI_TAGS")&&$t(S.ADD_DATA_URI_TAGS)?xe(St(is),S.ADD_DATA_URI_TAGS,st):is,wt=nt(S,"FORBID_CONTENTS")&&$t(S.FORBID_CONTENTS)?xe({},S.FORBID_CONTENTS,st):Un,w=nt(S,"FORBID_TAGS")&&$t(S.FORBID_TAGS)?xe({},S.FORBID_TAGS,st):St({}),Be=nt(S,"FORBID_ATTR")&&$t(S.FORBID_ATTR)?xe({},S.FORBID_ATTR,st):St({}),Xr=nt(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?St(S.USE_PROFILES):S.USE_PROFILES:!1,Je=S.ALLOW_ARIA_ATTR!==!1,Et=S.ALLOW_DATA_ATTR!==!1,Ke=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dt=S.SAFE_FOR_TEMPLATES||!1,Qt=S.SAFE_FOR_XML!==!1,xt=S.WHOLE_DOCUMENT||!1,jt=S.RETURN_DOM||!1,hr=S.RETURN_DOM_FRAGMENT||!1,Ir=S.RETURN_TRUSTED_TYPE||!1,er=S.FORCE_BODY||!1,Pr=S.SANITIZE_DOM!==!1,vn=S.SANITIZE_NAMED_PROPS||!1,pr=S.KEEP_CONTENT!==!1,Jr=S.IN_PLACE||!1,ee=CM(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:$g,qn=typeof S.NAMESPACE=="string"?S.NAMESPACE:mr,td=nt(S,"MATHML_TEXT_INTEGRATION_POINTS")&&S.MATHML_TEXT_INTEGRATION_POINTS&&typeof S.MATHML_TEXT_INTEGRATION_POINTS=="object"?St(S.MATHML_TEXT_INTEGRATION_POINTS):xe({},["mi","mo","mn","ms","mtext"]),rd=nt(S,"HTML_INTEGRATION_POINTS")&&S.HTML_INTEGRATION_POINTS&&typeof S.HTML_INTEGRATION_POINTS=="object"?St(S.HTML_INTEGRATION_POINTS):xe({},["annotation-xml"]);const Z=nt(S,"CUSTOM_ELEMENT_HANDLING")&&S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING=="object"?St(S.CUSTOM_ELEMENT_HANDLING):Qi(null);if(fe=Qi(null),nt(Z,"tagNameCheck")&&Ug(Z.tagNameCheck)&&(fe.tagNameCheck=Z.tagNameCheck),nt(Z,"attributeNameCheck")&&Ug(Z.attributeNameCheck)&&(fe.attributeNameCheck=Z.attributeNameCheck),nt(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),dt&&(Et=!1),hr&&(jt=!0),Xr&&(P=xe({},Dg),z=Qi(null),Xr.html===!0&&(xe(P,Cg),xe(z,Ig)),Xr.svg===!0&&(xe(P,Gc),xe(z,Jc),xe(z,Ka)),Xr.svgFilters===!0&&(xe(P,Kc),xe(z,Jc),xe(z,Ka)),Xr.mathMl===!0&&(xe(P,Yc),xe(z,Pg),xe(z,Ka))),Pe.tagCheck=null,Pe.attributeCheck=null,nt(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?Pe.tagCheck=S.ADD_TAGS:$t(S.ADD_TAGS)&&(P===ue&&(P=St(P)),xe(P,S.ADD_TAGS,st))),nt(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?Pe.attributeCheck=S.ADD_ATTR:$t(S.ADD_ATTR)&&(z===ve&&(z=St(z)),xe(z,S.ADD_ATTR,st))),nt(S,"ADD_URI_SAFE_ATTR")&&$t(S.ADD_URI_SAFE_ATTR)&&xe(co,S.ADD_URI_SAFE_ATTR,st),nt(S,"FORBID_CONTENTS")&&$t(S.FORBID_CONTENTS)&&(wt===Un&&(wt=St(wt)),xe(wt,S.FORBID_CONTENTS,st)),nt(S,"ADD_FORBID_CONTENTS")&&$t(S.ADD_FORBID_CONTENTS)&&(wt===Un&&(wt=St(wt)),xe(wt,S.ADD_FORBID_CONTENTS,st)),pr&&(P["#text"]=!0),xt&&xe(P,["html","head","body"]),P.table&&(xe(P,["tbody"]),delete w.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw lo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw lo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=S.TRUSTED_TYPES_POLICY,C=T.createHTML("")}else T===void 0&&(T=VM(d,i)),T!==null&&typeof C=="string"&&(C=T.createHTML(""));(ae.uponSanitizeElement.length>0||ae.uponSanitizeAttribute.length>0)&&P===ue&&(P=St(P)),ae.uponSanitizeAttribute.length>0&&z===ve&&(z=St(z)),Pt&&Pt(S),os=S},qg=xe({},[...Gc,...Kc,...DM]),Vg=xe({},[...Yc,...IM]),b2=function(S){let Z=v(S);(!Z||!Z.tagName)&&(Z={namespaceURI:qn,tagName:"template"});const he=oo(S.tagName),Oe=oo(Z.tagName);return ed[S.namespaceURI]?S.namespaceURI===ss?Z.namespaceURI===mr?he==="svg":Z.namespaceURI===vi?he==="svg"&&(Oe==="annotation-xml"||td[Oe]):!!qg[he]:S.namespaceURI===vi?Z.namespaceURI===mr?he==="math":Z.namespaceURI===ss?he==="math"&&rd[Oe]:!!Vg[he]:S.namespaceURI===mr?Z.namespaceURI===ss&&!rd[Oe]||Z.namespaceURI===vi&&!td[Oe]?!1:!Vg[he]&&(m2[he]||!qg[he]):!!(fo==="application/xhtml+xml"&&ed[S.namespaceURI]):!1},Mr=function(S){ts(t.removed,{element:S});try{v(S).removeChild(S)}catch{f(S)}},gi=function(S,Z){try{ts(t.removed,{attribute:Z.getAttributeNode(S),from:Z})}catch{ts(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(S),S==="is")if(jt||hr)try{Mr(Z)}catch{}else try{Z.setAttribute(S,"")}catch{}},Bg=function(S){let Z=null,he=null;if(er)S="<remove></remove>"+S;else{const et=xg(S,/^[\r\n\t ]+/);he=et&&et[0]}fo==="application/xhtml+xml"&&qn===mr&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Oe=T?T.createHTML(S):S;if(qn===mr)try{Z=new c().parseFromString(Oe,fo)}catch{}if(!Z||!Z.documentElement){Z=R.createDocument(qn,"template",null);try{Z.documentElement.innerHTML=Qc?C:Oe}catch{}}const $e=Z.body||Z.documentElement;return S&&he&&$e.insertBefore(r.createTextNode(he),$e.childNodes[0]||null),qn===mr?le.call(Z,xt?"html":"body")[0]:xt?Z.documentElement:$e},jg=function(S){return U.call(S.ownerDocument||S,S,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Zg=function(S){S.normalize();const Z=U.call(S.ownerDocument||S,S,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let he=Z.nextNode();for(;he;){let Oe=he.data;es([me,J,oe],$e=>{Oe=rs(Oe,$e," ")}),he.data=Oe,he=Z.nextNode()}},Ya=function(S){const Z=E?E(S):null;return typeof Z!="string"||st(Z)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==k(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==A(S)||S.childNodes!==m(S)},ho=function(S){if(!A||typeof S!="object"||S===null)return!1;try{return A(S)===Yr.documentFragment}catch{return!1}},Ja=function(S){if(!A||typeof S!="object"||S===null)return!1;try{return typeof A(S)=="number"}catch{return!1}};function gn(ye,S,Z){es(ye,he=>{he.call(t,S,Z,os)})}const Wg=function(S){let Z=null;if(gn(ae.beforeSanitizeElements,S,null),Ya(S))return Mr(S),!0;const he=st(S.nodeName);if(gn(ae.uponSanitizeElement,S,{tagName:he,allowedTags:P}),Qt&&S.hasChildNodes()&&!Ja(S.firstElementChild)&&_t(/<[/\w!]/g,S.innerHTML)&&_t(/<[/\w!]/g,S.textContent)||Qt&&S.namespaceURI===mr&&he==="style"&&Ja(S.firstElementChild)||S.nodeType===Yr.progressingInstruction||Qt&&S.nodeType===Yr.comment&&_t(/<[/\w]/g,S.data))return Mr(S),!0;if(w[he]||!(Pe.tagCheck instanceof Function&&Pe.tagCheck(he))&&!P[he]){if(!w[he]&&Gg(he)&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he)))return!1;if(pr&&!wt[he]){const Oe=v(S),$e=m(S);if($e&&Oe){const et=$e.length;for(let Zt=et-1;Zt>=0;--Zt){const Vn=p($e[Zt],!0);Oe.insertBefore(Vn,g(S))}}}return Mr(S),!0}return(A?A(S):S.nodeType)===Yr.element&&!b2(S)||(he==="noscript"||he==="noembed"||he==="noframes")&&_t(/<\/no(script|embed|frames)/i,S.innerHTML)?(Mr(S),!0):(dt&&S.nodeType===Yr.text&&(Z=S.textContent,es([me,J,oe],Oe=>{Z=rs(Z,Oe," ")}),S.textContent!==Z&&(ts(t.removed,{element:S.cloneNode()}),S.textContent=Z)),gn(ae.afterSanitizeElements,S,null),!1)},Hg=function(S,Z,he){if(Be[Z]||Pr&&(Z==="id"||Z==="name")&&(he in r||he in y2))return!1;const Oe=z[Z]||Pe.attributeCheck instanceof Function&&Pe.attributeCheck(Z,S);if(!(Et&&!Be[Z]&&_t(G,Z))){if(!(Je&&_t(Q,Z))){if(!Oe||Be[Z]){if(!(Gg(S)&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,S)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(S))&&(fe.attributeNameCheck instanceof RegExp&&_t(fe.attributeNameCheck,Z)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(Z,S))||Z==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he))))return!1}else if(!co[Z]){if(!_t(ee,rs(he,H,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&S!=="script"&&Tg(he,"data:")===0&&ns[S])){if(!(Ke&&!_t(K,rs(he,H,"")))){if(he)return!1}}}}}}return!0},_2=xe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Gg=function(S){return!_2[oo(S)]&&_t(B,S)},Kg=function(S){gn(ae.beforeSanitizeAttributes,S,null);const Z=S.attributes;if(!Z||Ya(S))return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let Oe=Z.length;for(;Oe--;){const $e=Z[Oe],et=$e.name,Zt=$e.namespaceURI,Vn=$e.value,yn=st(et),id=Vn;let gt=et==="value"?id:SM(id);if(he.attrName=yn,he.attrValue=gt,he.keepAttr=!0,he.forceKeepAttr=void 0,gn(ae.uponSanitizeAttribute,S,he),gt=he.attrValue,vn&&(yn==="id"||yn==="name")&&Tg(gt,$r)!==0&&(gi(et,S),gt=$r+gt),Qt&&_t(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){gi(et,S);continue}if(yn==="attributename"&&xg(gt,"href")){gi(et,S);continue}if(he.forceKeepAttr)continue;if(!he.keepAttr){gi(et,S);continue}if(!Xt&&_t(/\/>/i,gt)){gi(et,S);continue}dt&&es([me,J,oe],Jg=>{gt=rs(gt,Jg," ")});const Yg=st(S.nodeName);if(!Hg(Yg,yn,gt)){gi(et,S);continue}if(T&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Zt)switch(d.getAttributeType(Yg,yn)){case"TrustedHTML":gt=T.createHTML(gt);break;case"TrustedScriptURL":gt=T.createScriptURL(gt);break}if(gt!==id)try{Zt?S.setAttributeNS(Zt,et,gt):S.setAttribute(et,gt),Ya(S)?Mr(S):Eg(t.removed)}catch{gi(et,S)}}gn(ae.afterSanitizeAttributes,S,null)},Xa=function(S){let Z=null;const he=jg(S);for(gn(ae.beforeSanitizeShadowDOM,S,null);Z=he.nextNode();)if(gn(ae.uponSanitizeShadowNode,Z,null),Wg(Z),Kg(Z),ho(Z.content)&&Xa(Z.content),(A?A(Z):Z.nodeType)===Yr.element){const Oe=_?_(Z):Z.shadowRoot;ho(Oe)&&(as(Oe),Xa(Oe))}gn(ae.afterSanitizeShadowDOM,S,null)},as=function(S){const Z=A?A(S):S.nodeType;if(Z===Yr.element){const $e=_?_(S):S.shadowRoot;ho($e)&&(as($e),Xa($e))}const he=m?m(S):S.childNodes;if(!he)return;const Oe=[];es(he,$e=>{ts(Oe,$e)});for(const $e of Oe)as($e);if(Z===Yr.element){const $e=E?E(S):null;if(typeof $e=="string"&&st($e)==="template"){const et=S.content;ho(et)&&as(et)}}};return t.sanitize=function(ye){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,he=null,Oe=null,$e=null;if(Qc=!ye,Qc&&(ye="<!-->"),typeof ye!="string"&&!Ja(ye)&&(ye=OM(ye),typeof ye!="string"))throw lo("dirty is not a string, aborting");if(!t.isSupported)return ye;if(Mt||nd(S),t.removed=[],typeof ye=="string"&&(Jr=!1),Jr){const Vn=E?E(ye):ye.nodeName;if(typeof Vn=="string"){const yn=st(Vn);if(!P[yn]||w[yn])throw lo("root node is forbidden and cannot be sanitized in-place")}if(Ya(ye))throw lo("root node is clobbered and cannot be sanitized in-place");as(ye)}else if(Ja(ye))Z=Bg("<!---->"),he=Z.ownerDocument.importNode(ye,!0),he.nodeType===Yr.element&&he.nodeName==="BODY"||he.nodeName==="HTML"?Z=he:Z.appendChild(he),as(he);else{if(!jt&&!dt&&!xt&&ye.indexOf("<")===-1)return T&&Ir?T.createHTML(ye):ye;if(Z=Bg(ye),!Z)return jt?null:Ir?C:""}Z&&er&&Mr(Z.firstChild);const et=jg(Jr?ye:Z);for(;Oe=et.nextNode();)Wg(Oe),Kg(Oe),ho(Oe.content)&&Xa(Oe.content);if(Jr)return dt&&Zg(ye),ye;if(jt){if(dt&&Zg(Z),hr)for($e=N.call(Z.ownerDocument);Z.firstChild;)$e.appendChild(Z.firstChild);else $e=Z;return(z.shadowroot||z.shadowrootmode)&&($e=V.call(n,$e,!0)),$e}let Zt=xt?Z.outerHTML:Z.innerHTML;return xt&&P["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&_t(zM,Z.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
85
|
+
`+Zt),dt&&es([me,J,oe],Vn=>{Zt=rs(Zt,Vn," ")}),T&&Ir?T.createHTML(Zt):Zt},t.setConfig=function(){nd(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Mt=!0},t.clearConfig=function(){os=null,Mt=!1},t.isValidAttribute=function(ye,S,Z){return os||nd({}),Hg(st(ye),st(S),Z)},t.addHook=function(ye,S){typeof S=="function"&&ts(ae[ye],S)},t.removeHook=function(ye,S){if(S!==void 0){const Z=wM(ae[ye],S);return Z===-1?void 0:kM(ae[ye],Z,1)[0]}return Eg(ae[ye])},t.removeHooks=function(ye){ae[ye]=[]},t.removeAllHooks=function(){ae=Mg()},t}var BM=Fg(),jM=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),ZM=j('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),WM=j('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),HM=j("<option> </option>"),GM=j('<select class="go-tickets-item-select"></select>'),KM=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=""><!></li></ul></article></li>');function Ng(e,t){const r=ht();re(t,!0);const n=k=>{var A=jM(),E=q(A),T=F(E);M(E);var C=X(E,2),$=F(C,!0);M(C),ce(R=>{se(T,`${s().product.event_title??""} - ${R??""}`),se($,s().product.title)},[()=>qs(s().time)]),x(k,A)},i=k=>{Tt();var A=zt();ce(()=>se(A,s().product.title)),x(k,A)};let s=b(t,"item",7),o=b(t,"details",7);const a=D(()=>We.config.quantityStepper);let l=te(void 0),c=te(!1);const d=D(()=>s().product?.content?.reduction_reason),u=`go-ticket-info-${r}`;ge(()=>{o().preCart.items.map(k=>k.quantity),O.cart?.items.map(k=>k.quantity),Ne(()=>{I(l,O.capacityManager.capacity(O.cart,s(),o().preCart),!0)})});function p(k,A,E){k.quantity=parseInt(A.value)}let f=i;Bs(s().product)&&(f=n);var g={get item(){return s()},set item(k){s(k),y()},get details(){return o()},set details(k){o(k),y()}},m=Y(),v=q(m),_=k=>{var A=KM(),E=F(A),T=F(E),C=F(T),$=F(C);f($),M(C);var R=X(C,2),U=K=>{var H=ZM(),B=F(H);M(H),ce(ee=>{Ot(B,1,wr(["go-ticket-info-icon",h(c)&&"is-active"])),pe(B,"aria-expanded",h(c)),pe(B,"aria-controls",u),pe(B,"aria-label",ee)},[()=>O.t("ticket.list.additionalInfo")]),at("click",B,()=>I(c,!h(c))),x(K,H)};de(R,K=>{h(d)&&K(U)});var N=X(R,2);f_(N,()=>BM.sanitize(s().product.description),!0),M(N);var le=X(N,2),V=K=>{var H=WM(),B=F(H,!0);M(H),ce(ee=>{pe(H,"id",u),pe(H,"hidden",!h(c)),se(B,ee)},[()=>O.t(h(d))]),x(K,H)};de(le,K=>{h(d)&&K(V)});var ae=X(le,2),me=F(ae,!0);M(ae);var J=X(ae,2),oe=F(J),G=K=>{{let H=D(()=>O.t("quantity.decrease")),B=D(()=>O.t("quantity.increase"));Fu(K,{get value(){return s().quantity},get min(){return h(l).min},get max(){return h(l).max},get label(){return s().product.title},get decreaseLabel(){return h(H)},get increaseLabel(){return h(B)},onChange:ee=>s().quantity=ee})}},Q=K=>{var H=GM();qe(H,21,()=>Bp(h(l).min,h(l).max),B=>B.value,(B,ee)=>{var P=HM(),ue=F(P,!0);M(P);var z={};ce(()=>{zl(P,s().quantity===h(ee).value),se(ue,h(ee).label),z!==(z=h(ee).value)&&(P.value=(P.__value=h(ee).value)??"")}),x(B,P)}),M(H),ce(B=>pe(H,"aria-label",B),[()=>O.t("cart.content.table.edit")]),at("change",H,B=>p(s(),B.target,o()?.ticketSelectionDetails)),x(K,H)};de(oe,K=>{h(a)?K(G):K(Q,-1)}),M(J),M(T),M(E),M(A),ce(()=>{Ot(E,1,wr(["go-tickets-item",h(l).bookedOut&&"is-booked-out"])),pe(E,"data-testid",s().uuid),se(me,s().price_formatted)}),x(k,A)};return de(v,k=>{h(l)&&!h(l).unavailable&&k(_)}),x(e,m),ne(g)}br(["click","change"]),ie(Ng,{item:{},details:{}},[],[],{mode:"open"});var YM=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 JM(e,t){re(t,!0);const r=jc(t.$$host),n=D(()=>r.value),i=D(()=>h(n)?.preCart?.items.length&&h(n)?.preCart?.items.length>0);var s=Y(),o=q(s),a=l=>{var c=YM(),d=F(c),u=F(d),p=F(u),f=F(p,!0);M(p);var g=X(p,2),m=F(g,!0);M(g);var v=X(g,2),_=F(v,!0);M(v);var k=X(v,2),A=F(k,!0);M(k),M(u),M(d);var E=X(d,2);qe(E,17,()=>h(n).preCart.items,T=>T.uuid,(T,C)=>{Ng(T,{get item(){return h(C)},get details(){return h(n)}})}),M(c),ce((T,C,$,R)=>{se(f,T),se(m,C),se(_,$),se(A,R)},[()=>O.t("product.detail.table.title"),()=>O.t("product.detail.table.desc"),()=>O.t("product.detail.table.price"),()=>O.t("product.detail.table.quantity")]),x(l,c)};de(o,l=>{h(i)&&h(n)&&l(a)}),x(e,s),ne()}customElements.define("go-ticket-segment-body",ie(JM,{},[],[]));function XM(e,t){re(t,!0);const r=jc(t.$$host),n=D(()=>r.value);Tt();var i=zt();ce(()=>se(i,h(n)?.preCart.totalFormatted)),x(e,i),ne()}customElements.define("go-ticket-segment-sum",ie(XM,{},[],[]));var QM=class{#e;get tsd(){return h(this.#e)}set tsd(e){I(this.#e,e)}#t=te(Fe([]));get timeslots(){return h(this.#t)}set timeslots(e){I(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>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}const t=O.capacityManager.quotaManager;t.clearPrecart();for(const r of O.cart?.items??[]){const n=r.product;Du(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}},e2=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),t2=j('<ul data-testid="timeslots"></ul>');function r2(e,t){re(t,!0);const r=[],n=new QM(mn(t.$$host));ge(()=>{const d=n.tsd;if(!d)return;const u=d.filters,p=d.selectedDate;Ne(async()=>{d.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(f=>mi(f).loadTimeslots(d))),n.recalculateCapacities()})}),ge(()=>{O.cart?.items.map(d=>d.quantity),Ne(()=>n.recalculateCapacities())});const i=(d,u)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=d=>{i(d.target,n.tsd?.selectedTimeslot)};ge(()=>{const d=n.tsd;if(!d)return;const u=n.timeslots;if(u.length!==1)return;const p=u[0];p.available&&d.selectedTimeslot!==p.startAt&&(d.selectedTimeslot=p.startAt,i(t.$$host,p.startAt))});var o={details:n},a=Y(),l=q(a),c=d=>{var u=t2();qe(u,20,()=>n.timeslots,p=>p,(p,f)=>{const g=D(()=>f.totalCapacity===0),m=D(()=>!h(g)&&f.capacity===0),v=D(()=>h(g)||h(m)||!f.available),_=D(()=>n.tsd?.selectedTimeslot===f.startAt);var k=e2(),A=F(k),E=F(A),T=X(E);Is(T);var C;M(A),M(k),ce(()=>{Ot(k,1,wr({"go-timeslot":!0,"is-unavailable":h(g),"is-sold-out":h(m),"is-disabled":h(v),"is-selected":h(_)})),se(E,`${f.timeFormatted??""} `),T.disabled=h(v),pe(T,"aria-disabled",h(v)),C!==(C=f.startAt)&&(T.value=(T.__value=f.startAt)??"")}),at("change",T,s),O_(r,[],T,()=>(f.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),x(p,k)}),M(u),x(d,u)};return de(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),x(e,a),ne(o)}br(["change"]),customElements.define("go-timeslots",ie(r2,{},[],["details"]));var n2=class{#e=te();get details(){return h(this.#e)}set details(e){I(this.#e,e,!0)}#t=te(Fe(Qn(qt())));get startAt(){return h(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=te(void 0);get selected(){return h(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>mi(e).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(Qn(qt()))<0||this.dates[e.toString()]=="unavailable":e.compare(Qn(qt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>mi(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=O.calendar.bind(O);return this.fetchPeriod().reduce((t,r)=>kt(t,e(this.params(r))),{})}ticketsDates(){const e=O.ticketsCalendar.bind(O);return this.fetchPeriod().reduce((t,r)=>kt(t,e(this.params(r))),{})}},i2=j("<!> <!> <!>",1),s2=j("<div> </div>"),Rg=j("<!> <!>",1),o2=j('<div data-calendar-wrapper=""><!></div>');function Lg(e,t){re(t,!0);let r=b(t,"calendarClass",7),n=te(void 0);const i=r();ge(()=>{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=o2(),a=F(o);{const l=(c,d)=>{let u=()=>d?.().months,p=()=>d?.().weekdays;var f=Rg(),g=q(f);De(g,()=>lc,(v,_)=>{_(v,{children:(k,A)=>{var E=i2(),T=q(E);De(T,()=>dc,(R,U)=>{U(R,{class:"go-calendar-prev-button",children:(N,le)=>{Tt();var V=zt("Prev");x(N,V)},$$slots:{default:!0}})});var C=X(T,2);De(C,()=>uc,(R,U)=>{U(R,{class:"go-calendar-heading"})});var $=X(C,2);De($,()=>cc,(R,U)=>{U(R,{class:"go-calendar-next-button",children:(N,le)=>{Tt();var V=zt("Next");x(N,V)},$$slots:{default:!0}})}),x(k,E)},$$slots:{default:!0}})});var m=X(g,2);qe(m,17,u,Ur,(v,_)=>{var k=Y(),A=q(k);De(A,()=>nc,(E,T)=>{T(E,{class:"go-calendar-grid",children:(C,$)=>{var R=Rg(),U=q(R);De(U,()=>oc,(le,V)=>{V(le,{class:"go-calendar-grid-head",children:(ae,me)=>{var J=Y(),oe=q(J);De(oe,()=>ro,(G,Q)=>{Q(G,{class:"go-calendar-grid-row",children:(K,H)=>{var B=Y(),ee=q(B);qe(ee,17,p,Ur,(P,ue,z,ve)=>{var fe=Y(),w=q(fe);De(w,()=>ac,(Be,Pe)=>{Pe(Be,{children:(Je,Et)=>{var Ke=s2(),Xt=F(Ke,!0);M(Ke),ce(dt=>se(Xt,dt),[()=>h(ue).slice(0,2)]),x(Je,Ke)},$$slots:{default:!0}})}),x(P,fe)}),x(K,B)},$$slots:{default:!0}})}),x(ae,J)},$$slots:{default:!0}})});var N=X(U,2);De(N,()=>ic,(le,V)=>{V(le,{class:"go-calendar-grid-body",children:(ae,me)=>{var J=Y(),oe=q(J);qe(oe,17,()=>h(_).weeks,Ur,(G,Q,K,H)=>{var B=Y(),ee=q(B);De(ee,()=>ro,(P,ue)=>{ue(P,{class:"go-calendar-grid-row",children:(z,ve)=>{var fe=Y(),w=q(fe);qe(w,17,()=>h(Q),Ur,(Be,Pe,Je,Et)=>{var Ke=Y(),Xt=q(Ke);De(Xt,()=>sc,(dt,Qt)=>{Qt(dt,{get date(){return h(Pe)},get month(){return h(_).value},class:"go-calendar-cell",children:(xt,Mt)=>{var er=Y(),jt=q(er);{let hr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(h(Pe)),"is-disabled":r().isDateDisabled(h(Pe)),"is-selected":r().selected?.compare(h(Pe))===0}));De(jt,()=>rc,(Ir,Pr)=>{Pr(Ir,{get class(){return h(hr)},children:(vn,$r)=>{Tt();var pr=zt();ce(()=>se(pr,h(Pe).day)),x(vn,pr)},$$slots:{default:!0}})})}x(xt,er)},$$slots:{default:!0}})}),x(Be,Ke)}),x(z,fe)},$$slots:{default:!0}})}),x(G,B)}),x(ae,J)},$$slots:{default:!0}})}),x(C,R)},$$slots:{default:!0}})}),x(v,k)}),x(c,f)};De(a,()=>rv,(c,d)=>{d(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return O.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return M(o),Gl(o,l=>I(n,l),()=>h(n)),x(e,o),ne(s)}ie(Lg,{calendarClass:{}},[],["details"],{mode:"open"});function a2(e,t){re(t,!0);const r=new n2,n=r,i=mn(t.$$host),s=D(()=>i.value);ge(()=>{r.details=h(s)}),t.$$host.addEventListener("go-date-select",d=>{h(s)&&(h(s).selectedDate=d.detail.selected,h(s).selectedTimeslot=void 0)});var o={details:n},a=Y(),l=q(a),c=d=>{Lg(d,{get calendarClass(){return r}})};return de(l,d=>{h(s)?.isCalendarVisible&&d(c)}),x(e,a),ne(o)}customElements.define("go-calendar",ie(a2,{},[],["details"]));var l2=class{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!O.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return pt(n.product,{quantity:n.quantity,time:i})}));O.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),We.config.urls.cart&&We.config.navigateTo(We.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},u2=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function c2(e,t){re(t,!0);const r=new l2(mn(t.$$host));var n={details:r},i=u2(),s=F(i,!0);return M(i),ce((o,a,l)=>{i.disabled=o,pe(i,"data-x",a),se(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>O.t("common.actions.cart")]),at("click",i,()=>r.addToCart()),x(e,i),ne(n)}br(["click"]),customElements.define("go-add-to-cart-button",ie(c2,{},[],["details"]));function d2(e,t){re(t,!0);let r=b(t,"custom",7,!1);cr.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,o=await O.withdrawal(s.formData);o.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error?.errors??[O.t("withdrawal.form.errors.requestFailed")]}return Mn(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),ne({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-withdrawal-form",ie(d2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var uo=null;async function f2(){if(uo)return uo;if(!O.client)throw new Error("[go.api] Shop not initialized — call go.init({ shop, api, locale }) first.")}async function h2(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)if(n.method!=="load")try{await zg[n.method](n.options)}catch(i){console.error(i)}e.go=zg,t&&(t._queue=null)}var zg={loaded:!0,config:e=>{We.define(e)},init:async e=>{try{uo=O.load("https://"+e.api,e.shop,e.locale),await uo}catch(t){throw uo=null,t}},api:{getCustomer:async()=>(await f2(),O.asyncFetch(()=>O.getCustomer()))}};(async()=>await h2(window))()})();
|