@gomusdev/web-components 4.17.0 → 4.17.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.17.1 (2026-08-14)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **forms:** stop coercing text-field values to numbers in formData
8
+
3
9
  ## 4.17.0 (2026-08-12)
4
10
 
5
11
  ### Features
@@ -14963,14 +14963,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14963
14963
  set(this.#successMessage, value, true);
14964
14964
  }
14965
14965
  get formData() {
14966
- function coerce(x) {
14966
+ const numericTypes = [
14967
+ "select",
14968
+ "radio",
14969
+ "number",
14970
+ "paymentMode"
14971
+ ];
14972
+ function coerce(f) {
14973
+ const x = f.value;
14967
14974
  if (isNumber(x) || isBoolean(x)) return x;
14968
14975
  if (x === "true" || x === "false") return x === "true";
14969
- if (!Number.isNaN(+x) && x.trim() !== "") return +x;
14976
+ if (numericTypes.includes(f.type) && !Number.isNaN(+x) && x.trim() !== "") return +x;
14970
14977
  return x;
14971
14978
  }
14972
14979
  const validFields = this.fields.filter((f) => f !== void 0).filter((f) => f.type !== "file").filter((f) => f.value !== "");
14973
- return Object.fromEntries(validFields.map((f) => [f.apiKey, coerce(f.value)]));
14980
+ return Object.fromEntries(validFields.map((f) => [f.apiKey, coerce(f)]));
14974
14981
  }
14975
14982
  fieldValue(key) {
14976
14983
  return this.fields.find((f) => f.key === key)?.value;
@@ -14962,14 +14962,21 @@ var FormDetails = class {
14962
14962
  set(this.#successMessage, value, true);
14963
14963
  }
14964
14964
  get formData() {
14965
- function coerce(x) {
14965
+ const numericTypes = [
14966
+ "select",
14967
+ "radio",
14968
+ "number",
14969
+ "paymentMode"
14970
+ ];
14971
+ function coerce(f) {
14972
+ const x = f.value;
14966
14973
  if (isNumber(x) || isBoolean(x)) return x;
14967
14974
  if (x === "true" || x === "false") return x === "true";
14968
- if (!Number.isNaN(+x) && x.trim() !== "") return +x;
14975
+ if (numericTypes.includes(f.type) && !Number.isNaN(+x) && x.trim() !== "") return +x;
14969
14976
  return x;
14970
14977
  }
14971
14978
  const validFields = this.fields.filter((f) => f !== void 0).filter((f) => f.type !== "file").filter((f) => f.value !== "");
14972
- return Object.fromEntries(validFields.map((f) => [f.apiKey, coerce(f.value)]));
14979
+ return Object.fromEntries(validFields.map((f) => [f.apiKey, coerce(f)]));
14973
14980
  }
14974
14981
  fieldValue(key) {
14975
14982
  return this.fields.find((f) => f.key === key)?.value;
@@ -72,7 +72,7 @@ ${i}
72
72
 
73
73
  `)}h.write("payload.value = newResult;"),h.write("return payload;");const E=h.compile();return(S,T)=>E(p,S,T)};let a;const s=js,o=!Vs.jitless,c=o&&kw.value,f=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const y=p.value;return s(y)?o&&c&&h?.async===!1&&h.jitless!==!0?(a||(a=i(t.shape)),p=a(p,h),f?hh([],y,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),p)}});function ph(e,t,r,n){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const i=e.filter(a=>!Oi(a));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(a=>a.issues.map(s=>Qn(s,n,Yn())))}),t)}var uk=Q("$ZodUnion",(e,t)=>{ft.init(e,t),We(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),We(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),We(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),We(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=>iu(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 a=!1;const s=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(o=>ph(o,n,e,i)):ph(s,n,e,i)}}),ck=Q("$ZodIntersection",(e,t)=>{ft.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,a=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([o,l])=>mh(r,o,l)):mh(r,a,s)}});function uu(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(Pa(e)&&Pa(t)){const r=Object.keys(t),n=Object.keys(e).filter(a=>r.indexOf(a)!==-1),i={...e,...t};for(const a of n){const s=uu(e[a],t[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};i[a]=s.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],a=t[n],s=uu(i,a);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function mh(e,t,r){const n=new Map;let i;for(const o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of r.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const a=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(a.length&&i&&e.issues.push({...i,keys:a}),Oi(e))return e;const s=uu(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var dk=Q("$ZodEnum",(e,t)=>{ft.init(e,t);const r=Hf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Sw.has(typeof i)).map(i=>typeof i=="string"?Zs(i):i.toString()).join("|")})$`),e._zod.parse=(i,a)=>{const s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:e}),i}}),fk=Q("$ZodTransform",(e,t)=>{ft.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r.fallback=!0,r));if(i instanceof Promise)throw new Ci;return r.value=i,r.fallback=!0,r}});function vh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var gh=Q("$ZodOptional",(e,t)=>{ft.init(e,t),e._zod.optin="optional",e._zod.optout="optional",We(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${iu(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(s=>vh(s,i)):vh(a,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),hk=Q("$ZodExactOptional",(e,t)=>{gh.init(e,t),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),pk=Q("$ZodNullable",(e,t)=>{ft.init(e,t),We(e._zod,"optin",()=>t.innerType._zod.optin),We(e._zod,"optout",()=>t.innerType._zod.optout),We(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${iu(r.source)}|null)$`):void 0}),We(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)}),mk=Q("$ZodDefault",(e,t)=>{ft.init(e,t),e._zod.optin="optional",We(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(a=>yh(a,t)):yh(i,t)}});function yh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var vk=Q("$ZodPrefault",(e,t)=>{ft.init(e,t),e._zod.optin="optional",We(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))}),gk=Q("$ZodNonOptional",(e,t)=>{ft.init(e,t),We(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(a=>bh(a,e)):bh(i,e)}});function bh(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 yk=Q("$ZodCatch",(e,t)=>{ft.init(e,t),e._zod.optin="optional",We(e._zod,"optout",()=>t.innerType._zod.optout),We(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(a=>(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(s=>Qn(s,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(a=>Qn(a,n,Yn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),bk=Q("$ZodPipe",(e,t)=>{ft.init(e,t),We(e._zod,"values",()=>t.in._zod.values),We(e._zod,"optin",()=>t.in._zod.optin),We(e._zod,"optout",()=>t.out._zod.optout),We(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>Js(s,t.in,n)):Js(a,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>Js(a,t.out,n)):Js(i,t.out,n)}});function Js(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 _k=Q("$ZodReadonly",(e,t)=>{ft.init(e,t),We(e._zod,"propValues",()=>t.innerType._zod.propValues),We(e._zod,"values",()=>t.innerType._zod.values),We(e._zod,"optin",()=>t.innerType?._zod?.optin),We(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(_h):_h(i)}});function _h(e){return e.value=Object.freeze(e.value),e}var wk=Q("$ZodCustom",(e,t)=>{Zt.init(e,t),ft.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(a=>wh(a,r,n,e));wh(i,r,n,e)}});function wh(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(Ma(i))}}var kh,kk=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 Sk(){return new kk}(kh=globalThis).__zod_globalRegistry??(kh.__zod_globalRegistry=Sk());var $a=globalThis.__zod_globalRegistry;function Ek(e,t){return new e({type:"string",...ye(t)})}function xk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function Sh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function Tk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function Ak(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function Ck(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function Ok(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function Dk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function Ik(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function Pk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function Mk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function $k(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function Fk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function Nk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function Rk(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 zk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function qk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function Uk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function Bk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function Vk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function jk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function Zk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function Wk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function Hk(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 Kk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function Yk(e,t){return new e({type:"number",checks:[],...ye(t)})}function Jk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function Qk(e){return new e({type:"unknown"})}function Xk(e,t){return new e({type:"never",...ye(t)})}function Eh(e,t){return new oh({check:"less_than",...ye(t),value:e,inclusive:!1})}function cu(e,t){return new oh({check:"less_than",...ye(t),value:e,inclusive:!0})}function xh(e,t){return new lh({check:"greater_than",...ye(t),value:e,inclusive:!1})}function du(e,t){return new lh({check:"greater_than",...ye(t),value:e,inclusive:!0})}function Th(e,t){return new y0({check:"multiple_of",...ye(t),value:e})}function Ah(e,t){return new _0({check:"max_length",...ye(t),maximum:e})}function Qs(e,t){return new w0({check:"min_length",...ye(t),minimum:e})}function Ch(e,t){return new k0({check:"length_equals",...ye(t),length:e})}function eS(e,t){return new S0({check:"string_format",format:"regex",...ye(t),pattern:e})}function tS(e){return new E0({check:"string_format",format:"lowercase",...ye(e)})}function rS(e){return new x0({check:"string_format",format:"uppercase",...ye(e)})}function nS(e,t){return new T0({check:"string_format",format:"includes",...ye(t),includes:e})}function iS(e,t){return new A0({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function aS(e,t){return new C0({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Di(e){return new O0({check:"overwrite",tx:e})}function sS(e){return Di(t=>t.normalize(e))}function oS(){return Di(e=>e.trim())}function lS(){return Di(e=>e.toLowerCase())}function uS(){return Di(e=>e.toUpperCase())}function cS(){return Di(e=>ww(e))}function dS(e,t,r){return new e({type:"array",element:t,...ye(r)})}function fS(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function hS(e,t){const r=pS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ma(i,n.value,r._zod.def));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),a.continue??(a.continue=!r._zod.def.abort),n.issues.push(Ma(a))}},e(n.value,n)),t);return r}function pS(e,t){const r=new Zt({check:"custom",...ye(t)});return r._zod.check=e,r}function Oh(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??$a,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 xt(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const o=e._zod.toJSONSchema?.();if(o)s.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,c);else{const u=s.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),xt(f,t,c),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&It(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Dh(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 s of e.seen.entries()){const o=e.metadataRegistry.get(s[0])?.id;if(o){const l=n.get(o);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,s[0])}}const i=s=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,u=e.external.uri??(h=>h);if(f)return{ref:u(f)};const p=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(s[1]===r)return{ref:"#"};const l=`#/${o}/`,c=s[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},a=s=>{if(s[1].schema.$ref)return;const o=s[1],{ref:l,defId:c}=i(s);o.def={...o.schema},c&&(o.defId=c);const f=o.schema;for(const u in f)delete f[u];f.$ref=l};if(e.cycles==="throw")for(const s of e.seen.entries()){const o=s[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
74
74
 
75
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const o=s[1];if(t===s[0]){a(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){a(s);continue}}if(e.metadataRegistry.get(s[0])?.id){a(s);continue}if(o.cycle){a(s);continue}if(o.count>1&&e.reused==="ref"){a(s);continue}}}function Ih(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,f={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),y=h.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,f),o._zod.parent===u)for(const v in c)v==="$ref"||v==="allOf"||v in f||delete c[v];if(y.$ref&&h.def)for(const v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const y in c)y==="$ref"||y==="allOf"||y in h.def&&JSON.stringify(c[y])===JSON.stringify(h.def[y])&&delete c[y]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[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 o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;const s=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xs(t,"input",e.processors),output:Xs(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function It(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 It(n.element,r);if(n.type==="set")return It(n.valueType,r);if(n.type==="lazy")return It(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 It(n.innerType,r);if(n.type==="intersection")return It(n.left,r)||It(n.right,r);if(n.type==="record"||n.type==="map")return It(n.keyType,r)||It(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:It(n.in,r)||It(n.out,r);if(n.type==="object"){for(const i in n.shape)if(It(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(It(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(It(i,r))return!0;return!!(n.rest&&It(n.rest,r))}return!1}var mS=(e,t={})=>r=>{const n=Oh({...r,processors:t});return xt(e,n),Dh(n,e),Ih(n,e)},Xs=(e,t,r={})=>n=>{const{libraryOptions:i,target:a}=n??{},s=Oh({...i??{},target:a,io:t,processors:r});return xt(e,s),Dh(s,e),Ih(s,e)},vS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:a,maximum:s,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof s=="number"&&(i.maxLength=s),o&&(i.format=vS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const f=[...l];f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},yS=(e,t,r,n)=>{const i=r,{minimum:a,maximum:s,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof f=="number"&&f>=(a??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=f,i.exclusiveMinimum=!0):i.exclusiveMinimum=f:typeof a=="number"&&(i.minimum=a),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof s=="number"&&(i.maximum=s),typeof l=="number"&&(i.multipleOf=l)},bS=(e,t,r,n)=>{r.not={}},_S=(e,t,r,n)=>{},wS=(e,t,r,n)=>{const i=e._zod.def,a=Hf(i.entries);a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),r.enum=a},kS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},SS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ES=(e,t,r,n)=>{const i=r,a=e._zod.def,{minimum:s,maximum:o}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=xt(a.element,t,{...n,path:[...n.path,"items"]})},xS=(e,t,r,n)=>{const i=r,a=e._zod.def;i.type="object",i.properties={};const s=a.shape;for(const c in s)i.properties[c]=xt(s[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(s)),l=new Set([...o].filter(c=>{const f=a.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=xt(a.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},TS=(e,t,r,n)=>{const i=e._zod.def,a=i.inclusive===!1,s=i.options.map((o,l)=>xt(o,t,{...n,path:[...n.path,a?"oneOf":"anyOf",l]}));a?r.oneOf=s:r.anyOf=s},AS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=xt(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]]},CS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},OS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},DS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},IS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},PS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},MS=(e,t,r,n)=>{const i=e._zod.def,a=i.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?a?i.out:i.in:i.out;xt(s,t,n);const o=t.seen.get(e);o.ref=s},$S=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.readOnly=!0},Ph=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},FS=Q("ZodISODateTime",(e,t)=>{V0.init(e,t),Xe.init(e,t)});function NS(e){return Wk(FS,e)}var RS=Q("ZodISODate",(e,t)=>{j0.init(e,t),Xe.init(e,t)});function LS(e){return Hk(RS,e)}var zS=Q("ZodISOTime",(e,t)=>{Z0.init(e,t),Xe.init(e,t)});function qS(e){return Gk(zS,e)}var US=Q("ZodISODuration",(e,t)=>{W0.init(e,t),Xe.init(e,t)});function BS(e){return Kk(US,e)}var VS=(e,t)=>{eh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Fw(e,r)},flatten:{value:r=>$w(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get(){return e.issues.length===0}}})},hr=Q("ZodError",VS,{Parent:Error}),jS=su(hr),ZS=ou(hr),WS=Hs(hr),HS=Gs(hr),GS=Lw(hr),KS=zw(hr),YS=qw(hr),JS=Uw(hr),QS=Bw(hr),XS=Vw(hr),e1=jw(hr),t1=Zw(hr),Mh=new WeakMap;function Fa(e,t,r){const n=Object.getPrototypeOf(e);let i=Mh.get(n);if(i||(i=new Set,Mh.set(n,i)),!i.has(t)){i.add(t);for(const a in r){const s=r[a];Object.defineProperty(n,a,{configurable:!0,enumerable:!1,get(){const o=s.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var ht=Q("ZodType",(e,t)=>(ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xs(e,"input"),output:Xs(e,"output")}}),e.toJSONSchema=mS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>jS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>WS(e,r,n),e.parseAsync=async(r,n)=>ZS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>HS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>GS(e,r,n),e.decode=(r,n)=>KS(e,r,n),e.encodeAsync=async(r,n)=>YS(e,r,n),e.decodeAsync=async(r,n)=>JS(e,r,n),e.safeEncode=(r,n)=>QS(e,r,n),e.safeDecode=(r,n)=>XS(e,r,n),e.safeEncodeAsync=async(r,n)=>e1(e,r,n),e.safeDecodeAsync=async(r,n)=>t1(e,r,n),Fa(e,"ZodType",{check(...r){const n=this.def;return this.clone(Cn(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 On(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(W1(r,n))},superRefine(r,n){return this.check(H1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return Uh(this)},exactOptional(){return $1(this)},nullable(){return Bh(this)},nullish(){return Uh(Bh(this))},nonoptional(r){return q1(this,r)},array(){return zh(this)},or(r){return A1([this,r])},and(r){return O1(this,r)},transform(r){return jh(this,P1(r))},default(r){return R1(this,r)},prefault(r){return z1(this,r)},catch(r){return B1(this,r)},pipe(r){return jh(this,r)},readonly(){return Z1(this)},describe(r){const n=this.clone();return $a.add(n,{description:r}),n},meta(...r){if(r.length===0)return $a.get(this);const n=this.clone();return $a.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 $a.get(e)?.description},configurable:!0}),e)),$h=Q("_ZodString",(e,t)=>{lu.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>gS(e,n,i,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fa(e,"_ZodString",{regex(...n){return this.check(eS(...n))},includes(...n){return this.check(nS(...n))},startsWith(...n){return this.check(iS(...n))},endsWith(...n){return this.check(aS(...n))},min(...n){return this.check(Qs(...n))},max(...n){return this.check(Ah(...n))},length(...n){return this.check(Ch(...n))},nonempty(...n){return this.check(Qs(1,...n))},lowercase(n){return this.check(tS(n))},uppercase(n){return this.check(rS(n))},trim(){return this.check(oS())},normalize(...n){return this.check(sS(...n))},toLowerCase(){return this.check(lS())},toUpperCase(){return this.check(uS())},slugify(){return this.check(cS())}})}),r1=Q("ZodString",(e,t)=>{lu.init(e,t),$h.init(e,t),e.email=r=>e.check(xk(n1,r)),e.url=r=>e.check(Dk(i1,r)),e.jwt=r=>e.check(Zk(b1,r)),e.emoji=r=>e.check(Ik(a1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.uuid=r=>e.check(Tk(eo,r)),e.uuidv4=r=>e.check(Ak(eo,r)),e.uuidv6=r=>e.check(Ck(eo,r)),e.uuidv7=r=>e.check(Ok(eo,r)),e.nanoid=r=>e.check(Pk(s1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.cuid=r=>e.check(Mk(o1,r)),e.cuid2=r=>e.check($k(l1,r)),e.ulid=r=>e.check(Fk(u1,r)),e.base64=r=>e.check(Bk(v1,r)),e.base64url=r=>e.check(Vk(g1,r)),e.xid=r=>e.check(Nk(c1,r)),e.ksuid=r=>e.check(Rk(d1,r)),e.ipv4=r=>e.check(Lk(f1,r)),e.ipv6=r=>e.check(zk(h1,r)),e.cidrv4=r=>e.check(qk(p1,r)),e.cidrv6=r=>e.check(Uk(m1,r)),e.e164=r=>e.check(jk(y1,r)),e.datetime=r=>e.check(NS(r)),e.date=r=>e.check(LS(r)),e.time=r=>e.check(qS(r)),e.duration=r=>e.check(BS(r))});function Xt(e){return Ek(r1,e)}var Xe=Q("ZodStringFormat",(e,t)=>{Qe.init(e,t),$h.init(e,t)}),n1=Q("ZodEmail",(e,t)=>{$0.init(e,t),Xe.init(e,t)}),Fh=Q("ZodGUID",(e,t)=>{P0.init(e,t),Xe.init(e,t)}),eo=Q("ZodUUID",(e,t)=>{M0.init(e,t),Xe.init(e,t)}),i1=Q("ZodURL",(e,t)=>{F0.init(e,t),Xe.init(e,t)}),a1=Q("ZodEmoji",(e,t)=>{N0.init(e,t),Xe.init(e,t)}),s1=Q("ZodNanoID",(e,t)=>{R0.init(e,t),Xe.init(e,t)}),o1=Q("ZodCUID",(e,t)=>{L0.init(e,t),Xe.init(e,t)}),l1=Q("ZodCUID2",(e,t)=>{z0.init(e,t),Xe.init(e,t)}),u1=Q("ZodULID",(e,t)=>{q0.init(e,t),Xe.init(e,t)}),c1=Q("ZodXID",(e,t)=>{U0.init(e,t),Xe.init(e,t)}),d1=Q("ZodKSUID",(e,t)=>{B0.init(e,t),Xe.init(e,t)}),f1=Q("ZodIPv4",(e,t)=>{H0.init(e,t),Xe.init(e,t)}),h1=Q("ZodIPv6",(e,t)=>{G0.init(e,t),Xe.init(e,t)}),p1=Q("ZodCIDRv4",(e,t)=>{K0.init(e,t),Xe.init(e,t)}),m1=Q("ZodCIDRv6",(e,t)=>{Y0.init(e,t),Xe.init(e,t)}),v1=Q("ZodBase64",(e,t)=>{J0.init(e,t),Xe.init(e,t)}),g1=Q("ZodBase64URL",(e,t)=>{X0.init(e,t),Xe.init(e,t)}),y1=Q("ZodE164",(e,t)=>{ek.init(e,t),Xe.init(e,t)}),b1=Q("ZodJWT",(e,t)=>{rk.init(e,t),Xe.init(e,t)}),Nh=Q("ZodNumber",(e,t)=>{ch.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>yS(e,n,i,a),Fa(e,"ZodNumber",{gt(n,i){return this.check(xh(n,i))},gte(n,i){return this.check(du(n,i))},min(n,i){return this.check(du(n,i))},lt(n,i){return this.check(Eh(n,i))},lte(n,i){return this.check(cu(n,i))},max(n,i){return this.check(cu(n,i))},int(n){return this.check(Rh(n))},safe(n){return this.check(Rh(n))},positive(n){return this.check(xh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(Eh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Th(n,i))},step(n,i){return this.check(Th(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 Na(e){return Yk(Nh,e)}var _1=Q("ZodNumberFormat",(e,t)=>{nk.init(e,t),Nh.init(e,t)});function Rh(e){return Jk(_1,e)}var w1=Q("ZodUnknown",(e,t)=>{ik.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i)});function Lh(){return Qk(w1)}var k1=Q("ZodNever",(e,t)=>{ak.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i)});function S1(e){return Xk(k1,e)}var E1=Q("ZodArray",(e,t)=>{sk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.element=t.element,Fa(e,"ZodArray",{min(r,n){return this.check(Qs(r,n))},nonempty(r){return this.check(Qs(1,r))},max(r,n){return this.check(Ah(r,n))},length(r,n){return this.check(Ch(r,n))},unwrap(){return this.element}})});function zh(e,t){return dS(E1,e,t)}var x1=Q("ZodObject",(e,t)=>{lk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xS(e,r,n,i),We(e,"shape",()=>t.shape),Fa(e,"ZodObject",{keyof(){return D1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Lh()})},loose(){return this.clone({...this._zod.def,catchall:Lh()})},strict(){return this.clone({...this._zod.def,catchall:S1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Cw(this,r)},safeExtend(r){return Ow(this,r)},merge(r){return Dw(this,r)},pick(r){return Tw(this,r)},omit(r){return Aw(this,r)},partial(...r){return Iw(qh,this,r[0])},required(...r){return Pw(Vh,this,r[0])}})});function fu(e,t){return new x1({type:"object",shape:e??{},...ye(t)})}var T1=Q("ZodUnion",(e,t)=>{uk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.options=t.options});function A1(e,t){return new T1({type:"union",options:e,...ye(t)})}var C1=Q("ZodIntersection",(e,t)=>{ck.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>AS(e,r,n,i)});function O1(e,t){return new C1({type:"intersection",left:e,right:t})}var hu=Q("ZodEnum",(e,t)=>{dk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>wS(e,n,i,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const a={};for(const s of n)if(r.has(s))a[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})},e.exclude=(n,i)=>{const a={...t.entries};for(const s of n)if(r.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})}});function D1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var I1=Q("ZodTransform",(e,t)=>{fk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wf(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Ma(a,r.value,t));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Ma(s))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function P1(e){return new I1({type:"transform",transform:e})}var qh=Q("ZodOptional",(e,t)=>{gh.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Uh(e){return new qh({type:"optional",innerType:e})}var M1=Q("ZodExactOptional",(e,t)=>{hk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $1(e){return new M1({type:"optional",innerType:e})}var F1=Q("ZodNullable",(e,t)=>{pk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Bh(e){return new F1({type:"nullable",innerType:e})}var N1=Q("ZodDefault",(e,t)=>{mk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>DS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function R1(e,t){return new N1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var L1=Q("ZodPrefault",(e,t)=>{vk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>IS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function z1(e,t){return new L1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var Vh=Q("ZodNonOptional",(e,t)=>{gk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function q1(e,t){return new Vh({type:"nonoptional",innerType:e,...ye(t)})}var U1=Q("ZodCatch",(e,t)=>{yk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>PS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function B1(e,t){return new U1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var V1=Q("ZodPipe",(e,t)=>{bk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MS(e,r,n,i),e.in=t.in,e.out=t.out});function jh(e,t){return new V1({type:"pipe",in:e,out:t})}var j1=Q("ZodReadonly",(e,t)=>{_k.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$S(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Z1(e){return new j1({type:"readonly",innerType:e})}var Zh=Q("ZodCustom",(e,t)=>{wk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i)});function W1(e,t={}){return fS(Zh,e,t)}function H1(e,t){return hS(e,t)}function G1(e,t={}){const r=new Zh({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 K1=fu({id:Na(),customer:fu({customer_salutation_id:Na().positive({message:"user.fieldErrors.titleRequire"}),name:Xt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Xt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Xt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Xt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Xt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Xt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Xt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Na().positive().default(60),language_id:Na().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),xN=fu({ticket_sale_id:Na(),start_at:Xt().date(),personalizations:zh(K1)});function pu(e,t){return e-t*Math.floor(e/t)}var Wh=1721426;function to(e,t,r,n){t=mu(e,t);let i=t-1,a=-2;return r<=2?a=0:ro(t)&&(a=-1),Wh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+a+n)}function ro(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function Y1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var J1={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-Wh,n=Math.floor(r/146097),i=pu(r,146097),a=Math.floor(i/36524),s=pu(i,36524),o=Math.floor(s/1461),l=pu(s,1461),c=Math.floor(l/365),[f,u]=Y1(n*400+a*100+o*4+c+(a!==4&&c!==4?1:0)),p=t-to(f,u,1,1),h=2;t<to(f,u,3,1)?h=0:ro(u)&&(h=1);let y=Math.floor(((p+h)*12+373)/367);return new za(f,u,y,t-to(f,u,y,1)+1)}toJulianDay(e){return to(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return J1[ro(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ro(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"}},Q1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Dn(e,t){return t=tr(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vu(e,t){return t=tr(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function X1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function eE(e,t){return Dn(e,Pi(t))}var tE={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Hh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?tE[r]:oE(t),a=Math.ceil(n+1-i)%7;return a<0&&(a+=7),a}function rE(e){return Br(Date.now(),e)}function Pi(e){return cE(rE(e))}function Gh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function nE(e,t){return Kh(e)-Kh(t)}function Kh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,iE=!1;function er(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Yh(){return iE}function yu(e){return e.subtract({days:e.day-1})}function aE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Jh=new Map,bu=new Map;function sE(e){if(Intl.Locale){let r=Jh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Jh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function oE(e){let t=bu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return bu.set(e,t),t.firstDay}let r=sE(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&&Q1[r]||0};bu.set(e,t)}return t.firstDay}function In(e){return e=tr(e,new Ii),Qh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Qh(e,t,r,n,i,a,s){let o=new Date;return o.setUTCHours(n,i,a,s),o.setUTCFullYear(e,t-1,r),o.getTime()}function Ra(e,t){if(t==="UTC")return 0;if(e>0&&t===er()&&!Yh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:a,minute:s,second:o}=ep(e,t);return Qh(r,n,i,a,s,o,0)-Math.floor(e/1e3)*1e3}var Xh=new Map;function ep(e,t){let r=Xh.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"}),Xh.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let a of n)a.type!=="literal"&&(i[a.type]=a.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 no=864e5;function lE(e,t){let r=In(e);return tp(e,t,r-Ra(r-no,t),r-Ra(r+no,t))}function tp(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>uE(e,t,i))}function uE(e,t,r){let n=ep(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 Ur(e,t,r="compatible"){let n=Pn(e);if(t==="UTC")return In(n);if(t===er()&&r==="compatible"&&!Yh()){n=tr(n,new Ii);let l=new Date,c=mu(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=In(n),a=Ra(i-no,t),s=Ra(i+no,t),o=tp(n,t,i-a,i-s);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-a,i-s);case"compatible":case"later":return Math.max(i-a,i-s);case"reject":throw new RangeError("No such absolute time found")}}function rp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=Ra(e,t),n=new Date(e+r),i=n.getUTCFullYear(),a=n.getUTCMonth()+1,s=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),f=n.getUTCMilliseconds();return new Mn(i<1?"BC":"AD",i<1?-i+1:i,a,s,t,r,o,l,c,f)}function cE(e){return new za(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:a}=t),new Mi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,a)}function tr(e,t){if(X1(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,Xn(n),n}function dE(e,t,r){return e instanceof Mn?e.timeZone===t?e:np(e,t):Br(Ur(e,t,r),t)}function fE(e){let t=In(e)-e.offset;return new Date(t)}function np(e,t){return tr(Br(In(e)-e.offset,t),e.calendar)}var La=36e5;function io(e,t){let r=e.copy(),n="hour"in r?vE(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),ip(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,hE(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 s=r.calendar.isInverseEra?.(r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let a=r.calendar.getMonthsInYear(r);return r.month>a&&(r.month=a,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function _u(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wu(e){for(;e.month<1;)_u(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,_u(e,1)}function hE(e){for(;e.day<1;)e.month--,wu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wu(e)}function ip(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 Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),ip(e)}function ap(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function sp(e,t){return io(e,ap(t))}function ku(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),Xn(r),r}function ao(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),mE(r),r}function pE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=so(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=so(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=so(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=so(e.hour,24),t}function mE(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 so(e,t){let r=e%t;return r<0&&(r+=t),r}function vE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,pE(e)}function Su(e,t,r,n){let i=e.copy();switch(t){case"era":{let a=e.calendar.getEras(),s=a.indexOf(e.era);if(s<0)throw new Error("Invalid era: "+e.era);s=sn(s,r,0,a.length-1,n?.round),i.era=a[s],Xn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=sn(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=sn(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=sn(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),Xn(i),i}function op(e,t,r,n){let i=e.copy();switch(t){case"hour":{let a=e.hour,s=0,o=23;if(n?.hourCycle===12){let l=a>=12;s=l?12:0,o=l?23:11}i.hour=sn(a,r,s,o,n?.round);break}case"minute":i.minute=sn(e.minute,r,0,59,n?.round);break;case"second":i.second=sn(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=sn(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function sn(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function lp(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=Ur(io(Pn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=In(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,tr(Br(r,e.timeZone),e.calendar)}function gE(e,t){return lp(e,ap(t))}function yE(e,t,r,n){switch(t){case"hour":{let i=0,a=23;if(n?.hourCycle===12){let y=e.hour>=12;i=y?12:0,a=y?23:11}let s=Pn(e),o=tr(ao(s,{hour:i}),new Ii),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(y=>Br(y,e.timeZone).day===o.day)[0],c=tr(ao(s,{hour:a}),new Ii),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(y=>Br(y,e.timeZone).day===c.day).pop(),u=In(e)-e.offset,p=Math.floor(u/La),h=u%La;return u=sn(p,r,Math.floor(l/La),Math.floor(f/La),n?.round)*La+h,tr(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return op(e,t,r,n);case"era":case"year":case"month":case"day":return tr(Br(Ur(Su(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function bE(e,t,r){let n=Pn(e),i=ao(ku(n,t),t);return i.compare(n)===0?e:tr(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var _E=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,wE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,kE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Eu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,SE=["hours","minutes","seconds"],TN=["years","months","weeks","days",...SE];function oo(e){let t=e.match(_E);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new za(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function up(e){let t=e.match(wE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Be(t[1],-9999,9999),n=new Mi(r<1?"BC":"AD",r<1?-r+1:r,Be(t[2],1,12),1,t[4]?Be(t[4],0,23):0,t[5]?Be(t[5],0,59):0,t[6]?Be(t[6],0,59):0,t[7]?Be(t[7],0,1/0)*1e3:0);return n.day=Be(t[3],0,n.calendar.getDaysInMonth(n)),n}function cp(e,t){let r=e.match(kE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,r[11],0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);i.day=Be(r[3],0,i.calendar.getDaysInMonth(i));let a=Pn(i),s;if(r[8]){let o=Be(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+Be(r[9]??"0",0,59)*6e4+Be(r[10]??"0",0,59)*1e3),s=In(i)-i.offset,!lE(a,i.timeZone).includes(s))throw new Error(`Offset ${hp(i.offset)} is invalid for ${xu(i)} in ${i.timeZone}`)}else s=Ur(Pn(a),i.timeZone,t);return Br(s,i.timeZone)}function dp(e,t){let r=e.match(Eu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,t,0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);return i.day=Be(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Be(r[8],-23,23)*36e5+Be(r[9]??"0",0,59)*6e4),np(i,t)}function Be(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 EE(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 fp(e){let t=tr(e,new Ii),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function xu(e){return`${fp(e)}T${EE(e)}`}function hp(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),a=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function xE(e){return`${xu(e)}${hp(e.offset)}[${e.timeZone}]`}function Tu(e){let t=typeof e[0]=="object"?e.shift():new Ii,r;if(typeof e[0]=="string")r=e.shift();else{let s=t.getEras();r=s[s.length-1]}let n=e.shift(),i=e.shift(),a=e.shift();return[t,r,n,i,a]}var za=class ud{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,Xn(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toDate(t){return rp(this,t)}toString(){return fp(this)}compare(t){return Gh(this,t)}},Mi=class cd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(ao(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Su(this,t,r,n);default:return op(this,t,r,n)}}toDate(t,r){return rp(this,t,r)}toString(){return xu(this)}compare(t){let r=Gh(this,t);return r===0?nE(this,Pn(t)):r}},Mn=class dd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return lp(this,t)}subtract(t){return gE(this,t)}set(t,r){return bE(this,t,r)}cycle(t,r,n){return yE(this,t,r,n)}toDate(){return fE(this)}toString(){return xE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-dE(t,this.timeZone).toDate().getTime()}},Au=new Map,pr=class{constructor(e,t={}){this.formatter=pp(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 CE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=OE(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}},TE={true:{ja:"h11"},false:{}};function pp(e,t={}){if(typeof t.hour12=="boolean"&&AE()){t={...t};let i=TE[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Au.has(r))return Au.get(r);let n=new Intl.DateTimeFormat(e,t);return Au.set(r,n),n}var Cu=null;function AE(){return Cu==null&&(Cu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Cu}var Ou=null;function CE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function OE(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=pp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(a=>a.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")}var DE={dayMonth:{month:"numeric",day:"numeric"},short:{year:"numeric",month:"numeric",day:"numeric"}};function mp(e,t){const r=dp(e,"Europe/Berlin");return new pr(t,{timeZone:r.timeZone,hour:"numeric",minute:"numeric"}).format(r.toDate())}function IE(e,t,r){const n=dp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new pr(r,{timeZone:n.timeZone,...DE[t]}).format(n.toDate())}function lo(e){return e?.type==="Ticket"}function Vr(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function qa(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function Ua(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 Ba(e,t=""){return Bf(Object.values(e).map(r=>Ua(r,{selectedTime:t})),r=>r.shop_order)}function Du(e,t){const r=n=>Object.keys(n.total_capacities??{}).find(i=>(n.total_capacities?.[i]??0)>0);return Bf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>Ua(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Va(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 vp=e=>fr(Object.values(e.mantle?.composition??{}));function PE(e){const t=e.quantity??0;return Vr(e.product)?t*vp(e):t}function Iu(e,t,r,n){e.clearPrecart();let i=0;for(const a of[...r.items,...t.items]){if(!lo(a.product))continue;const s=PE(a);a===n&&(i=s),e.addPrecartItemQuantity(a.product.id,s)}return i}var ME=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!lo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},$E=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Vr(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.totalCapacity(i.id,i.selectedTime),c=vp(r),f=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,f),min:i.min_persons||0,bookedOut:f===0,unavailable:l===0}},FE=e=>Object.fromEntries(qa(e).map(t=>[t.id,t.max_persons]));function NE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Vr(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,a=r.quantity??0;let s=1/0;return a>0&&(Iu(e.quotaManager,t,n,r),s=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/a)),Object.fromEntries(qa(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+s)]))}function ja(e){return e?.type==="Event"}function RE(e){return ja(e)&&e.subtype==="scale"}function LE(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 Pu(e,t,r){return LE(e,t,r)}var zE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!ja(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,a=e.allSeats[i];if(!a)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const s=Math.min(a.max||100,a.max_per_registration||100,a.available??100),o={max_per_registration:s,available:100,overbook:!1,...a};let l=s;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=fr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-f-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},qE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function UE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+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=fr(r.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));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(a=>a.tickets.includes(r))),t&&(i=i.filter(a=>a.timeSlot===t)),n&&(i=i.filter(a=>a.timeSlot.startsWith(n))),i.flatMap(a=>a.tickets.map(s=>({timeslot:t,ticket:s,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(a=>a.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return eu(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(a=>a.timeSlot.startsWith(t.toString()));r&&(n=n.filter(a=>a.tickets.some(s=>r.includes(s))));const i=mw(n,a=>a.timeSlot);return Object.values(i).map(a=>vw(gw(a.flatMap(s=>s.tickets)).map(s=>eu(a.filter(o=>o.tickets.includes(s)),o=>o.capacity)).filter(s=>s!==null),s=>s.capacity)??a[0]).sort((a,s)=>a.timeSlot.localeCompare(s.timeSlot))}}}function BE(e){let t=0;wa(()=>{ve(()=>{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 et(e){let t;try{t=new Intl.NumberFormat(k.locale??"de",{style:"currency",currency:k.currency??"EUR"})}catch{t=new Intl.NumberFormat("de",{style:"currency",currency:"EUR"})}return t.format((e??0)/100)}function on(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}function gp(e){return e?.type==="Tour"}function yp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:VE(e)}}function VE(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function jE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:a,instanceKey:s,wire:o,...l}=e;return yp({...l,totalPriceCents:n},{instanceKey:s})}var ZE=0;function nt(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(qa(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${ZE++}`}),{...r,quantity:r.quantity??0,time:r.time??"",type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Vr(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),RE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),gp(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Vr(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),this.voucher?.code&&n.push(`voucher_code: ${this.voucher.code}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){const n="dynamic_prices"in this.product?this.product.dynamic_prices:null;return this.time&&n?.[this.time]!=null?n[this.time]:this.product.price_cents},get price_formatted(){return et(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return et(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return et(this.total_price_cents)}}}var AN=15*6e4;function uo(){return typeof window<"u"&&typeof localStorage<"u"}function WE(e,t){if(uo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Mu(e){if(!uo())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 bp(e){if(uo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function _p(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var wp="go-cart",co=(e,t,r)=>localStorage.setItem(wp,JSON.stringify({items:e,coupons:t,donations:r,savedAt:Date.now()}));function HE(e){const t=e.product.type;switch(t){case"Ticket":return $u(e)?nt(Ua(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle,voucher:e.voucher}):void 0;case"Event":return $u(e)?nt(Pu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return $u(e)?nt(jE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return nt(_p(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function GE(e){let t=[],r=[],n=[],i;try{const a=localStorage.getItem(wp);if(!a)return[];const s=JSON.parse(a);if(Array.isArray(s))t=s,r=[],n=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.donations||[],i=s.savedAt;else throw console.dir({parsed:s,content:a}),new Error("go-cart has invalid format");return typeof i=="number"&&Date.now()-i>9e5?(e.clearItems(),e.clearCoupons(),e.clearDonations(),co([],[],[]),[]):(t.length===0?e.clearItems():e.items=t.map(HE).filter(QE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.clearDonations(),n.forEach(o=>{typeof o?.value=="number"&&typeof o?.campaign_id=="number"&&e.addDonation({value:o.value,campaign_id:o.campaign_id})}),e.items)}catch(a){return console.error(a),co([],[],[]),[]}}function KE(e){GE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});co(e.items||[],e.coupons||[],e.donations||[]),wa(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});r!==t&&(t=r,co(e.items||[],e.coupons||[],e.donations||[]))})})}var YE=e=>new Date<new Date(e),JE=e=>oo(e.slice(0,10)).compare(Pi(er()))>=0,$u=e=>e.time?e.product.subtype==="day"?JE(e.time):YE(e.time):!0,QE=e=>e!==void 0,XE=0;function ei(e,t=20){const r=Pe([]),n=Pe([]),i=Pe([]);let a=se(void 0);const s={items:r,coupons:n,donations:i,get paymentModeId(){return d(a)},set paymentModeId(o){F(a,o,!0)},uid:`cart-${XE++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,fr(this.items,o=>o.total_price_cents)+this.donationCents)},get donationCents(){return fr(this.donations,o=>o.value)},get totalQuantity(){return fr(this.items,o=>o.quantity)},get valueVoucherCents(){return fr(this.coupons.filter(o=>o.kind==="valueVoucher"),o=>o.valueCents??0)},get amountToPayCents(){const o=fr(this.items,l=>l.total_price_cents);return Math.max(0,o-this.valueVoucherCents)+this.donationCents},toString(){return this.uid+" > ["+this.items.map(o=>o.uuid+":"+o.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(o=>({type:o.type,attributes:o.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??k.settings?.defaultPaymentModeId,coupons:this.coupons.map(o=>o.code),donations:this.donations.map(o=>({value:o.value,campaign_id:o.campaign_id})),affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return et(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let l=this.items.length-1;l>=0;l--)this.items[l].uuid===o.uuid&&this.items.splice(l,1);o?.voucher?.code&&!this.items.some(l=>l.voucher?.code===o.voucher.code)&&this.removeCoupon(o.voucher.code)},addItem(o){const l=this.items.find(c=>c.uuid===o.uuid);l?l.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(l=>this.addItem(l))},addCoupon(o){const l={...o,code:o.code.toUpperCase()};this.coupons.some(c=>c.code===l.code)||this.coupons.push(l)},removeCoupon(o){const l=o.toUpperCase(),c=this.coupons.findIndex(f=>f.code===l);if(c>-1){const[f]=this.coupons.splice(c,1);if(f.kind==="serviceVoucher")for(let u=this.items.length-1;u>=0;u--)this.items[u].voucher?.code===l&&this.items.splice(u,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()},hasDonation(o,l){return this.donations.some(c=>c.campaign_id===o&&c.value===l)},addDonation(o){this.hasDonation(o.campaign_id,o.value)||this.donations.push(o)},removeDonation(o,l){const c=this.donations.findIndex(f=>f.campaign_id===o&&f.value===l);c>-1&&this.donations.splice(c,1)},clearDonations(){for(;this.donations.length>0;)this.donations.pop()}};return e&&e.forEach(o=>s.addItem(nt(o))),s}function ex(){const e=Pe(ei());return KE(e),BE(e),e}var $i="go-capacity";function kp(e,t){const r=Mu($i);WE($i,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function Sp(e){const t=Mu($i);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){bp($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 tx(e){uo()&&window.addEventListener("storage",t=>{if(t.key===$i&&Sp(e),t.key==="go-cart"){const r=Mu("go-cart");(!r||!r.items||r.items.length===0)&&bp($i)}})}function Ep(){const e={allSeats:{},allQuotas:{},quotaManager:UE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&kp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&kp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Vr(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const a=t.product.subtype;switch(a){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),a={quotas:ME,mantle:$E,seats:zE,unlimited:qE}[i];if(!a)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>a(this,t,r,n))},subTicketMaxes(t,r,n){if(!Vr(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Re(()=>i==="mantle"?NE(this,t,r,n):FE(r.product))}};return Sp(e),tx(e),e}function xp(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 Tp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},rx=class extends Tp{constructor(){super()}get isLoggedIn(){try{const e=xp("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=xp("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}}},nx=class extends Tp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},ix=e=>{switch(e){case"angular":return new rx;case"jmb":return new nx;default:throw new Error("Unhandled shop type: "+e)}};function ax(e){return e==null||typeof e=="string"&&e.trim()===""}function sx(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||ax(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function ox(e,t){return sx(e,t)}var lx={withStackTrace:!1},Ap=(e,t,r=lx)=>({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(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?a(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Cp(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 jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Op(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(y){return Promise.resolve(y).then(h,u)}}function o(h,y){n[h]&&(i[h]=function(v){return new Promise(function(m,g){a.push([h,v,m,g])>1||l(h,v)})},y&&(i[h]=y(i[h])))}function l(h,y){try{c(n[h](y))}catch(v){p(a[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(a[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,y){h(y),a.shift(),a.length&&l(a[0][0],a[0][1])}}function ux(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,a){t[i]=e[i]?function(s){return(r=!r)?{value:jr(e[i](s)),done:!1}:a?a(s):s}:a}}function cx(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 Cp=="function"?Cp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,l){s=e[a](s),i(o,l,s.done,s.value)})}}function i(a,s,o,l){Promise.resolve(l).then(function(c){a({value:c,done:o})},s)}}var ri=class _r{constructor(t){this._promise=t}static fromSafePromise(t){return new _r(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new _r(t.then(n=>new Wr(n)).catch(n=>new Er(r(n))))}static fromThrowable(t,r){return(...n)=>new _r(ti(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Er(r?r(i):i)}}))}static combine(t){return dx(t)}static combineWithAllErrors(t){return fx(t)}map(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Er(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);const n=yield t(r.value);return n.isErr()?new Er(n.error):new Wr(r.value)})))}andTee(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Er(r.error)})))}mapErr(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Er(yield t(r.error))})))}andThen(t){return new _r(this._promise.then(r=>{if(r.isErr())return new Er(r.error);const n=t(r.value);return n instanceof _r?n._promise:n}))}orElse(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(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 Op(this,arguments,function*(){return yield jr(yield jr(yield*ux(cx(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Op(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(fo(r.error))),yield jr(r.value)})}};function fo(e){return new ri(Promise.resolve(new Er(e)))}var CN=ri.fromPromise,ON=ri.fromSafePromise,DN=ri.fromThrowable,Dp=e=>{let t=$n([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},dx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Dp),Ip=e=>{let t=$n([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},fx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Ip),Fu;(function(e){function t(i,a){return(...s)=>{try{return $n(i(...s))}catch(o){return Zr(a?a(o):o)}}}e.fromThrowable=t;function r(i){return Dp(i)}e.combine=r;function n(i){return Ip(i)}e.combineWithAllErrors=n})(Fu||(Fu={}));function $n(e){return new Wr(e)}function Zr(e){return new Er(e)}var Wr=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 Ap("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Er=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return fo(this.error)}asyncAndThrough(e){return fo(this.error)}asyncMap(e){return fo(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Ap("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},IN=Fu.fromThrowable,hx=/\{[^{}]+\}/g,px=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function mx(){return Math.random().toString(36).slice(2,11)}function vx(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:a,pathSerializer:s,headers:o,requestInitExt:l=void 0,...c}={...e};l=px()?l:void 0,t=Np(t);const f=[];async function u(p,h){const{baseUrl:y,fetch:v=n,Request:m=r,headers:g,params:E={},parseAs:S="json",querySerializer:T,bodySerializer:A=a??yx,pathSerializer:I,body:M,middleware:N=[],...j}=h||{};let R=t;y&&(R=Np(y)??t);let X=typeof i=="function"?i:$p(i);T&&(X=typeof T=="function"?T:$p({...typeof i=="object"?i:{},...T}));const U=I||s||gx,le=M===void 0?void 0:A(M,Fp(o,g,E.header)),he=Fp(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,g,E.header),H=[...f,...N],oe={redirect:"follow",...c,...j,body:le,headers:he};let W,fe,ce=new m(bx(p,{baseUrl:R,params:E,querySerializer:X,pathSerializer:U}),oe),de;for(const $ in j)$ in ce||(ce[$]=j[$]);if(H.length){W=mx(),fe=Object.freeze({baseUrl:R,fetch:v,parseAs:S,querySerializer:X,bodySerializer:A,pathSerializer:U});for(const $ of H)if($&&typeof $=="object"&&typeof $.onRequest=="function"){const ae=await $.onRequest({request:ce,schemaPath:p,params:E,options:fe,id:W});if(ae)if(ae instanceof m)ce=ae;else if(ae instanceof Response){de=ae;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!de){try{de=await v(ce,l)}catch($){let ae=$;if(H.length)for(let L=H.length-1;L>=0;L--){const be=H[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const G=await be.onError({request:ce,error:ae,schemaPath:p,params:E,options:fe,id:W});if(G){if(G instanceof Response){ae=void 0,de=G;break}if(G instanceof Error){ae=G;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ae)throw ae}if(H.length)for(let $=H.length-1;$>=0;$--){const ae=H[$];if(ae&&typeof ae=="object"&&typeof ae.onResponse=="function"){const L=await ae.onResponse({request:ce,response:de,schemaPath:p,params:E,options:fe,id:W});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const J=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||J==="0"&&!de.headers.get("Transfer-Encoding")?.includes("chunked"))return de.ok?{data:void 0,response:de}:{error:void 0,response:de};if(de.ok)return{data:await(async()=>{if(S==="stream")return de.body;if(S==="json"&&!J){const ae=await de.text();return ae?JSON.parse(ae):void 0}return await de[S]()})(),response:de};let ee=await de.text();try{ee=JSON.parse(ee)}catch{}return{error:ee,response:de}}return{request(p,h,y){return u(h,{...y,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");f.push(h)}},eject(...p){for(const h of p){const y=f.indexOf(h);y!==-1&&f.splice(y,1)}}}}function ho(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 Pp(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 o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const s=n.join(",");switch(r.style){case"form":return`${e}=${s}`;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return s}}for(const s in t){const o=r.style==="deepObject"?`${e}[${s}]`:s;n.push(ho(o,t[s],r))}const a=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${a}`:a}function Mp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",s=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(a);switch(r.style){case"simple":return s;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return`${e}=${s}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const a of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?a:encodeURIComponent(a)):i.push(ho(e,a,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function $p(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const a=r[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;n.push(Mp(i,a,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof a=="object"){n.push(Pp(i,a,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ho(i,a,e))}}return n.join("&")}}function gx(e,t){let r=e;for(const n of e.match(hx)??[]){let i=n.substring(1,n.length-1),a=!1,s="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(s="label",i=i.substring(1)):i.startsWith(";")&&(s="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Mp(i,o,{style:s,explode:a}));continue}if(typeof o=="object"){r=r.replace(n,Pp(i,o,{style:s,explode:a}));continue}if(s==="matrix"){r=r.replace(n,`;${ho(i,o)}`);continue}r=r.replace(n,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function yx(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 bx(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 Fp(...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,a]of n)if(a===null)t.delete(i);else if(Array.isArray(a))for(const s of a)t.append(i,s);else a!==void 0&&t.set(i,a)}return t}function Np(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function _x(e,t){return vx({baseUrl:e,headers:{"X-Shop-Url":t}})}var wx="/api/v4/calendar",kx="/api/v4/tickets/calendar",Sx="/api/v4/auth/validate_token",Ex="/api/v4/tickets/list_and_quotas",xx="/api/v4/tickets",Tx="/api/v4/auth/sign_in",Ax="/api/v4/auth",Cx="/api/v4/orders/withdrawals",Ox="/api/v4/customer/memberships/activate",Dx="/api/v4/orders",Ix="/api/v4/customer/customer_addresses",Px="/api/v4/customer/memberships",Rp={SHOP_GUEST:10,SHOP:20},po={error:{success:!1,errors:["Not signed in"]}},Lp=iw,Mx=class{type;#e=se(Pe({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"),d(this.#e).urls=sw(this.type),d(this.#e).currentUser=ix(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",tw(d(this.#e).locale),this.#t={},d(this.#e).client=_x(e,t),d(this.#e).capacityManager=Ep(),d(this.#e).cart=ex(),d(this.#e).auth=new jf,d(this.#e).client.use(new bw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Ep()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new jf),d(this.#e).auth}get currentUser(){return d(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return d(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{...Lp[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Lp.en,...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 d(this.#e).apiUrl}get shopDomain(){return d(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return d(this.#e).locale??"de"}formatTime(e){return mp(e,this.locale)}formatDate(e,t){return IE(e,t,this.locale)}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return d(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(Sx,"getCustomer","",{cache:5}):po}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(Dx,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):po}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(Ix,"customerAddresses","",{cache:5}):po}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(Px,"customerMemberships","",{cache:5}):po}ticketsCalendar(e){return this.fetchAndCache(kx,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(wx,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(Ex,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:jt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(xx,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:jt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:jt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(Tx,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=jt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Rp.SHOP_GUEST:Rp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(Ax,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(Cx,{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:jt({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"]})}setNewPassword(e,t){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["password","password_confirmation"],params:{header:t}})}activateMembership(e){return this.apiPost(Ox,{body:e,requiredFields:["email"],parseAs:"text"})}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}}})}#n(e,t,r={}){return e+JSON.stringify(t)+JSON.stringify(r)}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#a())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,a=this.#n(e,i,n.path),s=!this.#t[a],o=this.#t[a]?.fetchedAt<Date.now()-n.cache*1e3;return(s||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(d(this.#e)[t]=r===""?l:l[r])}),d(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",{cache:0})}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 d(this.#e).urls}get#i(){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:jt(this.#i,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:a}=t,s=ox(r,i);if(Object.keys(s).length>0)return{error:{errors:s}};const o=this.client[t.method];return await o(e,{body:r,params:jt(this.#i,{params:n}).params,parseAs:a})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await uw(10)}async apiGet(e,t={},r){this.#s();const n=this.#n(e,t,r);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#i;t&&(i=jt(i,{params:{query:t}})),e&&(i=jt(i,{params:{path:r}}));const a=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},a.data||a}#a=()=>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.#a())throw new Error("Fetch is not possible.")}},k=new Mx;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 $x=class _y{host;KEY;pollDuration;#e=se(Pe({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 _y(null,null);return r.value=t,r}load(){Ql(()=>(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 d(this.#e).value}set value(t){d(this.#e).value=t}};function Ni(e){return function(t,r={pollDuration:1e3}){if(t){const n=new $x(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 Fx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0,quantityStepperAtMinimum:"remove"},Nx=class{defaultConfig=jt(Fx,window.customOptions);override=this.defaultConfig;#e=se(Pe(this.defaultConfig));get options(){return d(this.#e)}set options(e){F(this.#e,e,!0)}constructor(){this.update()}update(){const e=jt(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=jt(this.override,e),this.update(),this}default(e){return this.defaultConfig=jt(this.defaultConfig,e),this.update(),this}},Ge=new Nx,zp=class{#e=se();get token(){return d(this.#e)}set token(e){F(this.#e,e,!0)}#t=se();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){F(this.#t,e,!0)}get order(){if(this.token)return pl(k.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return pl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Ge.config.urls.annualTicketPersonalizationForm?Ge.config.urls.annualTicketPersonalizationForm(this.token,e.id):k.urls.annualTicketPersonalizationForm(this.token,e.id)}},qp="go-annual-ticket-personalization",Up=Fi(qp),Rx=Ni(qp),Lx=q("<li><a> </a></li>"),zx=q('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function qx(e,t){te(t,!0);let r=_(t,"token",7);const n=new zp;Up(t.$$host,n),ve(()=>{n.token=r()});let i=P(()=>n.order);var a={details:n,get token(){return r()},set token(c){r(c),b()}},s=ie(),o=B(s),l=c=>{var f=ie(),u=B(f);Me(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var y=zx(),v=D(y),m=D(v,!0);C(v);var g=V(v,2),E=D(g,!0);C(g);var S=V(g,2),T=A=>{var I=Lx(),M=D(I),N=D(M,!0);C(M),C(I),Y((j,R)=>{pe(M,"href",j),Z(N,R)},[()=>n.goToPersonalization(d(h)),()=>k.t("ticket.annual.personalization.list.personalize.add")]),x(A,I)};ue(S,A=>{d(h).status=="not_ready_to_send"&&A(T)}),C(y),Y(A=>{pe(y,"data-ticket-sale-id",d(h).id),Z(m,d(h).title),Z(E,A)},[()=>k.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),x(p,y)}),x(c,f)};return ue(o,c=>{d(i)&&c(l)}),x(e,s),re(a)}customElements.define("go-annual-ticket-personalization",ne(qx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var Ux={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>k.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:Xt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Xt().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:Xt().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:()=>k.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:()=>(k.locales??[]).map(e=>({label:k.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:Xt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Xt().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:()=>(k.payment_modes?Object.values(k.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function Bx(e,t){return{...e,errors:e.errors||[],value:e.value??Vx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){jx(this)}}}function Vx(e){return e==="checkbox"?!1:e==="file"?null:""}function jx(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 Pt=class nl{static#e={};static defineForm(t){Ge.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Ge.default({fields:t})}static{nl.defineFields(Ux)}static setRequiredApiKeys(t,r){nl.#e[t]=r}static getFormOptions(t){return Ge.config.forms[t]}static createField(t,r){const n=nl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return Bx(n,r)}static getFormFields(t){return Zx(t)}static getFieldInit(t){return Ge.config.fields[t]}};function Zx(e){const t=Ge.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 Nu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function Wx(e,t){te(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const a=new zp;Up(t.$$host,a),ve(()=>{a.token=r(),a.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function s(){if(!i)return;const v=a.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),g=Vf(v,(I,M)=>{const N=m[M-1].details;return I.push(N),I},[]);if(g.forEach(I=>{I.fields.forEach(M=>{I.validateField(M)})}),!Vf(v,(I,M)=>g[M-1].isValid,!1))return;if(a.ticketSale?.photo_mandatory==="mandatory"){const I=g.map(async(N,j)=>{const R=a.ticketSale.personalizations[j].id,X=N.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const U=await k.uploadPersonalizationPhoto(r(),R,X);return U.error?{ok:!1,error:U.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),M=(await Promise.all(I)).find(N=>!N.ok);if(M){i.details.apiErrors=[M.error];return}}const E={personalization:{ticket_sale_id:a.ticketSaleId,start_at:i.details.formData.start_at,personalizations:g.map((I,M)=>{const N=yw(I.formData,["email_confirmation"]);return{id:a.ticketSale?.personalizations[M].id,customer:N}})}},S=await k.finalizePersonalizations(r(),E);if(S.error){i.details.apiErrors=S.error.error?[S.error.error]:[];return}const T=Ge.config.forms.personalization?.beforeSubmit;T&&T(E);const A=Ge.config.urls.annualTicketPersonalizationFormSubmit?.(r());A&&Ge.config.navigateTo(A)}let o=null,l=null,c=null,f=0;function u(v){v.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(v){if(!p()||!o||!l||!c)return;const m=o.parentElement;if(!m)return;const g=Math.max(v,1),E=Array.from(m.querySelectorAll("go-personalization-form"));for(;E.length<g;){const T=l.cloneNode(!0);u(T),m.insertBefore(T,c),E.push(T)}for(;E.length>g;){const T=E.pop();T&&T!==o&&T.remove()}const S=a.ticketSale?.personalizations??[];E.forEach((T,A)=>{const I=S[A];I&&(T.dataset.personalizationId=String(I.id))}),f=g}En(()=>{p(),t.$$host.addEventListener("go-submit",s),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!a.ticketSale)return;const v=a.ticketSale?.personalizations.length??1;v!==f&&h(v)});var y={details:a,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return re(y)}customElements.define("go-annual-ticket-personalization-form",ne(Wx,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var Hx=class{formId;form;#e=se(Pe([]));#t=P(()=>Nu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){F(this.#t,e)}#r=se();get successMessage(){return d(this.#r)}set successMessage(e){F(this.#r,e,!0)}get formData(){function e(r){return hw(r)||cw(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 d(this.#e)}set apiErrors(e){if(F(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),Xl(e)){F(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&F(this.#e,e.errors,!0),fw(e.error)){F(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(a=>a.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(a=>a.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}},Bp="go-form-details",Gx=Fi(Bp),Ri=Ni(Bp);function Hr(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(([s,o])=>{typeof o=="boolean"?o&&i.setAttribute(s,""):i.setAttribute(s,o)});const a=document.createDocumentFragment();for(;e.firstChild;)a.appendChild(e.firstChild);return i.appendChild(a),e.replaceChildren(i),i}var Kx=q("<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 Yx(e,t){te(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new Hx(r(),t.$$host);Gx(t.$$host,i);async function a(f){f.preventDefault(),f.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",f)),i.isValid&&(i.apiErrors={},i.successMessage=void 0,i?.form?.dispatchEvent(new Event("go-submit",f)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}En(()=>{const f=Hr(t.$$host,"form",{novalidate:!0});f.addEventListener("submit",a),i.form=f});var s={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=ie(),l=B(o),c=f=>{var u=Kx(),p=B(u),h=V(p,2),y=V(h,2),v=D(y,!0);C(y),Y(m=>Z(v,m),[()=>k.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),x(f,u)};return ue(l,f=>{n()||f(c)}),x(e,o),re(s)}customElements.define("go-form",ne(Yx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Jx=q("<go-form></go-form>",2);function Qx(e,t){te(t,!0);let r=_(t,"custom",7,!1),n=_(t,"redirectUrl",7,"");Pt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function i(o){const l=o.target.details,c=l.formData,f=await k.passwordReset(n()?{...c,redirect_url:n()}:c);f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=f.data.message,l.apiErrors=[]):l.apiErrors=f.error.errors}var a={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},s=Jx();return Tn(s,"formId","passwordReset"),Y(()=>Tn(s,"custom",r())),Ta("submit",s,i),x(e,s),re(a)}customElements.define("go-password-reset",ne(Qx,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var Xx=q("<go-form></go-form>",2);function eT(e,t){te(t,!0);let r=_(t,"accessToken",7,""),n=_(t,"client",7,""),i=_(t,"uid",7,"");Pt.defineForm({id:"setPassword",submitLabel:"user.passwordReset.actions.resetPassword",fields:[{key:"newPassword",required:!0},{key:"confirmPassword",required:!0}]});async function a(l){const c=l.target.details,f=await k.setNewPassword(c.formData,{"access-token":r(),client:n(),uid:i()});f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),c.successMessage=f.data.message,c.apiErrors=[]):c.apiErrors=f.error.errors}var s={get accessToken(){return r()},set accessToken(l=""){r(l),b()},get client(){return n()},set client(l=""){n(l),b()},get uid(){return i()},set uid(l=""){i(l),b()}},o=Xx();return Tn(o,"formId","setPassword"),Ta("submit",o,a),x(e,o),re(s)}customElements.define("go-set-password",ne(eT,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function tT(e,t){te(t,!0),Pt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const a=i.target.details,s=await k.signIn(a.formData);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(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),b()}})}customElements.define("go-sign-in",ne(tT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function rT(e,t){te(t,!0);let r=_(t,"custom",7,!1);Pt.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 a=i.target.details,s=await k.signUp(a.formData,!1);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(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),b()}})}customElements.define("go-sign-up",ne(rT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function nT(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 iT(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function aT(e){return nT(iT(e),0)}function sT(e,t){const r=ei(),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)})),e.donations.forEach(i=>r.addDonation(i)),t.forEach(i=>{const a=i.attributes,s=a.uuid,o=e.items.find(l=>l.uuid===s);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:a});return}r.addItem(oT(o,a))}),r}function oT(e,t){const r=gp(e.product)?1:aT(t),n=e.price_cents,i=e.product.price_cents===0?0:t.price_cents??n,a=i<n,s={...e.product,price_cents:i};return"dynamic_prices"in s&&(s.dynamic_prices=null),nt(s,{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:a,reference_uuid:e.uuid,originalPrice:n}})}var lT=class{#e=se();get displayCart(){return d(this.#e)}set displayCart(e){F(this.#e,e,!0)}#t=se(!1);get preview(){return d(this.#t)}set preview(e){F(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return k.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=k.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await k.createCart({items:t,coupons:r});if(n?.data){this.displayCart=sT(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}}},Vp="go-cart-details",uT=Fi(Vp),Li=Ni(Vp),cT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function jp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(s){r(s),b()}},i=cT(),a=D(i,!0);return C(i),Y(()=>Z(a,r().product.title)),x(e,i),re(n)}ne(jp,{cartItem:{}},[],[],{mode:"open"});var dT=q('<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),fT=q('<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 Zp(e,t){te(t,!0);let r=_(t,"cartItem",7);if(!ja(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},a=fT(),s=B(a),o=D(s),l=D(o,!0);C(o);var c=V(o),f=D(c,!0);C(c),C(s);var u=V(s),p=h=>{var y=dT(),v=B(y),m=D(v,!0);C(v);var g=V(v),E=D(g,!0);C(g),Y((S,T)=>{Z(m,S),Z(E,T)},[()=>k.formatDate(r().time,"dayMonth"),()=>k.formatTime(r().time)]),x(h,y)};return ue(u,h=>{r().time&&h(p)}),Y(()=>{Z(l,n.event_title),Z(f,n.title)}),x(e,a),re(i)}ne(Zp,{cartItem:{}},[],[],{mode:"open"});var hT=q('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),pT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),mT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),vT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function Wp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=vT(),a=B(i),s=D(a,!0);C(a);var o=V(a,2),l=p=>{var h=hT(),y=D(h,!0);C(h),Y(()=>Z(y,r().product.sub_title)),x(p,h)},c=P(()=>lo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=mT(),y=B(h),v=D(y,!0);C(y);var m=V(y,2),g=E=>{var S=pT(),T=D(S,!0);C(S),Y(A=>Z(T,A),[()=>k.formatTime(r().time)]),x(E,S)};ue(m,E=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&E(g)}),Y(E=>Z(v,E),[()=>k.formatDate(r().time,"dayMonth")]),x(p,h)};return ue(f,p=>{r().time&&p(u)}),Y(()=>Z(s,r().product.title)),x(e,i),re(n)}ne(Wp,{cartItem:{}},[],[],{mode:"open"});var gT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),yT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),bT=q('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),_T=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Hp(e,t){te(t,!0);let r=_(t,"cartItem",7);const n=P(()=>r().product),i=P(()=>{if(!r().time)return null;try{return{date:k.formatDate(r().time,"short"),time:k.formatTime(r().time)}}catch{return{date:r().time,time:""}}}),a=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),s=P(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=_T(),c=B(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u,!0);C(u);var h=V(u,2),y=m=>{var g=yT(),E=B(g),S=D(E,!0);C(E);var T=V(E,2),A=I=>{var M=gT(),N=D(M,!0);C(M),Y(()=>Z(N,d(i).time)),x(I,M)};ue(T,I=>{d(i).time&&I(A)}),Y(()=>Z(S,d(i).date)),x(m,g)};ue(h,m=>{d(i)&&m(y)});var v=V(h,2);return Me(v,17,()=>d(s),([m,g])=>m,(m,g)=>{var E=P(()=>nb(d(g),2));let S=()=>d(E)[0],T=()=>d(E)[1];var A=bT(),I=D(A);C(A),Y(M=>Z(I,`${S()??""}: ${M??""}`),[()=>a(T())]),x(m,A)}),Y(m=>{Z(f,d(n).title),Z(p,m)},[()=>k.t("cart.item.participants",{count:d(n).participants})]),x(e,l),re(o)}ne(Hp,{cartItem:{}},[],[],{mode:"open"});function Gp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function wT(e,{min:t,floor:r=0}){return e<=t?r:e-1}function kT(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function ST(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Kp(e,t){return Gp(e,t)>e}function Yp(e,{floor:t=0}){return e>t}var ET=q('<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Jp(e,t){const r=vt();te(t,!0);let n=_(t,"value",7),i=_(t,"min",7),a=_(t,"max",7),s=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),f=_(t,"onDecrementBelowMin",7),u=_(t,"removeAriaLabel",7),p=_(t,"removeLabel",7,"✕"),h=_(t,"onChange",7);const y=P(()=>f()!=null),v=P(()=>Math.max(i(),1)),m=P(()=>d(y)?{min:d(v),max:a(),floor:d(v)}:{min:i(),max:a(),floor:s()}),g=P(()=>d(y)&&n()<=d(v));let E,S=se(!1);const T=P(()=>!d(g)&&!Yp(n(),d(m))),A=P(()=>!Kp(n(),d(m)));function I(J){J!==n()&&h()(J)}function M(){d(g)?f()():N()}function N(){Yp(n(),d(m))&&I(wT(n(),d(m)))}function j(){Kp(n(),d(m))&&I(Gp(n(),d(m)))}function R(){const J=parseInt(E.value,10);if(d(y)&&(!Number.isFinite(J)||J<=0)){F(S,!1),E.value=String(n()),f()();return}const ee=kT(J,d(m));F(S,!1),E.value=String(ee),I(ee)}function X(){const J=E.value.trim();F(S,!(/^\d+$/.test(J)&&ST(parseInt(J,10),d(m))))}function U(J){switch(J.key){case"ArrowUp":J.preventDefault(),j();break;case"ArrowDown":J.preventDefault(),N();break;case"Home":J.preventDefault(),I(d(m).floor);break;case"End":J.preventDefault(),I(a());break;case"Enter":J.preventDefault(),R();break}}var le={get value(){return n()},set value(J){n(J),b()},get min(){return i()},set min(J){i(J),b()},get max(){return a()},set max(J){a(J),b()},get floor(){return s()},set floor(J=0){s(J),b()},get label(){return o()},set label(J){o(J),b()},get decreaseLabel(){return l()},set decreaseLabel(J){l(J),b()},get increaseLabel(){return c()},set increaseLabel(J){c(J),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(J){f(J),b()},get removeAriaLabel(){return u()},set removeAriaLabel(J){u(J),b()},get removeLabel(){return p()},set removeLabel(J="✕"){p(J),b()},get onChange(){return h()},set onChange(J){h(J),b()}},he=ET(),H=D(he);let oe;var W=D(H),fe=D(W,!0);C(W),C(H);var ce=V(H,2);Ai(ce),Us(ce,J=>E=J,()=>E);var de=V(ce,2);return C(he),Y(()=>{pe(he,"aria-label",o()),oe=Et(H,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(g)}),pe(H,"title",d(g)?u():l()),pe(H,"aria-controls",r),pe(H,"aria-disabled",d(T)),Z(fe,d(g)?p():"−"),pe(ce,"id",r),pe(ce,"aria-label",o()),Bl(ce,n()),pe(ce,"aria-valuenow",n()),pe(ce,"aria-valuemin",d(m).floor),pe(ce,"aria-valuemax",a()),pe(ce,"aria-invalid",d(S)?"true":void 0),pe(de,"title",c()),pe(de,"aria-controls",r),pe(de,"aria-disabled",d(A))}),ut("click",H,M),ut("input",ce,X),ut("change",ce,R),Ta("blur",ce,R),ut("keydown",ce,U),ut("click",de,j),x(e,he),re(le)}Bt(["click","input","change","keydown"]),ne(Jp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function xT(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[mo(n)];if(t<e)return e>n?[mo(e)]:[];const i=Math.max(e,n),a=[mo(n)];for(let s=i;s<=t;s++)s!==n&&a.push(mo(s));return a}function mo(e){return{value:e,label:e.toString()}}var TT=q("<option> </option>"),AT=q('<select class="go-quantity-select"></select>');function vo(e,t){te(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),a=_(t,"label",7),s=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=P(()=>Ge.config.quantityStepper),u=P(()=>l()!=null&&Ge.config.quantityStepperAtMinimum==="disable");var p={get value(){return r()},set value(g){r(g),b()},get min(){return n()},set min(g){n(g),b()},get max(){return i()},set max(g){i(g),b()},get label(){return a()},set label(g){a(g),b()},get floor(){return s()},set floor(g=0){s(g),b()},get deselectable(){return o()},set deselectable(g=!0){o(g),b()},get onDecrementBelowMin(){return l()},set onDecrementBelowMin(g){l(g),b()},get onChange(){return c()},set onChange(g){c(g),b()}},h=ie(),y=B(h),v=g=>{{let E=P(()=>d(u)?Math.max(n(),1):o()?0:n()),S=P(()=>k.t("quantity.decrease")),T=P(()=>k.t("quantity.increase")),A=P(()=>d(u)?void 0:l()),I=P(()=>k.t("quantity.remove")),M=P(()=>k.t("quantity.remove.label"));Jp(g,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(E)},get label(){return a()},get decreaseLabel(){return d(S)},get increaseLabel(){return d(T)},get onDecrementBelowMin(){return d(A)},get removeAriaLabel(){return d(I)},get removeLabel(){return d(M)},get onChange(){return c()}})}},m=g=>{var E=AT();Me(E,21,()=>xT(n(),i(),{floor:o()?s():n()}),S=>S.value,(S,T)=>{var A=TT(),I=D(A,!0);C(A);var M={};Y(()=>{Mf(A,r()===d(T).value),Z(I,d(T).label),M!==(M=d(T).value)&&(A.value=(A.__value=d(T).value)??"")}),x(S,A)}),C(E),Y(()=>pe(E,"aria-label",a())),ut("change",E,S=>c()(parseInt(S.target.value,10))),x(g,E)};return ue(y,g=>{d(f)?g(v):g(m,-1)}),x(e,h),re(p)}Bt(["change"]),ne(vo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function Qp(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 CT(e){if(Array.isArray(e))return e}function OT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function DT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
75
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const o=s[1];if(t===s[0]){a(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){a(s);continue}}if(e.metadataRegistry.get(s[0])?.id){a(s);continue}if(o.cycle){a(s);continue}if(o.count>1&&e.reused==="ref"){a(s);continue}}}function Ih(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,f={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),y=h.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(y)):Object.assign(c,y),Object.assign(c,f),o._zod.parent===u)for(const v in c)v==="$ref"||v==="allOf"||v in f||delete c[v];if(y.$ref&&h.def)for(const v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const y in c)y==="$ref"||y==="allOf"||y in h.def&&JSON.stringify(c[y])===JSON.stringify(h.def[y])&&delete c[y]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[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 o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;const s=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xs(t,"input",e.processors),output:Xs(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function It(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 It(n.element,r);if(n.type==="set")return It(n.valueType,r);if(n.type==="lazy")return It(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 It(n.innerType,r);if(n.type==="intersection")return It(n.left,r)||It(n.right,r);if(n.type==="record"||n.type==="map")return It(n.keyType,r)||It(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:It(n.in,r)||It(n.out,r);if(n.type==="object"){for(const i in n.shape)if(It(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(It(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(It(i,r))return!0;return!!(n.rest&&It(n.rest,r))}return!1}var mS=(e,t={})=>r=>{const n=Oh({...r,processors:t});return xt(e,n),Dh(n,e),Ih(n,e)},Xs=(e,t,r={})=>n=>{const{libraryOptions:i,target:a}=n??{},s=Oh({...i??{},target:a,io:t,processors:r});return xt(e,s),Dh(s,e),Ih(s,e)},vS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:a,maximum:s,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof s=="number"&&(i.maxLength=s),o&&(i.format=vS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const f=[...l];f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},yS=(e,t,r,n)=>{const i=r,{minimum:a,maximum:s,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof f=="number"&&f>=(a??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=f,i.exclusiveMinimum=!0):i.exclusiveMinimum=f:typeof a=="number"&&(i.minimum=a),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof s=="number"&&(i.maximum=s),typeof l=="number"&&(i.multipleOf=l)},bS=(e,t,r,n)=>{r.not={}},_S=(e,t,r,n)=>{},wS=(e,t,r,n)=>{const i=e._zod.def,a=Hf(i.entries);a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),r.enum=a},kS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},SS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ES=(e,t,r,n)=>{const i=r,a=e._zod.def,{minimum:s,maximum:o}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=xt(a.element,t,{...n,path:[...n.path,"items"]})},xS=(e,t,r,n)=>{const i=r,a=e._zod.def;i.type="object",i.properties={};const s=a.shape;for(const c in s)i.properties[c]=xt(s[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(s)),l=new Set([...o].filter(c=>{const f=a.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=xt(a.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},TS=(e,t,r,n)=>{const i=e._zod.def,a=i.inclusive===!1,s=i.options.map((o,l)=>xt(o,t,{...n,path:[...n.path,a?"oneOf":"anyOf",l]}));a?r.oneOf=s:r.anyOf=s},AS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=xt(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]]},CS=(e,t,r,n)=>{const i=e._zod.def,a=xt(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},OS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},DS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},IS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},PS=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},MS=(e,t,r,n)=>{const i=e._zod.def,a=i.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?a?i.out:i.in:i.out;xt(s,t,n);const o=t.seen.get(e);o.ref=s},$S=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType,r.readOnly=!0},Ph=(e,t,r,n)=>{const i=e._zod.def;xt(i.innerType,t,n);const a=t.seen.get(e);a.ref=i.innerType},FS=Q("ZodISODateTime",(e,t)=>{V0.init(e,t),Xe.init(e,t)});function NS(e){return Wk(FS,e)}var RS=Q("ZodISODate",(e,t)=>{j0.init(e,t),Xe.init(e,t)});function LS(e){return Hk(RS,e)}var zS=Q("ZodISOTime",(e,t)=>{Z0.init(e,t),Xe.init(e,t)});function qS(e){return Gk(zS,e)}var US=Q("ZodISODuration",(e,t)=>{W0.init(e,t),Xe.init(e,t)});function BS(e){return Kk(US,e)}var VS=(e,t)=>{eh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Fw(e,r)},flatten:{value:r=>$w(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get(){return e.issues.length===0}}})},hr=Q("ZodError",VS,{Parent:Error}),jS=su(hr),ZS=ou(hr),WS=Hs(hr),HS=Gs(hr),GS=Lw(hr),KS=zw(hr),YS=qw(hr),JS=Uw(hr),QS=Bw(hr),XS=Vw(hr),e1=jw(hr),t1=Zw(hr),Mh=new WeakMap;function Fa(e,t,r){const n=Object.getPrototypeOf(e);let i=Mh.get(n);if(i||(i=new Set,Mh.set(n,i)),!i.has(t)){i.add(t);for(const a in r){const s=r[a];Object.defineProperty(n,a,{configurable:!0,enumerable:!1,get(){const o=s.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var ht=Q("ZodType",(e,t)=>(ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xs(e,"input"),output:Xs(e,"output")}}),e.toJSONSchema=mS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>jS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>WS(e,r,n),e.parseAsync=async(r,n)=>ZS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>HS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>GS(e,r,n),e.decode=(r,n)=>KS(e,r,n),e.encodeAsync=async(r,n)=>YS(e,r,n),e.decodeAsync=async(r,n)=>JS(e,r,n),e.safeEncode=(r,n)=>QS(e,r,n),e.safeDecode=(r,n)=>XS(e,r,n),e.safeEncodeAsync=async(r,n)=>e1(e,r,n),e.safeDecodeAsync=async(r,n)=>t1(e,r,n),Fa(e,"ZodType",{check(...r){const n=this.def;return this.clone(Cn(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 On(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(W1(r,n))},superRefine(r,n){return this.check(H1(r,n))},overwrite(r){return this.check(Di(r))},optional(){return Uh(this)},exactOptional(){return $1(this)},nullable(){return Bh(this)},nullish(){return Uh(Bh(this))},nonoptional(r){return q1(this,r)},array(){return zh(this)},or(r){return A1([this,r])},and(r){return O1(this,r)},transform(r){return jh(this,P1(r))},default(r){return R1(this,r)},prefault(r){return z1(this,r)},catch(r){return B1(this,r)},pipe(r){return jh(this,r)},readonly(){return Z1(this)},describe(r){const n=this.clone();return $a.add(n,{description:r}),n},meta(...r){if(r.length===0)return $a.get(this);const n=this.clone();return $a.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 $a.get(e)?.description},configurable:!0}),e)),$h=Q("_ZodString",(e,t)=>{lu.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>gS(e,n,i,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Fa(e,"_ZodString",{regex(...n){return this.check(eS(...n))},includes(...n){return this.check(nS(...n))},startsWith(...n){return this.check(iS(...n))},endsWith(...n){return this.check(aS(...n))},min(...n){return this.check(Qs(...n))},max(...n){return this.check(Ah(...n))},length(...n){return this.check(Ch(...n))},nonempty(...n){return this.check(Qs(1,...n))},lowercase(n){return this.check(tS(n))},uppercase(n){return this.check(rS(n))},trim(){return this.check(oS())},normalize(...n){return this.check(sS(...n))},toLowerCase(){return this.check(lS())},toUpperCase(){return this.check(uS())},slugify(){return this.check(cS())}})}),r1=Q("ZodString",(e,t)=>{lu.init(e,t),$h.init(e,t),e.email=r=>e.check(xk(n1,r)),e.url=r=>e.check(Dk(i1,r)),e.jwt=r=>e.check(Zk(b1,r)),e.emoji=r=>e.check(Ik(a1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.uuid=r=>e.check(Tk(eo,r)),e.uuidv4=r=>e.check(Ak(eo,r)),e.uuidv6=r=>e.check(Ck(eo,r)),e.uuidv7=r=>e.check(Ok(eo,r)),e.nanoid=r=>e.check(Pk(s1,r)),e.guid=r=>e.check(Sh(Fh,r)),e.cuid=r=>e.check(Mk(o1,r)),e.cuid2=r=>e.check($k(l1,r)),e.ulid=r=>e.check(Fk(u1,r)),e.base64=r=>e.check(Bk(v1,r)),e.base64url=r=>e.check(Vk(g1,r)),e.xid=r=>e.check(Nk(c1,r)),e.ksuid=r=>e.check(Rk(d1,r)),e.ipv4=r=>e.check(Lk(f1,r)),e.ipv6=r=>e.check(zk(h1,r)),e.cidrv4=r=>e.check(qk(p1,r)),e.cidrv6=r=>e.check(Uk(m1,r)),e.e164=r=>e.check(jk(y1,r)),e.datetime=r=>e.check(NS(r)),e.date=r=>e.check(LS(r)),e.time=r=>e.check(qS(r)),e.duration=r=>e.check(BS(r))});function Xt(e){return Ek(r1,e)}var Xe=Q("ZodStringFormat",(e,t)=>{Qe.init(e,t),$h.init(e,t)}),n1=Q("ZodEmail",(e,t)=>{$0.init(e,t),Xe.init(e,t)}),Fh=Q("ZodGUID",(e,t)=>{P0.init(e,t),Xe.init(e,t)}),eo=Q("ZodUUID",(e,t)=>{M0.init(e,t),Xe.init(e,t)}),i1=Q("ZodURL",(e,t)=>{F0.init(e,t),Xe.init(e,t)}),a1=Q("ZodEmoji",(e,t)=>{N0.init(e,t),Xe.init(e,t)}),s1=Q("ZodNanoID",(e,t)=>{R0.init(e,t),Xe.init(e,t)}),o1=Q("ZodCUID",(e,t)=>{L0.init(e,t),Xe.init(e,t)}),l1=Q("ZodCUID2",(e,t)=>{z0.init(e,t),Xe.init(e,t)}),u1=Q("ZodULID",(e,t)=>{q0.init(e,t),Xe.init(e,t)}),c1=Q("ZodXID",(e,t)=>{U0.init(e,t),Xe.init(e,t)}),d1=Q("ZodKSUID",(e,t)=>{B0.init(e,t),Xe.init(e,t)}),f1=Q("ZodIPv4",(e,t)=>{H0.init(e,t),Xe.init(e,t)}),h1=Q("ZodIPv6",(e,t)=>{G0.init(e,t),Xe.init(e,t)}),p1=Q("ZodCIDRv4",(e,t)=>{K0.init(e,t),Xe.init(e,t)}),m1=Q("ZodCIDRv6",(e,t)=>{Y0.init(e,t),Xe.init(e,t)}),v1=Q("ZodBase64",(e,t)=>{J0.init(e,t),Xe.init(e,t)}),g1=Q("ZodBase64URL",(e,t)=>{X0.init(e,t),Xe.init(e,t)}),y1=Q("ZodE164",(e,t)=>{ek.init(e,t),Xe.init(e,t)}),b1=Q("ZodJWT",(e,t)=>{rk.init(e,t),Xe.init(e,t)}),Nh=Q("ZodNumber",(e,t)=>{ch.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>yS(e,n,i,a),Fa(e,"ZodNumber",{gt(n,i){return this.check(xh(n,i))},gte(n,i){return this.check(du(n,i))},min(n,i){return this.check(du(n,i))},lt(n,i){return this.check(Eh(n,i))},lte(n,i){return this.check(cu(n,i))},max(n,i){return this.check(cu(n,i))},int(n){return this.check(Rh(n))},safe(n){return this.check(Rh(n))},positive(n){return this.check(xh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(Eh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Th(n,i))},step(n,i){return this.check(Th(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 Na(e){return Yk(Nh,e)}var _1=Q("ZodNumberFormat",(e,t)=>{nk.init(e,t),Nh.init(e,t)});function Rh(e){return Jk(_1,e)}var w1=Q("ZodUnknown",(e,t)=>{ik.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i)});function Lh(){return Qk(w1)}var k1=Q("ZodNever",(e,t)=>{ak.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i)});function S1(e){return Xk(k1,e)}var E1=Q("ZodArray",(e,t)=>{sk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ES(e,r,n,i),e.element=t.element,Fa(e,"ZodArray",{min(r,n){return this.check(Qs(r,n))},nonempty(r){return this.check(Qs(1,r))},max(r,n){return this.check(Ah(r,n))},length(r,n){return this.check(Ch(r,n))},unwrap(){return this.element}})});function zh(e,t){return dS(E1,e,t)}var x1=Q("ZodObject",(e,t)=>{lk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xS(e,r,n,i),We(e,"shape",()=>t.shape),Fa(e,"ZodObject",{keyof(){return D1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Lh()})},loose(){return this.clone({...this._zod.def,catchall:Lh()})},strict(){return this.clone({...this._zod.def,catchall:S1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Cw(this,r)},safeExtend(r){return Ow(this,r)},merge(r){return Dw(this,r)},pick(r){return Tw(this,r)},omit(r){return Aw(this,r)},partial(...r){return Iw(qh,this,r[0])},required(...r){return Pw(Vh,this,r[0])}})});function fu(e,t){return new x1({type:"object",shape:e??{},...ye(t)})}var T1=Q("ZodUnion",(e,t)=>{uk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TS(e,r,n,i),e.options=t.options});function A1(e,t){return new T1({type:"union",options:e,...ye(t)})}var C1=Q("ZodIntersection",(e,t)=>{ck.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>AS(e,r,n,i)});function O1(e,t){return new C1({type:"intersection",left:e,right:t})}var hu=Q("ZodEnum",(e,t)=>{dk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(n,i,a)=>wS(e,n,i,a),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const a={};for(const s of n)if(r.has(s))a[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})},e.exclude=(n,i)=>{const a={...t.entries};for(const s of n)if(r.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new hu({...t,checks:[],...ye(i),entries:a})}});function D1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var I1=Q("ZodTransform",(e,t)=>{fk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Wf(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Ma(a,r.value,t));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Ma(s))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function P1(e){return new I1({type:"transform",transform:e})}var qh=Q("ZodOptional",(e,t)=>{gh.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Uh(e){return new qh({type:"optional",innerType:e})}var M1=Q("ZodExactOptional",(e,t)=>{hk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ph(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $1(e){return new M1({type:"optional",innerType:e})}var F1=Q("ZodNullable",(e,t)=>{pk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Bh(e){return new F1({type:"nullable",innerType:e})}var N1=Q("ZodDefault",(e,t)=>{mk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>DS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function R1(e,t){return new N1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var L1=Q("ZodPrefault",(e,t)=>{vk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>IS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function z1(e,t){return new L1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Jf(t)}})}var Vh=Q("ZodNonOptional",(e,t)=>{gk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function q1(e,t){return new Vh({type:"nonoptional",innerType:e,...ye(t)})}var U1=Q("ZodCatch",(e,t)=>{yk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>PS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function B1(e,t){return new U1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var V1=Q("ZodPipe",(e,t)=>{bk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MS(e,r,n,i),e.in=t.in,e.out=t.out});function jh(e,t){return new V1({type:"pipe",in:e,out:t})}var j1=Q("ZodReadonly",(e,t)=>{_k.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$S(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Z1(e){return new j1({type:"readonly",innerType:e})}var Zh=Q("ZodCustom",(e,t)=>{wk.init(e,t),ht.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i)});function W1(e,t={}){return fS(Zh,e,t)}function H1(e,t){return hS(e,t)}function G1(e,t={}){const r=new Zh({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 K1=fu({id:Na(),customer:fu({customer_salutation_id:Na().positive({message:"user.fieldErrors.titleRequire"}),name:Xt().min(1,{message:"user.fieldErrors.nameRequire"}),surname:Xt().min(1,{message:"user.fieldErrors.surnameRequire"}),email:Xt().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:Xt().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:Xt().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:Xt().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:Xt().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Na().positive().default(60),language_id:Na().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),xN=fu({ticket_sale_id:Na(),start_at:Xt().date(),personalizations:zh(K1)});function pu(e,t){return e-t*Math.floor(e/t)}var Wh=1721426;function to(e,t,r,n){t=mu(e,t);let i=t-1,a=-2;return r<=2?a=0:ro(t)&&(a=-1),Wh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+a+n)}function ro(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function Y1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var J1={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-Wh,n=Math.floor(r/146097),i=pu(r,146097),a=Math.floor(i/36524),s=pu(i,36524),o=Math.floor(s/1461),l=pu(s,1461),c=Math.floor(l/365),[f,u]=Y1(n*400+a*100+o*4+c+(a!==4&&c!==4?1:0)),p=t-to(f,u,1,1),h=2;t<to(f,u,3,1)?h=0:ro(u)&&(h=1);let y=Math.floor(((p+h)*12+373)/367);return new za(f,u,y,t-to(f,u,y,1)+1)}toJulianDay(e){return to(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return J1[ro(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ro(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"}},Q1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Dn(e,t){return t=tr(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vu(e,t){return t=tr(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function X1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function eE(e,t){return Dn(e,Pi(t))}var tE={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Hh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?tE[r]:oE(t),a=Math.ceil(n+1-i)%7;return a<0&&(a+=7),a}function rE(e){return Br(Date.now(),e)}function Pi(e){return cE(rE(e))}function Gh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function nE(e,t){return Kh(e)-Kh(t)}function Kh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,iE=!1;function er(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Yh(){return iE}function yu(e){return e.subtract({days:e.day-1})}function aE(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Jh=new Map,bu=new Map;function sE(e){if(Intl.Locale){let r=Jh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Jh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function oE(e){let t=bu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return bu.set(e,t),t.firstDay}let r=sE(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&&Q1[r]||0};bu.set(e,t)}return t.firstDay}function In(e){return e=tr(e,new Ii),Qh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Qh(e,t,r,n,i,a,s){let o=new Date;return o.setUTCHours(n,i,a,s),o.setUTCFullYear(e,t-1,r),o.getTime()}function Ra(e,t){if(t==="UTC")return 0;if(e>0&&t===er()&&!Yh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:a,minute:s,second:o}=ep(e,t);return Qh(r,n,i,a,s,o,0)-Math.floor(e/1e3)*1e3}var Xh=new Map;function ep(e,t){let r=Xh.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"}),Xh.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let a of n)a.type!=="literal"&&(i[a.type]=a.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 no=864e5;function lE(e,t){let r=In(e);return tp(e,t,r-Ra(r-no,t),r-Ra(r+no,t))}function tp(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>uE(e,t,i))}function uE(e,t,r){let n=ep(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 Ur(e,t,r="compatible"){let n=Pn(e);if(t==="UTC")return In(n);if(t===er()&&r==="compatible"&&!Yh()){n=tr(n,new Ii);let l=new Date,c=mu(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=In(n),a=Ra(i-no,t),s=Ra(i+no,t),o=tp(n,t,i-a,i-s);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-a,i-s);case"compatible":case"later":return Math.max(i-a,i-s);case"reject":throw new RangeError("No such absolute time found")}}function rp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Br(e,t){let r=Ra(e,t),n=new Date(e+r),i=n.getUTCFullYear(),a=n.getUTCMonth()+1,s=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),f=n.getUTCMilliseconds();return new Mn(i<1?"BC":"AD",i<1?-i+1:i,a,s,t,r,o,l,c,f)}function cE(e){return new za(e.calendar,e.era,e.year,e.month,e.day)}function Pn(e,t){let r=0,n=0,i=0,a=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:a}=t),new Mi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,a)}function tr(e,t){if(X1(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,Xn(n),n}function dE(e,t,r){return e instanceof Mn?e.timeZone===t?e:np(e,t):Br(Ur(e,t,r),t)}function fE(e){let t=In(e)-e.offset;return new Date(t)}function np(e,t){return tr(Br(In(e)-e.offset,t),e.calendar)}var La=36e5;function io(e,t){let r=e.copy(),n="hour"in r?vE(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),ip(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,hE(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 s=r.calendar.isInverseEra?.(r);r.year=i,r.month=s?1:r.calendar.getMonthsInYear(r),r.day=s?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let a=r.calendar.getMonthsInYear(r);return r.month>a&&(r.month=a,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function _u(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wu(e){for(;e.month<1;)_u(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,_u(e,1)}function hE(e){for(;e.day<1;)e.month--,wu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wu(e)}function ip(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 Xn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),ip(e)}function ap(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function sp(e,t){return io(e,ap(t))}function ku(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),Xn(r),r}function ao(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),mE(r),r}function pE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=so(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=so(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=so(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=so(e.hour,24),t}function mE(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 so(e,t){let r=e%t;return r<0&&(r+=t),r}function vE(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,pE(e)}function Su(e,t,r,n){let i=e.copy();switch(t){case"era":{let a=e.calendar.getEras(),s=a.indexOf(e.era);if(s<0)throw new Error("Invalid era: "+e.era);s=sn(s,r,0,a.length-1,n?.round),i.era=a[s],Xn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=sn(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=sn(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=sn(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),Xn(i),i}function op(e,t,r,n){let i=e.copy();switch(t){case"hour":{let a=e.hour,s=0,o=23;if(n?.hourCycle===12){let l=a>=12;s=l?12:0,o=l?23:11}i.hour=sn(a,r,s,o,n?.round);break}case"minute":i.minute=sn(e.minute,r,0,59,n?.round);break;case"second":i.second=sn(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=sn(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function sn(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function lp(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=Ur(io(Pn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=In(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,tr(Br(r,e.timeZone),e.calendar)}function gE(e,t){return lp(e,ap(t))}function yE(e,t,r,n){switch(t){case"hour":{let i=0,a=23;if(n?.hourCycle===12){let y=e.hour>=12;i=y?12:0,a=y?23:11}let s=Pn(e),o=tr(ao(s,{hour:i}),new Ii),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(y=>Br(y,e.timeZone).day===o.day)[0],c=tr(ao(s,{hour:a}),new Ii),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(y=>Br(y,e.timeZone).day===c.day).pop(),u=In(e)-e.offset,p=Math.floor(u/La),h=u%La;return u=sn(p,r,Math.floor(l/La),Math.floor(f/La),n?.round)*La+h,tr(Br(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return op(e,t,r,n);case"era":case"year":case"month":case"day":return tr(Br(Ur(Su(Pn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function bE(e,t,r){let n=Pn(e),i=ao(ku(n,t),t);return i.compare(n)===0?e:tr(Br(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var _E=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,wE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,kE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Eu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,SE=["hours","minutes","seconds"],TN=["years","months","weeks","days",...SE];function oo(e){let t=e.match(_E);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new za(Be(t[1],0,9999),Be(t[2],1,12),1);return r.day=Be(t[3],1,r.calendar.getDaysInMonth(r)),r}function up(e){let t=e.match(wE);if(!t)throw Eu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=Be(t[1],-9999,9999),n=new Mi(r<1?"BC":"AD",r<1?-r+1:r,Be(t[2],1,12),1,t[4]?Be(t[4],0,23):0,t[5]?Be(t[5],0,59):0,t[6]?Be(t[6],0,59):0,t[7]?Be(t[7],0,1/0)*1e3:0);return n.day=Be(t[3],0,n.calendar.getDaysInMonth(n)),n}function cp(e,t){let r=e.match(kE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,r[11],0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);i.day=Be(r[3],0,i.calendar.getDaysInMonth(i));let a=Pn(i),s;if(r[8]){let o=Be(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+Be(r[9]??"0",0,59)*6e4+Be(r[10]??"0",0,59)*1e3),s=In(i)-i.offset,!lE(a,i.timeZone).includes(s))throw new Error(`Offset ${hp(i.offset)} is invalid for ${xu(i)} in ${i.timeZone}`)}else s=Ur(Pn(a),i.timeZone,t);return Br(s,i.timeZone)}function dp(e,t){let r=e.match(Eu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Be(r[1],-9999,9999),i=new Mn(n<1?"BC":"AD",n<1?-n+1:n,Be(r[2],1,12),1,t,0,r[4]?Be(r[4],0,23):0,r[5]?Be(r[5],0,59):0,r[6]?Be(r[6],0,59):0,r[7]?Be(r[7],0,1/0)*1e3:0);return i.day=Be(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Be(r[8],-23,23)*36e5+Be(r[9]??"0",0,59)*6e4),np(i,t)}function Be(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 EE(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 fp(e){let t=tr(e,new Ii),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function xu(e){return`${fp(e)}T${EE(e)}`}function hp(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),a=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function xE(e){return`${xu(e)}${hp(e.offset)}[${e.timeZone}]`}function Tu(e){let t=typeof e[0]=="object"?e.shift():new Ii,r;if(typeof e[0]=="string")r=e.shift();else{let s=t.getEras();r=s[s.length-1]}let n=e.shift(),i=e.shift(),a=e.shift();return[t,r,n,i,a]}var za=class ud{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,Xn(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(this,t)}cycle(t,r,n){return Su(this,t,r,n)}toDate(t){return rp(this,t)}toString(){return fp(this)}compare(t){return Gh(this,t)}},Mi=class cd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t);this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return io(this,t)}subtract(t){return sp(this,t)}set(t){return ku(ao(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Su(this,t,r,n);default:return op(this,t,r,n)}}toDate(t,r){return rp(this,t,r)}toString(){return xu(this)}compare(t){let r=Gh(this,t);return r===0?nE(this,Pn(t)):r}},Mn=class dd{#e;constructor(...t){let[r,n,i,a,s]=Tu(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=a,this.day=s,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Xn(this)}copy(){return this.era?new dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return lp(this,t)}subtract(t){return gE(this,t)}set(t,r){return bE(this,t,r)}cycle(t,r,n){return yE(this,t,r,n)}toDate(){return fE(this)}toString(){return xE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-dE(t,this.timeZone).toDate().getTime()}},Au=new Map,pr=class{constructor(e,t={}){this.formatter=pp(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 CE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=OE(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}},TE={true:{ja:"h11"},false:{}};function pp(e,t={}){if(typeof t.hour12=="boolean"&&AE()){t={...t};let i=TE[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Au.has(r))return Au.get(r);let n=new Intl.DateTimeFormat(e,t);return Au.set(r,n),n}var Cu=null;function AE(){return Cu==null&&(Cu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Cu}var Ou=null;function CE(){return Ou==null&&(Ou=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Ou}function OE(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=pp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(a=>a.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")}var DE={dayMonth:{month:"numeric",day:"numeric"},short:{year:"numeric",month:"numeric",day:"numeric"}};function mp(e,t){const r=dp(e,"Europe/Berlin");return new pr(t,{timeZone:r.timeZone,hour:"numeric",minute:"numeric"}).format(r.toDate())}function IE(e,t,r){const n=dp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new pr(r,{timeZone:n.timeZone,...DE[t]}).format(n.toDate())}function lo(e){return e?.type==="Ticket"}function Vr(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function qa(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function Ua(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 Ba(e,t=""){return Bf(Object.values(e).map(r=>Ua(r,{selectedTime:t})),r=>r.shop_order)}function Du(e,t){const r=n=>Object.keys(n.total_capacities??{}).find(i=>(n.total_capacities?.[i]??0)>0);return Bf(Object.values(e).filter(n=>r(n)||Object.keys(n.total_capacities??{}).length===0).map(n=>Ua(n,{selectedTime:r(n)??t})),n=>n.shop_order)}function Va(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 vp=e=>fr(Object.values(e.mantle?.composition??{}));function PE(e){const t=e.quantity??0;return Vr(e.product)?t*vp(e):t}function Iu(e,t,r,n){e.clearPrecart();let i=0;for(const a of[...r.items,...t.items]){if(!lo(a.product))continue;const s=PE(a);a===n&&(i=s),e.addPrecartItemQuantity(a.product.id,s)}return i}var ME=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!lo(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},$E=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Vr(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,a=e.quotaManager,s=Iu(a,t,n,r),o=a.ticketCapacity(i.id,i.selectedTime,s),l=a.totalCapacity(i.id,i.selectedTime),c=vp(r),f=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,f),min:i.min_persons||0,bookedOut:f===0,unavailable:l===0}},FE=e=>Object.fromEntries(qa(e).map(t=>[t.id,t.max_persons]));function NE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Vr(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,a=r.quantity??0;let s=1/0;return a>0&&(Iu(e.quotaManager,t,n,r),s=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/a)),Object.fromEntries(qa(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+s)]))}function ja(e){return e?.type==="Event"}function RE(e){return ja(e)&&e.subtype==="scale"}function LE(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 Pu(e,t,r){return LE(e,t,r)}var zE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!ja(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,a=e.allSeats[i];if(!a)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const s=Math.min(a.max||100,a.max_per_registration||100,a.available??100),o={max_per_registration:s,available:100,overbook:!1,...a};let l=s;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=fr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-f-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},qE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function UE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+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=fr(r.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));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(a=>a.tickets.includes(r))),t&&(i=i.filter(a=>a.timeSlot===t)),n&&(i=i.filter(a=>a.timeSlot.startsWith(n))),i.flatMap(a=>a.tickets.map(s=>({timeslot:t,ticket:s,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(a=>a.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return eu(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(a=>a.timeSlot.startsWith(t.toString()));r&&(n=n.filter(a=>a.tickets.some(s=>r.includes(s))));const i=mw(n,a=>a.timeSlot);return Object.values(i).map(a=>vw(gw(a.flatMap(s=>s.tickets)).map(s=>eu(a.filter(o=>o.tickets.includes(s)),o=>o.capacity)).filter(s=>s!==null),s=>s.capacity)??a[0]).sort((a,s)=>a.timeSlot.localeCompare(s.timeSlot))}}}function BE(e){let t=0;wa(()=>{ve(()=>{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 et(e){let t;try{t=new Intl.NumberFormat(k.locale??"de",{style:"currency",currency:k.currency??"EUR"})}catch{t=new Intl.NumberFormat("de",{style:"currency",currency:"EUR"})}return t.format((e??0)/100)}function on(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}function gp(e){return e?.type==="Tour"}function yp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:VE(e)}}function VE(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function jE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:a,instanceKey:s,wire:o,...l}=e;return yp({...l,totalPriceCents:n},{instanceKey:s})}var ZE=0;function nt(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(qa(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${ZE++}`}),{...r,quantity:r.quantity??0,time:r.time??"",type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Vr(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),RE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),gp(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Vr(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),this.voucher?.code&&n.push(`voucher_code: ${this.voucher.code}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){const n="dynamic_prices"in this.product?this.product.dynamic_prices:null;return this.time&&n?.[this.time]!=null?n[this.time]:this.product.price_cents},get price_formatted(){return et(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return et(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return et(this.total_price_cents)}}}var AN=15*6e4;function uo(){return typeof window<"u"&&typeof localStorage<"u"}function WE(e,t){if(uo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Mu(e){if(!uo())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 bp(e){if(uo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function _p(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var wp="go-cart",co=(e,t,r)=>localStorage.setItem(wp,JSON.stringify({items:e,coupons:t,donations:r,savedAt:Date.now()}));function HE(e){const t=e.product.type;switch(t){case"Ticket":return $u(e)?nt(Ua(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle,voucher:e.voucher}):void 0;case"Event":return $u(e)?nt(Pu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return $u(e)?nt(jE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return nt(_p(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function GE(e){let t=[],r=[],n=[],i;try{const a=localStorage.getItem(wp);if(!a)return[];const s=JSON.parse(a);if(Array.isArray(s))t=s,r=[],n=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.donations||[],i=s.savedAt;else throw console.dir({parsed:s,content:a}),new Error("go-cart has invalid format");return typeof i=="number"&&Date.now()-i>9e5?(e.clearItems(),e.clearCoupons(),e.clearDonations(),co([],[],[]),[]):(t.length===0?e.clearItems():e.items=t.map(HE).filter(QE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.clearDonations(),n.forEach(o=>{typeof o?.value=="number"&&typeof o?.campaign_id=="number"&&e.addDonation({value:o.value,campaign_id:o.campaign_id})}),e.items)}catch(a){return console.error(a),co([],[],[]),[]}}function KE(e){GE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});co(e.items||[],e.coupons||[],e.donations||[]),wa(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[],donations:e.donations||[]});r!==t&&(t=r,co(e.items||[],e.coupons||[],e.donations||[]))})})}var YE=e=>new Date<new Date(e),JE=e=>oo(e.slice(0,10)).compare(Pi(er()))>=0,$u=e=>e.time?e.product.subtype==="day"?JE(e.time):YE(e.time):!0,QE=e=>e!==void 0,XE=0;function ei(e,t=20){const r=Pe([]),n=Pe([]),i=Pe([]);let a=se(void 0);const s={items:r,coupons:n,donations:i,get paymentModeId(){return d(a)},set paymentModeId(o){F(a,o,!0)},uid:`cart-${XE++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,fr(this.items,o=>o.total_price_cents)+this.donationCents)},get donationCents(){return fr(this.donations,o=>o.value)},get totalQuantity(){return fr(this.items,o=>o.quantity)},get valueVoucherCents(){return fr(this.coupons.filter(o=>o.kind==="valueVoucher"),o=>o.valueCents??0)},get amountToPayCents(){const o=fr(this.items,l=>l.total_price_cents);return Math.max(0,o-this.valueVoucherCents)+this.donationCents},toString(){return this.uid+" > ["+this.items.map(o=>o.uuid+":"+o.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(o=>({type:o.type,attributes:o.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??k.settings?.defaultPaymentModeId,coupons:this.coupons.map(o=>o.code),donations:this.donations.map(o=>({value:o.value,campaign_id:o.campaign_id})),affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return et(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let l=this.items.length-1;l>=0;l--)this.items[l].uuid===o.uuid&&this.items.splice(l,1);o?.voucher?.code&&!this.items.some(l=>l.voucher?.code===o.voucher.code)&&this.removeCoupon(o.voucher.code)},addItem(o){const l=this.items.find(c=>c.uuid===o.uuid);l?l.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(l=>this.addItem(l))},addCoupon(o){const l={...o,code:o.code.toUpperCase()};this.coupons.some(c=>c.code===l.code)||this.coupons.push(l)},removeCoupon(o){const l=o.toUpperCase(),c=this.coupons.findIndex(f=>f.code===l);if(c>-1){const[f]=this.coupons.splice(c,1);if(f.kind==="serviceVoucher")for(let u=this.items.length-1;u>=0;u--)this.items[u].voucher?.code===l&&this.items.splice(u,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()},hasDonation(o,l){return this.donations.some(c=>c.campaign_id===o&&c.value===l)},addDonation(o){this.hasDonation(o.campaign_id,o.value)||this.donations.push(o)},removeDonation(o,l){const c=this.donations.findIndex(f=>f.campaign_id===o&&f.value===l);c>-1&&this.donations.splice(c,1)},clearDonations(){for(;this.donations.length>0;)this.donations.pop()}};return e&&e.forEach(o=>s.addItem(nt(o))),s}function ex(){const e=Pe(ei());return KE(e),BE(e),e}var $i="go-capacity";function kp(e,t){const r=Mu($i);WE($i,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function Sp(e){const t=Mu($i);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){bp($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 tx(e){uo()&&window.addEventListener("storage",t=>{if(t.key===$i&&Sp(e),t.key==="go-cart"){const r=Mu("go-cart");(!r||!r.items||r.items.length===0)&&bp($i)}})}function Ep(){const e={allSeats:{},allQuotas:{},quotaManager:UE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&kp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&kp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Vr(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const a=t.product.subtype;switch(a){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),a={quotas:ME,mantle:$E,seats:zE,unlimited:qE}[i];if(!a)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>a(this,t,r,n))},subTicketMaxes(t,r,n){if(!Vr(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Re(()=>i==="mantle"?NE(this,t,r,n):FE(r.product))}};return Sp(e),tx(e),e}function xp(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 Tp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},rx=class extends Tp{constructor(){super()}get isLoggedIn(){try{const e=xp("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=xp("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}}},nx=class extends Tp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},ix=e=>{switch(e){case"angular":return new rx;case"jmb":return new nx;default:throw new Error("Unhandled shop type: "+e)}};function ax(e){return e==null||typeof e=="string"&&e.trim()===""}function sx(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||ax(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function ox(e,t){return sx(e,t)}var lx={withStackTrace:!1},Ap=(e,t,r=lx)=>({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(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{c(n.next(f))}catch(u){s(u)}}function l(f){try{c(n.throw(f))}catch(u){s(u)}}function c(f){f.done?a(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Cp(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 jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Op(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(y){return Promise.resolve(y).then(h,u)}}function o(h,y){n[h]&&(i[h]=function(v){return new Promise(function(m,g){a.push([h,v,m,g])>1||l(h,v)})},y&&(i[h]=y(i[h])))}function l(h,y){try{c(n[h](y))}catch(v){p(a[0][3],v)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(a[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,y){h(y),a.shift(),a.length&&l(a[0][0],a[0][1])}}function ux(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,a){t[i]=e[i]?function(s){return(r=!r)?{value:jr(e[i](s)),done:!1}:a?a(s):s}:a}}function cx(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 Cp=="function"?Cp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,l){s=e[a](s),i(o,l,s.done,s.value)})}}function i(a,s,o,l){Promise.resolve(l).then(function(c){a({value:c,done:o})},s)}}var ri=class _r{constructor(t){this._promise=t}static fromSafePromise(t){return new _r(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new _r(t.then(n=>new Wr(n)).catch(n=>new Er(r(n))))}static fromThrowable(t,r){return(...n)=>new _r(ti(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Er(r?r(i):i)}}))}static combine(t){return dx(t)}static combineWithAllErrors(t){return fx(t)}map(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?new Er(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);const n=yield t(r.value);return n.isErr()?new Er(n.error):new Wr(r.value)})))}andTee(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isErr())return new Er(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Er(r.error)})))}mapErr(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Er(yield t(r.error))})))}andThen(t){return new _r(this._promise.then(r=>{if(r.isErr())return new Er(r.error);const n=t(r.value);return n instanceof _r?n._promise:n}))}orElse(t){return new _r(this._promise.then(r=>ti(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(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 Op(this,arguments,function*(){return yield jr(yield jr(yield*ux(cx(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Op(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(fo(r.error))),yield jr(r.value)})}};function fo(e){return new ri(Promise.resolve(new Er(e)))}var CN=ri.fromPromise,ON=ri.fromSafePromise,DN=ri.fromThrowable,Dp=e=>{let t=$n([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},dx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Dp),Ip=e=>{let t=$n([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},fx=e=>ri.fromSafePromise(Promise.all(e)).andThen(Ip),Fu;(function(e){function t(i,a){return(...s)=>{try{return $n(i(...s))}catch(o){return Zr(a?a(o):o)}}}e.fromThrowable=t;function r(i){return Dp(i)}e.combine=r;function n(i){return Ip(i)}e.combineWithAllErrors=n})(Fu||(Fu={}));function $n(e){return new Wr(e)}function Zr(e){return new Er(e)}var Wr=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 Ap("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Er=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return fo(this.error)}asyncAndThrough(e){return fo(this.error)}asyncMap(e){return fo(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Ap("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},IN=Fu.fromThrowable,hx=/\{[^{}]+\}/g,px=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function mx(){return Math.random().toString(36).slice(2,11)}function vx(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:a,pathSerializer:s,headers:o,requestInitExt:l=void 0,...c}={...e};l=px()?l:void 0,t=Np(t);const f=[];async function u(p,h){const{baseUrl:y,fetch:v=n,Request:m=r,headers:g,params:E={},parseAs:S="json",querySerializer:T,bodySerializer:A=a??yx,pathSerializer:I,body:M,middleware:N=[],...j}=h||{};let R=t;y&&(R=Np(y)??t);let X=typeof i=="function"?i:$p(i);T&&(X=typeof T=="function"?T:$p({...typeof i=="object"?i:{},...T}));const U=I||s||gx,le=M===void 0?void 0:A(M,Fp(o,g,E.header)),he=Fp(le===void 0||le instanceof FormData?{}:{"Content-Type":"application/json"},o,g,E.header),H=[...f,...N],oe={redirect:"follow",...c,...j,body:le,headers:he};let W,fe,ce=new m(bx(p,{baseUrl:R,params:E,querySerializer:X,pathSerializer:U}),oe),de;for(const $ in j)$ in ce||(ce[$]=j[$]);if(H.length){W=mx(),fe=Object.freeze({baseUrl:R,fetch:v,parseAs:S,querySerializer:X,bodySerializer:A,pathSerializer:U});for(const $ of H)if($&&typeof $=="object"&&typeof $.onRequest=="function"){const ae=await $.onRequest({request:ce,schemaPath:p,params:E,options:fe,id:W});if(ae)if(ae instanceof m)ce=ae;else if(ae instanceof Response){de=ae;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!de){try{de=await v(ce,l)}catch($){let ae=$;if(H.length)for(let L=H.length-1;L>=0;L--){const be=H[L];if(be&&typeof be=="object"&&typeof be.onError=="function"){const G=await be.onError({request:ce,error:ae,schemaPath:p,params:E,options:fe,id:W});if(G){if(G instanceof Response){ae=void 0,de=G;break}if(G instanceof Error){ae=G;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ae)throw ae}if(H.length)for(let $=H.length-1;$>=0;$--){const ae=H[$];if(ae&&typeof ae=="object"&&typeof ae.onResponse=="function"){const L=await ae.onResponse({request:ce,response:de,schemaPath:p,params:E,options:fe,id:W});if(L){if(!(L instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");de=L}}}}const J=de.headers.get("Content-Length");if(de.status===204||ce.method==="HEAD"||J==="0"&&!de.headers.get("Transfer-Encoding")?.includes("chunked"))return de.ok?{data:void 0,response:de}:{error:void 0,response:de};if(de.ok)return{data:await(async()=>{if(S==="stream")return de.body;if(S==="json"&&!J){const ae=await de.text();return ae?JSON.parse(ae):void 0}return await de[S]()})(),response:de};let ee=await de.text();try{ee=JSON.parse(ee)}catch{}return{error:ee,response:de}}return{request(p,h,y){return u(h,{...y,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");f.push(h)}},eject(...p){for(const h of p){const y=f.indexOf(h);y!==-1&&f.splice(y,1)}}}}function ho(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 Pp(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 o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const s=n.join(",");switch(r.style){case"form":return`${e}=${s}`;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return s}}for(const s in t){const o=r.style==="deepObject"?`${e}[${s}]`:s;n.push(ho(o,t[s],r))}const a=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${a}`:a}function Mp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",s=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(a);switch(r.style){case"simple":return s;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return`${e}=${s}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const a of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?a:encodeURIComponent(a)):i.push(ho(e,a,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function $p(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const a=r[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;n.push(Mp(i,a,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof a=="object"){n.push(Pp(i,a,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ho(i,a,e))}}return n.join("&")}}function gx(e,t){let r=e;for(const n of e.match(hx)??[]){let i=n.substring(1,n.length-1),a=!1,s="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(s="label",i=i.substring(1)):i.startsWith(";")&&(s="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Mp(i,o,{style:s,explode:a}));continue}if(typeof o=="object"){r=r.replace(n,Pp(i,o,{style:s,explode:a}));continue}if(s==="matrix"){r=r.replace(n,`;${ho(i,o)}`);continue}r=r.replace(n,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function yx(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 bx(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 Fp(...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,a]of n)if(a===null)t.delete(i);else if(Array.isArray(a))for(const s of a)t.append(i,s);else a!==void 0&&t.set(i,a)}return t}function Np(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function _x(e,t){return vx({baseUrl:e,headers:{"X-Shop-Url":t}})}var wx="/api/v4/calendar",kx="/api/v4/tickets/calendar",Sx="/api/v4/auth/validate_token",Ex="/api/v4/tickets/list_and_quotas",xx="/api/v4/tickets",Tx="/api/v4/auth/sign_in",Ax="/api/v4/auth",Cx="/api/v4/orders/withdrawals",Ox="/api/v4/customer/memberships/activate",Dx="/api/v4/orders",Ix="/api/v4/customer/customer_addresses",Px="/api/v4/customer/memberships",Rp={SHOP_GUEST:10,SHOP:20},po={error:{success:!1,errors:["Not signed in"]}},Lp=iw,Mx=class{type;#e=se(Pe({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"),d(this.#e).urls=sw(this.type),d(this.#e).currentUser=ix(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",tw(d(this.#e).locale),this.#t={},d(this.#e).client=_x(e,t),d(this.#e).capacityManager=Ep(),d(this.#e).cart=ex(),d(this.#e).auth=new jf,d(this.#e).client.use(new bw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Ep()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new jf),d(this.#e).auth}get currentUser(){return d(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return d(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{...Lp[(this.locale??"en").toLowerCase().split(/[-_]/)[0]]??Lp.en,...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 d(this.#e).apiUrl}get shopDomain(){return d(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return d(this.#e).locale??"de"}formatTime(e){return mp(e,this.locale)}formatDate(e,t){return IE(e,t,this.locale)}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return d(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(Sx,"getCustomer","",{cache:5}):po}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(Dx,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):po}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(Ix,"customerAddresses","",{cache:5}):po}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(Px,"customerMemberships","",{cache:5}):po}ticketsCalendar(e){return this.fetchAndCache(kx,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(wx,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(Ex,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:jt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(xx,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:jt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:jt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(Tx,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=jt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Rp.SHOP_GUEST:Rp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(Ax,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(Cx,{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:jt({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"]})}setNewPassword(e,t){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["password","password_confirmation"],params:{header:t}})}activateMembership(e){return this.apiPost(Ox,{body:e,requiredFields:["email"],parseAs:"text"})}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}}})}#n(e,t,r={}){return e+JSON.stringify(t)+JSON.stringify(r)}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#a())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,a=this.#n(e,i,n.path),s=!this.#t[a],o=this.#t[a]?.fetchedAt<Date.now()-n.cache*1e3;return(s||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(d(this.#e)[t]=r===""?l:l[r])}),d(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",{cache:0})}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 d(this.#e).urls}get#i(){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:jt(this.#i,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:a}=t,s=ox(r,i);if(Object.keys(s).length>0)return{error:{errors:s}};const o=this.client[t.method];return await o(e,{body:r,params:jt(this.#i,{params:n}).params,parseAs:a})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await uw(10)}async apiGet(e,t={},r){this.#s();const n=this.#n(e,t,r);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#i;t&&(i=jt(i,{params:{query:t}})),e&&(i=jt(i,{params:{path:r}}));const a=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},a.data||a}#a=()=>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.#a())throw new Error("Fetch is not possible.")}},k=new Mx;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 $x=class _y{host;KEY;pollDuration;#e=se(Pe({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 _y(null,null);return r.value=t,r}load(){Ql(()=>(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 d(this.#e).value}set value(t){d(this.#e).value=t}};function Ni(e){return function(t,r={pollDuration:1e3}){if(t){const n=new $x(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 Fx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0,quantityStepperAtMinimum:"remove"},Nx=class{defaultConfig=jt(Fx,window.customOptions);override=this.defaultConfig;#e=se(Pe(this.defaultConfig));get options(){return d(this.#e)}set options(e){F(this.#e,e,!0)}constructor(){this.update()}update(){const e=jt(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=jt(this.override,e),this.update(),this}default(e){return this.defaultConfig=jt(this.defaultConfig,e),this.update(),this}},Ge=new Nx,zp=class{#e=se();get token(){return d(this.#e)}set token(e){F(this.#e,e,!0)}#t=se();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){F(this.#t,e,!0)}get order(){if(this.token)return pl(k.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return pl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Ge.config.urls.annualTicketPersonalizationForm?Ge.config.urls.annualTicketPersonalizationForm(this.token,e.id):k.urls.annualTicketPersonalizationForm(this.token,e.id)}},qp="go-annual-ticket-personalization",Up=Fi(qp),Rx=Ni(qp),Lx=q("<li><a> </a></li>"),zx=q('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function qx(e,t){te(t,!0);let r=_(t,"token",7);const n=new zp;Up(t.$$host,n),ve(()=>{n.token=r()});let i=P(()=>n.order);var a={details:n,get token(){return r()},set token(c){r(c),b()}},s=ie(),o=B(s),l=c=>{var f=ie(),u=B(f);Me(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var y=zx(),v=D(y),m=D(v,!0);C(v);var g=V(v,2),E=D(g,!0);C(g);var S=V(g,2),T=A=>{var I=Lx(),M=D(I),N=D(M,!0);C(M),C(I),Y((j,R)=>{pe(M,"href",j),Z(N,R)},[()=>n.goToPersonalization(d(h)),()=>k.t("ticket.annual.personalization.list.personalize.add")]),x(A,I)};ue(S,A=>{d(h).status=="not_ready_to_send"&&A(T)}),C(y),Y(A=>{pe(y,"data-ticket-sale-id",d(h).id),Z(m,d(h).title),Z(E,A)},[()=>k.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),x(p,y)}),x(c,f)};return ue(o,c=>{d(i)&&c(l)}),x(e,s),re(a)}customElements.define("go-annual-ticket-personalization",ne(qx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var Ux={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>k.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:Xt().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:Xt().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:Xt().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:()=>k.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:()=>(k.locales??[]).map(e=>({label:k.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:Xt().date()},dateOfBirth:{key:"dateOfBirth",apiKey:"date_of_birth",type:"date",label:"user.registration.form.dateOfBirth",placeholder:"",description:"",autocomplete:"bday",validator:Xt().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:()=>(k.payment_modes?Object.values(k.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function Bx(e,t){return{...e,errors:e.errors||[],value:e.value??Vx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){jx(this)}}}function Vx(e){return e==="checkbox"?!1:e==="file"?null:""}function jx(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 Pt=class nl{static#e={};static defineForm(t){Ge.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Ge.default({fields:t})}static{nl.defineFields(Ux)}static setRequiredApiKeys(t,r){nl.#e[t]=r}static getFormOptions(t){return Ge.config.forms[t]}static createField(t,r){const n=nl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return Bx(n,r)}static getFormFields(t){return Zx(t)}static getFieldInit(t){return Ge.config.fields[t]}};function Zx(e){const t=Ge.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 Nu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function Wx(e,t){te(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i=null;const a=new zp;Up(t.$$host,a),ve(()=>{a.token=r(),a.ticketSaleId=n()}),Pt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function s(){if(!i)return;const v=a.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),g=Vf(v,(I,M)=>{const N=m[M-1].details;return I.push(N),I},[]);if(g.forEach(I=>{I.fields.forEach(M=>{I.validateField(M)})}),!Vf(v,(I,M)=>g[M-1].isValid,!1))return;if(a.ticketSale?.photo_mandatory==="mandatory"){const I=g.map(async(N,j)=>{const R=a.ticketSale.personalizations[j].id,X=N.fields.find(le=>le.key==="photo")?.value;if(!(X instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const U=await k.uploadPersonalizationPhoto(r(),R,X);return U.error?{ok:!1,error:U.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),M=(await Promise.all(I)).find(N=>!N.ok);if(M){i.details.apiErrors=[M.error];return}}const E={personalization:{ticket_sale_id:a.ticketSaleId,start_at:i.details.formData.start_at,personalizations:g.map((I,M)=>{const N=yw(I.formData,["email_confirmation"]);return{id:a.ticketSale?.personalizations[M].id,customer:N}})}},S=await k.finalizePersonalizations(r(),E);if(S.error){i.details.apiErrors=S.error.error?[S.error.error]:[];return}const T=Ge.config.forms.personalization?.beforeSubmit;T&&T(E);const A=Ge.config.urls.annualTicketPersonalizationFormSubmit?.(r());A&&Ge.config.navigateTo(A)}let o=null,l=null,c=null,f=0;function u(v){v.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(v){if(!p()||!o||!l||!c)return;const m=o.parentElement;if(!m)return;const g=Math.max(v,1),E=Array.from(m.querySelectorAll("go-personalization-form"));for(;E.length<g;){const T=l.cloneNode(!0);u(T),m.insertBefore(T,c),E.push(T)}for(;E.length>g;){const T=E.pop();T&&T!==o&&T.remove()}const S=a.ticketSale?.personalizations??[];E.forEach((T,A)=>{const I=S[A];I&&(T.dataset.personalizationId=String(I.id))}),f=g}En(()=>{p(),t.$$host.addEventListener("go-submit",s),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!a.ticketSale)return;const v=a.ticketSale?.personalizations.length??1;v!==f&&h(v)});var y={details:a,get token(){return r()},set token(v){r(v),b()},get ticketSaleId(){return n()},set ticketSaleId(v){n(v),b()}};return re(y)}customElements.define("go-annual-ticket-personalization-form",ne(Wx,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var Hx=class{formId;form;#e=se(Pe([]));#t=P(()=>Nu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){F(this.#t,e)}#r=se();get successMessage(){return d(this.#r)}set successMessage(e){F(this.#r,e,!0)}get formData(){const e=["select","radio","number","paymentMode"];function t(n){const i=n.value;return hw(i)||cw(i)?i:i==="true"||i==="false"?i==="true":e.includes(n.type)&&!Number.isNaN(+i)&&i.trim()!==""?+i:i}const r=this.fields.filter(n=>n!==void 0).filter(n=>n.type!=="file").filter(n=>n.value!=="");return Object.fromEntries(r.map(n=>[n.apiKey,t(n)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return d(this.#e)}set apiErrors(e){if(F(this.#e,[],!0),this.fields.forEach(t=>t.apiErrors=[]),Xl(e)){F(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&F(this.#e,e.errors,!0),fw(e.error)){F(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(a=>a.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(a=>a.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}},Bp="go-form-details",Gx=Fi(Bp),Ri=Ni(Bp);function Hr(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(([s,o])=>{typeof o=="boolean"?o&&i.setAttribute(s,""):i.setAttribute(s,o)});const a=document.createDocumentFragment();for(;e.firstChild;)a.appendChild(e.firstChild);return i.appendChild(a),e.replaceChildren(i),i}var Kx=q("<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 Yx(e,t){te(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new Hx(r(),t.$$host);Gx(t.$$host,i);async function a(f){f.preventDefault(),f.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",f)),i.isValid&&(i.apiErrors={},i.successMessage=void 0,i?.form?.dispatchEvent(new Event("go-submit",f)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}En(()=>{const f=Hr(t.$$host,"form",{novalidate:!0});f.addEventListener("submit",a),i.form=f});var s={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=ie(),l=B(o),c=f=>{var u=Kx(),p=B(u),h=V(p,2),y=V(h,2),v=D(y,!0);C(y),Y(m=>Z(v,m),[()=>k.t(Pt.getFormOptions(r())?.submitLabel||"Submit")]),x(f,u)};return ue(l,f=>{n()||f(c)}),x(e,o),re(s)}customElements.define("go-form",ne(Yx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Jx=q("<go-form></go-form>",2);function Qx(e,t){te(t,!0);let r=_(t,"custom",7,!1),n=_(t,"redirectUrl",7,"");Pt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function i(o){const l=o.target.details,c=l.formData,f=await k.passwordReset(n()?{...c,redirect_url:n()}:c);f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=f.data.message,l.apiErrors=[]):l.apiErrors=f.error.errors}var a={get custom(){return r()},set custom(o=!1){r(o),b()},get redirectUrl(){return n()},set redirectUrl(o=""){n(o),b()}},s=Jx();return Tn(s,"formId","passwordReset"),Y(()=>Tn(s,"custom",r())),Ta("submit",s,i),x(e,s),re(a)}customElements.define("go-password-reset",ne(Qx,{redirectUrl:{attribute:"redirect-url",type:"String"},custom:{}},[],[]));var Xx=q("<go-form></go-form>",2);function eT(e,t){te(t,!0);let r=_(t,"accessToken",7,""),n=_(t,"client",7,""),i=_(t,"uid",7,"");Pt.defineForm({id:"setPassword",submitLabel:"user.passwordReset.actions.resetPassword",fields:[{key:"newPassword",required:!0},{key:"confirmPassword",required:!0}]});async function a(l){const c=l.target.details,f=await k.setNewPassword(c.formData,{"access-token":r(),client:n(),uid:i()});f.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),c.successMessage=f.data.message,c.apiErrors=[]):c.apiErrors=f.error.errors}var s={get accessToken(){return r()},set accessToken(l=""){r(l),b()},get client(){return n()},set client(l=""){n(l),b()},get uid(){return i()},set uid(l=""){i(l),b()}},o=Xx();return Tn(o,"formId","setPassword"),Ta("submit",o,a),x(e,o),re(s)}customElements.define("go-set-password",ne(eT,{accessToken:{attribute:"access-token",type:"String"},client:{attribute:"client",type:"String"},uid:{attribute:"uid",type:"String"}},[],[]));function tT(e,t){te(t,!0),Pt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const a=i.target.details,s=await k.signIn(a.formData);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(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),b()}})}customElements.define("go-sign-in",ne(tT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function rT(e,t){te(t,!0);let r=_(t,"custom",7,!1);Pt.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 a=i.target.details,s=await k.signUp(a.formData,!1);s.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=s.error.errors}return Hr(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),b()}})}customElements.define("go-sign-up",ne(rT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function nT(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 iT(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function aT(e){return nT(iT(e),0)}function sT(e,t){const r=ei(),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)})),e.donations.forEach(i=>r.addDonation(i)),t.forEach(i=>{const a=i.attributes,s=a.uuid,o=e.items.find(l=>l.uuid===s);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:a});return}r.addItem(oT(o,a))}),r}function oT(e,t){const r=gp(e.product)?1:aT(t),n=e.price_cents,i=e.product.price_cents===0?0:t.price_cents??n,a=i<n,s={...e.product,price_cents:i};return"dynamic_prices"in s&&(s.dynamic_prices=null),nt(s,{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:a,reference_uuid:e.uuid,originalPrice:n}})}var lT=class{#e=se();get displayCart(){return d(this.#e)}set displayCart(e){F(this.#e,e,!0)}#t=se(!1);get preview(){return d(this.#t)}set preview(e){F(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return k.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=k.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await k.createCart({items:t,coupons:r});if(n?.data){this.displayCart=sT(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}}},Vp="go-cart-details",uT=Fi(Vp),Li=Ni(Vp),cT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function jp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(s){r(s),b()}},i=cT(),a=D(i,!0);return C(i),Y(()=>Z(a,r().product.title)),x(e,i),re(n)}ne(jp,{cartItem:{}},[],[],{mode:"open"});var dT=q('<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),fT=q('<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 Zp(e,t){te(t,!0);let r=_(t,"cartItem",7);if(!ja(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},a=fT(),s=B(a),o=D(s),l=D(o,!0);C(o);var c=V(o),f=D(c,!0);C(c),C(s);var u=V(s),p=h=>{var y=dT(),v=B(y),m=D(v,!0);C(v);var g=V(v),E=D(g,!0);C(g),Y((S,T)=>{Z(m,S),Z(E,T)},[()=>k.formatDate(r().time,"dayMonth"),()=>k.formatTime(r().time)]),x(h,y)};return ue(u,h=>{r().time&&h(p)}),Y(()=>{Z(l,n.event_title),Z(f,n.title)}),x(e,a),re(i)}ne(Zp,{cartItem:{}},[],[],{mode:"open"});var hT=q('<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>'),pT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),mT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),vT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>',1);function Wp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(p){r(p),b()}},i=vT(),a=B(i),s=D(a,!0);C(a);var o=V(a,2),l=p=>{var h=hT(),y=D(h,!0);C(h),Y(()=>Z(y,r().product.sub_title)),x(p,h)},c=P(()=>lo(r().product)&&r().product.sub_title);ue(o,p=>{d(c)&&p(l)});var f=V(o,2),u=p=>{var h=mT(),y=B(h),v=D(y,!0);C(y);var m=V(y,2),g=E=>{var S=pT(),T=D(S,!0);C(S),Y(A=>Z(T,A),[()=>k.formatTime(r().time)]),x(E,S)};ue(m,E=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&E(g)}),Y(E=>Z(v,E),[()=>k.formatDate(r().time,"dayMonth")]),x(p,h)};return ue(f,p=>{r().time&&p(u)}),Y(()=>Z(s,r().product.title)),x(e,i),re(n)}ne(Wp,{cartItem:{}},[],[],{mode:"open"});var gT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),yT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),bT=q('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),_T=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Hp(e,t){te(t,!0);let r=_(t,"cartItem",7);const n=P(()=>r().product),i=P(()=>{if(!r().time)return null;try{return{date:k.formatDate(r().time,"short"),time:k.formatTime(r().time)}}catch{return{date:r().time,time:""}}}),a=m=>m==null?"":typeof m=="object"?JSON.stringify(m):String(m),s=P(()=>Object.entries(d(n).customs??{}).filter(([,m])=>m!=null&&m!==""));var o={get cartItem(){return r()},set cartItem(m){r(m),b()}},l=_T(),c=B(l),f=D(c,!0);C(c);var u=V(c,2),p=D(u,!0);C(u);var h=V(u,2),y=m=>{var g=yT(),E=B(g),S=D(E,!0);C(E);var T=V(E,2),A=I=>{var M=gT(),N=D(M,!0);C(M),Y(()=>Z(N,d(i).time)),x(I,M)};ue(T,I=>{d(i).time&&I(A)}),Y(()=>Z(S,d(i).date)),x(m,g)};ue(h,m=>{d(i)&&m(y)});var v=V(h,2);return Me(v,17,()=>d(s),([m,g])=>m,(m,g)=>{var E=P(()=>nb(d(g),2));let S=()=>d(E)[0],T=()=>d(E)[1];var A=bT(),I=D(A);C(A),Y(M=>Z(I,`${S()??""}: ${M??""}`),[()=>a(T())]),x(m,A)}),Y(m=>{Z(f,d(n).title),Z(p,m)},[()=>k.t("cart.item.participants",{count:d(n).participants})]),x(e,l),re(o)}ne(Hp,{cartItem:{}},[],[],{mode:"open"});function Gp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function wT(e,{min:t,floor:r=0}){return e<=t?r:e-1}function kT(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function ST(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Kp(e,t){return Gp(e,t)>e}function Yp(e,{floor:t=0}){return e>t}var ET=q('<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Jp(e,t){const r=vt();te(t,!0);let n=_(t,"value",7),i=_(t,"min",7),a=_(t,"max",7),s=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),f=_(t,"onDecrementBelowMin",7),u=_(t,"removeAriaLabel",7),p=_(t,"removeLabel",7,"✕"),h=_(t,"onChange",7);const y=P(()=>f()!=null),v=P(()=>Math.max(i(),1)),m=P(()=>d(y)?{min:d(v),max:a(),floor:d(v)}:{min:i(),max:a(),floor:s()}),g=P(()=>d(y)&&n()<=d(v));let E,S=se(!1);const T=P(()=>!d(g)&&!Yp(n(),d(m))),A=P(()=>!Kp(n(),d(m)));function I(J){J!==n()&&h()(J)}function M(){d(g)?f()():N()}function N(){Yp(n(),d(m))&&I(wT(n(),d(m)))}function j(){Kp(n(),d(m))&&I(Gp(n(),d(m)))}function R(){const J=parseInt(E.value,10);if(d(y)&&(!Number.isFinite(J)||J<=0)){F(S,!1),E.value=String(n()),f()();return}const ee=kT(J,d(m));F(S,!1),E.value=String(ee),I(ee)}function X(){const J=E.value.trim();F(S,!(/^\d+$/.test(J)&&ST(parseInt(J,10),d(m))))}function U(J){switch(J.key){case"ArrowUp":J.preventDefault(),j();break;case"ArrowDown":J.preventDefault(),N();break;case"Home":J.preventDefault(),I(d(m).floor);break;case"End":J.preventDefault(),I(a());break;case"Enter":J.preventDefault(),R();break}}var le={get value(){return n()},set value(J){n(J),b()},get min(){return i()},set min(J){i(J),b()},get max(){return a()},set max(J){a(J),b()},get floor(){return s()},set floor(J=0){s(J),b()},get label(){return o()},set label(J){o(J),b()},get decreaseLabel(){return l()},set decreaseLabel(J){l(J),b()},get increaseLabel(){return c()},set increaseLabel(J){c(J),b()},get onDecrementBelowMin(){return f()},set onDecrementBelowMin(J){f(J),b()},get removeAriaLabel(){return u()},set removeAriaLabel(J){u(J),b()},get removeLabel(){return p()},set removeLabel(J="✕"){p(J),b()},get onChange(){return h()},set onChange(J){h(J),b()}},he=ET(),H=D(he);let oe;var W=D(H),fe=D(W,!0);C(W),C(H);var ce=V(H,2);Ai(ce),Us(ce,J=>E=J,()=>E);var de=V(ce,2);return C(he),Y(()=>{pe(he,"aria-label",o()),oe=Et(H,1,"go-quantity-stepper-button go-quantity-stepper-decrement",null,oe,{"go-quantity-stepper-remove":d(g)}),pe(H,"title",d(g)?u():l()),pe(H,"aria-controls",r),pe(H,"aria-disabled",d(T)),Z(fe,d(g)?p():"−"),pe(ce,"id",r),pe(ce,"aria-label",o()),Bl(ce,n()),pe(ce,"aria-valuenow",n()),pe(ce,"aria-valuemin",d(m).floor),pe(ce,"aria-valuemax",a()),pe(ce,"aria-invalid",d(S)?"true":void 0),pe(de,"title",c()),pe(de,"aria-controls",r),pe(de,"aria-disabled",d(A))}),ut("click",H,M),ut("input",ce,X),ut("change",ce,R),Ta("blur",ce,R),ut("keydown",ce,U),ut("click",de,j),x(e,he),re(le)}Bt(["click","input","change","keydown"]),ne(Jp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onDecrementBelowMin:{},removeAriaLabel:{},removeLabel:{},onChange:{}},[],[],{mode:"open"});function xT(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[mo(n)];if(t<e)return e>n?[mo(e)]:[];const i=Math.max(e,n),a=[mo(n)];for(let s=i;s<=t;s++)s!==n&&a.push(mo(s));return a}function mo(e){return{value:e,label:e.toString()}}var TT=q("<option> </option>"),AT=q('<select class="go-quantity-select"></select>');function vo(e,t){te(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),a=_(t,"label",7),s=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onDecrementBelowMin",7),c=_(t,"onChange",7);const f=P(()=>Ge.config.quantityStepper),u=P(()=>l()!=null&&Ge.config.quantityStepperAtMinimum==="disable");var p={get value(){return r()},set value(g){r(g),b()},get min(){return n()},set min(g){n(g),b()},get max(){return i()},set max(g){i(g),b()},get label(){return a()},set label(g){a(g),b()},get floor(){return s()},set floor(g=0){s(g),b()},get deselectable(){return o()},set deselectable(g=!0){o(g),b()},get onDecrementBelowMin(){return l()},set onDecrementBelowMin(g){l(g),b()},get onChange(){return c()},set onChange(g){c(g),b()}},h=ie(),y=B(h),v=g=>{{let E=P(()=>d(u)?Math.max(n(),1):o()?0:n()),S=P(()=>k.t("quantity.decrease")),T=P(()=>k.t("quantity.increase")),A=P(()=>d(u)?void 0:l()),I=P(()=>k.t("quantity.remove")),M=P(()=>k.t("quantity.remove.label"));Jp(g,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(E)},get label(){return a()},get decreaseLabel(){return d(S)},get increaseLabel(){return d(T)},get onDecrementBelowMin(){return d(A)},get removeAriaLabel(){return d(I)},get removeLabel(){return d(M)},get onChange(){return c()}})}},m=g=>{var E=AT();Me(E,21,()=>xT(n(),i(),{floor:o()?s():n()}),S=>S.value,(S,T)=>{var A=TT(),I=D(A,!0);C(A);var M={};Y(()=>{Mf(A,r()===d(T).value),Z(I,d(T).label),M!==(M=d(T).value)&&(A.value=(A.__value=d(T).value)??"")}),x(S,A)}),C(E),Y(()=>pe(E,"aria-label",a())),ut("change",E,S=>c()(parseInt(S.target.value,10))),x(g,E)};return ue(y,g=>{d(f)?g(v):g(m,-1)}),x(e,h),re(p)}Bt(["change"]),ne(vo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onDecrementBelowMin:{},onChange:{}},[],[],{mode:"open"});function Qp(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 CT(e){if(Array.isArray(e))return e}function OT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}function DT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
76
76
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IT(e,t){return CT(e)||OT(e,t)||PT(e,t)||DT()}function PT(e,t){if(e){if(typeof e=="string")return Qp(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)?Qp(e,t):void 0}}var Xp=Object.entries,em=Object.setPrototypeOf,MT=Object.isFrozen,$T=Object.getPrototypeOf,FT=Object.getOwnPropertyDescriptor,Mt=Object.freeze,mr=Object.seal,zi=Object.create,tm=typeof Reflect<"u"&&Reflect,Ru=tm.apply,Lu=tm.construct;Mt||(Mt=function(t){return t}),mr||(mr=function(t){return t}),Ru||(Ru=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return t.apply(r,i)}),Lu||(Lu=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=pt(Array.prototype.forEach),NT=pt(Array.prototype.lastIndexOf),rm=pt(Array.prototype.pop),Ui=pt(Array.prototype.push),RT=pt(Array.prototype.splice),$t=Array.isArray,Za=pt(String.prototype.toLowerCase),zu=pt(String.prototype.toString),nm=pt(String.prototype.match),Bi=pt(String.prototype.replace),im=pt(String.prototype.indexOf),LT=pt(String.prototype.trim),zT=pt(Number.prototype.toString),qT=pt(Boolean.prototype.toString),am=typeof BigInt>"u"?null:pt(BigInt.prototype.toString),sm=typeof Symbol>"u"?null:pt(Symbol.prototype.toString),it=pt(Object.prototype.hasOwnProperty),Wa=pt(Object.prototype.toString),Tt=pt(RegExp.prototype.test),Ha=UT(TypeError);function pt(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 Ru(e,t,n)}}function UT(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lu(e,r)}}function Ae(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Za;if(em&&em(e,null),!$t(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const a=r(i);a!==i&&(MT(t)||(t[n]=a),i=a)}e[i]=!0}return e}function BT(e){for(let t=0;t<e.length;t++)it(e,t)||(e[t]=null);return e}function Ct(e){const t=zi(null);for(const n of Xp(e)){var r=IT(n,2);const i=r[0],a=r[1];it(e,i)&&($t(a)?t[i]=BT(a):a&&typeof a=="object"&&a.constructor===Object?t[i]=Ct(a):t[i]=a)}return t}function VT(e){switch(typeof e){case"string":return e;case"number":return zT(e);case"boolean":return qT(e);case"bigint":return am?am(e):"0";case"symbol":return sm?sm(e):"Symbol()";case"undefined":return Wa(e);case"function":case"object":{if(e===null)return Wa(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Wa(n)}return Wa(e)}default:return Wa(e)}}function Gr(e,t){for(;e!==null;){const n=FT(e,t);if(n){if(n.get)return pt(n.get);if(typeof n.value=="function")return pt(n.value)}e=$T(e)}function r(){return null}return r}function jT(e){try{return Tt(e,""),!0}catch{return!1}}var om=Mt(["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"]),qu=Mt(["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"]),Uu=Mt(["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"]),ZT=Mt(["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"]),Bu=Mt(["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"]),WT=Mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),lm=Mt(["#text"]),um=Mt(["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"]),Vu=Mt(["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"]),cm=Mt(["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"]),go=Mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),HT=mr(/{{[\w\W]*|^[\w\W]*}}/g),GT=mr(/<%[\w\W]*|^[\w\W]*%>/g),KT=mr(/\${[\w\W]*/g),YT=mr(/^data-[\-\w.\u00B7-\uFFFF]+$/),JT=mr(/^aria-[\-\w]+$/),dm=mr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),QT=mr(/^(?:\w+script|data):/i),XT=mr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eA=mr(/^html$/i),tA=mr(/^[a-z][.\w]*(-[.\w]+)+$/i),Kr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},rA=function(){return typeof window>"u"?null:window},nA=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 a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},fm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rA();const t=ge=>hm(ge);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Kr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,s=e.Node,o=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,u=o.prototype,p=Gr(u,"cloneNode"),h=Gr(u,"remove"),y=Gr(u,"nextSibling"),v=Gr(u,"childNodes"),m=Gr(u,"parentNode"),g=Gr(u,"shadowRoot"),E=Gr(u,"attributes"),S=s&&s.prototype?Gr(s.prototype,"nodeType"):null,T=s&&s.prototype?Gr(s.prototype,"nodeName"):null;if(typeof a=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let A,I="";const M=r,N=M.implementation,j=M.createNodeIterator,R=M.createDocumentFragment,X=M.getElementsByTagName,U=n.importNode;let le=fm();t.isSupported=typeof Xp=="function"&&typeof m=="function"&&N&&N.createHTMLDocument!==void 0;const he=HT,H=GT,oe=KT,W=YT,fe=JT,ce=QT,de=XT,J=tA;let ee=dm,$=null;const ae=Ae({},[...om,...qu,...Uu,...Bu,...lm]);let L=null;const be=Ae({},[...um,...Vu,...cm,...go]);let G=Object.seal(zi(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,_e=null;const we=Object.seal(zi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let De=!0,Le=!0,je=!1,_t=!0,ot=!1,Nt=!0,wt=!1,Rt=!1,ir=!1,Gt=!1,gr=!1,Pr=!1,Mr=!0,yn=!1;const $r="user-content-";let yr=!0,Xr=!1,en={},At=null;const Un=Ae({},["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 na=null;const ia=Ae({},["audio","video","img","source","image","track"]);let fs=null;const td=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",aa="http://www.w3.org/2000/svg",br="http://www.w3.org/1999/xhtml";let Bn=br,rd=!1,nd=null;const MF=Ae({},[mi,aa,br],zu);let id=Ae({},["mi","mo","mn","ms","mtext"]),ad=Ae({},["annotation-xml"]);const $F=Ae({},["title","style","font","a","script"]);let hs=null;const FF=["application/xhtml+xml","text/html"],NF="text/html";let ct=null,sa=null;const RF=r.createElement("form"),ly=function(O){return O instanceof RegExp||O instanceof Function},sd=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(sa&&sa===O)return;(!O||typeof O!="object")&&(O={}),O=Ct(O),hs=FF.indexOf(O.PARSER_MEDIA_TYPE)===-1?NF:O.PARSER_MEDIA_TYPE,ct=hs==="application/xhtml+xml"?zu:Za,$=it(O,"ALLOWED_TAGS")&&$t(O.ALLOWED_TAGS)?Ae({},O.ALLOWED_TAGS,ct):ae,L=it(O,"ALLOWED_ATTR")&&$t(O.ALLOWED_ATTR)?Ae({},O.ALLOWED_ATTR,ct):be,nd=it(O,"ALLOWED_NAMESPACES")&&$t(O.ALLOWED_NAMESPACES)?Ae({},O.ALLOWED_NAMESPACES,zu):MF,fs=it(O,"ADD_URI_SAFE_ATTR")&&$t(O.ADD_URI_SAFE_ATTR)?Ae(Ct(td),O.ADD_URI_SAFE_ATTR,ct):td,na=it(O,"ADD_DATA_URI_TAGS")&&$t(O.ADD_DATA_URI_TAGS)?Ae(Ct(ia),O.ADD_DATA_URI_TAGS,ct):ia,At=it(O,"FORBID_CONTENTS")&&$t(O.FORBID_CONTENTS)?Ae({},O.FORBID_CONTENTS,ct):Un,w=it(O,"FORBID_TAGS")&&$t(O.FORBID_TAGS)?Ae({},O.FORBID_TAGS,ct):Ct({}),_e=it(O,"FORBID_ATTR")&&$t(O.FORBID_ATTR)?Ae({},O.FORBID_ATTR,ct):Ct({}),en=it(O,"USE_PROFILES")?O.USE_PROFILES&&typeof O.USE_PROFILES=="object"?Ct(O.USE_PROFILES):O.USE_PROFILES:!1,De=O.ALLOW_ARIA_ATTR!==!1,Le=O.ALLOW_DATA_ATTR!==!1,je=O.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=O.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ot=O.SAFE_FOR_TEMPLATES||!1,Nt=O.SAFE_FOR_XML!==!1,wt=O.WHOLE_DOCUMENT||!1,Gt=O.RETURN_DOM||!1,gr=O.RETURN_DOM_FRAGMENT||!1,Pr=O.RETURN_TRUSTED_TYPE||!1,ir=O.FORCE_BODY||!1,Mr=O.SANITIZE_DOM!==!1,yn=O.SANITIZE_NAMED_PROPS||!1,yr=O.KEEP_CONTENT!==!1,Xr=O.IN_PLACE||!1,ee=jT(O.ALLOWED_URI_REGEXP)?O.ALLOWED_URI_REGEXP:dm,Bn=typeof O.NAMESPACE=="string"?O.NAMESPACE:br,id=it(O,"MATHML_TEXT_INTEGRATION_POINTS")&&O.MATHML_TEXT_INTEGRATION_POINTS&&typeof O.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ct(O.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),ad=it(O,"HTML_INTEGRATION_POINTS")&&O.HTML_INTEGRATION_POINTS&&typeof O.HTML_INTEGRATION_POINTS=="object"?Ct(O.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const K=it(O,"CUSTOM_ELEMENT_HANDLING")&&O.CUSTOM_ELEMENT_HANDLING&&typeof O.CUSTOM_ELEMENT_HANDLING=="object"?Ct(O.CUSTOM_ELEMENT_HANDLING):zi(null);if(G=zi(null),it(K,"tagNameCheck")&&ly(K.tagNameCheck)&&(G.tagNameCheck=K.tagNameCheck),it(K,"attributeNameCheck")&&ly(K.attributeNameCheck)&&(G.attributeNameCheck=K.attributeNameCheck),it(K,"allowCustomizedBuiltInElements")&&typeof K.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=K.allowCustomizedBuiltInElements),ot&&(Le=!1),gr&&(Gt=!0),en&&($=Ae({},lm),L=zi(null),en.html===!0&&(Ae($,om),Ae(L,um)),en.svg===!0&&(Ae($,qu),Ae(L,Vu),Ae(L,go)),en.svgFilters===!0&&(Ae($,Uu),Ae(L,Vu),Ae(L,go)),en.mathMl===!0&&(Ae($,Bu),Ae(L,cm),Ae(L,go))),we.tagCheck=null,we.attributeCheck=null,it(O,"ADD_TAGS")&&(typeof O.ADD_TAGS=="function"?we.tagCheck=O.ADD_TAGS:$t(O.ADD_TAGS)&&($===ae&&($=Ct($)),Ae($,O.ADD_TAGS,ct))),it(O,"ADD_ATTR")&&(typeof O.ADD_ATTR=="function"?we.attributeCheck=O.ADD_ATTR:$t(O.ADD_ATTR)&&(L===be&&(L=Ct(L)),Ae(L,O.ADD_ATTR,ct))),it(O,"ADD_URI_SAFE_ATTR")&&$t(O.ADD_URI_SAFE_ATTR)&&Ae(fs,O.ADD_URI_SAFE_ATTR,ct),it(O,"FORBID_CONTENTS")&&$t(O.FORBID_CONTENTS)&&(At===Un&&(At=Ct(At)),Ae(At,O.FORBID_CONTENTS,ct)),it(O,"ADD_FORBID_CONTENTS")&&$t(O.ADD_FORBID_CONTENTS)&&(At===Un&&(At=Ct(At)),Ae(At,O.ADD_FORBID_CONTENTS,ct)),yr&&($["#text"]=!0),wt&&Ae($,["html","head","body"]),$.table&&(Ae($,["tbody"]),delete w.tbody),O.TRUSTED_TYPES_POLICY){if(typeof O.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ha('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof O.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ha('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=O.TRUSTED_TYPES_POLICY,I=A.createHTML("")}else A===void 0&&(A=nA(f,i)),A!==null&&typeof I=="string"&&(I=A.createHTML(""));(le.uponSanitizeElement.length>0||le.uponSanitizeAttribute.length>0)&&$===ae&&($=Ct($)),le.uponSanitizeAttribute.length>0&&L===be&&(L=Ct(L)),Mt&&Mt(O),sa=O},uy=Ae({},[...qu,...Uu,...ZT]),cy=Ae({},[...Bu,...WT]),LF=function(O){let K=m(O);(!K||!K.tagName)&&(K={namespaceURI:Bn,tagName:"template"});const me=Za(O.tagName),Ie=Za(K.tagName);return nd[O.namespaceURI]?O.namespaceURI===aa?K.namespaceURI===br?me==="svg":K.namespaceURI===mi?me==="svg"&&(Ie==="annotation-xml"||id[Ie]):!!uy[me]:O.namespaceURI===mi?K.namespaceURI===br?me==="math":K.namespaceURI===aa?me==="math"&&ad[Ie]:!!cy[me]:O.namespaceURI===br?K.namespaceURI===aa&&!ad[Ie]||K.namespaceURI===mi&&!id[Ie]?!1:!cy[me]&&($F[me]||!uy[me]):!!(hs==="application/xhtml+xml"&&nd[O.namespaceURI]):!1},Fr=function(O){Ui(t.removed,{element:O});try{m(O).removeChild(O)}catch{h(O)}},vi=function(O,K){try{Ui(t.removed,{attribute:K.getAttributeNode(O),from:K})}catch{Ui(t.removed,{attribute:null,from:K})}if(K.removeAttribute(O),O==="is")if(Gt||gr)try{Fr(K)}catch{}else try{K.setAttribute(O,"")}catch{}},dy=function(O){let K=null,me=null;if(ir)O="<remove></remove>"+O;else{const rt=nm(O,/^[\r\n\t ]+/);me=rt&&rt[0]}hs==="application/xhtml+xml"&&Bn===br&&(O='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+O+"</body></html>");const Ie=A?A.createHTML(O):O;if(Bn===br)try{K=new c().parseFromString(Ie,hs)}catch{}if(!K||!K.documentElement){K=N.createDocument(Bn,"template",null);try{K.documentElement.innerHTML=rd?I:Ie}catch{}}const ze=K.body||K.documentElement;return O&&me&&ze.insertBefore(r.createTextNode(me),ze.childNodes[0]||null),Bn===br?X.call(K,wt?"html":"body")[0]:wt?K.documentElement:ze},fy=function(O){return j.call(O.ownerDocument||O,O,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},hy=function(O){O.normalize();const K=j.call(O.ownerDocument||O,O,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let me=K.nextNode();for(;me;){let Ie=me.data;qi([he,H,oe],ze=>{Ie=Bi(Ie,ze," ")}),me.data=Ie,me=K.nextNode()}},el=function(O){const K=T?T(O):null;return typeof K!="string"||ct(K)!=="form"?!1:typeof O.nodeName!="string"||typeof O.textContent!="string"||typeof O.removeChild!="function"||O.attributes!==E(O)||typeof O.removeAttribute!="function"||typeof O.setAttribute!="function"||typeof O.namespaceURI!="string"||typeof O.insertBefore!="function"||typeof O.hasChildNodes!="function"||O.nodeType!==S(O)||O.childNodes!==v(O)},ps=function(O){if(!S||typeof O!="object"||O===null)return!1;try{return S(O)===Kr.documentFragment}catch{return!1}},tl=function(O){if(!S||typeof O!="object"||O===null)return!1;try{return typeof S(O)=="number"}catch{return!1}};function bn(ge,O,K){qi(ge,me=>{me.call(t,O,K,sa)})}const py=function(O){let K=null;if(bn(le.beforeSanitizeElements,O,null),el(O))return Fr(O),!0;const me=ct(O.nodeName);if(bn(le.uponSanitizeElement,O,{tagName:me,allowedTags:$}),Nt&&O.hasChildNodes()&&!tl(O.firstElementChild)&&Tt(/<[/\w!]/g,O.innerHTML)&&Tt(/<[/\w!]/g,O.textContent)||Nt&&O.namespaceURI===br&&me==="style"&&tl(O.firstElementChild)||O.nodeType===Kr.progressingInstruction||Nt&&O.nodeType===Kr.comment&&Tt(/<[/\w]/g,O.data))return Fr(O),!0;if(w[me]||!(we.tagCheck instanceof Function&&we.tagCheck(me))&&!$[me]){if(!w[me]&&vy(me)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,me)||G.tagNameCheck instanceof Function&&G.tagNameCheck(me)))return!1;if(yr&&!At[me]){const Ie=m(O),ze=v(O);if(ze&&Ie){const rt=ze.length;for(let Kt=rt-1;Kt>=0;--Kt){const Vn=p(ze[Kt],!0);Ie.insertBefore(Vn,y(O))}}}return Fr(O),!0}return(S?S(O):O.nodeType)===Kr.element&&!LF(O)||(me==="noscript"||me==="noembed"||me==="noframes")&&Tt(/<\/no(script|embed|frames)/i,O.innerHTML)?(Fr(O),!0):(ot&&O.nodeType===Kr.text&&(K=O.textContent,qi([he,H,oe],Ie=>{K=Bi(K,Ie," ")}),O.textContent!==K&&(Ui(t.removed,{element:O.cloneNode()}),O.textContent=K)),bn(le.afterSanitizeElements,O,null),!1)},my=function(O,K,me){if(_e[K]||Mr&&(K==="id"||K==="name")&&(me in r||me in RF))return!1;const Ie=L[K]||we.attributeCheck instanceof Function&&we.attributeCheck(K,O);if(!(Le&&!_e[K]&&Tt(W,K))){if(!(De&&Tt(fe,K))){if(!Ie||_e[K]){if(!(vy(O)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,O)||G.tagNameCheck instanceof Function&&G.tagNameCheck(O))&&(G.attributeNameCheck instanceof RegExp&&Tt(G.attributeNameCheck,K)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(K,O))||K==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,me)||G.tagNameCheck instanceof Function&&G.tagNameCheck(me))))return!1}else if(!fs[K]){if(!Tt(ee,Bi(me,de,""))){if(!((K==="src"||K==="xlink:href"||K==="href")&&O!=="script"&&im(me,"data:")===0&&na[O])){if(!(je&&!Tt(ce,Bi(me,de,"")))){if(me)return!1}}}}}}return!0},zF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vy=function(O){return!zF[Za(O)]&&Tt(J,O)},gy=function(O){bn(le.beforeSanitizeAttributes,O,null);const K=O.attributes;if(!K||el(O))return;const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let Ie=K.length;for(;Ie--;){const ze=K[Ie],rt=ze.name,Kt=ze.namespaceURI,Vn=ze.value,_n=ct(rt),od=Vn;let kt=rt==="value"?od:LT(od);if(me.attrName=_n,me.attrValue=kt,me.keepAttr=!0,me.forceKeepAttr=void 0,bn(le.uponSanitizeAttribute,O,me),kt=me.attrValue,yn&&(_n==="id"||_n==="name")&&im(kt,$r)!==0&&(vi(rt,O),kt=$r+kt),Nt&&Tt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,kt)){vi(rt,O);continue}if(_n==="attributename"&&nm(kt,"href")){vi(rt,O);continue}if(me.forceKeepAttr)continue;if(!me.keepAttr){vi(rt,O);continue}if(!_t&&Tt(/\/>/i,kt)){vi(rt,O);continue}ot&&qi([he,H,oe],by=>{kt=Bi(kt,by," ")});const yy=ct(O.nodeName);if(!my(yy,_n,kt)){vi(rt,O);continue}if(A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Kt)switch(f.getAttributeType(yy,_n)){case"TrustedHTML":kt=A.createHTML(kt);break;case"TrustedScriptURL":kt=A.createScriptURL(kt);break}if(kt!==od)try{Kt?O.setAttributeNS(Kt,rt,kt):O.setAttribute(rt,kt),el(O)?Fr(O):rm(t.removed)}catch{vi(rt,O)}}bn(le.afterSanitizeAttributes,O,null)},rl=function(O){let K=null;const me=fy(O);for(bn(le.beforeSanitizeShadowDOM,O,null);K=me.nextNode();)if(bn(le.uponSanitizeShadowNode,K,null),py(K),gy(K),ps(K.content)&&rl(K.content),(S?S(K):K.nodeType)===Kr.element){const Ie=g?g(K):K.shadowRoot;ps(Ie)&&(oa(Ie),rl(Ie))}bn(le.afterSanitizeShadowDOM,O,null)},oa=function(O){const K=S?S(O):O.nodeType;if(K===Kr.element){const ze=g?g(O):O.shadowRoot;ps(ze)&&(oa(ze),rl(ze))}const me=v?v(O):O.childNodes;if(!me)return;const Ie=[];qi(me,ze=>{Ui(Ie,ze)});for(const ze of Ie)oa(ze);if(K===Kr.element){const ze=T?T(O):null;if(typeof ze=="string"&&ct(ze)==="template"){const rt=O.content;ps(rt)&&oa(rt)}}};return t.sanitize=function(ge){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=null,me=null,Ie=null,ze=null;if(rd=!ge,rd&&(ge="<!-->"),typeof ge!="string"&&!tl(ge)&&(ge=VT(ge),typeof ge!="string"))throw Ha("dirty is not a string, aborting");if(!t.isSupported)return ge;if(Rt||sd(O),t.removed=[],typeof ge=="string"&&(Xr=!1),Xr){const Vn=T?T(ge):ge.nodeName;if(typeof Vn=="string"){const _n=ct(Vn);if(!$[_n]||w[_n])throw Ha("root node is forbidden and cannot be sanitized in-place")}if(el(ge))throw Ha("root node is clobbered and cannot be sanitized in-place");oa(ge)}else if(tl(ge))K=dy("<!---->"),me=K.ownerDocument.importNode(ge,!0),me.nodeType===Kr.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?K=me:K.appendChild(me),oa(me);else{if(!Gt&&!ot&&!wt&&ge.indexOf("<")===-1)return A&&Pr?A.createHTML(ge):ge;if(K=dy(ge),!K)return Gt?null:Pr?I:""}K&&ir&&Fr(K.firstChild);const rt=fy(Xr?ge:K);for(;Ie=rt.nextNode();)py(Ie),gy(Ie),ps(Ie.content)&&rl(Ie.content);if(Xr)return ot&&hy(ge),ge;if(Gt){if(ot&&hy(K),gr)for(ze=R.call(K.ownerDocument);K.firstChild;)ze.appendChild(K.firstChild);else ze=K;return(L.shadowroot||L.shadowrootmode)&&(ze=U.call(n,ze,!0)),ze}let Kt=wt?K.outerHTML:K.innerHTML;return wt&&$["!doctype"]&&K.ownerDocument&&K.ownerDocument.doctype&&K.ownerDocument.doctype.name&&Tt(eA,K.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+K.ownerDocument.doctype.name+`>
77
77
  `+Kt),ot&&qi([he,H,oe],Vn=>{Kt=Bi(Kt,Vn," ")}),A&&Pr?A.createHTML(Kt):Kt},t.setConfig=function(){sd(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Rt=!0},t.clearConfig=function(){sa=null,Rt=!1},t.isValidAttribute=function(ge,O,K){return sa||sd({}),my(ct(ge),ct(O),K)},t.addHook=function(ge,O){typeof O=="function"&&Ui(le[ge],O)},t.removeHook=function(ge,O){if(O!==void 0){const K=NT(le[ge],O);return K===-1?void 0:RT(le[ge],K,1)[0]}return rm(le[ge])},t.removeHooks=function(ge){le[ge]=[]},t.removeAllHooks=function(){le=fm()},t}var pm=hm(),iA=q('<span class="go-sub-ticket-description"></span>'),aA=q('<span class="go-sub-ticket-quantity"> </span>'),sA=q('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function ju(e,t){te(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),a=_(t,"onChange",7),s=_(t,"preview",7,!1);const o=P(()=>r().min_persons===r().max_persons);var l={get sub(){return r()},set sub(g){r(g),b()},get quantity(){return n()},set quantity(g){n(g),b()},get max(){return i()},set max(g=r.max_persons){i(g),b()},get onChange(){return a()},set onChange(g){a(g),b()},get preview(){return s()},set preview(g=!1){s(g),b()}},c=sA(),f=D(c),u=D(f,!0);C(f);var p=V(f,2),h=g=>{var E=iA();Ef(E,()=>pm.sanitize(r().description),!0),C(E),x(g,E)};ue(p,g=>{r().description&&g(h)});var y=V(p,2),v=g=>{var E=aA(),S=D(E,!0);C(E),Y(()=>{pe(E,"data-testid",`sub-ticket-${r().id??""}-quantity`),Z(S,n())}),x(g,E)},m=g=>{{let E=P(()=>r().title||k.t("cart.content.table.edit"));vo(g,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return d(E)},deselectable:!1,get onChange(){return a()}})}};return ue(y,g=>{s()||d(o)?g(v):g(m,-1)}),C(c),Y(()=>{Et(c,1,dr(["go-sub-ticket",d(o)&&"is-fixed",s()&&"is-preview",n()===0&&"is-empty"])),pe(c,"data-testid",`sub-ticket-${r().id??""}`),Z(u,r().title)}),x(e,c),re(l)}ne(ju,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});function mm(e,t){const{product:r}=e;return ja(r)?[r.event_title,e.time&&mp(e.time,t),r.title].filter(Boolean).join(" - "):r.title}var oA=q('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),lA=q('<span class="go-cart-item-price-discounted"> </span>'),uA=q('<span data-testid="cart-item-participant-count"> </span>'),cA=q('<span data-testid="cart-item-voucher-quantity"> </span>'),dA=q("<span> </span>"),fA=q('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),hA=q('<ul class="go-sub-tickets" role="list"></ul>'),pA=q('<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> <!>',1);function vm(e,t){te(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),a=se(void 0),s=se(Pe({}));const o=P(()=>k.cart?.items.find(g=>g.uuid===(r().display?.reference_uuid??r().uuid))),l=P(()=>Vr(r().product)?r().product:null),c=ei();ve(()=>{k.cart?.items.map(g=>g.quantity),k.cart?.items.forEach(g=>g.mantle&&Object.values(g.mantle.composition)),Re(()=>{F(a,k.capacityManager.capacity(n(),r(),c),!0),F(s,d(o)?k.capacityManager.subTicketMaxes(k.cart,d(o),c):{},!0)})});function f(g){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).quantity=Math.max(0,d(o).quantity-r().quantity+g)}function u(){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}const g=Math.max(0,d(o).quantity-r().quantity);g===0?k.cart?.deleteItem(d(o)):d(o).quantity=g}function p(g,E){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).mantle&&(d(o).mantle.composition[g]=E)}var h={get displayItem(){return r()},set displayItem(g){r(g),b()},get displayCart(){return n()},set displayCart(g){n(g),b()},get preview(){return i()},set preview(g){i(g),b()}},y=ie(),v=B(y),m=g=>{var E=pA(),S=B(E),T=D(S),A=D(T),I=D(A),M=G=>{Wp(G,{get cartItem(){return r()}})},N=G=>{Zp(G,{get cartItem(){return r()}})},j=G=>{jp(G,{get cartItem(){return r()}})},R=G=>{Hp(G,{get cartItem(){return r()}})};ue(I,G=>{r().product.type==="Ticket"?G(M):r().product.type==="Event"?G(N,1):r().product.type==="Coupon"?G(j,2):r().product.type==="Tour"&&G(R,3)}),C(A);var X=V(A,2),U=D(X),le=G=>{var w=oA(),_e=B(w),we=D(_e,!0);C(_e);var De=V(_e,2),Le=D(De,!0);C(De),Y((je,_t)=>{Z(we,je),Z(Le,_t)},[()=>et(r().display.originalPrice),()=>et(r().final_price_cents)]),x(G,w)},he=G=>{var w=lA(),_e=D(w,!0);C(w),Y(we=>Z(_e,we),[()=>et(r().final_price_cents)]),x(G,w)};ue(U,G=>{r().display?.discounted?G(le):G(he,-1)}),C(X);var H=V(X,2),oe=D(H),W=G=>{var w=uA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().product.participants)),x(G,w)},fe=G=>{var w=cA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().quantity)),x(G,w)},ce=G=>{var w=dA(),_e=D(w,!0);C(w),Y(()=>Z(_e,r().quantity)),x(G,w)},de=G=>{{let w=P(()=>r().quantity??0),_e=P(()=>mm(r(),k.locale));vo(G,{get value(){return d(w)},get min(){return d(a).min},get max(){return d(a).max},get label(){return d(_e)},floor:1,onChange:f,onDecrementBelowMin:u})}};ue(oe,G=>{r().product.type==="Tour"?G(W):r().voucher?.code?G(fe,1):i()?G(ce,2):G(de,-1)}),C(H);var J=V(H,2),ee=G=>{var w=fA(),_e=D(w),we=D(_e,!0);C(_e),C(w),Y((De,Le)=>{pe(_e,"aria-label",De),Z(we,Le)},[()=>k.t("cart.item.aria.removeItem"),()=>k.t("cart.item.remove")]),ut("click",_e,u),x(G,w)};ue(J,G=>{i()||G(ee)});var $=V(J,2),ae=D($,!0);C($),C(T),C(S);var L=V(S,2),be=G=>{var w=hA();Me(w,21,()=>qa(d(l)),_e=>_e.id,(_e,we)=>{{let De=P(()=>r().mantle?.composition?.[d(we).id]??0);ju(_e,{get sub(){return d(we)},get preview(){return i()},get quantity(){return d(De)},get max(){return d(s)[d(we).id]},onChange:Le=>p(d(we).id,Le)})}}),C(w),Y(()=>pe(w,"aria-label",d(l).title)),x(G,w)};ue(L,G=>{d(l)&&G(be)}),Y(G=>Z(ae,G),[()=>et(r().total_price_cents)]),x(g,E)};return ue(v,g=>{d(a)&&g(m)}),x(e,y),re(h)}Bt(["click"]),ne(vm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var mA=q('<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>'),vA=q('<article class="go-cart-donation" data-testid="cart-donation"><ul><li class="go-cart-item-title-container"><span class="go-cart-donation-title"> </span></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 gm(e,t){te(t,!0);let r=_(t,"donation",7),n=_(t,"preview",7);const i=P(()=>k.donations?.campaigns?.find(m=>m.id===r().campaign_id));function a(){k.cart?.removeDonation(r().campaign_id,r().value)}var s={get donation(){return r()},set donation(m){r(m),b()},get preview(){return n()},set preview(m){n(m),b()}},o=vA(),l=D(o),c=D(l),f=D(c),u=D(f,!0);C(f),C(c);var p=V(c,6),h=m=>{var g=mA(),E=D(g),S=D(E,!0);C(E),C(g),Y((T,A)=>{pe(E,"aria-label",T),Z(S,A)},[()=>k.t("cart.item.aria.removeItem"),()=>k.t("cart.item.remove")]),ut("click",E,a),x(m,g)};ue(p,m=>{n()||m(h)});var y=V(p,2),v=D(y,!0);return C(y),C(l),C(o),Y((m,g)=>{Z(u,m),Z(v,g)},[()=>d(i)?.name??k.t("cart.donation.title"),()=>et(r().value)]),x(e,o),re(s)}Bt(["click"]),ne(gm,{donation:{},preview:{}},[],[],{mode:"open"});var gA=q('<li class="go-cart-header-remove"></li>'),ym=q('<li class="go-cart-item"><!></li>'),yA=q('<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 bA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=yA(),c=D(l),f=D(c),u=D(f),p=D(u,!0);C(u);var h=V(u,2),y=D(h,!0);C(h);var v=V(h,2),m=D(v,!0);C(v);var g=V(v,2),E=M=>{var N=gA();x(M,N)};ue(g,M=>{d(n).preview||M(E)});var S=V(g,2),T=D(S,!0);C(S),C(f),C(c);var A=V(c,2);Me(A,17,()=>d(n).displayCart.items,M=>M.uuid,(M,N)=>{var j=ym();vm(D(j),{get displayItem(){return d(N)},get displayCart(){return d(n).displayCart},get preview(){return d(n).preview}}),C(j),x(M,j)});var I=V(A,2);Me(I,17,()=>d(n).displayCart.donations,M=>M.campaign_id+"-"+M.value,(M,N)=>{var j=ym();gm(D(j),{get donation(){return d(N)},get preview(){return d(n).preview}}),C(j),x(M,j)}),C(l),Y((M,N,j,R)=>{Z(p,M),Z(y,N),Z(m,j),Z(T,R)},[()=>k.t("cart.content.table.desc"),()=>k.t("cart.content.table.price"),()=>k.t("cart.content.table.quantity"),()=>k.t("cart.content.table.total")]),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&(d(n).displayCart.items.length||d(n).displayCart.donations.length)&&o(s)}),x(e,i),re()}customElements.define("go-cart-items",ne(bA,{},[],[]));var _A=q('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),wA=q('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),kA=q('<ol data-testid="cart-coupons"></ol>');function SA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=kA();Me(l,21,()=>d(n).displayCart.coupons,c=>c.code,(c,f)=>{var u=wA();let p;var h=D(u),y=D(h),v=D(y),m=D(v,!0);C(v);var g=V(v,2),E=S=>{var T=_A(),A=D(T);C(T),Y(I=>pe(A,"aria-label",I),[()=>k.t("cart.coupons.remove")]),ut("click",A,()=>k.cart?.removeCoupon(d(f).code)),x(S,T)};ue(g,S=>{d(n).preview||S(E)}),C(y),C(h),C(u),Y(()=>{p=Et(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!d(f).applied}),Z(m,d(f).code)}),x(c,u)}),C(l),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.coupons.length>0&&o(s)}),x(e,i),re()}Bt(["click"]),customElements.define("go-cart-coupons",ne(SA,{},[],[]));var EA=q('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function xA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=EA(),c=D(l,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).totalPriceCents)]),x(o,l)};ue(a,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(s)}),x(e,i),re()}customElements.define("go-cart-total-amount",ne(xA,{},[],[]));function TA(e,t){te(t,!0);const r=_(t,"preview",7,!1),n=new lT;uT(t.$$host,n),ve(()=>{n.preview=r()}),ve(()=>{k.cart&&(k.cart.items.map(a=>a.uuid+":"+a.quantity+":"+a.time),k.cart.coupons.map(a=>a.code).join("|"),k.cart.items.forEach(a=>a.mantle&&Object.values(a.mantle.composition)),k.cart.donations.map(a=>a.campaign_id+":"+a.value).join("|"),Re(()=>n.calculateDisplayCart()))});async function i(){const a=t.$$host.querySelectorAll("go-coupon-redemption");let s=!0;for(const o of a){const l=await o.flush?.();l&&!l.success&&(s=!1)}return s}return t.$$host.addEventListener("click",async a=>{const s=a.target.closest("go-submit");if(!s)return;const o=s.closest("go-form");if(o&&t.$$host.contains(o))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(a=!1){r(a),b()}})}customElements.define("go-cart",ne(TA,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var AA=q('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function CA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=AA(),c=D(l,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).subtotalPriceCents)]),x(o,l)};ue(a,o=>{d(n)&&k.cart?.items.length&&o(s)}),x(e,i),re()}customElements.define("go-cart-subtotal-amount",ne(CA,{},[],[]));var OA=q('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function DA(e,t){te(t,!0);const r=Li(t.$$host),n=P(()=>r.value);var i=ie(),a=B(i),s=o=>{var l=OA(),c=V(D(l),1,!0);C(l),Y(f=>Z(c,f),[()=>et(d(n).discountedAmountCents)]),x(o,l)};ue(a,o=>{d(n)&&d(n).discountedAmountCents>0&&o(s)}),x(e,i),re()}customElements.define("go-cart-discounted-amount",ne(DA,{},[],[]));function IA(e,t){te(t,!0),Hr(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ne(IA,{},[],[]));function PA(e,t){te(t,!0);let r=P(()=>k.cart?.items.length);gt();var n=Vt();Y(()=>Z(n,d(r))),x(e,n),re()}customElements.define("go-cart-counter",ne(PA,{},[],[]));function MA(e){const t=document.createElement("form");t.method="post",t.action=e.url;for(const[r,n]of Object.entries(e.params)){const i=document.createElement("input");i.type="hidden",i.name=r,i.value=String(n),t.appendChild(i)}document.body.appendChild(t),t.submit()}async function bm(e,t){const r=k.cart;if(!r)return;const n=e.details.fieldValue("paymentMode");r.paymentModeId=n==null?void 0:String(n);const i=await k.checkout(r.orderData());if(i.error){e.details.apiErrors=i.error;return}const a=Ge.config.forms[t]?.beforeSubmit;a&&await a(e.details.formData);const s=i.data.meta,o=Ge.config.navigateTo,l=Ge.config.urls.checkoutFailure??k.urls.checkoutFailure;if(s.status==="success"){const c=Ge.config.urls.checkoutSuccess??k.urls.checkoutSuccess;o?.(c(i.data.order.token))}else s.status==="fail"?o?.(l("")):s.payment_url?o?.(s.payment_url):s.payment_data?MA(s.payment_data):o?.(l(""))}function _m(e,t){Pt.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}]}),Hr(e,"go-form",{"form-id":"checkoutGuest",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;if(!k.cart)return;const i=await k.signUp(n.details.formData,!0);if(i.error){n.details.apiErrors=i.error.errors;return}await bm(n,"checkoutGuest")})}function $A(e,t){Pt.defineForm({id:"checkoutUser",submitLabel:"cart.detail.actions.checkout",fields:[{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutUser",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;await bm(n,"checkoutUser")})}function FA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return _m(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-form",ne(FA,{custom:{}},[],[]));function NA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return _m(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-guest",ne(NA,{custom:{}},[],[]));function RA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return $A(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-user",ne(RA,{custom:{}},[],[]));var LA="TokenActions::ApplyOrderDiscount";async function zA(e){if(!k.cart)throw new Error("(go-coupon-redemption): cart not found");const t=k.cart,r=await k.asyncFetch(()=>k.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===LA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?UA(e,r):r.value_cents&&r.value_cents>0?qA(e,r.value_cents):Zu([k.t("cart.coupon.form.errors.notValid")]):Zu([k.t("cart.coupon.form.errors.notValid")])}function qA(e,t){return k.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function UA(e,t){const r=e.toUpperCase();if(k.cart.coupons.some(s=>s.code===r))return{success:!0};const n=await k.asyncFetch(()=>k.tickets({"by_ticket_ids[]":[t.is_voucher_for]})),i=Array.isArray(n)?n.find(s=>s.id===t.is_voucher_for):void 0;if(!i)return Zu([k.t("cart.coupon.form.errors.error")]);const a={...i,price_cents:0};return k.cart.addItem(nt(Ua(a),{quantity:1,voucher:{code:r}})),k.cart.addCoupon({code:r,kind:"serviceVoucher"}),{success:!0}}function Zu(e){return{success:!1,errors:e}}var BA=q("<go-form></go-form>",2);function VA(e,t){te(t,!0),Pt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(o){const l=o.details.fields.find(u=>u.key==="token"),c=(o.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const f=await zA(c);return f.success?(o.details.apiErrors=[],l&&(l.value=""),o.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),f):(o.details.apiErrors=f.errors,f)}async function n(o){await r(o.target)}async function i(){const o=t.$$host.querySelector("go-form");return o?.details?r(o):{success:!0}}var a={flush:i},s=BA();return Tn(s,"formId","couponRedemption"),Ta("submit",s,n),x(e,s),re(a)}customElements.define("go-coupon-redemption",ne(VA,{},[],["flush"]));var jA=q('<span class="go-donation-checkbox-label"></span>'),ZA=q('<span class="go-donation-checkbox-label"> </span>'),WA=q('<label class="go-donation-checkbox"><input type="checkbox" data-testid="donation-checkbox"/> <!></label>');function HA(e,t){te(t,!0);let r=_(t,"campaignId",7),n=_(t,"amountCents",7),i=_(t,"describedby",7);const a=document.createDocumentFragment();for(const g of Array.from(t.$$host.childNodes))!(g.nodeType===Node.TEXT_NODE&&g.textContent==="")&&g.nodeType!==Node.COMMENT_NODE&&a.appendChild(g);const s=Array.from(a.childNodes).some(g=>g.nodeType===Node.ELEMENT_NODE||!!g.textContent?.trim());let o=se(void 0);ve(()=>{if(!s||!d(o))return;const g=d(o);return g.appendChild(a),()=>{for(;g.firstChild;)a.appendChild(g.firstChild)}});const l=P(()=>k.donations?.campaigns?.find(g=>g.id===r())),c=P(()=>!k.currentUser?.isAuthenticated||k.currentUser?.isGuest),f=P(()=>!!d(l)&&d(l).guest_limit>0&&(n()??0)>d(l).guest_limit&&d(c)),u=P(()=>!!d(l)&&!!n()&&!!k.cart?.hasDonation(d(l).id,n()));function p(g){!d(l)||!n()||!k.cart||(g.currentTarget.checked?k.cart.addDonation({value:n(),campaign_id:d(l).id}):k.cart.removeDonation(d(l).id,n()))}var h={get campaignId(){return r()},set campaignId(g){r(g),b()},get amountCents(){return n()},set amountCents(g){n(g),b()},get describedby(){return i()},set describedby(g){i(g),b()}},y=ie(),v=B(y),m=g=>{var E=WA(),S=D(E);Ai(S);var T=V(S,2),A=M=>{var N=jA();Us(N,j=>F(o,j),()=>d(o)),x(M,N)},I=M=>{var N=ZA(),j=D(N,!0);C(N),Y(R=>Z(j,R),[()=>k.t("donations.checkbox.label",{campaign:d(l).name,amount:et(n())})]),x(M,N)};ue(T,M=>{s?M(A):M(I,-1)}),C(E),Y(()=>{Pf(S,d(u)),pe(S,"aria-describedby",i()||void 0)}),ut("change",S,p),x(g,E)};return ue(v,g=>{d(l)&&n()&&n()>0&&!d(f)&&g(m)}),x(e,y),re(h)}Bt(["change"]),customElements.define("go-donation-checkbox",ne(HA,{campaignId:{attribute:"campaign-id",type:"Number"},amountCents:{attribute:"amount-cents",type:"Number"},describedby:{attribute:"describedby",type:"String"}},[],[])),Cb();var GA=class{#e=se();get campaign(){return d(this.#e)}set campaign(e){F(this.#e,e,!0)}#t=se();get amount(){return d(this.#t)}set amount(e){F(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")||"[]");fr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!k.currentUser?.isAuthenticated||k.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",k.urls.cart()),window.location.replace(k.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",k.urls.cart()),window.location.replace(k.urls.cart())}},Ot=new GA,KA=q('<img alt="logo"/>'),YA=q('<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 wm(e,t){te(t,!0);let r=_(t,"campaign",7);const n=P(()=>r().translations);var i={get campaign(){return r()},set campaign(v){r(v),b()}},a=YA();let s;var o=D(a),l=D(o),c=v=>{var m=KA();Y(g=>pe(m,"src",g),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(v,m)};ue(l,v=>{r().picture.thumbnail&&v(c)}),C(o);var f=V(o,2),u=D(f),p=D(u,!0);C(u);var h=V(u,2),y=D(h,!0);return C(h),C(f),C(a),Y(()=>{s=Et(a,1,"go-donation-campaign",null,s,{selected:Ot.campaign?.id===r()?.id}),Z(p,d(n)["donations.headline"]),Z(y,d(n)["donations.shop.info"])}),ut("click",a,()=>Ot.selectCampaign(r())),ut("keydown",a,v=>{v.key==="Enter"&&Ot.selectCampaign(r())}),x(e,a),re(i)}Bt(["click","keydown"]),ne(wm,{campaign:{}},[],[],{mode:"open"});var JA=q("<button> </button>"),QA=q('<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>'),XA=q('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function km(e,t){te(t,!0);const r=Ot.campaign?.guest_limit?Ot.campaign.guest_limit/100:void 0;let n=se(void 0);function i(p){Ot.amount=p,F(n,null)}function a(p){const h=document.getElementById("donationForm");h.checkValidity()?Ot.amount=p.target.valueAsNumber*100:(Ot.amount=void 0,h.reportValidity())}var s=XA(),o=D(s),l=D(o,!0);C(o);var c=V(o,2);Me(c,20,()=>Ot.campaign?.options,p=>p,(p,h)=>{var y=JA();let v;var m=D(y,!0);C(y),Y(g=>{v=Et(y,1,"btn btn-default",null,v,{selected:Ot.amount===h}),Z(m,g)},[()=>et(h)]),ut("click",y,()=>i(h)),x(p,y)}),C(c);var f=V(c,2),u=p=>{var h=QA(),y=D(h),v=D(y),m=D(v,!0);C(v);var g=V(v,2);Ai(g),C(y),C(h),Y((E,S)=>{Z(m,E),pe(g,"max",r),pe(g,"placeholder",S),Bl(g,d(n))},[()=>k.t("donations.selection.custom.label"),()=>k.t("donations.selection.custom.input.placeholder")]),ut("input",g,a),x(p,h)};ue(f,p=>{Ot.campaign?.free_donations&&p(u)}),C(s),Y(p=>Z(l,p),[()=>k.t("donations.selection.title")]),x(e,s),re()}Bt(["click","input"]),ne(km,{},[],[],{mode:"open"});var eC=q('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function tC(e,t){te(t,!1),En(()=>{k.donations?.campaigns?.length==1&&Ot.selectCampaign(k.donations?.campaigns[0])}),Jl();var r=ie(),n=B(r),i=a=>{var s=eC(),o=D(s);Me(o,1,()=>k?.donations?.campaigns,v=>v.id,(v,m)=>{wm(v,{get campaign(){return d(m)}})});var l=V(o,2),c=v=>{km(v,{})};ue(l,v=>{Ot.campaign&&v(c)});var f=V(l,2),u=D(f),p=D(u,!0);C(u);var h=V(u,2),y=D(h,!0);C(h),C(f),C(s),Y((v,m)=>{Z(p,v),h.disabled=!Ot.amount,Z(y,m)},[()=>k.t("donations.actions.continueWithoutDonation"),()=>k.t("donations.actions.addToCart")]),ut("click",u,function(...v){Ot.skipDonation?.apply(this,v)}),ut("click",h,function(...v){Ot.addDonationToCart?.apply(this,v)}),x(a,s)};ue(n,a=>{k.donations&&k.donations.campaigns&&a(i)}),x(e,r),re()}Bt(["click"]),customElements.define("go-donations",ne(tC,{},[],[]));function rC(e){return typeof e=="function"}function Ga(e){return e!==null&&typeof e=="object"}var nC=["string","number","bigint","boolean"];function Wu(e){return e==null||nC.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Wu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var yo=Symbol("box"),Sm=Symbol("is-writable");function z(e,t){const r=P(e);return t?{[yo]:!0,[Sm]:!0,get current(){return d(r)},set current(n){t(n)}}:{[yo]:!0,get current(){return e()}}}function Em(e){return Ga(e)&&yo in e}function iC(e){return Em(e)?e:rC(e)?z(e):xr(e)}function xr(e){let t=se(Pe(e));return{[yo]:!0,[Sm]:!0,get current(){return d(t)},set current(r){F(t,r,!0)}}}function xm(...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 Tm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aC=/\n/g,sC=/^\s*/,oC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lC=/^:\s*/,uC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cC=/^[;\s]*/,dC=/^\s+|\s+$/g,fC=`
78
78
  `,Am="/",Cm="*",ni="",hC="comment",pC="declaration";function mC(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(y){var v=y.match(aC);v&&(r+=v.length);var m=y.lastIndexOf(fC);n=~m?y.length-m:n+y.length}function a(){var y={line:r,column:n};return function(v){return v.position=new s(y),c(),v}}function s(y){this.start=y,this.end={line:r,column:n},this.source=t.source}s.prototype.content=e;function o(y){var v=new Error(t.source+":"+r+":"+n+": "+y);if(v.reason=y,v.filename=t.source,v.line=r,v.column=n,v.source=e,!t.silent)throw v}function l(y){var v=y.exec(e);if(v){var m=v[0];return i(m),e=e.slice(m.length),v}}function c(){l(sC)}function f(y){var v;for(y=y||[];v=u();)v!==!1&&y.push(v);return y}function u(){var y=a();if(!(Am!=e.charAt(0)||Cm!=e.charAt(1))){for(var v=2;ni!=e.charAt(v)&&(Cm!=e.charAt(v)||Am!=e.charAt(v+1));)++v;if(v+=2,ni===e.charAt(v-1))return o("End of comment missing");var m=e.slice(2,v-2);return n+=2,i(m),e=e.slice(v),n+=2,y({type:hC,comment:m})}}function p(){var y=a(),v=l(oC);if(v){if(u(),!l(lC))return o("property missing ':'");var m=l(uC),g=y({type:pC,property:Om(v[0].replace(Tm,ni)),value:m?Om(m[0].replace(Tm,ni)):ni});return l(cC),g}}function h(){var y=[];f(y);for(var v;v=p();)v!==!1&&(y.push(v),f(y));return y}return c(),h()}function Om(e){return e?e.replace(dC,ni):ni}function vC(e,t){let r=null;if(!e||typeof e!="string")return r;const n=mC(e),i=typeof t=="function";return n.forEach(a=>{if(a.type!=="declaration")return;const{property:s,value:o}=a;i?t(s,o,a):o&&(r=r||{},r[s]=o)}),r}var gC=/\d/,yC=["-","_","/","."];function bC(e=""){if(!gC.test(e))return e!==e.toLowerCase()}function _C(e){const t=[];let r="",n,i;for(const a of e){const s=yC.includes(a);if(s===!0){t.push(r),r="",n=void 0;continue}const o=bC(a);if(i===!1){if(n===!1&&o===!0){t.push(r),r=a,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+a,n=o;continue}}r+=a,n=o,i=s}return t.push(r),t}function Dm(e){return e?_C(e).map(t=>kC(t)).join(""):""}function wC(e){return SC(Dm(e||""))}function kC(e){return e?e[0].toUpperCase()+e.slice(1):""}function SC(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ka(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Dm(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[wC(n)]=i}return vC(e,r),t}function Ya(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function EC(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 xC=EC(/[A-Z]/,e=>`-${e.toLowerCase()}`);function TC(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=>`${xC(t)}: ${e[t]};`).join(`
@@ -9801,11 +9801,18 @@ var Nx = class {
9801
9801
  F(this.#r, e, !0);
9802
9802
  }
9803
9803
  get formData() {
9804
- function e(r) {
9805
- return rw(r) || X_(r) ? r : r === "true" || r === "false" ? r === "true" : !Number.isNaN(+r) && r.trim() !== "" ? +r : r;
9804
+ const e = [
9805
+ "select",
9806
+ "radio",
9807
+ "number",
9808
+ "paymentMode"
9809
+ ];
9810
+ function t(n) {
9811
+ const i = n.value;
9812
+ return rw(i) || X_(i) ? i : i === "true" || i === "false" ? i === "true" : e.includes(n.type) && !Number.isNaN(+i) && i.trim() !== "" ? +i : i;
9806
9813
  }
9807
- const t = this.fields.filter((r) => r !== void 0).filter((r) => r.type !== "file").filter((r) => r.value !== "");
9808
- return Object.fromEntries(t.map((r) => [r.apiKey, e(r.value)]));
9814
+ const r = this.fields.filter((n) => n !== void 0).filter((n) => n.type !== "file").filter((n) => n.value !== "");
9815
+ return Object.fromEntries(r.map((n) => [n.apiKey, t(n)]));
9809
9816
  }
9810
9817
  fieldValue(e) {
9811
9818
  return this.fields.find((t) => t.key === e)?.value;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "4.17.0",
7
+ "version": "4.17.1",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",