@gomusdev/web-components 3.8.3 → 3.9.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 +12 -0
- package/dist-js/gomus-webcomponents.iife.js +142 -39
- package/dist-js/gomus-webcomponents.js +142 -39
- package/dist-js/gomus-webcomponents.min.iife.js +36 -36
- package/dist-js/gomus-webcomponents.min.js +5858 -5790
- package/dist-js/src/components/cart/mocks/gomusTicketMocks.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/_helpers.d.ts +16 -0
- package/dist-js/src/components/ticketSelection/filters/_helpers.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.d.ts +1 -0
- package/dist-js/src/lib/helpers/translations.d.ts +1 -0
- package/dist-js/src/lib/models/ticket/UITicket.svelte.d.ts +4 -1
- package/dist-js/src/lib/stores/shop.svelte.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
(function(){var
|
|
2
|
-
`),
|
|
3
|
-
`)}),
|
|
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
|
|
1
|
+
(function(){var Sy=globalThis;(Sy.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var Bn={},ot=Symbol("uninitialized"),Xa=Symbol("filename"),Ey="http://www.w3.org/1999/xhtml",Ty="http://www.w3.org/2000/svg",xy="http://www.w3.org/1998/Math/MathML",Ay="@attach",fo=Array.isArray,Oy=Array.prototype.indexOf,ho=Array.prototype.includes,po=Array.from,mo=Object.keys,bn=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor,ad=Object.getOwnPropertyDescriptors,ld=Object.prototype,Cy=Array.prototype,vo=Object.getPrototypeOf,ud=Object.isExtensible;function ls(e){return typeof e=="function"}var Me=()=>{};function Dy(e){return e()}function Qa(e){for(var t=0;t<e.length;t++)e[t]()}function cd(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}var Iy=1<<24,tr=1024,rr=2048,jn=4096,el=8192,Py=16384,tl=32768,dd=1<<25,us=65536,u2=1<<17,c2=1<<18,yi=1<<19,fd=1<<20,cs=1<<25,ds=65536,hd=1<<21,$y=1<<22,go=1<<23,Fr=Symbol("$state"),rl=Symbol("legacy props"),My=Symbol(""),Fy=Symbol("proxy path"),pd=Symbol("attributes"),nl=Symbol("class"),il=Symbol("style"),sl=Symbol("text"),fs=Symbol("form reset"),d2=Symbol("hmr anchor"),yo=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 Ny(e){throw new Error("https://svelte.dev/e/invariant_violation")}function md(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ry(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function f2(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function h2(){throw new Error("https://svelte.dev/e/derived_references_self")}function vd(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function p2(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function Ly(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function zy(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Uy(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Vy(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qy(){throw new Error("https://svelte.dev/e/hydration_failed")}function m2(){throw new Error("https://svelte.dev/e/invalid_snippet")}function By(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function v2(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function g2(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function jy(){throw new Error("https://svelte.dev/e/set_context_after_init")}function Zy(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Wy(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Hy(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Gy(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var y2="font-weight: bold",b2="font-weight: normal";function _2(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function w2(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function Ky(){console.warn("https://svelte.dev/e/derived_inert")}function Yy(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Jy(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function ps(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function k2(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Xy(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ol(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function S2(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function Qy(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var be=!1;function gt(e){be=e}var xe;function dt(e){if(e===null)throw ps(),Bn;return xe=e}function Qr(){return dt(gr(xe))}function P(e){if(be){if(gr(xe)!==null)throw ps(),Bn;xe=e}}function Tt(e=1){if(be){for(var t=e,r=xe;t--;)r=gr(r);xe=r}}function ms(e=!0){for(var t=0,r=xe;;){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 al(e){if(!e||e.nodeType!==8)throw ps(),Bn;return e.data}function gd(e){return e===this.v}function eb(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function yd(e){return!eb(e,this.v)}var Wt=!1,bi=!1,E2=!1;function tb(){bi=!0}var T2="font-weight: bold",x2="font-weight: normal";function A2(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var rb=[];function ll(e,t=!1,r=!1){return bo(e,new Map,"",rb,null,r)}function bo(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(fo(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]=bo(c,t,r,n,null,s))}return a}if(vo(e)===ld){a={},t.set(e,a),i!==null&&t.set(i,a);for(var d of Object.keys(e))a[d]=bo(e[d],t,r,n,null,s);return a}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return bo(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var O2=null;function bd(e,t){return e.label=t,nb(e.v,t),e}function nb(e,t){return e?.[Fy]?.(t),e}function C2(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function D2(e){const t=new Error,r=ib();return r.length===0?null:(r.unshift(`
|
|
2
|
+
`),bn(t,"stack",{value:r.join(`
|
|
3
|
+
`)}),bn(t,"name",{value:e}),t)}function ib(){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 I2(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var ze=null;function _i(e){ze=e}var sb=null;function P2(e){sb=e}var ul=null;function $2(e){ul=e}function _d(e){return cl("getContext").get(e)}function ob(e,t){const r=cl("setContext");if(Wt){var n=Ee.f;!Ae&&(n&32)!==0&&!ze.i||jy()}return r.set(e,t),t}function ab(e){return cl("hasContext").has(e)}function te(e,t=!1,r){ze={p:ze,i:!1,c:null,e:null,s:e,x:null,r:Ee,l:bi&&!t?{s:null,u:null,$:[]}:null}}function re(e){var t=ze,r=t.e;if(r!==null){t.e=null;for(var n of r)Zd(n)}return e!==void 0&&(t.x=e),t.i=!0,ze=t.p,e??{}}function vs(){return!bi||ze!==null&&ze.l===null}function cl(e){return ze===null&&md(e),ze.c??=new Map(lb(ze)||void 0)}function lb(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 wd(){var e=Zn;Zn=[],Qa(e)}function nr(e){if(Zn.length===0&&!ys){var t=Zn;queueMicrotask(()=>{t===Zn&&wd()})}Zn.push(e)}function ub(){for(;Zn.length>0;)wd()}var cb=new WeakMap;function kd(e){var t=Ee;if(t===null)return Ae.f|=go,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 M2(e,t){const r=Mr(e,"message");if(!(r&&!r.configurable)){for(var n=_l?" ":" ",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?.[Xa].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 P2(e){const t=ub.get(e);t&&(yn(e,"message",{value:t.message}),yn(e,"stack",{value:t.stack}))}var cb=~(rr|qn|tr);function it(e,t){e.f=e.f&cb|t}function cl(e){(e.f&512)!==0||e.deps===null?it(e,tr):it(e,qn)}function kd(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=cs,kd(t.deps))}function Sd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),kd(e.deps),it(e,tr)}var db=!1,bo=!1;function fb(e){var t=bo;try{return bo=!1,[e(),bo]}finally{bo=t}}var _o=null,_i=null,we=null,vs=null,Tt=null,dl=null,gs=!1,fl=!1,wi=null,wo=null,Ed=0,$2=new Set,hb=1,ki=class Qc{id=hb++;#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=[];#d=new Set;#c=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){_i===null?_o=_i=this:(_i.#r=this,this.#t=_i),_i=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,qn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Ed++>1e3&&(this.#b(),pb());for(const l of this.#d)this.#c.delete(l),it(l,rr),this.schedule(l);for(const l of this.#c)it(l,qn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=wi=[],n=[],i=wo=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Od(l),this.#m()||this.discard(),c}if(we=null,i.length>0){var s=Qc.ensure();for(const l of i)s.schedule(l)}if(wi=null,wo=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Ad(l,c);i.length>0&&we.#v();return}const o=this.#w();if(o){this.#g(n),this.#g(r),o.#_(this);return}this.#d.clear(),this.#c.clear();for(const l of this.#n)l(this);this.#n.clear(),vs=this,Td(n),Td(r),vs=null,this.#o?.resolve();var a=we;if(this.#s===0&&(this.#l.length===0||a!==null)&&(this.#b(),Wt&&(this.#k(),we=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):ks(i)&&((s&16)!==0&&this.#c.add(i),xi(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.#d,t.#c);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.#c.delete(o),it(o,rr),this.schedule(o))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),we=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Sd(t[r],this.#d,this.#c)}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]),Tt?.set(t,r)),this.is_fork||(t.v=r)}activate(){we=this}deactivate(){we=null,Tt=null}flush(){try{fl=!0,we=this,this.#v()}finally{Ed=0,dl=null,wi=null,wo=null,fl=!1,we=null,Tt=null,Zn.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=_o;d!==null;d=d.#r){var t=d.id<this.id,r=[];for(const[u,[h,f]]of this.current){if(d.current.has(u)){var n=d.current.get(u)[0];if(t&&h!==n)d.current.set(u,[h,f]);else continue}r.push(u)}if(t)for(const[u,h]of this.async_deriveds){const f=d.async_deriveds.get(u);f&&h.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,h=>{(h.f&4194320)!==0?d.schedule(h):d.#g([h])});d.activate();var s=new Set,o=new Map;for(var a of r)xd(a,i,s,o);o=new Map;var l=[...d.current].filter(([u,h])=>{const f=this.current.get(u);return f?f[0]!==h[0]||f[1]!==h[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&hl(u,l,o)&&((u.f&4194320)!==0?(it(u,rr),d.schedule(u)):d.#d.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.#d.add(n);for(const n of r)this.#c.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#o??=ud()).promise}static ensure(){if(we===null){const t=we=new Qc;!fl&&!gs&&nr(()=>{t.#e||t.flush()})}return we}apply(){if(!Wt||!this.is_fork&&this.#t===null&&this.#r===null){Tt=null;return}Tt=new Map;for(const[r,[n]]of this.current)Tt.set(r,n);for(let r=_o;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)Tt.has(n)||Tt.set(n,i)}}schedule(t){if(dl=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(wi!==null&&r===Ee&&(Wt||(Ae===null||(Ae.f&2)===0)&&!db))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?_o=r:t.#r=r,r===null?_i=t:r.#t=t,this.linked=!1}}};function y(e){var t=gs;gs=!0;try{var r;for(e&&(we!==null&&!we.is_fork&&we.flush(),r=e());;){if(lb(),we===null)return r;we.flush()}}finally{gs=t}}function pb(){if(0){var e;for(const r of we.current.keys())for(const[n,i]of r.updated??[])var t}try{Uy()}catch(r){bn(r,dl)}}var Fr=null;function Td(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&ks(n)&&(Fr=new Set,xi(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Gd(n),Fr?.size>0)){Zn.clear();for(const i of Fr){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Fr.has(o)&&(Fr.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&&xi(l)}}Fr.clear()}}Fr=null}}function xd(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?xd(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&hl(i,t,n)&&(it(i,rr),pl(i))}}function hl(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(fo.call(t,i))return!0;if((i.f&2)!==0&&hl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function pl(e){we.schedule(e)}function Ad(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;)Ad(r,t),r=r.next}}function Od(e){it(e,tr);for(var t=e.first;t!==null;)Od(t),t=t.next}function ml(e){let t=0,r=_n(0),n;return()=>{kl()&&(p(r),Ti(()=>(t===0&&(n=Ue(()=>e(()=>Nr(r)))),t+=1,()=>{nr(()=>{t-=1,t===0&&(n?.(),n=void 0,Nr(r))})})))}}var mb=ls|gi;function vb(e,t,r,n){new gb(e,t,r,n)}var gb=class{parent;is_pending=!1;transform_error;#e;#t=be?xe:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#u=0;#d=0;#c=!1;#h=new Set;#p=new Set;#f=null;#m=ml(()=>(this.#f=_n(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=ws(()=>{if(be){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.#_()},mb),be&&(this.#e=xe)}#v(){try{this.#s=Mt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=Mt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#a=Mt(()=>e(this.#e)),nr(()=>{var t=this.#l=document.createDocumentFragment(),r=$t();t.append(r),this.#s=this.#k(()=>Mt(()=>this.#n(r))),this.#d===0&&(this.#e.before(t),this.#l=null,Wn(this.#a,()=>{this.#a=null}),this.#g(we))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#d=0,this.#u=0,this.#s=Mt(()=>{this.#n(this.#e)}),this.#d>0){var e=this.#l=document.createDocumentFragment();Tl(this.#s,e);const t=this.#r.pending;this.#a=Mt(()=>t(this.#e))}else this.#g(we)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Sd(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=ze;sr(this.#i),Ft(this.#i),bi(this.#i.ctx);try{return ki.ensure(),e()}catch(i){return wd(i),null}finally{sr(t),Ft(r),bi(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#d+=e,this.#d===0&&(this.#g(t),this.#a&&Wn(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.#c)&&(this.#c=!0,nr(()=>{this.#c=!1,this.#f&&Ei(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),p(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;we?.is_fork?(this.#s&&we.skip_effect(this.#s),this.#a&&we.skip_effect(this.#a),this.#o&&we.skip_effect(this.#o),we.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(ht(this.#s),this.#s=null),this.#a&&(ht(this.#a),this.#a=null),this.#o&&(ht(this.#o),this.#o=null),be&&(dt(this.#t),Et(),dt(ps()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){Xy();return}n=!0,i&&Hy(),this.#o!==null&&Wn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},o=a=>{try{i=!0,t?.(a,s),i=!1}catch(l){bn(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return Mt(()=>{var l=Ee;l.b=this,l.f|=128,r(this.#e,()=>a,()=>s)})}catch(l){return bn(l,this.#i.parent),null}}))};nr(()=>{var a;try{a=this.transform_error(e)}catch(l){bn(l,this.#i&&this.#i.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,l=>bn(l,this.#i&&this.#i.parent)):o(a)})}};function Cd(e,t,r,n){const i=ms()?Si:vl;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=yb(),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){bn(g,a)}ko()}}var u=Dd();if(r.length===0){c.then(()=>d([])).finally(u);return}function h(){Promise.all(r.map(f=>_b(f))).then(d).catch(f=>bn(f,a)).finally(u)}c?c.then(()=>{l(),h(),ko()}):h()}function yb(){var e=Ee,t=Ae,r=ze,n=we;if(0)var i;return function(o=!0){sr(e),Ft(t),bi(r),o&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function ko(e=!0){sr(null),Ft(null),bi(null),e&&we?.deactivate()}function Dd(){var e=Ee,t=e.b,r=we,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 bb=null;function M2(e){bb=e}var F2=new Set;function Si(e){var t=2|rr;return Ee!==null&&(Ee.f|=gi),{ctx:ze,deps:null,effects:null,equals:vd,f:t,fn:e,reactions:null,rv:0,v:ot,wv:0,parent:Ee,ac:null}}var So=Symbol("obsolete");function _b(e,t,r){let n=Ee;n===null&&Ny();var i=void 0,s=_n(ot),o=!Ae,a=new Set;return $b(()=>{var l=Ee,c=ud();i=c.promise;try{Promise.resolve(e()).then(c.resolve,f=>{f!==go&&c.reject(f)}).finally(ko)}catch(f){c.reject(f),ko()}var d=we;if(o){if((l.f&32768)!==0)var u=Dd();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(So);else for(const f of a.values())f.reject(So);a.add(c),d.async_deriveds.set(l,c)}const h=(f,g=void 0)=>{u?.(),a.delete(c),g!==So&&(d.activate(),g?(s.f|=vo,Ei(s,g)):((s.f&8388608)!==0&&(s.f^=vo),Ei(s,f)),d.deactivate())};c.promise.then(h,f=>h(null,f||"unknown"))}),Oo(()=>{for(const l of a)l.reject(So)}),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=Si(e);return Wt||Xd(t),t}function vl(e){const t=Si(e);return t.equals=gd,t}function wb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ht(t[r])}}var N2=[];function gl(e){var t,r=Ee,n=e.parent;if(!en&&n!==null&&e.v!==ot&&(n.f&24576)!==0)return Gy(),e.v;sr(n);try{e.f&=~cs,wb(e),t=nf(e)}finally{sr(r)}return t}function Id(e){var t=gl(e);if(!e.equals(t)&&(e.wv=tf(),(!we?.is_fork||e.deps===null)&&(we!==null?(we.capture(e,t,!0),vs?.capture(e,t,!0)):e.v=t,e.deps===null))){it(e,tr);return}en||(Tt!==null?(kl()||we?.is_fork)&&Tt.set(e,t):cl(e))}function kb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(go),t.fn!==null&&(t.teardown=Me),t.ac=null,Ss(t,0),El(t))}function Pd(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&xi(t)}var ys=new Set,Zn=new Map;function R2(e){ys=e}var yl=!1;function Sb(){yl=!0}function _n(e,t){var r={f:0,v:e,reactions:null,equals:vd,rv:0,wv:0};return r}function re(e,t){const r=_n(e,t);return Xd(r),r}function $d(e,t=!1,r=!0){const n=_n(e);return t||(n.equals=gd),yi&&r&&ze!==null&&ze.l!==null&&(ze.l.s??=[]).push(n),n}function I(e,t,r=!1){Ae!==null&&(!yr||(Ae.f&131072)!==0)&&ms()&&(Ae.f&4325394)!==0&&(Rr===null||!Rr.has(e))&&Wy();let n=r?Fe(t):t;return Ei(e,n,wo)}function Ei(e,t,r=null){if(!e.equals(t)){Zn.set(e,en?t:e.v);var n=ki.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&gl(i),Tt===null&&cl(i)}e.wv=tf(),Fd(e,rr,r),ms()&&Ee!==null&&(Ee.f&1024)!==0&&(Ee.f&96)===0&&(or===null?Nb([e]):or.push(e)),!n.is_fork&&ys.size>0&&!yl&&Md()}return t}function Md(){yl=!1;for(const e of ys){(e.f&1024)!==0&&it(e,qn);let t;try{t=ks(e)}catch{t=!0}t&&xi(e)}ys.clear()}function Nr(e){I(e,e.v+1)}function Fd(e,t,r){var n=e.reactions;if(n!==null)for(var i=ms(),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)ys.add(a);else if((l&2)!==0){var d=a;Tt?.delete(d),(l&65536)===0&&(l&512&&(Ee===null||(Ee.f&2097152)===0)&&(a.f|=cs),Fd(d,qn,r))}else if(c){var u=a;(l&16)!==0&&Fr!==null&&Fr.add(u),r!==null?r.push(u):pl(u)}}}}var Eb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Fe(e){if(typeof e!="object"||e===null||Mr in e)return e;const t=mo(e);if(t!==ad&&t!==Oy)return e;var r=new Map,n=co(e),i=re(0),s=null,o=tn,a=u=>{if(tn===o)return u();var h=Ae,f=tn;Ft(null),ef(o);var g=u();return Ft(h),ef(f),g};n&&r.set("length",re(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,yd(i,`${l} version`);for(const[h,f]of r)yd(f,Tb(l,h));c=!1}}return new Proxy(e,{defineProperty(u,h,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&jy();var g=r.get(h);return g===void 0?a(()=>{var m=re(f.value,s);return r.set(h,m),m}):I(g,f.value,!0),!0},deleteProperty(u,h){var f=r.get(h);if(f===void 0){if(h in u){const g=a(()=>re(ot,s));r.set(h,g),Nr(i)}}else I(f,ot),Nr(i);return!0},get(u,h,f){if(h===Mr)return e;var g=r.get(h),m=h in u;if(g===void 0&&(!m||$r(u,h)?.writable)&&(g=a(()=>{var _=re(Fe(m?u[h]:ot),s);return _}),r.set(h,g)),g!==void 0){var v=p(g);return v===ot?void 0:v}return Reflect.get(u,h,f)},getOwnPropertyDescriptor(u,h){var f=Reflect.getOwnPropertyDescriptor(u,h);if(f&&"value"in f){var g=r.get(h);g&&(f.value=p(g))}else if(f===void 0){var m=r.get(h),v=m?.v;if(m!==void 0&&v!==ot)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(u,h){if(h===Mr)return!0;var f=r.get(h),g=f!==void 0&&f.v!==ot||Reflect.has(u,h);return(f!==void 0||Ee!==null&&(!g||$r(u,h)?.writable))&&(f===void 0&&(f=a(()=>{var m=re(g?Fe(u[h]):ot,s);return m}),r.set(h,f)),p(f)===ot)?!1:g},set(u,h,f,g){var m=r.get(h),v=h in u;if(n&&h==="length")for(var _=f;_<m.v;_+=1){var T=r.get(_+"");T!==void 0?I(T,ot):_ in u&&(T=a(()=>re(ot,s)),r.set(_+"",T))}if(m===void 0)(!v||$r(u,h)?.writable)&&(m=a(()=>re(void 0,s)),I(m,Fe(f)),r.set(h,m));else{v=m.v!==ot;var A=a(()=>Fe(f));I(m,A)}var E=Reflect.getOwnPropertyDescriptor(u,h);if(E?.set&&E.set.call(g,f),!v){if(n&&typeof h=="string"){var x=r.get("length"),O=Number(h);Number.isInteger(O)&&O>=x.v&&I(x,O+1)}Nr(i)}return!0},ownKeys(u){p(i);var h=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)&&h.push(f);return h},setPrototypeOf(){Zy()}})}function Tb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Eb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function bs(e){try{if(e!==null&&typeof e=="object"&&Mr in e)return e[Mr]}catch{}return e}function Nd(e,t){return Object.is(bs(e),bs(t))}var xb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function L2(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return xb.has(r)?function(...s){Sb();var o=i.apply(this,s);return Md(),o}:i}})}function z2(){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(bs(this[l])===s){sl("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(bs(this[l])===s){sl("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(bs(this[l])===s){sl("array.includes(...)");break}}return a},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Rd,Ab,bl,Ld,zd;function _l(){if(Rd===void 0){Rd=window,Ab=document,bl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Ld=$r(t,"firstChild").get,zd=$r(t,"nextSibling").get,ld(e)&&(e[rl]=void 0,e[hd]=null,e[nl]=void 0,e.__e=void 0),ld(r)&&(r[il]=void 0)}}function $t(e=""){return document.createTextNode(e)}function Ht(e){return Ld.call(e)}function gr(e){return zd.call(e)}function M(e,t){if(!be)return Ht(e);var r=Ht(xe);if(r===null)r=xe.appendChild($t());else if(t&&r.nodeType!==3){var n=$t();return r?.before(n),dt(n),n}return t&&To(r),dt(r),r}function U(e,t=!1){if(!be){var r=Ht(e);return r instanceof Comment&&r.data===""?gr(r):r}if(t){if(xe?.nodeType!==3){var n=$t();return xe?.before(n),dt(n),n}To(xe)}return xe}function X(e,t=1,r=!1){let n=be?xe:e;for(var i;t--;)i=n,n=gr(n);if(!be)return n;if(r){if(n?.nodeType!==3){var s=$t();return n===null?i?.after(s):n.before(s),dt(s),s}To(n)}return dt(n),n}function wl(e){e.textContent=""}function Ud(){return!Wt||Fr!==null?!1:(Ee.f&el)!==0}function Eo(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 Ob(e=""){return document.createComment(e)}function To(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 Cb(e,t){if(t){const r=document.body;e.autofocus=!0,nr(()=>{document.activeElement===r&&e.focus()})}}function Db(e){be&&Ht(e)!==null&&wl(e)}var Vd=!1;function Bd(){Vd||(Vd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[ds]?.()})},{capture:!0}))}function xo(e){var t=Ae,r=Ee;Ft(null),sr(null);try{return e()}finally{Ft(t),sr(r)}}function Ao(e,t,r,n=r){e.addEventListener(t,()=>xo(r));const i=e[ds];i?e[ds]=()=>{i(),n(!0)}:e[ds]=()=>n(!0),Bd()}function qd(e){Ee===null&&(Ae===null&&zy(e),Ly()),en&&Ry(e)}function Ib(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|=Qa);var n={ctx:ze,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};we?.register_created_effect(n);var i=n;if((e&4)!==0)wi!==null?wi.push(n):ki.ensure().schedule(n);else if(t!==null){try{xi(n)}catch(o){throw ht(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|=ls))}if(i!==null&&(i.parent=r,r!==null&&Ib(i,r),Ae!==null&&(Ae.f&2)!==0&&(e&64)===0)){var s=Ae;(s.effects??=[]).push(i)}return n}function kl(){return Ae!==null&&!yr}function Oo(e){const t=ir(8,null);return it(t,tr),t.teardown=e,t}function me(e){qd("$effect");var t=Ee.f;if(!Ae&&(t&32)!==0&&ze!==null&&!ze.i){var r=ze;(r.e??=[]).push(e)}else return jd(e)}function jd(e){return ir(4|dd,e)}function Sl(e){return qd("$effect.pre"),ir(8|dd,e)}function _s(e){ki.ensure();const t=ir(64|gi,e);return()=>{ht(t)}}function Pb(e){ki.ensure();const t=ir(64|gi,e);return(r={})=>new Promise(n=>{r.outro?Wn(t,()=>{ht(t),n(void 0)}):(ht(t),n(void 0))})}function Co(e){return ir(4,e)}function $b(e){return ir(Py|gi,e)}function Ti(e,t=0){return ir(8|t,e)}function ae(e,t=[],r=[],n=[]){Cd(n,t,r,i=>{ir(8,()=>{e(...i.map(p))})})}function ws(e,t=0){var r=ir(16|t,e);return r}function Zd(e,t=0){var r=ir(Dy|t,e);return r}function Mt(e){return ir(32|gi,e)}function Wd(e){var t=e.teardown;if(t!==null){const r=en,n=Ae;Jd(!0),Ft(null);try{t.call(null)}finally{Jd(r),Ft(n)}}}function El(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&xo(()=>{i.abort(go)});var n=r.next;(r.f&64)!==0?r.parent=null:ht(r,t),r=n}}function Mb(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&ht(t),t=r}}function ht(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Hd(e.nodes.start,e.nodes.end),r=!0),e.f|=cd,El(e,t&&!r),Ss(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Wd(e),e.f^=cd,e.f|=Iy;var i=e.parent;i!==null&&i.first!==null&&Gd(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Hd(e,t){for(;e!==null;){var r=e===t?null:gr(e);e.remove(),e=r}}function Gd(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 Wn(e,t,r=!0){var n=[];Kd(e,n,!0);var i=()=>{r&&ht(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function Kd(e,t,r){if((e.f&8192)===0){e.f^=Qa;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;Kd(i,t,o?r:!1)}i=s}}}function Do(e){Yd(e,!0)}function Yd(e,t){if((e.f&8192)!==0){e.f^=Qa,(e.f&1024)===0&&(it(e,rr),ki.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;Yd(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 Tl(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 Fb=null,Io=!1,en=!1;function Jd(e){en=e}var Ae=null,yr=!1;function Ft(e){Ae=e}var Ee=null;function sr(e){Ee=e}var Rr=null;function Xd(e){Ae!==null&&(!Wt||(Ae.f&2)!==0)&&(Rr??=new Set).add(e)}var Nt=null,Gt=0,or=null;function Nb(e){or=e}var Qd=1,Hn=0,tn=Hn;function ef(e){tn=e}function tf(){return++Qd}function ks(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~cs),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(ks(s)&&Id(s),s.wv>e.wv)return!0}(t&512)!==0&&Tt===null&&it(e,tr)}return!1}function rf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Wt&&Rr!==null&&Rr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?rf(s,t,!1):t===s&&(r?it(s,rr):(s.f&1024)!==0&&it(s,qn),pl(s))}}function nf(e){var t=Nt,r=Gt,n=or,i=Ae,s=Rr,o=ze,a=yr,l=tn,c=e.f;Nt=null,Gt=0,or=null,Ae=(c&96)===0?e:null,Rr=null,bi(e.ctx),yr=!1,tn=++Hn,e.ac!==null&&(xo(()=>{e.ac.abort(go)}),e.ac=null);try{e.f|=fd;var d=e.fn,u=d();e.f|=el;var h=e.deps,f=we?.is_fork;if(Nt!==null){var g;if(f||Ss(e,Gt),h!==null&&Gt>0)for(h.length=Gt+Nt.length,g=0;g<Nt.length;g++)h[Gt+g]=Nt[g];else e.deps=h=Nt;if(kl()&&(e.f&512)!==0)for(g=Gt;g<h.length;g++)(h[g].reactions??=[]).push(e)}else!f&&h!==null&&Gt<h.length&&(Ss(e,Gt),h.length=Gt);if(ms()&&or!==null&&!yr&&h!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)rf(or[g],e);if(i!==null&&i!==e){if(Hn++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=Hn;if(t!==null)for(const m of t)m.rv=Hn;or!==null&&(n===null?n=or:n.push(...or))}return(e.f&8388608)!==0&&(e.f^=vo),u}catch(m){return wd(m)}finally{e.f^=fd,Nt=t,Gt=r,or=n,Ae=i,Rr=s,bi(o),yr=a,tn=l}}function Rb(e,t){let r=t.reactions;if(r!==null){var n=Ay.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&&(Nt===null||!fo.call(Nt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~cs),s.v!==ot&&cl(s),kb(s),Ss(s,0)}}function Ss(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Rb(e,r[n])}function xi(e){var t=e.f;if((t&16384)===0){it(e,tr);var r=Ee,n=Io;if(Ee=e,Io=!0,0)var i,s;try{(t&16777232)!==0?Mb(e):El(e),Wd(e);var o=nf(e);if(e.teardown=typeof o=="function"?o:null,e.wv=Qd,0)for(var a of e.deps);}finally{Io=n,Ee=r}}}async function sf(){if(Wt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),y()}function p(e){var t=(e.f&2)!==0;if(Fb?.add(e),Ae!==null&&!yr&&!(Ee!==null&&(Ee.f&16384)!==0)&&(Rr===null||!Rr.has(e))){var r=Ae.deps;if((Ae.f&2097152)!==0)e.rv<Hn&&(e.rv=Hn,Nt===null&&r!==null&&r[Gt]===e?Gt++:Nt===null?Nt=[e]:Nt.push(e));else{Ae.deps??=[],fo.call(Ae.deps,e)||Ae.deps.push(e);var n=e.reactions;n===null?e.reactions=[Ae]:fo.call(n,Ae)||n.push(Ae)}}if(0){if(!yr&&bb&&!bb.warned&&(bb.effect.f&2097152)===0&&!bb.effect_deps.has(e))var i;if(w2&&!yr&&T2!==null&&Ae!==null&&T2.reaction===Ae&&!e.trace){if(i)var s,o}}if(en&&Zn.has(e))return Zn.get(e);if(t){var a=e;if(en){var l=a.v;return((a.f&1024)===0&&a.reactions!==null||af(a))&&(l=gl(a)),Zn.set(a,l),l}var c=(a.f&512)===0&&!yr&&Ae!==null&&(Io||(Ae.f&512)!==0),d=(a.f&el)===0;ks(a)&&(c&&(a.f|=512),Id(a)),c&&!d&&(Pd(a),of(a))}if(Tt?.has(e))return Tt.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function of(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&&(Pd(t),of(t))}function af(e){if(e.v===ot)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Zn.has(t)||(t.f&2)!==0&&af(t))return!0;return!1}function Ue(e){var t=yr;try{return yr=!0,e()}finally{yr=t}}function Lb(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Mr in e)xl(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Mr in r&&xl(r)}}}function xl(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{xl(e[n],t)}catch{}const r=mo(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=od(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Es=Symbol("events"),lf=new Set,Al=new Set;function Ol(e,t,r,n={}){function i(s){if(n.capture||Dl.call(t,s),!s.cancelBubble)return xo(()=>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 pt(e,t,r,n={}){var i=Ol(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Cl(e,t,r,n,i){var s={capture:n,passive:i},o=Ol(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Oo(()=>{t.removeEventListener(e,o,s)})}function Rt(e,t,r){(t[Es]??={})[e]=r}function Lr(e){for(var t=0;t<e.length;t++)lf.add(e[t]);for(var r of Al)r(e)}var uf=null;function Dl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;uf=e;var o=0,a=uf===e&&e[Es];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[Es]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){yn(e,"currentTarget",{configurable:!0,get(){return s||r}});var d=Ae,u=Ee;Ft(null),sr(null);try{for(var h,f=[];s!==null&&s!==t;){try{var g=s[Es]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){h?f.push(m):h=m}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(h){for(let m of f)queueMicrotask(()=>{throw m});throw h}}finally{e[Es]=t,delete e.currentTarget,Ft(d),sr(u)}}}var zb=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function cf(e){return zb?.createHTML(e)??e}function Ub(e){var t=Eo("template");return t.innerHTML=cf(e.replaceAll("<!>","<!---->")),t.content}function br(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(be)return br(xe,null),xe;i===void 0&&(i=Ub(s?e:"<!>"+e),r||(i=Ht(i)));var o=n||bl?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Ht(o),l=o.lastChild;br(a,l)}else br(o,o);return o}}function Lt(e=""){if(!be){var t=$t(e+"");return br(t,t),t}var r=xe;return r.nodeType!==3?(r.before(r=$t()),dt(r)):To(r),br(r,r),r}function K(){if(be)return br(xe,null),xe;var e=document.createDocumentFragment(),t=document.createComment(""),r=$t();return e.append(t,r),br(t,r),e}function S(e,t){if(be){var r=Ee;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=xe),Qr();return}e!==null&&e.before(t)}function gt(){if(be&&xe&&xe.nodeType===8&&xe.textContent?.startsWith("$")){const e=xe.textContent.substring(1);return Qr(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var Vb=/\r/g;function Bb(e){e=e.replace(Vb,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function qb(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var jb=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Zb(e){return jb.includes(e)}var Wb=["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"],Hb={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 Gb(e){return e=e.toLowerCase(),Hb[e]??e}var U2=[...Wb,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],Kb=["touchstart","touchmove"];function Yb(e){return Kb.includes(e)}var Jb=["$state","$state.raw","$derived","$derived.by"],V2=[...Jb,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function Xb(e){return e?.replace(/\//g,"/")}var df=!0;function ne(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[il]??=e.nodeValue)&&(e[il]=r,e.nodeValue=`${r}`)}function ff(e,t){return hf(e,t)}function Qb(e,t){_l(),t.intro=t.intro??!1;const r=t.target,n=be,i=xe;try{for(var s=Ht(r);s&&(s.nodeType!==8||s.data!=="[");)s=gr(s);if(!s)throw Bn;vt(!0),dt(s);const o=hf(e,{...t,anchor:s});return vt(!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 u_(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||vf.includes(n[o-1]))&&(a===n.length||vf.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function gf(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 Ml(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function c_(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(Ml)),i&&l.push(...Object.keys(i).map(Ml));var c=0,d=-1;const m=e.length;for(var u=0;u<m;u++){var h=e[u];if(a?h==="/"&&e[u-1]==="*"&&(a=!1):s?s===h&&(s=!1):h==="/"&&e[u+1]==="*"?a=!0:h==='"'||h==="'"?s=h:h==="("?o++:h===")"&&o--,!a&&s===!1&&o===0){if(h===":"&&d===-1)d=u;else if(h===";"||u===m-1){if(d!==-1){var f=Ml(e.substring(c,d).trim());if(!l.includes(f)){h!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,d=-1}}}}return n&&(r+=gf(n)),i&&(r+=gf(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function zt(e,t,r,n,i,s){var o=e[rl];if(be||o!==r||o===void 0){var a=u_(r,n,s);(!be||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[rl]=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 Fl(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 d_(e,t,r,n){var i=e[nl];if(be||i!==t){var s=c_(t,n);(!be||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[nl]=t}else n&&(Array.isArray(n)?(Fl(e,r?.[0],n[0]),Fl(e,r?.[1],n[1],"important")):Fl(e,r,n));return n}function Mo(e,t,r=!1){if(e.multiple){if(t==null)return;if(!co(t))return Jy();for(var n of e.options)n.selected=t.includes(As(n));return}for(n of e.options)if(Nd(As(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function yf(e){var t=new MutationObserver(()=>{Mo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Oo(()=>{t.disconnect()})}function f_(e,t,r=t){var n=new WeakSet,i=!0;Ao(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),As);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&As(l)}r(a),e.__value=a,we!==null&&n.add(we)}),Co(()=>{var s=t();if(e===document.activeElement){var o=Wt?vs:we;if(n.has(o))return}if(Mo(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=As(a),r(s))}e.__value=s,i=!1}),yf(e)}function As(e){return"__value"in e?e.__value:e.value}var Os=Symbol("class"),Cs=Symbol("style"),bf=Symbol("is custom element"),_f=Symbol("is html"),h_=fs?"link":"LINK",wf=fs?"input":"INPUT",p_=fs?"option":"OPTION",m_=fs?"select":"SELECT",v_=fs?"progress":"PROGRESS";function Fo(e){if(be){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;ke(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;ke(e,"checked",null),e.checked=i}}};e[ds]=r,nr(r),Bd()}}function kf(e,t){var r=No(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==v_)||(e.value=t??"")}function g_(e,t){var r=No(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Nl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ke(e,t,r,n){var i=No(e);if(be&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===h_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[$y]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ll(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Gn(e,t,r){var n=Ae,i=Ee;let s=be;be&&vt(!1),Ft(null),sr(null);try{t!=="style"&&(Rl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Ll(e).includes(t):r&&typeof r=="object")?e[t]=r:ke(e,t,r==null?r:String(r))}finally{Ft(n),sr(i),s&&vt(!0)}}function y_(e,t,r,n,i=!1,s=!1){if(be&&i&&e.nodeName===wf){var o=e;(o.type==="checkbox"?"defaultChecked":"defaultValue")in r||Fo(o)}var a=No(e),l=a[bf],c=!a[_f];let d=be&&l;d&&vt(!1);var u=t||{},h=e.nodeName===p_;for(var f in t)f in r||(r[f]=null);r.class?r.class=Ur(r.class):(n||r[Os])&&(r.class=null),r[Cs]&&(r.style??=null);var g=Ll(e);if(e.nodeName===wf&&"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,ke(e,"type",m,s))}for(const O in r){let $=r[O];if(h&&O==="value"&&$==null){e.value=e.__value="",u[O]=$;continue}if(O==="class"){zt(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",$,n,t?.[Os],r[Os]),u[O]=$,u[Os]=r[Os];continue}if(O==="style"){d_(e,$,t?.[Cs],r[Cs]),u[O]=$,u[Cs]=r[Cs];continue}var v=u[O];if(!($===v&&!($===void 0&&e.hasAttribute(O)))){u[O]=$;var _=O[0]+O[1];if(_!=="$$")if(_==="on"){const L={},W="$$"+O;let N=O.slice(2);var T=Zb(N);if(qb(N)&&(N=N.slice(0,-7),L.capture=!0),!T&&v){if($!=null)continue;e.removeEventListener(N,u[W],L),u[W]=null}if(T)Rt(N,e,$),Lr([N]);else if($!=null){let se=function(V){u[O].call(this,V)};var x=se;u[W]=Ol(N,e,se,L)}}else if(O==="style")ke(e,O,$);else if(O==="autofocus")Cb(e,!!$);else if(!l&&(O==="__value"||O==="value"&&$!=null))e.value=e.__value=$;else if(O==="selected"&&h)Nl(e,$);else{var A=O;c||(A=Gb(A));var E=A==="defaultValue"||A==="defaultChecked";if($==null&&!l&&!E)if(a[O]=null,A==="value"||A==="checked"){let L=e;const W=t===void 0;if(A==="value"){let N=L.defaultValue;L.removeAttribute(A),L.defaultValue=N,L.value=L.__value=W?N:null}else{let N=L.defaultChecked;L.removeAttribute(A),L.defaultChecked=N,L.checked=W?N:!1}}else e.removeAttribute(O);else E||g.includes(A)&&(l||typeof $!="string")?(e[A]=$,A in a&&(a[A]=ot)):typeof $!="function"&&ke(e,A,$,s)}}}return d&&vt(!0),u}function Ne(e,t,r=[],n=[],i=[],s,o=!1,a=!1){Cd(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===m_,h=!1;if(Zd(()=>{var g=t(...l.map(p)),m=y_(e,c,g,s,o,a);h&&u&&"value"in g&&Mo(e,g.value);for(let _ of Object.getOwnPropertySymbols(d))g[_]||ht(d[_]);for(let _ of Object.getOwnPropertySymbols(g)){var v=g[_];_.description==="@attach"&&(!c||v!==c[_])&&(d[_]&&ht(d[_]),d[_]=Mt(()=>l_(e,()=>v))),m[_]=v}c=m}),u){var f=e;Co(()=>{Mo(f,c.value,!0),yf(f)})}h=!0})}function No(e){return e[hd]??={[bf]:e.nodeName.includes("-"),[_f]:e.namespaceURI===Sy}}var Rl=new Map;function Ll(e){var t=e.getAttribute("is")||e.nodeName,r=Rl.get(t);if(r)return r;Rl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=od(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=mo(i)}return r}function j2(e,t,r){}function zl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Sf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function b_(e,t){var r=Sf(e.srcset),n=Sf(t);return n.length===r.length&&n.every(([i,s],o)=>s===r[o][1]&&(zl(r[o][0],i)||zl(i,r[o][0])))}var Ul=null;function __(){if(Ul===null){var e=Eo("select");e.innerHTML=cf("<option><span>t</span></option>"),Ul=e.firstChild?.firstChild?.nodeType===1}return Ul}function w_(e,t){var r=be;__()||(vt(!1),e.textContent="",e.append(Ob("")));try{t()}finally{r&&(be?P(e):(vt(!0),dt(e)))}}function Ro(e,t,r=t){var n=new WeakSet;Ao(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Bl(e)?ql(s):s,r(s),we!==null&&n.add(we),await sf(),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))}}}),(be&&e.defaultValue!==e.value||Ue(t)==null&&e.value)&&(r(Bl(e)?ql(e.value):e.value),we!==null&&n.add(we)),Ti(()=>{var i=t();if(e===document.activeElement){var s=Wt?vs:we;if(n.has(s))return}Bl(e)&&i===ql(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Vl=new Set;function k_(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),Ao(r,"change",()=>{var c=r.__value;s&&(c=Ef(o,c,r.checked)),i(c)},()=>i(s?[]:null)),Ti(()=>{var c=n();if(be&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Nd(r.__value,c)}),Oo(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Vl.has(o)||(Vl.add(o),nr(()=>{o.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),Vl.delete(o)})),nr(()=>{if(a){var c;s?c=Ef(o,c,r.checked):c=o.find(d=>d.checked)?.__value,i(c)}})}function S_(e,t,r=t){Ao(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(be&&e.defaultChecked!==e.checked||Ue(t)==null)&&r(e.checked),Ti(()=>{var n=t();e.checked=!!n})}function Ef(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 Bl(e){var t=e.type;return t==="number"||t==="range"}function ql(e){return e===""?null:+e}function jl(e,t){return e===t||e?.[Mr]===t}function Tf(e={},t,r,n){var i=ze.r,s=Ee;return Co(()=>{var o,a;return Ti(()=>{o=a,a=n?.()||[],Ue(()=>{jl(r(...a),e)||(t(e,...a),o&&jl(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&&jl(r(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function Zl(e=!1){const t=ze,r=t.l.u;if(!r)return;let n=()=>Lb(t.s);if(e){let i=0,s={};const o=Si(()=>{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=()=>p(o)}r.b.length&&Sl(()=>{xf(t,n),Xa(r.b)}),me(()=>{const i=Ue(()=>r.m.map(Cy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&me(()=>{xf(t,n),Xa(r.a)})}function xf(e,t){if(e.l.s)for(const r of e.l.s)p(r);t()}var E_={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},E_)}var T_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(as(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];as(i)&&(i=i());const s=$r(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(as(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=$r(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Mr||t===tl)return!1;for(let r of e.props)if(as(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(as(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 kn(...e){return new Proxy({props:e},T_)}function b(e,t,r,n){var i=!yi||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=n,l=!0,c=void 0,d=()=>o&&i?(c??=Si(n),p(c)):(l&&(l=!1,a=o?Ue(n):n),a);let u;if(s){var h=Mr in e||tl in e;u=$r(e,t)?.set??(h&&t in e?E=>e[t]=E:void 0)}var f,g=!1;s?[f,g]=fb(()=>e[t]):f=e[t],f===void 0&&n!==void 0&&(f=d(),u&&(i&&By(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,x){return arguments.length>0?((!i||!x||v||g)&&u(x?m():E),E):m()})}var _=!1,T=((r&1)!==0?Si:vl)(()=>(_=!1,m()));s&&p(T);var A=Ee;return(function(E,x){if(arguments.length>0){const O=x?p(T):i&&s?Fe(E):E;return I(T,O),_=!0,a!==void 0&&(a=O),E}return en&&_||(A.f&16384)!==0?T.v:p(T)})}function x_(e){return new A_(e)}var A_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var o=$d(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return p(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===tl?!0:(p(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?Qb:ff)(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"||yn(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=()=>{e_(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()}},Af;typeof HTMLElement=="function"&&(Af=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=Eo("slot");i!=="default"&&(o.name=i),S(s,o)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=O_(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]=Lo(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=x_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=_s(()=>{Ti(()=>{this.$$r=!0;for(const i of po(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Lo(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]=Lo(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 po(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Lo(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 O_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function te(e,t,r,n,i,s){let o=class extends Af{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return po(t).map(a=>(t[a].attribute||a).toLowerCase())}};return po(t).forEach(a=>{yn(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Lo(a,l,t),this.$$d[a]=l;var c=this.$$c;c&&($r(c,a)?.get?c[a]=l:c.$set({[a]:l}))}})}),n.forEach(a=>{yn(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),e.element=o,o}var Of={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:I_,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:P_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},C_={...Of,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function D_(e){return e==="angular"?Of:C_}function I_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function P_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function $_(e){return new Promise(t=>setTimeout(t,e))}function Cf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function M_(e){return typeof e=="boolean"}function Wl(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 Hl=Array.isArray,Df=e=>!!e&&e.constructor===Object,F_=e=>typeof e=="string"||e instanceof String,N_=e=>{try{return Number(e)===e}catch{return!1}},R_=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),If=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function Sn(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var L_=(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 If(e,(n,i)=>r(n)>r(i)?n:i)}function Gl(e,t){const r=t??(n=>n);return If(e,(n,i)=>r(n)<r(i)?n:i)}var U_=(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)},Pf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},V_=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},xt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:Df(e[n])?xt(e[n],i):i}),{}),$f=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&&Cf(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Cf(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(!(Df(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)}},B_=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}},Mf;function Z(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 h=d[u];h in a||(a[h]=c[h].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 Ai=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ff=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Mf=globalThis).__zod_globalConfig??(Mf.__zod_globalConfig={});var zo=globalThis.__zod_globalConfig;function Kn(e){return e&&Object.assign(zo,e),zo}function Nf(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 Kl(e,t){return typeof t=="bigint"?t.toString():t}function Yl(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function Jl(e){return e==null}function Xl(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function q_(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 Rf=Symbol("evaluating");function Be(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Rf)return n===void 0&&(n=Rf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Yn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function En(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Lf(e){return JSON.stringify(e)}function j_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var zf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Uo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Z_=Yl(()=>{if(zo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Ds(e){if(Uo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Uo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Uf(e){return Ds(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var W_=new Set(["string","number","symbol"]);function Vo(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 ye(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 H_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var G_={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 K_(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,En(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 Yn(this,"shape",i),i},checks:[]}))}function Y_(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,En(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 Yn(this,"shape",i),i},checks:[]}))}function J_(e,t){if(!Ds(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,En(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Yn(this,"shape",n),n}}))}function X_(e,t){if(!Ds(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Tn(e,En(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Yn(this,"shape",r),r}}))}function Q_(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,En(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Yn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ew(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,En(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 Yn(this,"shape",s),s},checks:[]}))}function tw(e,t,r){return Tn(t,En(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 Yn(this,"shape",i),i}}))}function Oi(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 rw(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 Vf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Bo(e){return typeof e=="string"?e:e?.message}function Jn(e,t,r){const n=e.message?e.message:Bo(e.inst?._zod.def?.error?.(e))??Bo(t?.error?.(e))??Bo(r.customError?.(e))??Bo(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 Ql(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Is(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Bf=(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,Kl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},qf=Z("$ZodError",Bf),jf=Z("$ZodError",Bf,{Parent:Error});function nw(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 iw(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 eu=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 Ai;if(o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Jn(l,s,Kn())));throw zf(a,i?.callee),a}return o.value},tu=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=>Jn(l,s,Kn())));throw zf(a,i?.callee),a}return o.value},qo=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 Ai;return s.issues.length?{success:!1,error:new(e??qf)(s.issues.map(o=>Jn(o,i,Kn())))}:{success:!0,data:s.value}},sw=qo(jf),jo=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=>Jn(o,i,Kn())))}:{success:!0,data:s.value}},ow=jo(jf),aw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return eu(e)(t,r,i)},lw=e=>(t,r,n)=>eu(e)(t,r,n),uw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return tu(e)(t,r,i)},cw=e=>async(t,r,n)=>tu(e)(t,r,n),dw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return qo(e)(t,r,i)},fw=e=>(t,r,n)=>qo(e)(t,r,n),hw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return jo(e)(t,r,i)},pw=e=>async(t,r,n)=>jo(e)(t,r,n),mw=/^[cC][0-9a-z]{6,}$/,vw=/^[0-9a-z]+$/,gw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yw=/^[0-9a-vA-V]{20}$/,bw=/^[A-Za-z0-9]{27}$/,_w=/^[a-zA-Z0-9_-]{21}$/,ww=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kw=/^([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})$/,Zf=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)$/,Sw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ew="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Tw(){return new RegExp(Ew,"u")}var xw=/^(?:(?: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])$/,Aw=/^(([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}|:))$/,Ow=/^((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])$/,Cw=/^(([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])$/,Dw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wf=/^[A-Za-z0-9_-]*$/,Iw=/^https?$/,Pw=/^\+[1-9]\d{6,14}$/,Hf="(?:(?:\\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])))",$w=new RegExp(`^${Hf}$`);function Gf(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 Mw(e){return new RegExp(`^${Gf(e)}$`)}function Fw(e){const t=Gf({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(`^${Hf}T(?:${n})$`)}var Nw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Rw=/^-?\d+$/,Lw=/^-?\d+(?:\.\d+)?$/,zw=/^[^A-Z]*$/,Uw=/^[^a-z]*$/,Ut=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Kf={number:"number",bigint:"bigint",object:"date"},Yf=Z("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=Kf[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})}}),Jf=Z("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=Kf[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})}}),Vw=Z("$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):q_(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})}}),Bw=Z("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=G_[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=Rw)}),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})}}),qw=Z("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Jl(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=Ql(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),jw=Z("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Jl(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=Ql(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Zw=Z("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Jl(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=Ql(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})}}),Zo=Z("$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=()=>{})}),Ww=Z("$ZodCheckRegex",(e,t)=>{Zo.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})}}),Hw=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=zw),Zo.init(e,t)}),Gw=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Uw),Zo.init(e,t)}),Kw=Z("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=Vo(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})}}),Yw=Z("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${Vo(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})}}),Jw=Z("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${Vo(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})}}),Xw=Z("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),Qw=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 F2(e){const t=cb.get(e);t&&(bn(e,"message",{value:t.message}),bn(e,"stack",{value:t.stack}))}var db=~(rr|jn|tr);function it(e,t){e.f=e.f&db|t}function dl(e){(e.f&512)!==0||e.deps===null?it(e,tr):it(e,jn)}function Sd(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=ds,Sd(t.deps))}function Ed(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Sd(e.deps),it(e,tr)}var fb=!1,_o=!1;function hb(e){var t=_o;try{return _o=!1,[e(),_o]}finally{_o=t}}var wo=null,wi=null,ke=null,gs=null,xt=null,fl=null,ys=!1,hl=!1,ki=null,ko=null,Td=0,N2=new Set,pb=1,Si=class ed{id=pb++;#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?wo=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,Td++>1e3&&(this.#b(),mb());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=ko=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Cd(l),this.#m()||this.discard(),c}if(ke=null,i.length>0){var s=ed.ensure();for(const l of i)s.schedule(l)}if(ki=null,ko=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Od(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,xd(n),xd(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)Ed(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]),xt?.set(t,r)),this.is_fork||(t.v=r)}activate(){ke=this}deactivate(){ke=null,xt=null}flush(){try{hl=!0,ke=this,this.#v()}finally{Td=0,fl=null,ki=null,ko=null,hl=!1,ke=null,xt=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=wo;d!==null;d=d.#r){var t=d.id<this.id,r=[];for(const[u,[h,f]]of this.current){if(d.current.has(u)){var n=d.current.get(u)[0];if(t&&h!==n)d.current.set(u,[h,f]);else continue}r.push(u)}if(t)for(const[u,h]of this.async_deriveds){const f=d.async_deriveds.get(u);f&&h.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,h=>{(h.f&4194320)!==0?d.schedule(h):d.#g([h])});d.activate();var s=new Set,o=new Map;for(var a of r)Ad(a,i,s,o);o=new Map;var l=[...d.current].filter(([u,h])=>{const f=this.current.get(u);return f?f[0]!==h[0]||f[1]!==h[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&pl(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??=cd()).promise}static ensure(){if(ke===null){const t=ke=new ed;!hl&&!ys&&nr(()=>{t.#e||t.flush()})}return ke}apply(){if(!Wt||!this.is_fork&&this.#t===null&&this.#r===null){xt=null;return}xt=new Map;for(const[r,[n]]of this.current)xt.set(r,n);for(let r=wo;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)xt.has(n)||xt.set(n,i)}}schedule(t){if(fl=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)&&!fb))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?wo=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(ub(),ke===null)return r;ke.flush()}}finally{ys=t}}function mb(){if(0){var e;for(const r of ke.current.keys())for(const[n,i]of r.updated??[])var t}try{Vy()}catch(r){_n(r,fl)}}var Nr=null;function xd(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)&&(Nr=new Set,Ai(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Kd(n),Nr?.size>0)){Wn.clear();for(const i of Nr){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Nr.has(o)&&(Nr.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)}}Nr.clear()}}Nr=null}}function Ad(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?Ad(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&pl(i,t,n)&&(it(i,rr),ml(i))}}function pl(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(ho.call(t,i))return!0;if((i.f&2)!==0&&pl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function ml(e){ke.schedule(e)}function Od(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;)Od(r,t),r=r.next}}function Cd(e){it(e,tr);for(var t=e.first;t!==null;)Cd(t),t=t.next}function vl(e){let t=0,r=wn(0),n;return()=>{Sl()&&(p(r),xi(()=>(t===0&&(n=Ue(()=>e(()=>Rr(r)))),t+=1,()=>{nr(()=>{t-=1,t===0&&(n?.(),n=void 0,Rr(r))})})))}}var vb=us|yi;function gb(e,t,r,n){new yb(e,t,r,n)}var yb=class{parent;is_pending=!1;transform_error;#e;#t=be?xe: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=vl(()=>(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(be){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.#_()},vb),be&&(this.#e=xe)}#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();xl(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){Ed(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=ze;sr(this.#i),Rt(this.#i),_i(this.#i.ctx);try{return Si.ensure(),e()}catch(i){return kd(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&&Ti(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),p(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&&(ht(this.#s),this.#s=null),this.#a&&(ht(this.#a),this.#a=null),this.#o&&(ht(this.#o),this.#o=null),be&&(dt(this.#t),Tt(),dt(ms()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){Qy();return}n=!0,i&&Gy(),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 Dd(e,t,r,n){const i=vs()?Ei:gl;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=bb(),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)}So()}}var u=Id();if(r.length===0){c.then(()=>d([])).finally(u);return}function h(){Promise.all(r.map(f=>wb(f))).then(d).catch(f=>_n(f,a)).finally(u)}c?c.then(()=>{l(),h(),So()}):h()}function bb(){var e=Ee,t=Ae,r=ze,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 So(e=!0){sr(null),Rt(null),_i(null),e&&ke?.deactivate()}function Id(){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 _b=null;function R2(e){_b=e}var L2=new Set;function Ei(e){var t=2|rr;return Ee!==null&&(Ee.f|=yi),{ctx:ze,deps:null,effects:null,equals:gd,f:t,fn:e,reactions:null,rv:0,v:ot,wv:0,parent:Ee,ac:null}}var Eo=Symbol("obsolete");function wb(e,t,r){let n=Ee;n===null&&Ry();var i=void 0,s=wn(ot),o=!Ae,a=new Set;return Mb(()=>{var l=Ee,c=cd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,f=>{f!==yo&&c.reject(f)}).finally(So)}catch(f){c.reject(f),So()}var d=ke;if(o){if((l.f&32768)!==0)var u=Id();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(Eo);else for(const f of a.values())f.reject(Eo);a.add(c),d.async_deriveds.set(l,c)}const h=(f,g=void 0)=>{u?.(),a.delete(c),g!==Eo&&(d.activate(),g?(s.f|=go,Ti(s,g)):((s.f&8388608)!==0&&(s.f^=go),Ti(s,f)),d.deactivate())};c.promise.then(h,f=>h(null,f||"unknown"))}),Co(()=>{for(const l of a)l.reject(Eo)}),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||Qd(t),t}function gl(e){const t=Ei(e);return t.equals=yd,t}function kb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ht(t[r])}}var z2=[];function yl(e){var t,r=Ee,n=e.parent;if(!en&&n!==null&&e.v!==ot&&(n.f&24576)!==0)return Ky(),e.v;sr(n);try{e.f&=~ds,kb(e),t=sf(e)}finally{sr(r)}return t}function Pd(e){var t=yl(e);if(!e.equals(t)&&(e.wv=rf(),(!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||(xt!==null?(Sl()||ke?.is_fork)&&xt.set(e,t):dl(e))}function Sb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(yo),t.fn!==null&&(t.teardown=Me),t.ac=null,Es(t,0),Tl(t))}function $d(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 U2(e){bs=e}var bl=!1;function Eb(){bl=!0}function wn(e,t){var r={f:0,v:e,reactions:null,equals:gd,rv:0,wv:0};return r}function ee(e,t){const r=wn(e,t);return Qd(r),r}function Md(e,t=!1,r=!0){const n=wn(e);return t||(n.equals=yd),bi&&r&&ze!==null&&ze.l!==null&&(ze.l.s??=[]).push(n),n}function I(e,t,r=!1){Ae!==null&&(!yr||(Ae.f&131072)!==0)&&vs()&&(Ae.f&4325394)!==0&&(Lr===null||!Lr.has(e))&&Hy();let n=r?Fe(t):t;return Ti(e,n,ko)}function Ti(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&&yl(i),xt===null&&dl(i)}e.wv=rf(),Nd(e,rr,r),vs()&&Ee!==null&&(Ee.f&1024)!==0&&(Ee.f&96)===0&&(or===null?Rb([e]):or.push(e)),!n.is_fork&&bs.size>0&&!bl&&Fd()}return t}function Fd(){bl=!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 Rr(e){I(e,e.v+1)}function Nd(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;xt?.delete(d),(l&65536)===0&&(l&512&&(Ee===null||(Ee.f&2097152)===0)&&(a.f|=ds),Nd(d,jn,r))}else if(c){var u=a;(l&16)!==0&&Nr!==null&&Nr.add(u),r!==null?r.push(u):ml(u)}}}}var Tb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Fe(e){if(typeof e!="object"||e===null||Fr in e)return e;const t=vo(e);if(t!==ld&&t!==Cy)return e;var r=new Map,n=fo(e),i=ee(0),s=null,o=tn,a=u=>{if(tn===o)return u();var h=Ae,f=tn;Rt(null),tf(o);var g=u();return Rt(h),tf(f),g};n&&r.set("length",ee(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,bd(i,`${l} version`);for(const[h,f]of r)bd(f,xb(l,h));c=!1}}return new Proxy(e,{defineProperty(u,h,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Zy();var g=r.get(h);return g===void 0?a(()=>{var m=ee(f.value,s);return r.set(h,m),m}):I(g,f.value,!0),!0},deleteProperty(u,h){var f=r.get(h);if(f===void 0){if(h in u){const g=a(()=>ee(ot,s));r.set(h,g),Rr(i)}}else I(f,ot),Rr(i);return!0},get(u,h,f){if(h===Fr)return e;var g=r.get(h),m=h in u;if(g===void 0&&(!m||Mr(u,h)?.writable)&&(g=a(()=>{var _=ee(Fe(m?u[h]:ot),s);return _}),r.set(h,g)),g!==void 0){var v=p(g);return v===ot?void 0:v}return Reflect.get(u,h,f)},getOwnPropertyDescriptor(u,h){var f=Reflect.getOwnPropertyDescriptor(u,h);if(f&&"value"in f){var g=r.get(h);g&&(f.value=p(g))}else if(f===void 0){var m=r.get(h),v=m?.v;if(m!==void 0&&v!==ot)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(u,h){if(h===Fr)return!0;var f=r.get(h),g=f!==void 0&&f.v!==ot||Reflect.has(u,h);return(f!==void 0||Ee!==null&&(!g||Mr(u,h)?.writable))&&(f===void 0&&(f=a(()=>{var m=ee(g?Fe(u[h]):ot,s);return m}),r.set(h,f)),p(f)===ot)?!1:g},set(u,h,f,g){var m=r.get(h),v=h in u;if(n&&h==="length")for(var _=f;_<m.v;_+=1){var E=r.get(_+"");E!==void 0?I(E,ot):_ in u&&(E=a(()=>ee(ot,s)),r.set(_+"",E))}if(m===void 0)(!v||Mr(u,h)?.writable)&&(m=a(()=>ee(void 0,s)),I(m,Fe(f)),r.set(h,m));else{v=m.v!==ot;var A=a(()=>Fe(f));I(m,A)}var T=Reflect.getOwnPropertyDescriptor(u,h);if(T?.set&&T.set.call(g,f),!v){if(n&&typeof h=="string"){var x=r.get("length"),O=Number(h);Number.isInteger(O)&&O>=x.v&&I(x,O+1)}Rr(i)}return!0},ownKeys(u){p(i);var h=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)&&h.push(f);return h},setPrototypeOf(){Wy()}})}function xb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Tb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function _s(e){try{if(e!==null&&typeof e=="object"&&Fr in e)return e[Fr]}catch{}return e}function Rd(e,t){return Object.is(_s(e),_s(t))}var Ab=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function V2(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return Ab.has(r)?function(...s){Eb();var o=i.apply(this,s);return Fd(),o}:i}})}function q2(){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){ol("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){ol("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){ol("array.includes(...)");break}}return a},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Ld,Ob,_l,zd,Ud;function wl(){if(Ld===void 0){Ld=window,Ob=document,_l=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;zd=Mr(t,"firstChild").get,Ud=Mr(t,"nextSibling").get,ud(e)&&(e[nl]=void 0,e[pd]=null,e[il]=void 0,e.__e=void 0),ud(r)&&(r[sl]=void 0)}}function Ft(e=""){return document.createTextNode(e)}function Ht(e){return zd.call(e)}function gr(e){return Ud.call(e)}function M(e,t){if(!be)return Ht(e);var r=Ht(xe);if(r===null)r=xe.appendChild(Ft());else if(t&&r.nodeType!==3){var n=Ft();return r?.before(n),dt(n),n}return t&&xo(r),dt(r),r}function V(e,t=!1){if(!be){var r=Ht(e);return r instanceof Comment&&r.data===""?gr(r):r}if(t){if(xe?.nodeType!==3){var n=Ft();return xe?.before(n),dt(n),n}xo(xe)}return xe}function Q(e,t=1,r=!1){let n=be?xe:e;for(var i;t--;)i=n,n=gr(n);if(!be)return n;if(r){if(n?.nodeType!==3){var s=Ft();return n===null?i?.after(s):n.before(s),dt(s),s}xo(n)}return dt(n),n}function kl(e){e.textContent=""}function Vd(){return!Wt||Nr!==null?!1:(Ee.f&tl)!==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 Cb(e=""){return document.createComment(e)}function xo(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 Db(e,t){if(t){const r=document.body;e.autofocus=!0,nr(()=>{document.activeElement===r&&e.focus()})}}function Ib(e){be&&Ht(e)!==null&&kl(e)}var qd=!1;function Bd(){qd||(qd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[fs]?.()})},{capture:!0}))}function Ao(e){var t=Ae,r=Ee;Rt(null),sr(null);try{return e()}finally{Rt(t),sr(r)}}function Oo(e,t,r,n=r){e.addEventListener(t,()=>Ao(r));const i=e[fs];i?e[fs]=()=>{i(),n(!0)}:e[fs]=()=>n(!0),Bd()}function jd(e){Ee===null&&(Ae===null&&Uy(e),zy()),en&&Ly(e)}function Pb(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|=el);var n={ctx:ze,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 ht(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&&Pb(i,r),Ae!==null&&(Ae.f&2)!==0&&(e&64)===0)){var s=Ae;(s.effects??=[]).push(i)}return n}function Sl(){return Ae!==null&&!yr}function Co(e){const t=ir(8,null);return it(t,tr),t.teardown=e,t}function me(e){jd("$effect");var t=Ee.f;if(!Ae&&(t&32)!==0&&ze!==null&&!ze.i){var r=ze;(r.e??=[]).push(e)}else return Zd(e)}function Zd(e){return ir(4|fd,e)}function El(e){return jd("$effect.pre"),ir(8|fd,e)}function ws(e){Si.ensure();const t=ir(64|yi,e);return()=>{ht(t)}}function $b(e){Si.ensure();const t=ir(64|yi,e);return(r={})=>new Promise(n=>{r.outro?Hn(t,()=>{ht(t),n(void 0)}):(ht(t),n(void 0))})}function Do(e){return ir(4,e)}function Mb(e){return ir($y|yi,e)}function xi(e,t=0){return ir(8|t,e)}function ae(e,t=[],r=[],n=[]){Dd(n,t,r,i=>{ir(8,()=>{e(...i.map(p))})})}function ks(e,t=0){var r=ir(16|t,e);return r}function Wd(e,t=0){var r=ir(Iy|t,e);return r}function Nt(e){return ir(32|yi,e)}function Hd(e){var t=e.teardown;if(t!==null){const r=en,n=Ae;Xd(!0),Rt(null);try{t.call(null)}finally{Xd(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&&Ao(()=>{i.abort(yo)});var n=r.next;(r.f&64)!==0?r.parent=null:ht(r,t),r=n}}function Fb(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&ht(t),t=r}}function ht(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Gd(e.nodes.start,e.nodes.end),r=!0),e.f|=dd,Tl(e,t&&!r),Es(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Hd(e),e.f^=dd,e.f|=Py;var i=e.parent;i!==null&&i.first!==null&&Kd(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Gd(e,t){for(;e!==null;){var r=e===t?null:gr(e);e.remove(),e=r}}function Kd(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=[];Yd(e,n,!0);var i=()=>{r&&ht(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function Yd(e,t,r){if((e.f&8192)===0){e.f^=el;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;Yd(i,t,o?r:!1)}i=s}}}function Io(e){Jd(e,!0)}function Jd(e,t){if((e.f&8192)!==0){e.f^=el,(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;Jd(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 xl(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 Nb=null,Po=!1,en=!1;function Xd(e){en=e}var Ae=null,yr=!1;function Rt(e){Ae=e}var Ee=null;function sr(e){Ee=e}var Lr=null;function Qd(e){Ae!==null&&(!Wt||(Ae.f&2)!==0)&&(Lr??=new Set).add(e)}var Lt=null,Gt=0,or=null;function Rb(e){or=e}var ef=1,Gn=0,tn=Gn;function tf(e){tn=e}function rf(){return++ef}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)&&Pd(s),s.wv>e.wv)return!0}(t&512)!==0&&xt===null&&it(e,tr)}return!1}function nf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Wt&&Lr!==null&&Lr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?nf(s,t,!1):t===s&&(r?it(s,rr):(s.f&1024)!==0&&it(s,jn),ml(s))}}function sf(e){var t=Lt,r=Gt,n=or,i=Ae,s=Lr,o=ze,a=yr,l=tn,c=e.f;Lt=null,Gt=0,or=null,Ae=(c&96)===0?e:null,Lr=null,_i(e.ctx),yr=!1,tn=++Gn,e.ac!==null&&(Ao(()=>{e.ac.abort(yo)}),e.ac=null);try{e.f|=hd;var d=e.fn,u=d();e.f|=tl;var h=e.deps,f=ke?.is_fork;if(Lt!==null){var g;if(f||Es(e,Gt),h!==null&&Gt>0)for(h.length=Gt+Lt.length,g=0;g<Lt.length;g++)h[Gt+g]=Lt[g];else e.deps=h=Lt;if(Sl()&&(e.f&512)!==0)for(g=Gt;g<h.length;g++)(h[g].reactions??=[]).push(e)}else!f&&h!==null&&Gt<h.length&&(Es(e,Gt),h.length=Gt);if(vs()&&or!==null&&!yr&&h!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)nf(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^=go),u}catch(m){return kd(m)}finally{e.f^=hd,Lt=t,Gt=r,or=n,Ae=i,Lr=s,_i(o),yr=a,tn=l}}function Lb(e,t){let r=t.reactions;if(r!==null){var n=Oy.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||!ho.call(Lt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~ds),s.v!==ot&&dl(s),Sb(s),Es(s,0)}}function Es(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Lb(e,r[n])}function Ai(e){var t=e.f;if((t&16384)===0){it(e,tr);var r=Ee,n=Po;if(Ee=e,Po=!0,0)var i,s;try{(t&16777232)!==0?Fb(e):Tl(e),Hd(e);var o=sf(e);if(e.teardown=typeof o=="function"?o:null,e.wv=ef,0)for(var a of e.deps);}finally{Po=n,Ee=r}}}async function of(){if(Wt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),y()}function p(e){var t=(e.f&2)!==0;if(Nb?.add(e),Ae!==null&&!yr&&!(Ee!==null&&(Ee.f&16384)!==0)&&(Lr===null||!Lr.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??=[],ho.call(Ae.deps,e)||Ae.deps.push(e);var n=e.reactions;n===null?e.reactions=[Ae]:ho.call(n,Ae)||n.push(Ae)}}if(0){if(!yr&&_b&&!_b.warned&&(_b.effect.f&2097152)===0&&!_b.effect_deps.has(e))var i;if(E2&&!yr&&O2!==null&&Ae!==null&&O2.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||lf(a))&&(l=yl(a)),Wn.set(a,l),l}var c=(a.f&512)===0&&!yr&&Ae!==null&&(Po||(Ae.f&512)!==0),d=(a.f&tl)===0;Ss(a)&&(c&&(a.f|=512),Pd(a)),c&&!d&&($d(a),af(a))}if(xt?.has(e))return xt.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function af(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&&($d(t),af(t))}function lf(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&&lf(t))return!0;return!1}function Ue(e){var t=yr;try{return yr=!0,e()}finally{yr=t}}function zb(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Fr in e)Al(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Fr in r&&Al(r)}}}function Al(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{Al(e[n],t)}catch{}const r=vo(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=ad(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Ts=Symbol("events"),uf=new Set,Ol=new Set;function Cl(e,t,r,n={}){function i(s){if(n.capture||Il.call(t,s),!s.cancelBubble)return Ao(()=>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 pt(e,t,r,n={}){var i=Cl(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Dl(e,t,r,n,i){var s={capture:n,passive:i},o=Cl(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Co(()=>{t.removeEventListener(e,o,s)})}function At(e,t,r){(t[Ts]??={})[e]=r}function zr(e){for(var t=0;t<e.length;t++)uf.add(e[t]);for(var r of Ol)r(e)}var cf=null;function Il(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;cf=e;var o=0,a=cf===e&&e[Ts];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[Ts]=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 h,f=[];s!==null&&s!==t;){try{var g=s[Ts]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){h?f.push(m):h=m}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(h){for(let m of f)queueMicrotask(()=>{throw m});throw h}}finally{e[Ts]=t,delete e.currentTarget,Rt(d),sr(u)}}}var Ub=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function df(e){return Ub?.createHTML(e)??e}function Vb(e){var t=To("template");return t.innerHTML=df(e.replaceAll("<!>","<!---->")),t.content}function br(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(be)return br(xe,null),xe;i===void 0&&(i=Vb(s?e:"<!>"+e),r||(i=Ht(i)));var o=n||_l?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Ht(o),l=o.lastChild;br(a,l)}else br(o,o);return o}}function zt(e=""){if(!be){var t=Ft(e+"");return br(t,t),t}var r=xe;return r.nodeType!==3?(r.before(r=Ft()),dt(r)):xo(r),br(r,r),r}function X(){if(be)return br(xe,null),xe;var e=document.createDocumentFragment(),t=document.createComment(""),r=Ft();return e.append(t,r),br(t,r),e}function S(e,t){if(be){var r=Ee;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=xe),Qr();return}e!==null&&e.before(t)}function mt(){if(be&&xe&&xe.nodeType===8&&xe.textContent?.startsWith("$")){const e=xe.textContent.substring(1);return Qr(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var qb=/\r/g;function Bb(e){e=e.replace(qb,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function jb(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var Zb=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Wb(e){return Zb.includes(e)}var Hb=["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"],Gb={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 Kb(e){return e=e.toLowerCase(),Gb[e]??e}var B2=[...Hb,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],Yb=["touchstart","touchmove"];function Jb(e){return Yb.includes(e)}var Xb=["$state","$state.raw","$derived","$derived.by"],j2=[...Xb,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function Qb(e){return e?.replace(/\//g,"/")}var ff=!0;function ne(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[sl]??=e.nodeValue)&&(e[sl]=r,e.nodeValue=`${r}`)}function hf(e,t){return pf(e,t)}function e_(e,t){wl(),t.intro=t.intro??!1;const r=t.target,n=be,i=xe;try{for(var s=Ht(r);s&&(s.nodeType!==8||s.data!=="[");)s=gr(s);if(!s)throw Bn;gt(!0),dt(s);const o=pf(e,{...t,anchor:s});return gt(!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&&qy(),wl(),kl(r),gt(!1),hf(e,t)}finally{gt(n),dt(i)}}var $o=new Map;function pf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){wl();var l=void 0,c=$b(()=>{var d=r??t.appendChild(Ft());gb(d,{pending:()=>{}},f=>{te({});var g=ze;if(s&&(g.c=s),i&&(n.$$events=i),be&&br(f,null),ff=o,l=e(f,n)||{},ff=!0,be&&(Ee.nodes.end=xe,xe===null||xe.nodeType!==8||xe.data!=="]"))throw ps(),Bn;re()},a);var u=new Set,h=f=>{for(var g=0;g<f.length;g++){var m=f[g];if(!u.has(m)){u.add(m);var v=Jb(m);for(const A of[t,document]){var _=$o.get(A);_===void 0&&(_=new Map,$o.set(A,_));var E=_.get(m);E===void 0?(A.addEventListener(m,Il,{passive:v}),_.set(m,1)):_.set(m,E+1)}}}};return h(po(uf)),Ol.add(h),()=>{for(var f of u)for(const v of[t,document]){var g=$o.get(v),m=g.get(f);--m==0?(v.removeEventListener(f,Il),g.delete(f),g.size===0&&$o.delete(v)):g.set(f,m)}Ol.delete(h),d!==r&&d.parentNode?.removeChild(d)}});return Pl.set(l,c),l}var Pl=new WeakMap;function t_(e,t){const r=Pl.get(e);return r?(Pl.delete(e),r(t)):Promise.resolve()}var $l=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)Io(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&(Io(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&&(ht(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();xl(s,a),a.append(Ft()),this.#r.set(i,{effect:s,fragment:a})}else ht(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)||(ht(n.effect),this.#r.delete(r))};ensure(e,t){var r=ke,n=Vd();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 be&&(this.anchor=xe),this.#s(r)}};function _e(e,t,...r){var n=new $l(e);ks(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},us)}if(0)var SF;function rn(e){ze===null&&md("onMount"),bi&&ze.l!==null?r_(ze).m.push(e):me(()=>{const t=Ue(e);if(typeof t=="function")return t})}function r_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function n_(){return Symbol(Ay)}function ce(e,t,r=!1){var n;be&&(n=xe,Qr());var i=new $l(e),s=r?us:0;function o(a,l){if(be){var c=al(n);if(a!==parseInt(c.substring(1))){var d=ms();dt(d),i.anchor=d,gt(!1),i.ensure(a,l),gt(!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 i_(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 h=e.outrogroups;Ml(e,po(s.done)),h.delete(s),h.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;kl(d),d.append(c),e.items.clear()}Ml(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Ml(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,xl(s,document.createDocumentFragment())):ht(t[i],r)}}var mf;function Ve(e,t,r,n,i,s=null){var o=e,a=new Map;if((t&4)!==0){var l=e;o=be?dt(Ht(l)):l.appendChild(Ft())}be&&Qr();var c=null,d=gl(()=>{var _=r();return fo(_)?_:_==null?[]:po(_)}),u,h=new Map,f=!0;function g(_){(v.effect.f&16384)===0&&(v.pending.delete(_),v.fallback=c,s_(v,u,o,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?Io(c):(c.f^=cs,As(c,null,o)):Hn(c,()=>{c=null})))}function m(_){v.pending.delete(_)}var v={effect:ks(()=>{u=p(d);var _=u.length;let E=!1;be&&al(o)==="[!"!=(_===0)&&(o=ms(),dt(o),gt(!1),E=!0);for(var A=new Set,T=ke,x=Vd(),O=0;O<_;O+=1){be&&xe.nodeType===8&&xe.data==="]"&&(o=xe,E=!0,gt(!1));var $=u[O],L=n($,O);if(0)var G;var N=f?null:a.get(L);N?(N.v&&Ti(N.v,$),N.i&&Ti(N.i,O),x&&T.unskip_effect(N.e)):(N=o_(a,f?o:mf??=Ft(),$,L,O,i,t,r),f||(N.e.f|=cs),a.set(L,N)),A.add(L)}if(_===0&&s&&!c&&(f?c=Nt(()=>s(o)):(c=Nt(()=>s(mf??=Ft())),c.f|=cs)),_>A.size&&vd("","",""),be&&_>0&&dt(ms()),!f)if(h.set(T,A),x){for(const[se,q]of a)A.has(se)||T.skip_effect(q.e);T.oncommit(g),T.ondiscard(m)}else g(T);E&>(!0),p(d)}),flags:t,items:a,pending:h,outrogroups:null,fallback:c};f=!1,be&&(o=xe)}function xs(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function s_(e,t,r,n,i){var s=(n&8)!==0,o=t.length,a=e.items,l=xs(e.effect.first),c,d=null,u,h=[],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&&(Io(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 E=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,E),As(v,E,r),d=v,h=[],f=[],l=xs(d.next);continue}if(v!==l){if(c!==void 0&&c.has(v)){if(h.length<f.length){var A=f[0],T;d=A.prev;var x=h[0],O=h[h.length-1];for(T=0;T<h.length;T+=1)As(h[T],A,r);for(T=0;T<f.length;T+=1)c.delete(f[T]);kn(e,x.prev,O.next),kn(e,d,x),kn(e,O,A),l=A,d=O,_-=1,h=[],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(h=[],f=[];l!==null&&l!==v;)(c??=new Set).add(l),f.push(l),l=xs(l.next);if(l===null)continue}(v.f&33554432)===0&&h.push(v),d=v,l=xs(v.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Ml(e,po(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=xs(l.next);var L=$.length;if(L>0){var G=(n&4)!==0&&o===0?r:null;if(s){for(_=0;_<L;_+=1)$[_].nodes?.a?.measure();for(_=0;_<L;_+=1)$[_].nodes?.a?.fix()}i_(e,$,G)}}s&&nr(()=>{if(u!==void 0)for(v of u)v.nodes?.a?.apply()})}function o_(e,t,r,n,i,s,o,a){var l=(o&1)!==0?(o&16)===0?Md(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 Z2(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),vd(o,a,l)}r.set(s,i)}}function W2(e,t,r){if(!t||t===Bb(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:ul?.[Xa]&&(n=`in ${ul[Xa]}`),Jy(Qb(n))}function a_(e,t,r=!1,n=!1,i=!1,s=!1){var o=e,a="";if(r){var l=e;be&&(o=dt(Ht(l)))}ae(()=>{var c=Ee;if(a===(a=t()??"")){be&&Qr();return}if(r&&!be){c.nodes=null,l.innerHTML=a,a!==""&&br(Ht(l),l.lastChild);return}if(c.nodes!==null&&(Gd(c.nodes.start,c.nodes.end),c.nodes=null),a!==""){if(be){for(var d=xe.data,u=Qr(),h=u;u!==null&&(u.nodeType!==8||u.data!=="");)h=u,u=gr(u);if(u===null)throw ps(),Bn;br(xe,h),o=dt(u);return}var f=To(n?"svg":i?"math":"template",n?Ty:i?xy:void 0);f.innerHTML=a;var g=n||i?f:f.content;if(br(Ht(g),g.lastChild),n||i)for(;Ht(g);)o.before(Ht(g));else o.before(g)}})}function l_(e,t,r,n,i){be&&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;be&&(n=xe,Qr());var i=new $l(e);ks(()=>{var s=t()??null;if(be&&al(n)==="["!=(s!==null)){var o=ms();dt(o),i.anchor=o,gt(!1),i.ensure(s,s&&(a=>r(a,s))),gt(!0);return}i.ensure(s,s&&(a=>r(a,s)))},us)}function u_(e,t){var r=void 0,n;Wd(()=>{r!==(r=t())&&(n&&(ht(n),n=null),r&&(n=Nt(()=>{Do(()=>r(e))})))})}function vf(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=vf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Mo(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=vf(e))&&(n&&(n+=" "),n+=t);return n}function _r(e){return typeof e=="object"?Mo(e):e??""}var gf=[...`
|
|
12
|
+
\r\f \v\uFEFF`];function c_(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||gf.includes(n[o-1]))&&(a===n.length||gf.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function yf(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 d_(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 h=e[u];if(a?h==="/"&&e[u-1]==="*"&&(a=!1):s?s===h&&(s=!1):h==="/"&&e[u+1]==="*"?a=!0:h==='"'||h==="'"?s=h:h==="("?o++:h===")"&&o--,!a&&s===!1&&o===0){if(h===":"&&d===-1)d=u;else if(h===";"||u===m-1){if(d!==-1){var f=Fl(e.substring(c,d).trim());if(!l.includes(f)){h!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,d=-1}}}}return n&&(r+=yf(n)),i&&(r+=yf(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[nl];if(be||o!==r||o===void 0){var a=c_(r,n,s);(!be||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[nl]=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 f_(e,t,r,n){var i=e[il];if(be||i!==t){var s=d_(t,n);(!be||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[il]=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 Fo(e,t,r=!1){if(e.multiple){if(t==null)return;if(!fo(t))return Xy();for(var n of e.options)n.selected=t.includes(Os(n));return}for(n of e.options)if(Rd(Os(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function bf(e){var t=new MutationObserver(()=>{Fo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Co(()=>{t.disconnect()})}function h_(e,t,r=t){var n=new WeakSet,i=!0;Oo(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)}),Do(()=>{var s=t();if(e===document.activeElement){var o=Wt?gs:ke;if(n.has(o))return}if(Fo(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=Os(a),r(s))}e.__value=s,i=!1}),bf(e)}function Os(e){return"__value"in e?e.__value:e.value}var Cs=Symbol("class"),Ds=Symbol("style"),_f=Symbol("is custom element"),wf=Symbol("is html"),p_=hs?"link":"LINK",kf=hs?"input":"INPUT",m_=hs?"option":"OPTION",v_=hs?"select":"SELECT",g_=hs?"progress":"PROGRESS";function No(e){if(be){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;we(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;we(e,"checked",null),e.checked=i}}};e[fs]=r,nr(r),Bd()}}function Sf(e,t){var r=Ro(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==g_)||(e.value=t??"")}function y_(e,t){var r=Ro(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Rl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function we(e,t,r,n){var i=Ro(e);if(be&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===p_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[My]=r),r==null?e.removeAttribute(t):typeof r!="string"&&zl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Kn(e,t,r){var n=Ae,i=Ee;let s=be;be&>(!1),Rt(null),sr(null);try{t!=="style"&&(Ll.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?zl(e).includes(t):r&&typeof r=="object")?e[t]=r:we(e,t,r==null?r:String(r))}finally{Rt(n),sr(i),s&>(!0)}}function b_(e,t,r,n,i=!1,s=!1){if(be&&i&&e.nodeName===kf){var o=e;(o.type==="checkbox"?"defaultChecked":"defaultValue")in r||No(o)}var a=Ro(e),l=a[_f],c=!a[wf];let d=be&&l;d&>(!1);var u=t||{},h=e.nodeName===m_;for(var f in t)f in r||(r[f]=null);r.class?r.class=_r(r.class):(n||r[Cs])&&(r.class=null),r[Ds]&&(r.style??=null);var g=zl(e);if(e.nodeName===kf&&"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,we(e,"type",m,s))}for(const O in r){let $=r[O];if(h&&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"){f_(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 L={},G="$$"+O;let N=O.slice(2);var E=Wb(N);if(jb(N)&&(N=N.slice(0,-7),L.capture=!0),!E&&v){if($!=null)continue;e.removeEventListener(N,u[G],L),u[G]=null}if(E)At(N,e,$),zr([N]);else if($!=null){let se=function(q){u[O].call(this,q)};var x=se;u[G]=Cl(N,e,se,L)}}else if(O==="style")we(e,O,$);else if(O==="autofocus")Db(e,!!$);else if(!l&&(O==="__value"||O==="value"&&$!=null))e.value=e.__value=$;else if(O==="selected"&&h)Rl(e,$);else{var A=O;c||(A=Kb(A));var T=A==="defaultValue"||A==="defaultChecked";if($==null&&!l&&!T)if(a[O]=null,A==="value"||A==="checked"){let L=e;const G=t===void 0;if(A==="value"){let N=L.defaultValue;L.removeAttribute(A),L.defaultValue=N,L.value=L.__value=G?N:null}else{let N=L.defaultChecked;L.removeAttribute(A),L.defaultChecked=N,L.checked=G?N:!1}}else e.removeAttribute(O);else T||g.includes(A)&&(l||typeof $!="string")?(e[A]=$,A in a&&(a[A]=ot)):typeof $!="function"&&we(e,A,$,s)}}}return d&>(!0),u}function Ne(e,t,r=[],n=[],i=[],s,o=!1,a=!1){Dd(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===v_,h=!1;if(Wd(()=>{var g=t(...l.map(p)),m=b_(e,c,g,s,o,a);h&&u&&"value"in g&&Fo(e,g.value);for(let _ of Object.getOwnPropertySymbols(d))g[_]||ht(d[_]);for(let _ of Object.getOwnPropertySymbols(g)){var v=g[_];_.description==="@attach"&&(!c||v!==c[_])&&(d[_]&&ht(d[_]),d[_]=Nt(()=>u_(e,()=>v))),m[_]=v}c=m}),u){var f=e;Do(()=>{Fo(f,c.value,!0),bf(f)})}h=!0})}function Ro(e){return e[pd]??={[_f]:e.nodeName.includes("-"),[wf]:e.namespaceURI===Ey}}var Ll=new Map;function zl(e){var t=e.getAttribute("is")||e.nodeName,r=Ll.get(t);if(r)return r;Ll.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=ad(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=vo(i)}return r}function H2(e,t,r){}function Ul(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Ef(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function __(e,t){var r=Ef(e.srcset),n=Ef(t);return n.length===r.length&&n.every(([i,s],o)=>s===r[o][1]&&(Ul(r[o][0],i)||Ul(i,r[o][0])))}var Vl=null;function w_(){if(Vl===null){var e=To("select");e.innerHTML=df("<option><span>t</span></option>"),Vl=e.firstChild?.firstChild?.nodeType===1}return Vl}function k_(e,t){var r=be;w_()||(gt(!1),e.textContent="",e.append(Cb("")));try{t()}finally{r&&(be?P(e):(gt(!0),dt(e)))}}function Lo(e,t,r=t){var n=new WeakSet;Oo(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Bl(e)?jl(s):s,r(s),ke!==null&&n.add(ke),await of(),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))}}}),(be&&e.defaultValue!==e.value||Ue(t)==null&&e.value)&&(r(Bl(e)?jl(e.value):e.value),ke!==null&&n.add(ke)),xi(()=>{var i=t();if(e===document.activeElement){var s=Wt?gs:ke;if(n.has(s))return}Bl(e)&&i===jl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var ql=new Set;function S_(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),Oo(r,"change",()=>{var c=r.__value;s&&(c=Tf(o,c,r.checked)),i(c)},()=>i(s?[]:null)),xi(()=>{var c=n();if(be&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Rd(r.__value,c)}),Co(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),ql.has(o)||(ql.add(o),nr(()=>{o.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),ql.delete(o)})),nr(()=>{if(a){var c;s?c=Tf(o,c,r.checked):c=o.find(d=>d.checked)?.__value,i(c)}})}function E_(e,t,r=t){Oo(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(be&&e.defaultChecked!==e.checked||Ue(t)==null)&&r(e.checked),xi(()=>{var n=t();e.checked=!!n})}function Tf(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 Bl(e){var t=e.type;return t==="number"||t==="range"}function jl(e){return e===""?null:+e}function Zl(e,t){return e===t||e?.[Fr]===t}function xf(e={},t,r,n){var i=ze.r,s=Ee;return Do(()=>{var o,a;return xi(()=>{o=a,a=n?.()||[],Ue(()=>{Zl(r(...a),e)||(t(e,...a),o&&Zl(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&&Zl(r(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function Wl(e=!1){const t=ze,r=t.l.u;if(!r)return;let n=()=>zb(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=()=>p(o)}r.b.length&&El(()=>{Af(t,n),Qa(r.b)}),me(()=>{const i=Ue(()=>r.m.map(Dy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&me(()=>{Af(t,n),Qa(r.a)})}function Af(e,t){if(e.l.s)for(const r of e.l.s)p(r);t()}var T_={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},T_)}var x_={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=Mr(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=Mr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Fr||t===rl)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},x_)}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),p(c)):(l&&(l=!1,a=o?Ue(n):n),a);let u;if(s){var h=Fr in e||rl in e;u=Mr(e,t)?.set??(h&&t in e?T=>e[t]=T:void 0)}var f,g=!1;s?[f,g]=hb(()=>e[t]):f=e[t],f===void 0&&n!==void 0&&(f=d(),u&&(i&&By(t),u(f)));var m;if(i?m=()=>{var T=e[t];return T===void 0?d():(l=!0,T)}:m=()=>{var T=e[t];return T!==void 0&&(a=void 0),T===void 0?a:T},i&&(r&4)===0)return m;if(u){var v=e.$$legacy;return(function(T,x){return arguments.length>0?((!i||!x||v||g)&&u(x?m():T),T):m()})}var _=!1,E=((r&1)!==0?Ei:gl)(()=>(_=!1,m()));s&&p(E);var A=Ee;return(function(T,x){if(arguments.length>0){const O=x?p(E):i&&s?Fe(T):T;return I(E,O),_=!0,a!==void 0&&(a=O),T}return en&&_||(A.f&16384)!==0?E.v:p(E)})}function A_(e){return new O_(e)}var O_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var o=Md(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return p(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===rl?!0:(p(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?e_:hf)(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=()=>{t_(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()}},Of;typeof HTMLElement=="function"&&(Of=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),S(s,o)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=C_(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]=zo(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=A_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ws(()=>{xi(()=>{this.$$r=!0;for(const i of mo(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=zo(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]=zo(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 mo(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function zo(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 C_(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 Of{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return mo(t).map(a=>(t[a].attribute||a).toLowerCase())}};return mo(t).forEach(a=>{bn(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=zo(a,l,t),this.$$d[a]=l;var c=this.$$c;c&&(Mr(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 Cf={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:P_,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:$_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},D_={...Cf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function I_(e){return e==="angular"?Cf:D_}function P_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function $_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function M_(e){return new Promise(t=>setTimeout(t,e))}function Df(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function F_(e){return typeof e=="boolean"}function Hl(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 Gl=Array.isArray,If=e=>!!e&&e.constructor===Object,N_=e=>typeof e=="string"||e instanceof String,R_=e=>{try{return Number(e)===e}catch{return!1}},L_=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Pf=(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 z_=(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 U_(e,t){const r=t??(n=>n);return Pf(e,(n,i)=>r(n)>r(i)?n:i)}function Kl(e,t){const r=t??(n=>n);return Pf(e,(n,i)=>r(n)<r(i)?n:i)}var V_=(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)},$f=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},q_=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},wt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:If(e[n])?wt(e[n],i):i}),{}),Mf=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&&Df(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Df(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(!(If(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)}},B_=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}},Ff;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 h=d[u];h in a||(a[h]=c[h].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.")}},Nf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Ff=globalThis).__zod_globalConfig??(Ff.__zod_globalConfig={});var Uo=globalThis.__zod_globalConfig;function Yn(e){return e&&Object.assign(Uo,e),Uo}function Rf(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 Yl(e,t){return typeof t=="bigint"?t.toString():t}function Jl(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function Xl(e){return e==null}function Ql(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function j_(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 Lf=Symbol("evaluating");function qe(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Lf)return n===void 0&&(n=Lf,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 Tn(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function zf(e){return JSON.stringify(e)}function Z_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Uf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var W_=Jl(()=>{if(Uo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Is(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 Vf(e){return Is(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var H_=new Set(["string","number","symbol"]);function qo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ye(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 G_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var K_={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 Y_(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 xn(e,Tn(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 J_(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 xn(e,Tn(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 X_(e,t){if(!Is(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 xn(e,Tn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Jn(this,"shape",n),n}}))}function Q_(e,t){if(!Is(t))throw new Error("Invalid input to safeExtend: expected a plain object");return xn(e,Tn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Jn(this,"shape",r),r}}))}function ew(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return xn(e,Tn(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 tw(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 xn(t,Tn(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 rw(e,t,r){return xn(t,Tn(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 nw(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 qf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Bo(e){return typeof e=="string"?e:e?.message}function Xn(e,t,r){const n=e.message?e.message:Bo(e.inst?._zod.def?.error?.(e))??Bo(t?.error?.(e))??Bo(r.customError?.(e))??Bo(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 eu(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ps(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Bf=(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,Yl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},jf=W("$ZodError",Bf),Zf=W("$ZodError",Bf,{Parent:Error});function iw(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 sw(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 tu=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 Uf(a,i?.callee),a}return o.value},ru=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 Uf(a,i?.callee),a}return o.value},jo=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??jf)(s.issues.map(o=>Xn(o,i,Yn())))}:{success:!0,data:s.value}},ow=jo(Zf),Zo=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}},aw=Zo(Zf),lw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return tu(e)(t,r,i)},uw=e=>(t,r,n)=>tu(e)(t,r,n),cw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return ru(e)(t,r,i)},dw=e=>async(t,r,n)=>ru(e)(t,r,n),fw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return jo(e)(t,r,i)},hw=e=>(t,r,n)=>jo(e)(t,r,n),pw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Zo(e)(t,r,i)},mw=e=>async(t,r,n)=>Zo(e)(t,r,n),vw=/^[cC][0-9a-z]{6,}$/,gw=/^[0-9a-z]+$/,yw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,bw=/^[0-9a-vA-V]{20}$/,_w=/^[A-Za-z0-9]{27}$/,ww=/^[a-zA-Z0-9_-]{21}$/,kw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Sw=/^([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})$/,Wf=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)$/,Ew=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Tw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xw(){return new RegExp(Tw,"u")}var Aw=/^(?:(?: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])$/,Ow=/^(([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}|:))$/,Cw=/^((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])$/,Dw=/^(([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])$/,Iw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hf=/^[A-Za-z0-9_-]*$/,Pw=/^https?$/,$w=/^\+[1-9]\d{6,14}$/,Gf="(?:(?:\\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])))",Mw=new RegExp(`^${Gf}$`);function Kf(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 Fw(e){return new RegExp(`^${Kf(e)}$`)}function Nw(e){const t=Kf({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(`^${Gf}T(?:${n})$`)}var Rw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Lw=/^-?\d+$/,zw=/^-?\d+(?:\.\d+)?$/,Uw=/^[^A-Z]*$/,Vw=/^[^a-z]*$/,Ut=W("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Yf={number:"number",bigint:"bigint",object:"date"},Jf=W("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=Yf[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})}}),Xf=W("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=Yf[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})}}),qw=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):j_(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})}}),Bw=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]=K_[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=Lw)}),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})}}),jw=W("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Xl(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=eu(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Zw=W("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Xl(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=eu(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Ww=W("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Xl(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=eu(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})}}),Wo=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=()=>{})}),Hw=W("$ZodCheckRegex",(e,t)=>{Wo.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})}}),Gw=W("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Uw),Wo.init(e,t)}),Kw=W("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Vw),Wo.init(e,t)}),Yw=W("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=qo(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})}}),Jw=W("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${qo(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})}}),Xw=W("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${qo(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})}}),Qw=W("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),e0=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
|
-
`))}},
|
|
15
|
-
if (${
|
|
14
|
+
`))}},t0={major:4,minor:4,patch:3},at=W("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=t0;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(nw(o)||!u._zod.def.when(o))continue}else if(c)continue;const h=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!==h&&(c||(c=Ci(o,h)))});else{if(o.issues.length===h)continue;c||(c=Ci(o,h))}}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)}}qe(e,"~standard",()=>({validate:i=>{try{const s=ow(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return aw(e,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),nu=W("$ZodString",(e,t)=>{at.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Rw(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}}),Ke=W("$ZodStringFormat",(e,t)=>{Wo.init(e,t),nu.init(e,t)}),r0=W("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Sw),Ke.init(e,t)}),n0=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=Wf(r))}else t.pattern??(t.pattern=Wf());Ke.init(e,t)}),i0=W("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ew),Ke.init(e,t)}),s0=W("$ZodURL",(e,t)=>{Ke.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===Pw.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})}}}),o0=W("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=xw()),Ke.init(e,t)}),a0=W("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ww),Ke.init(e,t)}),l0=W("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vw),Ke.init(e,t)}),u0=W("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=gw),Ke.init(e,t)}),c0=W("$ZodULID",(e,t)=>{t.pattern??(t.pattern=yw),Ke.init(e,t)}),d0=W("$ZodXID",(e,t)=>{t.pattern??(t.pattern=bw),Ke.init(e,t)}),f0=W("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=_w),Ke.init(e,t)}),h0=W("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Nw(t)),Ke.init(e,t)}),p0=W("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Mw),Ke.init(e,t)}),m0=W("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Fw(t)),Ke.init(e,t)}),v0=W("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=kw),Ke.init(e,t)}),g0=W("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Aw),Ke.init(e,t),e._zod.bag.format="ipv4"}),y0=W("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ow),Ke.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})}}}),b0=W("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Cw),Ke.init(e,t)}),_0=W("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Dw),Ke.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 Qf(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var w0=W("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Iw),Ke.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Qf(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function k0(e){if(!Hf.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return Qf(t.padEnd(Math.ceil(t.length/4)*4,"="))}var S0=W("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Hf),Ke.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{k0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),E0=W("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$w),Ke.init(e,t)});function T0(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 x0=W("$ZodJWT",(e,t)=>{Ke.init(e,t),e._zod.check=r=>{T0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),eh=W("$ZodNumber",(e,t)=>{at.init(e,t),e._zod.pattern=e._zod.bag.pattern??zw,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}}),A0=W("$ZodNumberFormat",(e,t)=>{Bw.init(e,t),eh.init(e,t)}),O0=W("$ZodUnknown",(e,t)=>{at.init(e,t),e._zod.parse=r=>r}),C0=W("$ZodNever",(e,t)=>{at.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function th(e,t,r){e.issues.length&&t.issues.push(...qf(r,e.issues)),t.value[r]=e.value}var D0=W("$ZodArray",(e,t)=>{at.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=>th(c,r,o))):th(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function Ho(e,t,r,n,i,s){const o=r in n;if(e.issues.length){if(i&&s&&!o)return;t.issues.push(...qf(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 rh(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=G_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function nh(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 h in t){if(h==="__proto__"||a.has(h))continue;if(c==="never"){o.push(h);continue}const f=l.run({value:t[h],issues:[]},n);f instanceof Promise?e.push(f.then(g=>Ho(g,r,h,t,d,u))):Ho(f,r,h,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 I0=W("$ZodObject",(e,t)=>{if(at.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=Jl(()=>rh(t));qe(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=Vo,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 h=d[u],f=h._zod.optin==="optional",g=h._zod.optout==="optional",m=h._zod.run({value:l[u],issues:[]},a);m instanceof Promise?c.push(m.then(v=>Ho(v,o,u,l,f,g))):Ho(m,o,u,l,f,g)}return i?nh(c,l,o,a,r.value,e):c.length?Promise.all(c).then(()=>o):o}}),P0=W("$ZodObjectJIT",(e,t)=>{I0.init(e,t);const r=e._zod.parse,n=Jl(()=>rh(t)),i=h=>{const f=new e0(["shape","payload","ctx"]),g=n.value,m=A=>{const T=zf(A);return`shape[${T}]._zod.run({ value: input[${T}], 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 T=v[A],x=zf(A),O=h[A],$=O?._zod?.optin==="optional",L=O?._zod?.optout==="optional";f.write(`const ${T} = ${m(A)};`),$&&L?f.write(`
|
|
15
|
+
if (${T}.issues.length) {
|
|
16
16
|
if (${x} in input) {
|
|
17
|
-
payload.issues = payload.issues.concat(${
|
|
17
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
18
18
|
...iss,
|
|
19
19
|
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
20
20
|
})));
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
if (${
|
|
24
|
+
if (${T}.value === undefined) {
|
|
25
25
|
if (${x} in input) {
|
|
26
26
|
newResult[${x}] = undefined;
|
|
27
27
|
}
|
|
28
28
|
} else {
|
|
29
|
-
newResult[${x}] = ${
|
|
29
|
+
newResult[${x}] = ${T}.value;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
`):$?f.write(`
|
|
33
|
-
if (${
|
|
34
|
-
payload.issues = payload.issues.concat(${
|
|
33
|
+
if (${T}.issues.length) {
|
|
34
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
35
35
|
...iss,
|
|
36
36
|
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
37
37
|
})));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
if (${
|
|
40
|
+
if (${T}.value === undefined) {
|
|
41
41
|
if (${x} in input) {
|
|
42
42
|
newResult[${x}] = undefined;
|
|
43
43
|
}
|
|
44
44
|
} else {
|
|
45
|
-
newResult[${x}] = ${
|
|
45
|
+
newResult[${x}] = ${T}.value;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
`):f.write(`
|
|
49
|
-
const ${
|
|
50
|
-
if (${
|
|
51
|
-
payload.issues = payload.issues.concat(${
|
|
49
|
+
const ${T}_present = ${x} in input;
|
|
50
|
+
if (${T}.issues.length) {
|
|
51
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
52
52
|
...iss,
|
|
53
53
|
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
54
54
|
})));
|
|
55
55
|
}
|
|
56
|
-
if (!${
|
|
56
|
+
if (!${T}_present && !${T}.issues.length) {
|
|
57
57
|
payload.issues.push({
|
|
58
58
|
code: "invalid_type",
|
|
59
59
|
expected: "nonoptional",
|
|
@@ -62,24 +62,24 @@ ${i}
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
if (${
|
|
66
|
-
if (${
|
|
65
|
+
if (${T}_present) {
|
|
66
|
+
if (${T}.value === undefined) {
|
|
67
67
|
newResult[${x}] = undefined;
|
|
68
68
|
} else {
|
|
69
|
-
newResult[${x}] = ${
|
|
69
|
+
newResult[${x}] = ${T}.value;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");const T=f.compile();return(A,E)=>T(h,A,E)};let s;const o=Uo,a=!zo.jitless,c=a&&Z_.value,d=t.catchall;let u;e._zod.parse=(h,f)=>{u??(u=n.value);const g=h.value;return o(g)?a&&c&&f?.async===!1&&f.jitless!==!0?(s||(s=i(t.shape)),h=s(h,f),d?rh([],g,h,f,u,e):h):r(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function nh(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=>!Oi(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=>Jn(o,n,Kn())))}),t)}var P0=Z("$ZodUnion",(e,t)=>{at.init(e,t),Be(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Be(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=>Xl(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=>nh(a,n,e,i)):nh(o,n,e,i)}}),$0=Z("$ZodIntersection",(e,t)=>{at.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])=>ih(r,a,l)):ih(r,s,o)}});function nu(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(Ds(e)&&Ds(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=nu(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=nu(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 ih(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}),Oi(e))return e;const o=nu(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 M0=Z("$ZodEnum",(e,t)=>{at.init(e,t);const r=Nf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>W_.has(typeof i)).map(i=>typeof i=="string"?Vo(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}}),F0=Z("$ZodTransform",(e,t)=>{at.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ff(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 Ai;return r.value=i,r.fallback=!0,r}});function sh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var oh=Z("$ZodOptional",(e,t)=>{at.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Xl(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=>sh(o,i)):sh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),N0=Z("$ZodExactOptional",(e,t)=>{oh.init(e,t),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),R0=Z("$ZodNullable",(e,t)=>{at.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Xl(r.source)}|null)$`):void 0}),Be(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)}),L0=Z("$ZodDefault",(e,t)=>{at.init(e,t),e._zod.optin="optional",Be(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=>ah(s,t)):ah(i,t)}});function ah(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var z0=Z("$ZodPrefault",(e,t)=>{at.init(e,t),e._zod.optin="optional",Be(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))}),U0=Z("$ZodNonOptional",(e,t)=>{at.init(e,t),Be(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=>lh(s,e)):lh(i,e)}});function lh(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 V0=Z("$ZodCatch",(e,t)=>{at.init(e,t),e._zod.optin="optional",Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(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=>Jn(o,n,Kn()))},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=>Jn(s,n,Kn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),B0=Z("$ZodPipe",(e,t)=>{at.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),Be(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=>Ho(o,t.in,n)):Ho(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Ho(s,t.out,n)):Ho(i,t.out,n)}});function Ho(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 q0=Z("$ZodReadonly",(e,t)=>{at.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType?._zod?.optin),Be(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(uh):uh(i)}});function uh(e){return e.value=Object.freeze(e.value),e}var j0=Z("$ZodCustom",(e,t)=>{Ut.init(e,t),at.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=>ch(s,r,n,e));ch(i,r,n,e)}});function ch(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(Is(i))}}var dh,Z0=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 W0(){return new Z0}(dh=globalThis).__zod_globalRegistry??(dh.__zod_globalRegistry=W0());var Ps=globalThis.__zod_globalRegistry;function H0(e,t){return new e({type:"string",...ye(t)})}function G0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function fh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function K0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function Y0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function J0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function X0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function Q0(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function ek(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function tk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function rk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function nk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function ik(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function sk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function ok(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function ak(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function lk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function uk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function ck(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function dk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function fk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function hk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function pk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function mk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function vk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function gk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function yk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function bk(e,t){return new e({type:"number",checks:[],...ye(t)})}function _k(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function wk(e){return new e({type:"unknown"})}function kk(e,t){return new e({type:"never",...ye(t)})}function hh(e,t){return new Yf({check:"less_than",...ye(t),value:e,inclusive:!1})}function iu(e,t){return new Yf({check:"less_than",...ye(t),value:e,inclusive:!0})}function ph(e,t){return new Jf({check:"greater_than",...ye(t),value:e,inclusive:!1})}function su(e,t){return new Jf({check:"greater_than",...ye(t),value:e,inclusive:!0})}function mh(e,t){return new Vw({check:"multiple_of",...ye(t),value:e})}function vh(e,t){return new qw({check:"max_length",...ye(t),maximum:e})}function Go(e,t){return new jw({check:"min_length",...ye(t),minimum:e})}function gh(e,t){return new Zw({check:"length_equals",...ye(t),length:e})}function Sk(e,t){return new Ww({check:"string_format",format:"regex",...ye(t),pattern:e})}function Ek(e){return new Hw({check:"string_format",format:"lowercase",...ye(e)})}function Tk(e){return new Gw({check:"string_format",format:"uppercase",...ye(e)})}function xk(e,t){return new Kw({check:"string_format",format:"includes",...ye(t),includes:e})}function Ak(e,t){return new Yw({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function Ok(e,t){return new Jw({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Ci(e){return new Xw({check:"overwrite",tx:e})}function Ck(e){return Ci(t=>t.normalize(e))}function Dk(){return Ci(e=>e.trim())}function Ik(){return Ci(e=>e.toLowerCase())}function Pk(){return Ci(e=>e.toUpperCase())}function $k(){return Ci(e=>j_(e))}function Mk(e,t,r){return new e({type:"array",element:t,...ye(r)})}function Fk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function Nk(e,t){const r=Rk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Is(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(Is(s))}},e(n.value,n)),t);return r}function Rk(e,t){const r=new Ut({check:"custom",...ye(t)});return r._zod.check=e,r}function yh(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??Ps,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 yt(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,h=t.processors[i.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);h(e,t,u,c)}const d=e._zod.parent;d&&(o.ref||(o.ref=d),yt(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"&&At(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 bh(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 h=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=h,{defId:h,ref:`${u("__shared")}#/${a}/${h}`}}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 E=f.compile();return(A,T)=>E(h,A,T)};let s;const o=Vo,a=!Uo.jitless,c=a&&W_.value,d=t.catchall;let u;e._zod.parse=(h,f)=>{u??(u=n.value);const g=h.value;return o(g)?a&&c&&f?.async===!1&&f.jitless!==!0?(s||(s=i(t.shape)),h=s(h,f),d?nh([],g,h,f,u,e):h):r(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function ih(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 $0=W("$ZodUnion",(e,t)=>{at.init(e,t),qe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),qe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),qe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),qe(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=>Ql(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=>ih(a,n,e,i)):ih(o,n,e,i)}}),M0=W("$ZodIntersection",(e,t)=>{at.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])=>sh(r,a,l)):sh(r,s,o)}});function iu(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(Is(e)&&Is(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=iu(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=iu(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 sh(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=iu(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 F0=W("$ZodEnum",(e,t)=>{at.init(e,t);const r=Rf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>H_.has(typeof i)).map(i=>typeof i=="string"?qo(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}}),N0=W("$ZodTransform",(e,t)=>{at.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nf(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 oh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var ah=W("$ZodOptional",(e,t)=>{at.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qe(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ql(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=>oh(o,i)):oh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),R0=W("$ZodExactOptional",(e,t)=>{ah.init(e,t),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),L0=W("$ZodNullable",(e,t)=>{at.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ql(r.source)}|null)$`):void 0}),qe(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)}),z0=W("$ZodDefault",(e,t)=>{at.init(e,t),e._zod.optin="optional",qe(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=>lh(s,t)):lh(i,t)}});function lh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var U0=W("$ZodPrefault",(e,t)=>{at.init(e,t),e._zod.optin="optional",qe(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))}),V0=W("$ZodNonOptional",(e,t)=>{at.init(e,t),qe(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=>uh(s,e)):uh(i,e)}});function uh(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 q0=W("$ZodCatch",(e,t)=>{at.init(e,t),e._zod.optin="optional",qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(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)}}),B0=W("$ZodPipe",(e,t)=>{at.init(e,t),qe(e._zod,"values",()=>t.in._zod.values),qe(e._zod,"optin",()=>t.in._zod.optin),qe(e._zod,"optout",()=>t.out._zod.optout),qe(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=>Go(o,t.in,n)):Go(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Go(s,t.out,n)):Go(i,t.out,n)}});function Go(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 j0=W("$ZodReadonly",(e,t)=>{at.init(e,t),qe(e._zod,"propValues",()=>t.innerType._zod.propValues),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"optin",()=>t.innerType?._zod?.optin),qe(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(ch):ch(i)}});function ch(e){return e.value=Object.freeze(e.value),e}var Z0=W("$ZodCustom",(e,t)=>{Ut.init(e,t),at.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=>dh(s,r,n,e));dh(i,r,n,e)}});function dh(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(Ps(i))}}var fh,W0=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 H0(){return new W0}(fh=globalThis).__zod_globalRegistry??(fh.__zod_globalRegistry=H0());var $s=globalThis.__zod_globalRegistry;function G0(e,t){return new e({type:"string",...ye(t)})}function K0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function hh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function Y0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function J0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function X0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function Q0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function ek(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function tk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function rk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function nk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function ik(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function sk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function ok(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function ak(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function lk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function uk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function ck(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function dk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function fk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function hk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function pk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function mk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function vk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function gk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function yk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function bk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function _k(e,t){return new e({type:"number",checks:[],...ye(t)})}function wk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function kk(e){return new e({type:"unknown"})}function Sk(e,t){return new e({type:"never",...ye(t)})}function ph(e,t){return new Jf({check:"less_than",...ye(t),value:e,inclusive:!1})}function su(e,t){return new Jf({check:"less_than",...ye(t),value:e,inclusive:!0})}function mh(e,t){return new Xf({check:"greater_than",...ye(t),value:e,inclusive:!1})}function ou(e,t){return new Xf({check:"greater_than",...ye(t),value:e,inclusive:!0})}function vh(e,t){return new qw({check:"multiple_of",...ye(t),value:e})}function gh(e,t){return new jw({check:"max_length",...ye(t),maximum:e})}function Ko(e,t){return new Zw({check:"min_length",...ye(t),minimum:e})}function yh(e,t){return new Ww({check:"length_equals",...ye(t),length:e})}function Ek(e,t){return new Hw({check:"string_format",format:"regex",...ye(t),pattern:e})}function Tk(e){return new Gw({check:"string_format",format:"lowercase",...ye(e)})}function xk(e){return new Kw({check:"string_format",format:"uppercase",...ye(e)})}function Ak(e,t){return new Yw({check:"string_format",format:"includes",...ye(t),includes:e})}function Ok(e,t){return new Jw({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function Ck(e,t){return new Xw({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Di(e){return new Qw({check:"overwrite",tx:e})}function Dk(e){return Di(t=>t.normalize(e))}function Ik(){return Di(e=>e.trim())}function Pk(){return Di(e=>e.toLowerCase())}function $k(){return Di(e=>e.toUpperCase())}function Mk(){return Di(e=>Z_(e))}function Fk(e,t,r){return new e({type:"array",element:t,...ye(r)})}function Nk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function Rk(e,t){const r=Lk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ps(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(Ps(s))}},e(n.value,n)),t);return r}function Lk(e,t){const r=new Ut({check:"custom",...ye(t)});return r._zod.check=e,r}function bh(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??$s,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 yt(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,h=t.processors[i.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);h(e,t,u,c)}const d=e._zod.parent;d&&(o.ref||(o.ref=d),yt(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 _h(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 h=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=h,{defId:h,ref:`${u("__shared")}#/${a}/${h}`}}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 _h(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 h=a._zod.parent;if(h&&h!==u){n(h);const f=e.seen.get(h);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:Ko(t,"input",e.processors),output:Ko(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function At(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 At(n.element,r);if(n.type==="set")return At(n.valueType,r);if(n.type==="lazy")return At(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 At(n.innerType,r);if(n.type==="intersection")return At(n.left,r)||At(n.right,r);if(n.type==="record"||n.type==="map")return At(n.keyType,r)||At(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:At(n.in,r)||At(n.out,r);if(n.type==="object"){for(const i in n.shape)if(At(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(At(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(At(i,r))return!0;return!!(n.rest&&At(n.rest,r))}return!1}var Lk=(e,t={})=>r=>{const n=yh({...r,processors:t});return yt(e,n),bh(n,e),_h(n,e)},Ko=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=yh({...i??{},target:s,io:t,processors:r});return yt(e,o),bh(o,e),_h(o,e)},zk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Uk=(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}))])}},Vk=(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),h=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),h?f?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},Bk=(e,t,r,n)=>{r.not={}},qk=(e,t,r,n)=>{},jk=(e,t,r,n)=>{const i=e._zod.def,s=Nf(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},Zk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Wk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Hk=(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=yt(s.element,t,{...n,path:[...n.path,"items"]})},Gk=(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]=yt(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=yt(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},Kk=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>yt(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},Yk=(e,t,r,n)=>{const i=e._zod.def,s=yt(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=yt(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]]},Jk=(e,t,r,n)=>{const i=e._zod.def,s=yt(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"}]},Xk=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},Qk=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},eS=(e,t,r,n)=>{const i=e._zod.def;yt(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)))},tS=(e,t,r,n)=>{const i=e._zod.def;yt(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},rS=(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;yt(o,t,n);const a=t.seen.get(e);a.ref=o},nS=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},wh=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},iS=Z("ZodISODateTime",(e,t)=>{f0.init(e,t),Je.init(e,t)});function sS(e){return mk(iS,e)}var oS=Z("ZodISODate",(e,t)=>{h0.init(e,t),Je.init(e,t)});function aS(e){return vk(oS,e)}var lS=Z("ZodISOTime",(e,t)=>{p0.init(e,t),Je.init(e,t)});function uS(e){return gk(lS,e)}var cS=Z("ZodISODuration",(e,t)=>{m0.init(e,t),Je.init(e,t)});function dS(e){return yk(cS,e)}var fS=(e,t)=>{qf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>iw(e,r)},flatten:{value:r=>nw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Kl,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Kl,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=Z("ZodError",fS,{Parent:Error}),hS=eu(ar),pS=tu(ar),mS=qo(ar),vS=jo(ar),gS=aw(ar),yS=lw(ar),bS=uw(ar),_S=cw(ar),wS=dw(ar),kS=fw(ar),SS=hw(ar),ES=pw(ar),kh=new WeakMap;function $s(e,t,r){const n=Object.getPrototypeOf(e);let i=kh.get(n);if(i||(i=new Set,kh.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 lt=Z("ZodType",(e,t)=>(at.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ko(e,"input"),output:Ko(e,"output")}}),e.toJSONSchema=Lk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>hS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>mS(e,r,n),e.parseAsync=async(r,n)=>pS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>vS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>gS(e,r,n),e.decode=(r,n)=>yS(e,r,n),e.encodeAsync=async(r,n)=>bS(e,r,n),e.decodeAsync=async(r,n)=>_S(e,r,n),e.safeEncode=(r,n)=>wS(e,r,n),e.safeDecode=(r,n)=>kS(e,r,n),e.safeEncodeAsync=async(r,n)=>SS(e,r,n),e.safeDecodeAsync=async(r,n)=>ES(e,r,n),$s(e,"ZodType",{check(...r){const n=this.def;return this.clone(En(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(m1(r,n))},superRefine(r,n){return this.check(v1(r,n))},overwrite(r){return this.check(Ci(r))},optional(){return Dh(this)},exactOptional(){return n1(this)},nullable(){return Ih(this)},nullish(){return Dh(Ih(this))},nonoptional(r){return u1(this,r)},array(){return Oh(this)},or(r){return YS([this,r])},and(r){return XS(this,r)},transform(r){return $h(this,t1(r))},default(r){return o1(this,r)},prefault(r){return l1(this,r)},catch(r){return d1(this,r)},pipe(r){return $h(this,r)},readonly(){return p1(this)},describe(r){const n=this.clone();return Ps.add(n,{description:r}),n},meta(...r){if(r.length===0)return Ps.get(this);const n=this.clone();return Ps.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 Ps.get(e)?.description},configurable:!0}),e)),Sh=Z("_ZodString",(e,t)=>{ru.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Uk(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,$s(e,"_ZodString",{regex(...n){return this.check(Sk(...n))},includes(...n){return this.check(xk(...n))},startsWith(...n){return this.check(Ak(...n))},endsWith(...n){return this.check(Ok(...n))},min(...n){return this.check(Go(...n))},max(...n){return this.check(vh(...n))},length(...n){return this.check(gh(...n))},nonempty(...n){return this.check(Go(1,...n))},lowercase(n){return this.check(Ek(n))},uppercase(n){return this.check(Tk(n))},trim(){return this.check(Dk())},normalize(...n){return this.check(Ck(...n))},toLowerCase(){return this.check(Ik())},toUpperCase(){return this.check(Pk())},slugify(){return this.check($k())}})}),TS=Z("ZodString",(e,t)=>{ru.init(e,t),Sh.init(e,t),e.email=r=>e.check(G0(xS,r)),e.url=r=>e.check(Q0(AS,r)),e.jwt=r=>e.check(pk(BS,r)),e.emoji=r=>e.check(ek(OS,r)),e.guid=r=>e.check(fh(Eh,r)),e.uuid=r=>e.check(K0(Yo,r)),e.uuidv4=r=>e.check(Y0(Yo,r)),e.uuidv6=r=>e.check(J0(Yo,r)),e.uuidv7=r=>e.check(X0(Yo,r)),e.nanoid=r=>e.check(tk(CS,r)),e.guid=r=>e.check(fh(Eh,r)),e.cuid=r=>e.check(rk(DS,r)),e.cuid2=r=>e.check(nk(IS,r)),e.ulid=r=>e.check(ik(PS,r)),e.base64=r=>e.check(dk(zS,r)),e.base64url=r=>e.check(fk(US,r)),e.xid=r=>e.check(sk($S,r)),e.ksuid=r=>e.check(ok(MS,r)),e.ipv4=r=>e.check(ak(FS,r)),e.ipv6=r=>e.check(lk(NS,r)),e.cidrv4=r=>e.check(uk(RS,r)),e.cidrv6=r=>e.check(ck(LS,r)),e.e164=r=>e.check(hk(VS,r)),e.datetime=r=>e.check(sS(r)),e.date=r=>e.check(aS(r)),e.time=r=>e.check(uS(r)),e.duration=r=>e.check(dS(r))});function lr(e){return H0(TS,e)}var Je=Z("ZodStringFormat",(e,t)=>{Ke.init(e,t),Sh.init(e,t)}),xS=Z("ZodEmail",(e,t)=>{n0.init(e,t),Je.init(e,t)}),Eh=Z("ZodGUID",(e,t)=>{t0.init(e,t),Je.init(e,t)}),Yo=Z("ZodUUID",(e,t)=>{r0.init(e,t),Je.init(e,t)}),AS=Z("ZodURL",(e,t)=>{i0.init(e,t),Je.init(e,t)}),OS=Z("ZodEmoji",(e,t)=>{s0.init(e,t),Je.init(e,t)}),CS=Z("ZodNanoID",(e,t)=>{o0.init(e,t),Je.init(e,t)}),DS=Z("ZodCUID",(e,t)=>{a0.init(e,t),Je.init(e,t)}),IS=Z("ZodCUID2",(e,t)=>{l0.init(e,t),Je.init(e,t)}),PS=Z("ZodULID",(e,t)=>{u0.init(e,t),Je.init(e,t)}),$S=Z("ZodXID",(e,t)=>{c0.init(e,t),Je.init(e,t)}),MS=Z("ZodKSUID",(e,t)=>{d0.init(e,t),Je.init(e,t)}),FS=Z("ZodIPv4",(e,t)=>{v0.init(e,t),Je.init(e,t)}),NS=Z("ZodIPv6",(e,t)=>{g0.init(e,t),Je.init(e,t)}),RS=Z("ZodCIDRv4",(e,t)=>{y0.init(e,t),Je.init(e,t)}),LS=Z("ZodCIDRv6",(e,t)=>{b0.init(e,t),Je.init(e,t)}),zS=Z("ZodBase64",(e,t)=>{_0.init(e,t),Je.init(e,t)}),US=Z("ZodBase64URL",(e,t)=>{k0.init(e,t),Je.init(e,t)}),VS=Z("ZodE164",(e,t)=>{S0.init(e,t),Je.init(e,t)}),BS=Z("ZodJWT",(e,t)=>{T0.init(e,t),Je.init(e,t)}),Th=Z("ZodNumber",(e,t)=>{Qf.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Vk(e,n,i,s),$s(e,"ZodNumber",{gt(n,i){return this.check(ph(n,i))},gte(n,i){return this.check(su(n,i))},min(n,i){return this.check(su(n,i))},lt(n,i){return this.check(hh(n,i))},lte(n,i){return this.check(iu(n,i))},max(n,i){return this.check(iu(n,i))},int(n){return this.check(xh(n))},safe(n){return this.check(xh(n))},positive(n){return this.check(ph(0,n))},nonnegative(n){return this.check(su(0,n))},negative(n){return this.check(hh(0,n))},nonpositive(n){return this.check(iu(0,n))},multipleOf(n,i){return this.check(mh(n,i))},step(n,i){return this.check(mh(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 Ms(e){return bk(Th,e)}var qS=Z("ZodNumberFormat",(e,t)=>{x0.init(e,t),Th.init(e,t)});function xh(e){return _k(qS,e)}var jS=Z("ZodUnknown",(e,t)=>{A0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qk(e,r,n,i)});function Ah(){return wk(jS)}var ZS=Z("ZodNever",(e,t)=>{O0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Bk(e,r,n,i)});function WS(e){return kk(ZS,e)}var HS=Z("ZodArray",(e,t)=>{C0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hk(e,r,n,i),e.element=t.element,$s(e,"ZodArray",{min(r,n){return this.check(Go(r,n))},nonempty(r){return this.check(Go(1,r))},max(r,n){return this.check(vh(r,n))},length(r,n){return this.check(gh(r,n))},unwrap(){return this.element}})});function Oh(e,t){return Mk(HS,e,t)}var GS=Z("ZodObject",(e,t)=>{I0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gk(e,r,n,i),Be(e,"shape",()=>t.shape),$s(e,"ZodObject",{keyof(){return QS(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Ah()})},loose(){return this.clone({...this._zod.def,catchall:Ah()})},strict(){return this.clone({...this._zod.def,catchall:WS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return J_(this,r)},safeExtend(r){return X_(this,r)},merge(r){return Q_(this,r)},pick(r){return K_(this,r)},omit(r){return Y_(this,r)},partial(...r){return ew(Ch,this,r[0])},required(...r){return tw(Ph,this,r[0])}})});function ou(e,t){return new GS({type:"object",shape:e??{},...ye(t)})}var KS=Z("ZodUnion",(e,t)=>{P0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Kk(e,r,n,i),e.options=t.options});function YS(e,t){return new KS({type:"union",options:e,...ye(t)})}var JS=Z("ZodIntersection",(e,t)=>{$0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Yk(e,r,n,i)});function XS(e,t){return new JS({type:"intersection",left:e,right:t})}var au=Z("ZodEnum",(e,t)=>{M0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>jk(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 au({...t,checks:[],...ye(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 au({...t,checks:[],...ye(i),entries:s})}});function QS(e,t){return new au({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var e1=Z("ZodTransform",(e,t)=>{F0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wk(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ff(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Is(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(Is(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 t1(e){return new e1({type:"transform",transform:e})}var Ch=Z("ZodOptional",(e,t)=>{oh.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Dh(e){return new Ch({type:"optional",innerType:e})}var r1=Z("ZodExactOptional",(e,t)=>{N0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function n1(e){return new r1({type:"optional",innerType:e})}var i1=Z("ZodNullable",(e,t)=>{R0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Jk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Ih(e){return new i1({type:"nullable",innerType:e})}var s1=Z("ZodDefault",(e,t)=>{L0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function o1(e,t){return new s1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Uf(t)}})}var a1=Z("ZodPrefault",(e,t)=>{z0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>eS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function l1(e,t){return new a1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Uf(t)}})}var Ph=Z("ZodNonOptional",(e,t)=>{U0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Xk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function u1(e,t){return new Ph({type:"nonoptional",innerType:e,...ye(t)})}var c1=Z("ZodCatch",(e,t)=>{V0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function d1(e,t){return new c1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var f1=Z("ZodPipe",(e,t)=>{B0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rS(e,r,n,i),e.in=t.in,e.out=t.out});function $h(e,t){return new f1({type:"pipe",in:e,out:t})}var h1=Z("ZodReadonly",(e,t)=>{q0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>nS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function p1(e){return new h1({type:"readonly",innerType:e})}var Mh=Z("ZodCustom",(e,t)=>{j0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Zk(e,r,n,i)});function m1(e,t={}){return Fk(Mh,e,t)}function v1(e,t){return Nk(e,t)}function g1(e,t={}){const r=new Mh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ye(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 y1=ou({id:Ms(),customer:ou({customer_salutation_id:Ms().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:Ms().positive().default(60),language_id:Ms().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),Z2=ou({ticket_sale_id:Ms(),start_at:lr().date(),personalizations:Oh(y1)});function lu(e,t){return e-t*Math.floor(e/t)}var Fh=1721426;function Jo(e,t,r,n){t=uu(e,t);let i=t-1,s=-2;return r<=2?s=0:Xo(t)&&(s=-1),Fh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function Xo(e){return e%4===0&&(e%100!==0||e%400===0)}function uu(e,t){return e==="BC"?1-t:t}function b1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var _1={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]},Di=class{fromJulianDay(e){let t=e,r=t-Fh,n=Math.floor(r/146097),i=lu(r,146097),s=Math.floor(i/36524),o=lu(i,36524),a=Math.floor(o/1461),l=lu(o,1461),c=Math.floor(l/365),[d,u]=b1(n*400+s*100+a*4+c+(s!==4&&c!==4?1:0)),h=t-Jo(d,u,1,1),f=2;t<Jo(d,u,3,1)?f=0:Xo(u)&&(f=1);let g=Math.floor(((h+f)*12+373)/367);return new Ls(d,u,g,t-Jo(d,u,g,1)+1)}toJulianDay(e){return Jo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return _1[Xo(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Xo(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"}},w1={"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 xn(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 cu(e,t){return t=Kt(t,e.calendar),e=fu(e),t=fu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function k1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function S1(e,t){return xn(e,Xn(t))}var E1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Nh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?E1[r]:C1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function T1(e){return Br(Date.now(),e)}function Xn(e){return P1(T1(e))}function Rh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Lh(e,t){return zh(e)-zh(t)}function zh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var du=null,x1=!1;function Vt(){return du==null&&(du=new Intl.DateTimeFormat().resolvedOptions().timeZone),du}function Uh(){return x1}function fu(e){return e.subtract({days:e.day-1})}function A1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Vh=new Map,hu=new Map;function O1(e){if(Intl.Locale){let r=Vh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Vh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function C1(e){let t=hu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return hu.set(e,t),t.firstDay}let r=O1(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&&w1[r]||0};hu.set(e,t)}return t.firstDay}function An(e){return e=Kt(e,new Di),Bh(uu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Bh(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 Fs(e,t){if(t==="UTC")return 0;if(e>0&&t===Vt()&&!Uh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=jh(e,t);return Bh(r,n,i,s,o,a,0)-Math.floor(e/1e3)*1e3}var qh=new Map;function jh(e,t){let r=qh.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"}),qh.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 Qo=864e5;function D1(e,t){let r=An(e);return Zh(e,t,r-Fs(r-Qo,t),r-Fs(r+Qo,t))}function Zh(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>I1(e,t,i))}function I1(e,t,r){let n=jh(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 Vr(e,t,r="compatible"){let n=On(e);if(t==="UTC")return An(n);if(t===Vt()&&r==="compatible"&&!Uh()){n=Kt(n,new Di);let l=new Date,c=uu(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=An(n),s=Fs(i-Qo,t),o=Fs(i+Qo,t),a=Zh(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 Wh(e,t,r="compatible"){return new Date(Vr(e,t,r))}function Br(e,t){let r=Fs(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 Cn(i<1?"BC":"AD",i<1?-i+1:i,s,o,t,r,a,l,c,d)}function P1(e){return new Ls(e.calendar,e.era,e.year,e.month,e.day)}function On(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 Ii(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function $1(e){return new H1(e.hour,e.minute,e.second,e.millisecond)}function Kt(e,t){if(k1(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,Qn(n),n}function M1(e,t,r){return e instanceof Cn?e.timeZone===t?e:Hh(e,t):Br(Vr(e,t,r),t)}function F1(e){let t=An(e)-e.offset;return new Date(t)}function Hh(e,t){return Kt(Br(An(e)-e.offset,t),e.calendar)}var Ns=36e5;function ea(e,t){let r=e.copy(),n="hour"in r?Jh(r,t):0;pu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,mu(r),Gh(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,N1(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 pu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function mu(e){for(;e.month<1;)pu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,pu(e,1)}function N1(e){for(;e.day<1;)e.month--,mu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,mu(e)}function Gh(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 Qn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Gh(e)}function vu(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function Kh(e,t){return ea(e,vu(t))}function gu(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),Qn(r),r}function Rs(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),Yh(r),r}function R1(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ta(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ta(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ta(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ta(e.hour,24),t}function Yh(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 ta(e,t){let r=e%t;return r<0&&(r+=t),r}function Jh(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,R1(e)}function Xh(e,t){let r=e.copy();return Jh(r,t),r}function L1(e,t){return Xh(e,vu(t))}function yu(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],Qn(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),Qn(i),i}function bu(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 Qh(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=Vr(ea(On(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=An(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,Kt(Br(r,e.timeZone),e.calendar)}function z1(e,t){return Qh(e,vu(t))}function U1(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=On(e),a=Kt(Rs(o,{hour:i}),new Di),l=[Vr(a,e.timeZone,"earlier"),Vr(a,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===a.day)[0],c=Kt(Rs(o,{hour:s}),new Di),d=[Vr(c,e.timeZone,"earlier"),Vr(c,e.timeZone,"later")].filter(g=>Br(g,e.timeZone).day===c.day).pop(),u=An(e)-e.offset,h=Math.floor(u/Ns),f=u%Ns;return u=nn(h,r,Math.floor(l/Ns),Math.floor(d/Ns),n?.round)*Ns+f,Kt(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return bu(e,t,r,n);case"era":case"year":case"month":case"day":return Kt(Br(Vr(yu(On(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function V1(e,t,r){let n=On(e),i=Rs(gu(n,t),t);return i.compare(n)===0?e:Kt(Br(Vr(i,e.timeZone,r),e.timeZone),e.calendar)}var B1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,q1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,j1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,_u=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,Z1=["hours","minutes","seconds"],W2=["years","months","weeks","days",...Z1];function ra(e){let t=e.match(B1);if(!t)throw _u.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Ls(Re(t[1],0,9999),Re(t[2],1,12),1);return r.day=Re(t[3],1,r.calendar.getDaysInMonth(r)),r}function ep(e){let t=e.match(q1);if(!t)throw _u.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=Re(t[1],-9999,9999),n=new Ii(r<1?"BC":"AD",r<1?-r+1:r,Re(t[2],1,12),1,t[4]?Re(t[4],0,23):0,t[5]?Re(t[5],0,59):0,t[6]?Re(t[6],0,59):0,t[7]?Re(t[7],0,1/0)*1e3:0);return n.day=Re(t[3],0,n.calendar.getDaysInMonth(n)),n}function tp(e,t){let r=e.match(j1);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Re(r[1],-9999,9999),i=new Cn(n<1?"BC":"AD",n<1?-n+1:n,Re(r[2],1,12),1,r[11],0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);i.day=Re(r[3],0,i.calendar.getDaysInMonth(i));let s=On(i),o;if(r[8]){let a=Re(r[8],-23,23);if(i.offset=Math.sign(a)*(Math.abs(a)*36e5+Re(r[9]??"0",0,59)*6e4+Re(r[10]??"0",0,59)*1e3),o=An(i)-i.offset,!D1(s,i.timeZone).includes(o))throw new Error(`Offset ${sp(i.offset)} is invalid for ${wu(i)} in ${i.timeZone}`)}else o=Vr(On(s),i.timeZone,t);return Br(o,i.timeZone)}function rp(e,t){let r=e.match(_u);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Re(r[1],-9999,9999),i=new Cn(n<1?"BC":"AD",n<1?-n+1:n,Re(r[2],1,12),1,t,0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);return i.day=Re(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Re(r[8],-23,23)*36e5+Re(r[9]??"0",0,59)*6e4),Hh(i,t)}function Re(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 np(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 ip(e){let t=Kt(e,new Di),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 wu(e){return`${ip(e)}T${np(e)}`}function sp(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 W1(e){return`${wu(e)}${sp(e.offset)}[${e.timeZone}]`}function ku(e){let t=typeof e[0]=="object"?e.shift():new Di,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 Ls=class ed{#e;constructor(...t){let[r,n,i,s,o]=ku(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,Qn(this)}copy(){return this.era?new ed(this.calendar,this.era,this.year,this.month,this.day):new ed(this.calendar,this.year,this.month,this.day)}add(t){return ea(this,t)}subtract(t){return Kh(this,t)}set(t){return gu(this,t)}cycle(t,r,n){return yu(this,t,r,n)}toDate(t){return Wh(this,t)}toString(){return ip(this)}compare(t){return Rh(this,t)}},H1=class Wg{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,Yh(this)}copy(){return new Wg(this.hour,this.minute,this.second,this.millisecond)}add(t){return Xh(this,t)}subtract(t){return L1(this,t)}set(t){return Rs(this,t)}cycle(t,r,n){return bu(this,t,r,n)}toString(){return np(this)}compare(t){return Lh(this,t)}},Ii=class td{#e;constructor(...t){let[r,n,i,s,o]=ku(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,Qn(this)}copy(){return this.era?new td(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new td(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ea(this,t)}subtract(t){return Kh(this,t)}set(t){return gu(Rs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return yu(this,t,r,n);default:return bu(this,t,r,n)}}toDate(t,r){return Wh(this,t,r)}toString(){return wu(this)}compare(t){let r=Rh(this,t);return r===0?Lh(this,On(t)):r}},Cn=class rd{#e;constructor(...t){let[r,n,i,s,o]=ku(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,Qn(this)}copy(){return this.era?new rd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new rd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return Qh(this,t)}subtract(t){return z1(this,t)}set(t,r){return V1(this,t,r)}cycle(t,r,n){return U1(this,t,r,n)}toDate(){return F1(this)}toString(){return W1(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-M1(t,this.timeZone).toDate().getTime()}},Su=new Map,_r=class{constructor(e,t={}){this.formatter=op(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 Y1()&&(this.resolvedHourCycle||(this.resolvedHourCycle=J1(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}},G1={true:{ja:"h11"},false:{}};function op(e,t={}){if(typeof t.hour12=="boolean"&&K1()){t={...t};let i=G1[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(Su.has(r))return Su.get(r);let n=new Intl.DateTimeFormat(e,t);return Su.set(r,n),n}var Eu=null;function K1(){return Eu==null&&(Eu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Eu}var Tu=null;function Y1(){return Tu==null&&(Tu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Tu}function J1(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=op(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 zs(e){return $1(rp(e,"Europe/Berlin")).toString().slice(0,-3)}function Us(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=rp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new _r(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function na(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function ap(e){return e?.type==="Ticket"}function ia(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}}function Dn(e,t=""){return L_(Object.values(e).map(r=>ia(r,{selectedTime:t})),r=>r.shop_order)}function In(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 X1=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!ap(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;ap(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 Vs(e){return e?.type==="Event"}function Q1(e){return Vs(e)&&e.subtype==="scale"}function eE(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 xu(e,t,r){return eE(e,t,r)}var tE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!Vs(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=Sn(t.items.filter(h=>n.items.some(f=>f.uuid===h.uuid)),h=>h.quantity),u=Math.max(l-d-c+r.quantity,0);return{max:u,min:a.min??0,unavailable:a.available===0,bookedOut:u===0}},rE=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 nE(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=Sn(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(Gl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.capacity))??0)+this.getPrecartItemQuantity(t)},totalCapacity(t,r){return Gl(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=R_(n,s=>s.timeSlot);return Object.values(i).map(s=>z_(U_(s.flatMap(o=>o.tickets)).map(o=>Gl(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 iE(e){let t=0;_s(()=>{me(()=>{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 ft(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}`),Q1(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 H2=15*6e4;function sa(){return typeof window<"u"&&typeof localStorage<"u"}function sE(e,t){if(sa())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Au(e){if(!sa())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 lp(e){if(sa())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function up(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var cp="go-cart",oa=(e,t)=>localStorage.setItem(cp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function oE(e){const t=e.product.type;switch(t){case"Ticket":return dp(e)?ft(ia(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity}):void 0;case"Event":return dp(e)?ft(xu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return ft(up(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function aE(e){let t=[],r=[],n;try{const i=localStorage.getItem(cp);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(),oa([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(oE).filter(dE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.items)}catch(i){return console.error(i),oa([],[]),[]}}function lE(e){aE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});oa(e.items||[],e.coupons||[]),_s(()=>{me(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,oa(e.items||[],e.coupons||[]))})})}var uE=e=>new Date<new Date(e),cE=e=>ra(e.slice(0,10)).compare(Xn(Vt()))>=0,dp=e=>e.time?e.product.subtype==="day"?cE(e.time):uE(e.time):!0,dE=e=>e!==void 0,fE=0;function Pi(e,t=20){const r={items:Fe([]),coupons:Fe([]),paymentModeId:void 0,uid:`cart-${fE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,Sn(this.items,n=>n.total_price_cents))},get totalQuantity(){return Sn(this.items,n=>n.quantity)},get valueVoucherCents(){return Sn(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(ft(n))),r}function ur(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function hE(){const e=Fe(Pi());return lE(e),iE(e),e}var $i="go-capacity";function fp(e,t){const r=Au($i);sE($i,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function hp(e){const t=Au($i);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){lp($i);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 pE(e){sa()&&window.addEventListener("storage",t=>{if(t.key===$i&&hp(e),t.key==="go-cart"){const r=Au("go-cart");(!r||!r.items||r.items.length===0)&&lp($i)}})}function pp(){const e={allSeats:{},allQuotas:{},quotaManager:nE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&fp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&fp(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:X1,seats:tE,unlimited:rE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ue(()=>s(this,t,r,n))}};return hp(e),pE(e),e}function mp(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 vp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},mE=class extends vp{constructor(){super()}get isLoggedIn(){try{const e=mp("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=mp("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}}},vE=class extends vp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},gE=e=>{switch(e){case"angular":return new mE;case"jmb":return new vE;default:throw new Error("Unhandled shop type: "+e)}};function yE(e){return e==null||typeof e=="string"&&e.trim()===""}function bE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||yE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function _E(e,t){return bE(e,t)}var wE={withStackTrace:!1},gp=(e,t,r=wE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ei(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 yp(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 qr(e){return this instanceof qr?(this.v=e,this):new qr(e)}function bp(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){h(s[0][3],m)}}function c(f){f.value instanceof qr?Promise.resolve(f.value.v).then(d,u):h(s[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function h(f,g){f(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function kE(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:qr(e[i](o)),done:!1}:s?s(o):o}:s}}function SE(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 yp=="function"?yp(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 ti=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 wr(r(n))))}static fromThrowable(t,r){return(...n)=>new vr(ei(this,void 0,void 0,function*(){try{return new Zr(yield t(...n))}catch(i){return new wr(r?r(i):i)}}))}static combine(t){return EE(t)}static combineWithAllErrors(t){return TE(t)}map(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){return r.isErr()?new wr(r.error):new Zr(yield t(r.value))})))}andThrough(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){if(r.isErr())return new wr(r.error);const n=yield t(r.value);return n.isErr()?new wr(n.error):new Zr(r.value)})))}andTee(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){if(r.isErr())return new wr(r.error);try{yield t(r.value)}catch{}return new Zr(r.value)})))}orTee(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){if(r.isOk())return new Zr(r.value);try{yield t(r.error)}catch{}return new wr(r.error)})))}mapErr(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){return r.isOk()?new Zr(r.value):new wr(yield t(r.error))})))}andThen(t){return new vr(this._promise.then(r=>{if(r.isErr())return new wr(r.error);const n=t(r.value);return n instanceof vr?n._promise:n}))}orElse(t){return new vr(this._promise.then(r=>ei(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 bp(this,arguments,function*(){return yield qr(yield qr(yield*kE(SE(yield qr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return bp(this,arguments,function*(){const r=yield qr(this._promise);return r.isErr()&&(yield yield qr(aa(r.error))),yield qr(r.value)})}};function aa(e){return new ti(Promise.resolve(new wr(e)))}var G2=ti.fromPromise,K2=ti.fromSafePromise,Y2=ti.fromThrowable,_p=e=>{let t=Pn([]);for(const r of e)if(r.isErr()){t=jr(r.error);break}else t.map(n=>n.push(r.value));return t},EE=e=>ti.fromSafePromise(Promise.all(e)).andThen(_p),wp=e=>{let t=Pn([]);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},TE=e=>ti.fromSafePromise(Promise.all(e)).andThen(wp),Ou;(function(e){function t(i,s){return(...o)=>{try{return Pn(i(...o))}catch(a){return jr(s?s(a):a)}}}e.fromThrowable=t;function r(i){return _p(i)}e.combine=r;function n(i){return wp(i)}e.combineWithAllErrors=n})(Ou||(Ou={}));function Pn(e){return new Zr(e)}function jr(e){return new wr(e)}var Zr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Pn(e(this.value))}mapErr(e){return Pn(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 Pn(this.value)}orTee(e){return Pn(this.value)}orElse(e){return Pn(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ti.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 gp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},wr=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 aa(this.error)}asyncAndThrough(e){return aa(this.error)}asyncMap(e){return aa(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 gp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},J2=Ou.fromThrowable,xE=/\{[^{}]+\}/g,AE=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function OE(){return Math.random().toString(36).slice(2,11)}function CE(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=AE()?l:void 0,t=xp(t);const d=[];async function u(h,f){const{baseUrl:g,fetch:m=n,Request:v=r,headers:_,params:T={},parseAs:A="json",querySerializer:E,bodySerializer:x=s??IE,pathSerializer:O,body:$,middleware:L=[],...W}=f||{};let N=t;g&&(N=xp(g)??t);let se=typeof i=="function"?i:Ep(i);E&&(se=typeof E=="function"?E:Ep({...typeof i=="object"?i:{},...E}));const V=O||o||DE,oe=$===void 0?void 0:x($,Tp(a,_,T.header)),pe=Tp(oe===void 0||oe instanceof FormData?{}:{"Content-Type":"application/json"},a,_,T.header),J=[...d,...L],ie={redirect:"follow",...c,...W,body:oe,headers:pe};let Y,B,H=new v(PE(h,{baseUrl:N,params:T,querySerializer:se,pathSerializer:V}),ie),G;for(const F in W)F in H||(H[F]=W[F]);if(J.length){Y=OE(),B=Object.freeze({baseUrl:N,fetch:m,parseAs:A,querySerializer:se,bodySerializer:x,pathSerializer:V});for(const F of J)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const ue=await F.onRequest({request:H,schemaPath:h,params:T,options:B,id:Y});if(ue)if(ue instanceof v)H=ue;else if(ue instanceof Response){G=ue;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!G){try{G=await m(H,l)}catch(F){let ue=F;if(J.length)for(let z=J.length-1;z>=0;z--){const ge=J[z];if(ge&&typeof ge=="object"&&typeof ge.onError=="function"){const fe=await ge.onError({request:H,error:ue,schemaPath:h,params:T,options:B,id:Y});if(fe){if(fe instanceof Response){ue=void 0,G=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 F=J.length-1;F>=0;F--){const ue=J[F];if(ue&&typeof ue=="object"&&typeof ue.onResponse=="function"){const z=await ue.onResponse({request:H,response:G,schemaPath:h,params:T,options:B,id:Y});if(z){if(!(z instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");G=z}}}}const le=G.headers.get("Content-Length");if(G.status===204||H.method==="HEAD"||le==="0"&&!G.headers.get("Transfer-Encoding")?.includes("chunked"))return G.ok?{data:void 0,response:G}:{error:void 0,response:G};if(G.ok)return{data:await(async()=>{if(A==="stream")return G.body;if(A==="json"&&!le){const ue=await G.text();return ue?JSON.parse(ue):void 0}return await G[A]()})(),response:G};let de=await G.text();try{de=JSON.parse(de)}catch{}return{error:de,response:G}}return{request(h,f,g){return u(f,{...g,method:h.toUpperCase()})},GET(h,f){return u(h,{...f,method:"GET"})},PUT(h,f){return u(h,{...f,method:"PUT"})},POST(h,f){return u(h,{...f,method:"POST"})},DELETE(h,f){return u(h,{...f,method:"DELETE"})},OPTIONS(h,f){return u(h,{...f,method:"OPTIONS"})},HEAD(h,f){return u(h,{...f,method:"HEAD"})},PATCH(h,f){return u(h,{...f,method:"PATCH"})},TRACE(h,f){return u(h,{...f,method:"TRACE"})},use(...h){for(const f of h)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(...h){for(const f of h){const g=d.indexOf(f);g!==-1&&d.splice(g,1)}}}}function la(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 kp(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(la(a,t[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Sp(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(la(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Ep(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(Sp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(kp(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(la(i,s,e))}}return n.join("&")}}function DE(e,t){let r=e;for(const n of e.match(xE)??[]){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,Sp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,kp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${la(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function IE(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 PE(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 Tp(...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 xp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function $E(e,t){return CE({baseUrl:e,headers:{"X-Shop-Url":t}})}var ME="/api/v4/calendar",FE="/api/v4/tickets/calendar",NE="/api/v4/auth/validate_token",RE="/api/v4/tickets/list_and_quotas",LE="/api/v4/tickets",zE="/api/v4/auth/sign_in",UE="/api/v4/auth",VE="/api/v4/orders/withdrawals",Ap={SHOP_GUEST:10,SHOP:20},BE=class{type;#e=re(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"),p(this.#e).urls=D_(this.type),p(this.#e).currentUser=gE(this.type),p(this.#e).apiUrl=e,p(this.#e).shopDomain=t,p(this.#e).locale=r||"de",this.#t={},p(this.#e).client=$E(e,t),p(this.#e).capacityManager=pp(),p(this.#e).cart=hE(),p(this.#e).auth=new $f,p(this.#e).client.use(new B_(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return p(this.#e).capacityManager||(p(this.#e).capacityManager=pp()),p(this.#e).capacityManager}get cart(){return p(this.#e).cart}get auth(){return p(this.#e).auth||(p(this.#e).auth=new $f),p(this.#e).auth}get currentUser(){return p(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return p(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 p(this.#e).apiUrl}get shopDomain(){return p(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return p(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return p(this.#e)}validateToken(){return this.fetchAndCache(NE,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(FE,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(ME,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(RE,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:xt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(LE,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:xt({per_page:100},e??{})})}signIn(e){return this.apiPost(zE,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=xt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Ap.SHOP_GUEST:Ap.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(UE,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(VE,{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:xt({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!"),p(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&&(p(this.#e)[t]=r===""?l:l[r])}),p(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 p(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:xt(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=_E(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:xt(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 $_(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=xt(i,{params:{query:t}})),e&&(i=xt(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 BE;function Mi(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 qE=class Hg{host;KEY;pollDuration;#e=re(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 Hg(null,null);return r.value=t,r}load(){Wl(()=>(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 p(this.#e).value}set value(t){p(this.#e).value=t}};function Fi(e){return function(t,r={pollDuration:1e3}){if(t){const n=new qE(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:{}},ZE=class{defaultConfig=xt(jE,window.customOptions);override=this.defaultConfig;#e=re(Fe({}));get options(){return p(this.#e)}set options(e){I(this.#e,e,!0)}constructor(){this.update()}update(){const e=xt(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=xt(this.override,e),this.update(),this}default(e){return this.defaultConfig=xt(this.defaultConfig,e),this.update(),this}},Xe=new ZE,Op=class{#e=re();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}#t=re();get ticketSaleId(){return p(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){if(this.token)return al(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return al(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Xe.config.urls.annualTicketPersonalizationForm?Xe.config.urls.annualTicketPersonalizationForm(this.token,e.id):C.urls.annualTicketPersonalizationForm(this.token,e.id)}},Cp="go-annual-ticket-personalization",Dp=Mi(Cp),WE=Fi(Cp),HE=j("<li><a> </a></li>"),GE=j('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function KE(e,t){Q(t,!0);let r=b(t,"token",7);const n=new Op;Dp(t.$$host,n),me(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=K(),a=U(o),l=c=>{var d=K(),u=U(d);Ve(u,17,()=>p(i).ticket_sales,h=>h.id,(h,f)=>{var g=GE(),m=M(g),v=M(m,!0);P(m);var _=X(m,2),T=M(_,!0);P(_);var A=X(_,2),E=x=>{var O=HE(),$=M(O),L=M($,!0);P($),P(O),ae((W,N)=>{ke($,"href",W),ne(L,N)},[()=>n.goToPersonalization(p(f)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),S(x,O)};ce(A,x=>{p(f).status=="not_ready_to_send"&&x(E)}),P(g),ae(x=>{ke(g,"data-ticket-sale-id",p(f).id),ne(v,p(f).title),ne(T,x)},[()=>C.t("ticket.annual.personalization.detail.title",{count:p(f).personalizations.length})]),S(h,g)}),S(c,d)};return ce(a,c=>{p(i)&&c(l)}),S(e,o),ee(s)}customElements.define("go-annual-ticket-personalization",te(KE,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var YE={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:g1(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 JE(e,t){return{...e,errors:e.errors||[],value:e.value??XE(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){QE(this)}}}function XE(e){return e==="checkbox"?!1:e==="file"?null:""}function QE(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 Ya{static#e={};static defineForm(t){Xe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Xe.default({fields:t})}static{Ya.defineFields(YE)}static setRequiredApiKeys(t,r){Ya.#e[t]=r}static getFormOptions(t){return Xe.config.forms[t]}static createField(t,r){const n=Ya.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return JE(n,r)}static getFormFields(t){return eT(t)}static getFieldInit(t){return Xe.config.fields[t]}};function eT(e){const t=Xe.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 Cu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function tT(e,t){Q(t,!0);let r=b(t,"token",7),n=b(t,"ticketSaleId",7),i;const s=new Op;Dp(t.$$host,s),me(()=>{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"])'),_=Pf(m,(x,O)=>{const $=v[O-1].details;return x.push($),x},[]);if(_.forEach(x=>{x.fields.forEach(O=>{x.validateField(O)})}),!Pf(m,(x,O)=>_[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const x=_.map(async($,L)=>{const W=s.ticketSale.personalizations[L].id,N=$.fields.find(V=>V.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const se=await C.uploadPersonalizationPhoto(r(),W,N);return se.error?{ok:!1,error:se.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(x)).find($=>!$.ok);if(O){i.details.apiErrors=[O.error];return}}const T={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:_.map((x,O)=>{const $=V_(x.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:$}})}},A=await C.finalizePersonalizations(r(),T);if(A.error){i.details.apiErrors=[A.error.error];return}const E=Xe.config.forms.personalization?.beforeSubmit;E&&E(T),Xe.config.urls.annualTicketPersonalizationFormSubmit?.()&&Xe.config.navigateTo(Xe.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function h(){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(!h()||!a||!l||!c)return;const v=a.parentElement;if(!v)return;const _=Math.max(m,1),T=Array.from(v.querySelectorAll("go-personalization-form"));for(;T.length<_;){const E=l.cloneNode(!0);u(E),v.insertBefore(E,c),T.push(E)}for(;T.length>_;){const E=T.pop();E&&E!==a&&E.remove()}const A=s.ticketSale?.personalizations??[];T.forEach((E,x)=>{const O=A[x];O&&(E.dataset.personalizationId=String(O.id))}),d=_}rn(()=>{h(),t.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),me(()=>{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 ee(g)}customElements.define("go-annual-ticket-personalization-form",te(tT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var rT=class{formId;form;#e=re(Fe([]));#t=D(()=>Cu(this.fields)==0);get isValid(){return p(this.#t)}set isValid(e){I(this.#t,e)}#r=re();get successMessage(){return p(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(r){return N_(r)||M_(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 p(this.#e)}set apiErrors(e){if(this.fields.forEach(t=>t.apiErrors=[]),Hl(e)){I(this.#e,e,!0);return}if(e.errors&&Hl(e.errors)&&I(this.#e,e.errors,!0),F_(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}},Ip="go-form-details",nT=Mi(Ip),Ni=Fi(Ip);function $n(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 iT=j("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function sT(e,t){Q(t,!0);let r=b(t,"formId",7),n=b(t,"custom",7);const i=new rT(r(),t.$$host);nT(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=$n(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=K(),l=U(a),c=d=>{var u=iT(),h=U(u),f=X(h,2),g=X(f,2),m=M(g,!0);P(g),ae(v=>ne(m,v),[()=>C.t(cr.getFormOptions(r())?.submitLabel||"Submit")]),S(d,u)};return ce(l,d=>{n()||d(c)}),S(e,a),ee(o)}customElements.define("go-form",te(sT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var oT=j("<go-form></go-form>",2);function aT(e,t){Q(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=oT();return Gn(s,"formId","passwordReset"),ae(()=>Gn(s,"custom",r())),Cl("submit",s,n),S(e,s),ee(i)}customElements.define("go-password-reset",te(aT,{custom:{}},[],[]));function lT(e,t){Q(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 $n(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),ee({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-in",te(lT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function uT(e,t){Q(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 $n(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),ee({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-up",te(uT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function cT(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 Pp(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function dT(e){return cT(Pp(e),0)}function fT(e){const t=Pp(e);if(t&&typeof t=="object"){const r=Object.keys(t);if(r.length>0)return Number(r[0])}}function hT(e,t){const r=Pi(),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=fT(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||Vs(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(pT(a,s))}),r}function pT(e,t){const r=dT(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return ft({...e.product,price_cents:n},{quantity:r,time:e.time,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var mT=class{#e=re();get displayCart(){return p(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=re(!1);get preview(){return p(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=hT(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}}},$p="go-cart-details",vT=Mi($p),Ri=Fi($p),gT=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Mp(e,t){Q(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(o){r(o),y()}},i=gT(),s=M(i,!0);return P(i),ae(()=>ne(s,r().product.title)),S(e,i),ee(n)}te(Mp,{cartItem:{}},[],[],{mode:"open"});var yT=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),bT=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 Fp(e,t){Q(t,!0);let r=b(t,"cartItem",7);if(!Vs(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=bT(),o=U(s),a=M(o),l=M(a,!0);P(a);var c=X(a),d=M(c,!0);P(c),P(o);var u=X(o),h=f=>{var g=yT(),m=U(g),v=M(m,!0);P(m);var _=X(m),T=M(_,!0);P(_),ae((A,E)=>{ne(v,A),ne(T,E)},[()=>Us(r().time,{month:"numeric",day:"numeric"},C.locale),()=>zs(r().time)]),S(f,g)};return ce(u,f=>{r().time&&f(h)}),ae(()=>{ne(l,n.event_title),ne(d,n.title)}),S(e,s),ee(i)}te(Fp,{cartItem:{}},[],[],{mode:"open"});var _T=j('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),wT=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),kT=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Np(e,t){Q(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=kT(),s=U(i),o=M(s,!0);P(s);var a=X(s,2),l=c=>{var d=wT(),u=U(d),h=M(u,!0);P(u);var f=X(u,2),g=m=>{var v=_T(),_=M(v,!0);P(v),ae(T=>ne(_,T),[()=>zs(r().time)]),S(m,v)};ce(f,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),ae(m=>ne(h,m),[()=>Us(r().time,{month:"numeric",day:"numeric"},C.locale)]),S(c,d)};return ce(a,c=>{r().time&&c(l)}),ae(()=>ne(o,r().product.title)),S(e,i),ee(n)}te(Np,{cartItem:{}},[],[],{mode:"open"});function Rp(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[ua(n)];if(t<e)return e>n?[ua(e)]:[];const i=Math.max(e,n),s=[ua(n)];for(let o=i;o<=t;o++)o!==n&&s.push(ua(o));return s}function ua(e){return{value:e,label:e.toString()}}var ST=j('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),ET=j('<span class="go-cart-item-price-discounted"> </span>'),TT=j("<span> </span>"),xT=j("<option> </option>"),AT=j('<select class="go-cart-item-select"></select>'),OT=j('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),CT=j('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article>');function Lp(e,t){Q(t,!0);let r=b(t,"displayItem",7),n=b(t,"displayCart",7),i=b(t,"preview",7),s=re(void 0);const o=D(()=>C.cart?.items.find(g=>g.uuid===(r().display?.reference_uuid??r().uuid))),a=Pi();me(()=>{C.cart?.items.map(g=>g.quantity),Ue(()=>{I(s,C.capacityManager.capacity(n(),r(),a),!0)})});function l(g){const m=g;if(!p(o)){console.error("(CartItem) Could not find main item for line",r());return}const v=parseInt(m.value,10);p(o).quantity=Math.max(0,p(o).quantity-r().quantity+v)}function c(){if(!p(o)){console.error("(CartItem) Could not find main item for line",r());return}const g=Math.max(0,p(o).quantity-r().quantity);g===0?C.cart?.deleteItem(p(o)):p(o).quantity=g}var d={get displayItem(){return r()},set displayItem(g){r(g),y()},get displayCart(){return n()},set displayCart(g){n(g),y()},get preview(){return i()},set preview(g){i(g),y()}},u=K(),h=U(u),f=g=>{var m=CT(),v=M(m),_=M(v),T=M(_),A=B=>{Np(B,{get cartItem(){return r()}})},E=B=>{Fp(B,{get cartItem(){return r()}})},x=B=>{Mp(B,{get cartItem(){return r()}})};ce(T,B=>{r().product.type==="Ticket"?B(A):r().product.type==="Event"?B(E,1):r().product.type==="Coupon"&&B(x,2)}),P(_);var O=X(_,2),$=M(O),L=B=>{var H=ST(),G=U(H),le=M(G,!0);P(G);var de=X(G,2),F=M(de,!0);P(de),ae((ue,z)=>{ne(le,ue),ne(F,z)},[()=>ur(r().display.originalPrice),()=>ur(r().final_price_cents)]),S(B,H)},W=B=>{var H=ET(),G=M(H,!0);P(H),ae(le=>ne(G,le),[()=>ur(r().final_price_cents)]),S(B,H)};ce($,B=>{r().display?.discounted?B(L):B(W,-1)}),P(O);var N=X(O,2),se=M(N),V=B=>{var H=TT(),G=M(H,!0);P(H),ae(()=>ne(G,r().quantity)),S(B,H)},oe=B=>{var H=AT();Ve(H,21,()=>Rp(p(s).min,p(s).max,{floor:1}),G=>G.value,(G,le)=>{var de=xT(),F=M(de,!0);P(de);var ue={};ae(()=>{Nl(de,r().quantity===p(le).value),ne(F,p(le).label),ue!==(ue=p(le).value)&&(de.value=(de.__value=p(le).value)??"")}),S(G,de)}),P(H),ae(G=>ke(H,"aria-label",G),[()=>C.t("cart.content.table.edit")]),Rt("change",H,G=>l(G.target)),S(B,H)};ce(se,B=>{i()?B(V):B(oe,-1)}),P(N);var pe=X(N,2),J=B=>{var H=OT(),G=M(H);P(H),ae(le=>ke(G,"aria-label",le),[()=>C.t("cart.item.remove")]),Rt("click",G,c),S(B,H)};ce(pe,B=>{i()||B(J)});var ie=X(pe,2),Y=M(ie,!0);P(ie),P(v),P(m),ae(B=>ne(Y,B),[()=>ur(r().total_price_cents)]),S(g,m)};return ce(h,g=>{p(s)&&g(f)}),S(e,u),ee(d)}Lr(["change","click"]),te(Lp,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var DT=j('<li class="go-cart-header-remove"></li>'),IT=j('<li class="go-cart-item"><!></li>'),PT=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 $T(e,t){Q(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=U(i),o=a=>{var l=PT(),c=M(l),d=M(c),u=M(d),h=M(u,!0);P(u);var f=X(u,2),g=M(f,!0);P(f);var m=X(f,2),v=M(m,!0);P(m);var _=X(m,2),T=O=>{var $=DT();S(O,$)};ce(_,O=>{p(n).preview||O(T)});var A=X(_,2),E=M(A,!0);P(A),P(d),P(c);var x=X(c,2);Ve(x,17,()=>p(n).displayCart.items,O=>O.uuid,(O,$)=>{var L=IT();Lp(M(L),{get displayItem(){return p($)},get displayCart(){return p(n).displayCart},get preview(){return p(n).preview}}),P(L),S(O,L)}),P(l),ae((O,$,L,W)=>{ne(h,O),ne(g,$),ne(v,L),ne(E,W)},[()=>C.t("cart.content.table.desc"),()=>C.t("cart.content.table.price"),()=>C.t("cart.content.table.quantity"),()=>C.t("cart.content.table.total")]),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.items.length&&a(o)}),S(e,i),ee()}customElements.define("go-cart-items",te($T,{},[],[]));var MT=j('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),FT=j('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),NT=j('<ol data-testid="cart-coupons"></ol>');function RT(e,t){Q(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=U(i),o=a=>{var l=NT();Ve(l,21,()=>p(n).displayCart.coupons,c=>c.code,(c,d)=>{var u=FT();let h;var f=M(u),g=M(f),m=M(g),v=M(m,!0);P(m);var _=X(m,2),T=A=>{var E=MT(),x=M(E);P(E),ae(O=>ke(x,"aria-label",O),[()=>C.t("cart.coupons.remove")]),Rt("click",x,()=>C.cart?.removeCoupon(p(d).code)),S(A,E)};ce(_,A=>{p(n).preview||A(T)}),P(g),P(f),P(u),ae(()=>{h=zt(u,1,"go-cart-coupon",null,h,{"go-cart-coupon-inactive":!p(d).applied}),ne(v,p(d).code)}),S(c,u)}),P(l),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.coupons.length>0&&a(o)}),S(e,i),ee()}Lr(["click"]),customElements.define("go-cart-coupons",te(RT,{},[],[]));var LT=j('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function zT(e,t){Q(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=U(i),o=a=>{var l=LT(),c=M(l,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).totalPriceCents)]),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.items.length&&a(o)}),S(e,i),ee()}customElements.define("go-cart-total-amount",te(zT,{},[],[]));function UT(e,t){Q(t,!0);const r=b(t,"preview",7,!1),n=new mT;vT(t.$$host,n),me(()=>{n.preview=r()}),me(()=>{C.cart&&(C.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),C.cart.coupons.map(s=>s.code).join("|"),Ue(()=>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}))}),ee({get preview(){return r()},set preview(s=!1){r(s),y()}})}customElements.define("go-cart",te(UT,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var VT=j('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function BT(e,t){Q(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=U(i),o=a=>{var l=VT(),c=M(l,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).subtotalPriceCents)]),S(a,l)};ce(s,a=>{p(n)&&C.cart?.items.length&&a(o)}),S(e,i),ee()}customElements.define("go-cart-subtotal-amount",te(BT,{},[],[]));var qT=j('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function jT(e,t){Q(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=U(i),o=a=>{var l=qT(),c=X(M(l),1,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).discountedAmountCents)]),S(a,l)};ce(s,a=>{p(n)&&p(n).discountedAmountCents>0&&a(o)}),S(e,i),ee()}customElements.define("go-cart-discounted-amount",te(jT,{},[],[]));function ZT(e,t){Q(t,!0),$n(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),ee()}customElements.define("go-cart-empty",te(ZT,{},[],[]));function WT(e,t){Q(t,!0);let r=D(()=>C.cart?.items.length);Et();var n=Lt();ae(()=>ne(n,p(r))),S(e,n),ee()}customElements.define("go-cart-counter",te(WT,{},[],[]));function HT(e,t){Q(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}]}),$n(t.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),t.$$host.addEventListener("submit",async i=>{const s=i.target;if(!p(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");p(n).paymentModeId=a==null?void 0:String(a);const l=await C.checkout(p(n).orderData());if(l.error){s.details.apiErrors=l.error;return}const c=Xe.config.forms.checkoutGuest?.beforeSubmit;c&&await c(s.details.formData);const d=l.data.meta.payment_url;Xe.config.navigateTo?.(d)}),ee({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-checkout-form",te(HT,{custom:{}},[],[]));var GT="TokenActions::ApplyOrderDiscount";async function KT(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===GT?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?JT(e,r):r.value_cents&&r.value_cents>0?YT(e,r.value_cents):Du([C.t("cart.coupon.form.errors.notValid")]):Du([C.t("cart.coupon.form.errors.notValid")])}function YT(e,t){return C.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function JT(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 Du([C.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return C.cart.addItem(ft(ia(n),{quantity:1})),C.cart.addCoupon({code:e,kind:"serviceVoucher"}),{success:!0}}function Du(e){return{success:!1,errors:e}}var XT=j("<go-form></go-form>",2);function QT(e,t){Q(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 KT(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=XT();return Gn(o,"formId","couponRedemption"),Cl("submit",o,n),S(e,o),ee(s)}customElements.define("go-coupon-redemption",te(QT,{},[],["flush"])),eb();var ex=class{#e=re();get campaign(){return p(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=re();get amount(){return p(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")||"[]");Sn(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())}},Ot=new ex,tx=j('<img alt="logo"/>'),rx=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){Q(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=rx();let o;var a=M(s),l=M(a),c=m=>{var v=tx();ae(_=>ke(v,"src",_),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),S(m,v)};ce(l,m=>{r().picture.thumbnail&&m(c)}),P(a);var d=X(a,2),u=M(d),h=M(u,!0);P(u);var f=X(u,2),g=M(f,!0);return P(f),P(d),P(s),ae(()=>{o=zt(s,1,"go-donation-campaign",null,o,{selected:Ot.campaign?.id===r()?.id}),ne(h,p(n)["donations.headline"]),ne(g,p(n)["donations.shop.info"])}),Rt("click",s,()=>Ot.selectCampaign(r())),Rt("keydown",s,m=>{m.key==="Enter"&&Ot.selectCampaign(r())}),S(e,s),ee(i)}Lr(["click","keydown"]),te(zp,{campaign:{}},[],[],{mode:"open"});function nx(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 ix=j("<button> </button>"),sx=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>'),ox=j('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Up(e,t){Q(t,!0);const r=Ot.campaign?.guest_limit/100;let n=re(void 0);function i(h){Ot.amount=h,I(n,null)}function s(h){const f=document.getElementById("donationForm");f.checkValidity()?Ot.amount=h.target.valueAsNumber*100:(Ot.amount=void 0,f.reportValidity())}var o=ox(),a=M(o),l=M(a,!0);P(a);var c=X(a,2);Ve(c,20,()=>Ot.campaign?.options,h=>h,(h,f)=>{var g=ix();let m;var v=M(g,!0);P(g),ae(_=>{m=zt(g,1,"btn btn-default",null,m,{selected:Ot.amount===f}),ne(v,_)},[()=>nx(f/100,C.currency)]),Rt("click",g,()=>i(f)),S(h,g)}),P(c);var d=X(c,2),u=h=>{var f=sx(),g=M(f),m=M(g),v=M(m,!0);P(m);var _=X(m,2);Fo(_),P(g),P(f),ae((T,A)=>{ne(v,T),ke(_,"max",r),ke(_,"placeholder",A),kf(_,p(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),Rt("input",_,s),S(h,f)};ce(d,h=>{Ot.campaign?.free_donations&&h(u)}),P(o),ae(h=>ne(l,h),[()=>C.t("donations.selection.title")]),S(e,o),ee()}Lr(["click","input"]),te(Up,{},[],[],{mode:"open"});var ax=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 lx(e,t){Q(t,!1),rn(()=>{C.donations?.campaigns?.length==1&&Ot.selectCampaign(C.donations?.campaigns[0])}),Zl();var r=K(),n=U(r),i=s=>{var o=ax(),a=M(o);Ve(a,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{zp(m,{get campaign(){return p(v)}})});var l=X(a,2),c=m=>{Up(m,{})};ce(l,m=>{Ot.campaign&&m(c)});var d=X(l,2),u=M(d),h=M(u,!0);P(u);var f=X(u,2),g=M(f,!0);P(f),P(d),P(o),ae((m,v)=>{ne(h,m),f.disabled=!Ot.amount,ne(g,v)},[()=>C.t("donations.actions.continueWithoutDonation"),()=>C.t("donations.actions.addToCart")]),Rt("click",u,function(...m){Ot.skipDonation?.apply(this,m)}),Rt("click",f,function(...m){Ot.addDonationToCart?.apply(this,m)}),S(s,o)};ce(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),S(e,r),ee()}Lr(["click"]),customElements.define("go-donations",te(lx,{},[],[]));function ux(e){return typeof e=="function"}function Bs(e){return e!==null&&typeof e=="object"}var cx=["string","number","bigint","boolean"];function Iu(e){return e==null||cx.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Iu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var ca=Symbol("box"),Vp=Symbol("is-writable");function R(e,t){const r=D(e);return t?{[ca]:!0,[Vp]:!0,get current(){return p(r)},set current(n){t(n)}}:{[ca]:!0,get current(){return e()}}}function Bp(e){return Bs(e)&&ca in e}function dx(e){return Bp(e)?e:ux(e)?R(e):kr(e)}function kr(e){let t=re(Fe(e));return{[ca]:!0,[Vp]:!0,get current(){return p(t)},set current(r){I(t,r,!0)}}}function qp(...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 jp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,fx=/\n/g,hx=/^\s*/,px=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,mx=/^:\s*/,vx=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gx=/^[;\s]*/,yx=/^\s+|\s+$/g,bx=`
|
|
76
|
-
`,
|
|
77
|
-
`)}function
|
|
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 Kp={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%)"},Rx=Zs(Kp),Yp=typeof window<"u"?window:void 0,X2=typeof window<"u"?window.document:void 0,Q2=typeof window<"u"?window.navigator:void 0,eF=typeof window<"u"?window.location:void 0;function Lx(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var zx=class extends Map{#e=new Map;#t=re(0);#r=re(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?re(e):_n(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 p(this.#t),!1;return p(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{p(this.#t);return}return p(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),Nr(o);else if(i!==t){Nr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Nr(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),Nr(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);Nr(this.#t),e.clear()}}#s(){p(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)p(r)}keys(){return p(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(this.#r),super.size}},Ux=class{#e;#t;constructor(e={}){const{window:t=Yp,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=ml(n=>{const i=pt(t,"focusin",n),s=pt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?Lx(this.#e):null}},tF=new Ux;function Vx(e){return typeof e=="function"}var Ct=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return ob(this.#t)}get(){const e=bd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=bd(this.#t);return t===void 0?e:t}set(e){return sb(this.#t,e)}};function Bx(e,t){switch(e){case"post":me(t);break;case"pre":Sl(t);break}}function Pu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;Bx(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=Ue(()=>r(a,o));return o=a,l})}function Jp(e,t,r){const n=_s(()=>{let i=!1;Pu(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});me(()=>n)}function tt(e,t,r){Pu(e,"post",t,r)}function qx(e,t,r){Pu(e,"pre",t,r)}tt.pre=qx;function jx(e,t){Jp(e,"post",t)}function Zx(e,t){Jp(e,"pre",t)}jx.pre=Zx;function Xp(e){return Vx(e)?e():e}var Wx=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(p(this.#o)?.(),this.getSize().width));#a=D(()=>(p(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=Xp(this.#n);if(e)return ml(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??Yp,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Xp(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 p(this.#o)?.(),this.getSize()}get width(){return p(this.#s)}get height(){return p(this.#a)}};function Hx(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 Gx(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 Qp(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=re(Fe(o)),d=re(!1),u=re(void 0),h=re(Fe([]));const f=()=>{p(h).forEach(A=>A()),I(h,[],!0)},g=A=>{I(h,[...p(h),A],!0)},m=async(A,E,x=!1)=>{try{I(d,!0),I(u,void 0),f();const O=new AbortController;g(()=>O.abort());const $=await t(A,E,{data:p(c),refetching:x,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?Hx(m,a):l?Gx(m,l):m,_=Array.isArray(e)?e:[e];let T;return n((A,E)=>{s&&T||(T=A,v(Array.isArray(e)?A:A[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return p(c)},get loading(){return p(d)},get error(){return p(u)},mutate:A=>{I(c,A,!0)},refetch:A=>{const E=_.map(x=>x());return v(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],A??!0)}}}function Kx(e,t,r){return Qp(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];tt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function Yx(e,t,r){return Qp(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)})}Kx.pre=Yx;function ni(e){me(()=>()=>{e()})}function Jx(e,t){return setTimeout(t,e)}function Ws(e){sf().then(e)}var Xx=1,Qx=9,eA=11;function $u(e){return Bs(e)&&e.nodeType===Xx&&typeof e.nodeName=="string"}function em(e){return Bs(e)&&e.nodeType===Qx}function tA(e){return Bs(e)&&e.constructor?.name==="VisualViewport"}function rA(e){return Bs(e)&&e.nodeType!==void 0}function tm(e){return rA(e)&&e.nodeType===eA&&"host"in e}function nA(e,t){if(!e||!t||!$u(e)||!$u(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&tm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function da(e){return em(e)?e:tA(e)?e.document:e?.ownerDocument??document}function rm(e){return tm(e)?rm(e.host):em(e)?e.defaultView??window:$u(e)?e.ownerDocument?.defaultView??window:window}function iA(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Li=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return p(this.#e)}set root(e){I(this.#e,e)}constructor(e){typeof e=="function"?this.element=R(e):this.element=e}getDocument=()=>da(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>iA(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{[r_()]:r=>Bp(e)?(e.current=r,Ue(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Ue(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function Sr(e){return e?"true":"false"}function Mu(e){return e?"true":void 0}function Le(e){return e?"":void 0}function nm(e){return e?"open":"closed"}function sA(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var oA=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 fa(e){const t=new oA(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Fu="ArrowDown",im="ArrowLeft",sm="ArrowRight",Nu="ArrowUp",aA="Backspace",lA="Enter",rF="Escape",nF=" ",iF="Tab",sF="a",oF="P",aF="A",lF="p",on=typeof document<"u",om=uA();function uA(){return on&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Er(e){return e instanceof HTMLElement}function ii(e){return e instanceof Element}function cA(e){return e instanceof Element||e instanceof SVGElement}function ha(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Mn(e){return e===null}function pa(e){return e.pointerType==="touch"}function dA(e){return e!==null}var fA=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ni(()=>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?Ws(t):t()}},am=class{#e;#t;#r;#n=re(!1);#i=re(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 fA({ref:this.#e.ref,afterTick:this.#e.open}),ni(()=>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 p(this.#n)}get transitionStatus(){return p(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 hA=new Ct("BitsConfig");function pA(){const e=new mA(null,{});return hA.getOr(e).opts}var mA=class{opts;constructor(e,t){const r=vA(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function vA(e,t){return r=>R(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function lm(e,t){return r=>{const n=pA();return R(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var um=lm(e=>e.defaultLocale,"en"),uF=lm(e=>e.defaultPortalTo,"body"),gA=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 pt(e,this.eventName,n,r)}};function cm(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 dm(e,t){return e===t||e.contains(t)}function fm(e){return e?.ownerDocument??document}function yA(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 hm=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ma=hm.join(","),pm=typeof Element>"u",si=pm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,va=!pm&&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},ga=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]"):ga(t.parentNode))},bA=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},mm=function(t,r,n){if(ga(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ma));return r&&si.call(t,ma)&&i.unshift(t),i=i.filter(n),i},ya=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!ga(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=ya(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{si.call(o,ma)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!ga(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=ya(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},vm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},gm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bA(t))&&!vm(t)?0:t.tabIndex},_A=function(t,r){var n=gm(t);return n<0&&r&&!vm(t)?0:n},wA=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},ym=function(t){return t.tagName==="INPUT"},kA=function(t){return ym(t)&&t.type==="hidden"},SA=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},EA=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},TA=function(t){if(!t.name)return!0;var r=t.form||va(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=EA(i,t.form);return!s||s===t},xA=function(t){return ym(t)&&t.type==="radio"},AA=function(t){return xA(t)&&!TA(t)},OA=function(t){var r,n=t&&va(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=va(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},bm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},CA=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=si.call(t,"details>summary:first-of-type")?t.parentElement:t;if(si.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=va(t);if(a&&!a.shadowRoot&&i(a)===!0)return bm(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if(OA(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return bm(t);return!1},DA=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 si.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},ba=function(t,r){return!(r.disabled||kA(r)||CA(r,t)||SA(r)||DA(r))},Ru=function(t,r){return!(AA(r)||gm(r)<0||!ba(t,r))},IA=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},_m=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=_A(a,o),c=o?_m(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(wA).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},PA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:Ru.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:IA}):n=mm(t,r.includeContainer,Ru.bind(null,r)),_m(n)},$A=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:ba.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=mm(t,r.includeContainer,ba.bind(null,r)),n},MA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,ma)===!1?!1:Ru(r,t)},FA=hm.concat("iframe:not([inert]):not([inert] *)").join(","),NA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,FA)===!1?!1:ba(r,t)};function RA(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 Lu(e,t){return e>=0&&e<t.length}var LA="data-context-menu-trigger",zA="data-context-menu-content",cF=new Ct("Menu.Root"),dF=new Ct("Menu.Root | Menu.Sub"),fF=new Ct("Menu.Content"),hF=new Ct("Menu.Group | Menu.RadioGroup"),pF=new Ct("Menu.RadioGroup"),mF=new Ct("Menu.CheckboxGroup"),vF=new gA("bitsmenuopen",{bubbles:!1,cancelable:!0}),gF=fa({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 UA=class Gg{static create(t){return new Gg(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,me(()=>{this.#s=fm(this.opts.ref.current)});let r=Se;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),r()};tt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return Jx(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ni(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),this.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Ws(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return js(pt(this.#s,"pointerdown",js(this.#h,this.#f),{capture:!0}),pt(this.#s,"pointerdown",js(this.#p,this.#c)),pt(this.#s,"focusin",this.#l))}#d=t=>{let r=t;r.defaultPrevented&&(r=wm(t)),this.#e.current(t)};#c=cm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||qA(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=wm(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=pt(this.#s,"click",this.#d,{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=BA(this.opts.ref.current))};#m=t=>this.opts.ref.current?dm(this.opts.ref.current,t):!1;#v=cm(()=>{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 VA(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function BA(e){const t=[...globalThis.bitsDismissableLayers],r=VA(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function qA(e,t){const r=e.target;if(!cA(r))return!1;const n=!!r.closest(`[${LA}]`),i=!!t.closest(`[${zA}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:fm(r).documentElement.contains(r)&&!dm(t,r)&&yA(e,t)}function wm(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 km(e,t){Q(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=UA.create({id:R(()=>s()),interactOutsideBehavior:R(()=>r()),onInteractOutside:R(()=>n()),enabled:R(()=>a()),onFocusOutside:R(()=>i()),isValidEvent:R(()=>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()}},h=K(),f=U(h);return _e(f,()=>o()??Me,()=>({props:d.props})),S(e,h),ee(u)}te(km,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var jA=class Kg{static create(t){return new Kg(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Li(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=()=>pt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!ZA(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 ZA(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 Sm(e,t){Q(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);jA.create({escapeKeydownBehavior:R(()=>r()),onEscapeKeydown:R(()=>n()),enabled:R(()=>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=K(),c=U(l);return _e(c,()=>i()??Me),S(e,l),ee(a)}te(Sm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var WA=class Yg{static instance;#e=kr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Yg),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)}},HA=class Jg{#e=!1;#t=null;#r=WA.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.#d();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)&&NA(l))o.preventDefault(),l.focus();else{const c=this.#d(),d=this.#c()[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(pt(r,"focusin",n,{capture:!0}),pt(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#d(),l=this.#c()[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?PA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#u()[0]||null}#c(){return this.#t?$A(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 Jg(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ni(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function Em(e,t){Q(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=HA.use({enabled:R(()=>r()),trap:R(()=>n()),loop:i(),onCloseAutoFocus:R(()=>s()),onOpenAutoFocus:R(()=>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=K(),h=U(u);return _e(h,()=>a()??Me,()=>({props:c.props})),S(e,u),ee(d)}te(Em,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var Tm=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var GA=class Xg{static create(t){return new Xg(t)}opts;domContext;#e=Se;#t=!1;#r=Tm;#n=Tm;constructor(t){this.opts=t,this.domContext=new Li(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 js(pt(this.domContext.getDocument(),"pointerdown",this.#a),pt(this.domContext.getDocument(),"pointerup",qp(this.#o,this.#s)))}#s=t=>{this.#n(t)};#a=t=>{const r=this.opts.ref.current,n=t.target;!Er(r)||!Er(n)||!this.#t||!YA(this)||!nA(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=KA(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},xm=e=>e.style.userSelect||e.style.webkitUserSelect;function KA(e,t){const r=xm(t),n=xm(e);return _a(t,"none"),_a(e,"text"),()=>{_a(t,r),_a(e,n)}}function _a(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function YA(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function Am(e,t){Q(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);GA.create({id:R(()=>s()),onPointerDown:R(()=>n()),onPointerUp:R(()=>i()),enabled:R(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(h=!0){r(h),y()},get onPointerDown(){return n()},set onPointerDown(h=Se){n(h),y()},get onPointerUp(){return i()},set onPointerUp(h=Se){i(h),y()},get id(){return s()},set id(h){s(h),y()},get children(){return o()},set children(h){o(h),y()},get enabled(){return a()},set enabled(h){a(h),y()},get ref(){return l()},set ref(h){l(h),y()}},d=K(),u=U(d);return _e(u,()=>o()??Me),S(e,d),ee(c)}te(Am,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Fn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var JA=class{#e;#t=0;#r=re();#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,p(this.#r)===void 0&&(this.#n=_s(()=>{I(this.#r,this.#e(...e),!0)})),me(()=>()=>{this.#i()}),p(this.#r)}},wa=new zx,ka=re(null),zu=null,Hs=null,Gs=!1,Om=R(()=>{for(const e of wa.values())if(e)return!0;return!1}),Uu=null,XA=new JA(()=>{function e(){document.body.setAttribute("style",p(ka)??""),document.body.style.removeProperty("--scrollbar-width"),om&&zu?.(),I(ka,null)}function t(){Hs!==null&&(window.clearTimeout(Hs),Hs=null)}function r(i,s){t(),Gs=!0,Uu=Date.now();const o=Uu,a=()=>{Hs=null,Uu===o&&(Cm(wa)?Gs=!1:(Gs=!1,s()))},l=i===null?24:i;Hs=window.setTimeout(a,l)}function n(){p(ka)===null&&wa.size===0&&!Gs&&I(ka,document.body.getAttribute("style"),!0)}return tt(()=>Om.current,()=>{if(!Om.current)return;n(),Gs=!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",om&&(zu=pt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Ws(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ni(()=>()=>{zu?.()}),{get lockMap(){return wa},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),QA=class{#e=Fn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=XA.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=R(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ni(()=>{if(this.#n.lockMap.delete(this.#e),Cm(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function Cm(e){for(const[t,r]of e)if(r)return!0;return!1}function Vu(e,t){Q(t,!0);let r=b(t,"preventScroll",7,!0),n=b(t,"restoreScrollDelay",7,null);return r()&&new QA(r(),()=>n()),ee({get preventScroll(){return r()},set preventScroll(i=!0){r(i),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),y()}})}te(Vu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function eO(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(!Er(t)){const i=e.createElement("div");i.style.cssText=Rx,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(!Er(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Er(s)?s:null}}}function Sa(e){const t=eO(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 tO={defaultValue:void 0,granularity:"day"};function Dm(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...tO,...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(Vt())?s=n.toDate(Vt()):i&&s>i.toDate(Vt())&&(s=i.toDate(Vt()));const o=s.getFullYear(),a=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Ii(o,a,l,0,0,0):new Ls(o,a,l)}}function Im(e,t){let r;return t instanceof Cn?r=tp(e):t instanceof Ii?r=ep(e):r=ra(e),r.calendar!==t.calendar?Kt(r,t.calendar):r}function Bt(e,t=Vt()){return e instanceof Cn?e.toDate():e.toDate(t)}function rO(e){if(e instanceof Ls)return"date";if(e instanceof Ii)return"datetime";if(e instanceof Cn)return"zoneddatetime";throw new Error("Unknown date type")}function nO(e,t){switch(t){case"date":return ra(e);case"datetime":return ep(e);case"zoneddatetime":return tp(e);default:throw new Error(`Unknown date type: ${t}`)}}function iO(e){return e instanceof Ii}function Bu(e){return e instanceof Cn}function Ea(e){return iO(e)||Bu(e)}function Ks(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 oi(e,t){return e.compare(t)<0}function sO(e,t){return e.compare(t)>0}function Pm(e,t,r){const n=Nh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function $m(e,t,r){const n=Nh(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 Ta=["day","month","year"],xa=["hour","minute","second","dayPeriod"],Mm=["literal","timeZoneName"],Ys=[...Ta,...xa],Fm=[...Ys,...Mm],oO=[...xa,...Mm],yF=Fm.filter(e=>e!=="literal"),bF=oO.filter(e=>e!=="literal"),aO=["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"],lO=["year","month","day"],qu={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 uO(e){if(Nm(e))return qu[e];{const t=hO(e);return Nm(t)?qu[t]:qu.en}}function ju(e,t,r){return cO(e)?uO(r)[e]:fO(e)?t:dO(e)?"––":""}function Nm(e){return aO.includes(e)}function cO(e){return lO.includes(e)}function dO(e){return e==="hour"||e==="minute"||e==="second"}function fO(e){return e==="era"||e==="dayPeriod"}function hO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function Zu(e){const t=["hour","minute","second"],r=Ys.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 pO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!Lm(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];Mn(c)?a[l]=ju(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(!Mn(l)&&!Mn(d)){const u=r.part(i.set({[a]:l}),a,{hourCycle:e.hourCycle===24?"h23":void 0}),h=e.hourCycle===12||e.hourCycle===void 0&&Um(n)===12;if(a==="hour"&&h){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 ju(a,"",n)}else{if(Aa(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Mn(l))return ju(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 mO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,gO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!Lm(a.type)?{part:a.type,value:a.value}:{part:a.type,value:i[a.type]}).filter(a=>!(Mn(a.part)||Mn(a.value)||a.part==="timeZoneName"&&(!Bu(r)||s)))}function vO(e){const t=pO(e);return{obj:t,arr:mO({contentObj:t,...e})}}function gO(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 Rm(){return Ys.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Aa(e){return Ta.includes(e)}function Lm(e){return Ys.includes(e)}function yO(e){return Fm.includes(e)}function zm(e){return!on||!e?[]:Oa(e).map(t=>t.dataset.segment).filter(t=>Ys.includes(t))}function bO(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(Mn(a))continue;s=s.set({[o]:t[o]})}else if(Aa(o)){const a=t[o];if(Mn(a))continue;s=s.set({[o]:t[o]})}return s}function _O(e,t){const r=zm(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Aa(n)&&e[n]===null)return!1;return!0}function wO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(xa.includes(t)||Ta.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function kO(e,t){return t||(Ea(e)?"minute":"day")}function Wu(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||ha(e))}function SO(e,t){if(!on)return!1;const r=Oa(t);return r.length?r[0].id===e:!1}function EO(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=Zs({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function TO(e,t){if(!on)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function Um(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 Js(e,t){const r=e.currentTarget;if(!Er(r))return;const{prev:n,next:i}=Hu(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function xO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function AO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function Hu(e,t){const r=Oa(t);return r.length?{next:xO(e,r),prev:AO(e,r)}:{next:null,prev:null}}function Vm(e,t){const r=e.currentTarget;if(!Er(r))return;const{next:n}=Hu(r,t);n&&n.focus()}function Bm(e,t){const r=e.currentTarget;if(!Er(r))return;const{prev:n}=Hu(r,t);n&&n.focus()}function Xs(e){return e==="ArrowRight"||e==="ArrowLeft"}function Oa(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Er(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!yO(r)||r==="literal")}):[]}function OO(e){return Oa(e)[0]}var CO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function qm(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new _r(t,g).format(f)}function s(f,g=!0){return Ea(f)&&g?i(Bt(f),{dateStyle:"long",timeStyle:"long"}):i(Bt(f),{dateStyle:"long"})}function o(f){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new _r(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new _r(t,{month:e.monthFormat.current}).format(f)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new _r(t,{year:e.yearFormat.current}).format(f)}`}function a(f){return new _r(t,{month:"long"}).format(f)}function l(f){return new _r(t,{year:"numeric"}).format(f)}function c(f,g){return Bu(f)?new _r(t,{...g,timeZone:f.timeZone}).formatToParts(Bt(f)):new _r(t,g).formatToParts(Bt(f))}function d(f,g="narrow"){return new _r(t,{weekday:g}).format(f)}function u(f,g=void 0){return new _r(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function h(f,g,m={}){const v=c(f,{...CO,...m}).find(_=>_.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:h,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function DO(e){return!(!Er(e)||!e.hasAttribute("data-bits-day"))}function jm(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 Gu(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=Ks(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=fu(t),l=A1(t),c=r!==void 0?Pm(a,r,"en-US"):Pm(a,0,i),d=r!==void 0?$m(l,r,"en-US"):$m(l,0,i),u=jm(c.subtract({days:1}),a),h=jm(l,d.add({days:1})),f=u.length+o.length+h.length;if(n&&f<42){const m=42-f;let v=h[h.length-1];v||(v=t.add({months:1}).set({day:1}));let _=m;h.length===0&&(_=m-1,h.push(v));const T=Array.from({length:_},(A,E)=>{const x=E+1;return v.add({days:x})});h.push(...T)}const g=u.concat(o,h);return{value:t,dates:g,weeks:RA(g,7)}}function Qs(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(Gu({...n,dateObj:r})),i;i.push(Gu({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(Gu({...n,dateObj:o}))}return i}function Ku(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Er(t)):[]}function Zm(e,t){const r=e.getAttribute("data-value");r&&(t.current=Im(r,t.current))}function IO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=Ku(n);if(!l.length)return;const c=l.indexOf(e)+t;if(Lu(c,l)){const d=l[c];return Zm(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Ws(()=>{const u=Ku(n);if(!u.length)return;const h=u.length-Math.abs(c);if(Lu(h,u)){const f=u[h];return Zm(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}),Ws(()=>{const u=Ku(n);if(!u.length)return;const h=c-l.length;if(Lu(h,u))return u[h].focus()})}}var Wm=[Fu,Nu,im,sm],Hm=[lA," "];function PO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!DO(i)||!Wm.includes(e.key)&&!Hm.includes(e.key))return;e.preventDefault();const s={[Fu]:7,[Nu]:-7,[im]:-1,[sm]:1};if(Wm.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(Hm.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,Im(o,n))}}function $O({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=Qs({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function MO({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=Qs({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function FO({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Bt(i),r)):[]}function NO(e){me(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Ue(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(Qs({...o,dateObj:s}))})})}function RO({calendarNode:e,label:t,accessibleHeadingId:r}){const n=da(e),i=n.createElement("div");i.style.cssText=Zs({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 LO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){me(()=>{e.current,Ue(()=>{t().some(a=>cu(a,e.current))||o(Qs({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function zO({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?sO(n.add({months:1}).set({day:1}),e):!1}function UO({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?oi(n.subtract({months:1}).set({day:35}),e):!1}function VO({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Bt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Bt(e[0].value),i=Bt(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 BO({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Le(r),"data-disabled":Le(n),"data-readonly":Le(i)}}function qO(e){const t=da(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function jO(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 nO(n,i)}function ZO({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&oi(a,n.current)||i.current&&oi(i.current,a))}tt(()=>e.current,()=>{e.current&&t.current&&xn(t.current,r)&&o(r)&&(t.current=jO(e.current)??r)})}function WO(e,t){return!e||!t?e:Ea(e)&&Ea(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var HO=fa({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 GO(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 Tr=new Ct("Calendar.Root | RangeCalender.Root"),Gm=class Qg{static create(t){return Tr.set(new Qg(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return p(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Fn();domContext;attachment;#t=re(Fe([]));get months(){return p(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 Li(t.ref),this.announcer=Sa(null),this.formatter=qm({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=Sa(this.domContext.getDocument())}),this.months=Qs({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(),LO({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}),NO({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)}),ZO({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(()=>FO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return p(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>Ue(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return p(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>GO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return p(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){me(()=>{if(Ue(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){me(()=>{if(this.opts.ref.current)return RO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){Sl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){$O({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(){MO({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(()=>zO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return p(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>UO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return p(this.#u)}set isPrevButtonDisabled(t){I(this.#u,t)}#d=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 p(this.#d)}set isInvalid(t){I(this.#d,t)}#c=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,VO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return p(this.#c)}set headingValue(t){I(this.#c,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return p(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>cu(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&&oi(t,r)||n&&oi(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>xn(n,t)):r?xn(r,t):!1}shiftFocus(t,r){return IO({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=WO(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=>xn(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=>!xn(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&&xn(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){PO({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return p(this.#f)}set snippetProps(t){I(this.#f,t)}getBitsAttr=t=>HO.getAttr(t);#m=D(()=>({...BO({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 p(this.#m)}set props(t){I(this.#m,t)}},KO=class ey{static create(t){return new ey(t,Tr.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":Mu(!0),"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},Km=new Ct("Calendar.Cell | RangeCalendar.Cell"),YO=class ty{static create(t){return Km.set(new ty(t,Tr.get()))}opts;root;#e=D(()=>Bt(this.opts.date.current));get cellDate(){return p(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return p(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>S1(this.opts.date.current,Vt()));get isDateToday(){return p(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!cu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return p(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return p(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 p(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>xn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return p(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return p(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 p(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 p(this.#u)}set snippetProps(t){I(this.#u,t)}#d=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return p(this.#d)}set ariaDisabled(t){I(this.#d,t)}#c=D(()=>({"data-unavailable":Le(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":Le(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":rO(this.opts.date.current),"data-disabled":Le(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return p(this.#c)}set sharedDataAttrs(t){I(this.#c,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":Sr(this.isSelectedDate),"aria-disabled":Sr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return p(this.#h)}set props(t){I(this.#h,t)}},JO=class ry{static create(t){return new ry(t,Km.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 p(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":Sr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:p(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#r)}set props(t){I(this.#r,t)}},XO=class ny{static create(t){return new ny(t,Tr.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return p(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":Sr(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},QO=class iy{static create(t){return new iy(t,Tr.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return p(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":Sr(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},eC=class sy{static create(t){return new sy(t,Tr.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":Sr(this.root.opts.readonly.current),"aria-disabled":Sr(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),"data-disabled":Le(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},tC=class oy{static create(t){return new oy(t,Tr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},rC=class ay{static create(t){return new ay(t,Tr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},nC=class ly{static create(t){return new ly(t,Tr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},iC=class uy{static create(t){return new uy(t,Tr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},sC=class cy{static create(t){return new cy(t,Tr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},oC=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"]),aC=j("<div><!></div>");function Ym(e,t){Q(t,!0);let r=b(t,"child",7),n=b(t,"children",7),i=b(t,"id",23,Fn),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),h=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),T=b(t,"calendarLabel",7,"Event"),A=b(t,"disabled",7,!1),E=b(t,"readonly",7,!1),x=b(t,"minValue",7,void 0),O=b(t,"maxValue",7,void 0),$=b(t,"preventDeselect",7,!1),L=b(t,"type",7),W=b(t,"disableDaysOutsideMonth",7,!0),N=b(t,"initialFocus",7,!1),se=b(t,"maxDays",7),V=b(t,"monthFormat",7,"long"),oe=b(t,"yearFormat",7,"numeric"),pe=je(t,oC);const J=Dm({defaultValue:o(),minValue:x(),maxValue:O()});function ie(){l()===void 0&&l(J)}ie(),tt.pre(()=>l(),()=>{ie()});function Y(){o()===void 0&&o(L()==="single"?void 0:[])}Y(),tt.pre(()=>o(),()=>{Y()});const B=Gm.create({id:R(()=>i()),ref:R(()=>s(),z=>s(z)),weekdayFormat:R(()=>d()),weekStartsOn:R(()=>u()),pagedNavigation:R(()=>h()),isDateDisabled:R(()=>f()),isDateUnavailable:R(()=>g()),fixedWeeks:R(()=>m()),numberOfMonths:R(()=>v()),locale:um(()=>_()),calendarLabel:R(()=>T()),readonly:R(()=>E()),disabled:R(()=>A()),minValue:R(()=>x()),maxValue:R(()=>O()),disableDaysOutsideMonth:R(()=>W()),initialFocus:R(()=>N()),maxDays:R(()=>se()),placeholder:R(()=>l(),z=>{l(z),c()(z)}),preventDeselect:R(()=>$()),value:R(()=>o(),z=>{o(z),a()(z)}),type:R(()=>L()),monthFormat:R(()=>V()),yearFormat:R(()=>oe()),defaultPlaceholder:J}),H=D(()=>We(pe,B.props));var G={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=Fn()){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 h()},set pagedNavigation(z=!1){h(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 T()},set calendarLabel(z="Event"){T(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 x()},set minValue(z=void 0){x(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 L()},set type(z){L(z),y()},get disableDaysOutsideMonth(){return W()},set disableDaysOutsideMonth(z=!0){W(z),y()},get initialFocus(){return N()},set initialFocus(z=!1){N(z),y()},get maxDays(){return se()},set maxDays(z){se(z),y()},get monthFormat(){return V()},set monthFormat(z="long"){V(z),y()},get yearFormat(){return oe()},set yearFormat(z="numeric"){oe(z),y()}},le=K(),de=U(le),F=z=>{var ge=K(),fe=U(ge);{let w=D(()=>({props:p(H),...B.snippetProps}));_e(fe,r,()=>p(w))}S(z,ge)},ue=z=>{var ge=aC();Ne(ge,()=>({...p(H)}));var fe=M(ge);_e(fe,()=>n()??Me,()=>B.snippetProps),P(ge),S(z,ge)};return ce(de,z=>{r()?z(F):z(ue,-1)}),S(e,le),ee(G)}te(Ym,{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 lC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),uC=j("<div><!></div>");function Yu(e,t){const r=gt();Q(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,lC);const l=JO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);{let T=D(()=>({props:p(c),...l.snippetProps}));_e(_,i,()=>p(T))}S(m,v)},g=m=>{var v=uC();Ne(v,()=>({...p(c)}));var _=M(v),T=E=>{var x=K(),O=U(x);_e(O,()=>n()??Me,()=>l.snippetProps),S(E,x)},A=E=>{var x=Lt();ae(()=>ne(x,l.cell.opts.date.current.day)),S(E,x)};ce(_,E=>{n()?E(T):E(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Yu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var cC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),dC=j("<table><!></table>");function Ju(e,t){const r=gt();Q(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=eC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=dC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Ju,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var fC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),hC=j("<tbody><!></tbody>");function Xu(e,t){const r=gt();Q(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=tC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=hC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Xu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var pC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),mC=j("<td><!></td>");function Qu(e,t){const r=gt();Q(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,pC);const d=YO.create({id:R(()=>o()),ref:R(()=>s(),_=>s(_)),date:R(()=>a()),month:R(()=>l())}),u=D(()=>We(c,d.props));var h={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=K(),g=U(f),m=_=>{var T=K(),A=U(T);{let E=D(()=>({props:p(u),...d.snippetProps}));_e(A,i,()=>p(E))}S(_,T)},v=_=>{var T=mC();Ne(T,()=>({...p(u)}));var A=M(T);_e(A,()=>n()??Me,()=>d.snippetProps),P(T),S(_,T)};return ce(g,_=>{i()?_(m):_(v,-1)}),S(e,f),ee(h)}te(Qu,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var vC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),gC=j("<thead><!></thead>");function ec(e,t){const r=gt();Q(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,vC);const l=rC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=gC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(ec,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var yC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),bC=j("<th><!></th>");function tc(e,t){const r=gt();Q(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,yC);const l=iC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=bC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(tc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var _C=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),wC=j("<tr><!></tr>");function eo(e,t){const r=gt();Q(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=nC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=wC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(eo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var kC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),SC=j("<header><!></header>");function rc(e,t){const r=gt();Q(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,kC);const l=sC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=SC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(rc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var EC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),TC=j("<div><!></div>");function nc(e,t){const r=gt();Q(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,EC);const l=KO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c),headingValue:l.root.headingValue})),S(m,v)},g=m=>{var v=TC();Ne(v,()=>({...p(c)}));var _=M(v),T=E=>{var x=K(),O=U(x);_e(O,()=>n()??Me,()=>({headingValue:l.root.headingValue})),S(E,x)},A=E=>{var x=Lt();ae(()=>ne(x,l.root.headingValue)),S(E,x)};ce(_,E=>{n()?E(T):E(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(nc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var xC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),AC=j("<button><!></button>");function ic(e,t){const r=gt();Q(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,xC);const c=XO.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(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()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=AC();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>n()??Me),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),ee(u)}te(ic,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var OC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),CC=j("<button><!></button>");function sc(e,t){const r=gt();Q(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,OC);const c=QO.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(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()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=CC();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>n()??Me),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),ee(u)}te(sc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var DC=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Jm=j("<input/>");function Xm(e,t){Q(t,!0);let r=b(t,"value",15),n=je(t,DC);const i=D(()=>We(n,{"aria-hidden":"true",tabindex:-1,style:{...Kp,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),y()}},o=K(),a=U(o),l=d=>{var u=Jm();Ne(u,()=>({...p(i),value:r()}),void 0,void 0,void 0,void 0,!0),S(d,u)},c=d=>{var u=Jm();Ne(u,()=>({...p(i)}),void 0,void 0,void 0,void 0,!0),Ro(u,r),S(d,u)};return ce(a,d=>{p(i).type==="checkbox"?d(l):d(c,-1)}),S(e,o),ee(s)}te(Xm,{value:{}},[],[],{mode:"open"});var IC=["top","right","bottom","left"],Nn=Math.min,Yt=Math.max,Ca=Math.round,Da=Math.floor,Wr=e=>({x:e,y:e}),PC={left:"right",right:"left",bottom:"top",top:"bottom"};function oc(e,t,r){return Yt(e,Nn(t,r))}function an(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function zi(e){return e.split("-")[1]}function ac(e){return e==="x"?"y":"x"}function lc(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function uc(e){return ac(Hr(e))}function $C(e,t,r){r===void 0&&(r=!1);const n=zi(e),i=uc(e),s=lc(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Ia(o)),[o,Ia(o)]}function MC(e){const t=Ia(e);return[cc(e),t,cc(t)]}function cc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Qm=["left","right"],ev=["right","left"],FC=["top","bottom"],NC=["bottom","top"];function RC(e,t,r){switch(e){case"top":case"bottom":return r?t?ev:Qm:t?Qm:ev;case"left":case"right":return t?FC:NC;default:return[]}}function LC(e,t,r,n){const i=zi(e);let s=RC(ln(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(cc)))),s}function Ia(e){const t=ln(e);return PC[t]+e.slice(t.length)}function zC(e){return{top:0,right:0,bottom:0,left:0,...e}}function tv(e){return typeof e!="number"?zC(e):{top:e,right:e,bottom:e,left:e}}function Pa(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 rv(e,t,r){let{reference:n,floating:i}=e;const s=Hr(t),o=uc(t),a=lc(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,h=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(zi(t)){case"start":f[o]-=h*(r&&c?-1:1);break;case"end":f[o]+=h*(r&&c?-1:1);break}return f}async function UC(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:h=!1,padding:f=0}=an(t,e),g=tv(f),m=a[h?u==="floating"?"reference":"floating":u],v=Pa(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,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},E=Pa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:T,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 VC=50,BC=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:UC},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}=rv(c,n,l),h=n,f=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:_,fn:T}=v,{x:A,y:E,data:x,reset:O}=await T({x:d,y:u,initialPlacement:n,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=A??d,u=E??u,g[_]={...g[_],...x},O&&f<VC&&(f++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=rv(c,h,l)),m=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}},qC=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=tv(d),h={x:r,y:n},f=uc(i),g=lc(f),m=await o.getDimensions(c),v=f==="y",_=v?"top":"left",T=v?"bottom":"right",A=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[f]-h[f]-s.floating[g],x=h[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 L=E/2-x/2,W=$/2-m[g]/2-1,N=Nn(u[_],W),se=Nn(u[T],W),V=N,oe=$-m[g]-se,pe=$/2-m[g]/2+L,J=oc(V,pe,oe),ie=!l.arrow&&zi(i)!=null&&pe!==J&&s.reference[g]/2-(pe<V?N:se)-m[g]/2<0,Y=ie?pe<V?pe-V:pe-oe:0;return{[f]:h[f]+Y,data:{[f]:J,centerOffset:pe-J-Y,...ie&&{alignmentOffset:Y}},reset:ie}}}),jC=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:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=an(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=ln(i),T=Hr(a),A=ln(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(A||!m?[Ia(a)]:MC(a)),O=g!=="none";!h&&O&&x.push(...LC(a,m,g,E));const $=[a,...x],L=await l.detectOverflow(t,v),W=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&W.push(L[_]),u){const pe=$C(i,o,E);W.push(L[pe[0]],L[pe[1]])}if(N=[...N,{placement:i,overflows:W}],!W.every(pe=>pe<=0)){var se,V;const pe=(((se=s.flip)==null?void 0:se.index)||0)+1,J=$[pe];if(J&&(!(u==="alignment"&&T!==Hr(J))||N.every(Y=>Hr(Y.placement)===T?Y.overflows[0]>0:!0)))return{data:{index:pe,overflows:N},reset:{placement:J}};let ie=(V=N.filter(Y=>Y.overflows[0]<=0).sort((Y,B)=>Y.overflows[1]-B.overflows[1])[0])==null?void 0:V.placement;if(!ie)switch(f){case"bestFit":{var oe;const Y=(oe=N.filter(B=>{if(O){const H=Hr(B.placement);return H===T||H==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(H=>H>0).reduce((H,G)=>H+G,0)]).sort((B,H)=>B[1]-H[1])[0])==null?void 0:oe[0];Y&&(ie=Y);break}case"initialPlacement":ie=a;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};function nv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iv(e){return IC.some(t=>e[t]>=0)}var ZC=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=nv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:iv(o)}}}case"escaped":{const o=nv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:iv(o)}}}default:return{}}}}},sv=new Set(["left","top"]);async function WC(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=zi(r),l=Hr(r)==="y",c=sv.has(o)?-1:1,d=s&&l?-1:1,u=an(t,e);let{mainAxis:h,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:h*c}:{x:h*c,y:f*d}}var HC=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 WC(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}}}}},GC=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:T,y:A}=_;return{x:T,y:A}}},...c}=an(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),h=Hr(ln(i)),f=ac(h);let g=d[f],m=d[h];if(o){const _=f==="y"?"top":"left",T=f==="y"?"bottom":"right",A=g+u[_],E=g-u[T];g=oc(A,g,E)}if(a){const _=h==="y"?"top":"left",T=h==="y"?"bottom":"right",A=m+u[_],E=m-u[T];m=oc(A,m,E)}const v=l.fn({...t,[f]:g,[h]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[h]:a}}}}}},KC=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),h=ac(u);let f=d[h],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=h==="y"?"height":"width",E=s.reference[h]-s.floating[A]+v.mainAxis,x=s.reference[h]+s.reference[A]-v.mainAxis;f<E?f=E:f>x&&(f=x)}if(c){var _,T;const A=h==="y"?"width":"height",E=sv.has(ln(i)),x=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:((T=o.offset)==null?void 0:T[u])||0)-(E?v.crossAxis:0);g<x?g=x:g>O&&(g=O)}return{[h]:f,[u]:g}}}},YC=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),h=zi(i),f=Hr(i)==="y",{width:g,height:m}=s.floating;let v,_;u==="top"||u==="bottom"?(v=u,_=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=u,v=h==="end"?"top":"bottom");const T=m-d.top-d.bottom,A=g-d.left-d.right,E=Nn(m-d[v],T),x=Nn(g-d[_],A),O=!t.middlewareData.shift;let $=E,L=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=A),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=T),O&&!h){const N=Yt(d.left,0),se=Yt(d.right,0),V=Yt(d.top,0),oe=Yt(d.bottom,0);f?L=g-2*(N!==0||se!==0?N+se:Yt(d.left,d.right)):$=m-2*(V!==0||oe!==0?V+oe:Yt(d.top,d.bottom))}await l({...t,availableWidth:L,availableHeight:$});const W=await o.getDimensions(a.floating);return g!==W.width||m!==W.height?{reset:{rects:!0}}:{}}}};function $a(){return typeof window<"u"}function Ui(e){return ov(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=(ov(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ov(e){return $a()?e instanceof Node||e instanceof Jt(e).Node:!1}function xr(e){return $a()?e instanceof Element||e instanceof Jt(e).Element:!1}function un(e){return $a()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function av(e){return!$a()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function to(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function JC(e){return/^(table|td|th)$/.test(Ui(e))}function Ma(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var XC=/transform|translate|scale|rotate|perspective|filter/,QC=/paint|layout|strict|content/,ai=e=>!!e&&e!=="none",dc;function fc(e){const t=xr(e)?Ar(e):e;return ai(t.transform)||ai(t.translate)||ai(t.scale)||ai(t.rotate)||ai(t.perspective)||!hc()&&(ai(t.backdropFilter)||ai(t.filter))||XC.test(t.willChange||"")||QC.test(t.contain||"")}function eD(e){let t=Rn(e);for(;un(t)&&!Vi(t);){if(fc(t))return t;if(Ma(t))return null;t=Rn(t)}return null}function hc(){return dc==null&&(dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),dc}function Vi(e){return/^(html|body|#document)$/.test(Ui(e))}function Ar(e){return Jt(e).getComputedStyle(e)}function Fa(e){return xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rn(e){if(Ui(e)==="html")return e;const t=e.assignedSlot||e.parentNode||av(e)&&e.host||Gr(e);return av(t)?t.host:t}function lv(e){const t=Rn(e);return Vi(t)?e.ownerDocument?e.ownerDocument.body:e.body:un(t)&&to(t)?t:lv(t)}function ro(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=lv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(i);if(s){const a=pc(o);return t.concat(o,o.visualViewport||[],to(i)?i:[],a&&r?ro(a):[])}else return t.concat(i,ro(i,[],r))}function pc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uv(e){const t=Ar(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=Ca(r)!==s||Ca(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function mc(e){return xr(e)?e:e.contextElement}function Bi(e){const t=mc(e);if(!un(t))return Wr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=uv(t);let o=(s?Ca(r.width):r.width)/n,a=(s?Ca(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var tD=Wr(0);function cv(e){const t=Jt(e);return!hc()||!t.visualViewport?tD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Jt(e)?!1:t}function li(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=mc(e);let o=Wr(1);t&&(n?xr(n)&&(o=Bi(n)):o=Bi(e));const a=rD(s,r,n)?cv(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 h=Jt(s),f=n&&xr(n)?Jt(n):n;let g=h,m=pc(g);for(;m&&n&&f!==g;){const v=Bi(m),_=m.getBoundingClientRect(),T=Ar(m),A=_.left+(m.clientLeft+parseFloat(T.paddingLeft))*v.x,E=_.top+(m.clientTop+parseFloat(T.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=A,c+=E,g=Jt(m),m=pc(g)}}return Pa({width:d,height:u,x:l,y:c})}function Na(e,t){const r=Fa(e).scrollLeft;return t?t.left+r:li(Gr(e)).left+r}function dv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Na(e,r),y:r.top+t.scrollTop}}function nD(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Gr(n),a=t?Ma(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)&&((Ui(n)!=="body"||to(o))&&(l=Fa(n)),u)){const f=li(n);c=Bi(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const h=o&&!u&&!s?dv(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+h.x,y:r.y*c.y-l.scrollTop*c.y+d.y+h.y}}function iD(e){return Array.from(e.getClientRects())}function sD(e){const t=Gr(e),r=Fa(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+Na(e);const a=-r.scrollTop;return Ar(n).direction==="rtl"&&(o+=Yt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var fv=25;function oD(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=hc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Na(n);if(c<=0){const d=n.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-f);g<=fv&&(s-=g)}else c<=fv&&(s+=c);return{width:s,height:o,x:a,y:l}}function aD(e,t){const r=li(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 hv(e,t,r){let n;if(t==="viewport")n=oD(e,r);else if(t==="document")n=sD(Gr(e));else if(xr(t))n=aD(t,r);else{const i=cv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Pa(n)}function pv(e,t){const r=Rn(e);return r===t||!xr(r)||Vi(r)?!1:Ar(r).position==="fixed"||pv(r,t)}function lD(e,t){const r=t.get(e);if(r)return r;let n=ro(e,[],!1).filter(a=>xr(a)&&Ui(a)!=="body"),i=null;const s=Ar(e).position==="fixed";let o=s?Rn(e):e;for(;xr(o)&&!Vi(o);){const a=Ar(o),l=fc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||to(o)&&!l&&pv(e,o))?n=n.filter(c=>c!==o):i=a,o=Rn(o)}return t.set(e,n),n}function uD(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ma(t)?[]:lD(t,this._c):[].concat(r),n],o=hv(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 h=hv(t,s[u],i);a=Yt(h.top,a),l=Nn(h.right,l),c=Nn(h.bottom,c),d=Yt(h.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function cD(e){const{width:t,height:r}=uv(e);return{width:t,height:r}}function dD(e,t,r){const n=un(t),i=Gr(t),s=r==="fixed",o=li(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Wr(0);function c(){l.x=Na(i)}if(n||!n&&!s)if((Ui(t)!=="body"||to(i))&&(a=Fa(t)),n){const u=li(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?dv(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 vc(e){return Ar(e).position==="static"}function mv(e,t){if(!un(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gr(e)===r&&(r=r.ownerDocument.body),r}function vv(e,t){const r=Jt(e);if(Ma(e))return r;if(!un(e)){let i=Rn(e);for(;i&&!Vi(i);){if(xr(i)&&!vc(i))return i;i=Rn(i)}return r}let n=mv(e,t);for(;n&&JC(n)&&vc(n);)n=mv(n,t);return n&&Vi(n)&&vc(n)&&!fc(n)?r:n||eD(e)||r}var fD=async function(e){const t=this.getOffsetParent||vv,r=this.getDimensions,n=await r(e.floating);return{reference:dD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function hD(e){return Ar(e).direction==="rtl"}var pD={convertOffsetParentRelativeRectToViewportRelativeRect:nD,getDocumentElement:Gr,getClippingRect:uD,getOffsetParent:vv,getElementRects:fD,getClientRects:iD,getDimensions:cD,getScale:Bi,isElement:xr,isRTL:hD};function gv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mD(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:h,height:f}=c;if(a||t(),!h||!f)return;const g=Da(u),m=Da(i.clientWidth-(d+h)),v=Da(i.clientHeight-(u+f)),_=Da(d),T={rootMargin:-g+"px "+-m+"px "+-v+"px "+-_+"px",threshold:Yt(0,Nn(1,l))||1};let A=!0;function E(x){const O=x[0].intersectionRatio;if(O!==l){if(!A)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!gv(c,e.getBoundingClientRect())&&o(),A=!1}try{r=new IntersectionObserver(E,{...T,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,T)}r.observe(e)}return o(!0),s}function vD(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=mc(e),d=i||s?[...c?ro(c):[],...t?ro(t):[]]:[];d.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const u=c&&a?mD(c,r):null;let h=-1,f=null;o&&(f=new ResizeObserver(_=>{let[T]=_;T&&T.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var A;(A=f)==null||A.observe(t)})),r()}),c&&!l&&f.observe(c),t&&f.observe(t));let g,m=l?li(e):null;l&&v();function v(){const _=li(e);m&&!gv(m,_)&&r(),m=_,g=requestAnimationFrame(v)}return r(),()=>{var _;d.forEach(T=>{i&&T.removeEventListener("scroll",r),s&&T.removeEventListener("resize",r)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var gD=HC,yD=GC,bD=jC,_D=YC,wD=ZC,kD=qC,SD=KC,ED=(e,t,r)=>{const n=new Map,i={platform:pD,...r},s={...i.platform,_c:n};return BC(e,t,{...i,platform:s})};function ui(e){return typeof e=="function"?e():e}function yv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bv(e,t){const r=yv(e);return Math.round(t*r)/r}function _v(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 TD(e){const t=e.whileElementsMounted,r=D(()=>ui(e.open)??!0),n=D(()=>ui(e.middleware)),i=D(()=>ui(e.transform)??!0),s=D(()=>ui(e.placement)??"bottom"),o=D(()=>ui(e.strategy)??"absolute"),a=D(()=>ui(e.sideOffset)??0),l=D(()=>ui(e.alignOffset)??0),c=e.reference;let d=re(0),u=re(0);const h=kr(null);let f=re(Fe(p(o))),g=re(Fe(p(s))),m=re(Fe({})),v=re(!1),_=!1,T=0;const A=D(()=>{const N=h.current?bv(h.current,p(d)):p(d),se=h.current?bv(h.current,p(u)):p(u);return p(i)?{position:p(f),left:"0",top:"0",transform:`translate(${N}px, ${se}px)`,...h.current&&yv(h.current)>=1.5&&{willChange:"transform"}}:{position:p(f),left:`${N}px`,top:`${se}px`}});let E;function x(){if(c.current===null||h.current===null)return;const N=c.current,se=h.current,V=++T;ED(N,se,{middleware:p(n),placement:p(s),strategy:p(o)}).then(oe=>{if(V===T&&!(c.current!==N||h.current!==se)){if(xD(N)){I(m,{...p(m),hide:{...p(m).hide,referenceHidden:!0}},!0);return}if(!p(r)&&p(d)!==0&&p(u)!==0){const pe=Math.max(Math.abs(p(a)),Math.abs(p(l)),15);if(oe.x<=pe&&oe.y<=pe)return}I(d,oe.x,!0),I(u,oe.y,!0),I(f,oe.strategy,!0),I(g,oe.placement,!0),I(m,oe.middlewareData,!0),I(v,!0)}})}function O(){typeof E=="function"&&(E(),E=void 0),T++}function $(){if(O(),t===void 0){x();return}p(r)&&(c.current===null||h.current===null||(E=t(c.current,h.current,x)))}function L(){!p(r)&&h.current===null&&I(v,!1)}function W(){return[p(n),p(s),p(o),p(a),p(l),p(r)]}return me(()=>{t===void 0&&p(r)&&x()}),me($),me(()=>{if(t!==void 0){if(W(),!p(r)){_=!1;return}if(!p(v)){_=!1;return}if(!_){_=!0;return}x()}}),me(L),me(()=>O),{floating:h,reference:c,get strategy(){return p(f)},get placement(){return p(g)},get middlewareData(){return p(m)},get isPositioned(){return p(v)},get floatingStyles(){return p(A)},get update(){return x}}}function xD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var AD={top:"bottom",right:"left",bottom:"top",left:"right"},gc=new Ct("Floating.Root"),wv=new Ct("Floating.Content"),yc=new Ct("Floating.Root"),OD=class nd{static create(t=!1){return t?yc.set(new nd):gc.set(new nd)}anchorNode=kr(null);customAnchorNode=kr(null);triggerNode=kr(null);constructor(){me(()=>{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})}},CD=class id{static create(t,r=!1){return r?wv.set(new id(t,yc.get())):wv.set(new id(t,gc.get()))}opts;root;contentRef=kr(null);wrapperRef=kr(null);arrowRef=kr(null);contentAttachment=Qe(this.contentRef);wrapperAttachment=Qe(this.wrapperRef);arrowAttachment=Qe(this.arrowRef);arrowId=kr(Fn());#e=D(()=>{if(typeof this.opts.style=="string")return qs(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new Wx(()=>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(()=>p(this.#a).length>0);get hasExplicitBoundaries(){return p(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:p(this.#a).filter(dA),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return p(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=re(void 0);#d=re(void 0);#c=re(void 0);#h=re(void 0);#p=D(()=>[gD({mainAxis:this.opts.sideOffset.current+p(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&yD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?SD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&bD({...this.detectOverflowOptions}),_D({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;I(this.#u,r,!0),I(this.#d,n,!0),I(this.#c,i,!0),I(this.#h,s,!0)}}),this.arrowRef.current&&kD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),ID({arrowWidth:p(this.#n),arrowHeight:p(this.#i)}),this.opts.hideWhenDetached.current&&wD({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return p(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>PD(this.floating.placement));get placedSide(){return p(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>$D(this.floating.placement));get placedAlign(){return p(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return p(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return p(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return p(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=re();get contentZIndex(){return p(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>AD[this.placedSide]);get arrowBaseSide(){return p(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":`${p(this.#u)}px`,"--bits-floating-available-height":`${p(this.#d)}px`,"--bits-floating-anchor-width":`${p(this.#c)}px`,"--bits-floating-anchor-height":`${p(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...p(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return p(this.#k)}set wrapperProps(t){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Zs({...p(this.#e)}),...this.contentAttachment}));get props(){return p(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 p(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=TD({strategy:()=>this.opts.strategy.current,placement:()=>p(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>vD(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),me(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),tt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=rm(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)}}),me(()=>{this.floating.floating.current=this.wrapperRef.current})}},DD=class sd{static create(t,r=!1){return r?new sd(t,yc.get()):new sd(t,gc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=dx(t.virtualEl.current):r.triggerNode=t.ref}};function ID(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]=bc(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,h=(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:`${h}px`):l==="left"&&(f=`${n.floating.width+a}px`,g=s?d:`${h}px`),{data:{x:f,y:g}}}}}function bc(e){const[t,r="center"]=e.split("-");return[t,r]}function PD(e){return bc(e)[0]}function $D(e){return bc(e)[1]}function kv(e,t){Q(t,!0);let r=b(t,"children",7),n=b(t,"tooltip",7,!1);OD.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=K(),o=U(s);return _e(o,()=>r()??Me),S(e,s),ee(i)}te(kv,{children:{},tooltip:{}},[],[],{mode:"open"});function Sv(e,t){Q(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);DD.create({id:R(()=>r()),virtualEl:R(()=>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=K(),c=U(l);return _e(c,()=>n()??Me),S(e,l),ee(a)}te(Sv,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function Ev(e,t){Q(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),h=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"),T=b(t,"style",23,()=>({})),A=b(t,"wrapperId",23,Fn),E=b(t,"customAnchor",7,null),x=b(t,"enabled",7),O=b(t,"tooltip",7,!1);const $=CD.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>s()),alignOffset:R(()=>o()),id:R(()=>a()),arrowPadding:R(()=>l()),avoidCollisions:R(()=>c()),collisionBoundary:R(()=>d()),collisionPadding:R(()=>u()),hideWhenDetached:R(()=>h()),onPlaced:R(()=>f()),sticky:R(()=>g()),updatePositionStrategy:R(()=>m()),strategy:R(()=>v()),dir:R(()=>_()),style:R(()=>T()),enabled:R(()=>x()),wrapperId:R(()=>A()),customAnchor:R(()=>E())},O()),L=D(()=>We($.wrapperProps,{style:{pointerEvents:"auto"}}));var W={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 h()},set hideWhenDetached(V=!1){h(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 T()},set style(V={}){T(V),y()},get wrapperId(){return A()},set wrapperId(V=Fn()){A(V),y()},get customAnchor(){return E()},set customAnchor(V=null){E(V),y()},get enabled(){return x()},set enabled(V){x(V),y()},get tooltip(){return O()},set tooltip(V=!1){O(V),y()}},N=K(),se=U(N);return _e(se,()=>r()??Me,()=>({props:$.props,wrapperProps:p(L)})),S(e,N),ee(W)}te(Ev,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function Tv(e,t){Q(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=K(),o=U(s);return _e(o,()=>r()??Me,()=>({props:{},wrapperProps:{}})),S(e,s),ee(i)}te(Tv,{content:{},onPlaced:{}},[],[],{mode:"open"});var MD=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function xv(e,t){Q(t,!0);let r=b(t,"content",7),n=b(t,"isStatic",7,!1),i=b(t,"onPlaced",7),s=je(t,MD);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=K(),l=U(a),c=u=>{Tv(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{Ev(u,kn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ce(l,u=>{n()?u(c):u(d,-1)}),S(e,a),ee(o)}te(xv,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var FD=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"]),ND=j("<!> <!>",1);function _c(e,t){Q(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),h=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),T=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),x=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),W=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),ie=b(t,"trapFocus",7,!0),Y=b(t,"isValidEvent",7,()=>!1),B=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),G=b(t,"enabled",7),le=b(t,"ref",7),de=b(t,"tooltip",7,!1),F=b(t,"contentPointerEvents",7,"auto"),ue=je(t,FD);const z=D(()=>O()??!0),ge=D(()=>E()??(p(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 h()},set alignOffset(w){h(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 T()},set hideWhenDetached(w){T(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 x()},set dir(w){x(w),y()},get preventScroll(){return O()},set preventScroll(w){O(w),y()},get wrapperId(){return $()},set wrapperId(w){$(w),y()},get style(){return L()},set style(w){L(w),y()},get onPlaced(){return W()},set onPlaced(w){W(w),y()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(w){se(w),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(w){V(w),y()},get onFocusOutside(){return oe()},set onFocusOutside(w){oe(w),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(w="close"){pe(w),y()},get loop(){return J()},set loop(w){J(w),y()},get trapFocus(){return ie()},set trapFocus(w=!0){ie(w),y()},get isValidEvent(){return Y()},set isValidEvent(w=()=>!1){Y(w),y()},get customAnchor(){return B()},set customAnchor(w=null){B(w),y()},get isStatic(){return H()},set isStatic(w=!1){H(w),y()},get enabled(){return G()},set enabled(w){G(w),y()},get ref(){return le()},set ref(w){le(w),y()},get tooltip(){return de()},set tooltip(w=!1){de(w),y()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),y()}};return xv(e,{get isStatic(){return H()},get id(){return o()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return T()},get updatePositionStrategy(){return A()},get strategy(){return p(ge)},get dir(){return x()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return W()},get customAnchor(){return B()},get enabled(){return G()},get tooltip(){return de()},content:(qe,Pe)=>{let Ye=()=>Pe?.().props,kt=()=>Pe?.().wrapperProps;var Ge=ND(),Xt=U(Ge),ct=Pt=>{Vu(Pt,{get preventScroll(){return p(z)}})},Qt=Pt=>{Vu(Pt,{get preventScroll(){return p(z)}})};ce(Xt,Pt=>{t.forceMount&&G()?Pt(ct):t.forceMount||Pt(Qt,1)});var St=X(Xt,2);Em(St,{get onOpenAutoFocus(){return V()},get onCloseAutoFocus(){return se()},get loop(){return J()},get enabled(){return G()},get trapFocus(){return ie()},get forceMount(){return t.forceMount},get ref(){return le()},focusScope:(er,jt)=>{let hr=()=>jt?.().props;Sm(er,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return G()},get ref(){return le()},children:(Cr,Dr)=>{km(Cr,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return pe()},get isValidEvent(){return Y()},get enabled(){return G()},get ref(){return le()},children:(Ir,pr)=>{let Jr=()=>pr?.().props;Am(Ir,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return G()},get ref(){return le()},children:(Xr,_t)=>{var zn=K(),rs=U(zn);{let ns=D(()=>({props:We(ue,Ye(),Jr(),hr(),{style:{pointerEvents:F()}}),wrapperProps:kt()}));_e(rs,()=>r()??Me,()=>p(ns))}S(Xr,zn)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),S(qe,Ge)},$$slots:{content:!0}}),ee(fe)}te(_c,{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 RD=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 Av(e,t){Q(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),h=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),T=b(t,"sticky",7),A=b(t,"hideWhenDetached",7),E=b(t,"updatePositionStrategy",7),x=b(t,"strategy",7),O=b(t,"dir",7),$=b(t,"preventScroll",7),L=b(t,"wrapperId",7),W=b(t,"style",7),N=b(t,"onPlaced",7),se=b(t,"onInteractOutside",7),V=b(t,"onCloseAutoFocus",7),oe=b(t,"onOpenAutoFocus",7),pe=b(t,"onFocusOutside",7),J=b(t,"interactOutsideBehavior",7,"close"),ie=b(t,"loop",7),Y=b(t,"trapFocus",7,!0),B=b(t,"isValidEvent",7,()=>!1),H=b(t,"customAnchor",7,null),G=b(t,"isStatic",7,!1),le=b(t,"ref",7),de=b(t,"shouldRender",7),F=je(t,RD);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 h()},set align(w){h(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 T()},set sticky(w){T(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 x()},set strategy(w){x(w),y()},get dir(){return O()},set dir(w){O(w),y()},get preventScroll(){return $()},set preventScroll(w){$(w),y()},get wrapperId(){return L()},set wrapperId(w){L(w),y()},get style(){return W()},set style(w){W(w),y()},get onPlaced(){return N()},set onPlaced(w){N(w),y()},get onInteractOutside(){return se()},set onInteractOutside(w){se(w),y()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(w){V(w),y()},get onOpenAutoFocus(){return oe()},set onOpenAutoFocus(w){oe(w),y()},get onFocusOutside(){return pe()},set onFocusOutside(w){pe(w),y()},get interactOutsideBehavior(){return J()},set interactOutsideBehavior(w="close"){J(w),y()},get loop(){return ie()},set loop(w){ie(w),y()},get trapFocus(){return Y()},set trapFocus(w=!0){Y(w),y()},get isValidEvent(){return B()},set isValidEvent(w=()=>!1){B(w),y()},get customAnchor(){return H()},set customAnchor(w=null){H(w),y()},get isStatic(){return G()},set isStatic(w=!1){G(w),y()},get ref(){return le()},set ref(w){le(w),y()},get shouldRender(){return de()},set shouldRender(w){de(w),y()}},z=K(),ge=U(z),fe=w=>{_c(w,kn({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 h()},get alignOffset(){return f()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return _()},get sticky(){return T()},get hideWhenDetached(){return A()},get updatePositionStrategy(){return E()},get strategy(){return x()},get dir(){return O()},get preventScroll(){return $()},get wrapperId(){return L()},get style(){return W()},get onPlaced(){return N()},get customAnchor(){return H()},get isStatic(){return G()},get enabled(){return n()},get onInteractOutside(){return se()},get onCloseAutoFocus(){return V()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return J()},get loop(){return ie()},get trapFocus(){return Y()},get isValidEvent(){return B()},get onFocusOutside(){return pe()},forceMount:!1,get ref(){return le()}},()=>F))};return ce(ge,w=>{de()&&w(fe)}),S(e,z),ee(ue)}te(Av,{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 LD=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 Ov(e,t){Q(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),h=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),T=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),x=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),W=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),ie=b(t,"trapFocus",7,!0),Y=b(t,"isValidEvent",7,()=>!1),B=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),G=b(t,"enabled",7),le=je(t,LD);var de={get popper(){return r()},set popper(F){r(F),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(F){n(F),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(F){i(F),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(F){s(F),y()},get id(){return o()},set id(F){o(F),y()},get onPointerDown(){return a()},set onPointerDown(F){a(F),y()},get onPointerUp(){return l()},set onPointerUp(F){l(F),y()},get side(){return c()},set side(F){c(F),y()},get sideOffset(){return d()},set sideOffset(F){d(F),y()},get align(){return u()},set align(F){u(F),y()},get alignOffset(){return h()},set alignOffset(F){h(F),y()},get arrowPadding(){return f()},set arrowPadding(F){f(F),y()},get avoidCollisions(){return g()},set avoidCollisions(F){g(F),y()},get collisionBoundary(){return m()},set collisionBoundary(F){m(F),y()},get collisionPadding(){return v()},set collisionPadding(F){v(F),y()},get sticky(){return _()},set sticky(F){_(F),y()},get hideWhenDetached(){return T()},set hideWhenDetached(F){T(F),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(F){A(F),y()},get strategy(){return E()},set strategy(F){E(F),y()},get dir(){return x()},set dir(F){x(F),y()},get preventScroll(){return O()},set preventScroll(F){O(F),y()},get wrapperId(){return $()},set wrapperId(F){$(F),y()},get style(){return L()},set style(F){L(F),y()},get onPlaced(){return W()},set onPlaced(F){W(F),y()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(F){se(F),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(F){V(F),y()},get onFocusOutside(){return oe()},set onFocusOutside(F){oe(F),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(F="close"){pe(F),y()},get loop(){return J()},set loop(F){J(F),y()},get trapFocus(){return ie()},set trapFocus(F=!0){ie(F),y()},get isValidEvent(){return Y()},set isValidEvent(F=()=>!1){Y(F),y()},get customAnchor(){return B()},set customAnchor(F=null){B(F),y()},get isStatic(){return H()},set isStatic(F=!1){H(F),y()},get enabled(){return G()},set enabled(F){G(F),y()}};return _c(e,kn({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 h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return T()},get updatePositionStrategy(){return A()},get strategy(){return E()},get dir(){return x()},get preventScroll(){return O()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return W()},get customAnchor(){return B()},get isStatic(){return H()},get enabled(){return G()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return se()},get onOpenAutoFocus(){return V()},get interactOutsideBehavior(){return pe()},get loop(){return J()},get trapFocus(){return ie()},get isValidEvent(){return Y()},get onFocusOutside(){return oe()}},()=>le,{forceMount:!0})),ee(de)}te(Ov,{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 Ra=fa({component:"date-field",parts:["input","label","segment"]}),qi={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return Ks(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(Bt(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||Um(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}},Ln=new Ct("DateField.Root"),zD=class dy{static create(t,r){return Ln.set(new dy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Fn();formatter;initialSegments;#e=re();get segmentValues(){return p(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return p(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=Rm();#r=re(null);#n=re(null);#i=re(null);get descriptionNode(){return p(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=re(null);get validationNode(){return p(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=Rm();#a=re(null);get dayPeriodNode(){return p(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=re("");get name(){return p(this.#o)}set name(t){I(this.#o,t,!0)}domContext=new Li(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?kr(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=qm({initialLocale:this.locale.current,monthFormat:R(()=>"long"),yearFormat:R(()=>"numeric")}),this.initialSegments=Zu(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Sa(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),me(()=>{Ue(()=>{this.initialSegments=Zu(this.inferredGranularity)})}),rn(()=>{this.announcer=Sa(this.domContext.getDocument())}),ni(()=>{r||TO(this.descriptionId,this.domContext.getDocument())}),me(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),me(()=>{if(r)return;this.value.current&&EO({id:Ue(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Ue(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ue(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),me(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),me(()=>{this.value.current===void 0&&(this.segmentValues=Zu(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:p(this.#r)}setLabelNode(t){I(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:p(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=Ta.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=xa.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Bt(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&&oi(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&oi(i,t)?{reason:"max"}:!1});get validationStatus(){return p(this.#u)}set validationStatus(t){I(this.#u,t)}#d=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return p(this.#d)}set isInvalid(t){I(this.#d,t)}#c=D(()=>{const t=this.granularity.current;return t||kO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return p(this.#c)}set inferredGranularity(t){I(this.#c,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return p(this.#h)}set dateRef(t){I(this.#h,t)}#p=D(()=>vO({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 p(this.#p)}set allSegmentContent(t){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return p(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(wO(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 h=Ks(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`)}a={...o,[t]:u}}else if(t==="dayPeriod"){const u=d(c);this.states.dayPeriod.updating=u;const h=this.value.current;if(h&&"hour"in h){const f=h.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 h=this.formatter.dayPeriod(Bt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(h==="AM"||h==="PM")&&(o.dayPeriod=h)}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(Aa(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const h=Ks(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`),a={...o,[t]:u}}else if(t==="year"){const h=d(c);this.states.year.updating=h,a={...o,[t]:h}}else if(t==="day"){const h=d(c);this.states.day.updating=h,a={...o,[t]:h}}else a={...o,[t]:u}}this.segmentValues=a,_O(a,p(this.#r))?this.setValue(bO({segmentObj:a,fieldNode:p(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":Mu(this.isInvalid),"aria-disabled":Sr(this.disabled.current),"aria-readonly":Sr(this.readonly.current||n),"data-invalid":Le(this.isInvalid),"data-disabled":Le(this.disabled.current),"data-readonly":Le(this.readonly.current||n),"data-segment":`${t}`,[Ra.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=SO(r,p(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}}},UD=class fy{static create(t){return new fy(t,Ln.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Li(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":p(this.#e),"aria-disabled":Sr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Le(this.root.disabled.current),[Ra.input]:"",...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},VD=class hy{static create(){return new hy(Ln.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return p(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return p(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 p(this.#r)}set props(t){I(this.#r,t)}},BD=class py{static create(t){return new py(t,Ln.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=OO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Le(this.root.isInvalid),"data-disabled":Le(this.root.disabled.current),[Ra.label]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},ji=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(),!!Wu(e.key))){if(wc(e.key)){this.#i(t);return}if(kc(e.key)){this.#s(t);return}if(ha(e.key)){this.#a(e);return}if(Sc(e.key)){this.#o(e);return}Xs(e.key)&&Js(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&&Vm(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&&Bm(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 p(this.#l)}set props(e){I(this.#l,e)}},qD=class extends ji{#e=[];#t=0;constructor(e,t){super(e,t,"year",qi.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!Wu(e.key))){if(wc(e.key)){this.#r(),super.onkeydown(e);return}if(kc(e.key)){this.#r(),super.onkeydown(e);return}if(ha(e.key)){this.#i(e);return}if(Sc(e.key)){this.#s(e);return}Xs(e.key)&&Js(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),Cv(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&&Vm(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&&Bm(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?Cv(Number.parseInt(t)):t)}},jD=class extends ji{constructor(e,t){super(e,t,"day",qi.day)}},ZD=class extends ji{constructor(e,t){super(e,t,"month",qi.month)}},WD=class extends ji{constructor(e,t){super(e,t,"hour",qi.hour)}onkeydown(e){if(ha(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)}},HD=class extends ji{constructor(e,t){super(e,t,"minute",qi.minute)}},GD=class extends ji{constructor(e,t){super(e,t,"second",qi.second)}},KD=class my{static create(t){return new my(t,Ln.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(),!!QD(t.key))){if(wc(t.key)||kc(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}Sc(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}),Xs(t.key)&&Js(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 p(this.#t)}set props(t){I(this.#t,t)}},YD=class vy{static create(t){return new vy(t,Ln.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":Mu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},JD=class gy{static create(t){return new gy(t,Ln.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&&Xs(t.key)&&Js(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":Le(!0),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},XD=class{static create(e,t){const r=Ln.get();switch(e){case"day":return new jD(t,r);case"month":return new ZD(t,r);case"year":return new qD(t,r);case"hour":return new WD(t,r);case"minute":return new HD(t,r);case"second":return new GD(t,r);case"dayPeriod":return new KD(t,r);case"literal":return new YD(t,r);case"timeZoneName":return new JD(t,r)}}};function QD(e){return Wu(e)||e==="A"||e==="P"||e==="a"||e==="p"}function wc(e){return e===Nu}function kc(e){return e===Fu}function Sc(e){return e===aA}function Cv(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function Dv(e,t){Q(t,!1);const r=VD.create();Zl();var n=K(),i=U(n),s=o=>{Xm(o,kn(()=>r.props))};ce(i,o=>{r.shouldRender&&o(s)}),S(e,n),ee()}te(Dv,{},[],[],{mode:"open"});var eI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),tI=j("<div><!></div>"),rI=j("<!> <!>",1);function Iv(e,t){const r=gt();Q(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,eI);const c=UD.create({id:R(()=>n()),ref:R(()=>i(),v=>i(v)),name:R(()=>s())}),d=D(()=>We(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()}},h=rI(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,a,()=>({props:p(d),segments:c.root.segmentContents})),S(v,_)},m=v=>{var _=tI();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>o()??Me,()=>({segments:c.root.segmentContents})),P(_),S(v,_)};return ce(f,v=>{a()?v(g):v(m,-1)}),Dv(X(f,2),{}),S(e,h),ee(u)}te(Iv,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var nI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),iI=j("<div><!></div>");function Pv(e,t){const r=gt();Q(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,nI);const l=BD.create({id:R(()=>n()),ref:R(()=>i(),m=>i(m))}),c=D(()=>We(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=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,o,()=>({props:p(c)})),S(m,v)},g=m=>{var v=iI();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>s()??Me),P(v),S(m,v)};return ce(h,m=>{o()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Pv,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var sI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),oI=j("<span><!></span>");function $v(e,t){const r=gt();Q(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,sI);const c=XD.create(a(),{id:R(()=>n()),ref:R(()=>i(),v=>i(v))}),d=D(()=>We(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()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,o,()=>({props:p(d)})),S(v,_)},m=v=>{var _=oI();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>s()??Me),P(_),S(v,_)};return ce(f,v=>{o()?v(g):v(m,-1)}),S(e,h),ee(u)}te($v,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var Mv=new Ct("DatePicker.Root"),aI=class yy{static create(t){return Mv.set(new yy(t))}opts;constructor(t){this.opts=t}};function Ec(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 Tc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function Fv(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 lI=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)}#d(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#c(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#c(),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=da(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const h=u.relatedTarget;if(ii(h)&&n.contains(h))return;const f=this.#e.ignoredTargets?.()??[];ii(h)&&f.some(g=>g===h||g.contains(h))||(this.#s=ii(h)&&f.length>0?f.filter(g=>h.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#d())},l=()=>{this.#f()},c=()=>{this.#f()},d=u=>{const h=u.relatedTarget;ii(h)&&r.contains(h)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#d())};return[pt(s,"pointermove",o),pt(r,"pointerleave",a),pt(r,"pointerenter",l),pt(n,"pointerenter",c),pt(n,"pointerleave",d)].reduce((u,h)=>()=>{u(),h()},()=>{})})}#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"&&Tc(e,i)){this.#f();return}if(this.#i==="trigger"&&Tc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(Tc(e,c))return;const d=Fv(n,c),u=this.#m(n,c,d);if(u&&Ec(e,u))return}const s=Fv(n,i),o=this.#m(n,i,s);if(o&&Ec(e,o))return;const a=this.#i==="content"?i:n;Ec(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.#c()}#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"}}},xc=fa({component:"popover",parts:["root","trigger","content","close","overlay"]}),Ac=new Ct("Popover.Root"),uI=class by{static create(t){return Ac.set(new by(t))}opts;#e=re(null);get contentNode(){return p(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=re(null);get triggerNode(){return p(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=re(null);get overlayNode(){return p(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=re(!1);get openedViaHover(){return p(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=re(!1);get hasInteractedWithContent(){return p(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=re(!1);get hoverCooldown(){return p(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=re(0);get closeDelay(){return p(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new am({ref:R(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new am({ref:R(()=>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()}},cI=class _y{static create(t){return new _y(t,Ac.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=re(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Li(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||pa(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&&(pa(t)||(I(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),p(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}p(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":Sr(this.root.opts.open.current),"data-state":nm(this.root.opts.open.current),"aria-controls":this.#a(),[xc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#o)}set props(t){I(this.#o,t)}},dI=class wy{static create(t){return new wy(t,Ac.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 lI({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;ii(r)&&MA(r)&&this.root.markInteraction()}onpointerenter(t){pa(t)||this.root.cancelDelayedClose()}onpointerleave(t){pa(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!ii(t.target))return;const r=t.target.closest(xc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(ii(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 p(this.#e)}set snippetProps(t){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":nm(this.root.opts.open.current),...sA(this.root.contentPresence.transitionStatus),[xc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function Nv(e,t){Q(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),h=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,()=>[]),T=b(t,"hourCycle",7),A=b(t,"locale",7),E=b(t,"hideTimeZone",7,!1),x=b(t,"required",7,!1),O=b(t,"calendarLabel",7,"Event"),$=b(t,"disableDaysOutsideMonth",7,!0),L=b(t,"preventDeselect",7,!1),W=b(t,"pagedNavigation",7,!1),N=b(t,"weekStartsOn",7),se=b(t,"weekdayFormat",7,"narrow"),V=b(t,"isDateDisabled",7,()=>!1),oe=b(t,"fixedWeeks",7,!1),pe=b(t,"numberOfMonths",7,1),J=b(t,"closeOnDateSelect",7,!0),ie=b(t,"initialFocus",7,!1),Y=b(t,"errorMessageId",7),B=b(t,"children",7),H=b(t,"monthFormat",7,"long"),G=b(t,"yearFormat",7,"numeric");const le=Dm({granularity:v(),defaultValue:s(),minValue:h(),maxValue:f()});function de(){a()===void 0&&a(le)}de(),tt.pre(()=>a(),()=>{de()});function F(){J()&&r(!1)}const ue=aI.create({open:R(()=>r(),w=>{r(w),n()(w)}),value:R(()=>s(),w=>{s(w),o()(w)}),placeholder:R(()=>a(),w=>{a(w),l()(w)}),isDateUnavailable:R(()=>c()),minValue:R(()=>h()),maxValue:R(()=>f()),disabled:R(()=>g()),readonly:R(()=>m()),granularity:R(()=>v()),readonlySegments:R(()=>_()),hourCycle:R(()=>T()),locale:um(()=>A()),hideTimeZone:R(()=>E()),required:R(()=>x()),calendarLabel:R(()=>O()),disableDaysOutsideMonth:R(()=>$()),preventDeselect:R(()=>L()),pagedNavigation:R(()=>W()),weekStartsOn:R(()=>N()),weekdayFormat:R(()=>se()),isDateDisabled:R(()=>V()),fixedWeeks:R(()=>oe()),numberOfMonths:R(()=>pe()),initialFocus:R(()=>ie()),onDateSelect:R(()=>F),defaultPlaceholder:le,monthFormat:R(()=>H()),yearFormat:R(()=>G())});uI.create({open:ue.opts.open,onOpenChangeComplete:R(()=>i())}),zD.create({value:ue.opts.value,disabled:ue.opts.disabled,readonly:ue.opts.readonly,readonlySegments:ue.opts.readonlySegments,validate:R(()=>d()),onInvalid:R(()=>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:R(()=>Y()),isInvalidProp:R(()=>{})});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 h()},set minValue(w){h(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 T()},set hourCycle(w){T(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 x()},set required(w=!1){x(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 L()},set preventDeselect(w=!1){L(w),y()},get pagedNavigation(){return W()},set pagedNavigation(w=!1){W(w),y()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),y()},get weekdayFormat(){return se()},set weekdayFormat(w="narrow"){se(w),y()},get isDateDisabled(){return V()},set isDateDisabled(w=()=>!1){V(w),y()},get fixedWeeks(){return oe()},set fixedWeeks(w=!1){oe(w),y()},get numberOfMonths(){return pe()},set numberOfMonths(w=1){pe(w),y()},get closeOnDateSelect(){return J()},set closeOnDateSelect(w=!0){J(w),y()},get initialFocus(){return ie()},set initialFocus(w=!1){ie(w),y()},get errorMessageId(){return Y()},set errorMessageId(w){Y(w),y()},get children(){return B()},set children(w){B(w),y()},get monthFormat(){return H()},set monthFormat(w="long"){H(w),y()},get yearFormat(){return G()},set yearFormat(w="numeric"){G(w),y()}},ge=K(),fe=U(ge);return De(fe,()=>kv,(w,qe)=>{qe(w,{children:(Pe,Ye)=>{var kt=K(),Ge=U(kt);_e(Ge,()=>B()??Me),S(Pe,kt)},$$slots:{default:!0}})}),S(e,ge),ee(z)}te(Nv,{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 fI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),hI=j("<div><!></div>");function Rv(e,t){const r=gt();Q(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,fI);const l=Mv.get(),c=Gm.create({id:R(()=>s()),ref:R(()=>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:R(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:R(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),d=D(()=>We(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()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);{let A=D(()=>({props:p(d),...c.snippetProps}));_e(T,i,()=>p(A))}S(v,_)},m=v=>{var _=hI();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>n()??Me,()=>c.snippetProps),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),ee(u)}te(Rv,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var pI=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),Lv=j("<div><div><!></div></div>");function zv(e,t){const r=gt();Q(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),h=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,pI);const _=dI.create({id:R(()=>o()),ref:R(()=>s(),N=>s(N)),onInteractOutside:R(()=>u()),onEscapeKeydown:R(()=>d()),customAnchor:R(()=>g())}),T=D(()=>We(v,_.props)),A=D(()=>h()&&_.shouldTrapFocus);function E(N){_.shouldTrapFocus||N.preventDefault(),l()(N)}var x={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 h()},set trapFocus(N=!0){h(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=K(),$=U(O),L=N=>{Ov(N,kn(()=>p(T),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(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,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ie=D(()=>We(pe(),{style:_v("popover")},{style:m()}));var Y=K(),B=U(Y),H=le=>{var de=K(),F=U(de);{let ue=D(()=>({props:p(ie),wrapperProps:J(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,de)},G=le=>{var de=Lv();Ne(de,()=>({...J()}));var F=M(de);Ne(F,()=>({...p(ie)}));var ue=M(F);_e(ue,()=>i()??Me),P(F),P(de),S(le,de)};ce(B,le=>{n()?le(H):le(G,-1)}),S(V,Y)},$$slots:{popper:!0}}))},W=N=>{Av(N,kn(()=>p(T),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(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,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ie=D(()=>We(pe(),{style:_v("popover")},{style:m()}));var Y=K(),B=U(Y),H=le=>{var de=K(),F=U(de);{let ue=D(()=>({props:p(ie),wrapperProps:J(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,de)},G=le=>{var de=Lv();Ne(de,()=>({...J()}));var F=M(de);Ne(F,()=>({...p(ie)}));var ue=M(F);_e(ue,()=>i()??Me),P(F),P(de),S(le,de)};ce(B,le=>{n()?le(H):le(G,-1)}),S(V,Y)},$$slots:{popper:!0}}))};return ce($,N=>{a()?N(L):a()||N(W,1)}),S(e,O),ee(x)}te(zv,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var mI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function Uv(e,t){Q(t,!0);let r=b(t,"ref",15,null),n=b(t,"onOpenAutoFocus",7),i=je(t,mI);const s=D(()=>We({onOpenAutoFocus:n()},{onOpenAutoFocus:qO}));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,kn(()=>p(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),ee(o)}te(Uv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var vI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),gI=j("<button><!></button>");function Vv(e,t){const r=gt();Q(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),h=je(t,vI);const f=cI.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v)),disabled:R(()=>!!l()),openOnHover:R(()=>c()),openDelay:R(()=>d()),closeDelay:R(()=>u())}),g=D(()=>We(h,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 Sv(e,{get id(){return s()},get ref(){return f.opts.ref},children:(v,_)=>{var T=K(),A=U(T),E=O=>{var $=K(),L=U($);_e(L,i,()=>({props:p(g)})),S(O,$)},x=O=>{var $=gI();Ne($,()=>({...p(g)}));var L=M($);_e(L,()=>n()??Me),P($),S(O,$)};ce(A,O=>{i()?O(E):O(x,-1)}),S(v,T)},$$slots:{default:!0}}),ee(m)}te(Vv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var yI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Bv(e,t){Q(t,!0);let r=b(t,"ref",15,null),n=b(t,"onkeydown",7),i=je(t,yI);function s(l){if(Xs(l.key)){const c=l.currentTarget.closest(Ra.selector("input"));if(!c)return;Js(l,c)}}const o=D(()=>We({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 Vv(e,kn(()=>i,{"data-segment":"trigger"},()=>p(o),{get ref(){return r()},set ref(l){r(l)}})),ee(a)}te(Bv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Oc=j("<!> <!>",1),qv=j("<!> <!> <!>",1);function jv(e,t){Q(t,!0);let r=b(t,"dateString",15),n=b(t,"labelClass",7),i=b(t,"inputClass",7),s=b(t,"labelText",7),o=re(Fe(Xn(Vt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);me(()=>{r(p(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=K(),d=U(c);{let u=D(()=>C.locale||"de");De(d,()=>Nv,(h,f)=>{f(h,{get locale(){return p(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Xn(Vt()))<0,get value(){return p(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=qv(),_=U(v);De(_,()=>Pv,(E,x)=>{x(E,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(O,$)=>{var L=K(),W=U(L),N=se=>{var V=K(),oe=U(V);_e(oe,s),S(se,V)};ce(W,se=>{s()&&se(N)}),S(O,L)},$$slots:{default:!0}})});var T=X(_,2);{const E=(x,O)=>{let $=()=>O?.().segments;var L=Oc(),W=U(L);Ve(W,17,$,zr,(se,V)=>{let oe=()=>p(V).part,pe=()=>p(V).value;var J=K(),ie=U(J);De(ie,()=>$v,(Y,B)=>{B(Y,{get part(){return oe()},children:(H,G)=>{Et();var le=Lt();ae(()=>ne(le,pe())),S(H,le)},$$slots:{default:!0}})}),S(se,J)});var N=X(W,2);De(N,()=>Bv,(se,V)=>{V(se,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),S(x,L)};De(T,()=>Iv,(x,O)=>{O(x,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var A=X(T,2);De(A,()=>Uv,(E,x)=>{x(E,{children:(O,$)=>{var L=K(),W=U(L);{const N=(se,V)=>{let oe=()=>V?.().months,pe=()=>V?.().weekdays;var J=Oc(),ie=U(J);De(ie,()=>rc,(B,H)=>{H(B,{children:(G,le)=>{var de=qv(),F=U(de);De(F,()=>sc,(ge,fe)=>{fe(ge,{class:"go-datepicker-previous"})});var ue=X(F,2);De(ue,()=>nc,(ge,fe)=>{fe(ge,{class:"go-datepicker-selected-month"})});var z=X(ue,2);De(z,()=>ic,(ge,fe)=>{fe(ge,{class:"go-datepicker-next"})}),S(G,de)},$$slots:{default:!0}})});var Y=X(ie,2);Ve(Y,16,oe,B=>B,(B,H)=>{var G=K(),le=U(G);De(le,()=>Ju,(de,F)=>{F(de,{children:(ue,z)=>{var ge=Oc(),fe=U(ge);De(fe,()=>ec,(qe,Pe)=>{Pe(qe,{children:(Ye,kt)=>{var Ge=K(),Xt=U(Ge);De(Xt,()=>eo,(ct,Qt)=>{Qt(ct,{children:(St,Pt)=>{var er=K(),jt=U(er);Ve(jt,17,pe,zr,(hr,Cr)=>{var Dr=K(),mn=U(Dr);De(mn,()=>tc,(Ir,pr)=>{pr(Ir,{children:(Jr,Xr)=>{Et();var _t=Lt();ae(()=>ne(_t,p(Cr))),S(Jr,_t)},$$slots:{default:!0}})}),S(hr,Dr)}),S(St,er)},$$slots:{default:!0}})}),S(Ye,Ge)},$$slots:{default:!0}})});var w=X(fe,2);De(w,()=>Xu,(qe,Pe)=>{Pe(qe,{children:(Ye,kt)=>{var Ge=K(),Xt=U(Ge);Ve(Xt,16,()=>H.weeks,ct=>ct,(ct,Qt)=>{var St=K(),Pt=U(St);De(Pt,()=>eo,(er,jt)=>{jt(er,{children:(hr,Cr)=>{var Dr=K(),mn=U(Dr);Ve(mn,16,()=>Qt,Ir=>Ir,(Ir,pr,Jr,Xr)=>{var _t=K(),zn=U(_t);De(zn,()=>Qu,(rs,ns)=>{ns(rs,{get date(){return pr},get month(){return H.value},children:(ao,Wc)=>{var mi=K(),is=U(mi);De(is,()=>Yu,(mr,Un)=>{Un(mr,{})}),S(ao,mi)},$$slots:{default:!0}})}),S(Ir,_t)}),S(hr,Dr)},$$slots:{default:!0}})}),S(ct,St)}),S(Ye,Ge)},$$slots:{default:!0}})}),S(ue,ge)},$$slots:{default:!0}})}),S(B,G)}),S(se,J)};De(W,()=>Rv,(se,V)=>{V(se,{children:N,$$slots:{default:!0}})})}S(O,L)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})})}return S(e,c),ee(l)}te(jv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var bI=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),_I=j('<span class="go-field-star" aria-hidden="true">*</span>'),wI=j(" <!>",1),kI=j("<label><!></label> <input/>",1),SI=j("<label><!></label> <textarea></textarea>",1),EI=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),TI=j("<label><!></label> <input/> <!>",1),xI=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),AI=j('<img src="" alt=""/> <option> </option>',1),OI=j('<option disabled="" hidden="" selected=""> </option> <!>',1),CI=j("<!>",1),DI=j("<label><!></label> <select><!></select>",1),II=j('<img style="width: 60px" aria-hidden="true"/>'),PI=j('<span class="go-payment-mode-icons"></span>'),$I=j('<label><input type="radio"/> <!></label>'),MI=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),FI=j("<label> <input/></label>"),NI=j("<fieldset><legend><!></legend> <!></fieldset>");function Zv(e,t){Q(t,!0);const r=J=>{Et();var ie=wI(),Y=U(ie),B=X(Y),H=G=>{var le=_I();S(G,le)};ce(B,G=>{u().required&&G(H)}),ae(()=>ne(Y,`${p(L)??""} `)),S(J,ie)},n=J=>{var ie=kI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2);Ne(B,()=>({...p($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ae(()=>{zt(Y,1,Ur(f())),ke(Y,"for",p(x))}),Ro(B,()=>u().value,H=>u(u().value=H,!0)),S(J,ie)},i=J=>{var ie=SI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2);Db(B),Ne(B,()=>({...p($),...v,class:g(),placeholder:u().placeholder,name:u().key})),ae(()=>{zt(Y,1,Ur(f())),ke(Y,"for",p(x))}),Ro(B,()=>u().value,H=>u(u().value=H,!0)),S(J,ie)},s=J=>{var ie=TI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2),H=de=>{const F=de.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),p(T)?p(T).validateField(u()):u().validate()};Ne(B,()=>({...p($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:H}),void 0,void 0,void 0,void 0,!0);var G=X(B,2),le=de=>{var F=EI(),ue=M(F),z=X(ue,2),ge=M(z,!0);P(z),P(F),ae(fe=>{ke(F,"data-field-preview",u().key),ke(ue,"src",p(N)),ke(ue,"alt",fe),ne(ge,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),S(de,F)};ce(G,de=>{p(N)&&u().value instanceof File&&de(le)}),ae(()=>{zt(Y,1,Ur(f())),ke(Y,"for",p(x))}),S(J,ie)},o=J=>{var ie=xI(),Y=M(ie);Ne(Y,()=>({...p($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var B=X(Y,2);r(M(B)),P(B),P(ie),ae(()=>{zt(ie,1,Ur(f())),ke(ie,"for",p(x))}),S_(Y,()=>u().value===!0,H=>{u(u().value=H,!0)}),S(J,ie)},a=J=>{var ie=DI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2);Ne(B,()=>({...p($),...v,name:u().key,class:g()})),w_(B,()=>{var H=M(B),G=CI(),le=U(G),de=F=>{var ue=OI(),z=U(ue),ge=M(z,!0);P(z),z.value=z.__value="";var fe=X(z,2);Ve(fe,17,()=>u().options(),w=>w.value,(w,qe)=>{var Pe=AI(),Ye=X(U(Pe),2),kt=M(Ye,!0);P(Ye);var Ge={};ae(()=>{ne(kt,p(qe).label),Ge!==(Ge=p(qe).value)&&(Ye.value=(Ye.__value=p(qe).value)??"")}),S(w,Pe)}),ae(w=>ne(ge,w),[()=>C.t("common.choose")]),S(F,ue)};ce(le,F=>{u().options&&F(de)}),S(H,G)}),ae(()=>{zt(Y,1,Ur(f())),ke(Y,"for",p(x))}),f_(B,()=>u().value,H=>u(u().value=H,!0)),S(J,ie)},l=J=>{jv(J,{get labelClass(){return f()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(ie){u(u().value=ie,!0)}})},c=J=>{const ie=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var Y=MI(),B=M(Y);r(M(B)),P(B);var H=X(B,2);Ve(H,17,()=>p(ie),G=>G.id,(G,le)=>{var de=$I(),F=M(de);Fo(F);var ue=X(F,2),z=ge=>{var fe=PI();Ve(fe,20,()=>p(le).icons,w=>w,(w,qe)=>{const Pe=D(()=>W+qe+".svg");var Ye=II();ae(()=>{zt(Ye,1,Ur(qe)),ke(Ye,"src",p(Pe)),ke(Ye,"alt",qe+" icon")}),S(w,Ye)}),P(fe),S(ge,fe)};ce(ue,ge=>{p(le).icons.length>0&&ge(z)}),P(de),ae((ge,fe,w)=>{ke(F,"name",u().key),kf(F,ge),g_(F,fe),ke(F,"hidden",p(ie).length===1),ke(F,"aria-label",w)},[()=>String(p(le).id),()=>p(ie).length===1||String(p(le).id)===String(u().value),()=>C.t(`cart.paymentMode.ariaLabel.${p(le).name.toLowerCase()}`)]),Rt("change",F,()=>{u(u().value=String(p(le).id),!0)}),S(G,de)}),P(Y),ae(()=>{ke(Y,"aria-required",u().required),ke(Y,"aria-invalid",u().errors.length>0)}),S(J,Y)},d=J=>{var ie=NI(),Y=M(ie);r(M(Y)),P(Y);var B=X(Y,2),H=G=>{var le=K(),de=U(le);Ve(de,17,()=>u().options,zr,(F,ue)=>{var z=FI(),ge=M(z),fe=X(ge);Ne(fe,()=>({...p($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),P(z),ae(()=>{zt(z,1,Ur(f())),ke(z,"for",p(x)+p(ue)),ne(ge,`${p(ue)??""} `)}),Ro(fe,()=>u().value,w=>u(u().value=w,!0)),S(F,z)}),S(G,le)};ce(B,G=>{u().options&&G(H)}),P(ie),S(J,ie)};let u=b(t,"field",15),h=b(t,"describedByIds",7),f=b(t,"labelClass",7),g=b(t,"inputClass",7),m=b(t,"host",7),v=je(t,bI);const _=Ni(m()),T=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 x=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(p(T)?p(T).validateField(u()):u().validate())}const $=D(()=>({id:p(x),"aria-describedby":h(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let L=D(()=>C.t(u().label)||u().label);const W="https://cdn.shop.platform.gomus.de/";let N=re(null);me(()=>{const J=u().value;if(J instanceof File&&J.type.startsWith("image/")){const ie=URL.createObjectURL(J);return I(N,ie,!0),()=>{URL.revokeObjectURL(ie),I(N,null)}}I(N,null)});var se={get field(){return u()},set field(J){u(J),y()},get describedByIds(){return h()},set describedByIds(J){h(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=K(),oe=U(V),pe=J=>{var ie=K(),Y=U(ie);_e(Y,()=>p(E)),S(J,ie)};return ce(oe,J=>{p(E)&&J(pe)}),S(e,V),ee(se)}Lr(["change"]),te(Zv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var RI=j("<span> </span>"),LI=j("<li> </li>"),zI=j('<ul class="go-field-errors"></ul>'),UI=j("<!> <!> <!>",1);function VI(e,t){Q(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=re(Fe(cr.createField(r(),n())));const a=Ni(t.$$host),l=D(()=>a.value),c=()=>p(o);let d=D(()=>p(o)?[...p(o).errors,...p(o).apiErrors].map($=>C.t($)):[]),u=D(()=>p(o)?.description),h=D(()=>p(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(()=>[p(u)&&p(f),p(h)&&p(g)].filter(Boolean).join(" ")||void 0);me(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",p(d).length>0)}),t.$$host.dataset.testid=r(),me(()=>{p(o)&&(p(o).mounted=!0,p(o).value,Ue(()=>{p(o)?.errors.length&&p(l).validateField(p(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()}},_=UI(),T=U(_);Zv(T,{get describedByIds(){return p(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return p(o)},set field($){I(o,$,!0)}});var A=X(T,2),E=$=>{var L=RI(),W=M(L,!0);P(L),ae(()=>{ke(L,"id",p(f)),ne(W,p(o).description)}),S($,L)};ce(A,$=>{p(u)&&$(E)});var x=X(A,2),O=$=>{var L=zI();Ve(L,21,()=>p(d),zr,(W,N)=>{var se=LI(),V=M(se,!0);P(se),ae(()=>ne(V,p(N))),S(W,se)}),P(L),ae(()=>ke(L,"id",p(g))),S($,L)};return ce(x,$=>{p(h)&&$(O)}),S(e,_),ee(v)}customElements.define("go-field",te(VI,{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 BI=j("<go-field></go-field>",2);function qI(e,t){Q(t,!0);let r=Ni(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?cr.getFormFields(p(n)?.formId):[]);var s=K(),o=U(s);Ve(o,17,()=>p(i),a=>a.key,(a,l)=>{var c=BI();ae(()=>Gn(c,"key",p(l).key)),ae(()=>Gn(c,"required",p(l).required)),S(a,c)}),S(e,s),ee()}customElements.define("go-all-fields",te(qI,{},[],[]));var jI=j('<p aria-hidden="true"> </p>'),ZI=j("<li> </li>"),WI=j('<ul class="go-error-feedback-api-errors"></ul>'),HI=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function GI(e,t){Q(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);me(()=>{p(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Cu(p(n)?.fields),!0)})});let i=re(0);setInterval(()=>{I(i,Cu(p(n)?.fields)||0,!0)},100);let s=D(()=>p(i)+(p(n)?.apiErrors?.length||0)),o=re(-1);me(()=>{t.$$host.classList.toggle("is-invalid",p(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",p(s).toString())});var a=HI(),l=M(a),c=M(l),d=v=>{var _=Lt();ae(T=>ne(_,T),[()=>C.t("forms.errorSummary",{count:p(o)})]),S(v,_)};ce(c,v=>{p(o)>0&&v(d)}),P(l);var u=X(l,2),h=v=>{var _=jI(),T=M(_,!0);P(_),ae(A=>ne(T,A),[()=>C.t("forms.errorSummary",{count:p(i)})]),S(v,_)};ce(u,v=>{p(i)>0&&v(h)});var f=X(u,2),g=v=>{var _=WI();Ve(_,21,()=>p(n)?.apiErrors,zr,(T,A)=>{var E=ZI(),x=M(E,!0);P(E),ae(()=>ne(x,p(A))),S(T,E)}),P(_),S(v,_)},m=D(()=>p(n)&&Hl(p(n).apiErrors)&&p(n).apiErrors.length>0);ce(f,v=>{p(m)&&v(g)}),P(a),S(e,a),ee()}customElements.define("go-errors-feedback",te(GI,{},[],[]));var KI=j('<div class="go-form-feedback"><!></div>');function YI(e,t){var r=KI(),n=M(r);a_(n,t,"default",{},null),P(r),S(e,r)}customElements.define("go-form-feedback",te(YI,{},["default"],[]));function JI(e,t){Q(t,!0);let r=b(t,"buttonClass",7,"");return rn(()=>{$n(t.$$host,"button",{type:"submit",class:r()})}),ee({get buttonClass(){return r()},set buttonClass(n=""){r(n),y()}})}customElements.define("go-submit",te(JI,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var XI=j('<div aria-live="assertive"> </div>');function QI(e,t){Q(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);var i=K(),s=U(i),o=a=>{var l=XI();let c;var d=M(l,!0);P(l),ae(()=>{c=zt(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":p(n).successMessage}),ne(d,p(n)?.successMessage)}),S(a,l)};ce(s,a=>{p(n)?.successMessage&&a(o)}),S(e,i),ee()}customElements.define("go-success-feedback",te(QI,{},[],[]));var dr="INUMBER",Zi="IOP1",Wi="IOP2",Hi="IOP3",cn="IVAR",ci="IVARNAME",Gi="IFUNCALL",La="IFUNDEF",qt="IEXPR",Cc="IEXPREVAL",di="IMEMBER",za="IENDSTATEMENT",Ki="IARRAY";function Ie(e,t){this.type=e,this.value=t??0}Ie.prototype.toString=function(){switch(this.type){case dr:case Zi:case Wi:case Hi:case cn:case ci:case za:return this.value;case Gi:return"CALL "+this.value;case La:return"DEF "+this.value;case Ki:return"ARRAY "+this.value;case di:return"."+this.value;default:return"Invalid Instruction"}};function Ua(e){return new Ie(Zi,e)}function dn(e){return new Ie(Wi,e)}function Wv(e){return new Ie(Hi,e)}function Dc(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var h=e[u],f=h.type;if(f===dr||f===ci)Array.isArray(h.value)?s.push.apply(s,Dc(h.value.map(function(g){return new Ie(dr,g)}).concat(new Ie(Ki,h.value.length)),t,r,n,i)):s.push(h);else if(f===cn&&i.hasOwnProperty(h.value))h=new Ie(dr,i[h.value]),s.push(h);else if(f===Wi&&s.length>1)l=s.pop(),a=s.pop(),d=r[h.value],h=new Ie(dr,d(a.value,l.value)),s.push(h);else if(f===Hi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),h.value==="?"?s.push(a.value?l.value:c.value):(d=n[h.value],h=new Ie(dr,d(a.value,l.value,c.value)),s.push(h));else if(f===Zi&&s.length>0)a=s.pop(),d=t[h.value],h=new Ie(dr,d(a.value)),s.push(h);else if(f===qt){for(;s.length>0;)o.push(s.shift());o.push(new Ie(qt,Dc(h.value,t,r,n,i)))}else if(f===di&&s.length>0)a=s.pop(),s.push(new Ie(dr,a.value[h.value]));else{for(;s.length>0;)o.push(s.shift());o.push(h)}}for(;s.length>0;)o.push(s.shift());return o}function Hv(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===Zi?c=Ua(l.value):l.type===Wi?c=dn(l.value):l.type===Hi?c=Wv(l.value):c=new Ie(l.type,l.value),n.push(c)}else o===qt?n.push(new Ie(qt,Hv(s.value,t,r))):n.push(s)}return n}function fi(e,t,r){var n=[],i,s,o,a,l,c;if(Ic(e))return fn(e,r);for(var d=e.length,u=0;u<d;u++){var h=e[u],f=h.type;if(f===dr||f===ci)n.push(h.value);else if(f===Wi)s=n.pop(),i=n.pop(),h.value==="and"?n.push(i?!!fi(s,t,r):!1):h.value==="or"?n.push(i?!0:!!fi(s,t,r)):h.value==="="?(a=t.binaryOps[h.value],n.push(a(i,fi(s,t,r),r))):(a=t.binaryOps[h.value],n.push(a(fn(i,r),fn(s,r))));else if(f===Hi)o=n.pop(),s=n.pop(),i=n.pop(),h.value==="?"?n.push(fi(i?s:o,t,r)):(a=t.ternaryOps[h.value],n.push(a(fn(i,r),fn(s,r),fn(o,r))));else if(f===cn)if(h.value in t.functions)n.push(t.functions[h.value]);else if(h.value in t.unaryOps&&t.parser.isOperatorEnabled(h.value))n.push(t.unaryOps[h.value]);else{var g=r[h.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+h.value)}else if(f===Zi)i=n.pop(),a=t.unaryOps[h.value],n.push(a(fn(i,r)));else if(f===Gi){for(c=h.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===La)n.push((function(){for(var m=n.pop(),v=[],_=h.value;_-- >0;)v.unshift(n.pop());var T=n.pop(),A=function(){for(var E=Object.assign({},r),x=0,O=v.length;x<O;x++)E[v[x]]=arguments[x];return fi(m,t,E)};return Object.defineProperty(A,"name",{value:T,writable:!1}),r[T]=A,A})());else if(f===qt)n.push(eP(h,t));else if(f===Cc)n.push(h);else if(f===di)i=n.pop(),n.push(i[h.value]);else if(f===za)n.pop();else if(f===Ki){for(c=h.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 eP(e,t,r){return Ic(e)?e:{type:Cc,value:function(n){return fi(e.value,t,n)}}}function Ic(e){return e&&e.type===Cc}function fn(e,t){return Ic(e)?e.value(t):e}function Pc(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(Gv).join(", ")+"]"):r.push(Gv(d.value));else if(u===Wi)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===Hi)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===ci)r.push(d.value);else if(u===Zi)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===Gi){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(u===La){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===di)n=r.pop(),r.push(n+"."+d.value);else if(u===Ki){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(u===qt)r.push("("+Pc(d.value,t)+")");else if(u!==za)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Gv(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function Yi(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function $c(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===ci?!n&&!Yi(t,o.value)?t.push(o.value):(i!==null&&(Yi(t,i)||t.push(i)),i=o.value):o.type===di&&n&&i!==null?i+="."+o.value:o.type===qt?$c(o.value,t,r):i!==null&&(Yi(t,i)||t.push(i),i=null)}i!==null&&!Yi(t,i)&&t.push(i)}function Or(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Or.prototype.simplify=function(e){return e=e||{},new Or(Dc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Or.prototype.substitute=function(e,t){return t instanceof Or||(t=this.parser.parse(String(t))),new Or(Hv(this.tokens,e,t),this.parser)},Or.prototype.evaluate=function(e){return e=e||{},fi(this.tokens,this,e)},Or.prototype.toString=function(){return Pc(this.tokens,!1)},Or.prototype.symbols=function(e){e=e||{};var t=[];return $c(this.tokens,t,e),t},Or.prototype.variables=function(e){e=e||{};var t=[];$c(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Or.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 "+Pc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var no="TEOF",Ze="TOP",Va="TNUMBER",Kv="TSTRING",hn="TPAREN",Ji="TBRACKET",Ba="TCOMMA",Mc="TNAME",Fc="TSEMICOLON";function Yv(e,t,r){this.type=e,this.value=t,this.index=r}Yv.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 Yv(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(no,"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(Kv,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(Ji,e),this.pos++,!0):!1},rt.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ba,","),this.pos++,!0):!1},rt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Fc,";"),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(Va,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(Mc,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 He(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}He.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},He.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?Yi(t,e.value):typeof t=="function"?t(e):e.value===t},He.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},He.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},He.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},He.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))}},He.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Mc)||this.accept(Ze,r))e.push(new Ie(cn,this.current.value));else if(this.accept(Va))e.push(new Ie(dr,this.current.value));else if(this.accept(Kv))e.push(new Ie(dr,this.current.value));else if(this.accept(hn,"("))this.parseExpression(e),this.expect(hn,")");else if(this.accept(Ji,"["))if(this.accept(Ji,"]"))e.push(new Ie(Ki,0));else{var n=this.parseArrayList(e);e.push(new Ie(Ki,n))}else throw new Error("unexpected "+this.nextToken)},He.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},He.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},He.prototype.parseUntilEndStatement=function(e,t){return this.accept(Fc)?(this.nextToken&&this.nextToken.type!==no&&!(this.nextToken.type===hn&&this.nextToken.value===")")&&t.push(new Ie(za)),this.nextToken.type!==no&&this.parseExpression(t),e.push(new Ie(qt,t)),!0):!1},He.prototype.parseArrayList=function(e){for(var t=0;!this.accept(Ji,"]");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ze,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Gi){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(ci,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new Ie(qt,r)),e.push(new Ie(La,t.value));continue}if(t.type!==cn&&t.type!==di)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ie(ci,t.value)),e.push(new Ie(qt,r)),e.push(dn("="))}},He.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(qt,t)),e.push(new Ie(qt,r)),e.push(Wv("?"))}},He.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ze,"or");){var t=[];this.parseAndExpression(t),e.push(new Ie(qt,t)),e.push(dn("or"))}},He.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ze,"and");){var t=[];this.parseComparison(t),e.push(new Ie(qt,t)),e.push(dn("and"))}};var rP=["==","!=","<","<=",">=",">","in"];He.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,rP);){var t=this.current;this.parseAddSub(e),e.push(dn(t.value))}};var nP=["+","-","||"];He.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,nP);){var t=this.current;this.parseTerm(e),e.push(dn(t.value))}};var iP=["*","/","%"];He.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,iP);){var t=this.current;this.parseFactor(e),e.push(dn(t.value))}},He.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===Fc||this.nextToken.type===Ba||this.nextToken.type===no||this.nextToken.type===hn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ua(n.value))}else this.parseExponential(e)},He.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(dn("^"))},He.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Ua("!"))},He.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(Ua(n.value))}else for(this.parseMemberExpression(e);this.accept(hn,"(");)if(this.accept(hn,")"))e.push(new Ie(Gi,0));else{var i=this.parseArgumentList(e);e.push(new Ie(Gi,i))}},He.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(hn,")");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ze,".")||this.accept(Ji,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Mc),e.push(new Ie(di,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(Ji,"]"),e.push(dn("["))}else throw new Error("unexpected symbol: "+t.value)}};function sP(e,t){return Number(e)+Number(t)}function oP(e,t){return e-t}function aP(e,t){return e*t}function lP(e,t){return e/t}function uP(e,t){return e%t}function cP(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function dP(e,t){return e===t}function fP(e,t){return e!==t}function hP(e,t){return e>t}function pP(e,t){return e<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 Yi(t,e)}function _P(e){return(Math.exp(e)-Math.exp(-e))/2}function wP(e){return(Math.exp(e)+Math.exp(-e))/2}function kP(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function SP(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function EP(e){return Math.log(e+Math.sqrt(e*e-1))}function TP(e){return Math.log((1+e)/(1-e))/2}function Jv(e){return Math.log(e)*Math.LOG10E}function xP(e){return-e}function AP(e){return!e}function OP(e){return e<0?Math.ceil(e):Math.floor(e)}function CP(e){return Math.random()*(e||1)}function Xv(e){return Rc(e+1)}function DP(e){return isFinite(e)&&e===Math.round(e)}var IP=4.7421875,Nc=[.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 Rc(e){var t,r;if(DP(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)*Rc(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=Nc[0];for(var c=1;c<Nc.length;++c)r+=Nc[c]/(e+c);return t=e+IP+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function PP(e){return Array.isArray(e)?e.length:String(e).length}function Qv(){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 eg(e,t,r){return e?t:r}function $P(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 MP(e,t,r){return r&&(r[e]=t),t}function FP(e,t){return e[t|0]}function NP(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function RP(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function LP(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 zP(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 UP(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 VP(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 BP(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function qP(e){return(e>0)-(e<0)||+e}var tg=1/3;function jP(e){return e<0?-Math.pow(-e,tg):Math.pow(e,tg)}function ZP(e){return Math.exp(e)-1}function WP(e){return Math.log(1+e)}function HP(e){return Math.log(e)/Math.LN2}function hi(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||_P,cosh:Math.cosh||wP,tanh:Math.tanh||kP,asinh:Math.asinh||SP,acosh:Math.acosh||EP,atanh:Math.atanh||TP,sqrt:Math.sqrt,cbrt:Math.cbrt||jP,log:Math.log,log2:Math.log2||HP,ln:Math.log,lg:Math.log10||Jv,log10:Math.log10||Jv,expm1:Math.expm1||ZP,log1p:Math.log1p||WP,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||OP,"-":xP,"+":Number,exp:Math.exp,not:AP,length:PP,"!":Xv,sign:Math.sign||qP},this.binaryOps={"+":sP,"-":oP,"*":aP,"/":lP,"%":uP,"^":Math.pow,"||":cP,"==":dP,"!=":fP,">":hP,"<":pP,">=":mP,"<=":vP,and:gP,or:yP,in:bP,"=":MP,"[":FP},this.ternaryOps={"?":eg},this.functions={random:CP,fac:Xv,min:RP,max:NP,hypot:Math.hypot||Qv,pyt:Math.hypot||Qv,pow:Math.pow,atan2:Math.atan2,if:eg,gamma:Rc,roundTo:$P,map:LP,fold:zP,filter:UP,indexOf:VP,join:BP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}hi.prototype.parse=function(e){var t=[],r=new He(this,new rt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(no,"EOF"),new Or(t,this)},hi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var rg=new hi;hi.parse=function(e){return rg.parse(e)},hi.evaluate=function(e,t){return rg.parse(e).evaluate(t)};var ng={"+":"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 GP(e){return ng.hasOwnProperty(e)?ng[e]:e}hi.prototype.isOperatorEnabled=function(e){var t=GP(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var KP=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,YP=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,JP=/(__optional\("[^"]+"\))\.length\b/g,XP=new hi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),ig=new Map;function QP(e){return e.replace(KP,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(YP,(t,r)=>`__length(${r})`).replace(JP,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function e$(e){const t=ig.get(e);if(t)return t;const r=XP.parse(QP(e));return ig.set(e,r),r}function t$(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=e$(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 sg=["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"],r$=7200*1e3;function qa(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function ja(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+r$&&(i.seats?.available??0)>0})}async function Za(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}));qa(e,t)}var n$={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}));qa(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=Dn(In(r,t.selectedTime),t.selectedTime);for(const s of i)e.preCart.addItem(ft(s,{time:t.selectedTime}))}},i$={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=Dn(In(r,s),s);for(const a of o)e.preCart.addItem(ft(a,{time:s}))}},s$={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}));for(const n of Object.values(r))e.preCart.addItem(ft(ia(n)))}},o$={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()}));qa(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=Dn(In(n,t.selectedTime),t.selectedTime);for(const o of s)e.preCart.addItem(ft(o,{time:t.selectedTime}))}},a$={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=Dn(In(n,o),o);for(const l of a)e.preCart.addItem(ft(l,{time:o}))}},l$={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()}));qa(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=Dn(In(n,t.selectedTime),t.selectedTime);for(const o of s)e.preCart.addItem(ft(o,{time:t.selectedTime}))}},u$={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=xu(n,r.id,{event_title:r.event_title});e.preCart.addItem(ft(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},c$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(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=Dn(In(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(ft(l,{time:n.start_time}))}}},d$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(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=Dn(In(s,l),l);for(const d of c)e.preCart.addItem(ft(d,{time:l}))}}},f$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(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=Dn(In(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(ft(l,{time:n.start_time}))}}},h$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(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=xu(o,i.id,{event_title:i.event_title});e.preCart.addItem(ft(a,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},p$={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(ft(up(r)))}},m$={"ticket:timeslot":n$,"ticket:day":i$,"ticket:annual":s$,"event:admission":o$,"event:admission:day":a$,"event:admission:timeslot":l$,"event:price":u$,"events:admission":c$,"events:admission:day":d$,"events:admission:timeslot":f$,"events:price":h$,coupon:p$};function pi(e){const t=m$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${sg.join(", ")}`),t}var og=sg,v$=0,g$=class{uid=v$++;#e=re();get filters(){return p(this.#e)}set filters(e){I(this.#e,e,!0)}#t=re();get eventIds(){return p(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=re();get museumIds(){return p(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=re();get exhibitionIds(){return p(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=re();get ticketIds(){return p(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=re();get ticketGroupIds(){return p(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=re();get selectedDate(){return p(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=re();get selectedTimeslot(){return p(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return p(this.#l)}set selectedTime(e){I(this.#l,e)}#u=re(Fe([]));get ticketSegments(){return p(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#d=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return p(this.#d)}set preCarts(e){I(this.#d,e)}#c=re();get timeslotDetails(){return p(this.#c)}set timeslotDetails(e){I(this.#c,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>pi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>pi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>pi(e).isTicketsVisible(this))}},ag="go-ticket-selection",y$=Mi(ag),pn=Fi(ag);function b$(e,t){Q(t,!0);let r=b(t,"when",7),n=b(t,"then",7,"show");const i=pn(t.$$host),s=D(()=>i.value),o=WE(t.$$host),a=D(()=>o.value),l=Ni(t.$$host),c=D(()=>l.value),d=Ri(t.$$host),u=D(()=>d.value);let h=D(()=>({ticketSelection:p(s),personalizationDetails:p(a),formData:p(c)?.formData,cart:C.cart,cartView:p(u)}));const f=T=>{I(h,T)},g=()=>p(h);let m=D(()=>t$(r(),p(h))),v=null;me(()=>{const T=t.$$host;if(p(m)&&n()==="show")v&&(T.appendChild(v),v=null);else if(!v&&T.childNodes.length>0)for(v=document.createDocumentFragment();T.firstChild;)v.appendChild(T.firstChild)});var _={_setData:f,_getData:g,get when(){return r()},set when(T){r(T),y()},get then(){return n()},set then(T="show"){n(T),y()}};return ee(_)}customElements.define("go-if",te(b$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function lg(e,t){Q(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"),me(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ee({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",te(lg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function _$(e,t){Q(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 lg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ee(o)}customElements.define("go-init",te(_$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function w$(e,t){Q(t,!0);const r=b(t,"to",7),n=D(()=>Xe.config.urls[r()]),i=$n(t.$$host,"a");return me(()=>{if(!p(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",p(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Xe.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}Xe.config.navigateTo(Xe.config.urls[r()]())}),ee({get to(){return r()},set to(s){r(s),y()}})}customElements.define("go-link",te(w$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var k$=class{#e=re();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return al(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?Xe.config.urls.annualTicketPersonalizationList?.()?Xe.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}}},ug="go-order-details",S$=Mi(ug),cg=Fi(ug);function E$(e,t){Q(t,!0);let r=b(t,"token",7);const n=new k$(r());S$(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 ee(i)}customElements.define("go-order",te(E$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var T$=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),x$=j('<br/> <span class="go-order-item-quantities"> </span>',1),A$=j('<a aria-label="iCal link"> </a>'),O$=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 dg(e,t){Q(t,!0);let r=b(t,"item",7),n=b(t,"orderDetails",7);var i={get item(){return r()},set item(x){r(x),y()},get orderDetails(){return n()},set orderDetails(x){n(x),y()}},s=O$(),o=M(s),a=M(o),l=X(M(a),2),c=M(l),d=M(c,!0);P(c);var u=X(c,2),h=x=>{var O=T$(),$=U(O),L=M($,!0);P($);var W=X($,2),N=M(W,!0);P(W),ae((se,V)=>{ne(L,se),ne(N,V)},[()=>Us(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(r().attributes.start_time)]),S(x,O)};ce(u,x=>{r().attributes.start_time&&x(h)});var f=X(u,2);Ve(f,17,()=>r().attributes.quantities,x=>x.id,(x,O)=>{var $=x$(),L=X(U($),2),W=M(L);P(L),ae(()=>ne(W,`${p(O).quantity??""} x ${p(O).title??""}`)),S(x,$)});var g=X(f,2),m=M(g,!0);P(g),P(l);var v=X(l,2),_=M(v,!0);P(v);var T=X(v,4),A=M(T),E=x=>{var O=A$(),$=M(O,!0);P(O),ae(L=>{ke(O,"href",C.apiUrl+r().attributes.ical_url),ne($,L)},[()=>C.t("common.calendar")]),S(x,O)};return ce(A,x=>{r().attributes.ical_url&&x(E)}),P(T),P(a),P(o),P(s),ae((x,O,$)=>{ne(d,r().attributes.title),ke(g,"href",x),ne(m,O),ne(_,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>na(r().price_cents)]),S(e,s),ee(i)}te(dg,{item:{},orderDetails:{}},[],[],{mode:"open"});var C$=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),D$=j('<span class="go-cart-item-date"> </span>'),I$=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),P$=j('<br/> <a class="go-ticket-personalization"> </a>',1),$$=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),M$=j('<a aria-label="iCal link"> </a>'),F$=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>'),N$=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),R$=j('<a class="go-ticket-personalization"> </a>'),L$=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 fg(e,t){Q(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=K(),a=U(o),l=d=>{var u=K(),h=U(u);Ve(h,17,()=>({length:n().attributes.quantity}),zr,(f,g,m)=>{var v=F$(),_=M(v),T=M(_),A=M(T);A.textContent="1";var E=X(A,2),x=M(E),O=M(x,!0);P(x);var $=X(x,2),L=B=>{const H=D(()=>n().attributes.barcodes[m]?.id);var G=I$(),le=U(G),de=ge=>{var fe=C$(),w=U(fe),qe=M(w,!0);P(w);var Pe=X(w,2),Ye=M(Pe,!0);P(Pe),ae((kt,Ge)=>{ne(qe,kt),ne(Ye,Ge)},[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(n().attributes.start_time)]),S(ge,fe)},F=ge=>{var fe=D$(),w=M(fe,!0);P(fe),ae(qe=>ne(w,qe),[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),S(ge,fe)};ce(le,ge=>{n().attributes.ticket_type==="time_slot"?ge(de):n().attributes.ticket_type==="normal"&&ge(F,1)});var ue=X(le,4),z=M(ue,!0);P(ue),ae((ge,fe)=>{ke(ue,"href",ge),ne(z,fe)},[()=>i().downloadLink(n(),p(H)),()=>C.t("common.download")]),S(B,G)},W=B=>{var H=P$(),G=X(U(H),2),le=M(G,!0);P(G),ae((de,F)=>{ke(G,"href",de),ne(le,F)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(B,H)};ce($,B=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?B(L):B(W,-1)}),P(E);var N=X(E,2),se=M(N,!0);P(N);var V=X(N,2),oe=M(V),pe=B=>{var H=$$(),G=M(H);P(H),ae(()=>{ke(H,"href",C.apiUrl+n().attributes.barcodes[m]?.passbook_url),ke(G,"src",r)}),S(B,H)};ce(oe,B=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&B(pe)}),P(V);var J=X(V,2),ie=M(J),Y=B=>{var H=M$(),G=M(H,!0);P(H),ae(le=>{ke(H,"href",C.apiUrl+n().attributes.ical_url),ne(G,le)},[()=>C.t("common.calendar")]),S(B,H)};ce(ie,B=>{n().attributes.ical_url&&B(Y)}),P(J),P(T),P(_),P(v),ae(B=>{ne(O,n().attributes.title),ne(se,B)},[()=>na(n().price_cents)]),S(f,v)}),S(d,u)},c=d=>{var u=L$(),h=M(u),f=M(h),g=M(f),m=M(g,!0);P(g);var v=X(g,2),_=M(v),T=M(_,!0);P(_);var A=X(_,2),E=L=>{var W=N$(),N=M(W,!0);P(W),ae((se,V)=>{ke(W,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),S(L,W)},x=L=>{var W=R$(),N=M(W,!0);P(W),ae((se,V)=>{ke(W,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(L,W)};ce(A,L=>{n().attributes.is_voucher?L(E):L(x,-1)}),P(v);var O=X(v,2),$=M(O,!0);P(O),Et(2),P(f),P(h),P(u),ae(L=>{ne(m,n().attributes.quantity),ne(T,n().attributes.title),ne($,L)},[()=>na(n().price_cents)]),S(d,u)};return ce(a,d=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?d(l):d(c,-1)}),S(e,o),ee(s)}te(fg,{item:{},orderDetails:{}},[],[],{mode:"open"});var z$=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 U$(e,t){Q(t,!0);const r=cg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);var s=K(),o=U(s),a=l=>{var c=z$(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=X(h,2),m=M(g,!0);P(g);var v=X(g,2),_=M(v,!0);P(v),Et(2),P(u),P(d);var T=X(d,2);Ve(T,17,()=>p(i).items,$=>$.id,($,L)=>{var W=K(),N=U(W),se=oe=>{fg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})},V=oe=>{dg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})};ce(N,oe=>{p(L).type==="Ticket"?oe(se):p(L).type==="Event"&&oe(V,1)}),S($,W)});var A=X(T,2),E=M(A),x=X(M(E),4),O=M(x,!0);P(x),Et(2),P(E),P(A),P(c),ae(($,L,W,N)=>{ne(f,$),ne(m,L),ne(_,W),ne(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:na(p(i).total_price_cents)})]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),ee()}customElements.define("go-order-breakdown",te(U$,{},[],[]));function V$(e,t){Q(t,!0);const r=cg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);Et();var s=Lt();ae(()=>ne(s,p(i)?.id)),S(e,s),ee()}customElements.define("go-order-invoice-id",te(V$,{},[],[]));var B$=j("<go-form></go-form>",2);function q$(e,t){Q(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}Zl();var n=B$();Gn(n,"formId","passwordResetForm"),Cl("submit",n,r),S(e,n),ee()}customElements.define("go-profile-password",te(q$,{},[],[]));var j$=j("<go-form></go-form>",2);function Z$(e,t){Q(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=re(void 0);const n=D(()=>C.validateToken());rn(async()=>{await C.waitForAllFetches(),await Wl(()=>p(r).details),await Wl(()=>p(n).data),p(r).details.fill(p(n).data)});var i=j$();Gn(i,"formId","accountDetailsForm"),Tf(i,s=>I(r,s),()=>p(r)),S(e,i),ee()}customElements.define("go-profile-details",te(Z$,{},[],[]));var W$=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function H$(e,t){Q(t,!0);const r=D(()=>C.validateToken()),n=D(()=>p(r)?.data);var i=K(),s=U(i),o=l=>{var c=W$(),d=U(c),u=M(d);P(d);var h=X(d,2),f=M(h,!0);P(h),ae(()=>{ne(u,`${p(n).name??""}
|
|
83
|
-
${p(n).surname??""}`),ne(f,p(n).email)}),S(l,c)},a=l=>{var c=
|
|
84
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sM(e,t){return rM(e)||nM(e,t)||oM(e,t)||iM()}function oM(e,t){if(e){if(typeof e=="string")return pg(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)?pg(e,t):void 0}}var mg=Object.entries,vg=Object.setPrototypeOf,aM=Object.isFrozen,lM=Object.getPrototypeOf,uM=Object.getOwnPropertyDescriptor,Dt=Object.freeze,fr=Object.seal,Xi=Object.create,gg=typeof Reflect<"u"&&Reflect,zc=gg.apply,Uc=gg.construct;Dt||(Dt=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)}),Uc||(Uc=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 Qi=ut(Array.prototype.forEach),cM=ut(Array.prototype.lastIndexOf),yg=ut(Array.prototype.pop),es=ut(Array.prototype.push),dM=ut(Array.prototype.splice),It=Array.isArray,io=ut(String.prototype.toLowerCase),Vc=ut(String.prototype.toString),bg=ut(String.prototype.match),ts=ut(String.prototype.replace),_g=ut(String.prototype.indexOf),fM=ut(String.prototype.trim),hM=ut(Number.prototype.toString),pM=ut(Boolean.prototype.toString),wg=typeof BigInt>"u"?null:ut(BigInt.prototype.toString),kg=typeof Symbol>"u"?null:ut(Symbol.prototype.toString),nt=ut(Object.prototype.hasOwnProperty),so=ut(Object.prototype.toString),bt=ut(RegExp.prototype.test),oo=mM(TypeError);function ut(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 mM(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uc(e,r)}}function Te(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:io;if(vg&&vg(e,null),!It(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(aM(t)||(t[n]=s),i=s)}e[i]=!0}return e}function vM(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function wt(e){const t=Xi(null);for(const n of mg(e)){var r=sM(n,2);const i=r[0],s=r[1];nt(e,i)&&(It(s)?t[i]=vM(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=wt(s):t[i]=s)}return t}function gM(e){switch(typeof e){case"string":return e;case"number":return hM(e);case"boolean":return pM(e);case"bigint":return wg?wg(e):"0";case"symbol":return kg?kg(e):"Symbol()";case"undefined":return so(e);case"function":case"object":{if(e===null)return so(e);const t=e,r=Kr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:so(n)}return so(e)}default:return so(e)}}function Kr(e,t){for(;e!==null;){const n=uM(e,t);if(n){if(n.get)return ut(n.get);if(typeof n.value=="function")return ut(n.value)}e=lM(e)}function r(){return null}return r}function yM(e){try{return bt(e,""),!0}catch{return!1}}var Sg=Dt(["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"]),Bc=Dt(["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"]),qc=Dt(["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"]),bM=Dt(["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"]),jc=Dt(["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"]),_M=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Eg=Dt(["#text"]),Tg=Dt(["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"]),Zc=Dt(["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"]),xg=Dt(["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"]),Wa=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wM=fr(/{{[\w\W]*|^[\w\W]*}}/g),kM=fr(/<%[\w\W]*|^[\w\W]*%>/g),SM=fr(/\${[\w\W]*/g),EM=fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),TM=fr(/^aria-[\-\w]+$/),Ag=fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xM=fr(/^(?:\w+script|data):/i),AM=fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),OM=fr(/^html$/i),CM=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},DM=function(){return typeof window>"u"?null:window},IM=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}},Og=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Cg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DM();const t=ve=>Cg(ve);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,h=Kr(u,"cloneNode"),f=Kr(u,"remove"),g=Kr(u,"nextSibling"),m=Kr(u,"childNodes"),v=Kr(u,"parentNode"),_=Kr(u,"shadowRoot"),T=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 ve=r.createElement("template");ve.content&&ve.content.ownerDocument&&(r=ve.content.ownerDocument)}let x,O="";const $=r,L=$.implementation,W=$.createNodeIterator,N=$.createDocumentFragment,se=$.getElementsByTagName,V=n.importNode;let oe=Og();t.isSupported=typeof mg=="function"&&typeof v=="function"&&L&&L.createHTMLDocument!==void 0;const pe=wM,J=kM,ie=SM,Y=EM,B=TM,H=xM,G=AM,le=CM;let de=Ag,F=null;const ue=Te({},[...Sg,...Bc,...qc,...jc,...Eg]);let z=null;const ge=Te({},[...Tg,...Zc,...xg,...Wa]);let fe=Object.seal(Xi(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,qe=null;const Pe=Object.seal(Xi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ye=!0,kt=!0,Ge=!1,Xt=!0,ct=!1,Qt=!0,St=!1,Pt=!1,er=!1,jt=!1,hr=!1,Cr=!1,Dr=!0,mn=!1;const Ir="user-content-";let pr=!0,Jr=!1,Xr={},_t=null;const zn=Te({},["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 rs=null;const ns=Te({},["audio","video","img","source","image","track"]);let ao=null;const Wc=Te({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",is="http://www.w3.org/2000/svg",mr="http://www.w3.org/1999/xhtml";let Un=mr,Hc=!1,Gc=null;const QM=Te({},[mi,is,mr],Vc);let Kc=Te({},["mi","mo","mn","ms","mtext"]),Yc=Te({},["annotation-xml"]);const e2=Te({},["title","style","font","a","script"]);let lo=null;const t2=["application/xhtml+xml","text/html"],r2="text/html";let st=null,ss=null;const n2=r.createElement("form"),Mg=function(k){return k instanceof RegExp||k instanceof Function},Jc=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ss&&ss===k)return;(!k||typeof k!="object")&&(k={}),k=wt(k),lo=t2.indexOf(k.PARSER_MEDIA_TYPE)===-1?r2:k.PARSER_MEDIA_TYPE,st=lo==="application/xhtml+xml"?Vc:io,F=nt(k,"ALLOWED_TAGS")&&It(k.ALLOWED_TAGS)?Te({},k.ALLOWED_TAGS,st):ue,z=nt(k,"ALLOWED_ATTR")&&It(k.ALLOWED_ATTR)?Te({},k.ALLOWED_ATTR,st):ge,Gc=nt(k,"ALLOWED_NAMESPACES")&&It(k.ALLOWED_NAMESPACES)?Te({},k.ALLOWED_NAMESPACES,Vc):QM,ao=nt(k,"ADD_URI_SAFE_ATTR")&&It(k.ADD_URI_SAFE_ATTR)?Te(wt(Wc),k.ADD_URI_SAFE_ATTR,st):Wc,rs=nt(k,"ADD_DATA_URI_TAGS")&&It(k.ADD_DATA_URI_TAGS)?Te(wt(ns),k.ADD_DATA_URI_TAGS,st):ns,_t=nt(k,"FORBID_CONTENTS")&&It(k.FORBID_CONTENTS)?Te({},k.FORBID_CONTENTS,st):zn,w=nt(k,"FORBID_TAGS")&&It(k.FORBID_TAGS)?Te({},k.FORBID_TAGS,st):wt({}),qe=nt(k,"FORBID_ATTR")&&It(k.FORBID_ATTR)?Te({},k.FORBID_ATTR,st):wt({}),Xr=nt(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?wt(k.USE_PROFILES):k.USE_PROFILES:!1,Ye=k.ALLOW_ARIA_ATTR!==!1,kt=k.ALLOW_DATA_ATTR!==!1,Ge=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ct=k.SAFE_FOR_TEMPLATES||!1,Qt=k.SAFE_FOR_XML!==!1,St=k.WHOLE_DOCUMENT||!1,jt=k.RETURN_DOM||!1,hr=k.RETURN_DOM_FRAGMENT||!1,Cr=k.RETURN_TRUSTED_TYPE||!1,er=k.FORCE_BODY||!1,Dr=k.SANITIZE_DOM!==!1,mn=k.SANITIZE_NAMED_PROPS||!1,pr=k.KEEP_CONTENT!==!1,Jr=k.IN_PLACE||!1,de=yM(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:Ag,Un=typeof k.NAMESPACE=="string"?k.NAMESPACE:mr,Kc=nt(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?wt(k.MATHML_TEXT_INTEGRATION_POINTS):Te({},["mi","mo","mn","ms","mtext"]),Yc=nt(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?wt(k.HTML_INTEGRATION_POINTS):Te({},["annotation-xml"]);const q=nt(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?wt(k.CUSTOM_ELEMENT_HANDLING):Xi(null);if(fe=Xi(null),nt(q,"tagNameCheck")&&Mg(q.tagNameCheck)&&(fe.tagNameCheck=q.tagNameCheck),nt(q,"attributeNameCheck")&&Mg(q.attributeNameCheck)&&(fe.attributeNameCheck=q.attributeNameCheck),nt(q,"allowCustomizedBuiltInElements")&&typeof q.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=q.allowCustomizedBuiltInElements),ct&&(kt=!1),hr&&(jt=!0),Xr&&(F=Te({},Eg),z=Xi(null),Xr.html===!0&&(Te(F,Sg),Te(z,Tg)),Xr.svg===!0&&(Te(F,Bc),Te(z,Zc),Te(z,Wa)),Xr.svgFilters===!0&&(Te(F,qc),Te(z,Zc),Te(z,Wa)),Xr.mathMl===!0&&(Te(F,jc),Te(z,xg),Te(z,Wa))),Pe.tagCheck=null,Pe.attributeCheck=null,nt(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Pe.tagCheck=k.ADD_TAGS:It(k.ADD_TAGS)&&(F===ue&&(F=wt(F)),Te(F,k.ADD_TAGS,st))),nt(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Pe.attributeCheck=k.ADD_ATTR:It(k.ADD_ATTR)&&(z===ge&&(z=wt(z)),Te(z,k.ADD_ATTR,st))),nt(k,"ADD_URI_SAFE_ATTR")&&It(k.ADD_URI_SAFE_ATTR)&&Te(ao,k.ADD_URI_SAFE_ATTR,st),nt(k,"FORBID_CONTENTS")&&It(k.FORBID_CONTENTS)&&(_t===zn&&(_t=wt(_t)),Te(_t,k.FORBID_CONTENTS,st)),nt(k,"ADD_FORBID_CONTENTS")&&It(k.ADD_FORBID_CONTENTS)&&(_t===zn&&(_t=wt(_t)),Te(_t,k.ADD_FORBID_CONTENTS,st)),pr&&(F["#text"]=!0),St&&Te(F,["html","head","body"]),F.table&&(Te(F,["tbody"]),delete w.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw oo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=k.TRUSTED_TYPES_POLICY,O=x.createHTML("")}else x===void 0&&(x=IM(d,i)),x!==null&&typeof O=="string"&&(O=x.createHTML(""));(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&F===ue&&(F=wt(F)),oe.uponSanitizeAttribute.length>0&&z===ge&&(z=wt(z)),Dt&&Dt(k),ss=k},Fg=Te({},[...Bc,...qc,...bM]),Ng=Te({},[...jc,..._M]),i2=function(k){let q=v(k);(!q||!q.tagName)&&(q={namespaceURI:Un,tagName:"template"});const he=io(k.tagName),Oe=io(q.tagName);return Gc[k.namespaceURI]?k.namespaceURI===is?q.namespaceURI===mr?he==="svg":q.namespaceURI===mi?he==="svg"&&(Oe==="annotation-xml"||Kc[Oe]):!!Fg[he]:k.namespaceURI===mi?q.namespaceURI===mr?he==="math":q.namespaceURI===is?he==="math"&&Yc[Oe]:!!Ng[he]:k.namespaceURI===mr?q.namespaceURI===is&&!Yc[Oe]||q.namespaceURI===mi&&!Kc[Oe]?!1:!Ng[he]&&(e2[he]||!Fg[he]):!!(lo==="application/xhtml+xml"&&Gc[k.namespaceURI]):!1},Pr=function(k){es(t.removed,{element:k});try{v(k).removeChild(k)}catch{f(k)}},vi=function(k,q){try{es(t.removed,{attribute:q.getAttributeNode(k),from:q})}catch{es(t.removed,{attribute:null,from:q})}if(q.removeAttribute(k),k==="is")if(jt||hr)try{Pr(q)}catch{}else try{q.setAttribute(k,"")}catch{}},Rg=function(k){let q=null,he=null;if(er)k="<remove></remove>"+k;else{const et=bg(k,/^[\r\n\t ]+/);he=et&&et[0]}lo==="application/xhtml+xml"&&Un===mr&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const Oe=x?x.createHTML(k):k;if(Un===mr)try{q=new c().parseFromString(Oe,lo)}catch{}if(!q||!q.documentElement){q=L.createDocument(Un,"template",null);try{q.documentElement.innerHTML=Hc?O:Oe}catch{}}const $e=q.body||q.documentElement;return k&&he&&$e.insertBefore(r.createTextNode(he),$e.childNodes[0]||null),Un===mr?se.call(q,St?"html":"body")[0]:St?q.documentElement:$e},Lg=function(k){return W.call(k.ownerDocument||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},zg=function(k){k.normalize();const q=W.call(k.ownerDocument||k,k,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let he=q.nextNode();for(;he;){let Oe=he.data;Qi([pe,J,ie],$e=>{Oe=ts(Oe,$e," ")}),he.data=Oe,he=q.nextNode()}},Ha=function(k){const q=E?E(k):null;return typeof q!="string"||st(q)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==T(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==A(k)||k.childNodes!==m(k)},uo=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return A(k)===Yr.documentFragment}catch{return!1}},Ga=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return typeof A(k)=="number"}catch{return!1}};function vn(ve,k,q){Qi(ve,he=>{he.call(t,k,q,ss)})}const Ug=function(k){let q=null;if(vn(oe.beforeSanitizeElements,k,null),Ha(k))return Pr(k),!0;const he=st(k.nodeName);if(vn(oe.uponSanitizeElement,k,{tagName:he,allowedTags:F}),Qt&&k.hasChildNodes()&&!Ga(k.firstElementChild)&&bt(/<[/\w!]/g,k.innerHTML)&&bt(/<[/\w!]/g,k.textContent)||Qt&&k.namespaceURI===mr&&he==="style"&&Ga(k.firstElementChild)||k.nodeType===Yr.progressingInstruction||Qt&&k.nodeType===Yr.comment&&bt(/<[/\w]/g,k.data))return Pr(k),!0;if(w[he]||!(Pe.tagCheck instanceof Function&&Pe.tagCheck(he))&&!F[he]){if(!w[he]&&Bg(he)&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he)))return!1;if(pr&&!_t[he]){const Oe=v(k),$e=m(k);if($e&&Oe){const et=$e.length;for(let Zt=et-1;Zt>=0;--Zt){const Vn=h($e[Zt],!0);Oe.insertBefore(Vn,g(k))}}}return Pr(k),!0}return(A?A(k):k.nodeType)===Yr.element&&!i2(k)||(he==="noscript"||he==="noembed"||he==="noframes")&&bt(/<\/no(script|embed|frames)/i,k.innerHTML)?(Pr(k),!0):(ct&&k.nodeType===Yr.text&&(q=k.textContent,Qi([pe,J,ie],Oe=>{q=ts(q,Oe," ")}),k.textContent!==q&&(es(t.removed,{element:k.cloneNode()}),k.textContent=q)),vn(oe.afterSanitizeElements,k,null),!1)},Vg=function(k,q,he){if(qe[q]||Dr&&(q==="id"||q==="name")&&(he in r||he in n2))return!1;const Oe=z[q]||Pe.attributeCheck instanceof Function&&Pe.attributeCheck(q,k);if(!(kt&&!qe[q]&&bt(Y,q))){if(!(Ye&&bt(B,q))){if(!Oe||qe[q]){if(!(Bg(k)&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,k)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(k))&&(fe.attributeNameCheck instanceof RegExp&&bt(fe.attributeNameCheck,q)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(q,k))||q==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he))))return!1}else if(!ao[q]){if(!bt(de,ts(he,G,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&k!=="script"&&_g(he,"data:")===0&&rs[k])){if(!(Ge&&!bt(H,ts(he,G,"")))){if(he)return!1}}}}}}return!0},s2=Te({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bg=function(k){return!s2[io(k)]&&bt(le,k)},qg=function(k){vn(oe.beforeSanitizeAttributes,k,null);const q=k.attributes;if(!q||Ha(k))return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let Oe=q.length;for(;Oe--;){const $e=q[Oe],et=$e.name,Zt=$e.namespaceURI,Vn=$e.value,gn=st(et),Xc=Vn;let mt=et==="value"?Xc:fM(Xc);if(he.attrName=gn,he.attrValue=mt,he.keepAttr=!0,he.forceKeepAttr=void 0,vn(oe.uponSanitizeAttribute,k,he),mt=he.attrValue,mn&&(gn==="id"||gn==="name")&&_g(mt,Ir)!==0&&(vi(et,k),mt=Ir+mt),Qt&&bt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){vi(et,k);continue}if(gn==="attributename"&&bg(mt,"href")){vi(et,k);continue}if(he.forceKeepAttr)continue;if(!he.keepAttr){vi(et,k);continue}if(!Xt&&bt(/\/>/i,mt)){vi(et,k);continue}ct&&Qi([pe,J,ie],Zg=>{mt=ts(mt,Zg," ")});const jg=st(k.nodeName);if(!Vg(jg,gn,mt)){vi(et,k);continue}if(x&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Zt)switch(d.getAttributeType(jg,gn)){case"TrustedHTML":mt=x.createHTML(mt);break;case"TrustedScriptURL":mt=x.createScriptURL(mt);break}if(mt!==Xc)try{Zt?k.setAttributeNS(Zt,et,mt):k.setAttribute(et,mt),Ha(k)?Pr(k):yg(t.removed)}catch{vi(et,k)}}vn(oe.afterSanitizeAttributes,k,null)},Ka=function(k){let q=null;const he=Lg(k);for(vn(oe.beforeSanitizeShadowDOM,k,null);q=he.nextNode();)if(vn(oe.uponSanitizeShadowNode,q,null),Ug(q),qg(q),uo(q.content)&&Ka(q.content),(A?A(q):q.nodeType)===Yr.element){const Oe=_?_(q):q.shadowRoot;uo(Oe)&&(os(Oe),Ka(Oe))}vn(oe.afterSanitizeShadowDOM,k,null)},os=function(k){const q=A?A(k):k.nodeType;if(q===Yr.element){const $e=_?_(k):k.shadowRoot;uo($e)&&(os($e),Ka($e))}const he=m?m(k):k.childNodes;if(!he)return;const Oe=[];Qi(he,$e=>{es(Oe,$e)});for(const $e of Oe)os($e);if(q===Yr.element){const $e=E?E(k):null;if(typeof $e=="string"&&st($e)==="template"){const et=k.content;uo(et)&&os(et)}}};return t.sanitize=function(ve){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,he=null,Oe=null,$e=null;if(Hc=!ve,Hc&&(ve="<!-->"),typeof ve!="string"&&!Ga(ve)&&(ve=gM(ve),typeof ve!="string"))throw oo("dirty is not a string, aborting");if(!t.isSupported)return ve;if(Pt||Jc(k),t.removed=[],typeof ve=="string"&&(Jr=!1),Jr){const Vn=E?E(ve):ve.nodeName;if(typeof Vn=="string"){const gn=st(Vn);if(!F[gn]||w[gn])throw oo("root node is forbidden and cannot be sanitized in-place")}if(Ha(ve))throw oo("root node is clobbered and cannot be sanitized in-place");os(ve)}else if(Ga(ve))q=Rg("<!---->"),he=q.ownerDocument.importNode(ve,!0),he.nodeType===Yr.element&&he.nodeName==="BODY"||he.nodeName==="HTML"?q=he:q.appendChild(he),os(he);else{if(!jt&&!ct&&!St&&ve.indexOf("<")===-1)return x&&Cr?x.createHTML(ve):ve;if(q=Rg(ve),!q)return jt?null:Cr?O:""}q&&er&&Pr(q.firstChild);const et=Lg(Jr?ve:q);for(;Oe=et.nextNode();)Ug(Oe),qg(Oe),uo(Oe.content)&&Ka(Oe.content);if(Jr)return ct&&zg(ve),ve;if(jt){if(ct&&zg(q),hr)for($e=N.call(q.ownerDocument);q.firstChild;)$e.appendChild(q.firstChild);else $e=q;return(z.shadowroot||z.shadowrootmode)&&($e=V.call(n,$e,!0)),$e}let Zt=St?q.outerHTML:q.innerHTML;return St&&F["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&bt(OM,q.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
|
|
85
|
-
`+Zt),ct&&Qi([pe,J,ie],Vn=>{Zt=ts(Zt,Vn," ")}),x&&Cr?x.createHTML(Zt):Zt},t.setConfig=function(){Jc(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Pt=!0},t.clearConfig=function(){ss=null,Pt=!1},t.isValidAttribute=function(ve,k,q){return ss||Jc({}),Vg(st(ve),st(k),q)},t.addHook=function(ve,k){typeof k=="function"&&es(oe[ve],k)},t.removeHook=function(ve,k){if(k!==void 0){const q=cM(oe[ve],k);return q===-1?void 0:dM(oe[ve],q,1)[0]}return yg(oe[ve])},t.removeHooks=function(ve){oe[ve]=[]},t.removeAllHooks=function(){oe=Og()},t}var PM=Cg(),$M=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),MM=j("<option> </option>"),FM=j('<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>');function Dg(e,t){Q(t,!0);const r=f=>{var g=$M(),m=U(g),v=M(m);P(m);var _=X(m,2),T=M(_,!0);P(_),ae(A=>{ne(v,`${i().product.event_title??""} - ${A??""}`),ne(T,i().product.title)},[()=>zs(i().time)]),S(f,g)},n=f=>{Et();var g=Lt();ae(()=>ne(g,i().product.title)),S(f,g)};let i=b(t,"item",7),s=b(t,"details",7),o=re(void 0);me(()=>{s().preCart.items.map(f=>f.quantity),Ue(()=>{I(o,C.capacityManager.capacity(C.cart,i(),s().preCart),!0)})});function a(f,g,m){f.quantity=parseInt(g.value)}let l=n;Vs(i().product)&&(l=r);var c={get item(){return i()},set item(f){i(f),y()},get details(){return s()},set details(f){s(f),y()}},d=K(),u=U(d),h=f=>{var g=FM(),m=M(g),v=M(m),_=M(v),T=M(_);l(T),P(_);var A=X(_,2);o_(A,()=>PM.sanitize(i().product.description),!0),P(A);var E=X(A,2),x=M(E,!0);P(E);var O=X(E,2),$=M(O);Ve($,21,()=>Rp(p(o).min,p(o).max),L=>L.value,(L,W)=>{var N=MM(),se=M(N,!0);P(N);var V={};ae(()=>{Nl(N,i().quantity===p(W).value),ne(se,p(W).label),V!==(V=p(W).value)&&(N.value=(N.__value=p(W).value)??"")}),S(L,N)}),P($),P(O),P(v),P(m),P(g),ae(L=>{zt(m,1,Ur(["go-tickets-item",p(o).bookedOut&&"is-booked-out"])),ke(m,"data-testid",i().uuid),ne(x,i().price_formatted),ke($,"aria-label",L)},[()=>C.t("cart.content.table.edit")]),Rt("change",$,L=>a(i(),L.target,s()?.ticketSelectionDetails)),S(f,g)};return ce(u,f=>{p(o)&&!p(o).unavailable&&f(h)}),S(e,d),ee(c)}Lr(["change"]),te(Dg,{item:{},details:{}},[],[],{mode:"open"});var NM=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 RM(e,t){Q(t,!0);const r=Lc(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?.preCart?.items.length&&p(n)?.preCart?.items.length>0);var s=K(),o=U(s),a=l=>{var c=NM(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=X(h,2),m=M(g,!0);P(g);var v=X(g,2),_=M(v,!0);P(v);var T=X(v,2),A=M(T,!0);P(T),P(u),P(d);var E=X(d,2);Ve(E,17,()=>p(n).preCart.items,x=>x.uuid,(x,O)=>{Dg(x,{get item(){return p(O)},get details(){return p(n)}})}),P(c),ae((x,O,$,L)=>{ne(f,x),ne(m,O),ne(_,$),ne(A,L)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),ee()}customElements.define("go-ticket-segment-body",te(RM,{},[],[]));function LM(e,t){Q(t,!0);const r=Lc(t.$$host),n=D(()=>r.value);Et();var i=Lt();ae(()=>ne(i,p(n)?.preCart.totalFormatted)),S(e,i),ee()}customElements.define("go-ticket-segment-sum",te(LM,{},[],[]));var zM=class{#e;get tsd(){return p(this.#e)}set tsd(e){I(this.#e,e)}#t=re(Fe([]));get timeslots(){return p(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}this.timeslots=C.capacityManager.quotaManager.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(t=>({...t,startAt:t.timeSlot,timeFormatted:t.timeSlot.substring(11,16),available:t.capacity>0}))}},UM=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),VM=j('<ul data-testid="timeslots"></ul>');function BM(e,t){Q(t,!0);const r=[],n=new zM(pn(t.$$host));me(()=>{const d=n.tsd;if(!d)return;const u=d.filters,h=d.selectedDate;Ue(async()=>{d.timeslotTicketIds=[],u?.length&&h&&await Promise.all(u.map(f=>pi(f).loadTimeslots(d))),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)};me(()=>{const d=n.tsd;if(!d)return;const u=n.timeslots;if(u.length!==1)return;const h=u[0];h.available&&d.selectedTimeslot!==h.startAt&&(d.selectedTimeslot=h.startAt,i(t.$$host,h.startAt))});var o={details:n},a=K(),l=U(a),c=d=>{var u=VM();Ve(u,20,()=>n.timeslots,h=>h,(h,f)=>{const g=D(()=>f.totalCapacity===0),m=D(()=>!p(g)&&f.capacity===0),v=D(()=>p(g)||p(m)||!f.available),_=D(()=>n.tsd?.selectedTimeslot===f.startAt);var T=UM(),A=M(T),E=M(A),x=X(E);Fo(x);var O;P(A),P(T),ae(()=>{zt(T,1,Ur({"go-timeslot":!0,"is-unavailable":p(g),"is-sold-out":p(m),"is-disabled":p(v),"is-selected":p(_)})),ne(E,`${f.timeFormatted??""} `),x.disabled=p(v),ke(x,"aria-disabled",p(v)),O!==(O=f.startAt)&&(x.value=(x.__value=f.startAt)??"")}),Rt("change",x,s),k_(r,[],x,()=>(f.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),S(h,T)}),P(u),S(d,u)};return ce(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),S(e,a),ee(o)}Lr(["change"]),customElements.define("go-timeslots",te(BM,{},[],["details"]));var qM=class{#e=re();get details(){return p(this.#e)}set details(e){I(this.#e,e,!0)}#t=re(Fe(Xn(Vt())));get startAt(){return p(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=re(void 0);get selected(){return p(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>pi(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(Xn(Vt()))<0||this.dates[e.toString()]=="unavailable":e.compare(Xn(Vt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>pi(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)=>xt(t,e(this.params(r))),{})}ticketsDates(){const e=C.ticketsCalendar.bind(C);return this.fetchPeriod().reduce((t,r)=>xt(t,e(this.params(r))),{})}},jM=j("<!> <!> <!>",1),ZM=j("<div> </div>"),Ig=j("<!> <!>",1),WM=j('<div data-calendar-wrapper=""><!></div>');function Pg(e,t){Q(t,!0);let r=b(t,"calendarClass",7),n=re(void 0);const i=r();me(()=>{p(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=WM(),a=M(o);{const l=(c,d)=>{let u=()=>d?.().months,h=()=>d?.().weekdays;var f=Ig(),g=U(f);De(g,()=>rc,(v,_)=>{_(v,{children:(T,A)=>{var E=jM(),x=U(E);De(x,()=>sc,(L,W)=>{W(L,{class:"go-calendar-prev-button",children:(N,se)=>{Et();var V=Lt("Prev");S(N,V)},$$slots:{default:!0}})});var O=X(x,2);De(O,()=>nc,(L,W)=>{W(L,{class:"go-calendar-heading"})});var $=X(O,2);De($,()=>ic,(L,W)=>{W(L,{class:"go-calendar-next-button",children:(N,se)=>{Et();var V=Lt("Next");S(N,V)},$$slots:{default:!0}})}),S(T,E)},$$slots:{default:!0}})});var m=X(g,2);Ve(m,17,u,zr,(v,_)=>{var T=K(),A=U(T);De(A,()=>Ju,(E,x)=>{x(E,{class:"go-calendar-grid",children:(O,$)=>{var L=Ig(),W=U(L);De(W,()=>ec,(se,V)=>{V(se,{class:"go-calendar-grid-head",children:(oe,pe)=>{var J=K(),ie=U(J);De(ie,()=>eo,(Y,B)=>{B(Y,{class:"go-calendar-grid-row",children:(H,G)=>{var le=K(),de=U(le);Ve(de,17,h,zr,(F,ue,z,ge)=>{var fe=K(),w=U(fe);De(w,()=>tc,(qe,Pe)=>{Pe(qe,{children:(Ye,kt)=>{var Ge=ZM(),Xt=M(Ge,!0);P(Ge),ae(ct=>ne(Xt,ct),[()=>p(ue).slice(0,2)]),S(Ye,Ge)},$$slots:{default:!0}})}),S(F,fe)}),S(H,le)},$$slots:{default:!0}})}),S(oe,J)},$$slots:{default:!0}})});var N=X(W,2);De(N,()=>Xu,(se,V)=>{V(se,{class:"go-calendar-grid-body",children:(oe,pe)=>{var J=K(),ie=U(J);Ve(ie,17,()=>p(_).weeks,zr,(Y,B,H,G)=>{var le=K(),de=U(le);De(de,()=>eo,(F,ue)=>{ue(F,{class:"go-calendar-grid-row",children:(z,ge)=>{var fe=K(),w=U(fe);Ve(w,17,()=>p(B),zr,(qe,Pe,Ye,kt)=>{var Ge=K(),Xt=U(Ge);De(Xt,()=>Qu,(ct,Qt)=>{Qt(ct,{get date(){return p(Pe)},get month(){return p(_).value},class:"go-calendar-cell",children:(St,Pt)=>{var er=K(),jt=U(er);{let hr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(p(Pe)),"is-disabled":r().isDateDisabled(p(Pe)),"is-selected":r().selected?.compare(p(Pe))===0}));De(jt,()=>Yu,(Cr,Dr)=>{Dr(Cr,{get class(){return p(hr)},children:(mn,Ir)=>{Et();var pr=Lt();ae(()=>ne(pr,p(Pe).day)),S(mn,pr)},$$slots:{default:!0}})})}S(St,er)},$$slots:{default:!0}})}),S(qe,Ge)}),S(z,fe)},$$slots:{default:!0}})}),S(Y,le)}),S(oe,J)},$$slots:{default:!0}})}),S(O,L)},$$slots:{default:!0}})}),S(v,T)}),S(c,f)};De(a,()=>Ym,(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 P(o),Tf(o,l=>I(n,l),()=>p(n)),S(e,o),ee(s)}te(Pg,{calendarClass:{}},[],["details"],{mode:"open"});function HM(e,t){Q(t,!0);const r=new qM,n=r,i=pn(t.$$host),s=D(()=>i.value);me(()=>{r.details=p(s)}),t.$$host.addEventListener("go-date-select",d=>{p(s)&&(p(s).selectedDate=d.detail.selected,p(s).selectedTimeslot=void 0)});var o={details:n},a=K(),l=U(a),c=d=>{Pg(d,{get calendarClass(){return r}})};return ce(l,d=>{p(s)?.isCalendarVisible&&d(c)}),S(e,a),ee(o)}customElements.define("go-calendar",te(HM,{},[],["details"]));var GM=class{#e;get ticketSelectionDetails(){return p(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 ft(n.product,{quantity:n.quantity,time:i})}));C.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Xe.config.urls.cart&&Xe.config.navigateTo(Xe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},KM=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function YM(e,t){Q(t,!0);const r=new GM(pn(t.$$host));var n={details:r},i=KM(),s=M(i,!0);return P(i),ae((o,a,l)=>{i.disabled=o,ke(i,"data-x",a),ne(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),Rt("click",i,()=>r.addToCart()),S(e,i),ee(n)}Lr(["click"]),customElements.define("go-add-to-cart-button",te(YM,{},[],["details"]));function JM(e,t){Q(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 $n(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),ee({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-withdrawal-form",te(JM,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function XM(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)try{await $g[n.method](n.options)}catch(i){console.error(i)}e.go=$g,t&&(t._queue=null)}var $g={loaded:!0,config:e=>{Xe.define(e)},init:async e=>{await C.load("https://"+e.api,e.shop,e.locale)}};(async()=>await XM(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 wh(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 h=a._zod.parent;if(h&&h!==u){n(h);const f=e.seen.get(h);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:Yo(t,"input",e.processors),output:Yo(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 zk=(e,t={})=>r=>{const n=bh({...r,processors:t});return yt(e,n),_h(n,e),wh(n,e)},Yo=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=bh({...i??{},target:s,io:t,processors:r});return yt(e,o),_h(o,e),wh(o,e)},Uk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Vk=(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=Uk[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}))])}},qk=(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),h=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),h?f?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},Bk=(e,t,r,n)=>{r.not={}},jk=(e,t,r,n)=>{},Zk=(e,t,r,n)=>{const i=e._zod.def,s=Rf(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},Wk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Hk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Gk=(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=yt(s.element,t,{...n,path:[...n.path,"items"]})},Kk=(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]=yt(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=yt(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},Yk=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>yt(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},Jk=(e,t,r,n)=>{const i=e._zod.def,s=yt(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=yt(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]]},Xk=(e,t,r,n)=>{const i=e._zod.def,s=yt(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"}]},Qk=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},eS=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},tS=(e,t,r,n)=>{const i=e._zod.def;yt(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)))},rS=(e,t,r,n)=>{const i=e._zod.def;yt(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},nS=(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;yt(o,t,n);const a=t.seen.get(e);a.ref=o},iS=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},kh=(e,t,r,n)=>{const i=e._zod.def;yt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},sS=W("ZodISODateTime",(e,t)=>{h0.init(e,t),Je.init(e,t)});function oS(e){return vk(sS,e)}var aS=W("ZodISODate",(e,t)=>{p0.init(e,t),Je.init(e,t)});function lS(e){return gk(aS,e)}var uS=W("ZodISOTime",(e,t)=>{m0.init(e,t),Je.init(e,t)});function cS(e){return yk(uS,e)}var dS=W("ZodISODuration",(e,t)=>{v0.init(e,t),Je.init(e,t)});function fS(e){return bk(dS,e)}var hS=(e,t)=>{jf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>sw(e,r)},flatten:{value:r=>iw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Yl,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Yl,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=W("ZodError",hS,{Parent:Error}),pS=tu(ar),mS=ru(ar),vS=jo(ar),gS=Zo(ar),yS=lw(ar),bS=uw(ar),_S=cw(ar),wS=dw(ar),kS=fw(ar),SS=hw(ar),ES=pw(ar),TS=mw(ar),Sh=new WeakMap;function Ms(e,t,r){const n=Object.getPrototypeOf(e);let i=Sh.get(n);if(i||(i=new Set,Sh.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 lt=W("ZodType",(e,t)=>(at.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Yo(e,"input"),output:Yo(e,"output")}}),e.toJSONSchema=zk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>pS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>vS(e,r,n),e.parseAsync=async(r,n)=>mS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>gS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>yS(e,r,n),e.decode=(r,n)=>bS(e,r,n),e.encodeAsync=async(r,n)=>_S(e,r,n),e.decodeAsync=async(r,n)=>wS(e,r,n),e.safeEncode=(r,n)=>kS(e,r,n),e.safeDecode=(r,n)=>SS(e,r,n),e.safeEncodeAsync=async(r,n)=>ES(e,r,n),e.safeDecodeAsync=async(r,n)=>TS(e,r,n),Ms(e,"ZodType",{check(...r){const n=this.def;return this.clone(Tn(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 xn(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(v1(r,n))},superRefine(r,n){return this.check(g1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return Ih(this)},exactOptional(){return i1(this)},nullable(){return Ph(this)},nullish(){return Ih(Ph(this))},nonoptional(r){return c1(this,r)},array(){return Ch(this)},or(r){return JS([this,r])},and(r){return QS(this,r)},transform(r){return Mh(this,r1(r))},default(r){return a1(this,r)},prefault(r){return u1(this,r)},catch(r){return f1(this,r)},pipe(r){return Mh(this,r)},readonly(){return m1(this)},describe(r){const n=this.clone();return $s.add(n,{description:r}),n},meta(...r){if(r.length===0)return $s.get(this);const n=this.clone();return $s.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 $s.get(e)?.description},configurable:!0}),e)),Eh=W("_ZodString",(e,t)=>{nu.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Vk(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ms(e,"_ZodString",{regex(...n){return this.check(Ek(...n))},includes(...n){return this.check(Ak(...n))},startsWith(...n){return this.check(Ok(...n))},endsWith(...n){return this.check(Ck(...n))},min(...n){return this.check(Ko(...n))},max(...n){return this.check(gh(...n))},length(...n){return this.check(yh(...n))},nonempty(...n){return this.check(Ko(1,...n))},lowercase(n){return this.check(Tk(n))},uppercase(n){return this.check(xk(n))},trim(){return this.check(Ik())},normalize(...n){return this.check(Dk(...n))},toLowerCase(){return this.check(Pk())},toUpperCase(){return this.check($k())},slugify(){return this.check(Mk())}})}),xS=W("ZodString",(e,t)=>{nu.init(e,t),Eh.init(e,t),e.email=r=>e.check(K0(AS,r)),e.url=r=>e.check(ek(OS,r)),e.jwt=r=>e.check(mk(BS,r)),e.emoji=r=>e.check(tk(CS,r)),e.guid=r=>e.check(hh(Th,r)),e.uuid=r=>e.check(Y0(Jo,r)),e.uuidv4=r=>e.check(J0(Jo,r)),e.uuidv6=r=>e.check(X0(Jo,r)),e.uuidv7=r=>e.check(Q0(Jo,r)),e.nanoid=r=>e.check(rk(DS,r)),e.guid=r=>e.check(hh(Th,r)),e.cuid=r=>e.check(nk(IS,r)),e.cuid2=r=>e.check(ik(PS,r)),e.ulid=r=>e.check(sk($S,r)),e.base64=r=>e.check(fk(US,r)),e.base64url=r=>e.check(hk(VS,r)),e.xid=r=>e.check(ok(MS,r)),e.ksuid=r=>e.check(ak(FS,r)),e.ipv4=r=>e.check(lk(NS,r)),e.ipv6=r=>e.check(uk(RS,r)),e.cidrv4=r=>e.check(ck(LS,r)),e.cidrv6=r=>e.check(dk(zS,r)),e.e164=r=>e.check(pk(qS,r)),e.datetime=r=>e.check(oS(r)),e.date=r=>e.check(lS(r)),e.time=r=>e.check(cS(r)),e.duration=r=>e.check(fS(r))});function lr(e){return G0(xS,e)}var Je=W("ZodStringFormat",(e,t)=>{Ke.init(e,t),Eh.init(e,t)}),AS=W("ZodEmail",(e,t)=>{i0.init(e,t),Je.init(e,t)}),Th=W("ZodGUID",(e,t)=>{r0.init(e,t),Je.init(e,t)}),Jo=W("ZodUUID",(e,t)=>{n0.init(e,t),Je.init(e,t)}),OS=W("ZodURL",(e,t)=>{s0.init(e,t),Je.init(e,t)}),CS=W("ZodEmoji",(e,t)=>{o0.init(e,t),Je.init(e,t)}),DS=W("ZodNanoID",(e,t)=>{a0.init(e,t),Je.init(e,t)}),IS=W("ZodCUID",(e,t)=>{l0.init(e,t),Je.init(e,t)}),PS=W("ZodCUID2",(e,t)=>{u0.init(e,t),Je.init(e,t)}),$S=W("ZodULID",(e,t)=>{c0.init(e,t),Je.init(e,t)}),MS=W("ZodXID",(e,t)=>{d0.init(e,t),Je.init(e,t)}),FS=W("ZodKSUID",(e,t)=>{f0.init(e,t),Je.init(e,t)}),NS=W("ZodIPv4",(e,t)=>{g0.init(e,t),Je.init(e,t)}),RS=W("ZodIPv6",(e,t)=>{y0.init(e,t),Je.init(e,t)}),LS=W("ZodCIDRv4",(e,t)=>{b0.init(e,t),Je.init(e,t)}),zS=W("ZodCIDRv6",(e,t)=>{_0.init(e,t),Je.init(e,t)}),US=W("ZodBase64",(e,t)=>{w0.init(e,t),Je.init(e,t)}),VS=W("ZodBase64URL",(e,t)=>{S0.init(e,t),Je.init(e,t)}),qS=W("ZodE164",(e,t)=>{E0.init(e,t),Je.init(e,t)}),BS=W("ZodJWT",(e,t)=>{x0.init(e,t),Je.init(e,t)}),xh=W("ZodNumber",(e,t)=>{eh.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>qk(e,n,i,s),Ms(e,"ZodNumber",{gt(n,i){return this.check(mh(n,i))},gte(n,i){return this.check(ou(n,i))},min(n,i){return this.check(ou(n,i))},lt(n,i){return this.check(ph(n,i))},lte(n,i){return this.check(su(n,i))},max(n,i){return this.check(su(n,i))},int(n){return this.check(Ah(n))},safe(n){return this.check(Ah(n))},positive(n){return this.check(mh(0,n))},nonnegative(n){return this.check(ou(0,n))},negative(n){return this.check(ph(0,n))},nonpositive(n){return this.check(su(0,n))},multipleOf(n,i){return this.check(vh(n,i))},step(n,i){return this.check(vh(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 Fs(e){return _k(xh,e)}var jS=W("ZodNumberFormat",(e,t)=>{A0.init(e,t),xh.init(e,t)});function Ah(e){return wk(jS,e)}var ZS=W("ZodUnknown",(e,t)=>{O0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jk(e,r,n,i)});function Oh(){return kk(ZS)}var WS=W("ZodNever",(e,t)=>{C0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Bk(e,r,n,i)});function HS(e){return Sk(WS,e)}var GS=W("ZodArray",(e,t)=>{D0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gk(e,r,n,i),e.element=t.element,Ms(e,"ZodArray",{min(r,n){return this.check(Ko(r,n))},nonempty(r){return this.check(Ko(1,r))},max(r,n){return this.check(gh(r,n))},length(r,n){return this.check(yh(r,n))},unwrap(){return this.element}})});function Ch(e,t){return Fk(GS,e,t)}var KS=W("ZodObject",(e,t)=>{P0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Kk(e,r,n,i),qe(e,"shape",()=>t.shape),Ms(e,"ZodObject",{keyof(){return e1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Oh()})},loose(){return this.clone({...this._zod.def,catchall:Oh()})},strict(){return this.clone({...this._zod.def,catchall:HS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return X_(this,r)},safeExtend(r){return Q_(this,r)},merge(r){return ew(this,r)},pick(r){return Y_(this,r)},omit(r){return J_(this,r)},partial(...r){return tw(Dh,this,r[0])},required(...r){return rw($h,this,r[0])}})});function au(e,t){return new KS({type:"object",shape:e??{},...ye(t)})}var YS=W("ZodUnion",(e,t)=>{$0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Yk(e,r,n,i),e.options=t.options});function JS(e,t){return new YS({type:"union",options:e,...ye(t)})}var XS=W("ZodIntersection",(e,t)=>{M0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Jk(e,r,n,i)});function QS(e,t){return new XS({type:"intersection",left:e,right:t})}var lu=W("ZodEnum",(e,t)=>{F0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Zk(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 lu({...t,checks:[],...ye(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 lu({...t,checks:[],...ye(i),entries:s})}});function e1(e,t){return new lu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var t1=W("ZodTransform",(e,t)=>{N0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hk(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ps(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(Ps(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 r1(e){return new t1({type:"transform",transform:e})}var Dh=W("ZodOptional",(e,t)=>{ah.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Ih(e){return new Dh({type:"optional",innerType:e})}var n1=W("ZodExactOptional",(e,t)=>{R0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function i1(e){return new n1({type:"optional",innerType:e})}var s1=W("ZodNullable",(e,t)=>{L0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Xk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Ph(e){return new s1({type:"nullable",innerType:e})}var o1=W("ZodDefault",(e,t)=>{z0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>eS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function a1(e,t){return new o1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Vf(t)}})}var l1=W("ZodPrefault",(e,t)=>{U0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function u1(e,t){return new l1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Vf(t)}})}var $h=W("ZodNonOptional",(e,t)=>{V0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function c1(e,t){return new $h({type:"nonoptional",innerType:e,...ye(t)})}var d1=W("ZodCatch",(e,t)=>{q0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function f1(e,t){return new d1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var h1=W("ZodPipe",(e,t)=>{B0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>nS(e,r,n,i),e.in=t.in,e.out=t.out});function Mh(e,t){return new h1({type:"pipe",in:e,out:t})}var p1=W("ZodReadonly",(e,t)=>{j0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>iS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function m1(e){return new p1({type:"readonly",innerType:e})}var Fh=W("ZodCustom",(e,t)=>{Z0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wk(e,r,n,i)});function v1(e,t={}){return Nk(Fh,e,t)}function g1(e,t){return Rk(e,t)}function y1(e,t={}){const r=new Fh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ye(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 b1=au({id:Fs(),customer:au({customer_salutation_id:Fs().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:Fs().positive().default(60),language_id:Fs().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),G2=au({ticket_sale_id:Fs(),start_at:lr().date(),personalizations:Ch(b1)});function uu(e,t){return e-t*Math.floor(e/t)}var Nh=1721426;function Xo(e,t,r,n){t=cu(e,t);let i=t-1,s=-2;return r<=2?s=0:Qo(t)&&(s=-1),Nh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function Qo(e){return e%4===0&&(e%100!==0||e%400===0)}function cu(e,t){return e==="BC"?1-t:t}function _1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var w1={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-Nh,n=Math.floor(r/146097),i=uu(r,146097),s=Math.floor(i/36524),o=uu(i,36524),a=Math.floor(o/1461),l=uu(o,1461),c=Math.floor(l/365),[d,u]=_1(n*400+s*100+a*4+c+(s!==4&&c!==4?1:0)),h=t-Xo(d,u,1,1),f=2;t<Xo(d,u,3,1)?f=0:Qo(u)&&(f=1);let g=Math.floor(((h+f)*12+373)/367);return new zs(d,u,g,t-Xo(d,u,g,1)+1)}toJulianDay(e){return Xo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return w1[Qo(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Qo(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"}},k1={"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 du(e,t){return t=Kt(t,e.calendar),e=hu(e),t=hu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function S1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function E1(e,t){return An(e,Qn(t))}var T1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Rh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?T1[r]:D1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function x1(e){return qr(Date.now(),e)}function Qn(e){return $1(x1(e))}function Lh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function zh(e,t){return Uh(e)-Uh(t)}function Uh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var fu=null,A1=!1;function Vt(){return fu==null&&(fu=new Intl.DateTimeFormat().resolvedOptions().timeZone),fu}function Vh(){return A1}function hu(e){return e.subtract({days:e.day-1})}function O1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var qh=new Map,pu=new Map;function C1(e){if(Intl.Locale){let r=qh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&qh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function D1(e){let t=pu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return pu.set(e,t),t.firstDay}let r=C1(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&&k1[r]||0};pu.set(e,t)}return t.firstDay}function On(e){return e=Kt(e,new Ii),Bh(cu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Bh(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 Ns(e,t){if(t==="UTC")return 0;if(e>0&&t===Vt()&&!Vh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=Zh(e,t);return Bh(r,n,i,s,o,a,0)-Math.floor(e/1e3)*1e3}var jh=new Map;function Zh(e,t){let r=jh.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"}),jh.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 ea=864e5;function I1(e,t){let r=On(e);return Wh(e,t,r-Ns(r-ea,t),r-Ns(r+ea,t))}function Wh(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>P1(e,t,i))}function P1(e,t,r){let n=Zh(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 Vr(e,t,r="compatible"){let n=Cn(e);if(t==="UTC")return On(n);if(t===Vt()&&r==="compatible"&&!Vh()){n=Kt(n,new Ii);let l=new Date,c=cu(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=Ns(i-ea,t),o=Ns(i+ea,t),a=Wh(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 Hh(e,t,r="compatible"){return new Date(Vr(e,t,r))}function qr(e,t){let r=Ns(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 $1(e){return new zs(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 M1(e){return new G1(e.hour,e.minute,e.second,e.millisecond)}function Kt(e,t){if(S1(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 F1(e,t,r){return e instanceof Dn?e.timeZone===t?e:Gh(e,t):qr(Vr(e,t,r),t)}function N1(e){let t=On(e)-e.offset;return new Date(t)}function Gh(e,t){return Kt(qr(On(e)-e.offset,t),e.calendar)}var Rs=36e5;function ta(e,t){let r=e.copy(),n="hour"in r?Xh(r,t):0;mu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,vu(r),Kh(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,R1(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 mu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function vu(e){for(;e.month<1;)mu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,mu(e,1)}function R1(e){for(;e.day<1;)e.month--,vu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,vu(e)}function Kh(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)),Kh(e)}function gu(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function Yh(e,t){return ta(e,gu(t))}function yu(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 Ls(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),Jh(r),r}function L1(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ra(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ra(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ra(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ra(e.hour,24),t}function Jh(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 ra(e,t){let r=e%t;return r<0&&(r+=t),r}function Xh(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,L1(e)}function Qh(e,t){let r=e.copy();return Xh(r,t),r}function z1(e,t){return Qh(e,gu(t))}function bu(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 _u(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 ep(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=Vr(ta(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(qr(r,e.timeZone),e.calendar)}function U1(e,t){return ep(e,gu(t))}function V1(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(Ls(o,{hour:i}),new Ii),l=[Vr(a,e.timeZone,"earlier"),Vr(a,e.timeZone,"later")].filter(g=>qr(g,e.timeZone).day===a.day)[0],c=Kt(Ls(o,{hour:s}),new Ii),d=[Vr(c,e.timeZone,"earlier"),Vr(c,e.timeZone,"later")].filter(g=>qr(g,e.timeZone).day===c.day).pop(),u=On(e)-e.offset,h=Math.floor(u/Rs),f=u%Rs;return u=nn(h,r,Math.floor(l/Rs),Math.floor(d/Rs),n?.round)*Rs+f,Kt(qr(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return _u(e,t,r,n);case"era":case"year":case"month":case"day":return Kt(qr(Vr(bu(Cn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function q1(e,t,r){let n=Cn(e),i=Ls(yu(n,t),t);return i.compare(n)===0?e:Kt(qr(Vr(i,e.timeZone,r),e.timeZone),e.calendar)}var B1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,j1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Z1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,wu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,W1=["hours","minutes","seconds"],K2=["years","months","weeks","days",...W1];function na(e){let t=e.match(B1);if(!t)throw wu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new zs(Re(t[1],0,9999),Re(t[2],1,12),1);return r.day=Re(t[3],1,r.calendar.getDaysInMonth(r)),r}function tp(e){let t=e.match(j1);if(!t)throw wu.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=Re(t[1],-9999,9999),n=new Pi(r<1?"BC":"AD",r<1?-r+1:r,Re(t[2],1,12),1,t[4]?Re(t[4],0,23):0,t[5]?Re(t[5],0,59):0,t[6]?Re(t[6],0,59):0,t[7]?Re(t[7],0,1/0)*1e3:0);return n.day=Re(t[3],0,n.calendar.getDaysInMonth(n)),n}function rp(e,t){let r=e.match(Z1);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Re(r[1],-9999,9999),i=new Dn(n<1?"BC":"AD",n<1?-n+1:n,Re(r[2],1,12),1,r[11],0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);i.day=Re(r[3],0,i.calendar.getDaysInMonth(i));let s=Cn(i),o;if(r[8]){let a=Re(r[8],-23,23);if(i.offset=Math.sign(a)*(Math.abs(a)*36e5+Re(r[9]??"0",0,59)*6e4+Re(r[10]??"0",0,59)*1e3),o=On(i)-i.offset,!I1(s,i.timeZone).includes(o))throw new Error(`Offset ${op(i.offset)} is invalid for ${ku(i)} in ${i.timeZone}`)}else o=Vr(Cn(s),i.timeZone,t);return qr(o,i.timeZone)}function np(e,t){let r=e.match(wu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Re(r[1],-9999,9999),i=new Dn(n<1?"BC":"AD",n<1?-n+1:n,Re(r[2],1,12),1,t,0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);return i.day=Re(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Re(r[8],-23,23)*36e5+Re(r[9]??"0",0,59)*6e4),Gh(i,t)}function Re(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 ip(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 sp(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 ku(e){return`${sp(e)}T${ip(e)}`}function op(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 H1(e){return`${ku(e)}${op(e.offset)}[${e.timeZone}]`}function Su(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 zs=class td{#e;constructor(...t){let[r,n,i,s,o]=Su(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,ei(this)}copy(){return this.era?new td(this.calendar,this.era,this.year,this.month,this.day):new td(this.calendar,this.year,this.month,this.day)}add(t){return ta(this,t)}subtract(t){return Yh(this,t)}set(t){return yu(this,t)}cycle(t,r,n){return bu(this,t,r,n)}toDate(t){return Hh(this,t)}toString(){return sp(this)}compare(t){return Lh(this,t)}},G1=class Hg{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,Jh(this)}copy(){return new Hg(this.hour,this.minute,this.second,this.millisecond)}add(t){return Qh(this,t)}subtract(t){return z1(this,t)}set(t){return Ls(this,t)}cycle(t,r,n){return _u(this,t,r,n)}toString(){return ip(this)}compare(t){return zh(this,t)}},Pi=class rd{#e;constructor(...t){let[r,n,i,s,o]=Su(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 rd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new rd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ta(this,t)}subtract(t){return Yh(this,t)}set(t){return yu(Ls(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return bu(this,t,r,n);default:return _u(this,t,r,n)}}toDate(t,r){return Hh(this,t,r)}toString(){return ku(this)}compare(t){let r=Lh(this,t);return r===0?zh(this,Cn(t)):r}},Dn=class nd{#e;constructor(...t){let[r,n,i,s,o]=Su(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 nd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new nd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return ep(this,t)}subtract(t){return U1(this,t)}set(t,r){return q1(this,t,r)}cycle(t,r,n){return V1(this,t,r,n)}toDate(){return N1(this)}toString(){return H1(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-F1(t,this.timeZone).toDate().getTime()}},Eu=new Map,wr=class{constructor(e,t={}){this.formatter=ap(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 J1()&&(this.resolvedHourCycle||(this.resolvedHourCycle=X1(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}},K1={true:{ja:"h11"},false:{}};function ap(e,t={}){if(typeof t.hour12=="boolean"&&Y1()){t={...t};let i=K1[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(Eu.has(r))return Eu.get(r);let n=new Intl.DateTimeFormat(e,t);return Eu.set(r,n),n}var Tu=null;function Y1(){return Tu==null&&(Tu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Tu}var xu=null;function J1(){return xu==null&&(xu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),xu}function X1(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=ap(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 Us(e){return M1(np(e,"Europe/Berlin")).toString().slice(0,-3)}function Vs(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=np(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new wr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function ia(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function lp(e){return e?.type==="Ticket"}function sa(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 z_(Object.values(e).map(r=>sa(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 Q1=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!lp(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;lp(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 qs(e){return e?.type==="Event"}function eE(e){return qs(e)&&e.subtype==="scale"}function tE(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 Au(e,t,r){return tE(e,t,r)}var rE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!qs(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(h=>n.items.some(f=>f.uuid===h.uuid)),h=>h.quantity),u=Math.max(l-d-c+r.quantity,0);return{max:u,min:a.min??0,unavailable:a.available===0,bookedOut:u===0}},nE=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 iE(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(Kl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.capacity))??0)+this.getPrecartItemQuantity(t)},totalCapacity(t,r){return Kl(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=L_(n,s=>s.timeSlot);return Object.values(i).map(s=>U_(V_(s.flatMap(o=>o.tickets)).map(o=>Kl(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 sE(e){let t=0;ws(()=>{me(()=>{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 ft(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}`),eE(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 Y2=15*6e4;function oa(){return typeof window<"u"&&typeof localStorage<"u"}function oE(e,t){if(oa())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Ou(e){if(!oa())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 up(e){if(oa())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function cp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var dp="go-cart",aa=(e,t)=>localStorage.setItem(dp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function aE(e){const t=e.product.type;switch(t){case"Ticket":return fp(e)?ft(sa(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity}):void 0;case"Event":return fp(e)?ft(Au(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return ft(cp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function lE(e){let t=[],r=[],n;try{const i=localStorage.getItem(dp);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(),aa([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(aE).filter(fE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.items)}catch(i){return console.error(i),aa([],[]),[]}}function uE(e){lE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});aa(e.items||[],e.coupons||[]),ws(()=>{me(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,aa(e.items||[],e.coupons||[]))})})}var cE=e=>new Date<new Date(e),dE=e=>na(e.slice(0,10)).compare(Qn(Vt()))>=0,fp=e=>e.time?e.product.subtype==="day"?dE(e.time):cE(e.time):!0,fE=e=>e!==void 0,hE=0;function $i(e,t=20){const r={items:Fe([]),coupons:Fe([]),paymentModeId:void 0,uid:`cart-${hE++}`,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(ft(n))),r}function ur(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function pE(){const e=Fe($i());return uE(e),sE(e),e}var Mi="go-capacity";function hp(e,t){const r=Ou(Mi);oE(Mi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function pp(e){const t=Ou(Mi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){up(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 mE(e){oa()&&window.addEventListener("storage",t=>{if(t.key===Mi&&pp(e),t.key==="go-cart"){const r=Ou("go-cart");(!r||!r.items||r.items.length===0)&&up(Mi)}})}function mp(){const e={allSeats:{},allQuotas:{},quotaManager:iE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&hp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&hp(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:Q1,seats:rE,unlimited:nE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ue(()=>s(this,t,r,n))}};return pp(e),mE(e),e}function vp(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 gp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},vE=class extends gp{constructor(){super()}get isLoggedIn(){try{const e=vp("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=vp("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}}},gE=class extends gp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},yE=e=>{switch(e){case"angular":return new vE;case"jmb":return new gE;default:throw new Error("Unhandled shop type: "+e)}};function bE(e){return e==null||typeof e=="string"&&e.trim()===""}function _E(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||bE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function wE(e,t){return _E(e,t)}var kE={withStackTrace:!1},yp=(e,t,r=kE)=>({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 bp(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 _p(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){h(s[0][3],m)}}function c(f){f.value instanceof Br?Promise.resolve(f.value.v).then(d,u):h(s[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function h(f,g){f(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function SE(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 EE(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 bp=="function"?bp(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 kr(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 kr(r?r(i):i)}}))}static combine(t){return TE(t)}static combineWithAllErrors(t){return xE(t)}map(t){return new vr(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new kr(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 kr(r.error);const n=yield t(r.value);return n.isErr()?new kr(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 kr(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 kr(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 kr(yield t(r.error))})))}andThen(t){return new vr(this._promise.then(r=>{if(r.isErr())return new kr(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 _p(this,arguments,function*(){return yield Br(yield Br(yield*SE(EE(yield Br(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return _p(this,arguments,function*(){const r=yield Br(this._promise);return r.isErr()&&(yield yield Br(la(r.error))),yield Br(r.value)})}};function la(e){return new ri(Promise.resolve(new kr(e)))}var J2=ri.fromPromise,X2=ri.fromSafePromise,Q2=ri.fromThrowable,wp=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},TE=e=>ri.fromSafePromise(Promise.all(e)).andThen(wp),kp=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},xE=e=>ri.fromSafePromise(Promise.all(e)).andThen(kp),Cu;(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 wp(i)}e.combine=r;function n(i){return kp(i)}e.combineWithAllErrors=n})(Cu||(Cu={}));function $n(e){return new Zr(e)}function jr(e){return new kr(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 yp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},kr=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 la(this.error)}asyncAndThrough(e){return la(this.error)}asyncMap(e){return la(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 yp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},eF=Cu.fromThrowable,AE=/\{[^{}]+\}/g,OE=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function CE(){return Math.random().toString(36).slice(2,11)}function DE(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=OE()?l:void 0,t=Ap(t);const d=[];async function u(h,f){const{baseUrl:g,fetch:m=n,Request:v=r,headers:_,params:E={},parseAs:A="json",querySerializer:T,bodySerializer:x=s??PE,pathSerializer:O,body:$,middleware:L=[],...G}=f||{};let N=t;g&&(N=Ap(g)??t);let se=typeof i=="function"?i:Tp(i);T&&(se=typeof T=="function"?T:Tp({...typeof i=="object"?i:{},...T}));const q=O||o||IE,oe=$===void 0?void 0:x($,xp(a,_,E.header)),pe=xp(oe===void 0||oe instanceof FormData?{}:{"Content-Type":"application/json"},a,_,E.header),J=[...d,...L],Y={redirect:"follow",...c,...G,body:oe,headers:pe};let Z,z,H=new v($E(h,{baseUrl:N,params:E,querySerializer:se,pathSerializer:q}),Y),K;for(const F in G)F in H||(H[F]=G[F]);if(J.length){Z=CE(),z=Object.freeze({baseUrl:N,fetch:m,parseAs:A,querySerializer:se,bodySerializer:x,pathSerializer:q});for(const F of J)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const ue=await F.onRequest({request:H,schemaPath:h,params:E,options:z,id:Z});if(ue)if(ue instanceof v)H=ue;else if(ue instanceof Response){K=ue;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!K){try{K=await m(H,l)}catch(F){let ue=F;if(J.length)for(let U=J.length-1;U>=0;U--){const ge=J[U];if(ge&&typeof ge=="object"&&typeof ge.onError=="function"){const fe=await ge.onError({request:H,error:ue,schemaPath:h,params:E,options:z,id:Z});if(fe){if(fe instanceof Response){ue=void 0,K=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 F=J.length-1;F>=0;F--){const ue=J[F];if(ue&&typeof ue=="object"&&typeof ue.onResponse=="function"){const U=await ue.onResponse({request:H,response:K,schemaPath:h,params:E,options:z,id:Z});if(U){if(!(U instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");K=U}}}}const le=K.headers.get("Content-Length");if(K.status===204||H.method==="HEAD"||le==="0"&&!K.headers.get("Transfer-Encoding")?.includes("chunked"))return K.ok?{data:void 0,response:K}:{error:void 0,response:K};if(K.ok)return{data:await(async()=>{if(A==="stream")return K.body;if(A==="json"&&!le){const ue=await K.text();return ue?JSON.parse(ue):void 0}return await K[A]()})(),response:K};let de=await K.text();try{de=JSON.parse(de)}catch{}return{error:de,response:K}}return{request(h,f,g){return u(f,{...g,method:h.toUpperCase()})},GET(h,f){return u(h,{...f,method:"GET"})},PUT(h,f){return u(h,{...f,method:"PUT"})},POST(h,f){return u(h,{...f,method:"POST"})},DELETE(h,f){return u(h,{...f,method:"DELETE"})},OPTIONS(h,f){return u(h,{...f,method:"OPTIONS"})},HEAD(h,f){return u(h,{...f,method:"HEAD"})},PATCH(h,f){return u(h,{...f,method:"PATCH"})},TRACE(h,f){return u(h,{...f,method:"TRACE"})},use(...h){for(const f of h)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(...h){for(const f of h){const g=d.indexOf(f);g!==-1&&d.splice(g,1)}}}}function ua(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 Sp(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(ua(a,t[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Ep(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(ua(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(Ep(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Sp(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ua(i,s,e))}}return n.join("&")}}function IE(e,t){let r=e;for(const n of e.match(AE)??[]){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,Ep(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,Sp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${ua(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function PE(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 $E(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 xp(...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 Ap(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function ME(e,t){return DE({baseUrl:e,headers:{"X-Shop-Url":t}})}var FE="/api/v4/calendar",NE="/api/v4/tickets/calendar",RE="/api/v4/auth/validate_token",LE="/api/v4/tickets/list_and_quotas",zE="/api/v4/tickets",UE="/api/v4/auth/sign_in",VE="/api/v4/auth",qE="/api/v4/orders/withdrawals",Op={SHOP_GUEST:10,SHOP:20},BE=class{type;#e=ee(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"),p(this.#e).urls=I_(this.type),p(this.#e).currentUser=yE(this.type),p(this.#e).apiUrl=e,p(this.#e).shopDomain=t,p(this.#e).locale=r||"de",this.#t={},p(this.#e).client=ME(e,t),p(this.#e).capacityManager=mp(),p(this.#e).cart=pE(),p(this.#e).auth=new Mf,p(this.#e).client.use(new B_(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return p(this.#e).capacityManager||(p(this.#e).capacityManager=mp()),p(this.#e).capacityManager}get cart(){return p(this.#e).cart}get auth(){return p(this.#e).auth||(p(this.#e).auth=new Mf),p(this.#e).auth}get currentUser(){return p(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return p(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 p(this.#e).apiUrl}get shopDomain(){return p(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return p(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return p(this.#e)}validateToken(){return this.fetchAndCache(RE,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(NE,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(FE,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(LE,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:wt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(zE,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:wt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:wt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(UE,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=wt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Op.SHOP_GUEST:Op.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(VE,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(qE,{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:wt({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!"),p(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&&(p(this.#e)[t]=r===""?l:l[r])}),p(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 p(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:wt(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=wE(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:wt(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 M_(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=wt(i,{params:{query:t}})),e&&(i=wt(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 BE;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 jE=class Gg{host;KEY;pollDuration;#e=ee(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 Gg(null,null);return r.value=t,r}load(){Hl(()=>(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 p(this.#e).value}set value(t){p(this.#e).value=t}};function Ni(e){return function(t,r={pollDuration:1e3}){if(t){const n=new jE(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 ZE={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{}},WE=class{defaultConfig=wt(ZE,window.customOptions);override=this.defaultConfig;#e=ee(Fe({}));get options(){return p(this.#e)}set options(e){I(this.#e,e,!0)}constructor(){this.update()}update(){const e=wt(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=wt(this.override,e),this.update(),this}default(e){return this.defaultConfig=wt(this.defaultConfig,e),this.update(),this}},Xe=new WE,Cp=class{#e=ee();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}#t=ee();get ticketSaleId(){return p(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){if(this.token)return ll(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return ll(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Xe.config.urls.annualTicketPersonalizationForm?Xe.config.urls.annualTicketPersonalizationForm(this.token,e.id):C.urls.annualTicketPersonalizationForm(this.token,e.id)}},Dp="go-annual-ticket-personalization",Ip=Fi(Dp),HE=Ni(Dp),GE=j("<li><a> </a></li>"),KE=j('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function YE(e,t){te(t,!0);let r=b(t,"token",7);const n=new Cp;Ip(t.$$host,n),me(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=X(),a=V(o),l=c=>{var d=X(),u=V(d);Ve(u,17,()=>p(i).ticket_sales,h=>h.id,(h,f)=>{var g=KE(),m=M(g),v=M(m,!0);P(m);var _=Q(m,2),E=M(_,!0);P(_);var A=Q(_,2),T=x=>{var O=GE(),$=M(O),L=M($,!0);P($),P(O),ae((G,N)=>{we($,"href",G),ne(L,N)},[()=>n.goToPersonalization(p(f)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),S(x,O)};ce(A,x=>{p(f).status=="not_ready_to_send"&&x(T)}),P(g),ae(x=>{we(g,"data-ticket-sale-id",p(f).id),ne(v,p(f).title),ne(E,x)},[()=>C.t("ticket.annual.personalization.detail.title",{count:p(f).personalizations.length})]),S(h,g)}),S(c,d)};return ce(a,c=>{p(i)&&c(l)}),S(e,o),re(s)}customElements.define("go-annual-ticket-personalization",ie(YE,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var JE={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:y1(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 XE(e,t){return{...e,errors:e.errors||[],value:e.value??QE(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){eT(this)}}}function QE(e){return e==="checkbox"?!1:e==="file"?null:""}function eT(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 Ja{static#e={};static defineForm(t){Xe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Xe.default({fields:t})}static{Ja.defineFields(JE)}static setRequiredApiKeys(t,r){Ja.#e[t]=r}static getFormOptions(t){return Xe.config.forms[t]}static createField(t,r){const n=Ja.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return XE(n,r)}static getFormFields(t){return tT(t)}static getFieldInit(t){return Xe.config.fields[t]}};function tT(e){const t=Xe.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 Du(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function rT(e,t){te(t,!0);let r=b(t,"token",7),n=b(t,"ticketSaleId",7),i;const s=new Cp;Ip(t.$$host,s),me(()=>{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"])'),_=$f(m,(x,O)=>{const $=v[O-1].details;return x.push($),x},[]);if(_.forEach(x=>{x.fields.forEach(O=>{x.validateField(O)})}),!$f(m,(x,O)=>_[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const x=_.map(async($,L)=>{const G=s.ticketSale.personalizations[L].id,N=$.fields.find(q=>q.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const se=await C.uploadPersonalizationPhoto(r(),G,N);return se.error?{ok:!1,error:se.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(x)).find($=>!$.ok);if(O){i.details.apiErrors=[O.error];return}}const E={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:_.map((x,O)=>{const $=q_(x.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:$}})}},A=await C.finalizePersonalizations(r(),E);if(A.error){i.details.apiErrors=[A.error.error];return}const T=Xe.config.forms.personalization?.beforeSubmit;T&&T(E),Xe.config.urls.annualTicketPersonalizationFormSubmit?.()&&Xe.config.navigateTo(Xe.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function h(){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(!h()||!a||!l||!c)return;const v=a.parentElement;if(!v)return;const _=Math.max(m,1),E=Array.from(v.querySelectorAll("go-personalization-form"));for(;E.length<_;){const T=l.cloneNode(!0);u(T),v.insertBefore(T,c),E.push(T)}for(;E.length>_;){const T=E.pop();T&&T!==a&&T.remove()}const A=s.ticketSale?.personalizations??[];E.forEach((T,x)=>{const O=A[x];O&&(T.dataset.personalizationId=String(O.id))}),d=_}rn(()=>{h(),t.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),me(()=>{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 re(g)}customElements.define("go-annual-ticket-personalization-form",ie(rT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var nT=class{formId;form;#e=ee(Fe([]));#t=D(()=>Du(this.fields)==0);get isValid(){return p(this.#t)}set isValid(e){I(this.#t,e)}#r=ee();get successMessage(){return p(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(r){return R_(r)||F_(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 p(this.#e)}set apiErrors(e){if(this.fields.forEach(t=>t.apiErrors=[]),Gl(e)){I(this.#e,e,!0);return}if(e.errors&&Gl(e.errors)&&I(this.#e,e.errors,!0),N_(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}},Pp="go-form-details",iT=Fi(Pp),Ri=Ni(Pp);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 sT=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 oT(e,t){te(t,!0);let r=b(t,"formId",7),n=b(t,"custom",7);const i=new nT(r(),t.$$host);iT(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=X(),l=V(a),c=d=>{var u=sT(),h=V(u),f=Q(h,2),g=Q(f,2),m=M(g,!0);P(g),ae(v=>ne(m,v),[()=>C.t(cr.getFormOptions(r())?.submitLabel||"Submit")]),S(d,u)};return ce(l,d=>{n()||d(c)}),S(e,a),re(o)}customElements.define("go-form",ie(oT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var aT=j("<go-form></go-form>",2);function lT(e,t){te(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=aT();return Kn(s,"formId","passwordReset"),ae(()=>Kn(s,"custom",r())),Dl("submit",s,n),S(e,s),re(i)}customElements.define("go-password-reset",ie(lT,{custom:{}},[],[]));function uT(e,t){te(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),re({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-in",ie(uT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function cT(e,t){te(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),re({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-sign-up",ie(cT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function dT(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 $p(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function fT(e){return dT($p(e),0)}function hT(e){const t=$p(e);if(t&&typeof t=="object"){const r=Object.keys(t);if(r.length>0)return Number(r[0])}}function pT(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=hT(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||qs(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(mT(a,s))}),r}function mT(e,t){const r=fT(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return ft({...e.product,price_cents:n},{quantity:r,time:e.time,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var vT=class{#e=ee();get displayCart(){return p(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=ee(!1);get preview(){return p(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=pT(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}}},Mp="go-cart-details",gT=Fi(Mp),Li=Ni(Mp),yT=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Fp(e,t){te(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(o){r(o),y()}},i=yT(),s=M(i,!0);return P(i),ae(()=>ne(s,r().product.title)),S(e,i),re(n)}ie(Fp,{cartItem:{}},[],[],{mode:"open"});var bT=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),_T=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 Np(e,t){te(t,!0);let r=b(t,"cartItem",7);if(!qs(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=_T(),o=V(s),a=M(o),l=M(a,!0);P(a);var c=Q(a),d=M(c,!0);P(c),P(o);var u=Q(o),h=f=>{var g=bT(),m=V(g),v=M(m,!0);P(m);var _=Q(m),E=M(_,!0);P(_),ae((A,T)=>{ne(v,A),ne(E,T)},[()=>Vs(r().time,{month:"numeric",day:"numeric"},C.locale),()=>Us(r().time)]),S(f,g)};return ce(u,f=>{r().time&&f(h)}),ae(()=>{ne(l,n.event_title),ne(d,n.title)}),S(e,s),re(i)}ie(Np,{cartItem:{}},[],[],{mode:"open"});var wT=j('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),kT=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),ST=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Rp(e,t){te(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=ST(),s=V(i),o=M(s,!0);P(s);var a=Q(s,2),l=c=>{var d=kT(),u=V(d),h=M(u,!0);P(u);var f=Q(u,2),g=m=>{var v=wT(),_=M(v,!0);P(v),ae(E=>ne(_,E),[()=>Us(r().time)]),S(m,v)};ce(f,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),ae(m=>ne(h,m),[()=>Vs(r().time,{month:"numeric",day:"numeric"},C.locale)]),S(c,d)};return ce(a,c=>{r().time&&c(l)}),ae(()=>ne(o,r().product.title)),S(e,i),re(n)}ie(Rp,{cartItem:{}},[],[],{mode:"open"});function Lp(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[ca(n)];if(t<e)return e>n?[ca(e)]:[];const i=Math.max(e,n),s=[ca(n)];for(let o=i;o<=t;o++)o!==n&&s.push(ca(o));return s}function ca(e){return{value:e,label:e.toString()}}var ET=j('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),TT=j('<span class="go-cart-item-price-discounted"> </span>'),xT=j("<span> </span>"),AT=j("<option> </option>"),OT=j('<select class="go-cart-item-select"></select>'),CT=j('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),DT=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 zp(e,t){te(t,!0);let r=b(t,"displayItem",7),n=b(t,"displayCart",7),i=b(t,"preview",7),s=ee(void 0);const o=D(()=>C.cart?.items.find(g=>g.uuid===(r().display?.reference_uuid??r().uuid))),a=$i();me(()=>{C.cart?.items.map(g=>g.quantity),Ue(()=>{I(s,C.capacityManager.capacity(n(),r(),a),!0)})});function l(g){const m=g;if(!p(o)){console.error("(CartItem) Could not find main item for line",r());return}const v=parseInt(m.value,10);p(o).quantity=Math.max(0,p(o).quantity-r().quantity+v)}function c(){if(!p(o)){console.error("(CartItem) Could not find main item for line",r());return}const g=Math.max(0,p(o).quantity-r().quantity);g===0?C.cart?.deleteItem(p(o)):p(o).quantity=g}var d={get displayItem(){return r()},set displayItem(g){r(g),y()},get displayCart(){return n()},set displayCart(g){n(g),y()},get preview(){return i()},set preview(g){i(g),y()}},u=X(),h=V(u),f=g=>{var m=DT(),v=M(m),_=M(v),E=M(_),A=z=>{Rp(z,{get cartItem(){return r()}})},T=z=>{Np(z,{get cartItem(){return r()}})},x=z=>{Fp(z,{get cartItem(){return r()}})};ce(E,z=>{r().product.type==="Ticket"?z(A):r().product.type==="Event"?z(T,1):r().product.type==="Coupon"&&z(x,2)}),P(_);var O=Q(_,2),$=M(O),L=z=>{var H=ET(),K=V(H),le=M(K,!0);P(K);var de=Q(K,2),F=M(de,!0);P(de),ae((ue,U)=>{ne(le,ue),ne(F,U)},[()=>ur(r().display.originalPrice),()=>ur(r().final_price_cents)]),S(z,H)},G=z=>{var H=TT(),K=M(H,!0);P(H),ae(le=>ne(K,le),[()=>ur(r().final_price_cents)]),S(z,H)};ce($,z=>{r().display?.discounted?z(L):z(G,-1)}),P(O);var N=Q(O,2),se=M(N),q=z=>{var H=xT(),K=M(H,!0);P(H),ae(()=>ne(K,r().quantity)),S(z,H)},oe=z=>{var H=OT();Ve(H,21,()=>Lp(p(s).min,p(s).max,{floor:1}),K=>K.value,(K,le)=>{var de=AT(),F=M(de,!0);P(de);var ue={};ae(()=>{Rl(de,r().quantity===p(le).value),ne(F,p(le).label),ue!==(ue=p(le).value)&&(de.value=(de.__value=p(le).value)??"")}),S(K,de)}),P(H),ae(K=>we(H,"aria-label",K),[()=>C.t("cart.content.table.edit")]),At("change",H,K=>l(K.target)),S(z,H)};ce(se,z=>{i()?z(q):z(oe,-1)}),P(N);var pe=Q(N,2),J=z=>{var H=CT(),K=M(H);P(H),ae(le=>we(K,"aria-label",le),[()=>C.t("cart.item.remove")]),At("click",K,c),S(z,H)};ce(pe,z=>{i()||z(J)});var Y=Q(pe,2),Z=M(Y,!0);P(Y),P(v),P(m),ae(z=>ne(Z,z),[()=>ur(r().total_price_cents)]),S(g,m)};return ce(h,g=>{p(s)&&g(f)}),S(e,u),re(d)}zr(["change","click"]),ie(zp,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var IT=j('<li class="go-cart-header-remove"></li>'),PT=j('<li class="go-cart-item"><!></li>'),$T=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 MT(e,t){te(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=X(),s=V(i),o=a=>{var l=$T(),c=M(l),d=M(c),u=M(d),h=M(u,!0);P(u);var f=Q(u,2),g=M(f,!0);P(f);var m=Q(f,2),v=M(m,!0);P(m);var _=Q(m,2),E=O=>{var $=IT();S(O,$)};ce(_,O=>{p(n).preview||O(E)});var A=Q(_,2),T=M(A,!0);P(A),P(d),P(c);var x=Q(c,2);Ve(x,17,()=>p(n).displayCart.items,O=>O.uuid,(O,$)=>{var L=PT();zp(M(L),{get displayItem(){return p($)},get displayCart(){return p(n).displayCart},get preview(){return p(n).preview}}),P(L),S(O,L)}),P(l),ae((O,$,L,G)=>{ne(h,O),ne(g,$),ne(v,L),ne(T,G)},[()=>C.t("cart.content.table.desc"),()=>C.t("cart.content.table.price"),()=>C.t("cart.content.table.quantity"),()=>C.t("cart.content.table.total")]),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.items.length&&a(o)}),S(e,i),re()}customElements.define("go-cart-items",ie(MT,{},[],[]));var FT=j('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),NT=j('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),RT=j('<ol data-testid="cart-coupons"></ol>');function LT(e,t){te(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=X(),s=V(i),o=a=>{var l=RT();Ve(l,21,()=>p(n).displayCart.coupons,c=>c.code,(c,d)=>{var u=NT();let h;var f=M(u),g=M(f),m=M(g),v=M(m,!0);P(m);var _=Q(m,2),E=A=>{var T=FT(),x=M(T);P(T),ae(O=>we(x,"aria-label",O),[()=>C.t("cart.coupons.remove")]),At("click",x,()=>C.cart?.removeCoupon(p(d).code)),S(A,T)};ce(_,A=>{p(n).preview||A(E)}),P(g),P(f),P(u),ae(()=>{h=Ot(u,1,"go-cart-coupon",null,h,{"go-cart-coupon-inactive":!p(d).applied}),ne(v,p(d).code)}),S(c,u)}),P(l),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.coupons.length>0&&a(o)}),S(e,i),re()}zr(["click"]),customElements.define("go-cart-coupons",ie(LT,{},[],[]));var zT=j('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function UT(e,t){te(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=X(),s=V(i),o=a=>{var l=zT(),c=M(l,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).totalPriceCents)]),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.items.length&&a(o)}),S(e,i),re()}customElements.define("go-cart-total-amount",ie(UT,{},[],[]));function VT(e,t){te(t,!0);const r=b(t,"preview",7,!1),n=new vT;gT(t.$$host,n),me(()=>{n.preview=r()}),me(()=>{C.cart&&(C.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),C.cart.coupons.map(s=>s.code).join("|"),Ue(()=>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}))}),re({get preview(){return r()},set preview(s=!1){r(s),y()}})}customElements.define("go-cart",ie(VT,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var qT=j('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function BT(e,t){te(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=X(),s=V(i),o=a=>{var l=qT(),c=M(l,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).subtotalPriceCents)]),S(a,l)};ce(s,a=>{p(n)&&C.cart?.items.length&&a(o)}),S(e,i),re()}customElements.define("go-cart-subtotal-amount",ie(BT,{},[],[]));var jT=j('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function ZT(e,t){te(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=X(),s=V(i),o=a=>{var l=jT(),c=Q(M(l),1,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).discountedAmountCents)]),S(a,l)};ce(s,a=>{p(n)&&p(n).discountedAmountCents>0&&a(o)}),S(e,i),re()}customElements.define("go-cart-discounted-amount",ie(ZT,{},[],[]));function WT(e,t){te(t,!0),Mn(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ie(WT,{},[],[]));function HT(e,t){te(t,!0);let r=D(()=>C.cart?.items.length);Tt();var n=zt();ae(()=>ne(n,p(r))),S(e,n),re()}customElements.define("go-cart-counter",ie(HT,{},[],[]));function GT(e,t){te(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(!p(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");p(n).paymentModeId=a==null?void 0:String(a);const l=await C.checkout(p(n).orderData());if(l.error){s.details.apiErrors=l.error;return}const c=Xe.config.forms.checkoutGuest?.beforeSubmit;c&&await c(s.details.formData);const d=l.data.meta.payment_url;Xe.config.navigateTo?.(d)}),re({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-checkout-form",ie(GT,{custom:{}},[],[]));var KT="TokenActions::ApplyOrderDiscount";async function YT(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===KT?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?XT(e,r):r.value_cents&&r.value_cents>0?JT(e,r.value_cents):Iu([C.t("cart.coupon.form.errors.notValid")]):Iu([C.t("cart.coupon.form.errors.notValid")])}function JT(e,t){return C.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function XT(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 Iu([C.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return C.cart.addItem(ft(sa(n),{quantity:1})),C.cart.addCoupon({code:e,kind:"serviceVoucher"}),{success:!0}}function Iu(e){return{success:!1,errors:e}}var QT=j("<go-form></go-form>",2);function ex(e,t){te(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 YT(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=QT();return Kn(o,"formId","couponRedemption"),Dl("submit",o,n),S(e,o),re(s)}customElements.define("go-coupon-redemption",ie(ex,{},[],["flush"])),tb();var tx=class{#e=ee();get campaign(){return p(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=ee();get amount(){return p(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 tx,rx=j('<img alt="logo"/>'),nx=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 Up(e,t){te(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=nx();let o;var a=M(s),l=M(a),c=m=>{var v=rx();ae(_=>we(v,"src",_),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),S(m,v)};ce(l,m=>{r().picture.thumbnail&&m(c)}),P(a);var d=Q(a,2),u=M(d),h=M(u,!0);P(u);var f=Q(u,2),g=M(f,!0);return P(f),P(d),P(s),ae(()=>{o=Ot(s,1,"go-donation-campaign",null,o,{selected:Dt.campaign?.id===r()?.id}),ne(h,p(n)["donations.headline"]),ne(g,p(n)["donations.shop.info"])}),At("click",s,()=>Dt.selectCampaign(r())),At("keydown",s,m=>{m.key==="Enter"&&Dt.selectCampaign(r())}),S(e,s),re(i)}zr(["click","keydown"]),ie(Up,{campaign:{}},[],[],{mode:"open"});function ix(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 sx=j("<button> </button>"),ox=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>'),ax=j('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Vp(e,t){te(t,!0);const r=Dt.campaign?.guest_limit/100;let n=ee(void 0);function i(h){Dt.amount=h,I(n,null)}function s(h){const f=document.getElementById("donationForm");f.checkValidity()?Dt.amount=h.target.valueAsNumber*100:(Dt.amount=void 0,f.reportValidity())}var o=ax(),a=M(o),l=M(a,!0);P(a);var c=Q(a,2);Ve(c,20,()=>Dt.campaign?.options,h=>h,(h,f)=>{var g=sx();let m;var v=M(g,!0);P(g),ae(_=>{m=Ot(g,1,"btn btn-default",null,m,{selected:Dt.amount===f}),ne(v,_)},[()=>ix(f/100,C.currency)]),At("click",g,()=>i(f)),S(h,g)}),P(c);var d=Q(c,2),u=h=>{var f=ox(),g=M(f),m=M(g),v=M(m,!0);P(m);var _=Q(m,2);No(_),P(g),P(f),ae((E,A)=>{ne(v,E),we(_,"max",r),we(_,"placeholder",A),Sf(_,p(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),At("input",_,s),S(h,f)};ce(d,h=>{Dt.campaign?.free_donations&&h(u)}),P(o),ae(h=>ne(l,h),[()=>C.t("donations.selection.title")]),S(e,o),re()}zr(["click","input"]),ie(Vp,{},[],[],{mode:"open"});var lx=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 ux(e,t){te(t,!1),rn(()=>{C.donations?.campaigns?.length==1&&Dt.selectCampaign(C.donations?.campaigns[0])}),Wl();var r=X(),n=V(r),i=s=>{var o=lx(),a=M(o);Ve(a,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{Up(m,{get campaign(){return p(v)}})});var l=Q(a,2),c=m=>{Vp(m,{})};ce(l,m=>{Dt.campaign&&m(c)});var d=Q(l,2),u=M(d),h=M(u,!0);P(u);var f=Q(u,2),g=M(f,!0);P(f),P(d),P(o),ae((m,v)=>{ne(h,m),f.disabled=!Dt.amount,ne(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)}),S(s,o)};ce(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),S(e,r),re()}zr(["click"]),customElements.define("go-donations",ie(ux,{},[],[]));function cx(e){return typeof e=="function"}function Bs(e){return e!==null&&typeof e=="object"}var dx=["string","number","bigint","boolean"];function Pu(e){return e==null||dx.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Pu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var da=Symbol("box"),qp=Symbol("is-writable");function R(e,t){const r=D(e);return t?{[da]:!0,[qp]:!0,get current(){return p(r)},set current(n){t(n)}}:{[da]:!0,get current(){return e()}}}function Bp(e){return Bs(e)&&da in e}function fx(e){return Bp(e)?e:cx(e)?R(e):Sr(e)}function Sr(e){let t=ee(Fe(e));return{[da]:!0,[qp]:!0,get current(){return p(t)},set current(r){I(t,r,!0)}}}function jp(...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 Zp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,hx=/\n/g,px=/^\s*/,mx=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,vx=/^:\s*/,gx=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yx=/^[;\s]*/,bx=/^\s+|\s+$/g,_x=`
|
|
76
|
+
`,Wp="/",Hp="*",ni="",wx="comment",kx="declaration";function Sx(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(hx);m&&(r+=m.length);var v=g.lastIndexOf(_x);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(px)}function d(g){var m;for(g=g||[];m=u();)m!==!1&&g.push(m);return g}function u(){var g=s();if(!(Wp!=e.charAt(0)||Hp!=e.charAt(1))){for(var m=2;ni!=e.charAt(m)&&(Hp!=e.charAt(m)||Wp!=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:wx,comment:v})}}function h(){var g=s(),m=l(mx);if(m){if(u(),!l(vx))return a("property missing ':'");var v=l(gx),_=g({type:kx,property:Gp(m[0].replace(Zp,ni)),value:v?Gp(v[0].replace(Zp,ni)):ni});return l(yx),_}}function f(){var g=[];d(g);for(var m;m=h();)m!==!1&&(g.push(m),d(g));return g}return c(),f()}function Gp(e){return e?e.replace(bx,ni):ni}function Ex(e,t){let r=null;if(!e||typeof e!="string")return r;const n=Sx(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 Tx=/\d/,xx=["-","_","/","."];function Ax(e=""){if(!Tx.test(e))return e!==e.toLowerCase()}function Ox(e){const t=[];let r="",n,i;for(const s of e){const o=xx.includes(s);if(o===!0){t.push(r),r="",n=void 0;continue}const a=Ax(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 Kp(e){return e?Ox(e).map(t=>Dx(t)).join(""):""}function Cx(e){return Ix(Kp(e||""))}function Dx(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ix(e){return e?e[0].toLowerCase()+e.slice(1):""}function js(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Kp(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[Cx(n)]=i}return Ex(e,r),t}function Zs(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function Px(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 $x=Px(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Mx(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=>`${$x(t)}: ${e[t]};`).join(`
|
|
77
|
+
`)}function Ws(e={}){return Mx(e).replace(`
|
|
78
|
+
`," ")}var Fx=["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"],Nx=new Set(Fx);function Rx(e){return Nx.has(e)}function We(...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&&Rx(i))t[i]=jp(s,o);else if(a&&l)t[i]=Zs(s,o);else if(i==="class"){const c=Pu(s),d=Pu(o);c&&d?t[i]=Mo(s,o):c?t[i]=Mo(s):d&&(t[i]=Mo(o))}else if(i==="style"){const c=typeof s=="object",d=typeof o=="object",u=typeof s=="string",h=typeof o=="string";if(c&&d)t[i]={...s,...o};else if(c&&h){const f=js(o);t[i]={...s,...f}}else if(u&&d)t[i]={...js(s),...o};else if(u&&h){const f=js(s),g=js(o);t[i]={...f,...g}}else c?t[i]=s:d?t[i]=o:u?t[i]=s:h&&(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=Ws(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 Yp={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%)"},Lx=Ws(Yp),Jp=typeof window<"u"?window:void 0,tF=typeof window<"u"?window.document:void 0,rF=typeof window<"u"?window.navigator:void 0,nF=typeof window<"u"?window.location:void 0;function zx(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Ux=class extends Map{#e=new Map;#t=ee(0);#r=ee(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?ee(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 p(this.#t),!1;return p(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{p(this.#t);return}return p(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),Rr(o);else if(i!==t){Rr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Rr(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),Rr(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);Rr(this.#t),e.clear()}}#s(){p(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)p(r)}keys(){return p(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(this.#r),super.size}},Vx=class{#e;#t;constructor(e={}){const{window:t=Jp,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=vl(n=>{const i=pt(t,"focusin",n),s=pt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?zx(this.#e):null}},iF=new Vx;function qx(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 ab(this.#t)}get(){const e=_d(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=_d(this.#t);return t===void 0?e:t}set(e){return ob(this.#t,e)}};function Bx(e,t){switch(e){case"post":me(t);break;case"pre":El(t);break}}function $u(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;Bx(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=Ue(()=>r(a,o));return o=a,l})}function Xp(e,t,r){const n=ws(()=>{let i=!1;$u(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});me(()=>n)}function tt(e,t,r){$u(e,"post",t,r)}function jx(e,t,r){$u(e,"pre",t,r)}tt.pre=jx;function Zx(e,t){Xp(e,"post",t)}function Wx(e,t){Xp(e,"pre",t)}Zx.pre=Wx;function Qp(e){return qx(e)?e():e}var Hx=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(p(this.#o)?.(),this.getSize().width));#a=D(()=>(p(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=Qp(this.#n);if(e)return vl(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??Jp,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Qp(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 p(this.#o)?.(),this.getSize()}get width(){return p(this.#s)}get height(){return p(this.#a)}};function Gx(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 Kx(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 em(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=ee(Fe(o)),d=ee(!1),u=ee(void 0),h=ee(Fe([]));const f=()=>{p(h).forEach(A=>A()),I(h,[],!0)},g=A=>{I(h,[...p(h),A],!0)},m=async(A,T,x=!1)=>{try{I(d,!0),I(u,void 0),f();const O=new AbortController;g(()=>O.abort());const $=await t(A,T,{data:p(c),refetching:x,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?Gx(m,a):l?Kx(m,l):m,_=Array.isArray(e)?e:[e];let E;return n((A,T)=>{s&&E||(E=A,v(Array.isArray(e)?A:A[0],Array.isArray(e)?T:T?.[0]))},{lazy:i}),{get current(){return p(c)},get loading(){return p(d)},get error(){return p(u)},mutate:A=>{I(c,A,!0)},refetch:A=>{const T=_.map(x=>x());return v(Array.isArray(e)?T:T[0],Array.isArray(e)?T:T[0],A??!0)}}}function Yx(e,t,r){return em(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];tt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function Jx(e,t,r){return em(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)})}Yx.pre=Jx;function ii(e){me(()=>()=>{e()})}function Xx(e,t){return setTimeout(t,e)}function Hs(e){of().then(e)}var Qx=1,eA=9,tA=11;function Mu(e){return Bs(e)&&e.nodeType===Qx&&typeof e.nodeName=="string"}function tm(e){return Bs(e)&&e.nodeType===eA}function rA(e){return Bs(e)&&e.constructor?.name==="VisualViewport"}function nA(e){return Bs(e)&&e.nodeType!==void 0}function rm(e){return nA(e)&&e.nodeType===tA&&"host"in e}function iA(e,t){if(!e||!t||!Mu(e)||!Mu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&rm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function fa(e){return tm(e)?e:rA(e)?e.document:e?.ownerDocument??document}function nm(e){return rm(e)?nm(e.host):tm(e)?e.defaultView??window:Mu(e)?e.ownerDocument?.defaultView??window:window}function sA(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 p(this.#e)}set root(e){I(this.#e,e)}constructor(e){typeof e=="function"?this.element=R(e):this.element=e}getDocument=()=>fa(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>sA(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{[n_()]:r=>Bp(e)?(e.current=r,Ue(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Ue(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function Er(e){return e?"true":"false"}function Fu(e){return e?"true":void 0}function Le(e){return e?"":void 0}function im(e){return e?"open":"closed"}function oA(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var aA=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 ha(e){const t=new aA(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Nu="ArrowDown",sm="ArrowLeft",om="ArrowRight",Ru="ArrowUp",lA="Backspace",uA="Enter",sF="Escape",oF=" ",aF="Tab",lF="a",uF="P",cF="A",dF="p",on=typeof document<"u",am=cA();function cA(){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 dA(e){return e instanceof Element||e instanceof SVGElement}function pa(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Fn(e){return e===null}function ma(e){return e.pointerType==="touch"}function fA(e){return e!==null}var hA=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?Hs(t):t()}},lm=class{#e;#t;#r;#n=ee(!1);#i=ee(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 hA({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 p(this.#n)}get transitionStatus(){return p(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 pA=new It("BitsConfig");function mA(){const e=new vA(null,{});return pA.getOr(e).opts}var vA=class{opts;constructor(e,t){const r=gA(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function gA(e,t){return r=>R(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function um(e,t){return r=>{const n=mA();return R(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var cm=um(e=>e.defaultLocale,"en"),fF=um(e=>e.defaultPortalTo,"body"),yA=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 pt(e,this.eventName,n,r)}};function dm(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 fm(e,t){return e===t||e.contains(t)}function hm(e){return e?.ownerDocument??document}function bA(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 pm=["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] *)"],va=pm.join(","),mm=typeof Element>"u",oi=mm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ga=!mm&&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},ya=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]"):ya(t.parentNode))},_A=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},vm=function(t,r,n){if(ya(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(va));return r&&oi.call(t,va)&&i.unshift(t),i=i.filter(n),i},ba=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!ya(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=ba(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{oi.call(o,va)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!ya(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=ba(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},gm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ym=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_A(t))&&!gm(t)?0:t.tabIndex},wA=function(t,r){var n=ym(t);return n<0&&r&&!gm(t)?0:n},kA=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},bm=function(t){return t.tagName==="INPUT"},SA=function(t){return bm(t)&&t.type==="hidden"},EA=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},TA=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},xA=function(t){if(!t.name)return!0;var r=t.form||ga(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=TA(i,t.form);return!s||s===t},AA=function(t){return bm(t)&&t.type==="radio"},OA=function(t){return AA(t)&&!xA(t)},CA=function(t){var r,n=t&&ga(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=ga(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},_m=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},DA=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=ga(t);if(a&&!a.shadowRoot&&i(a)===!0)return _m(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if(CA(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return _m(t);return!1},IA=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},_a=function(t,r){return!(r.disabled||SA(r)||DA(r,t)||EA(r)||IA(r))},Lu=function(t,r){return!(OA(r)||ym(r)<0||!_a(t,r))},PA=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},wm=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=wA(a,o),c=o?wm(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(kA).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},$A=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ba([t],r.includeContainer,{filter:Lu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:PA}):n=vm(t,r.includeContainer,Lu.bind(null,r)),wm(n)},MA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ba([t],r.includeContainer,{filter:_a.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=vm(t,r.includeContainer,_a.bind(null,r)),n},FA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return oi.call(t,va)===!1?!1:Lu(r,t)},NA=pm.concat("iframe:not([inert]):not([inert] *)").join(","),RA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return oi.call(t,NA)===!1?!1:_a(r,t)};function LA(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 zu(e,t){return e>=0&&e<t.length}var zA="data-context-menu-trigger",UA="data-context-menu-content",hF=new It("Menu.Root"),pF=new It("Menu.Root | Menu.Sub"),mF=new It("Menu.Content"),vF=new It("Menu.Group | Menu.RadioGroup"),gF=new It("Menu.RadioGroup"),yF=new It("Menu.CheckboxGroup"),bF=new yA("bitsmenuopen",{bubbles:!1,cancelable:!0}),_F=ha({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 VA=class Kg{static create(t){return new Kg(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,me(()=>{this.#s=hm(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 Xx(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&&Hs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return Zs(pt(this.#s,"pointerdown",Zs(this.#h,this.#f),{capture:!0}),pt(this.#s,"pointerdown",Zs(this.#p,this.#d)),pt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=km(t)),this.#e.current(t)};#d=dm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||jA(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=km(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=pt(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=BA(this.opts.ref.current))};#m=t=>this.opts.ref.current?fm(this.opts.ref.current,t):!1;#v=dm(()=>{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 qA(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function BA(e){const t=[...globalThis.bitsDismissableLayers],r=qA(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function jA(e,t){const r=e.target;if(!dA(r))return!1;const n=!!r.closest(`[${zA}]`),i=!!t.closest(`[${UA}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:hm(r).documentElement.contains(r)&&!fm(t,r)&&bA(e,t)}function km(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 Sm(e,t){te(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=VA.create({id:R(()=>s()),interactOutsideBehavior:R(()=>r()),onInteractOutside:R(()=>n()),enabled:R(()=>a()),onFocusOutside:R(()=>i()),isValidEvent:R(()=>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()}},h=X(),f=V(h);return _e(f,()=>o()??Me,()=>({props:d.props})),S(e,h),re(u)}ie(Sm,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var ZA=class Yg{static create(t){return new Yg(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=()=>pt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!WA(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 WA(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 Em(e,t){te(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);ZA.create({escapeKeydownBehavior:R(()=>r()),onEscapeKeydown:R(()=>n()),enabled:R(()=>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=X(),c=V(l);return _e(c,()=>i()??Me),S(e,l),re(a)}ie(Em,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var HA=class Jg{static instance;#e=Sr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Jg),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)}},GA=class Xg{#e=!1;#t=null;#r=HA.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)&&RA(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(pt(r,"focusin",n,{capture:!0}),pt(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?$A(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?MA(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 Xg(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ii(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function Tm(e,t){te(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=GA.use({enabled:R(()=>r()),trap:R(()=>n()),loop:i(),onCloseAutoFocus:R(()=>s()),onOpenAutoFocus:R(()=>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=X(),h=V(u);return _e(h,()=>a()??Me,()=>({props:c.props})),S(e,u),re(d)}ie(Tm,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var xm=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var KA=class Qg{static create(t){return new Qg(t)}opts;domContext;#e=Se;#t=!1;#r=xm;#n=xm;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 Zs(pt(this.domContext.getDocument(),"pointerdown",this.#a),pt(this.domContext.getDocument(),"pointerup",jp(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||!JA(this)||!iA(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=YA(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},Am=e=>e.style.userSelect||e.style.webkitUserSelect;function YA(e,t){const r=Am(t),n=Am(e);return wa(t,"none"),wa(e,"text"),()=>{wa(t,r),wa(e,n)}}function wa(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function JA(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function Om(e,t){te(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);KA.create({id:R(()=>s()),onPointerDown:R(()=>n()),onPointerUp:R(()=>i()),enabled:R(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(h=!0){r(h),y()},get onPointerDown(){return n()},set onPointerDown(h=Se){n(h),y()},get onPointerUp(){return i()},set onPointerUp(h=Se){i(h),y()},get id(){return s()},set id(h){s(h),y()},get children(){return o()},set children(h){o(h),y()},get enabled(){return a()},set enabled(h){a(h),y()},get ref(){return l()},set ref(h){l(h),y()}},d=X(),u=V(d);return _e(u,()=>o()??Me),S(e,d),re(c)}ie(Om,{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 XA=class{#e;#t=0;#r=ee();#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,p(this.#r)===void 0&&(this.#n=ws(()=>{I(this.#r,this.#e(...e),!0)})),me(()=>()=>{this.#i()}),p(this.#r)}},ka=new Ux,Sa=ee(null),Uu=null,Gs=null,Ks=!1,Cm=R(()=>{for(const e of ka.values())if(e)return!0;return!1}),Vu=null,QA=new XA(()=>{function e(){document.body.setAttribute("style",p(Sa)??""),document.body.style.removeProperty("--scrollbar-width"),am&&Uu?.(),I(Sa,null)}function t(){Gs!==null&&(window.clearTimeout(Gs),Gs=null)}function r(i,s){t(),Ks=!0,Vu=Date.now();const o=Vu,a=()=>{Gs=null,Vu===o&&(Dm(ka)?Ks=!1:(Ks=!1,s()))},l=i===null?24:i;Gs=window.setTimeout(a,l)}function n(){p(Sa)===null&&ka.size===0&&!Ks&&I(Sa,document.body.getAttribute("style"),!0)}return tt(()=>Cm.current,()=>{if(!Cm.current)return;n(),Ks=!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",am&&(Uu=pt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Hs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ii(()=>()=>{Uu?.()}),{get lockMap(){return ka},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),eO=class{#e=Nn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=QA.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=R(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ii(()=>{if(this.#n.lockMap.delete(this.#e),Dm(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function Dm(e){for(const[t,r]of e)if(r)return!0;return!1}function qu(e,t){te(t,!0);let r=b(t,"preventScroll",7,!0),n=b(t,"restoreScrollDelay",7,null);return r()&&new eO(r(),()=>n()),re({get preventScroll(){return r()},set preventScroll(i=!0){r(i),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),y()}})}ie(qu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function tO(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=Lx,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 Ea(e){const t=tO(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 rO={defaultValue:void 0,granularity:"day"};function Im(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...rO,...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(Vt())?s=n.toDate(Vt()):i&&s>i.toDate(Vt())&&(s=i.toDate(Vt()));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 zs(o,a,l)}}function Pm(e,t){let r;return t instanceof Dn?r=rp(e):t instanceof Pi?r=tp(e):r=na(e),r.calendar!==t.calendar?Kt(r,t.calendar):r}function qt(e,t=Vt()){return e instanceof Dn?e.toDate():e.toDate(t)}function nO(e){if(e instanceof zs)return"date";if(e instanceof Pi)return"datetime";if(e instanceof Dn)return"zoneddatetime";throw new Error("Unknown date type")}function iO(e,t){switch(t){case"date":return na(e);case"datetime":return tp(e);case"zoneddatetime":return rp(e);default:throw new Error(`Unknown date type: ${t}`)}}function sO(e){return e instanceof Pi}function Bu(e){return e instanceof Dn}function Ta(e){return sO(e)||Bu(e)}function Ys(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 oO(e,t){return e.compare(t)>0}function $m(e,t,r){const n=Rh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function Mm(e,t,r){const n=Rh(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 xa=["day","month","year"],Aa=["hour","minute","second","dayPeriod"],Fm=["literal","timeZoneName"],Js=[...xa,...Aa],Nm=[...Js,...Fm],aO=[...Aa,...Fm],wF=Nm.filter(e=>e!=="literal"),kF=aO.filter(e=>e!=="literal"),lO=["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"],uO=["year","month","day"],ju={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 cO(e){if(Rm(e))return ju[e];{const t=pO(e);return Rm(t)?ju[t]:ju.en}}function Zu(e,t,r){return dO(e)?cO(r)[e]:hO(e)?t:fO(e)?"––":""}function Rm(e){return lO.includes(e)}function dO(e){return uO.includes(e)}function fO(e){return e==="hour"||e==="minute"||e==="second"}function hO(e){return e==="era"||e==="dayPeriod"}function pO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function Wu(e){const t=["hour","minute","second"],r=Js.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 mO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!zm(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];Fn(c)?a[l]=Zu(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}),h=e.hourCycle===12||e.hourCycle===void 0&&Vm(n)===12;if(a==="hour"&&h){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 Zu(a,"",n)}else{if(Oa(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Fn(l))return Zu(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 vO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,yO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!zm(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"&&(!Bu(r)||s)))}function gO(e){const t=mO(e);return{obj:t,arr:vO({contentObj:t,...e})}}function yO(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 Lm(){return Js.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Oa(e){return xa.includes(e)}function zm(e){return Js.includes(e)}function bO(e){return Nm.includes(e)}function Um(e){return!on||!e?[]:Ca(e).map(t=>t.dataset.segment).filter(t=>Js.includes(t))}function _O(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=Um(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(Oa(o)){const a=t[o];if(Fn(a))continue;s=s.set({[o]:t[o]})}return s}function wO(e,t){const r=Um(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Oa(n)&&e[n]===null)return!1;return!0}function kO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Aa.includes(t)||xa.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function SO(e,t){return t||(Ta(e)?"minute":"day")}function Hu(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||pa(e))}function EO(e,t){if(!on)return!1;const r=Ca(t);return r.length?r[0].id===e:!1}function TO(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=Ws({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function xO(e,t){if(!on)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function Vm(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 Xs(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=Gu(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function AO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function OO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function Gu(e,t){const r=Ca(t);return r.length?{next:AO(e,r),prev:OO(e,r)}:{next:null,prev:null}}function qm(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=Gu(r,t);n&&n.focus()}function Bm(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=Gu(r,t);n&&n.focus()}function Qs(e){return e==="ArrowRight"||e==="ArrowLeft"}function Ca(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:!(!bO(r)||r==="literal")}):[]}function CO(e){return Ca(e)[0]}var DO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function jm(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new wr(t,g).format(f)}function s(f,g=!0){return Ta(f)&&g?i(qt(f),{dateStyle:"long",timeStyle:"long"}):i(qt(f),{dateStyle:"long"})}function o(f){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new wr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new wr(t,{month:e.monthFormat.current}).format(f)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new wr(t,{year:e.yearFormat.current}).format(f)}`}function a(f){return new wr(t,{month:"long"}).format(f)}function l(f){return new wr(t,{year:"numeric"}).format(f)}function c(f,g){return Bu(f)?new wr(t,{...g,timeZone:f.timeZone}).formatToParts(qt(f)):new wr(t,g).formatToParts(qt(f))}function d(f,g="narrow"){return new wr(t,{weekday:g}).format(f)}function u(f,g=void 0){return new wr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function h(f,g,m={}){const v=c(f,{...DO,...m}).find(_=>_.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:h,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function IO(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function Zm(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 Ku(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=Ys(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=hu(t),l=O1(t),c=r!==void 0?$m(a,r,"en-US"):$m(a,0,i),d=r!==void 0?Mm(l,r,"en-US"):Mm(l,0,i),u=Zm(c.subtract({days:1}),a),h=Zm(l,d.add({days:1})),f=u.length+o.length+h.length;if(n&&f<42){const m=42-f;let v=h[h.length-1];v||(v=t.add({months:1}).set({day:1}));let _=m;h.length===0&&(_=m-1,h.push(v));const E=Array.from({length:_},(A,T)=>{const x=T+1;return v.add({days:x})});h.push(...E)}const g=u.concat(o,h);return{value:t,dates:g,weeks:LA(g,7)}}function eo(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(Ku({...n,dateObj:r})),i;i.push(Ku({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(Ku({...n,dateObj:o}))}return i}function Yu(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function Wm(e,t){const r=e.getAttribute("data-value");r&&(t.current=Pm(r,t.current))}function PO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=Yu(n);if(!l.length)return;const c=l.indexOf(e)+t;if(zu(c,l)){const d=l[c];return Wm(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Hs(()=>{const u=Yu(n);if(!u.length)return;const h=u.length-Math.abs(c);if(zu(h,u)){const f=u[h];return Wm(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}),Hs(()=>{const u=Yu(n);if(!u.length)return;const h=c-l.length;if(zu(h,u))return u[h].focus()})}}var Hm=[Nu,Ru,sm,om],Gm=[uA," "];function $O({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!IO(i)||!Hm.includes(e.key)&&!Gm.includes(e.key))return;e.preventDefault();const s={[Nu]:7,[Ru]:-7,[sm]:-1,[om]:1};if(Hm.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(Gm.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,Pm(o,n))}}function MO({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=eo({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function FO({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=eo({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function NO({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(qt(i),r)):[]}function RO(e){me(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Ue(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(eo({...o,dateObj:s}))})})}function LO({calendarNode:e,label:t,accessibleHeadingId:r}){const n=fa(e),i=n.createElement("div");i.style.cssText=Ws({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 zO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){me(()=>{e.current,Ue(()=>{t().some(a=>du(a,e.current))||o(eo({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function UO({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?oO(n.add({months:1}).set({day:1}),e):!1}function VO({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 qO({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=qt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=qt(e[0].value),i=qt(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 BO({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Le(r),"data-disabled":Le(n),"data-readonly":Le(i)}}function jO(e){const t=fa(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function ZO(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 iO(n,i)}function WO({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=ZO(e.current)??r)})}function HO(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 GO=ha({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 KO(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 xr=new It("Calendar.Root | RangeCalender.Root"),Km=class ey{static create(t){return xr.set(new ey(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return p(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Nn();domContext;attachment;#t=ee(Fe([]));get months(){return p(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=Ea(null),this.formatter=jm({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=Ea(this.domContext.getDocument())}),this.months=eo({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(),zO({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}),RO({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)}),WO({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(()=>NO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return p(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>Ue(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return p(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>KO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return p(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){me(()=>{if(Ue(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){me(()=>{if(this.opts.ref.current)return LO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){El(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){MO({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(){FO({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(()=>UO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return p(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>VO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return p(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 p(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,qO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return p(this.#d)}set headingValue(t){I(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return p(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>du(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 PO({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=HO(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){$O({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return p(this.#f)}set snippetProps(t){I(this.#f,t)}getBitsAttr=t=>GO.getAttr(t);#m=D(()=>({...BO({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 p(this.#m)}set props(t){I(this.#m,t)}},YO=class ty{static create(t){return new ty(t,xr.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":Fu(!0),"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},Ym=new It("Calendar.Cell | RangeCalendar.Cell"),JO=class ry{static create(t){return Ym.set(new ry(t,xr.get()))}opts;root;#e=D(()=>qt(this.opts.date.current));get cellDate(){return p(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return p(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>E1(this.opts.date.current,Vt()));get isDateToday(){return p(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!du(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return p(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return p(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 p(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>An(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return p(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return p(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 p(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 p(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 p(this.#c)}set ariaDisabled(t){I(this.#c,t)}#d=D(()=>({"data-unavailable":Le(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":Le(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":nO(this.opts.date.current),"data-disabled":Le(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return p(this.#d)}set sharedDataAttrs(t){I(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":Er(this.isSelectedDate),"aria-disabled":Er(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return p(this.#h)}set props(t){I(this.#h,t)}},XO=class ny{static create(t){return new ny(t,Ym.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 p(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":Er(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:p(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#r)}set props(t){I(this.#r,t)}},QO=class iy{static create(t){return new iy(t,xr.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return p(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":Er(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},eC=class sy{static create(t){return new sy(t,xr.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return p(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":Er(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},tC=class oy{static create(t){return new oy(t,xr.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":Er(this.root.opts.readonly.current),"aria-disabled":Er(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),"data-disabled":Le(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},rC=class ay{static create(t){return new ay(t,xr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},nC=class ly{static create(t){return new ly(t,xr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},iC=class uy{static create(t){return new uy(t,xr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},sC=class cy{static create(t){return new cy(t,xr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},oC=class dy{static create(t){return new dy(t,xr.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":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},aC=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"]),lC=j("<div><!></div>");function Jm(e,t){te(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),h=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),E=b(t,"calendarLabel",7,"Event"),A=b(t,"disabled",7,!1),T=b(t,"readonly",7,!1),x=b(t,"minValue",7,void 0),O=b(t,"maxValue",7,void 0),$=b(t,"preventDeselect",7,!1),L=b(t,"type",7),G=b(t,"disableDaysOutsideMonth",7,!0),N=b(t,"initialFocus",7,!1),se=b(t,"maxDays",7),q=b(t,"monthFormat",7,"long"),oe=b(t,"yearFormat",7,"numeric"),pe=je(t,aC);const J=Im({defaultValue:o(),minValue:x(),maxValue:O()});function Y(){l()===void 0&&l(J)}Y(),tt.pre(()=>l(),()=>{Y()});function Z(){o()===void 0&&o(L()==="single"?void 0:[])}Z(),tt.pre(()=>o(),()=>{Z()});const z=Km.create({id:R(()=>i()),ref:R(()=>s(),U=>s(U)),weekdayFormat:R(()=>d()),weekStartsOn:R(()=>u()),pagedNavigation:R(()=>h()),isDateDisabled:R(()=>f()),isDateUnavailable:R(()=>g()),fixedWeeks:R(()=>m()),numberOfMonths:R(()=>v()),locale:cm(()=>_()),calendarLabel:R(()=>E()),readonly:R(()=>T()),disabled:R(()=>A()),minValue:R(()=>x()),maxValue:R(()=>O()),disableDaysOutsideMonth:R(()=>G()),initialFocus:R(()=>N()),maxDays:R(()=>se()),placeholder:R(()=>l(),U=>{l(U),c()(U)}),preventDeselect:R(()=>$()),value:R(()=>o(),U=>{o(U),a()(U)}),type:R(()=>L()),monthFormat:R(()=>q()),yearFormat:R(()=>oe()),defaultPlaceholder:J}),H=D(()=>We(pe,z.props));var K={get child(){return r()},set child(U){r(U),y()},get children(){return n()},set children(U){n(U),y()},get id(){return i()},set id(U=Nn()){i(U),y()},get ref(){return s()},set ref(U=null){s(U),y()},get value(){return o()},set value(U){o(U),y()},get onValueChange(){return a()},set onValueChange(U=Se){a(U),y()},get placeholder(){return l()},set placeholder(U){l(U),y()},get onPlaceholderChange(){return c()},set onPlaceholderChange(U=Se){c(U),y()},get weekdayFormat(){return d()},set weekdayFormat(U="narrow"){d(U),y()},get weekStartsOn(){return u()},set weekStartsOn(U){u(U),y()},get pagedNavigation(){return h()},set pagedNavigation(U=!1){h(U),y()},get isDateDisabled(){return f()},set isDateDisabled(U=()=>!1){f(U),y()},get isDateUnavailable(){return g()},set isDateUnavailable(U=()=>!1){g(U),y()},get fixedWeeks(){return m()},set fixedWeeks(U=!1){m(U),y()},get numberOfMonths(){return v()},set numberOfMonths(U=1){v(U),y()},get locale(){return _()},set locale(U){_(U),y()},get calendarLabel(){return E()},set calendarLabel(U="Event"){E(U),y()},get disabled(){return A()},set disabled(U=!1){A(U),y()},get readonly(){return T()},set readonly(U=!1){T(U),y()},get minValue(){return x()},set minValue(U=void 0){x(U),y()},get maxValue(){return O()},set maxValue(U=void 0){O(U),y()},get preventDeselect(){return $()},set preventDeselect(U=!1){$(U),y()},get type(){return L()},set type(U){L(U),y()},get disableDaysOutsideMonth(){return G()},set disableDaysOutsideMonth(U=!0){G(U),y()},get initialFocus(){return N()},set initialFocus(U=!1){N(U),y()},get maxDays(){return se()},set maxDays(U){se(U),y()},get monthFormat(){return q()},set monthFormat(U="long"){q(U),y()},get yearFormat(){return oe()},set yearFormat(U="numeric"){oe(U),y()}},le=X(),de=V(le),F=U=>{var ge=X(),fe=V(ge);{let w=D(()=>({props:p(H),...z.snippetProps}));_e(fe,r,()=>p(w))}S(U,ge)},ue=U=>{var ge=lC();Ne(ge,()=>({...p(H)}));var fe=M(ge);_e(fe,()=>n()??Me,()=>z.snippetProps),P(ge),S(U,ge)};return ce(de,U=>{r()?U(F):U(ue,-1)}),S(e,le),re(K)}ie(Jm,{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 uC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),cC=j("<div><!></div>");function Ju(e,t){const r=mt();te(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,uC);const l=XO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);{let E=D(()=>({props:p(c),...l.snippetProps}));_e(_,i,()=>p(E))}S(m,v)},g=m=>{var v=cC();Ne(v,()=>({...p(c)}));var _=M(v),E=T=>{var x=X(),O=V(x);_e(O,()=>n()??Me,()=>l.snippetProps),S(T,x)},A=T=>{var x=zt();ae(()=>ne(x,l.cell.opts.date.current.day)),S(T,x)};ce(_,T=>{n()?T(E):T(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(Ju,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var dC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),fC=j("<table><!></table>");function Xu(e,t){const r=mt();te(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,dC);const l=tC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=fC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(Xu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var hC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),pC=j("<tbody><!></tbody>");function Qu(e,t){const r=mt();te(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,hC);const l=rC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=pC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(Qu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var mC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),vC=j("<td><!></td>");function ec(e,t){const r=mt();te(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,mC);const d=JO.create({id:R(()=>o()),ref:R(()=>s(),_=>s(_)),date:R(()=>a()),month:R(()=>l())}),u=D(()=>We(c,d.props));var h={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=X(),g=V(f),m=_=>{var E=X(),A=V(E);{let T=D(()=>({props:p(u),...d.snippetProps}));_e(A,i,()=>p(T))}S(_,E)},v=_=>{var E=vC();Ne(E,()=>({...p(u)}));var A=M(E);_e(A,()=>n()??Me,()=>d.snippetProps),P(E),S(_,E)};return ce(g,_=>{i()?_(m):_(v,-1)}),S(e,f),re(h)}ie(ec,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var gC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),yC=j("<thead><!></thead>");function tc(e,t){const r=mt();te(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=nC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=yC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(tc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var bC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),_C=j("<th><!></th>");function rc(e,t){const r=mt();te(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=sC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=_C();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(rc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var wC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),kC=j("<tr><!></tr>");function to(e,t){const r=mt();te(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=iC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=kC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(to,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var SC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),EC=j("<header><!></header>");function nc(e,t){const r=mt();te(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=oC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=EC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(nc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var TC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),xC=j("<div><!></div>");function ic(e,t){const r=mt();te(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,TC);const l=YO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,i,()=>({props:p(c),headingValue:l.root.headingValue})),S(m,v)},g=m=>{var v=xC();Ne(v,()=>({...p(c)}));var _=M(v),E=T=>{var x=X(),O=V(x);_e(O,()=>n()??Me,()=>({headingValue:l.root.headingValue})),S(T,x)},A=T=>{var x=zt();ae(()=>ne(x,l.root.headingValue)),S(T,x)};ce(_,T=>{n()?T(E):T(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),re(d)}ie(ic,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var AC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),OC=j("<button><!></button>");function sc(e,t){const r=mt();te(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,AC);const c=QO.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(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()}},h=X(),f=V(h),g=v=>{var _=X(),E=V(_);_e(E,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=OC();Ne(_,()=>({...p(d)}));var E=M(_);_e(E,()=>n()??Me),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),re(u)}ie(sc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var CC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),DC=j("<button><!></button>");function oc(e,t){const r=mt();te(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,CC);const c=eC.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(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()}},h=X(),f=V(h),g=v=>{var _=X(),E=V(_);_e(E,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=DC();Ne(_,()=>({...p(d)}));var E=M(_);_e(E,()=>n()??Me),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),re(u)}ie(oc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var IC=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Xm=j("<input/>");function Qm(e,t){te(t,!0);let r=b(t,"value",15),n=je(t,IC);const i=D(()=>We(n,{"aria-hidden":"true",tabindex:-1,style:{...Yp,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),y()}},o=X(),a=V(o),l=d=>{var u=Xm();Ne(u,()=>({...p(i),value:r()}),void 0,void 0,void 0,void 0,!0),S(d,u)},c=d=>{var u=Xm();Ne(u,()=>({...p(i)}),void 0,void 0,void 0,void 0,!0),Lo(u,r),S(d,u)};return ce(a,d=>{p(i).type==="checkbox"?d(l):d(c,-1)}),S(e,o),re(s)}ie(Qm,{value:{}},[],[],{mode:"open"});var PC=["top","right","bottom","left"],Rn=Math.min,Yt=Math.max,Da=Math.round,Ia=Math.floor,Wr=e=>({x:e,y:e}),$C={left:"right",right:"left",bottom:"top",top:"bottom"};function ac(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 lc(e){return e==="x"?"y":"x"}function uc(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function cc(e){return lc(Hr(e))}function MC(e,t,r){r===void 0&&(r=!1);const n=Ui(e),i=cc(e),s=uc(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Pa(o)),[o,Pa(o)]}function FC(e){const t=Pa(e);return[dc(e),t,dc(t)]}function dc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var ev=["left","right"],tv=["right","left"],NC=["top","bottom"],RC=["bottom","top"];function LC(e,t,r){switch(e){case"top":case"bottom":return r?t?tv:ev:t?ev:tv;case"left":case"right":return t?NC:RC;default:return[]}}function zC(e,t,r,n){const i=Ui(e);let s=LC(ln(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(dc)))),s}function Pa(e){const t=ln(e);return $C[t]+e.slice(t.length)}function UC(e){return{top:0,right:0,bottom:0,left:0,...e}}function rv(e){return typeof e!="number"?UC(e):{top:e,right:e,bottom:e,left:e}}function $a(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 nv(e,t,r){let{reference:n,floating:i}=e;const s=Hr(t),o=cc(t),a=uc(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,h=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]-=h*(r&&c?-1:1);break;case"end":f[o]+=h*(r&&c?-1:1);break}return f}async function VC(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:h=!1,padding:f=0}=an(t,e),g=rv(f),m=a[h?u==="floating"?"reference":"floating":u],v=$a(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,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},T=$a(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:E,strategy:l}):_);return{top:(v.top-T.top+g.top)/A.y,bottom:(T.bottom-v.bottom+g.bottom)/A.y,left:(v.left-T.left+g.left)/A.x,right:(T.right-v.right+g.right)/A.x}}var qC=50,BC=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:VC},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}=nv(c,n,l),h=n,f=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:_,fn:E}=v,{x:A,y:T,data:x,reset:O}=await E({x:d,y:u,initialPlacement:n,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=A??d,u=T??u,g[_]={...g[_],...x},O&&f<qC&&(f++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=nv(c,h,l)),m=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}},jC=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=rv(d),h={x:r,y:n},f=cc(i),g=uc(f),m=await o.getDimensions(c),v=f==="y",_=v?"top":"left",E=v?"bottom":"right",A=v?"clientHeight":"clientWidth",T=s.reference[g]+s.reference[f]-h[f]-s.floating[g],x=h[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 L=T/2-x/2,G=$/2-m[g]/2-1,N=Rn(u[_],G),se=Rn(u[E],G),q=N,oe=$-m[g]-se,pe=$/2-m[g]/2+L,J=ac(q,pe,oe),Y=!l.arrow&&Ui(i)!=null&&pe!==J&&s.reference[g]/2-(pe<q?N:se)-m[g]/2<0,Z=Y?pe<q?pe-q:pe-oe:0;return{[f]:h[f]+Z,data:{[f]:J,centerOffset:pe-J-Z,...Y&&{alignmentOffset:Z}},reset:Y}}}),ZC=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:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=an(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=ln(i),E=Hr(a),A=ln(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(A||!m?[Pa(a)]:FC(a)),O=g!=="none";!h&&O&&x.push(...zC(a,m,g,T));const $=[a,...x],L=await l.detectOverflow(t,v),G=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&G.push(L[_]),u){const pe=MC(i,o,T);G.push(L[pe[0]],L[pe[1]])}if(N=[...N,{placement:i,overflows:G}],!G.every(pe=>pe<=0)){var se,q;const pe=(((se=s.flip)==null?void 0:se.index)||0)+1,J=$[pe];if(J&&(!(u==="alignment"&&E!==Hr(J))||N.every(Z=>Hr(Z.placement)===E?Z.overflows[0]>0:!0)))return{data:{index:pe,overflows:N},reset:{placement:J}};let Y=(q=N.filter(Z=>Z.overflows[0]<=0).sort((Z,z)=>Z.overflows[1]-z.overflows[1])[0])==null?void 0:q.placement;if(!Y)switch(f){case"bestFit":{var oe;const Z=(oe=N.filter(z=>{if(O){const H=Hr(z.placement);return H===E||H==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(H=>H>0).reduce((H,K)=>H+K,0)]).sort((z,H)=>z[1]-H[1])[0])==null?void 0:oe[0];Z&&(Y=Z);break}case"initialPlacement":Y=a;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};function iv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sv(e){return PC.some(t=>e[t]>=0)}var WC=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=iv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:sv(o)}}}case"escaped":{const o=iv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:sv(o)}}}default:return{}}}}},ov=new Set(["left","top"]);async function HC(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=ov.has(o)?-1:1,d=s&&l?-1:1,u=an(t,e);let{mainAxis:h,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:h*c}:{x:h*c,y:f*d}}var GC=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 HC(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}}}}},KC=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:E,y:A}=_;return{x:E,y:A}}},...c}=an(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),h=Hr(ln(i)),f=lc(h);let g=d[f],m=d[h];if(o){const _=f==="y"?"top":"left",E=f==="y"?"bottom":"right",A=g+u[_],T=g-u[E];g=ac(A,g,T)}if(a){const _=h==="y"?"top":"left",E=h==="y"?"bottom":"right",A=m+u[_],T=m-u[E];m=ac(A,m,T)}const v=l.fn({...t,[f]:g,[h]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[h]:a}}}}}},YC=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),h=lc(u);let f=d[h],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=h==="y"?"height":"width",T=s.reference[h]-s.floating[A]+v.mainAxis,x=s.reference[h]+s.reference[A]-v.mainAxis;f<T?f=T:f>x&&(f=x)}if(c){var _,E;const A=h==="y"?"width":"height",T=ov.has(ln(i)),x=s.reference[u]-s.floating[A]+(T&&((_=o.offset)==null?void 0:_[u])||0)+(T?0:v.crossAxis),O=s.reference[u]+s.reference[A]+(T?0:((E=o.offset)==null?void 0:E[u])||0)-(T?v.crossAxis:0);g<x?g=x:g>O&&(g=O)}return{[h]:f,[u]:g}}}},JC=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),h=Ui(i),f=Hr(i)==="y",{width:g,height:m}=s.floating;let v,_;u==="top"||u==="bottom"?(v=u,_=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=u,v=h==="end"?"top":"bottom");const E=m-d.top-d.bottom,A=g-d.left-d.right,T=Rn(m-d[v],E),x=Rn(g-d[_],A),O=!t.middlewareData.shift;let $=T,L=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=A),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=E),O&&!h){const N=Yt(d.left,0),se=Yt(d.right,0),q=Yt(d.top,0),oe=Yt(d.bottom,0);f?L=g-2*(N!==0||se!==0?N+se:Yt(d.left,d.right)):$=m-2*(q!==0||oe!==0?q+oe:Yt(d.top,d.bottom))}await l({...t,availableWidth:L,availableHeight:$});const G=await o.getDimensions(a.floating);return g!==G.width||m!==G.height?{reset:{rects:!0}}:{}}}};function Ma(){return typeof window<"u"}function Vi(e){return av(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=(av(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function av(e){return Ma()?e instanceof Node||e instanceof Jt(e).Node:!1}function Ar(e){return Ma()?e instanceof Element||e instanceof Jt(e).Element:!1}function un(e){return Ma()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function lv(e){return!Ma()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function ro(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function XC(e){return/^(table|td|th)$/.test(Vi(e))}function Fa(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var QC=/transform|translate|scale|rotate|perspective|filter/,eD=/paint|layout|strict|content/,li=e=>!!e&&e!=="none",fc;function hc(e){const t=Ar(e)?Or(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!pc()&&(li(t.backdropFilter)||li(t.filter))||QC.test(t.willChange||"")||eD.test(t.contain||"")}function tD(e){let t=Ln(e);for(;un(t)&&!qi(t);){if(hc(t))return t;if(Fa(t))return null;t=Ln(t)}return null}function pc(){return fc==null&&(fc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fc}function qi(e){return/^(html|body|#document)$/.test(Vi(e))}function Or(e){return Jt(e).getComputedStyle(e)}function Na(e){return Ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(Vi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lv(e)&&e.host||Gr(e);return lv(t)?t.host:t}function uv(e){const t=Ln(e);return qi(t)?e.ownerDocument?e.ownerDocument.body:e.body:un(t)&&ro(t)?t:uv(t)}function no(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=uv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(i);if(s){const a=mc(o);return t.concat(o,o.visualViewport||[],ro(i)?i:[],a&&r?no(a):[])}else return t.concat(i,no(i,[],r))}function mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cv(e){const t=Or(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=Da(r)!==s||Da(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function vc(e){return Ar(e)?e:e.contextElement}function Bi(e){const t=vc(e);if(!un(t))return Wr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=cv(t);let o=(s?Da(r.width):r.width)/n,a=(s?Da(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var rD=Wr(0);function dv(e){const t=Jt(e);return!pc()||!t.visualViewport?rD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nD(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=vc(e);let o=Wr(1);t&&(n?Ar(n)&&(o=Bi(n)):o=Bi(e));const a=nD(s,r,n)?dv(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 h=Jt(s),f=n&&Ar(n)?Jt(n):n;let g=h,m=mc(g);for(;m&&n&&f!==g;){const v=Bi(m),_=m.getBoundingClientRect(),E=Or(m),A=_.left+(m.clientLeft+parseFloat(E.paddingLeft))*v.x,T=_.top+(m.clientTop+parseFloat(E.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=A,c+=T,g=Jt(m),m=mc(g)}}return $a({width:d,height:u,x:l,y:c})}function Ra(e,t){const r=Na(e).scrollLeft;return t?t.left+r:ui(Gr(e)).left+r}function fv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Ra(e,r),y:r.top+t.scrollTop}}function iD(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Gr(n),a=t?Fa(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)&&((Vi(n)!=="body"||ro(o))&&(l=Na(n)),u)){const f=ui(n);c=Bi(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const h=o&&!u&&!s?fv(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+h.x,y:r.y*c.y-l.scrollTop*c.y+d.y+h.y}}function sD(e){return Array.from(e.getClientRects())}function oD(e){const t=Gr(e),r=Na(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+Ra(e);const a=-r.scrollTop;return Or(n).direction==="rtl"&&(o+=Yt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var hv=25;function aD(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=pc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Ra(n);if(c<=0){const d=n.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-f);g<=hv&&(s-=g)}else c<=hv&&(s+=c);return{width:s,height:o,x:a,y:l}}function lD(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 pv(e,t,r){let n;if(t==="viewport")n=aD(e,r);else if(t==="document")n=oD(Gr(e));else if(Ar(t))n=lD(t,r);else{const i=dv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return $a(n)}function mv(e,t){const r=Ln(e);return r===t||!Ar(r)||qi(r)?!1:Or(r).position==="fixed"||mv(r,t)}function uD(e,t){const r=t.get(e);if(r)return r;let n=no(e,[],!1).filter(a=>Ar(a)&&Vi(a)!=="body"),i=null;const s=Or(e).position==="fixed";let o=s?Ln(e):e;for(;Ar(o)&&!qi(o);){const a=Or(o),l=hc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||ro(o)&&!l&&mv(e,o))?n=n.filter(c=>c!==o):i=a,o=Ln(o)}return t.set(e,n),n}function cD(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Fa(t)?[]:uD(t,this._c):[].concat(r),n],o=pv(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 h=pv(t,s[u],i);a=Yt(h.top,a),l=Rn(h.right,l),c=Rn(h.bottom,c),d=Yt(h.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function dD(e){const{width:t,height:r}=cv(e);return{width:t,height:r}}function fD(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=Ra(i)}if(n||!n&&!s)if((Vi(t)!=="body"||ro(i))&&(a=Na(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?fv(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 gc(e){return Or(e).position==="static"}function vv(e,t){if(!un(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gr(e)===r&&(r=r.ownerDocument.body),r}function gv(e,t){const r=Jt(e);if(Fa(e))return r;if(!un(e)){let i=Ln(e);for(;i&&!qi(i);){if(Ar(i)&&!gc(i))return i;i=Ln(i)}return r}let n=vv(e,t);for(;n&&XC(n)&&gc(n);)n=vv(n,t);return n&&qi(n)&&gc(n)&&!hc(n)?r:n||tD(e)||r}var hD=async function(e){const t=this.getOffsetParent||gv,r=this.getDimensions,n=await r(e.floating);return{reference:fD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function pD(e){return Or(e).direction==="rtl"}var mD={convertOffsetParentRelativeRectToViewportRelativeRect:iD,getDocumentElement:Gr,getClippingRect:cD,getOffsetParent:gv,getElementRects:hD,getClientRects:sD,getDimensions:dD,getScale:Bi,isElement:Ar,isRTL:pD};function yv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vD(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:h,height:f}=c;if(a||t(),!h||!f)return;const g=Ia(u),m=Ia(i.clientWidth-(d+h)),v=Ia(i.clientHeight-(u+f)),_=Ia(d),E={rootMargin:-g+"px "+-m+"px "+-v+"px "+-_+"px",threshold:Yt(0,Rn(1,l))||1};let A=!0;function T(x){const O=x[0].intersectionRatio;if(O!==l){if(!A)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!yv(c,e.getBoundingClientRect())&&o(),A=!1}try{r=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,E)}r.observe(e)}return o(!0),s}function gD(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=vc(e),d=i||s?[...c?no(c):[],...t?no(t):[]]:[];d.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const u=c&&a?vD(c,r):null;let h=-1,f=null;o&&(f=new ResizeObserver(_=>{let[E]=_;E&&E.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=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&&!yv(m,_)&&r(),m=_,g=requestAnimationFrame(v)}return r(),()=>{var _;d.forEach(E=>{i&&E.removeEventListener("scroll",r),s&&E.removeEventListener("resize",r)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var yD=GC,bD=KC,_D=ZC,wD=JC,kD=WC,SD=jC,ED=YC,TD=(e,t,r)=>{const n=new Map,i={platform:mD,...r},s={...i.platform,_c:n};return BC(e,t,{...i,platform:s})};function ci(e){return typeof e=="function"?e():e}function bv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _v(e,t){const r=bv(e);return Math.round(t*r)/r}function wv(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 xD(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=ee(0),u=ee(0);const h=Sr(null);let f=ee(Fe(p(o))),g=ee(Fe(p(s))),m=ee(Fe({})),v=ee(!1),_=!1,E=0;const A=D(()=>{const N=h.current?_v(h.current,p(d)):p(d),se=h.current?_v(h.current,p(u)):p(u);return p(i)?{position:p(f),left:"0",top:"0",transform:`translate(${N}px, ${se}px)`,...h.current&&bv(h.current)>=1.5&&{willChange:"transform"}}:{position:p(f),left:`${N}px`,top:`${se}px`}});let T;function x(){if(c.current===null||h.current===null)return;const N=c.current,se=h.current,q=++E;TD(N,se,{middleware:p(n),placement:p(s),strategy:p(o)}).then(oe=>{if(q===E&&!(c.current!==N||h.current!==se)){if(AD(N)){I(m,{...p(m),hide:{...p(m).hide,referenceHidden:!0}},!0);return}if(!p(r)&&p(d)!==0&&p(u)!==0){const pe=Math.max(Math.abs(p(a)),Math.abs(p(l)),15);if(oe.x<=pe&&oe.y<=pe)return}I(d,oe.x,!0),I(u,oe.y,!0),I(f,oe.strategy,!0),I(g,oe.placement,!0),I(m,oe.middlewareData,!0),I(v,!0)}})}function O(){typeof T=="function"&&(T(),T=void 0),E++}function $(){if(O(),t===void 0){x();return}p(r)&&(c.current===null||h.current===null||(T=t(c.current,h.current,x)))}function L(){!p(r)&&h.current===null&&I(v,!1)}function G(){return[p(n),p(s),p(o),p(a),p(l),p(r)]}return me(()=>{t===void 0&&p(r)&&x()}),me($),me(()=>{if(t!==void 0){if(G(),!p(r)){_=!1;return}if(!p(v)){_=!1;return}if(!_){_=!0;return}x()}}),me(L),me(()=>O),{floating:h,reference:c,get strategy(){return p(f)},get placement(){return p(g)},get middlewareData(){return p(m)},get isPositioned(){return p(v)},get floatingStyles(){return p(A)},get update(){return x}}}function AD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var OD={top:"bottom",right:"left",bottom:"top",left:"right"},yc=new It("Floating.Root"),kv=new It("Floating.Content"),bc=new It("Floating.Root"),CD=class id{static create(t=!1){return t?bc.set(new id):yc.set(new id)}anchorNode=Sr(null);customAnchorNode=Sr(null);triggerNode=Sr(null);constructor(){me(()=>{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})}},DD=class sd{static create(t,r=!1){return r?kv.set(new sd(t,bc.get())):kv.set(new sd(t,yc.get()))}opts;root;contentRef=Sr(null);wrapperRef=Sr(null);arrowRef=Sr(null);contentAttachment=Qe(this.contentRef);wrapperAttachment=Qe(this.wrapperRef);arrowAttachment=Qe(this.arrowRef);arrowId=Sr(Nn());#e=D(()=>{if(typeof this.opts.style=="string")return js(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new Hx(()=>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(()=>p(this.#a).length>0);get hasExplicitBoundaries(){return p(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:p(this.#a).filter(fA),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return p(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=ee(void 0);#c=ee(void 0);#d=ee(void 0);#h=ee(void 0);#p=D(()=>[yD({mainAxis:this.opts.sideOffset.current+p(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&bD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?ED():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&_D({...this.detectOverflowOptions}),wD({...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&&SD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),PD({arrowWidth:p(this.#n),arrowHeight:p(this.#i)}),this.opts.hideWhenDetached.current&&kD({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return p(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>$D(this.floating.placement));get placedSide(){return p(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>MD(this.floating.placement));get placedAlign(){return p(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return p(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return p(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return p(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=ee();get contentZIndex(){return p(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>OD[this.placedSide]);get arrowBaseSide(){return p(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":`${p(this.#u)}px`,"--bits-floating-available-height":`${p(this.#c)}px`,"--bits-floating-anchor-width":`${p(this.#d)}px`,"--bits-floating-anchor-height":`${p(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...p(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return p(this.#k)}set wrapperProps(t){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Ws({...p(this.#e)}),...this.contentAttachment}));get props(){return p(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 p(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=xD({strategy:()=>this.opts.strategy.current,placement:()=>p(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>gD(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),me(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),tt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=nm(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)}}),me(()=>{this.floating.floating.current=this.wrapperRef.current})}},ID=class od{static create(t,r=!1){return r?new od(t,bc.get()):new od(t,yc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=fx(t.virtualEl.current):r.triggerNode=t.ref}};function PD(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]=_c(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,h=(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:`${h}px`):l==="left"&&(f=`${n.floating.width+a}px`,g=s?d:`${h}px`),{data:{x:f,y:g}}}}}function _c(e){const[t,r="center"]=e.split("-");return[t,r]}function $D(e){return _c(e)[0]}function MD(e){return _c(e)[1]}function Sv(e,t){te(t,!0);let r=b(t,"children",7),n=b(t,"tooltip",7,!1);CD.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=X(),o=V(s);return _e(o,()=>r()??Me),S(e,s),re(i)}ie(Sv,{children:{},tooltip:{}},[],[],{mode:"open"});function Ev(e,t){te(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);ID.create({id:R(()=>r()),virtualEl:R(()=>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=X(),c=V(l);return _e(c,()=>n()??Me),S(e,l),re(a)}ie(Ev,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function Tv(e,t){te(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),h=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"),E=b(t,"style",23,()=>({})),A=b(t,"wrapperId",23,Nn),T=b(t,"customAnchor",7,null),x=b(t,"enabled",7),O=b(t,"tooltip",7,!1);const $=DD.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>s()),alignOffset:R(()=>o()),id:R(()=>a()),arrowPadding:R(()=>l()),avoidCollisions:R(()=>c()),collisionBoundary:R(()=>d()),collisionPadding:R(()=>u()),hideWhenDetached:R(()=>h()),onPlaced:R(()=>f()),sticky:R(()=>g()),updatePositionStrategy:R(()=>m()),strategy:R(()=>v()),dir:R(()=>_()),style:R(()=>E()),enabled:R(()=>x()),wrapperId:R(()=>A()),customAnchor:R(()=>T())},O()),L=D(()=>We($.wrapperProps,{style:{pointerEvents:"auto"}}));var G={get content(){return r()},set content(q){r(q),y()},get side(){return n()},set side(q="bottom"){n(q),y()},get sideOffset(){return i()},set sideOffset(q=0){i(q),y()},get align(){return s()},set align(q="center"){s(q),y()},get alignOffset(){return o()},set alignOffset(q=0){o(q),y()},get id(){return a()},set id(q){a(q),y()},get arrowPadding(){return l()},set arrowPadding(q=0){l(q),y()},get avoidCollisions(){return c()},set avoidCollisions(q=!0){c(q),y()},get collisionBoundary(){return d()},set collisionBoundary(q=[]){d(q),y()},get collisionPadding(){return u()},set collisionPadding(q=0){u(q),y()},get hideWhenDetached(){return h()},set hideWhenDetached(q=!1){h(q),y()},get onPlaced(){return f()},set onPlaced(q=()=>{}){f(q),y()},get sticky(){return g()},set sticky(q="partial"){g(q),y()},get updatePositionStrategy(){return m()},set updatePositionStrategy(q="optimized"){m(q),y()},get strategy(){return v()},set strategy(q="fixed"){v(q),y()},get dir(){return _()},set dir(q="ltr"){_(q),y()},get style(){return E()},set style(q={}){E(q),y()},get wrapperId(){return A()},set wrapperId(q=Nn()){A(q),y()},get customAnchor(){return T()},set customAnchor(q=null){T(q),y()},get enabled(){return x()},set enabled(q){x(q),y()},get tooltip(){return O()},set tooltip(q=!1){O(q),y()}},N=X(),se=V(N);return _e(se,()=>r()??Me,()=>({props:$.props,wrapperProps:p(L)})),S(e,N),re(G)}ie(Tv,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function xv(e,t){te(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=X(),o=V(s);return _e(o,()=>r()??Me,()=>({props:{},wrapperProps:{}})),S(e,s),re(i)}ie(xv,{content:{},onPlaced:{}},[],[],{mode:"open"});var FD=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function Av(e,t){te(t,!0);let r=b(t,"content",7),n=b(t,"isStatic",7,!1),i=b(t,"onPlaced",7),s=je(t,FD);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=X(),l=V(a),c=u=>{xv(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{Tv(u,Sn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ce(l,u=>{n()?u(c):u(d,-1)}),S(e,a),re(o)}ie(Av,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var ND=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"]),RD=j("<!> <!>",1);function wc(e,t){te(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),h=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),E=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),T=b(t,"strategy",7),x=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),G=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),q=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),Y=b(t,"trapFocus",7,!0),Z=b(t,"isValidEvent",7,()=>!1),z=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),K=b(t,"enabled",7),le=b(t,"ref",7),de=b(t,"tooltip",7,!1),F=b(t,"contentPointerEvents",7,"auto"),ue=je(t,ND);const U=D(()=>O()??!0),ge=D(()=>T()??(p(U)?"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 h()},set alignOffset(w){h(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 E()},set hideWhenDetached(w){E(w),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(w){A(w),y()},get strategy(){return T()},set strategy(w){T(w),y()},get dir(){return x()},set dir(w){x(w),y()},get preventScroll(){return O()},set preventScroll(w){O(w),y()},get wrapperId(){return $()},set wrapperId(w){$(w),y()},get style(){return L()},set style(w){L(w),y()},get onPlaced(){return G()},set onPlaced(w){G(w),y()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(w){se(w),y()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(w){q(w),y()},get onFocusOutside(){return oe()},set onFocusOutside(w){oe(w),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(w="close"){pe(w),y()},get loop(){return J()},set loop(w){J(w),y()},get trapFocus(){return Y()},set trapFocus(w=!0){Y(w),y()},get isValidEvent(){return Z()},set isValidEvent(w=()=>!1){Z(w),y()},get customAnchor(){return z()},set customAnchor(w=null){z(w),y()},get isStatic(){return H()},set isStatic(w=!1){H(w),y()},get enabled(){return K()},set enabled(w){K(w),y()},get ref(){return le()},set ref(w){le(w),y()},get tooltip(){return de()},set tooltip(w=!1){de(w),y()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),y()}};return Av(e,{get isStatic(){return H()},get id(){return o()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return E()},get updatePositionStrategy(){return A()},get strategy(){return p(ge)},get dir(){return x()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return G()},get customAnchor(){return z()},get enabled(){return K()},get tooltip(){return de()},content:(Be,Pe)=>{let Ye=()=>Pe?.().props,St=()=>Pe?.().wrapperProps;var Ge=RD(),Xt=V(Ge),ct=Mt=>{qu(Mt,{get preventScroll(){return p(U)}})},Qt=Mt=>{qu(Mt,{get preventScroll(){return p(U)}})};ce(Xt,Mt=>{t.forceMount&&K()?Mt(ct):t.forceMount||Mt(Qt,1)});var Et=Q(Xt,2);Tm(Et,{get onOpenAutoFocus(){return q()},get onCloseAutoFocus(){return se()},get loop(){return J()},get enabled(){return K()},get trapFocus(){return Y()},get forceMount(){return t.forceMount},get ref(){return le()},focusScope:(er,jt)=>{let hr=()=>jt?.().props;Em(er,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return K()},get ref(){return le()},children:(Dr,Ir)=>{Sm(Dr,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return pe()},get isValidEvent(){return Z()},get enabled(){return K()},get ref(){return le()},children:(Pr,pr)=>{let Jr=()=>pr?.().props;Om(Pr,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return K()},get ref(){return le()},children:(Xr,_t)=>{var Un=X(),ns=V(Un);{let is=D(()=>({props:We(ue,Ye(),Jr(),hr(),{style:{pointerEvents:F()}}),wrapperProps:St()}));_e(ns,()=>r()??Me,()=>p(is))}S(Xr,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),S(Be,Ge)},$$slots:{content:!0}}),re(fe)}ie(wc,{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 LD=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 Ov(e,t){te(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),h=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),E=b(t,"sticky",7),A=b(t,"hideWhenDetached",7),T=b(t,"updatePositionStrategy",7),x=b(t,"strategy",7),O=b(t,"dir",7),$=b(t,"preventScroll",7),L=b(t,"wrapperId",7),G=b(t,"style",7),N=b(t,"onPlaced",7),se=b(t,"onInteractOutside",7),q=b(t,"onCloseAutoFocus",7),oe=b(t,"onOpenAutoFocus",7),pe=b(t,"onFocusOutside",7),J=b(t,"interactOutsideBehavior",7,"close"),Y=b(t,"loop",7),Z=b(t,"trapFocus",7,!0),z=b(t,"isValidEvent",7,()=>!1),H=b(t,"customAnchor",7,null),K=b(t,"isStatic",7,!1),le=b(t,"ref",7),de=b(t,"shouldRender",7),F=je(t,LD);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 h()},set align(w){h(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 E()},set sticky(w){E(w),y()},get hideWhenDetached(){return A()},set hideWhenDetached(w){A(w),y()},get updatePositionStrategy(){return T()},set updatePositionStrategy(w){T(w),y()},get strategy(){return x()},set strategy(w){x(w),y()},get dir(){return O()},set dir(w){O(w),y()},get preventScroll(){return $()},set preventScroll(w){$(w),y()},get wrapperId(){return L()},set wrapperId(w){L(w),y()},get style(){return G()},set style(w){G(w),y()},get onPlaced(){return N()},set onPlaced(w){N(w),y()},get onInteractOutside(){return se()},set onInteractOutside(w){se(w),y()},get onCloseAutoFocus(){return q()},set onCloseAutoFocus(w){q(w),y()},get onOpenAutoFocus(){return oe()},set onOpenAutoFocus(w){oe(w),y()},get onFocusOutside(){return pe()},set onFocusOutside(w){pe(w),y()},get interactOutsideBehavior(){return J()},set interactOutsideBehavior(w="close"){J(w),y()},get loop(){return Y()},set loop(w){Y(w),y()},get trapFocus(){return Z()},set trapFocus(w=!0){Z(w),y()},get isValidEvent(){return z()},set isValidEvent(w=()=>!1){z(w),y()},get customAnchor(){return H()},set customAnchor(w=null){H(w),y()},get isStatic(){return K()},set isStatic(w=!1){K(w),y()},get ref(){return le()},set ref(w){le(w),y()},get shouldRender(){return de()},set shouldRender(w){de(w),y()}},U=X(),ge=V(U),fe=w=>{wc(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 h()},get alignOffset(){return f()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return _()},get sticky(){return E()},get hideWhenDetached(){return A()},get updatePositionStrategy(){return T()},get strategy(){return x()},get dir(){return O()},get preventScroll(){return $()},get wrapperId(){return L()},get style(){return G()},get onPlaced(){return N()},get customAnchor(){return H()},get isStatic(){return K()},get enabled(){return n()},get onInteractOutside(){return se()},get onCloseAutoFocus(){return q()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return J()},get loop(){return Y()},get trapFocus(){return Z()},get isValidEvent(){return z()},get onFocusOutside(){return pe()},forceMount:!1,get ref(){return le()}},()=>F))};return ce(ge,w=>{de()&&w(fe)}),S(e,U),re(ue)}ie(Ov,{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 zD=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 Cv(e,t){te(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),h=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),E=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),T=b(t,"strategy",7),x=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),G=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),q=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),Y=b(t,"trapFocus",7,!0),Z=b(t,"isValidEvent",7,()=>!1),z=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),K=b(t,"enabled",7),le=je(t,zD);var de={get popper(){return r()},set popper(F){r(F),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(F){n(F),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(F){i(F),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(F){s(F),y()},get id(){return o()},set id(F){o(F),y()},get onPointerDown(){return a()},set onPointerDown(F){a(F),y()},get onPointerUp(){return l()},set onPointerUp(F){l(F),y()},get side(){return c()},set side(F){c(F),y()},get sideOffset(){return d()},set sideOffset(F){d(F),y()},get align(){return u()},set align(F){u(F),y()},get alignOffset(){return h()},set alignOffset(F){h(F),y()},get arrowPadding(){return f()},set arrowPadding(F){f(F),y()},get avoidCollisions(){return g()},set avoidCollisions(F){g(F),y()},get collisionBoundary(){return m()},set collisionBoundary(F){m(F),y()},get collisionPadding(){return v()},set collisionPadding(F){v(F),y()},get sticky(){return _()},set sticky(F){_(F),y()},get hideWhenDetached(){return E()},set hideWhenDetached(F){E(F),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(F){A(F),y()},get strategy(){return T()},set strategy(F){T(F),y()},get dir(){return x()},set dir(F){x(F),y()},get preventScroll(){return O()},set preventScroll(F){O(F),y()},get wrapperId(){return $()},set wrapperId(F){$(F),y()},get style(){return L()},set style(F){L(F),y()},get onPlaced(){return G()},set onPlaced(F){G(F),y()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(F){se(F),y()},get onOpenAutoFocus(){return q()},set onOpenAutoFocus(F){q(F),y()},get onFocusOutside(){return oe()},set onFocusOutside(F){oe(F),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(F="close"){pe(F),y()},get loop(){return J()},set loop(F){J(F),y()},get trapFocus(){return Y()},set trapFocus(F=!0){Y(F),y()},get isValidEvent(){return Z()},set isValidEvent(F=()=>!1){Z(F),y()},get customAnchor(){return z()},set customAnchor(F=null){z(F),y()},get isStatic(){return H()},set isStatic(F=!1){H(F),y()},get enabled(){return K()},set enabled(F){K(F),y()}};return wc(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 h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return E()},get updatePositionStrategy(){return A()},get strategy(){return T()},get dir(){return x()},get preventScroll(){return O()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return G()},get customAnchor(){return z()},get isStatic(){return H()},get enabled(){return K()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return se()},get onOpenAutoFocus(){return q()},get interactOutsideBehavior(){return pe()},get loop(){return J()},get trapFocus(){return Y()},get isValidEvent(){return Z()},get onFocusOutside(){return oe()}},()=>le,{forceMount:!0})),re(de)}ie(Cv,{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 La=ha({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 Ys(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(qt(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||Vm(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"),UD=class fy{static create(t,r){return zn.set(new fy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Nn();formatter;initialSegments;#e=ee();get segmentValues(){return p(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return p(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=Lm();#r=ee(null);#n=ee(null);#i=ee(null);get descriptionNode(){return p(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=ee(null);get validationNode(){return p(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=Lm();#a=ee(null);get dayPeriodNode(){return p(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=ee("");get name(){return p(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?Sr(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=jm({initialLocale:this.locale.current,monthFormat:R(()=>"long"),yearFormat:R(()=>"numeric")}),this.initialSegments=Wu(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Ea(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),me(()=>{Ue(()=>{this.initialSegments=Wu(this.inferredGranularity)})}),rn(()=>{this.announcer=Ea(this.domContext.getDocument())}),ii(()=>{r||xO(this.descriptionId,this.domContext.getDocument())}),me(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),me(()=>{if(r)return;this.value.current&&TO({id:Ue(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Ue(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ue(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),me(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),me(()=>{this.value.current===void 0&&(this.segmentValues=Wu(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:p(this.#r)}setLabelNode(t){I(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:p(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=xa.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=Aa.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(qt(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 p(this.#u)}set validationStatus(t){I(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return p(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||SO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return p(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 p(this.#h)}set dateRef(t){I(this.#h,t)}#p=D(()=>gO({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 p(this.#p)}set allSegmentContent(t){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return p(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(kO(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 h=Ys(qt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`)}a={...o,[t]:u}}else if(t==="dayPeriod"){const u=d(c);this.states.dayPeriod.updating=u;const h=this.value.current;if(h&&"hour"in h){const f=h.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 h=this.formatter.dayPeriod(qt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(h==="AM"||h==="PM")&&(o.dayPeriod=h)}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(Oa(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const h=Ys(qt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`),a={...o,[t]:u}}else if(t==="year"){const h=d(c);this.states.year.updating=h,a={...o,[t]:h}}else if(t==="day"){const h=d(c);this.states.day.updating=h,a={...o,[t]:h}}else a={...o,[t]:u}}this.segmentValues=a,wO(a,p(this.#r))?this.setValue(_O({segmentObj:a,fieldNode:p(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":Fu(this.isInvalid),"aria-disabled":Er(this.disabled.current),"aria-readonly":Er(this.readonly.current||n),"data-invalid":Le(this.isInvalid),"data-disabled":Le(this.disabled.current),"data-readonly":Le(this.readonly.current||n),"data-segment":`${t}`,[La.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=EO(r,p(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}}},VD=class hy{static create(t){return new hy(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":p(this.#e),"aria-disabled":Er(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Le(this.root.disabled.current),[La.input]:"",...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},qD=class py{static create(){return new py(zn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return p(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return p(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 p(this.#r)}set props(t){I(this.#r,t)}},BD=class my{static create(t){return new my(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=CO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Le(this.root.isInvalid),"data-disabled":Le(this.root.disabled.current),[La.label]:"",onclick:this.onclick,...this.attachment}));get props(){return p(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(),!!Hu(e.key))){if(kc(e.key)){this.#i(t);return}if(Sc(e.key)){this.#s(t);return}if(pa(e.key)){this.#a(e);return}if(Ec(e.key)){this.#o(e);return}Qs(e.key)&&Xs(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&&qm(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&&Bm(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 p(this.#l)}set props(e){I(this.#l,e)}},jD=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(),!!Hu(e.key))){if(kc(e.key)){this.#r(),super.onkeydown(e);return}if(Sc(e.key)){this.#r(),super.onkeydown(e);return}if(pa(e.key)){this.#i(e);return}if(Ec(e.key)){this.#s(e);return}Qs(e.key)&&Xs(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),Dv(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&&qm(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&&Bm(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?Dv(Number.parseInt(t)):t)}},ZD=class extends Zi{constructor(e,t){super(e,t,"day",ji.day)}},WD=class extends Zi{constructor(e,t){super(e,t,"month",ji.month)}},HD=class extends Zi{constructor(e,t){super(e,t,"hour",ji.hour)}onkeydown(e){if(pa(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)}},GD=class extends Zi{constructor(e,t){super(e,t,"minute",ji.minute)}},KD=class extends Zi{constructor(e,t){super(e,t,"second",ji.second)}},YD=class vy{static create(t){return new vy(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(),!!eI(t.key))){if(kc(t.key)||Sc(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}Ec(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}),Qs(t.key)&&Xs(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 p(this.#t)}set props(t){I(this.#t,t)}},JD=class gy{static create(t){return new gy(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":Fu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},XD=class yy{static create(t){return new yy(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&&Qs(t.key)&&Xs(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":Le(!0),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},QD=class{static create(e,t){const r=zn.get();switch(e){case"day":return new ZD(t,r);case"month":return new WD(t,r);case"year":return new jD(t,r);case"hour":return new HD(t,r);case"minute":return new GD(t,r);case"second":return new KD(t,r);case"dayPeriod":return new YD(t,r);case"literal":return new JD(t,r);case"timeZoneName":return new XD(t,r)}}};function eI(e){return Hu(e)||e==="A"||e==="P"||e==="a"||e==="p"}function kc(e){return e===Ru}function Sc(e){return e===Nu}function Ec(e){return e===lA}function Dv(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function Iv(e,t){te(t,!1);const r=qD.create();Wl();var n=X(),i=V(n),s=o=>{Qm(o,Sn(()=>r.props))};ce(i,o=>{r.shouldRender&&o(s)}),S(e,n),re()}ie(Iv,{},[],[],{mode:"open"});var tI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),rI=j("<div><!></div>"),nI=j("<!> <!>",1);function Pv(e,t){const r=mt();te(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,tI);const c=VD.create({id:R(()=>n()),ref:R(()=>i(),v=>i(v)),name:R(()=>s())}),d=D(()=>We(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()}},h=nI(),f=V(h),g=v=>{var _=X(),E=V(_);_e(E,a,()=>({props:p(d),segments:c.root.segmentContents})),S(v,_)},m=v=>{var _=rI();Ne(_,()=>({...p(d)}));var E=M(_);_e(E,()=>o()??Me,()=>({segments:c.root.segmentContents})),P(_),S(v,_)};return ce(f,v=>{a()?v(g):v(m,-1)}),Iv(Q(f,2),{}),S(e,h),re(u)}ie(Pv,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var iI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),sI=j("<div><!></div>");function $v(e,t){const r=mt();te(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,iI);const l=BD.create({id:R(()=>n()),ref:R(()=>i(),m=>i(m))}),c=D(()=>We(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=X(),h=V(u),f=m=>{var v=X(),_=V(v);_e(_,o,()=>({props:p(c)})),S(m,v)},g=m=>{var v=sI();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>s()??Me),P(v),S(m,v)};return ce(h,m=>{o()?m(f):m(g,-1)}),S(e,u),re(d)}ie($v,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var oI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),aI=j("<span><!></span>");function Mv(e,t){const r=mt();te(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,oI);const c=QD.create(a(),{id:R(()=>n()),ref:R(()=>i(),v=>i(v))}),d=D(()=>We(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()}},h=X(),f=V(h),g=v=>{var _=X(),E=V(_);_e(E,o,()=>({props:p(d)})),S(v,_)},m=v=>{var _=aI();Ne(_,()=>({...p(d)}));var E=M(_);_e(E,()=>s()??Me),P(_),S(v,_)};return ce(f,v=>{o()?v(g):v(m,-1)}),S(e,h),re(u)}ie(Mv,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var Fv=new It("DatePicker.Root"),lI=class by{static create(t){return Fv.set(new by(t))}opts;constructor(t){this.opts=t}};function Tc(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 xc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function Nv(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 uI=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=fa(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const h=u.relatedTarget;if(si(h)&&n.contains(h))return;const f=this.#e.ignoredTargets?.()??[];si(h)&&f.some(g=>g===h||g.contains(h))||(this.#s=si(h)&&f.length>0?f.filter(g=>h.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},d=u=>{const h=u.relatedTarget;si(h)&&r.contains(h)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[pt(s,"pointermove",o),pt(r,"pointerleave",a),pt(r,"pointerenter",l),pt(n,"pointerenter",c),pt(n,"pointerleave",d)].reduce((u,h)=>()=>{u(),h()},()=>{})})}#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"&&xc(e,i)){this.#f();return}if(this.#i==="trigger"&&xc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(xc(e,c))return;const d=Nv(n,c),u=this.#m(n,c,d);if(u&&Tc(e,u))return}const s=Nv(n,i),o=this.#m(n,i,s);if(o&&Tc(e,o))return;const a=this.#i==="content"?i:n;Tc(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"}}},Ac=ha({component:"popover",parts:["root","trigger","content","close","overlay"]}),Oc=new It("Popover.Root"),cI=class _y{static create(t){return Oc.set(new _y(t))}opts;#e=ee(null);get contentNode(){return p(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=ee(null);get triggerNode(){return p(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=ee(null);get overlayNode(){return p(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=ee(!1);get openedViaHover(){return p(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=ee(!1);get hasInteractedWithContent(){return p(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=ee(!1);get hoverCooldown(){return p(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=ee(0);get closeDelay(){return p(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new lm({ref:R(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new lm({ref:R(()=>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()}},dI=class wy{static create(t){return new wy(t,Oc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=ee(!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||ma(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&&(ma(t)||(I(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),p(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}p(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":Er(this.root.opts.open.current),"data-state":im(this.root.opts.open.current),"aria-controls":this.#a(),[Ac.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#o)}set props(t){I(this.#o,t)}},fI=class ky{static create(t){return new ky(t,Oc.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 uI({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)&&FA(r)&&this.root.markInteraction()}onpointerenter(t){ma(t)||this.root.cancelDelayedClose()}onpointerleave(t){ma(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!si(t.target))return;const r=t.target.closest(Ac.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 p(this.#e)}set snippetProps(t){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":im(this.root.opts.open.current),...oA(this.root.contentPresence.transitionStatus),[Ac.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function Rv(e,t){te(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),h=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,()=>[]),E=b(t,"hourCycle",7),A=b(t,"locale",7),T=b(t,"hideTimeZone",7,!1),x=b(t,"required",7,!1),O=b(t,"calendarLabel",7,"Event"),$=b(t,"disableDaysOutsideMonth",7,!0),L=b(t,"preventDeselect",7,!1),G=b(t,"pagedNavigation",7,!1),N=b(t,"weekStartsOn",7),se=b(t,"weekdayFormat",7,"narrow"),q=b(t,"isDateDisabled",7,()=>!1),oe=b(t,"fixedWeeks",7,!1),pe=b(t,"numberOfMonths",7,1),J=b(t,"closeOnDateSelect",7,!0),Y=b(t,"initialFocus",7,!1),Z=b(t,"errorMessageId",7),z=b(t,"children",7),H=b(t,"monthFormat",7,"long"),K=b(t,"yearFormat",7,"numeric");const le=Im({granularity:v(),defaultValue:s(),minValue:h(),maxValue:f()});function de(){a()===void 0&&a(le)}de(),tt.pre(()=>a(),()=>{de()});function F(){J()&&r(!1)}const ue=lI.create({open:R(()=>r(),w=>{r(w),n()(w)}),value:R(()=>s(),w=>{s(w),o()(w)}),placeholder:R(()=>a(),w=>{a(w),l()(w)}),isDateUnavailable:R(()=>c()),minValue:R(()=>h()),maxValue:R(()=>f()),disabled:R(()=>g()),readonly:R(()=>m()),granularity:R(()=>v()),readonlySegments:R(()=>_()),hourCycle:R(()=>E()),locale:cm(()=>A()),hideTimeZone:R(()=>T()),required:R(()=>x()),calendarLabel:R(()=>O()),disableDaysOutsideMonth:R(()=>$()),preventDeselect:R(()=>L()),pagedNavigation:R(()=>G()),weekStartsOn:R(()=>N()),weekdayFormat:R(()=>se()),isDateDisabled:R(()=>q()),fixedWeeks:R(()=>oe()),numberOfMonths:R(()=>pe()),initialFocus:R(()=>Y()),onDateSelect:R(()=>F),defaultPlaceholder:le,monthFormat:R(()=>H()),yearFormat:R(()=>K())});cI.create({open:ue.opts.open,onOpenChangeComplete:R(()=>i())}),UD.create({value:ue.opts.value,disabled:ue.opts.disabled,readonly:ue.opts.readonly,readonlySegments:ue.opts.readonlySegments,validate:R(()=>d()),onInvalid:R(()=>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:R(()=>Z()),isInvalidProp:R(()=>{})});var U={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 h()},set minValue(w){h(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 E()},set hourCycle(w){E(w),y()},get locale(){return A()},set locale(w){A(w),y()},get hideTimeZone(){return T()},set hideTimeZone(w=!1){T(w),y()},get required(){return x()},set required(w=!1){x(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 L()},set preventDeselect(w=!1){L(w),y()},get pagedNavigation(){return G()},set pagedNavigation(w=!1){G(w),y()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),y()},get weekdayFormat(){return se()},set weekdayFormat(w="narrow"){se(w),y()},get isDateDisabled(){return q()},set isDateDisabled(w=()=>!1){q(w),y()},get fixedWeeks(){return oe()},set fixedWeeks(w=!1){oe(w),y()},get numberOfMonths(){return pe()},set numberOfMonths(w=1){pe(w),y()},get closeOnDateSelect(){return J()},set closeOnDateSelect(w=!0){J(w),y()},get initialFocus(){return Y()},set initialFocus(w=!1){Y(w),y()},get errorMessageId(){return Z()},set errorMessageId(w){Z(w),y()},get children(){return z()},set children(w){z(w),y()},get monthFormat(){return H()},set monthFormat(w="long"){H(w),y()},get yearFormat(){return K()},set yearFormat(w="numeric"){K(w),y()}},ge=X(),fe=V(ge);return De(fe,()=>Sv,(w,Be)=>{Be(w,{children:(Pe,Ye)=>{var St=X(),Ge=V(St);_e(Ge,()=>z()??Me),S(Pe,St)},$$slots:{default:!0}})}),S(e,ge),re(U)}ie(Rv,{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 hI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),pI=j("<div><!></div>");function Lv(e,t){const r=mt();te(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,hI);const l=Fv.get(),c=Km.create({id:R(()=>s()),ref:R(()=>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:R(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:R(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),d=D(()=>We(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()}},h=X(),f=V(h),g=v=>{var _=X(),E=V(_);{let A=D(()=>({props:p(d),...c.snippetProps}));_e(E,i,()=>p(A))}S(v,_)},m=v=>{var _=pI();Ne(_,()=>({...p(d)}));var E=M(_);_e(E,()=>n()??Me,()=>c.snippetProps),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),re(u)}ie(Lv,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var mI=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),zv=j("<div><div><!></div></div>");function Uv(e,t){const r=mt();te(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),h=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,mI);const _=fI.create({id:R(()=>o()),ref:R(()=>s(),N=>s(N)),onInteractOutside:R(()=>u()),onEscapeKeydown:R(()=>d()),customAnchor:R(()=>g())}),E=D(()=>We(v,_.props)),A=D(()=>h()&&_.shouldTrapFocus);function T(N){_.shouldTrapFocus||N.preventDefault(),l()(N)}var x={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 h()},set trapFocus(N=!0){h(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=X(),$=V(O),L=N=>{Cv(N,Sn(()=>p(E),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(A)},get preventScroll(){return f()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(q,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const Y=D(()=>We(pe(),{style:wv("popover")},{style:m()}));var Z=X(),z=V(Z),H=le=>{var de=X(),F=V(de);{let ue=D(()=>({props:p(Y),wrapperProps:J(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,de)},K=le=>{var de=zv();Ne(de,()=>({...J()}));var F=M(de);Ne(F,()=>({...p(Y)}));var ue=M(F);_e(ue,()=>i()??Me),P(F),P(de),S(le,de)};ce(z,le=>{n()?le(H):le(K,-1)}),S(q,Z)},$$slots:{popper:!0}}))},G=N=>{Ov(N,Sn(()=>p(E),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(A)},get preventScroll(){return f()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(q,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const Y=D(()=>We(pe(),{style:wv("popover")},{style:m()}));var Z=X(),z=V(Z),H=le=>{var de=X(),F=V(de);{let ue=D(()=>({props:p(Y),wrapperProps:J(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,de)},K=le=>{var de=zv();Ne(de,()=>({...J()}));var F=M(de);Ne(F,()=>({...p(Y)}));var ue=M(F);_e(ue,()=>i()??Me),P(F),P(de),S(le,de)};ce(z,le=>{n()?le(H):le(K,-1)}),S(q,Z)},$$slots:{popper:!0}}))};return ce($,N=>{a()?N(L):a()||N(G,1)}),S(e,O),re(x)}ie(Uv,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var vI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function Vv(e,t){te(t,!0);let r=b(t,"ref",15,null),n=b(t,"onOpenAutoFocus",7),i=je(t,vI);const s=D(()=>We({onOpenAutoFocus:n()},{onOpenAutoFocus:jO}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return Uv(e,Sn(()=>p(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),re(o)}ie(Vv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var gI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),yI=j("<button><!></button>");function qv(e,t){const r=mt();te(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),h=je(t,gI);const f=dI.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v)),disabled:R(()=>!!l()),openOnHover:R(()=>c()),openDelay:R(()=>d()),closeDelay:R(()=>u())}),g=D(()=>We(h,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 Ev(e,{get id(){return s()},get ref(){return f.opts.ref},children:(v,_)=>{var E=X(),A=V(E),T=O=>{var $=X(),L=V($);_e(L,i,()=>({props:p(g)})),S(O,$)},x=O=>{var $=yI();Ne($,()=>({...p(g)}));var L=M($);_e(L,()=>n()??Me),P($),S(O,$)};ce(A,O=>{i()?O(T):O(x,-1)}),S(v,E)},$$slots:{default:!0}}),re(m)}ie(qv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var bI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Bv(e,t){te(t,!0);let r=b(t,"ref",15,null),n=b(t,"onkeydown",7),i=je(t,bI);function s(l){if(Qs(l.key)){const c=l.currentTarget.closest(La.selector("input"));if(!c)return;Xs(l,c)}}const o=D(()=>We({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 qv(e,Sn(()=>i,{"data-segment":"trigger"},()=>p(o),{get ref(){return r()},set ref(l){r(l)}})),re(a)}ie(Bv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Cc=j("<!> <!>",1),jv=j("<!> <!> <!>",1);function Zv(e,t){te(t,!0);let r=b(t,"dateString",15),n=b(t,"labelClass",7),i=b(t,"inputClass",7),s=b(t,"labelText",7),o=ee(Fe(Qn(Vt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);me(()=>{r(p(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=X(),d=V(c);{let u=D(()=>C.locale||"de");De(d,()=>Rv,(h,f)=>{f(h,{get locale(){return p(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Qn(Vt()))<0,get value(){return p(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=jv(),_=V(v);De(_,()=>$v,(T,x)=>{x(T,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(O,$)=>{var L=X(),G=V(L),N=se=>{var q=X(),oe=V(q);_e(oe,s),S(se,q)};ce(G,se=>{s()&&se(N)}),S(O,L)},$$slots:{default:!0}})});var E=Q(_,2);{const T=(x,O)=>{let $=()=>O?.().segments;var L=Cc(),G=V(L);Ve(G,17,$,Ur,(se,q)=>{let oe=()=>p(q).part,pe=()=>p(q).value;var J=X(),Y=V(J);De(Y,()=>Mv,(Z,z)=>{z(Z,{get part(){return oe()},children:(H,K)=>{Tt();var le=zt();ae(()=>ne(le,pe())),S(H,le)},$$slots:{default:!0}})}),S(se,J)});var N=Q(G,2);De(N,()=>Bv,(se,q)=>{q(se,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),S(x,L)};De(E,()=>Pv,(x,O)=>{O(x,{get class(){return`go-datepicker-input ${i()??""}`},children:T,$$slots:{default:!0}})})}var A=Q(E,2);De(A,()=>Vv,(T,x)=>{x(T,{children:(O,$)=>{var L=X(),G=V(L);{const N=(se,q)=>{let oe=()=>q?.().months,pe=()=>q?.().weekdays;var J=Cc(),Y=V(J);De(Y,()=>nc,(z,H)=>{H(z,{children:(K,le)=>{var de=jv(),F=V(de);De(F,()=>oc,(ge,fe)=>{fe(ge,{class:"go-datepicker-previous"})});var ue=Q(F,2);De(ue,()=>ic,(ge,fe)=>{fe(ge,{class:"go-datepicker-selected-month"})});var U=Q(ue,2);De(U,()=>sc,(ge,fe)=>{fe(ge,{class:"go-datepicker-next"})}),S(K,de)},$$slots:{default:!0}})});var Z=Q(Y,2);Ve(Z,16,oe,z=>z,(z,H)=>{var K=X(),le=V(K);De(le,()=>Xu,(de,F)=>{F(de,{children:(ue,U)=>{var ge=Cc(),fe=V(ge);De(fe,()=>tc,(Be,Pe)=>{Pe(Be,{children:(Ye,St)=>{var Ge=X(),Xt=V(Ge);De(Xt,()=>to,(ct,Qt)=>{Qt(ct,{children:(Et,Mt)=>{var er=X(),jt=V(er);Ve(jt,17,pe,Ur,(hr,Dr)=>{var Ir=X(),vn=V(Ir);De(vn,()=>rc,(Pr,pr)=>{pr(Pr,{children:(Jr,Xr)=>{Tt();var _t=zt();ae(()=>ne(_t,p(Dr))),S(Jr,_t)},$$slots:{default:!0}})}),S(hr,Ir)}),S(Et,er)},$$slots:{default:!0}})}),S(Ye,Ge)},$$slots:{default:!0}})});var w=Q(fe,2);De(w,()=>Qu,(Be,Pe)=>{Pe(Be,{children:(Ye,St)=>{var Ge=X(),Xt=V(Ge);Ve(Xt,16,()=>H.weeks,ct=>ct,(ct,Qt)=>{var Et=X(),Mt=V(Et);De(Mt,()=>to,(er,jt)=>{jt(er,{children:(hr,Dr)=>{var Ir=X(),vn=V(Ir);Ve(vn,16,()=>Qt,Pr=>Pr,(Pr,pr,Jr,Xr)=>{var _t=X(),Un=V(_t);De(Un,()=>ec,(ns,is)=>{is(ns,{get date(){return pr},get month(){return H.value},children:(lo,Hc)=>{var vi=X(),ss=V(vi);De(ss,()=>Ju,(mr,Vn)=>{Vn(mr,{})}),S(lo,vi)},$$slots:{default:!0}})}),S(Pr,_t)}),S(hr,Ir)},$$slots:{default:!0}})}),S(ct,Et)}),S(Ye,Ge)},$$slots:{default:!0}})}),S(ue,ge)},$$slots:{default:!0}})}),S(z,K)}),S(se,J)};De(G,()=>Lv,(se,q)=>{q(se,{children:N,$$slots:{default:!0}})})}S(O,L)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})})}return S(e,c),re(l)}ie(Zv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var _I=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),wI=j('<span class="go-field-star" aria-hidden="true">*</span>'),kI=j(" <!>",1),SI=j("<label><!></label> <input/>",1),EI=j("<label><!></label> <textarea></textarea>",1),TI=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),xI=j("<label><!></label> <input/> <!>",1),AI=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),OI=j('<img src="" alt=""/> <option> </option>',1),CI=j('<option disabled="" hidden="" selected=""> </option> <!>',1),DI=j("<!>",1),II=j("<label><!></label> <select><!></select>",1),PI=j('<img style="width: 60px" aria-hidden="true"/>'),$I=j('<span class="go-payment-mode-icons"></span>'),MI=j('<label><input type="radio"/> <!></label>'),FI=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),NI=j("<label> <input/></label>"),RI=j("<fieldset><legend><!></legend> <!></fieldset>");function Wv(e,t){te(t,!0);const r=J=>{Tt();var Y=kI(),Z=V(Y),z=Q(Z),H=K=>{var le=wI();S(K,le)};ce(z,K=>{u().required&&K(H)}),ae(()=>ne(Z,`${p(L)??""} `)),S(J,Y)},n=J=>{var Y=SI(),Z=V(Y);r(M(Z)),P(Z);var z=Q(Z,2);Ne(z,()=>({...p($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ae(()=>{Ot(Z,1,_r(f())),we(Z,"for",p(x))}),Lo(z,()=>u().value,H=>u(u().value=H,!0)),S(J,Y)},i=J=>{var Y=EI(),Z=V(Y);r(M(Z)),P(Z);var z=Q(Z,2);Ib(z),Ne(z,()=>({...p($),...v,class:g(),placeholder:u().placeholder,name:u().key})),ae(()=>{Ot(Z,1,_r(f())),we(Z,"for",p(x))}),Lo(z,()=>u().value,H=>u(u().value=H,!0)),S(J,Y)},s=J=>{var Y=xI(),Z=V(Y);r(M(Z)),P(Z);var z=Q(Z,2),H=de=>{const F=de.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),p(E)?p(E).validateField(u()):u().validate()};Ne(z,()=>({...p($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:H}),void 0,void 0,void 0,void 0,!0);var K=Q(z,2),le=de=>{var F=TI(),ue=M(F),U=Q(ue,2),ge=M(U,!0);P(U),P(F),ae(fe=>{we(F,"data-field-preview",u().key),we(ue,"src",p(N)),we(ue,"alt",fe),ne(ge,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),S(de,F)};ce(K,de=>{p(N)&&u().value instanceof File&&de(le)}),ae(()=>{Ot(Z,1,_r(f())),we(Z,"for",p(x))}),S(J,Y)},o=J=>{var Y=AI(),Z=M(Y);Ne(Z,()=>({...p($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var z=Q(Z,2);r(M(z)),P(z),P(Y),ae(()=>{Ot(Y,1,_r(f())),we(Y,"for",p(x))}),E_(Z,()=>u().value===!0,H=>{u(u().value=H,!0)}),S(J,Y)},a=J=>{var Y=II(),Z=V(Y);r(M(Z)),P(Z);var z=Q(Z,2);Ne(z,()=>({...p($),...v,name:u().key,class:g()})),k_(z,()=>{var H=M(z),K=DI(),le=V(K),de=F=>{var ue=CI(),U=V(ue),ge=M(U,!0);P(U),U.value=U.__value="";var fe=Q(U,2);Ve(fe,17,()=>u().options(),w=>w.value,(w,Be)=>{var Pe=OI(),Ye=Q(V(Pe),2),St=M(Ye,!0);P(Ye);var Ge={};ae(()=>{ne(St,p(Be).label),Ge!==(Ge=p(Be).value)&&(Ye.value=(Ye.__value=p(Be).value)??"")}),S(w,Pe)}),ae(w=>ne(ge,w),[()=>C.t("common.choose")]),S(F,ue)};ce(le,F=>{u().options&&F(de)}),S(H,K)}),ae(()=>{Ot(Z,1,_r(f())),we(Z,"for",p(x))}),h_(z,()=>u().value,H=>u(u().value=H,!0)),S(J,Y)},l=J=>{Zv(J,{get labelClass(){return f()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(Y){u(u().value=Y,!0)}})},c=J=>{const Y=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var Z=FI(),z=M(Z);r(M(z)),P(z);var H=Q(z,2);Ve(H,17,()=>p(Y),K=>K.id,(K,le)=>{var de=MI(),F=M(de);No(F);var ue=Q(F,2),U=ge=>{var fe=$I();Ve(fe,20,()=>p(le).icons,w=>w,(w,Be)=>{const Pe=D(()=>G+Be+".svg");var Ye=PI();ae(()=>{Ot(Ye,1,_r(Be)),we(Ye,"src",p(Pe)),we(Ye,"alt",Be+" icon")}),S(w,Ye)}),P(fe),S(ge,fe)};ce(ue,ge=>{p(le).icons.length>0&&ge(U)}),P(de),ae((ge,fe,w)=>{we(F,"name",u().key),Sf(F,ge),y_(F,fe),we(F,"hidden",p(Y).length===1),we(F,"aria-label",w)},[()=>String(p(le).id),()=>p(Y).length===1||String(p(le).id)===String(u().value),()=>C.t(`cart.paymentMode.ariaLabel.${p(le).name.toLowerCase()}`)]),At("change",F,()=>{u(u().value=String(p(le).id),!0)}),S(K,de)}),P(Z),ae(()=>{we(Z,"aria-required",u().required),we(Z,"aria-invalid",u().errors.length>0)}),S(J,Z)},d=J=>{var Y=RI(),Z=M(Y);r(M(Z)),P(Z);var z=Q(Z,2),H=K=>{var le=X(),de=V(le);Ve(de,17,()=>u().options,Ur,(F,ue)=>{var U=NI(),ge=M(U),fe=Q(ge);Ne(fe,()=>({...p($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),P(U),ae(()=>{Ot(U,1,_r(f())),we(U,"for",p(x)+p(ue)),ne(ge,`${p(ue)??""} `)}),Lo(fe,()=>u().value,w=>u(u().value=w,!0)),S(F,U)}),S(K,le)};ce(z,K=>{u().options&&K(H)}),P(Y),S(J,Y)};let u=b(t,"field",15),h=b(t,"describedByIds",7),f=b(t,"labelClass",7),g=b(t,"inputClass",7),m=b(t,"host",7),v=je(t,_I);const _=Ri(m()),E=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},T=D(()=>A[u().type]);let x=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(p(E)?p(E).validateField(u()):u().validate())}const $=D(()=>({id:p(x),"aria-describedby":h(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let L=D(()=>C.t(u().label)||u().label);const G="https://cdn.shop.platform.gomus.de/";let N=ee(null);me(()=>{const J=u().value;if(J instanceof File&&J.type.startsWith("image/")){const Y=URL.createObjectURL(J);return I(N,Y,!0),()=>{URL.revokeObjectURL(Y),I(N,null)}}I(N,null)});var se={get field(){return u()},set field(J){u(J),y()},get describedByIds(){return h()},set describedByIds(J){h(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()}},q=X(),oe=V(q),pe=J=>{var Y=X(),Z=V(Y);_e(Z,()=>p(T)),S(J,Y)};return ce(oe,J=>{p(T)&&J(pe)}),S(e,q),re(se)}zr(["change"]),ie(Wv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var LI=j("<span> </span>"),zI=j("<li> </li>"),UI=j('<ul class="go-field-errors"></ul>'),VI=j("<!> <!> <!>",1);function qI(e,t){te(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=ee(Fe(cr.createField(r(),n())));const a=Ri(t.$$host),l=D(()=>a.value),c=()=>p(o);let d=D(()=>p(o)?[...p(o).errors,...p(o).apiErrors].map($=>C.t($)):[]),u=D(()=>p(o)?.description),h=D(()=>p(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(()=>[p(u)&&p(f),p(h)&&p(g)].filter(Boolean).join(" ")||void 0);me(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",p(d).length>0)}),t.$$host.dataset.testid=r(),me(()=>{p(o)&&(p(o).mounted=!0,p(o).value,Ue(()=>{p(o)?.errors.length&&p(l).validateField(p(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()}},_=VI(),E=V(_);Wv(E,{get describedByIds(){return p(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return p(o)},set field($){I(o,$,!0)}});var A=Q(E,2),T=$=>{var L=LI(),G=M(L,!0);P(L),ae(()=>{we(L,"id",p(f)),ne(G,p(o).description)}),S($,L)};ce(A,$=>{p(u)&&$(T)});var x=Q(A,2),O=$=>{var L=UI();Ve(L,21,()=>p(d),Ur,(G,N)=>{var se=zI(),q=M(se,!0);P(se),ae(()=>ne(q,p(N))),S(G,se)}),P(L),ae(()=>we(L,"id",p(g))),S($,L)};return ce(x,$=>{p(h)&&$(O)}),S(e,_),re(v)}customElements.define("go-field",ie(qI,{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 BI=j("<go-field></go-field>",2);function jI(e,t){te(t,!0);let r=Ri(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?cr.getFormFields(p(n)?.formId):[]);var s=X(),o=V(s);Ve(o,17,()=>p(i),a=>a.key,(a,l)=>{var c=BI();ae(()=>Kn(c,"key",p(l).key)),ae(()=>Kn(c,"required",p(l).required)),S(a,c)}),S(e,s),re()}customElements.define("go-all-fields",ie(jI,{},[],[]));var ZI=j('<p aria-hidden="true"> </p>'),WI=j("<li> </li>"),HI=j('<ul class="go-error-feedback-api-errors"></ul>'),GI=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function KI(e,t){te(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);me(()=>{p(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Du(p(n)?.fields),!0)})});let i=ee(0);setInterval(()=>{I(i,Du(p(n)?.fields)||0,!0)},100);let s=D(()=>p(i)+(p(n)?.apiErrors?.length||0)),o=ee(-1);me(()=>{t.$$host.classList.toggle("is-invalid",p(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",p(s).toString())});var a=GI(),l=M(a),c=M(l),d=v=>{var _=zt();ae(E=>ne(_,E),[()=>C.t("forms.errorSummary",{count:p(o)})]),S(v,_)};ce(c,v=>{p(o)>0&&v(d)}),P(l);var u=Q(l,2),h=v=>{var _=ZI(),E=M(_,!0);P(_),ae(A=>ne(E,A),[()=>C.t("forms.errorSummary",{count:p(i)})]),S(v,_)};ce(u,v=>{p(i)>0&&v(h)});var f=Q(u,2),g=v=>{var _=HI();Ve(_,21,()=>p(n)?.apiErrors,Ur,(E,A)=>{var T=WI(),x=M(T,!0);P(T),ae(()=>ne(x,p(A))),S(E,T)}),P(_),S(v,_)},m=D(()=>p(n)&&Gl(p(n).apiErrors)&&p(n).apiErrors.length>0);ce(f,v=>{p(m)&&v(g)}),P(a),S(e,a),re()}customElements.define("go-errors-feedback",ie(KI,{},[],[]));var YI=j('<div class="go-form-feedback"><!></div>');function JI(e,t){var r=YI(),n=M(r);l_(n,t,"default",{},null),P(r),S(e,r)}customElements.define("go-form-feedback",ie(JI,{},["default"],[]));function XI(e,t){te(t,!0);let r=b(t,"buttonClass",7,"");return rn(()=>{Mn(t.$$host,"button",{type:"submit",class:r()})}),re({get buttonClass(){return r()},set buttonClass(n=""){r(n),y()}})}customElements.define("go-submit",ie(XI,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var QI=j('<div aria-live="assertive"> </div>');function eP(e,t){te(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=X(),s=V(i),o=a=>{var l=QI();let c;var d=M(l,!0);P(l),ae(()=>{c=Ot(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":p(n).successMessage}),ne(d,p(n)?.successMessage)}),S(a,l)};ce(s,a=>{p(n)?.successMessage&&a(o)}),S(e,i),re()}customElements.define("go-success-feedback",ie(eP,{},[],[]));var dr="INUMBER",Wi="IOP1",Hi="IOP2",Gi="IOP3",cn="IVAR",di="IVARNAME",Ki="IFUNCALL",za="IFUNDEF",Bt="IEXPR",Dc="IEXPREVAL",fi="IMEMBER",Ua="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 Ua:return this.value;case Ki:return"CALL "+this.value;case za: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 Hv(e){return new Ie(Gi,e)}function Ic(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var h=e[u],f=h.type;if(f===dr||f===di)Array.isArray(h.value)?s.push.apply(s,Ic(h.value.map(function(g){return new Ie(dr,g)}).concat(new Ie(Yi,h.value.length)),t,r,n,i)):s.push(h);else if(f===cn&&i.hasOwnProperty(h.value))h=new Ie(dr,i[h.value]),s.push(h);else if(f===Hi&&s.length>1)l=s.pop(),a=s.pop(),d=r[h.value],h=new Ie(dr,d(a.value,l.value)),s.push(h);else if(f===Gi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),h.value==="?"?s.push(a.value?l.value:c.value):(d=n[h.value],h=new Ie(dr,d(a.value,l.value,c.value)),s.push(h));else if(f===Wi&&s.length>0)a=s.pop(),d=t[h.value],h=new Ie(dr,d(a.value)),s.push(h);else if(f===Bt){for(;s.length>0;)o.push(s.shift());o.push(new Ie(Bt,Ic(h.value,t,r,n,i)))}else if(f===fi&&s.length>0)a=s.pop(),s.push(new Ie(dr,a.value[h.value]));else{for(;s.length>0;)o.push(s.shift());o.push(h)}}for(;s.length>0;)o.push(s.shift());return o}function Gv(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=Hv(l.value):c=new Ie(l.type,l.value),n.push(c)}else o===Bt?n.push(new Ie(Bt,Gv(s.value,t,r))):n.push(s)}return n}function hi(e,t,r){var n=[],i,s,o,a,l,c;if(Pc(e))return fn(e,r);for(var d=e.length,u=0;u<d;u++){var h=e[u],f=h.type;if(f===dr||f===di)n.push(h.value);else if(f===Hi)s=n.pop(),i=n.pop(),h.value==="and"?n.push(i?!!hi(s,t,r):!1):h.value==="or"?n.push(i?!0:!!hi(s,t,r)):h.value==="="?(a=t.binaryOps[h.value],n.push(a(i,hi(s,t,r),r))):(a=t.binaryOps[h.value],n.push(a(fn(i,r),fn(s,r))));else if(f===Gi)o=n.pop(),s=n.pop(),i=n.pop(),h.value==="?"?n.push(hi(i?s:o,t,r)):(a=t.ternaryOps[h.value],n.push(a(fn(i,r),fn(s,r),fn(o,r))));else if(f===cn)if(h.value in t.functions)n.push(t.functions[h.value]);else if(h.value in t.unaryOps&&t.parser.isOperatorEnabled(h.value))n.push(t.unaryOps[h.value]);else{var g=r[h.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+h.value)}else if(f===Wi)i=n.pop(),a=t.unaryOps[h.value],n.push(a(fn(i,r)));else if(f===Ki){for(c=h.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===za)n.push((function(){for(var m=n.pop(),v=[],_=h.value;_-- >0;)v.unshift(n.pop());var E=n.pop(),A=function(){for(var T=Object.assign({},r),x=0,O=v.length;x<O;x++)T[v[x]]=arguments[x];return hi(m,t,T)};return Object.defineProperty(A,"name",{value:E,writable:!1}),r[E]=A,A})());else if(f===Bt)n.push(tP(h,t));else if(f===Dc)n.push(h);else if(f===fi)i=n.pop(),n.push(i[h.value]);else if(f===Ua)n.pop();else if(f===Yi){for(c=h.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 tP(e,t,r){return Pc(e)?e:{type:Dc,value:function(n){return hi(e.value,t,n)}}}function Pc(e){return e&&e.type===Dc}function fn(e,t){return Pc(e)?e.value(t):e}function $c(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(Kv).join(", ")+"]"):r.push(Kv(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===za){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("("+$c(d.value,t)+")");else if(u!==Ua)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Kv(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 Mc(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?Mc(o.value,t,r):i!==null&&(Ji(t,i)||t.push(i),i=null)}i!==null&&!Ji(t,i)&&t.push(i)}function Cr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Cr.prototype.simplify=function(e){return e=e||{},new Cr(Ic(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Cr.prototype.substitute=function(e,t){return t instanceof Cr||(t=this.parser.parse(String(t))),new Cr(Gv(this.tokens,e,t),this.parser)},Cr.prototype.evaluate=function(e){return e=e||{},hi(this.tokens,this,e)},Cr.prototype.toString=function(){return $c(this.tokens,!1)},Cr.prototype.symbols=function(e){e=e||{};var t=[];return Mc(this.tokens,t,e),t},Cr.prototype.variables=function(e){e=e||{};var t=[];Mc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Cr.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 "+$c(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var io="TEOF",Ze="TOP",qa="TNUMBER",Yv="TSTRING",hn="TPAREN",Xi="TBRACKET",Ba="TCOMMA",Fc="TNAME",Nc="TSEMICOLON";function Jv(e,t,r){this.type=e,this.value=t,this.index=r}Jv.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 Jv(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(io,"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(Yv,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(Ba,","),this.pos++,!0):!1},rt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Nc,";"),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(qa,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(Fc,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 rP=/^[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);rP.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(qa,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(qa,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 He(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}He.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},He.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},He.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},He.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},He.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},He.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))}},He.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Fc)||this.accept(Ze,r))e.push(new Ie(cn,this.current.value));else if(this.accept(qa))e.push(new Ie(dr,this.current.value));else if(this.accept(Yv))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)},He.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},He.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},He.prototype.parseUntilEndStatement=function(e,t){return this.accept(Nc)?(this.nextToken&&this.nextToken.type!==io&&!(this.nextToken.type===hn&&this.nextToken.value===")")&&t.push(new Ie(Ua)),this.nextToken.type!==io&&this.parseExpression(t),e.push(new Ie(Bt,t)),!0):!1},He.prototype.parseArrayList=function(e){for(var t=0;!this.accept(Xi,"]");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.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(za,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("="))}},He.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(Hv("?"))}},He.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"))}},He.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 nP=["==","!=","<","<=",">=",">","in"];He.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,nP);){var t=this.current;this.parseAddSub(e),e.push(dn(t.value))}};var iP=["+","-","||"];He.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,iP);){var t=this.current;this.parseTerm(e),e.push(dn(t.value))}};var sP=["*","/","%"];He.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,sP);){var t=this.current;this.parseFactor(e),e.push(dn(t.value))}},He.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===Nc||this.nextToken.type===Ba||this.nextToken.type===io||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)},He.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(dn("^"))},He.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Va("!"))},He.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))}},He.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(hn,")");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.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(Fc),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 oP(e,t){return Number(e)+Number(t)}function aP(e,t){return e-t}function lP(e,t){return e*t}function uP(e,t){return e/t}function cP(e,t){return e%t}function dP(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function fP(e,t){return e===t}function hP(e,t){return e!==t}function pP(e,t){return e>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!!(e||t)}function _P(e,t){return Ji(t,e)}function wP(e){return(Math.exp(e)-Math.exp(-e))/2}function kP(e){return(Math.exp(e)+Math.exp(-e))/2}function SP(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function EP(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function TP(e){return Math.log(e+Math.sqrt(e*e-1))}function xP(e){return Math.log((1+e)/(1-e))/2}function Xv(e){return Math.log(e)*Math.LOG10E}function AP(e){return-e}function OP(e){return!e}function CP(e){return e<0?Math.ceil(e):Math.floor(e)}function DP(e){return Math.random()*(e||1)}function Qv(e){return Lc(e+1)}function IP(e){return isFinite(e)&&e===Math.round(e)}var PP=4.7421875,Rc=[.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 Lc(e){var t,r;if(IP(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)*Lc(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=Rc[0];for(var c=1;c<Rc.length;++c)r+=Rc[c]/(e+c);return t=e+PP+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function $P(e){return Array.isArray(e)?e.length:String(e).length}function eg(){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 tg(e,t,r){return e?t:r}function MP(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 FP(e,t,r){return r&&(r[e]=t),t}function NP(e,t){return e[t|0]}function RP(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function LP(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function zP(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 UP(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 VP(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 qP(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 BP(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function jP(e){return(e>0)-(e<0)||+e}var rg=1/3;function ZP(e){return e<0?-Math.pow(-e,rg):Math.pow(e,rg)}function WP(e){return Math.exp(e)-1}function HP(e){return Math.log(1+e)}function GP(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||wP,cosh:Math.cosh||kP,tanh:Math.tanh||SP,asinh:Math.asinh||EP,acosh:Math.acosh||TP,atanh:Math.atanh||xP,sqrt:Math.sqrt,cbrt:Math.cbrt||ZP,log:Math.log,log2:Math.log2||GP,ln:Math.log,lg:Math.log10||Xv,log10:Math.log10||Xv,expm1:Math.expm1||WP,log1p:Math.log1p||HP,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||CP,"-":AP,"+":Number,exp:Math.exp,not:OP,length:$P,"!":Qv,sign:Math.sign||jP},this.binaryOps={"+":oP,"-":aP,"*":lP,"/":uP,"%":cP,"^":Math.pow,"||":dP,"==":fP,"!=":hP,">":pP,"<":mP,">=":vP,"<=":gP,and:yP,or:bP,in:_P,"=":FP,"[":NP},this.ternaryOps={"?":tg},this.functions={random:DP,fac:Qv,min:LP,max:RP,hypot:Math.hypot||eg,pyt:Math.hypot||eg,pow:Math.pow,atan2:Math.atan2,if:tg,gamma:Lc,roundTo:MP,map:zP,fold:UP,filter:VP,indexOf:qP,join:BP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}pi.prototype.parse=function(e){var t=[],r=new He(this,new rt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(io,"EOF"),new Cr(t,this)},pi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var ng=new pi;pi.parse=function(e){return ng.parse(e)},pi.evaluate=function(e,t){return ng.parse(e).evaluate(t)};var ig={"+":"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 KP(e){return ig.hasOwnProperty(e)?ig[e]:e}pi.prototype.isOperatorEnabled=function(e){var t=KP(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var YP=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,JP=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,XP=/(__optional\("[^"]+"\))\.length\b/g,QP=new pi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),sg=new Map;function e$(e){return e.replace(YP,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(JP,(t,r)=>`__length(${r})`).replace(XP,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function t$(e){const t=sg.get(e);if(t)return t;const r=QP.parse(e$(e));return sg.set(e,r),r}function r$(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=t$(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 og=["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"],n$=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 ja(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Za(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+n$&&(i.seats?.available??0)>0})}async function Wa(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}));ja(e,t)}var i$={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}));ja(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(ft(s,{time:t.selectedTime}))}},s$={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(ft(a,{time:s}))}},o$={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=>sa(i));await pn(e,n);for(const i of n)e.preCart.addItem(ft(i))}},a$={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()}));ja(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(ft(o,{time:t.selectedTime}))}},l$={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(ft(l,{time:o}))}},u$={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()}));ja(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(ft(o,{time:t.selectedTime}))}},c$={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=Au(n,r.id,{event_title:r.event_title});e.preCart.addItem(ft(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},d$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Wa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Za(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(ft(l,{time:n.start_time}))}}},f$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Wa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Za(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(ft(d,{time:l}))}}},h$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Wa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Za(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(ft(l,{time:n.start_time}))}}},p$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Wa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Za(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=Au(o,i.id,{event_title:i.event_title});e.preCart.addItem(ft(a,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},m$={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(ft(cp(r)))}},v$={"ticket:timeslot":i$,"ticket:day":s$,"ticket:annual":o$,"event:admission":a$,"event:admission:day":l$,"event:admission:timeslot":u$,"event:price":c$,"events:admission":d$,"events:admission:day":f$,"events:admission:timeslot":h$,"events:price":p$,coupon:m$};function mi(e){const t=v$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${og.join(", ")}`),t}var ag=og,g$=0,y$=class{uid=g$++;#e=ee();get filters(){return p(this.#e)}set filters(e){I(this.#e,e,!0)}#t=ee();get eventIds(){return p(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=ee();get museumIds(){return p(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=ee();get exhibitionIds(){return p(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=ee();get ticketIds(){return p(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=ee();get ticketGroupIds(){return p(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=ee();get selectedDate(){return p(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=ee();get selectedTimeslot(){return p(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return p(this.#l)}set selectedTime(e){I(this.#l,e)}#u=ee(Fe([]));get ticketSegments(){return p(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return p(this.#c)}set preCarts(e){I(this.#c,e)}#d=ee();get timeslotDetails(){return p(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))}},lg="go-ticket-selection",b$=Fi(lg),mn=Ni(lg);function _$(e,t){te(t,!0);let r=b(t,"when",7),n=b(t,"then",7,"show");const i=mn(t.$$host),s=D(()=>i.value),o=HE(t.$$host),a=D(()=>o.value),l=Ri(t.$$host),c=D(()=>l.value),d=Li(t.$$host),u=D(()=>d.value);let h=D(()=>({ticketSelection:p(s),personalizationDetails:p(a),formData:p(c)?.formData,cart:C.cart,cartView:p(u)}));const f=E=>{I(h,E)},g=()=>p(h);let m=D(()=>r$(r(),p(h))),v=null;me(()=>{const E=t.$$host;if(p(m)&&n()==="show")v&&(E.appendChild(v),v=null);else if(!v&&E.childNodes.length>0)for(v=document.createDocumentFragment();E.firstChild;)v.appendChild(E.firstChild)});var _={_setData:f,_getData:g,get when(){return r()},set when(E){r(E),y()},get then(){return n()},set then(E="show"){n(E),y()}};return re(_)}customElements.define("go-if",ie(_$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function ug(e,t){te(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"),me(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),re({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(ug,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function w$(e,t){te(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 ug(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),re(o)}customElements.define("go-init",ie(w$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function k$(e,t){te(t,!0);const r=b(t,"to",7),n=D(()=>Xe.config.urls[r()]),i=Mn(t.$$host,"a");return me(()=>{if(!p(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",p(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Xe.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}Xe.config.navigateTo(Xe.config.urls[r()]())}),re({get to(){return r()},set to(s){r(s),y()}})}customElements.define("go-link",ie(k$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var S$=class{#e=ee();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return ll(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?Xe.config.urls.annualTicketPersonalizationList?.()?Xe.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}}},cg="go-order-details",E$=Fi(cg),dg=Ni(cg);function T$(e,t){te(t,!0);let r=b(t,"token",7);const n=new S$(r());E$(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 re(i)}customElements.define("go-order",ie(T$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var x$=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),A$=j('<br/> <span class="go-order-item-quantities"> </span>',1),O$=j('<a aria-label="iCal link"> </a>'),C$=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 fg(e,t){te(t,!0);let r=b(t,"item",7),n=b(t,"orderDetails",7);var i={get item(){return r()},set item(x){r(x),y()},get orderDetails(){return n()},set orderDetails(x){n(x),y()}},s=C$(),o=M(s),a=M(o),l=Q(M(a),2),c=M(l),d=M(c,!0);P(c);var u=Q(c,2),h=x=>{var O=x$(),$=V(O),L=M($,!0);P($);var G=Q($,2),N=M(G,!0);P(G),ae((se,q)=>{ne(L,se),ne(N,q)},[()=>Vs(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>Us(r().attributes.start_time)]),S(x,O)};ce(u,x=>{r().attributes.start_time&&x(h)});var f=Q(u,2);Ve(f,17,()=>r().attributes.quantities,x=>x.id,(x,O)=>{var $=A$(),L=Q(V($),2),G=M(L);P(L),ae(()=>ne(G,`${p(O).quantity??""} x ${p(O).title??""}`)),S(x,$)});var g=Q(f,2),m=M(g,!0);P(g),P(l);var v=Q(l,2),_=M(v,!0);P(v);var E=Q(v,4),A=M(E),T=x=>{var O=O$(),$=M(O,!0);P(O),ae(L=>{we(O,"href",C.apiUrl+r().attributes.ical_url),ne($,L)},[()=>C.t("common.calendar")]),S(x,O)};return ce(A,x=>{r().attributes.ical_url&&x(T)}),P(E),P(a),P(o),P(s),ae((x,O,$)=>{ne(d,r().attributes.title),we(g,"href",x),ne(m,O),ne(_,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>ia(r().price_cents)]),S(e,s),re(i)}ie(fg,{item:{},orderDetails:{}},[],[],{mode:"open"});var D$=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),I$=j('<span class="go-cart-item-date"> </span>'),P$=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),$$=j('<br/> <a class="go-ticket-personalization"> </a>',1),M$=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),F$=j('<a aria-label="iCal link"> </a>'),N$=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>'),R$=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),L$=j('<a class="go-ticket-personalization"> </a>'),z$=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 hg(e,t){te(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=X(),a=V(o),l=d=>{var u=X(),h=V(u);Ve(h,17,()=>({length:n().attributes.quantity}),Ur,(f,g,m)=>{var v=N$(),_=M(v),E=M(_),A=M(E);A.textContent="1";var T=Q(A,2),x=M(T),O=M(x,!0);P(x);var $=Q(x,2),L=z=>{const H=D(()=>n().attributes.barcodes[m]?.id);var K=P$(),le=V(K),de=ge=>{var fe=D$(),w=V(fe),Be=M(w,!0);P(w);var Pe=Q(w,2),Ye=M(Pe,!0);P(Pe),ae((St,Ge)=>{ne(Be,St),ne(Ye,Ge)},[()=>Vs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>Us(n().attributes.start_time)]),S(ge,fe)},F=ge=>{var fe=I$(),w=M(fe,!0);P(fe),ae(Be=>ne(w,Be),[()=>Vs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),S(ge,fe)};ce(le,ge=>{n().attributes.ticket_type==="time_slot"?ge(de):n().attributes.ticket_type==="normal"&&ge(F,1)});var ue=Q(le,4),U=M(ue,!0);P(ue),ae((ge,fe)=>{we(ue,"href",ge),ne(U,fe)},[()=>i().downloadLink(n(),p(H)),()=>C.t("common.download")]),S(z,K)},G=z=>{var H=$$(),K=Q(V(H),2),le=M(K,!0);P(K),ae((de,F)=>{we(K,"href",de),ne(le,F)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(z,H)};ce($,z=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?z(L):z(G,-1)}),P(T);var N=Q(T,2),se=M(N,!0);P(N);var q=Q(N,2),oe=M(q),pe=z=>{var H=M$(),K=M(H);P(H),ae(()=>{we(H,"href",C.apiUrl+n().attributes.barcodes[m]?.passbook_url),we(K,"src",r)}),S(z,H)};ce(oe,z=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&z(pe)}),P(q);var J=Q(q,2),Y=M(J),Z=z=>{var H=F$(),K=M(H,!0);P(H),ae(le=>{we(H,"href",C.apiUrl+n().attributes.ical_url),ne(K,le)},[()=>C.t("common.calendar")]),S(z,H)};ce(Y,z=>{n().attributes.ical_url&&z(Z)}),P(J),P(E),P(_),P(v),ae(z=>{ne(O,n().attributes.title),ne(se,z)},[()=>ia(n().price_cents)]),S(f,v)}),S(d,u)},c=d=>{var u=z$(),h=M(u),f=M(h),g=M(f),m=M(g,!0);P(g);var v=Q(g,2),_=M(v),E=M(_,!0);P(_);var A=Q(_,2),T=L=>{var G=R$(),N=M(G,!0);P(G),ae((se,q)=>{we(G,"href",se),ne(N,q)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),S(L,G)},x=L=>{var G=L$(),N=M(G,!0);P(G),ae((se,q)=>{we(G,"href",se),ne(N,q)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(L,G)};ce(A,L=>{n().attributes.is_voucher?L(T):L(x,-1)}),P(v);var O=Q(v,2),$=M(O,!0);P(O),Tt(2),P(f),P(h),P(u),ae(L=>{ne(m,n().attributes.quantity),ne(E,n().attributes.title),ne($,L)},[()=>ia(n().price_cents)]),S(d,u)};return ce(a,d=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?d(l):d(c,-1)}),S(e,o),re(s)}ie(hg,{item:{},orderDetails:{}},[],[],{mode:"open"});var U$=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 V$(e,t){te(t,!0);const r=dg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);var s=X(),o=V(s),a=l=>{var c=U$(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=Q(h,2),m=M(g,!0);P(g);var v=Q(g,2),_=M(v,!0);P(v),Tt(2),P(u),P(d);var E=Q(d,2);Ve(E,17,()=>p(i).items,$=>$.id,($,L)=>{var G=X(),N=V(G),se=oe=>{hg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})},q=oe=>{fg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})};ce(N,oe=>{p(L).type==="Ticket"?oe(se):p(L).type==="Event"&&oe(q,1)}),S($,G)});var A=Q(E,2),T=M(A),x=Q(M(T),4),O=M(x,!0);P(x),Tt(2),P(T),P(A),P(c),ae(($,L,G,N)=>{ne(f,$),ne(m,L),ne(_,G),ne(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:ia(p(i).total_price_cents)})]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),re()}customElements.define("go-order-breakdown",ie(V$,{},[],[]));function q$(e,t){te(t,!0);const r=dg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);Tt();var s=zt();ae(()=>ne(s,p(i)?.id)),S(e,s),re()}customElements.define("go-order-invoice-id",ie(q$,{},[],[]));var B$=j("<go-form></go-form>",2);function j$(e,t){te(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}Wl();var n=B$();Kn(n,"formId","passwordResetForm"),Dl("submit",n,r),S(e,n),re()}customElements.define("go-profile-password",ie(j$,{},[],[]));var Z$=j("<go-form></go-form>",2);function W$(e,t){te(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=ee(void 0);const n=D(()=>C.validateToken());rn(async()=>{await C.waitForAllFetches(),await Hl(()=>p(r).details),await Hl(()=>p(n).data),p(r).details.fill(p(n).data)});var i=Z$();Kn(i,"formId","accountDetailsForm"),xf(i,s=>I(r,s),()=>p(r)),S(e,i),re()}customElements.define("go-profile-details",ie(W$,{},[],[]));var H$=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function G$(e,t){te(t,!0);const r=D(()=>C.validateToken()),n=D(()=>p(r)?.data);var i=X(),s=V(i),o=l=>{var c=H$(),d=V(c),u=M(d);P(d);var h=Q(d,2),f=M(h,!0);P(h),ae(()=>{ne(u,`${p(n).name??""}
|
|
83
|
+
${p(n).surname??""}`),ne(f,p(n).email)}),S(l,c)},a=l=>{var c=zt();ae(d=>ne(c,d),[()=>C.t("user.login.desc.text")]),S(l,c)};ce(s,l=>{p(n)?l(o):l(a,-1)}),S(e,i),re()}customElements.define("go-profile-overview",ie(G$,{},[],[]));function K$(e,t){te(t,!0);function r(f){if(!f)return;const g=[];for(const m of f.split(",")){const v=m.trim();v&&(ag.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${ag.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 y$;me(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),me(()=>{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=na(a()))}),me(()=>{u.selectedDate&&Ue(()=>{a(u.selectedDate.toString())})}),me(()=>{u.selectedTimeslot,Ue(()=>{l(u.selectedTimeslot)})}),b$(t.$$host,u);var h={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 re(h)}customElements.define("go-ticket-selection",ie(K$,{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 Y$(e,t){te(t,!0);const r=mn(t.$$host),n=D(()=>r.value);me(()=>{t.$$host.style.display=p(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!p(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",p(n)?.isTicketsVisible)}),re()}customElements.define("go-tickets",ie(Y$,{},[],[]));function J$(e,t){te(t,!0);const r=mn(t.$$host),n=D(()=>r.value),i=D(()=>En(p(n)?.preCarts||[],o=>o.items.length)),s=D(()=>!p(n)?.isTicketsVisible||p(n)?.isTicketsVisible&&p(i)===0);me(()=>{t.$$host.style.display=p(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!p(s)),t.$$host.classList.toggle("is-visible",p(s))}),re()}customElements.define("go-tickets-empty",ie(J$,{},[],[]));function X$(e,t){te(t,!0);const r=mn(t.$$host),n=D(()=>r.value);let i=D(()=>En(p(n)?.preCarts||[],o=>o.totalPriceCents));Tt();var s=zt();ae(o=>ne(s,o),[()=>ur(p(i))]),S(e,s),re()}customElements.define("go-tickets-sum",ie(X$,{},[],[]));var Q$=class{#e;get ticketSelectionDetails(){return p(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}#t=ee(Fe($i()));get preCart(){return p(this.#t)}set preCart(e){I(this.#t,e,!0)}#r=ee();get filters(){return p(this.#r)}set filters(e){I(this.#r,e,!0)}#n=ee();get dateId(){return p(this.#n)}set dateId(e){I(this.#n,e,!0)}#i=ee();get limit(){return p(this.#i)}set limit(e){I(this.#i,e,!0)}#s=ee();get query(){return p(this.#s)}set query(e){I(this.#s,e,!0)}#a=ee(Fe([]));get ticketGroupIds(){return p(this.#a)}set ticketGroupIds(e){I(this.#a,e,!0)}#o=ee(Fe([]));get languageIds(){return p(this.#o)}set languageIds(e){I(this.#o,e,!0)}#l=ee(Fe([]));get catchWordIds(){return p(this.#l)}set catchWordIds(e){I(this.#l,e,!0)}#u=ee(Fe([]));get museumIds(){return p(this.#u)}set museumIds(e){I(this.#u,e,!0)}#c=ee(!1);get withContent(){return p(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)))}},pg="go-ticket-segment",eM=Fi(pg),zc=Ni(pg);function tM(e,t){te(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 E=_.split(",").map(A=>A.trim()).filter(Boolean);return E.length?E:void 0}const h=mn(t.$$host),f=h.value,g=new Q$(u(r()),h);eM(t.$$host,g),me(()=>{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()}),me(()=>{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,Ue(()=>{g.loadTickets()})}),me(()=>{f&&Ue(()=>f?.addTicketSegment(g))});const m=D(()=>g.preCart.items.length);me(()=>{t.$$host.classList.toggle("is-empty",p(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 re(v)}customElements.define("go-ticket-segment",ie(tM,{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 rM(e,t){te(t,!0);const r=mn(t.$$host).value,n=zc(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&p(i)===0);me(()=>{t.$$host.style.display=p(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!p(s)),t.$$host.classList.toggle("is-visible",p(s))}),re()}customElements.define("go-ticket-segment-empty",ie(rM,{},[],[]));function mg(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 nM(e){if(Array.isArray(e))return e}function iM(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 sM(){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 oM(e,t){return nM(e)||iM(e,t)||aM(e,t)||sM()}function aM(e,t){if(e){if(typeof e=="string")return mg(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)?mg(e,t):void 0}}var vg=Object.entries,gg=Object.setPrototypeOf,lM=Object.isFrozen,uM=Object.getPrototypeOf,cM=Object.getOwnPropertyDescriptor,Pt=Object.freeze,fr=Object.seal,Qi=Object.create,yg=typeof Reflect<"u"&&Reflect,Uc=yg.apply,Vc=yg.construct;Pt||(Pt=function(t){return t}),fr||(fr=function(t){return t}),Uc||(Uc=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)}),Vc||(Vc=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=ut(Array.prototype.forEach),dM=ut(Array.prototype.lastIndexOf),bg=ut(Array.prototype.pop),ts=ut(Array.prototype.push),fM=ut(Array.prototype.splice),$t=Array.isArray,so=ut(String.prototype.toLowerCase),qc=ut(String.prototype.toString),_g=ut(String.prototype.match),rs=ut(String.prototype.replace),wg=ut(String.prototype.indexOf),hM=ut(String.prototype.trim),pM=ut(Number.prototype.toString),mM=ut(Boolean.prototype.toString),kg=typeof BigInt>"u"?null:ut(BigInt.prototype.toString),Sg=typeof Symbol>"u"?null:ut(Symbol.prototype.toString),nt=ut(Object.prototype.hasOwnProperty),oo=ut(Object.prototype.toString),bt=ut(RegExp.prototype.test),ao=vM(TypeError);function ut(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 Uc(e,t,n)}}function vM(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vc(e,r)}}function Te(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:so;if(gg&&gg(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&&(lM(t)||(t[n]=s),i=s)}e[i]=!0}return e}function gM(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function kt(e){const t=Qi(null);for(const n of vg(e)){var r=oM(n,2);const i=r[0],s=r[1];nt(e,i)&&($t(s)?t[i]=gM(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=kt(s):t[i]=s)}return t}function yM(e){switch(typeof e){case"string":return e;case"number":return pM(e);case"boolean":return mM(e);case"bigint":return kg?kg(e):"0";case"symbol":return Sg?Sg(e):"Symbol()";case"undefined":return oo(e);case"function":case"object":{if(e===null)return oo(e);const t=e,r=Kr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:oo(n)}return oo(e)}default:return oo(e)}}function Kr(e,t){for(;e!==null;){const n=cM(e,t);if(n){if(n.get)return ut(n.get);if(typeof n.value=="function")return ut(n.value)}e=uM(e)}function r(){return null}return r}function bM(e){try{return bt(e,""),!0}catch{return!1}}var Eg=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"]),Bc=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"]),jc=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"]),_M=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"]),Zc=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"]),wM=Pt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tg=Pt(["#text"]),xg=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"]),Wc=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"]),Ag=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"]),Ha=Pt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kM=fr(/{{[\w\W]*|^[\w\W]*}}/g),SM=fr(/<%[\w\W]*|^[\w\W]*%>/g),EM=fr(/\${[\w\W]*/g),TM=fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),xM=fr(/^aria-[\-\w]+$/),Og=fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),AM=fr(/^(?:\w+script|data):/i),OM=fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),CM=fr(/^html$/i),DM=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},IM=function(){return typeof window>"u"?null:window},PM=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}},Cg=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Dg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:IM();const t=ve=>Dg(ve);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,h=Kr(u,"cloneNode"),f=Kr(u,"remove"),g=Kr(u,"nextSibling"),m=Kr(u,"childNodes"),v=Kr(u,"parentNode"),_=Kr(u,"shadowRoot"),E=Kr(u,"attributes"),A=o&&o.prototype?Kr(o.prototype,"nodeType"):null,T=o&&o.prototype?Kr(o.prototype,"nodeName"):null;if(typeof s=="function"){const ve=r.createElement("template");ve.content&&ve.content.ownerDocument&&(r=ve.content.ownerDocument)}let x,O="";const $=r,L=$.implementation,G=$.createNodeIterator,N=$.createDocumentFragment,se=$.getElementsByTagName,q=n.importNode;let oe=Cg();t.isSupported=typeof vg=="function"&&typeof v=="function"&&L&&L.createHTMLDocument!==void 0;const pe=kM,J=SM,Y=EM,Z=TM,z=xM,H=AM,K=OM,le=DM;let de=Og,F=null;const ue=Te({},[...Eg,...Bc,...jc,...Zc,...Tg]);let U=null;const ge=Te({},[...xg,...Wc,...Ag,...Ha]);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 Ye=!0,St=!0,Ge=!1,Xt=!0,ct=!1,Qt=!0,Et=!1,Mt=!1,er=!1,jt=!1,hr=!1,Dr=!1,Ir=!0,vn=!1;const Pr="user-content-";let pr=!0,Jr=!1,Xr={},_t=null;const Un=Te({},["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=Te({},["audio","video","img","source","image","track"]);let lo=null;const Hc=Te({},["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 Vn=mr,Gc=!1,Kc=null;const r2=Te({},[vi,ss,mr],qc);let Yc=Te({},["mi","mo","mn","ms","mtext"]),Jc=Te({},["annotation-xml"]);const n2=Te({},["title","style","font","a","script"]);let uo=null;const i2=["application/xhtml+xml","text/html"],s2="text/html";let st=null,os=null;const o2=r.createElement("form"),Fg=function(k){return k instanceof RegExp||k instanceof Function},Xc=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(os&&os===k)return;(!k||typeof k!="object")&&(k={}),k=kt(k),uo=i2.indexOf(k.PARSER_MEDIA_TYPE)===-1?s2:k.PARSER_MEDIA_TYPE,st=uo==="application/xhtml+xml"?qc:so,F=nt(k,"ALLOWED_TAGS")&&$t(k.ALLOWED_TAGS)?Te({},k.ALLOWED_TAGS,st):ue,U=nt(k,"ALLOWED_ATTR")&&$t(k.ALLOWED_ATTR)?Te({},k.ALLOWED_ATTR,st):ge,Kc=nt(k,"ALLOWED_NAMESPACES")&&$t(k.ALLOWED_NAMESPACES)?Te({},k.ALLOWED_NAMESPACES,qc):r2,lo=nt(k,"ADD_URI_SAFE_ATTR")&&$t(k.ADD_URI_SAFE_ATTR)?Te(kt(Hc),k.ADD_URI_SAFE_ATTR,st):Hc,ns=nt(k,"ADD_DATA_URI_TAGS")&&$t(k.ADD_DATA_URI_TAGS)?Te(kt(is),k.ADD_DATA_URI_TAGS,st):is,_t=nt(k,"FORBID_CONTENTS")&&$t(k.FORBID_CONTENTS)?Te({},k.FORBID_CONTENTS,st):Un,w=nt(k,"FORBID_TAGS")&&$t(k.FORBID_TAGS)?Te({},k.FORBID_TAGS,st):kt({}),Be=nt(k,"FORBID_ATTR")&&$t(k.FORBID_ATTR)?Te({},k.FORBID_ATTR,st):kt({}),Xr=nt(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?kt(k.USE_PROFILES):k.USE_PROFILES:!1,Ye=k.ALLOW_ARIA_ATTR!==!1,St=k.ALLOW_DATA_ATTR!==!1,Ge=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ct=k.SAFE_FOR_TEMPLATES||!1,Qt=k.SAFE_FOR_XML!==!1,Et=k.WHOLE_DOCUMENT||!1,jt=k.RETURN_DOM||!1,hr=k.RETURN_DOM_FRAGMENT||!1,Dr=k.RETURN_TRUSTED_TYPE||!1,er=k.FORCE_BODY||!1,Ir=k.SANITIZE_DOM!==!1,vn=k.SANITIZE_NAMED_PROPS||!1,pr=k.KEEP_CONTENT!==!1,Jr=k.IN_PLACE||!1,de=bM(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:Og,Vn=typeof k.NAMESPACE=="string"?k.NAMESPACE:mr,Yc=nt(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?kt(k.MATHML_TEXT_INTEGRATION_POINTS):Te({},["mi","mo","mn","ms","mtext"]),Jc=nt(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?kt(k.HTML_INTEGRATION_POINTS):Te({},["annotation-xml"]);const B=nt(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?kt(k.CUSTOM_ELEMENT_HANDLING):Qi(null);if(fe=Qi(null),nt(B,"tagNameCheck")&&Fg(B.tagNameCheck)&&(fe.tagNameCheck=B.tagNameCheck),nt(B,"attributeNameCheck")&&Fg(B.attributeNameCheck)&&(fe.attributeNameCheck=B.attributeNameCheck),nt(B,"allowCustomizedBuiltInElements")&&typeof B.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=B.allowCustomizedBuiltInElements),ct&&(St=!1),hr&&(jt=!0),Xr&&(F=Te({},Tg),U=Qi(null),Xr.html===!0&&(Te(F,Eg),Te(U,xg)),Xr.svg===!0&&(Te(F,Bc),Te(U,Wc),Te(U,Ha)),Xr.svgFilters===!0&&(Te(F,jc),Te(U,Wc),Te(U,Ha)),Xr.mathMl===!0&&(Te(F,Zc),Te(U,Ag),Te(U,Ha))),Pe.tagCheck=null,Pe.attributeCheck=null,nt(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Pe.tagCheck=k.ADD_TAGS:$t(k.ADD_TAGS)&&(F===ue&&(F=kt(F)),Te(F,k.ADD_TAGS,st))),nt(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Pe.attributeCheck=k.ADD_ATTR:$t(k.ADD_ATTR)&&(U===ge&&(U=kt(U)),Te(U,k.ADD_ATTR,st))),nt(k,"ADD_URI_SAFE_ATTR")&&$t(k.ADD_URI_SAFE_ATTR)&&Te(lo,k.ADD_URI_SAFE_ATTR,st),nt(k,"FORBID_CONTENTS")&&$t(k.FORBID_CONTENTS)&&(_t===Un&&(_t=kt(_t)),Te(_t,k.FORBID_CONTENTS,st)),nt(k,"ADD_FORBID_CONTENTS")&&$t(k.ADD_FORBID_CONTENTS)&&(_t===Un&&(_t=kt(_t)),Te(_t,k.ADD_FORBID_CONTENTS,st)),pr&&(F["#text"]=!0),Et&&Te(F,["html","head","body"]),F.table&&(Te(F,["tbody"]),delete w.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw ao('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ao('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=k.TRUSTED_TYPES_POLICY,O=x.createHTML("")}else x===void 0&&(x=PM(d,i)),x!==null&&typeof O=="string"&&(O=x.createHTML(""));(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&F===ue&&(F=kt(F)),oe.uponSanitizeAttribute.length>0&&U===ge&&(U=kt(U)),Pt&&Pt(k),os=k},Ng=Te({},[...Bc,...jc,..._M]),Rg=Te({},[...Zc,...wM]),a2=function(k){let B=v(k);(!B||!B.tagName)&&(B={namespaceURI:Vn,tagName:"template"});const he=so(k.tagName),Oe=so(B.tagName);return Kc[k.namespaceURI]?k.namespaceURI===ss?B.namespaceURI===mr?he==="svg":B.namespaceURI===vi?he==="svg"&&(Oe==="annotation-xml"||Yc[Oe]):!!Ng[he]:k.namespaceURI===vi?B.namespaceURI===mr?he==="math":B.namespaceURI===ss?he==="math"&&Jc[Oe]:!!Rg[he]:k.namespaceURI===mr?B.namespaceURI===ss&&!Jc[Oe]||B.namespaceURI===vi&&!Yc[Oe]?!1:!Rg[he]&&(n2[he]||!Ng[he]):!!(uo==="application/xhtml+xml"&&Kc[k.namespaceURI]):!1},$r=function(k){ts(t.removed,{element:k});try{v(k).removeChild(k)}catch{f(k)}},gi=function(k,B){try{ts(t.removed,{attribute:B.getAttributeNode(k),from:B})}catch{ts(t.removed,{attribute:null,from:B})}if(B.removeAttribute(k),k==="is")if(jt||hr)try{$r(B)}catch{}else try{B.setAttribute(k,"")}catch{}},Lg=function(k){let B=null,he=null;if(er)k="<remove></remove>"+k;else{const et=_g(k,/^[\r\n\t ]+/);he=et&&et[0]}uo==="application/xhtml+xml"&&Vn===mr&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const Oe=x?x.createHTML(k):k;if(Vn===mr)try{B=new c().parseFromString(Oe,uo)}catch{}if(!B||!B.documentElement){B=L.createDocument(Vn,"template",null);try{B.documentElement.innerHTML=Gc?O:Oe}catch{}}const $e=B.body||B.documentElement;return k&&he&&$e.insertBefore(r.createTextNode(he),$e.childNodes[0]||null),Vn===mr?se.call(B,Et?"html":"body")[0]:Et?B.documentElement:$e},zg=function(k){return G.call(k.ownerDocument||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ug=function(k){k.normalize();const B=G.call(k.ownerDocument||k,k,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let he=B.nextNode();for(;he;){let Oe=he.data;es([pe,J,Y],$e=>{Oe=rs(Oe,$e," ")}),he.data=Oe,he=B.nextNode()}},Ga=function(k){const B=T?T(k):null;return typeof B!="string"||st(B)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==E(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==A(k)||k.childNodes!==m(k)},co=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return A(k)===Yr.documentFragment}catch{return!1}},Ka=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return typeof A(k)=="number"}catch{return!1}};function gn(ve,k,B){es(ve,he=>{he.call(t,k,B,os)})}const Vg=function(k){let B=null;if(gn(oe.beforeSanitizeElements,k,null),Ga(k))return $r(k),!0;const he=st(k.nodeName);if(gn(oe.uponSanitizeElement,k,{tagName:he,allowedTags:F}),Qt&&k.hasChildNodes()&&!Ka(k.firstElementChild)&&bt(/<[/\w!]/g,k.innerHTML)&&bt(/<[/\w!]/g,k.textContent)||Qt&&k.namespaceURI===mr&&he==="style"&&Ka(k.firstElementChild)||k.nodeType===Yr.progressingInstruction||Qt&&k.nodeType===Yr.comment&&bt(/<[/\w]/g,k.data))return $r(k),!0;if(w[he]||!(Pe.tagCheck instanceof Function&&Pe.tagCheck(he))&&!F[he]){if(!w[he]&&Bg(he)&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he)))return!1;if(pr&&!_t[he]){const Oe=v(k),$e=m(k);if($e&&Oe){const et=$e.length;for(let Zt=et-1;Zt>=0;--Zt){const qn=h($e[Zt],!0);Oe.insertBefore(qn,g(k))}}}return $r(k),!0}return(A?A(k):k.nodeType)===Yr.element&&!a2(k)||(he==="noscript"||he==="noembed"||he==="noframes")&&bt(/<\/no(script|embed|frames)/i,k.innerHTML)?($r(k),!0):(ct&&k.nodeType===Yr.text&&(B=k.textContent,es([pe,J,Y],Oe=>{B=rs(B,Oe," ")}),k.textContent!==B&&(ts(t.removed,{element:k.cloneNode()}),k.textContent=B)),gn(oe.afterSanitizeElements,k,null),!1)},qg=function(k,B,he){if(Be[B]||Ir&&(B==="id"||B==="name")&&(he in r||he in o2))return!1;const Oe=U[B]||Pe.attributeCheck instanceof Function&&Pe.attributeCheck(B,k);if(!(St&&!Be[B]&&bt(Z,B))){if(!(Ye&&bt(z,B))){if(!Oe||Be[B]){if(!(Bg(k)&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,k)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(k))&&(fe.attributeNameCheck instanceof RegExp&&bt(fe.attributeNameCheck,B)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(B,k))||B==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he))))return!1}else if(!lo[B]){if(!bt(de,rs(he,K,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&k!=="script"&&wg(he,"data:")===0&&ns[k])){if(!(Ge&&!bt(H,rs(he,K,"")))){if(he)return!1}}}}}}return!0},l2=Te({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bg=function(k){return!l2[so(k)]&&bt(le,k)},jg=function(k){gn(oe.beforeSanitizeAttributes,k,null);const B=k.attributes;if(!B||Ga(k))return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0};let Oe=B.length;for(;Oe--;){const $e=B[Oe],et=$e.name,Zt=$e.namespaceURI,qn=$e.value,yn=st(et),Qc=qn;let vt=et==="value"?Qc:hM(Qc);if(he.attrName=yn,he.attrValue=vt,he.keepAttr=!0,he.forceKeepAttr=void 0,gn(oe.uponSanitizeAttribute,k,he),vt=he.attrValue,vn&&(yn==="id"||yn==="name")&&wg(vt,Pr)!==0&&(gi(et,k),vt=Pr+vt),Qt&&bt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,vt)){gi(et,k);continue}if(yn==="attributename"&&_g(vt,"href")){gi(et,k);continue}if(he.forceKeepAttr)continue;if(!he.keepAttr){gi(et,k);continue}if(!Xt&&bt(/\/>/i,vt)){gi(et,k);continue}ct&&es([pe,J,Y],Wg=>{vt=rs(vt,Wg," ")});const Zg=st(k.nodeName);if(!qg(Zg,yn,vt)){gi(et,k);continue}if(x&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Zt)switch(d.getAttributeType(Zg,yn)){case"TrustedHTML":vt=x.createHTML(vt);break;case"TrustedScriptURL":vt=x.createScriptURL(vt);break}if(vt!==Qc)try{Zt?k.setAttributeNS(Zt,et,vt):k.setAttribute(et,vt),Ga(k)?$r(k):bg(t.removed)}catch{gi(et,k)}}gn(oe.afterSanitizeAttributes,k,null)},Ya=function(k){let B=null;const he=zg(k);for(gn(oe.beforeSanitizeShadowDOM,k,null);B=he.nextNode();)if(gn(oe.uponSanitizeShadowNode,B,null),Vg(B),jg(B),co(B.content)&&Ya(B.content),(A?A(B):B.nodeType)===Yr.element){const Oe=_?_(B):B.shadowRoot;co(Oe)&&(as(Oe),Ya(Oe))}gn(oe.afterSanitizeShadowDOM,k,null)},as=function(k){const B=A?A(k):k.nodeType;if(B===Yr.element){const $e=_?_(k):k.shadowRoot;co($e)&&(as($e),Ya($e))}const he=m?m(k):k.childNodes;if(!he)return;const Oe=[];es(he,$e=>{ts(Oe,$e)});for(const $e of Oe)as($e);if(B===Yr.element){const $e=T?T(k):null;if(typeof $e=="string"&&st($e)==="template"){const et=k.content;co(et)&&as(et)}}};return t.sanitize=function(ve){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,he=null,Oe=null,$e=null;if(Gc=!ve,Gc&&(ve="<!-->"),typeof ve!="string"&&!Ka(ve)&&(ve=yM(ve),typeof ve!="string"))throw ao("dirty is not a string, aborting");if(!t.isSupported)return ve;if(Mt||Xc(k),t.removed=[],typeof ve=="string"&&(Jr=!1),Jr){const qn=T?T(ve):ve.nodeName;if(typeof qn=="string"){const yn=st(qn);if(!F[yn]||w[yn])throw ao("root node is forbidden and cannot be sanitized in-place")}if(Ga(ve))throw ao("root node is clobbered and cannot be sanitized in-place");as(ve)}else if(Ka(ve))B=Lg("<!---->"),he=B.ownerDocument.importNode(ve,!0),he.nodeType===Yr.element&&he.nodeName==="BODY"||he.nodeName==="HTML"?B=he:B.appendChild(he),as(he);else{if(!jt&&!ct&&!Et&&ve.indexOf("<")===-1)return x&&Dr?x.createHTML(ve):ve;if(B=Lg(ve),!B)return jt?null:Dr?O:""}B&&er&&$r(B.firstChild);const et=zg(Jr?ve:B);for(;Oe=et.nextNode();)Vg(Oe),jg(Oe),co(Oe.content)&&Ya(Oe.content);if(Jr)return ct&&Ug(ve),ve;if(jt){if(ct&&Ug(B),hr)for($e=N.call(B.ownerDocument);B.firstChild;)$e.appendChild(B.firstChild);else $e=B;return(U.shadowroot||U.shadowrootmode)&&($e=q.call(n,$e,!0)),$e}let Zt=Et?B.outerHTML:B.innerHTML;return Et&&F["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&bt(CM,B.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
|
|
85
|
+
`+Zt),ct&&es([pe,J,Y],qn=>{Zt=rs(Zt,qn," ")}),x&&Dr?x.createHTML(Zt):Zt},t.setConfig=function(){Xc(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Mt=!0},t.clearConfig=function(){os=null,Mt=!1},t.isValidAttribute=function(ve,k,B){return os||Xc({}),qg(st(ve),st(k),B)},t.addHook=function(ve,k){typeof k=="function"&&ts(oe[ve],k)},t.removeHook=function(ve,k){if(k!==void 0){const B=dM(oe[ve],k);return B===-1?void 0:fM(oe[ve],B,1)[0]}return bg(oe[ve])},t.removeHooks=function(ve){oe[ve]=[]},t.removeAllHooks=function(){oe=Cg()},t}var $M=Dg(),MM=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),FM=j('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),NM=j('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),RM=j("<option> </option>"),LM=j('<li><article><ul><li class="go-tickets-item-title"><!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>');function Ig(e,t){const r=mt();te(t,!0);const n=_=>{var E=MM(),A=V(E),T=M(A);P(A);var x=Q(A,2),O=M(x,!0);P(x),ae($=>{ne(T,`${s().product.event_title??""} - ${$??""}`),ne(O,s().product.title)},[()=>Us(s().time)]),S(_,E)},i=_=>{Tt();var E=zt();ae(()=>ne(E,s().product.title)),S(_,E)};let s=b(t,"item",7),o=b(t,"details",7),a=ee(void 0),l=ee(!1);const c=D(()=>s().product?.content?.reduction_reason),d=`go-ticket-info-${r}`;me(()=>{o().preCart.items.map(_=>_.quantity),Ue(()=>{I(a,C.capacityManager.capacity(C.cart,s(),o().preCart),!0)})});function u(_,E,A){_.quantity=parseInt(E.value)}let h=i;qs(s().product)&&(h=n);var f={get item(){return s()},set item(_){s(_),y()},get details(){return o()},set details(_){o(_),y()}},g=X(),m=V(g),v=_=>{var E=LM(),A=M(E),T=M(A),x=M(T),O=M(x);h(O),P(x);var $=Q(x,2),L=Y=>{var Z=FM(),z=M(Z);P(Z),ae(H=>{Ot(z,1,_r(["go-ticket-info-icon",p(l)&&"is-active"])),we(z,"aria-expanded",p(l)),we(z,"aria-controls",d),we(z,"aria-label",H)},[()=>C.t("ticket.list.additionalInfo")]),At("click",z,()=>I(l,!p(l))),S(Y,Z)};ce($,Y=>{p(c)&&Y(L)});var G=Q($,2);a_(G,()=>$M.sanitize(s().product.description),!0),P(G);var N=Q(G,2),se=Y=>{var Z=NM(),z=M(Z,!0);P(Z),ae(H=>{we(Z,"id",d),we(Z,"hidden",!p(l)),ne(z,H)},[()=>C.t(p(c))]),S(Y,Z)};ce(N,Y=>{p(c)&&Y(se)});var q=Q(N,2),oe=M(q,!0);P(q);var pe=Q(q,2),J=M(pe);Ve(J,21,()=>Lp(p(a).min,p(a).max),Y=>Y.value,(Y,Z)=>{var z=RM(),H=M(z,!0);P(z);var K={};ae(()=>{Rl(z,s().quantity===p(Z).value),ne(H,p(Z).label),K!==(K=p(Z).value)&&(z.value=(z.__value=p(Z).value)??"")}),S(Y,z)}),P(J),P(pe),P(T),P(A),P(E),ae(Y=>{Ot(A,1,_r(["go-tickets-item",p(a).bookedOut&&"is-booked-out"])),we(A,"data-testid",s().uuid),ne(oe,s().price_formatted),we(J,"aria-label",Y)},[()=>C.t("cart.content.table.edit")]),At("change",J,Y=>u(s(),Y.target,o()?.ticketSelectionDetails)),S(_,E)};return ce(m,_=>{p(a)&&!p(a).unavailable&&_(v)}),S(e,g),re(f)}zr(["click","change"]),ie(Ig,{item:{},details:{}},[],[],{mode:"open"});var zM=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 UM(e,t){te(t,!0);const r=zc(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?.preCart?.items.length&&p(n)?.preCart?.items.length>0);var s=X(),o=V(s),a=l=>{var c=zM(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=Q(h,2),m=M(g,!0);P(g);var v=Q(g,2),_=M(v,!0);P(v);var E=Q(v,2),A=M(E,!0);P(E),P(u),P(d);var T=Q(d,2);Ve(T,17,()=>p(n).preCart.items,x=>x.uuid,(x,O)=>{Ig(x,{get item(){return p(O)},get details(){return p(n)}})}),P(c),ae((x,O,$,L)=>{ne(f,x),ne(m,O),ne(_,$),ne(A,L)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),re()}customElements.define("go-ticket-segment-body",ie(UM,{},[],[]));function VM(e,t){te(t,!0);const r=zc(t.$$host),n=D(()=>r.value);Tt();var i=zt();ae(()=>ne(i,p(n)?.preCart.totalFormatted)),S(e,i),re()}customElements.define("go-ticket-segment-sum",ie(VM,{},[],[]));var qM=class{#e;get tsd(){return p(this.#e)}set tsd(e){I(this.#e,e)}#t=ee(Fe([]));get timeslots(){return p(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}this.timeslots=C.capacityManager.quotaManager.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(t=>({...t,startAt:t.timeSlot,timeFormatted:t.timeSlot.substring(11,16),available:t.capacity>0}))}},BM=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),jM=j('<ul data-testid="timeslots"></ul>');function ZM(e,t){te(t,!0);const r=[],n=new qM(mn(t.$$host));me(()=>{const d=n.tsd;if(!d)return;const u=d.filters,h=d.selectedDate;Ue(async()=>{d.timeslotTicketIds=[],u?.length&&h&&await Promise.all(u.map(f=>mi(f).loadTimeslots(d))),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)};me(()=>{const d=n.tsd;if(!d)return;const u=n.timeslots;if(u.length!==1)return;const h=u[0];h.available&&d.selectedTimeslot!==h.startAt&&(d.selectedTimeslot=h.startAt,i(t.$$host,h.startAt))});var o={details:n},a=X(),l=V(a),c=d=>{var u=jM();Ve(u,20,()=>n.timeslots,h=>h,(h,f)=>{const g=D(()=>f.totalCapacity===0),m=D(()=>!p(g)&&f.capacity===0),v=D(()=>p(g)||p(m)||!f.available),_=D(()=>n.tsd?.selectedTimeslot===f.startAt);var E=BM(),A=M(E),T=M(A),x=Q(T);No(x);var O;P(A),P(E),ae(()=>{Ot(E,1,_r({"go-timeslot":!0,"is-unavailable":p(g),"is-sold-out":p(m),"is-disabled":p(v),"is-selected":p(_)})),ne(T,`${f.timeFormatted??""} `),x.disabled=p(v),we(x,"aria-disabled",p(v)),O!==(O=f.startAt)&&(x.value=(x.__value=f.startAt)??"")}),At("change",x,s),S_(r,[],x,()=>(f.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),S(h,E)}),P(u),S(d,u)};return ce(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),S(e,a),re(o)}zr(["change"]),customElements.define("go-timeslots",ie(ZM,{},[],["details"]));var WM=class{#e=ee();get details(){return p(this.#e)}set details(e){I(this.#e,e,!0)}#t=ee(Fe(Qn(Vt())));get startAt(){return p(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=ee(void 0);get selected(){return p(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(Vt()))<0||this.dates[e.toString()]=="unavailable":e.compare(Qn(Vt()))<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)=>wt(t,e(this.params(r))),{})}ticketsDates(){const e=C.ticketsCalendar.bind(C);return this.fetchPeriod().reduce((t,r)=>wt(t,e(this.params(r))),{})}},HM=j("<!> <!> <!>",1),GM=j("<div> </div>"),Pg=j("<!> <!>",1),KM=j('<div data-calendar-wrapper=""><!></div>');function $g(e,t){te(t,!0);let r=b(t,"calendarClass",7),n=ee(void 0);const i=r();me(()=>{p(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=KM(),a=M(o);{const l=(c,d)=>{let u=()=>d?.().months,h=()=>d?.().weekdays;var f=Pg(),g=V(f);De(g,()=>nc,(v,_)=>{_(v,{children:(E,A)=>{var T=HM(),x=V(T);De(x,()=>oc,(L,G)=>{G(L,{class:"go-calendar-prev-button",children:(N,se)=>{Tt();var q=zt("Prev");S(N,q)},$$slots:{default:!0}})});var O=Q(x,2);De(O,()=>ic,(L,G)=>{G(L,{class:"go-calendar-heading"})});var $=Q(O,2);De($,()=>sc,(L,G)=>{G(L,{class:"go-calendar-next-button",children:(N,se)=>{Tt();var q=zt("Next");S(N,q)},$$slots:{default:!0}})}),S(E,T)},$$slots:{default:!0}})});var m=Q(g,2);Ve(m,17,u,Ur,(v,_)=>{var E=X(),A=V(E);De(A,()=>Xu,(T,x)=>{x(T,{class:"go-calendar-grid",children:(O,$)=>{var L=Pg(),G=V(L);De(G,()=>tc,(se,q)=>{q(se,{class:"go-calendar-grid-head",children:(oe,pe)=>{var J=X(),Y=V(J);De(Y,()=>to,(Z,z)=>{z(Z,{class:"go-calendar-grid-row",children:(H,K)=>{var le=X(),de=V(le);Ve(de,17,h,Ur,(F,ue,U,ge)=>{var fe=X(),w=V(fe);De(w,()=>rc,(Be,Pe)=>{Pe(Be,{children:(Ye,St)=>{var Ge=GM(),Xt=M(Ge,!0);P(Ge),ae(ct=>ne(Xt,ct),[()=>p(ue).slice(0,2)]),S(Ye,Ge)},$$slots:{default:!0}})}),S(F,fe)}),S(H,le)},$$slots:{default:!0}})}),S(oe,J)},$$slots:{default:!0}})});var N=Q(G,2);De(N,()=>Qu,(se,q)=>{q(se,{class:"go-calendar-grid-body",children:(oe,pe)=>{var J=X(),Y=V(J);Ve(Y,17,()=>p(_).weeks,Ur,(Z,z,H,K)=>{var le=X(),de=V(le);De(de,()=>to,(F,ue)=>{ue(F,{class:"go-calendar-grid-row",children:(U,ge)=>{var fe=X(),w=V(fe);Ve(w,17,()=>p(z),Ur,(Be,Pe,Ye,St)=>{var Ge=X(),Xt=V(Ge);De(Xt,()=>ec,(ct,Qt)=>{Qt(ct,{get date(){return p(Pe)},get month(){return p(_).value},class:"go-calendar-cell",children:(Et,Mt)=>{var er=X(),jt=V(er);{let hr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(p(Pe)),"is-disabled":r().isDateDisabled(p(Pe)),"is-selected":r().selected?.compare(p(Pe))===0}));De(jt,()=>Ju,(Dr,Ir)=>{Ir(Dr,{get class(){return p(hr)},children:(vn,Pr)=>{Tt();var pr=zt();ae(()=>ne(pr,p(Pe).day)),S(vn,pr)},$$slots:{default:!0}})})}S(Et,er)},$$slots:{default:!0}})}),S(Be,Ge)}),S(U,fe)},$$slots:{default:!0}})}),S(Z,le)}),S(oe,J)},$$slots:{default:!0}})}),S(O,L)},$$slots:{default:!0}})}),S(v,E)}),S(c,f)};De(a,()=>Jm,(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 P(o),xf(o,l=>I(n,l),()=>p(n)),S(e,o),re(s)}ie($g,{calendarClass:{}},[],["details"],{mode:"open"});function YM(e,t){te(t,!0);const r=new WM,n=r,i=mn(t.$$host),s=D(()=>i.value);me(()=>{r.details=p(s)}),t.$$host.addEventListener("go-date-select",d=>{p(s)&&(p(s).selectedDate=d.detail.selected,p(s).selectedTimeslot=void 0)});var o={details:n},a=X(),l=V(a),c=d=>{$g(d,{get calendarClass(){return r}})};return ce(l,d=>{p(s)?.isCalendarVisible&&d(c)}),S(e,a),re(o)}customElements.define("go-calendar",ie(YM,{},[],["details"]));var JM=class{#e;get ticketSelectionDetails(){return p(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 ft(n.product,{quantity:n.quantity,time:i})}));C.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Xe.config.urls.cart&&Xe.config.navigateTo(Xe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},XM=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function QM(e,t){te(t,!0);const r=new JM(mn(t.$$host));var n={details:r},i=XM(),s=M(i,!0);return P(i),ae((o,a,l)=>{i.disabled=o,we(i,"data-x",a),ne(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),At("click",i,()=>r.addToCart()),S(e,i),re(n)}zr(["click"]),customElements.define("go-add-to-cart-button",ie(QM,{},[],["details"]));function e2(e,t){te(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),re({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-withdrawal-form",ie(e2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function t2(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)try{await Mg[n.method](n.options)}catch(i){console.error(i)}e.go=Mg,t&&(t._queue=null)}var Mg={loaded:!0,config:e=>{Xe.define(e)},init:async e=>{await C.load("https://"+e.api,e.shop,e.locale)}};(async()=>await t2(window))()})();
|