@session-services/web-elements 0.1.35 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{t as e,p as t,H as i,c as n,h as r,a as o}from"./index.js";var a;function s(e,t,i){function n(i,n){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:n,constr:a,traits:new Set},enumerable:!1}),i._zod.traits.has(e))return;i._zod.traits.add(e),t(i,n);let r=a.prototype,o=Object.keys(r);for(let e=0;e<o.length;e++){let t=o[e];t in i||(i[t]=r[t].bind(i))}}let r=i?.Parent??Object;class o extends r{}function a(e){var t;let r=i?.Parent?new o:this;n(r,e),(t=r._zod).deferred??(t.deferred=[]);for(let e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(i?.Parent&&t instanceof i.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var d=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},c=class extends Error{constructor(e){super("Encountered unidirectional transform during encode: "+e),this.name="ZodEncodeError"}};(a=globalThis).__zod_globalConfig??(a.__zod_globalConfig={});const l=globalThis.__zod_globalConfig;function u(){return l}function p(e){let t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,i])=>-1===t.indexOf(+e))).map((([e,t])=>t))}function m(e,t){return"bigint"==typeof t?""+t:t}function h(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function f(e){return null==e}function y(e){let t=+!!e.startsWith("^"),i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}const g=Symbol("evaluating");function v(e,t,i){let n;Object.defineProperty(e,t,{get(){if(n!==g)return void 0===n&&(n=g,n=i()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function b(e,t,i){Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}function w(...e){let t={};for(let i of e)Object.assign(t,Object.getOwnPropertyDescriptors(i));return Object.defineProperties({},t)}function $(e){return JSON.stringify(e)}const I="captureStackTrace"in Error?Error.captureStackTrace:()=>{};function E(e){return"object"==typeof e&&!!e&&!Array.isArray(e)}const k=h((()=>{if(l.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch{return!1}}));function T(e){if(!1===E(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let i=t.prototype;return!(!1===E(i)||!1===Object.prototype.hasOwnProperty.call(i,"isPrototypeOf"))}function A(e){return T(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const x=new Set(["string","number","symbol"]);function S(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function D(e,t,i){let n=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(n._zod.parent=e),n}function C(e){let t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const O={safeint:[-9007199254740991,2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function P(e,t=0){if(!0===e.aborted)return!0;for(let i=t;i<e.issues.length;i++)if(!0!==e.issues[i]?.continue)return!0;return!1}function R(e,t=0){if(!0===e.aborted)return!0;for(let i=t;i<e.issues.length;i++)if(!1===e.issues[i]?.continue)return!0;return!1}function _(e,t){return t.map((t=>{var i;return(i=t).path??(i.path=[]),t.path.unshift(e),t}))}function N(e){return"string"==typeof e?e:e?.message}function U(e,t,i){let n=e.message?e.message:N(e.inst?._zod.def?.error?.(e))??N(t?.error?.(e))??N(i.customError?.(e))??N(i.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...s}=e;return s.path??=[],s.message=n,t?.reportInput&&(s.input=a),s}function M(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function L(...e){let[t,i,n]=e;return"string"==typeof t?{message:t,code:"custom",input:i,inst:n}:{...t}}const q=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,m,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},G=s("$ZodError",q),j=s("$ZodError",q,{Parent:Error}),B=e=>(t,i,n,r)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:i,issues:[]},o);if(a instanceof Promise)throw new d;if(a.issues.length){let t=new(r?.Err??e)(a.issues.map((e=>U(e,o,u()))));throw I(t,r?.callee),t}return a.value},F=e=>async(t,i,n,r)=>{let o=n?{...n,async:!0}:{async:!0},a=t._zod.run({value:i,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(r?.Err??e)(a.issues.map((e=>U(e,o,u()))));throw I(t,r?.callee),t}return a.value},V=e=>(t,i,n)=>{let r=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new d;return o.issues.length?{success:!1,error:new(e??G)(o.issues.map((e=>U(e,r,u()))))}:{success:!0,data:o.value}},z=V(j),W=e=>async(t,i,n)=>{let r=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map((e=>U(e,r,u()))))}:{success:!0,data:o.value}},Y=W(j),H=/^[cC][0-9a-z]{6,}$/,Z=/^[0-9a-z]+$/,K=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,J=/^[0-9a-vA-V]{20}$/,Q=/^[A-Za-z0-9]{27}$/,X=/^[a-zA-Z0-9_-]{21}$/,ee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,te=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ie=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ne=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,re=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ae=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,se=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,de=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ce=/^[A-Za-z0-9_-]*$/,le=/^https?$/,ue=/^\+[1-9]\d{6,14}$/,pe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",me=RegExp(`^${pe}$`);function he(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?""+t:0===e.precision?t+":[0-5]\\d":`${t}:[0-5]\\d\\.\\d{${e.precision}}`:t+"(?::[0-5]\\d(?:\\.\\d+)?)?"}const fe=/^-?\d+$/,ye=/^-?\d+(?:\.\d+)?$/,ge=/^(?:true|false)$/i,ve=/^null$/i,be=/^undefined$/i,we=/^[^A-Z]*$/,$e=/^[^a-z]*$/,Ie=s("$ZodCheck",((e,t)=>{var i;e._zod??={},e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])})),Ee={number:"number",bigint:"bigint",object:"date"},ke=s("$ZodCheckLessThan",((e,t)=>{Ie.init(e,t);let i=Ee[typeof t.value];e._zod.onattach.push((e=>{let i=e._zod.bag;t.value<((t.inclusive?i.maximum:i.exclusiveMaximum)??1/0)&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)})),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:i,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Te=s("$ZodCheckGreaterThan",((e,t)=>{Ie.init(e,t);let i=Ee[typeof t.value];e._zod.onattach.push((e=>{let i=e._zod.bag;t.value>((t.inclusive?i.minimum:i.exclusiveMinimum)??-1/0)&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)})),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:i,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Ae=s("$ZodCheckMultipleOf",((e,t)=>{Ie.init(e,t),e._zod.onattach.push((e=>{var i;(i=e._zod.bag).multipleOf??(i.multipleOf=t.value)})),e._zod.check=i=>{if(typeof i.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof i.value?i.value%t.value===BigInt(0):0===function(e,t){let i=e/t,n=Math.round(i),r=2**-52*Math.max(Math.abs(i),1);return Math.abs(i-n)<r?0:i-n}(i.value,t.value))||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:t.value,input:i.value,inst:e,continue:!t.abort})}})),xe=s("$ZodCheckNumberFormat",((e,t)=>{Ie.init(e,t),t.format=t.format||"float64";let i=t.format?.includes("int"),n=i?"int":"number",[r,o]=O[t.format];e._zod.onattach.push((e=>{let n=e._zod.bag;n.format=t.format,n.minimum=r,n.maximum=o,i&&(n.pattern=fe)})),e._zod.check=a=>{let s=a.value;if(i){if(!Number.isInteger(s))return void a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void a.issues.push(s>0?{input:s,code:"too_big",maximum:2**53-1,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}:{input:s,code:"too_small",minimum:-9007199254740991,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort})}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}})),Se=s("$ZodCheckMaxLength",((e,t)=>{var i;Ie.init(e,t),(i=e._zod.def).when??(i.when=e=>{let t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{t.maximum<(e._zod.bag.maximum??1/0)&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let r=M(n);i.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}})),De=s("$ZodCheckMinLength",((e,t)=>{var i;Ie.init(e,t),(i=e._zod.def).when??(i.when=e=>{let t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{t.minimum>(e._zod.bag.minimum??-1/0)&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let r=M(n);i.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}})),Ce=s("$ZodCheckLengthEquals",((e,t)=>{var i;Ie.init(e,t),(i=e._zod.def).when??(i.when=e=>{let t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{let i=e._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length})),e._zod.check=i=>{let n=i.value,r=n.length;if(r===t.length)return;let o=M(n);i.issues.push({origin:o,...r>t.length?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}})),Oe=s("$ZodCheckStringFormat",((e,t)=>{var i,n;Ie.init(e,t),e._zod.onattach.push((e=>{let i=e._zod.bag;i.format=t.format,t.pattern&&(i.patterns??=new Set,i.patterns.add(t.pattern))})),t.pattern?(i=e._zod).check??(i.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:""+t.pattern}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})})),Pe=s("$ZodCheckRegex",((e,t)=>{Oe.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:""+t.pattern,inst:e,continue:!t.abort})}})),Re=s("$ZodCheckLowerCase",((e,t)=>{t.pattern??=we,Oe.init(e,t)})),_e=s("$ZodCheckUpperCase",((e,t)=>{t.pattern??=$e,Oe.init(e,t)})),Ne=s("$ZodCheckIncludes",((e,t)=>{Ie.init(e,t);let i=S(t.includes),n=RegExp("number"==typeof t.position?`^.{${t.position}}${i}`:i);t.pattern=n,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)})),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}})),Ue=s("$ZodCheckStartsWith",((e,t)=>{Ie.init(e,t);let i=RegExp(`^${S(t.prefix)}.*`);t.pattern??=i,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(i)})),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}})),Me=s("$ZodCheckEndsWith",((e,t)=>{Ie.init(e,t);let i=RegExp(`.*${S(t.suffix)}$`);t.pattern??=i,e._zod.onattach.push((e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(i)})),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}})),Le=s("$ZodCheckOverwrite",((e,t)=>{Ie.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));var qe=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});let t=e.split("\n").filter((e=>e)),i=Math.min(...t.map((e=>e.length-e.trimStart().length))),n=t.map((e=>e.slice(i))).map((e=>" ".repeat(2*this.indent)+e));for(let e of n)this.content.push(e)}compile(){let e=Function,t=this?.args,i=[...(this?.content??[""]).map((e=>" "+e))];return new e(...t,i.join("\n"))}};const Ge={major:4,minor:4,patch:3},je=s("$ZodType",((e,t)=>{var i;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ge;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let t of n)for(let i of t._zod.onattach)i(e);if(0===n.length)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{let t=(e,t,i)=>{let n,r=P(e);for(let o of t){if(o._zod.def.when){if(R(e)||!o._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,a=o._zod.check(e);if(a instanceof Promise&&!1===i?.async)throw new d;if(n||a instanceof Promise)n=(n??Promise.resolve()).then((async()=>{await a,e.issues.length!==t&&(r||=P(e,t))}));else{if(e.issues.length===t)continue;r||=P(e,t)}}return n?n.then((()=>e)):e},i=(i,r,o)=>{if(P(i))return i.aborted=!0,i;let a=t(r,n,o);if(a instanceof Promise){if(!1===o.async)throw new d;return a.then((t=>e._zod.parse(t,o)))}return e._zod.parse(a,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){let t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then((e=>i(e,r,o))):i(t,r,o)}let a=e._zod.parse(r,o);if(a instanceof Promise){if(!1===o.async)throw new d;return a.then((e=>t(e,n,o)))}return t(a,n,o)}}v(e,"~standard",(()=>({validate:t=>{try{let i=z(e,t);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Y(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1})))})),Be=s("$ZodString",((e,t)=>{je.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(e=>RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`))(e._zod.bag),e._zod.parse=i=>{if(t.coerce)try{i.value=i.value+""}catch{}return"string"==typeof i.value||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}})),Fe=s("$ZodStringFormat",((e,t)=>{Oe.init(e,t),Be.init(e,t)})),Ve=s("$ZodGUID",((e,t)=>{t.pattern??=te,Fe.init(e,t)})),ze=s("$ZodUUID",((e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ie(e)}else t.pattern??=ie();Fe.init(e,t)})),We=s("$ZodEmail",((e,t)=>{t.pattern??=ne,Fe.init(e,t)})),Ye=s("$ZodURL",((e,t)=>{Fe.init(e,t),e._zod.check=i=>{try{let n=i.value.trim();if(!t.normalize&&t.protocol?.source===le.source&&!/^https?:\/\//i.test(n))return void i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!t.abort});let r=new URL(n);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort})),void(i.value=t.normalize?r.href:n)}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}})),He=s("$ZodEmoji",((e,t)=>{t.pattern??=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Fe.init(e,t)})),Ze=s("$ZodNanoID",((e,t)=>{t.pattern??=X,Fe.init(e,t)})),Ke=s("$ZodCUID",((e,t)=>{t.pattern??=H,Fe.init(e,t)})),Je=s("$ZodCUID2",((e,t)=>{t.pattern??=Z,Fe.init(e,t)})),Qe=s("$ZodULID",((e,t)=>{t.pattern??=K,Fe.init(e,t)})),Xe=s("$ZodXID",((e,t)=>{t.pattern??=J,Fe.init(e,t)})),et=s("$ZodKSUID",((e,t)=>{t.pattern??=Q,Fe.init(e,t)})),tt=s("$ZodISODateTime",((e,t)=>{t.pattern??=function(e){let t=he({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${i.join("|")})`;return RegExp(`^${pe}T(?:${n})$`)}(t),Fe.init(e,t)})),it=s("$ZodISODate",((e,t)=>{t.pattern??=me,Fe.init(e,t)})),nt=s("$ZodISOTime",((e,t)=>{t.pattern??=function(e){return RegExp(`^${he(e)}$`)}(t),Fe.init(e,t)})),rt=s("$ZodISODuration",((e,t)=>{t.pattern??=ee,Fe.init(e,t)})),ot=s("$ZodIPv4",((e,t)=>{t.pattern??=re,Fe.init(e,t),e._zod.bag.format="ipv4"})),at=s("$ZodIPv6",((e,t)=>{t.pattern??=oe,Fe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}})),st=s("$ZodCIDRv4",((e,t)=>{t.pattern??=ae,Fe.init(e,t)})),dt=s("$ZodCIDRv6",((e,t)=>{t.pattern??=se,Fe.init(e,t),e._zod.check=i=>{let n=i.value.split("/");try{if(2!==n.length)throw Error();let[e,t]=n;if(!t)throw Error();let i=Number(t);if(""+i!==t||i<0||i>128)throw Error();new URL(`http://[${e}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}}}));function ct(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const lt=s("$ZodBase64",((e,t)=>{t.pattern??=de,Fe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{ct(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}})),ut=s("$ZodBase64URL",((e,t)=>{t.pattern??=ce,Fe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{(function(e){if(!ce.test(e))return!1;let t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return ct(t.padEnd(4*Math.ceil(t.length/4),"="))})(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}})),pt=s("$ZodE164",((e,t)=>{t.pattern??=ue,Fe.init(e,t)})),mt=s("$ZodJWT",((e,t)=>{Fe.init(e,t),e._zod.check=i=>{(function(e,t=null){try{let i=e.split(".");if(3!==i.length)return!1;let[n]=i;if(!n)return!1;let r=JSON.parse(atob(n));return!("typ"in r&&"JWT"!==r?.typ||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}})(i.value,t.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!t.abort})}})),ht=s("$ZodNumber",((e,t)=>{je.init(e,t),e._zod.pattern=e._zod.bag.pattern??ye,e._zod.parse=i=>{if(t.coerce)try{i.value=Number(i.value)}catch{}let n=i.value;if("number"==typeof n&&!Number.isNaN(n)&&Number.isFinite(n))return i;let r="number"==typeof n?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...r?{received:r}:{}}),i}})),ft=s("$ZodNumberFormat",((e,t)=>{xe.init(e,t),ht.init(e,t)})),yt=s("$ZodBoolean",((e,t)=>{je.init(e,t),e._zod.pattern=ge,e._zod.parse=i=>{if(t.coerce)try{i.value=!!i.value}catch{}let n=i.value;return"boolean"==typeof n||i.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),i}})),gt=s("$ZodUndefined",((e,t)=>{je.init(e,t),e._zod.pattern=be,e._zod.values=new Set([void 0]),e._zod.parse=t=>{let i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}})),vt=s("$ZodNull",((e,t)=>{je.init(e,t),e._zod.pattern=ve,e._zod.values=new Set([null]),e._zod.parse=t=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}})),bt=s("$ZodAny",((e,t)=>{je.init(e,t),e._zod.parse=e=>e})),wt=s("$ZodUnknown",((e,t)=>{je.init(e,t),e._zod.parse=e=>e})),$t=s("$ZodNever",((e,t)=>{je.init(e,t),e._zod.parse=t=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),It=s("$ZodVoid",((e,t)=>{je.init(e,t),e._zod.parse=t=>{let i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}})),Et=s("$ZodDate",((e,t)=>{je.init(e,t),e._zod.parse=i=>{if(t.coerce)try{i.value=new Date(i.value)}catch{}let n=i.value,r=n instanceof Date;return r&&!Number.isNaN(n.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:n,...r?{received:"Invalid Date"}:{},inst:e}),i}}));function kt(e,t,i){e.issues.length&&t.issues.push(..._(i,e.issues)),t.value[i]=e.value}const Tt=s("$ZodArray",((e,t)=>{je.init(e,t),e._zod.parse=(i,n)=>{let r=i.value;if(!Array.isArray(r))return i.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),i;i.value=Array(r.length);let o=[];for(let e=0;e<r.length;e++){let a=t.element._zod.run({value:r[e],issues:[]},n);a instanceof Promise?o.push(a.then((t=>kt(t,i,e)))):kt(a,i,e)}return o.length?Promise.all(o).then((()=>i)):i}}));function At(e,t,i,n,r,o){let a=i in n;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(..._(i,e.issues))}a||r?void 0===e.value?a&&(t.value[i]=void 0):t.value[i]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]})}function xt(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${i}": expected a Zod schema`);let i=function(e){return Object.keys(e).filter((t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout))}(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function St(e,t,i,n,r,o){let a=[],s=r.keySet,d=r.catchall._zod,c=d.def.type,l="optional"===d.optin,u="optional"===d.optout;for(let r in t){if("__proto__"===r||s.has(r))continue;if("never"===c){a.push(r);continue}let o=d.run({value:t[r],issues:[]},n);o instanceof Promise?e.push(o.then((e=>At(e,i,r,t,l,u)))):At(o,i,r,t,l,u)}return a.length&&i.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then((()=>i)):i}const Dt=s("$ZodObject",((e,t)=>{if(je.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let i={...e};return Object.defineProperty(t,"shape",{value:i}),i}})}let i=h((()=>xt(t)));v(e._zod,"propValues",(()=>{let e=t.shape,i={};for(let t in e){let n=e[t]._zod;if(n.values){i[t]??(i[t]=new Set);for(let e of n.values)i[t].add(e)}}return i}));let n,r=E,o=t.catchall;e._zod.parse=(t,a)=>{n??=i.value;let s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};let d=[],c=n.shape;for(let e of n.keys){let i=c[e],n="optional"===i._zod.optin,r="optional"===i._zod.optout,o=i._zod.run({value:s[e],issues:[]},a);o instanceof Promise?d.push(o.then((i=>At(i,t,e,s,n,r)))):At(o,t,e,s,n,r)}return o?St(d,s,t,a,i.value,e):d.length?Promise.all(d).then((()=>t)):t}})),Ct=s("$ZodObjectJIT",((e,t)=>{Dt.init(e,t);let i,n,r=e._zod.parse,o=h((()=>xt(t))),a=E,s=!l.jitless,d=s&&k.value,c=t.catchall;e._zod.parse=(l,u)=>{n??=o.value;let p=l.value;return a(p)?s&&d&&!1===u?.async&&!0!==u.jitless?(i||=(e=>{let t=new qe(["shape","payload","ctx"]),i=o.value,n=e=>{let t=$(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let r=Object.create(null),a=0;for(let e of i.keys)r[e]="key_"+a++;t.write("const newResult = {};");for(let o of i.keys){let i=r[o],a=$(o),s=e[o],d="optional"===s?._zod?.optin,c="optional"===s?._zod?.optout;t.write(`const ${i} = ${n(o)};`),t.write(d&&c?`\n if (${i}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${i}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${i}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${i}.value;\n }\n \n `:d?`\n if (${i}.issues.length) {\n payload.issues = payload.issues.concat(${i}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${i}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${i}.value;\n }\n \n `:`\n const ${i}_present = ${a} in input;\n if (${i}.issues.length) {\n payload.issues = payload.issues.concat(${i}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n if (!${i}_present && !${i}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${a}]\n });\n }\n\n if (${i}_present) {\n if (${i}.value === undefined) {\n newResult[${a}] = undefined;\n } else {\n newResult[${a}] = ${i}.value;\n }\n }\n\n `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,i)=>s(e,t,i)})(t.shape),l=i(l,u),c?St([],p,l,u,n,e):l):r(l,u):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}}));function Ot(e,t,i,n){for(let i of e)if(0===i.issues.length)return t.value=i.value,t;let r=e.filter((e=>!P(e)));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map((e=>e.issues.map((e=>U(e,n,u())))))}),t)}const Pt=s("$ZodUnion",((e,t)=>{je.init(e,t),v(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),v(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),v(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),v(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){let e=t.options.map((e=>e._zod.pattern));return RegExp(`^(${e.map((e=>y(e.source))).join("|")})$`)}}));let i=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,r)=>{if(i)return i(n,r);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then((t=>Ot(t,n,e,r))):Ot(a,n,e,r)}})),Rt=s("$ZodDiscriminatedUnion",((e,t)=>{t.inclusive=!1,Pt.init(e,t);let i=e._zod.parse;v(e._zod,"propValues",(()=>{let e={};for(let i of t.options){let n=i._zod.propValues;if(!n||0===Object.keys(n).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[t,i]of Object.entries(n)){e[t]||(e[t]=new Set);for(let n of i)e[t].add(n)}}return e}));let n=h((()=>{let e=t.options,i=new Map;for(let n of e){let e=n._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let t of e){if(i.has(t))throw Error(`Duplicate discriminator value "${t+""}"`);i.set(t,n)}}return i}));e._zod.parse=(r,o)=>{let a=r.value;if(!E(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=n.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback||"backward"===o.direction?i(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}})),_t=s("$ZodIntersection",((e,t)=>{je.init(e,t),e._zod.parse=(e,i)=>{let n=e.value,r=t.left._zod.run({value:n,issues:[]},i),o=t.right._zod.run({value:n,issues:[]},i);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then((([t,i])=>Ut(e,t,i))):Ut(e,r,o)}}));function Nt(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(T(e)&&T(t)){let i=Object.keys(t),n=Object.keys(e).filter((e=>-1!==i.indexOf(e))),r={...e,...t};for(let i of n){let n=Nt(e[i],t[i]);if(!n.valid)return{valid:!1,mergeErrorPath:[i,...n.mergeErrorPath]};r[i]=n.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let n=0;n<e.length;n++){let r=Nt(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i.push(r.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Ut(e,t,i){let n,r=new Map;for(let i of t.issues)if("unrecognized_keys"===i.code){n??=i;for(let e of i.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(i);for(let t of i.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let o=[...r].filter((([,e])=>e.l&&e.r)).map((([e])=>e));if(o.length&&n&&e.issues.push({...n,keys:o}),P(e))return e;let a=Nt(t.value,i.value);if(!a.valid)throw Error("Unmergable intersection. Error path: "+JSON.stringify(a.mergeErrorPath));return e.value=a.data,e}const Mt=s("$ZodRecord",((e,t)=>{je.init(e,t),e._zod.parse=(i,n)=>{let r=i.value;if(!T(r))return i.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),i;let o=[],a=t.keyType._zod.values;if(a){i.value={};let s,d=new Set;for(let s of a)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){d.add("number"==typeof s?""+s:s);let a=t.keyType._zod.run({value:s,issues:[]},n);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map((e=>U(e,n,u()))),input:s,path:[s],inst:e});continue}let c=a.value,l=t.valueType._zod.run({value:r[s],issues:[]},n);l instanceof Promise?o.push(l.then((e=>{e.issues.length&&i.issues.push(..._(s,e.issues)),i.value[c]=e.value}))):(l.issues.length&&i.issues.push(..._(s,l.issues)),i.value[c]=l.value)}for(let e in r)d.has(e)||(s??=[],s.push(e));s&&s.length>0&&i.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:s})}else{i.value={};for(let a of Reflect.ownKeys(r)){if("__proto__"===a||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let s=t.keyType._zod.run({value:a,issues:[]},n);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&ye.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},n);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?i.value[a]=r[a]:i.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map((e=>U(e,n,u()))),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:r[a],issues:[]},n);d instanceof Promise?o.push(d.then((e=>{e.issues.length&&i.issues.push(..._(a,e.issues)),i.value[s.value]=e.value}))):(d.issues.length&&i.issues.push(..._(a,d.issues)),i.value[s.value]=d.value)}}return o.length?Promise.all(o).then((()=>i)):i}})),Lt=s("$ZodEnum",((e,t)=>{je.init(e,t);let i=p(t.entries),n=new Set(i);e._zod.values=n,e._zod.pattern=RegExp(`^(${i.filter((e=>x.has(typeof e))).map((e=>"string"==typeof e?S(e):""+e)).join("|")})$`),e._zod.parse=t=>{let r=t.value;return n.has(r)||t.issues.push({code:"invalid_value",values:i,input:r,inst:e}),t}})),qt=s("$ZodLiteral",((e,t)=>{if(je.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let i=new Set(t.values);e._zod.values=i,e._zod.pattern=RegExp(`^(${t.values.map((e=>"string"==typeof e?S(e):e?S(""+e):e+"")).join("|")})$`),e._zod.parse=n=>{let r=n.value;return i.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}})),Gt=s("$ZodTransform",((e,t)=>{je.init(e,t),e._zod.optin="optional",e._zod.parse=(i,n)=>{if("backward"===n.direction)throw new c(e.constructor.name);let r=t.transform(i.value,i);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then((e=>(i.value=e,i.fallback=!0,i)));if(r instanceof Promise)throw new d;return i.value=r,i.fallback=!0,i}}));function jt(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Bt=s("$ZodOptional",((e,t)=>{je.init(e,t),e._zod.optin="optional",e._zod.optout="optional",v(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),v(e._zod,"pattern",(()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${y(e.source)})?$`):void 0})),e._zod.parse=(e,i)=>{if("optional"===t.innerType._zod.optin){let n=e.value,r=t.innerType._zod.run(e,i);return r instanceof Promise?r.then((e=>jt(e,n))):jt(r,n)}return void 0===e.value?e:t.innerType._zod.run(e,i)}})),Ft=s("$ZodExactOptional",((e,t)=>{Bt.init(e,t),v(e._zod,"values",(()=>t.innerType._zod.values)),v(e._zod,"pattern",(()=>t.innerType._zod.pattern)),e._zod.parse=(e,i)=>t.innerType._zod.run(e,i)})),Vt=s("$ZodNullable",((e,t)=>{je.init(e,t),v(e._zod,"optin",(()=>t.innerType._zod.optin)),v(e._zod,"optout",(()=>t.innerType._zod.optout)),v(e._zod,"pattern",(()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${y(e.source)}|null)$`):void 0})),v(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,i)=>null===e.value?e:t.innerType._zod.run(e,i)})),zt=s("$ZodDefault",((e,t)=>{je.init(e,t),e._zod.optin="optional",v(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then((e=>Wt(e,t))):Wt(n,t)}}));function Wt(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Yt=s("$ZodPrefault",((e,t)=>{je.init(e,t),e._zod.optin="optional",v(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,i)=>("backward"===i.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,i))})),Ht=s("$ZodNonOptional",((e,t)=>{je.init(e,t),v(e._zod,"values",(()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(i,n)=>{let r=t.innerType._zod.run(i,n);return r instanceof Promise?r.then((t=>Zt(t,e))):Zt(r,e)}}));function Zt(e,t){return!e.issues.length&&void 0===e.value&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Kt=s("$ZodCatch",((e,t)=>{je.init(e,t),e._zod.optin="optional",v(e._zod,"optout",(()=>t.innerType._zod.optout)),v(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then((n=>(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map((e=>U(e,i,u())))},input:e.value}),e.issues=[],e.fallback=!0),e))):(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map((e=>U(e,i,u())))},input:e.value}),e.issues=[],e.fallback=!0),e)}})),Jt=s("$ZodPipe",((e,t)=>{je.init(e,t),v(e._zod,"values",(()=>t.in._zod.values)),v(e._zod,"optin",(()=>t.in._zod.optin)),v(e._zod,"optout",(()=>t.out._zod.optout)),v(e._zod,"propValues",(()=>t.in._zod.propValues)),e._zod.parse=(e,i)=>{if("backward"===i.direction){let n=t.out._zod.run(e,i);return n instanceof Promise?n.then((e=>Qt(e,t.in,i))):Qt(n,t.in,i)}let n=t.in._zod.run(e,i);return n instanceof Promise?n.then((e=>Qt(e,t.out,i))):Qt(n,t.out,i)}}));function Qt(e,t,i){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},i)}const Xt=s("$ZodPreprocess",((e,t)=>{Jt.init(e,t)})),ei=s("$ZodReadonly",((e,t)=>{je.init(e,t),v(e._zod,"propValues",(()=>t.innerType._zod.propValues)),v(e._zod,"values",(()=>t.innerType._zod.values)),v(e._zod,"optin",(()=>t.innerType?._zod?.optin)),v(e._zod,"optout",(()=>t.innerType?._zod?.optout)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then(ti):ti(n)}}));function ti(e){return e.value=Object.freeze(e.value),e}const ii=s("$ZodLazy",((e,t)=>{je.init(e,t),v(e._zod,"innerType",(()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner})),v(e._zod,"pattern",(()=>e._zod.innerType?._zod?.pattern)),v(e._zod,"propValues",(()=>e._zod.innerType?._zod?.propValues)),v(e._zod,"optin",(()=>e._zod.innerType?._zod?.optin??void 0)),v(e._zod,"optout",(()=>e._zod.innerType?._zod?.optout??void 0)),e._zod.parse=(t,i)=>e._zod.innerType._zod.run(t,i)})),ni=s("$ZodCustom",((e,t)=>{Ie.init(e,t),je.init(e,t),e._zod.parse=e=>e,e._zod.check=i=>{let n=i.value,r=t.fn(n);if(r instanceof Promise)return r.then((t=>ri(t,i,n,e)));ri(r,i,n,e)}}));function ri(e,t,i,n){if(!e){let e={code:"custom",input:i,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(L(e))}}var oi;(oi=globalThis).__zod_globalRegistry??(oi.__zod_globalRegistry=new class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let i=t[0];return this._map.set(e,i),i&&"object"==typeof i&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let i={...this.get(t)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});const ai=globalThis.__zod_globalRegistry;function si(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...C(t)})}function di(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...C(t)})}function ci(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...C(t)})}function li(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...C(t)})}function ui(e,t){return new ke({check:"less_than",...C(t),value:e,inclusive:!1})}function pi(e,t){return new ke({check:"less_than",...C(t),value:e,inclusive:!0})}function mi(e,t){return new Te({check:"greater_than",...C(t),value:e,inclusive:!1})}function hi(e,t){return new Te({check:"greater_than",...C(t),value:e,inclusive:!0})}function fi(e,t){return new Ae({check:"multiple_of",...C(t),value:e})}function yi(e,t){return new Se({check:"max_length",...C(t),maximum:e})}function gi(e,t){return new De({check:"min_length",...C(t),minimum:e})}function vi(e,t){return new Ce({check:"length_equals",...C(t),length:e})}function bi(e){return new Le({check:"overwrite",tx:e})}function wi(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ai,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 $i(e,t,i={path:[],schemaPath:[]}){var n;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,i.schemaPath.includes(e)&&(o.cycle=i.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let n={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,n);else{let i=a.schema,o=t.processors[r.type];if(!o)throw Error("[toJSONSchema]: Non-representable type encountered: "+r.type);o(e,t,i,n)}let o=e._zod.parent;o&&(a.ref||=o,$i(o,t,n),t.seen.get(o).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),"input"===t.io&&ki(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ii(e,t){let i=e.seen.get(t);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let t of e.seen.entries()){let i=e.metadataRegistry.get(t[0])?.id;if(i){let e=n.get(i);if(e&&e!==t[0])throw Error(`Duplicate schema id "${i}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(i,t[0])}}let r=t=>{let n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let i=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(i)return{ref:r(i)};let o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${r("__shared")}#/${n}/${o}`}}if(t[1]===i)return{ref:"#"};let r=`#/${n}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:r+o}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:i,defId:n}=r(e);t.def={...t.schema},n&&(t.defId=n);let o=t.schema;for(let e in o)delete o[e];o.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let n=i[1];if(t!==i[0]){if(e.external){let n=e.external.registry.get(i[0])?.id;if(t!==i[0]&&n){o(i);continue}}(e.metadataRegistry.get(i[0])?.id||n.cycle||n.count>1&&"ref"===e.reused)&&o(i)}else o(i)}}function Ei(e,t){let i=e.seen.get(t);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let i=e.seen.get(t);if(null===i.ref)return;let r=i.def??i.schema,o={...r},a=i.ref;if(i.ref=null,a){n(a);let i=e.seen.get(a),s=i.schema;if(!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),Object.assign(r,o),t._zod.parent===a)for(let e in r)"$ref"===e||"allOf"===e||e in o||delete r[e];if(s.$ref&&i.def)for(let e in r)"$ref"===e||"allOf"===e||e in i.def&&JSON.stringify(r[e])===JSON.stringify(i.def[e])&&delete r[e]}let s=t._zod.parent;if(s&&s!==a){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(let e in r)"$ref"===e||"allOf"===e||e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:i.path??[]})};for(let t of[...e.seen.entries()].reverse())n(t[0]);let r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target&&(r.$schema="http://json-schema.org/draft-04/schema#"),e.external?.uri){let i=e.external.registry.get(t)?.id;if(!i)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(i)}Object.assign(r,i.def??i.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?r.$defs=a:r.definitions=a);try{let i=JSON.parse(JSON.stringify(r));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ti(t,"input",e.processors),output:Ti(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw Error("Error converting schema to JSON.")}}function ki(e,t){let i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);let n=e._zod.def;if("transform"===n.type)return!0;if("array"===n.type)return ki(n.element,i);if("set"===n.type)return ki(n.valueType,i);if("lazy"===n.type)return ki(n.getter(),i);if("promise"===n.type||"optional"===n.type||"nonoptional"===n.type||"nullable"===n.type||"readonly"===n.type||"default"===n.type||"prefault"===n.type)return ki(n.innerType,i);if("intersection"===n.type)return ki(n.left,i)||ki(n.right,i);if("record"===n.type||"map"===n.type)return ki(n.keyType,i)||ki(n.valueType,i);if("pipe"===n.type)return!!e._zod.traits.has("$ZodCodec")||ki(n.in,i)||ki(n.out,i);if("object"===n.type){for(let e in n.shape)if(ki(n.shape[e],i))return!0;return!1}if("union"===n.type){for(let e of n.options)if(ki(e,i))return!0;return!1}if("tuple"===n.type){for(let e of n.items)if(ki(e,i))return!0;return!(!n.rest||!ki(n.rest,i))}return!1}const Ti=(e,t,i={})=>n=>{let{libraryOptions:r,target:o}=n??{},a=wi({...r??{},target:o,io:t,processors:i});return $i(e,a),Ii(a,e),Ei(a,e)},Ai={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},xi=(e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType},Si=s("ZodISODateTime",((e,t)=>{tt.init(e,t),Xi.init(e,t)}));function Di(e){return function(e,t){return new Si({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(t)})}(0,e)}const Ci=s("ZodISODate",((e,t)=>{it.init(e,t),Xi.init(e,t)}));function Oi(e){return function(e,t){return new Ci({type:"string",format:"date",check:"string_format",...C(t)})}(0,e)}const Pi=s("ZodISOTime",((e,t)=>{nt.init(e,t),Xi.init(e,t)}));const Ri=s("ZodISODuration",((e,t)=>{rt.init(e,t),Xi.init(e,t)}));const _i=s("ZodError",((e,t)=>{G.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){let i={_errors:[]},n=(e,r=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map((e=>n({issues:e},[...r,...o.path])));else if("invalid_key"===o.code)n({issues:o.issues},[...r,...o.path]);else if("invalid_element"===o.code)n({issues:o.issues},[...r,...o.path]);else{let e=[...r,...o.path];if(0===e.length)i._errors.push(t(o));else{let n=i,r=0;for(;r<e.length;){let i=e[r];r===e.length-1?(n[i]=n[i]||{_errors:[]},n[i]._errors.push(t(o))):n[i]=n[i]||{_errors:[]},n=n[i],r++}}}};return n(e),i}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){let i={},n=[];for(let r of e.issues)r.path.length>0?(i[r.path[0]]=i[r.path[0]]||[],i[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:i}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,m,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,m,2)}},isEmpty:{get:()=>0===e.issues.length}})}),{Parent:Error}),Ni=B(_i),Ui=F(_i),Mi=V(_i),Li=W(_i),qi=(e=>(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return B(e)(t,i,r)})(_i),Gi=(e=>(t,i,n)=>B(e)(t,i,n))(_i),ji=(e=>async(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return F(e)(t,i,r)})(_i),Bi=(e=>async(t,i,n)=>F(e)(t,i,n))(_i),Fi=(e=>(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return V(e)(t,i,r)})(_i),Vi=(e=>(t,i,n)=>V(e)(t,i,n))(_i),zi=(e=>async(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return W(e)(t,i,r)})(_i),Wi=(e=>async(t,i,n)=>W(e)(t,i,n))(_i),Yi=new WeakMap;function Hi(e,t,i){let n=Object.getPrototypeOf(e),r=Yi.get(n);if(r||(r=new Set,Yi.set(n,r)),!r.has(t)){r.add(t);for(let e in i){let t=i[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,get(){let i=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:i}),i},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const Zi=s("ZodType",((e,t)=>(je.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ti(e,"input"),output:Ti(e,"output")}}),e.toJSONSchema=((e,t={})=>i=>{let n=wi({...i,processors:t});return $i(e,n),Ii(n,e),Ei(n,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,i)=>Ni(e,t,i,{callee:e.parse}),e.safeParse=(t,i)=>Mi(e,t,i),e.parseAsync=async(t,i)=>Ui(e,t,i,{callee:e.parseAsync}),e.safeParseAsync=async(t,i)=>Li(e,t,i),e.spa=e.safeParseAsync,e.encode=(t,i)=>qi(e,t,i),e.decode=(t,i)=>Gi(e,t,i),e.encodeAsync=async(t,i)=>ji(e,t,i),e.decodeAsync=async(t,i)=>Bi(e,t,i),e.safeEncode=(t,i)=>Fi(e,t,i),e.safeDecode=(t,i)=>Vi(e,t,i),e.safeEncodeAsync=async(t,i)=>zi(e,t,i),e.safeDecodeAsync=async(t,i)=>Wi(e,t,i),Hi(e,"ZodType",{check(...e){let t=this.def;return this.clone(w(t,{checks:[...t.checks??[],...e.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return D(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,i){return new br({type:"custom",check:"custom",fn:t,...C(i)})}(0,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return function(e,t){let i=function(e,t){let i=new Ie({check:"custom",...C(t)});return i._zod.check=e,i}((t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(L(e,t.value,i._zod.def));else{let n=e;n.fatal&&(n.continue=!1),n.code??="custom",n.input??=t.value,n.inst??=i,n.continue??=!i._zod.def.abort,t.issues.push(L(n))}},e(t.value,t))),t);return i}(e,t)}(e,t))},overwrite(e){return this.check(bi(e))},optional(){return ar(this)},exactOptional(){return function(e){return new sr({type:"optional",innerType:e})}(this)},nullable(){return cr(this)},nullish(){return ar(cr(this))},nonoptional(e){return function(e,t){return new pr({type:"nonoptional",innerType:e,...C(t)})}(this,e)},array(){return Bn(this)},or(e){return Yn([this,e])},and(e){return function(e,t){return new Kn({type:"intersection",left:e,right:t})}(this,e)},transform(e){return fr(this,rr(e))},default(e){return function(e,t){return new lr({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():A(t)}})}(this,e)},prefault(e){return function(e,t){return new ur({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():A(t)}})}(this,e)},catch(e){return function(e,t){return new mr({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}(this,e)},pipe(e){return fr(this,e)},readonly(){return function(e){return new gr({type:"readonly",innerType:e})}(this)},describe(e){let t=this.clone();return ai.add(t,{description:e}),t},meta(...e){if(0===e.length)return ai.get(this);let t=this.clone();return ai.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>ai.get(e)?.description,configurable:!0}),e))),Ki=s("_ZodString",((e,t)=>{Be.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=i;n.type="string";let{minimum:r,maximum:o,format:a,patterns:s,contentEncoding:d}=e._zod.bag;if("number"==typeof r&&(n.minLength=r),"number"==typeof o&&(n.maxLength=o),a&&(n.format=Ai[a]??a,""===n.format&&delete n.format,"time"===a&&delete n.format),d&&(n.contentEncoding=d),s&&s.size>0){let e=[...s];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map((e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source})))])}})(e,t,i);let i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,Hi(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new Pe({check:"string_format",format:"regex",...C(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new Ne({check:"string_format",format:"includes",...C(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new Ue({check:"string_format",format:"starts_with",...C(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new Me({check:"string_format",format:"ends_with",...C(t),suffix:e})}(...e))},min(...e){return this.check(gi(...e))},max(...e){return this.check(yi(...e))},length(...e){return this.check(vi(...e))},nonempty(...e){return this.check(gi(1,...e))},lowercase(e){return this.check(function(e){return new Re({check:"string_format",format:"lowercase",...C(e)})}(e))},uppercase(e){return this.check(function(e){return new _e({check:"string_format",format:"uppercase",...C(e)})}(e))},trim(){return this.check(bi((e=>e.trim())))},normalize(...e){return this.check(function(e){return bi((t=>t.normalize(e)))}(...e))},toLowerCase(){return this.check(bi((e=>e.toLowerCase())))},toUpperCase(){return this.check(bi((e=>e.toUpperCase())))},slugify(){return this.check(bi((e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))))}})})),Ji=s("ZodString",((e,t)=>{Be.init(e,t),Ki.init(e,t),e.email=t=>e.check(si(en,t)),e.url=t=>e.check(li(on,t)),e.jwt=t=>e.check(function(e,t){return new $n({type:"string",format:"jwt",check:"string_format",abort:!1,...C(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new sn({type:"string",format:"emoji",check:"string_format",abort:!1,...C(t)})}(0,t)),e.guid=t=>e.check(di(nn,t)),e.uuid=t=>e.check(ci(rn,t)),e.uuidv4=t=>e.check(function(e,t){return new rn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new rn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new rn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new dn({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.guid=t=>e.check(di(nn,t)),e.cuid=t=>e.check(function(e,t){return new cn({type:"string",format:"cuid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new ln({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new un({type:"string",format:"ulid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new vn({type:"string",format:"base64",check:"string_format",abort:!1,...C(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new bn({type:"string",format:"base64url",check:"string_format",abort:!1,...C(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new pn({type:"string",format:"xid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new mn({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new hn({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new fn({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new yn({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new gn({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new wn({type:"string",format:"e164",check:"string_format",abort:!1,...C(t)})}(0,t)),e.datetime=t=>e.check(Di(t)),e.date=t=>e.check(Oi(t)),e.time=t=>e.check(function(e){return function(e,t){return new Pi({type:"string",format:"time",check:"string_format",precision:null,...C(t)})}(0,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new Ri({type:"string",format:"duration",check:"string_format",...C(t)})}(0,e)}(t))}));function Qi(e){return function(e,t){return new Ji({type:"string",...C(t)})}(0,e)}const Xi=s("ZodStringFormat",((e,t)=>{Fe.init(e,t),Ki.init(e,t)})),en=s("ZodEmail",((e,t)=>{We.init(e,t),Xi.init(e,t)}));function tn(e){return si(en,e)}const nn=s("ZodGUID",((e,t)=>{Ve.init(e,t),Xi.init(e,t)})),rn=s("ZodUUID",((e,t)=>{ze.init(e,t),Xi.init(e,t)})),on=s("ZodURL",((e,t)=>{Ye.init(e,t),Xi.init(e,t)}));function an(e){return li(on,e)}const sn=s("ZodEmoji",((e,t)=>{He.init(e,t),Xi.init(e,t)})),dn=s("ZodNanoID",((e,t)=>{Ze.init(e,t),Xi.init(e,t)})),cn=s("ZodCUID",((e,t)=>{Ke.init(e,t),Xi.init(e,t)})),ln=s("ZodCUID2",((e,t)=>{Je.init(e,t),Xi.init(e,t)})),un=s("ZodULID",((e,t)=>{Qe.init(e,t),Xi.init(e,t)})),pn=s("ZodXID",((e,t)=>{Xe.init(e,t),Xi.init(e,t)})),mn=s("ZodKSUID",((e,t)=>{et.init(e,t),Xi.init(e,t)})),hn=s("ZodIPv4",((e,t)=>{ot.init(e,t),Xi.init(e,t)})),fn=s("ZodIPv6",((e,t)=>{at.init(e,t),Xi.init(e,t)})),yn=s("ZodCIDRv4",((e,t)=>{st.init(e,t),Xi.init(e,t)})),gn=s("ZodCIDRv6",((e,t)=>{dt.init(e,t),Xi.init(e,t)})),vn=s("ZodBase64",((e,t)=>{lt.init(e,t),Xi.init(e,t)})),bn=s("ZodBase64URL",((e,t)=>{ut.init(e,t),Xi.init(e,t)})),wn=s("ZodE164",((e,t)=>{pt.init(e,t),Xi.init(e,t)})),$n=s("ZodJWT",((e,t)=>{mt.init(e,t),Xi.init(e,t)})),In=s("ZodNumber",((e,t)=>{ht.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=i,{minimum:r,maximum:o,format:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c}=e._zod.bag;n.type="string"==typeof a&&a.includes("int")?"integer":"number";let l="number"==typeof d&&d<=(o??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;"number"==typeof c&&c>=(r??-1/0)?u?(n.minimum=c,n.exclusiveMinimum=!0):n.exclusiveMinimum=c:"number"==typeof r&&(n.minimum=r),l?u?(n.maximum=d,n.exclusiveMaximum=!0):n.exclusiveMaximum=d:"number"==typeof o&&(n.maximum=o),"number"==typeof s&&(n.multipleOf=s)})(e,t,i),Hi(e,"ZodNumber",{gt(e,t){return this.check(mi(e,t))},gte(e,t){return this.check(hi(e,t))},min(e,t){return this.check(hi(e,t))},lt(e,t){return this.check(ui(e,t))},lte(e,t){return this.check(pi(e,t))},max(e,t){return this.check(pi(e,t))},int(e){return this.check(Tn(e))},safe(e){return this.check(Tn(e))},positive(e){return this.check(mi(0,e))},nonnegative(e){return this.check(hi(0,e))},negative(e){return this.check(ui(0,e))},nonpositive(e){return this.check(pi(0,e))},multipleOf(e,t){return this.check(fi(e,t))},step(e,t){return this.check(fi(e,t))},finite(){return this}});let i=e._zod.bag;e.minValue=Math.max(i.minimum??-1/0,i.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(i.maximum??1/0,i.exclusiveMaximum??1/0)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null}));function En(e){return function(e,t){return new In({type:"number",checks:[],...C(t)})}(0,e)}const kn=s("ZodNumberFormat",((e,t)=>{ft.init(e,t),In.init(e,t)}));function Tn(e){return function(e,t){return new kn({type:"number",check:"number_format",abort:!1,format:"safeint",...C(t)})}(0,e)}const An=s("ZodBoolean",((e,t)=>{yt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{i.type="boolean"})(0,0,t)}));function xn(e){return function(e,t){return new An({type:"boolean",...C(t)})}(0,e)}const Sn=s("ZodUndefined",((e,t)=>{gt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")})(0,e)}));function Dn(e){return function(e,t){return new Sn({type:"undefined",...C(t)})}(0,e)}const Cn=s("ZodNull",((e,t)=>{vt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{"openapi-3.0"===t.target?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"})(0,e,t)}));function On(e){return function(e,t){return new Cn({type:"null",...C(t)})}(0,e)}const Pn=s("ZodAny",((e,t)=>{bt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=()=>{}})),Rn=s("ZodUnknown",((e,t)=>{wt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=()=>{}}));function _n(){return new Rn({type:"unknown"})}const Nn=s("ZodNever",((e,t)=>{$t.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{i.not={}})(0,0,t)}));function Un(e){return function(e,t){return new Nn({type:"never",...C(t)})}(0,e)}const Mn=s("ZodVoid",((e,t)=>{It.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")})(0,e)}));function Ln(e){return function(e,t){return new Mn({type:"void",...C(t)})}(0,e)}const qn=s("ZodDate",((e,t)=>{Et.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")})(0,e),e.min=(t,i)=>e.check(hi(t,i)),e.max=(t,i)=>e.check(pi(t,i));let i=e._zod.bag;e.minDate=i.minimum?new Date(i.minimum):null,e.maxDate=i.maximum?new Date(i.maximum):null}));function Gn(e){return function(e,t){return new qn({type:"date",...C(t)})}(0,e)}const jn=s("ZodArray",((e,t)=>{Tt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=$i(o.element,t,{...n,path:[...n.path,"items"]})})(e,t,i,n),e.element=t.element,Hi(e,"ZodArray",{min(e,t){return this.check(gi(e,t))},nonempty(e){return this.check(gi(1,e))},max(e,t){return this.check(yi(e,t))},length(e,t){return this.check(vi(e,t))},unwrap(){return this.element}})}));function Bn(e,t){return function(e,t,i){return new jn({type:"array",element:t,...C(i)})}(0,e,t)}const Fn=s("ZodObject",((e,t)=>{Ct.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let e in a)r.properties[e]=$i(a[e],t,{...n,path:[...n.path,"properties",e]});let s=new Set(Object.keys(a)),d=new Set([...s].filter((e=>{let i=o.shape[e]._zod;return"input"===t.io?void 0===i.optin:void 0===i.optout})));d.size>0&&(r.required=Array.from(d)),"never"===o.catchall?._zod.def.type?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=$i(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,i,n),v(e,"shape",(()=>t.shape)),Hi(e,"ZodObject",{keyof(){return er(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:_n()})},loose(){return this.clone({...this._zod.def,catchall:_n()})},strict(){return this.clone({...this._zod.def,catchall:Un()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!T(t))throw Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let i=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(i,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return D(e,w(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return b(this,"shape",i),i}}))}(this,e)},safeExtend(e){return function(e,t){if(!T(t))throw Error("Invalid input to safeExtend: expected a plain object");return D(e,w(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return b(this,"shape",i),i}}))}(this,e)},merge(e){return function(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return D(e,w(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return b(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){let i=e._zod.def,n=i.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");return D(e,w(e._zod.def,{get shape(){let e={};for(let n in t){if(!(n in i.shape))throw Error(`Unrecognized key: "${n}"`);t[n]&&(e[n]=i.shape[n])}return b(this,"shape",e),e},checks:[]}))}(this,e)},omit(e){return function(e,t){let i=e._zod.def,n=i.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");return D(e,w(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let e in t){if(!(e in i.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return b(this,"shape",n),n},checks:[]}))}(this,e)},partial(...e){return function(e,t,i){let n=t._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");return D(t,w(t._zod.def,{get shape(){let n=t._zod.def.shape,r={...n};if(i)for(let t in i){if(!(t in n))throw Error(`Unrecognized key: "${t}"`);i[t]&&(r[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(let t in n)r[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return b(this,"shape",r),r},checks:[]}))}(or,this,e[0])},required(...e){return function(e,t,i){return D(t,w(t._zod.def,{get shape(){let n=t._zod.def.shape,r={...n};if(i)for(let t in i){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);i[t]&&(r[t]=new e({type:"nonoptional",innerType:n[t]}))}else for(let t in n)r[t]=new e({type:"nonoptional",innerType:n[t]});return b(this,"shape",r),r}}))}(pr,this,e[0])}})}));function Vn(e,t){return new Fn({type:"object",shape:e??{},...C(t)})}function zn(e,t){return new Fn({type:"object",shape:e,catchall:Un(),...C(t)})}const Wn=s("ZodUnion",((e,t)=>{Pt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=!1===r.inclusive,a=r.options.map(((e,i)=>$i(e,t,{...n,path:[...n.path,o?"oneOf":"anyOf",i]})));o?i.oneOf=a:i.anyOf=a})(e,t,i,n),e.options=t.options}));function Yn(e,t){return new Wn({type:"union",options:e,...C(t)})}const Hn=s("ZodDiscriminatedUnion",((e,t)=>{Wn.init(e,t),Rt.init(e,t)}));function Zn(e,t,i){return new Hn({type:"union",options:t,discriminator:e,...C(i)})}const Kn=s("ZodIntersection",((e,t)=>{_t.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=$i(r.left,t,{...n,path:[...n.path,"allOf",0]}),a=$i(r.right,t,{...n,path:[...n.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;i.allOf=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]]})(e,t,i,n)})),Jn=s("ZodRecord",((e,t)=>{Mt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def;r.type="object";let a=o.keyType,s=a._zod.bag?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=$i(o.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});r.patternProperties={};for(let t of s)r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=$i(o.keyType,t,{...n,path:[...n.path,"propertyNames"]})),r.additionalProperties=$i(o.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let d=a._zod.values;if(d){let e=[...d].filter((e=>"string"==typeof e||"number"==typeof e));e.length>0&&(r.required=e)}})(e,t,i,n),e.keyType=t.keyType,e.valueType=t.valueType}));function Qn(e,t,i){return new Jn(t&&t._zod?{type:"record",keyType:e,valueType:t,...C(i)}:{type:"record",keyType:Qi(),valueType:e,...C(t)})}const Xn=s("ZodEnum",((e,t)=>{Lt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=p(e._zod.def.entries);n.every((e=>"number"==typeof e))&&(i.type="number"),n.every((e=>"string"==typeof e))&&(i.type="string"),i.enum=n})(e,0,i),e.enum=t.entries,e.options=Object.values(t.entries);let i=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let r={};for(let n of e){if(!i.has(n))throw Error(`Key ${n} not found in enum`);r[n]=t.entries[n]}return new Xn({...t,checks:[],...C(n),entries:r})},e.exclude=(e,n)=>{let r={...t.entries};for(let t of e){if(!i.has(t))throw Error(`Key ${t} not found in enum`);delete r[t]}return new Xn({...t,checks:[],...C(n),entries:r})}}));function er(e,t){return new Xn({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e,...C(t)})}const tr=s("ZodLiteral",((e,t)=>{qt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=e._zod.def,r=[];for(let e of n.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(e))}else r.push(e);if(0!==r.length)if(1===r.length){let e=r[0];i.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?i.enum=[e]:i.const=e}else r.every((e=>"number"==typeof e))&&(i.type="number"),r.every((e=>"string"==typeof e))&&(i.type="string"),r.every((e=>"boolean"==typeof e))&&(i.type="boolean"),r.every((e=>null===e))&&(i.type="null"),i.enum=r})(e,t,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function ir(e,t){return new tr({type:"literal",values:Array.isArray(e)?e:[e],...C(t)})}const nr=s("ZodTransform",((e,t)=>{Gt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(i,n)=>{if("backward"===n.direction)throw new c(e.constructor.name);i.addIssue=n=>{if("string"==typeof n)i.issues.push(L(n,i.value,t));else{let t=n;t.fatal&&(t.continue=!1),t.code??="custom",t.input??=i.value,t.inst??=e,i.issues.push(L(t))}};let r=t.transform(i.value,i);return r instanceof Promise?r.then((e=>(i.value=e,i.fallback=!0,i))):(i.value=r,i.fallback=!0,i)}}));function rr(e){return new nr({type:"transform",transform:e})}const or=s("ZodOptional",((e,t)=>{Bt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>xi(e,t,0,n),e.unwrap=()=>e._zod.def.innerType}));function ar(e){return new or({type:"optional",innerType:e})}const sr=s("ZodExactOptional",((e,t)=>{Ft.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>xi(e,t,0,n),e.unwrap=()=>e._zod.def.innerType})),dr=s("ZodNullable",((e,t)=>{Vt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=$i(r.innerType,t,n),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,i.nullable=!0):i.anyOf=[o,{type:"null"}]})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType}));function cr(e){return new dr({type:"nullable",innerType:e})}const lr=s("ZodDefault",((e,t)=>{zt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType,i.default=JSON.parse(JSON.stringify(r.defaultValue))})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),ur=s("ZodPrefault",((e,t)=>{Yt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType,"input"===t.io&&(i._prefault=JSON.parse(JSON.stringify(r.defaultValue)))})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType})),pr=s("ZodNonOptional",((e,t)=>{Ht.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType})(e,t,0,n),e.unwrap=()=>e._zod.def.innerType})),mr=s("ZodCatch",((e,t)=>{Kt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r,o=e._zod.def;$i(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{r=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}i.default=r})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),hr=s("ZodPipe",((e,t)=>{Jt.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a="input"===t.io?o?r.out:r.in:r.out;$i(a,t,n),t.seen.get(e).ref=a})(e,t,0,n),e.in=t.in,e.out=t.out}));function fr(e,t){return new hr({type:"pipe",in:e,out:t})}const yr=s("ZodPreprocess",((e,t)=>{hr.init(e,t),Xt.init(e,t)})),gr=s("ZodReadonly",((e,t)=>{ei.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;$i(r.innerType,t,n),t.seen.get(e).ref=r.innerType,i.readOnly=!0})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType})),vr=s("ZodLazy",((e,t)=>{ii.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.innerType;$i(r,t,n),t.seen.get(e).ref=r})(e,t,0,n),e.unwrap=()=>e._zod.def.getter()})),br=s("ZodCustom",((e,t)=>{ni.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=e=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e)}));function wr(e,t){return new yr({type:"pipe",in:rr(e),out:t})}for(var $r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,Ir=[],Er=0;Er<256;++Er)Ir.push((Er+256).toString(16).slice(1));function kr(e,t=0){return(Ir[e[t+0]]+Ir[e[t+1]]+Ir[e[t+2]]+Ir[e[t+3]]+"-"+Ir[e[t+4]]+Ir[e[t+5]]+"-"+Ir[e[t+6]]+Ir[e[t+7]]+"-"+Ir[e[t+8]]+Ir[e[t+9]]+"-"+Ir[e[t+10]]+Ir[e[t+11]]+Ir[e[t+12]]+Ir[e[t+13]]+Ir[e[t+14]]+Ir[e[t+15]]).toLowerCase()}var Tr,Ar=new Uint8Array(16);function xr(){if(!Tr&&!(Tr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Tr(Ar)}var Sr=null,Dr=null,Cr=0;function Or(e,t){e||={};var i=0,n=t||new Uint8Array(16),r=e.random||(e.rng||xr)(),o=void 0===e.msecs?Date.now():e.msecs,a=void 0===e.seq?null:e.seq,s=Dr,d=Sr;return o>Cr&&void 0===e.msecs&&(Cr=o,null!==a&&(s=null,d=null)),null!==a&&(a>2147483647&&(a=2147483647),s=a>>>19&4095,d=524287&a),(null===s||null===d)&&(s=(s=127&r[6])<<8|r[7],d=(d=(d=63&r[8])<<8|r[9])<<5|r[10]>>>3),o+1e4>Cr&&null===a?++d>524287&&(d=0,++s>4095&&(s=0,Cr++)):Cr=o,Dr=s,Sr=d,n[i++]=Cr/1099511627776&255,n[i++]=Cr/4294967296&255,n[i++]=Cr/16777216&255,n[i++]=Cr/65536&255,n[i++]=Cr/256&255,n[i++]=255&Cr,n[i++]=s>>>4&15|112,n[i++]=255&s,n[i++]=d>>>13&63|128,n[i++]=d>>>5&255,n[i++]=d<<3&255|7&r[10],n[i++]=r[11],n[i++]=r[12],n[i++]=r[13],n[i++]=r[14],n[i++]=r[15],t||kr(n)}var Pr="0123456789abcdefghjkmnpqrstvwxyz",Rr=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,255,18,19,255,20,21,255,22,23,24,25,26,255,27,28,29,30,31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);function _r(e){let t=Array(26).fill("");if(16!==e.length)throw Error(`Invalid length. Expected 16 bytes, got ${e.length}. Input: ${e}`);return t[0]=Pr[(224&e[0])>>5],t[1]=Pr[31&e[0]],t[2]=Pr[(248&e[1])>>3],t[3]=Pr[(7&e[1])<<2|(192&e[2])>>6],t[4]=Pr[(62&e[2])>>1],t[5]=Pr[(1&e[2])<<4|(240&e[3])>>4],t[6]=Pr[(15&e[3])<<1|(128&e[4])>>7],t[7]=Pr[(124&e[4])>>2],t[8]=Pr[(3&e[4])<<3|(224&e[5])>>5],t[9]=Pr[31&e[5]],t[10]=Pr[(248&e[6])>>3],t[11]=Pr[(7&e[6])<<2|(192&e[7])>>6],t[12]=Pr[(62&e[7])>>1],t[13]=Pr[(1&e[7])<<4|(240&e[8])>>4],t[14]=Pr[(15&e[8])<<1|(128&e[9])>>7],t[15]=Pr[(124&e[9])>>2],t[16]=Pr[(3&e[9])<<3|(224&e[10])>>5],t[17]=Pr[31&e[10]],t[18]=Pr[(248&e[11])>>3],t[19]=Pr[(7&e[11])<<2|(192&e[12])>>6],t[20]=Pr[(62&e[12])>>1],t[21]=Pr[(1&e[12])<<4|(240&e[13])>>4],t[22]=Pr[(15&e[13])<<1|(128&e[14])>>7],t[23]=Pr[(124&e[14])>>2],t[24]=Pr[(3&e[14])<<3|(224&e[15])>>5],t[25]=Pr[31&e[15]],t.join("")}function Nr(e){if(26!==e.length)throw Error(`Invalid length. Expected 26 bytes, got ${e.length}. Input: ${e}`);let t=(new TextEncoder).encode(e);if(255===Rr[t[0]]||255===Rr[t[1]]||255===Rr[t[2]]||255===Rr[t[3]]||255===Rr[t[4]]||255===Rr[t[5]]||255===Rr[t[6]]||255===Rr[t[7]]||255===Rr[t[8]]||255===Rr[t[9]]||255===Rr[t[10]]||255===Rr[t[11]]||255===Rr[t[12]]||255===Rr[t[13]]||255===Rr[t[14]]||255===Rr[t[15]]||255===Rr[t[16]]||255===Rr[t[17]]||255===Rr[t[18]]||255===Rr[t[19]]||255===Rr[t[20]]||255===Rr[t[21]]||255===Rr[t[22]]||255===Rr[t[23]]||255===Rr[t[24]]||255===Rr[t[25]])throw Error("Invalid base32 character");let i=new Uint8Array(16);return i[0]=Rr[t[0]]<<5|Rr[t[1]],i[1]=Rr[t[2]]<<3|Rr[t[3]]>>2,i[2]=(3&Rr[t[3]])<<6|Rr[t[4]]<<1|Rr[t[5]]>>4,i[3]=(15&Rr[t[5]])<<4|Rr[t[6]]>>1,i[4]=(1&Rr[t[6]])<<7|Rr[t[7]]<<2|Rr[t[8]]>>3,i[5]=(7&Rr[t[8]])<<5|Rr[t[9]],i[6]=Rr[t[10]]<<3|Rr[t[11]]>>2,i[7]=(3&Rr[t[11]])<<6|Rr[t[12]]<<1|Rr[t[13]]>>4,i[8]=(15&Rr[t[13]])<<4|Rr[t[14]]>>1,i[9]=(1&Rr[t[14]])<<7|Rr[t[15]]<<2|Rr[t[16]]>>3,i[10]=(7&Rr[t[16]])<<5|Rr[t[17]],i[11]=Rr[t[18]]<<3|Rr[t[19]]>>2,i[12]=(3&Rr[t[19]])<<6|Rr[t[20]]<<1|Rr[t[21]]>>4,i[13]=(15&Rr[t[21]])<<4|Rr[t[22]]>>1,i[14]=(1&Rr[t[22]])<<7|Rr[t[23]]<<2|Rr[t[24]]>>3,i[15]=(7&Rr[t[24]])<<5|Rr[t[25]],i}var Ur=class extends Error{constructor(e){super(`Invalid prefix "${e}". Must be at most 63 ASCII letters [a-z_]`),this.name="InvalidPrefixError"}},Mr=class extends Error{constructor(e,t){super(`Invalid TypeId. Prefix mismatch. Expected ${e}, got ${t}`),this.name="PrefixMismatchError"}},Lr=class extends Error{constructor(e){super("Invalid TypeId. Prefix cannot be empty when there's a separator: "+e),this.name="EmptyPrefixError"}},qr=class extends Error{constructor(e){super("Invalid length. Suffix should have 26 characters, got "+e),this.name="InvalidSuffixLengthError"}},Gr=class extends Error{constructor(e){super(`Invalid suffix. First character "${e}" must be in the range [0-7]`),this.name="InvalidSuffixCharacterError"}},jr=class extends Error{constructor(e,t){super(`Cannot convert TypeID of type ${e} to type ${t}`),this.name="TypeIDConversionError"}};function Br(e="",t=""){if(!function(e){if(e.length>63)return!1;let t,i,n;for(i=0,n=e.length;i<n;i+=1){t=e.charCodeAt(i);let r=t>96&&t<123;if((0===i||i===n-1)&&!r||!r&&95!==t)return!1}return!0}(e))throw new Ur(e);let i;if(t)i=t;else{let e=new Uint8Array(16);Or(void 0,e),i=_r(e)}if(26!==i.length)throw new qr(i.length);if(i[0]>"7")throw new Gr(i[0]);return Nr(i),""===e?i:`${e}_${i}`}function Fr(e){let t=e.lastIndexOf("_");return-1===t?"":e.substring(0,t)}function Vr(e){let t=e.lastIndexOf("_");return-1===t?e:e.substring(t+1)}var zr=class{constructor(e,t=""){this.prefix=e,this.suffix=t;let i=Br(e,t);this.prefix=Fr(i),this.suffix=Vr(i)}getType(){return this.prefix}getSuffix(){return this.suffix}asType(e){let t=this;if(t.prefix!==e)throw new jr(t.prefix,e);return t}toUUIDBytes(){return Nr(this.suffix)}toUUID(){return function(e,t=0){var i=kr(e,t);if(!function(e){return"string"==typeof e&&$r.test(e)}(i))throw TypeError("Stringified UUID is invalid");return i}(this.toUUIDBytes())}toString(){return""===this.prefix?this.suffix:`${this.prefix}_${this.suffix}`}static fromString(e,t){let i=function(e,t){let i,n,r=e.lastIndexOf("_");if(-1===r)i="",n=e;else if(i=e.substring(0,r),n=e.substring(r+1),!i)throw new Lr(e);if(!n)throw new qr(0);if(t&&i!==t)throw new Mr(t,i);return Br(i,n)}(e,t);return new zr(Fr(i),Vr(i))}static fromUUIDBytes(e,t){return new zr(e,_r(t))}static fromUUID(e,t){return new zr(e,_r(function(e){let t,i=new Uint8Array(16);return i[0]=(t=parseInt(e.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(e.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(e.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(e.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}(t)))}};const Wr={admission:"adm",integration:"int",integrationBackfill:"ibf",anonymous:"anon",beneficiary:"ben",coupon:"cpn",couponCode:"cod",customer:"cus",event:"evt",eventCollaborator:"ecl",eventCollaboratorInvite:"evi",membership:"mem",membershipBenefitClaim:"mbc",membershipCharge:"mch",membershipFob:"fob",membershipProgram:"mpg",membershipPurchase:"mpu",membershipSubscription:"msb",membershipTerm:"mtm",order:"ord",orderItem:"itm",orderFee:"fee",permissionScope:"psc",permissionRole:"prl",permissionSnapshot:"pss",payout:"pyt",paymentDispute:"pds",webhookInboxEvent:"wih",payoutAdjustmentApplication:"paa",payoutAdjustment:"adj",platformFunding:"pfu",payoutTransfer:"xfr",promoter:"pmt",refund:"rfd",cancellation:"cnl",section:"sct",scan:"scn",team:"tem",teamDeletion:"tdl",teamMember:"mbr",teamInvite:"inv",teamGateway:"tgw",teamGatewayAccount:"tga",taxProfile:"txp",tenant:"tnt",ticket:"tkt",user:"usr",venue:"ven",location:"loc",request:"req",report:"rpt",walletDevice:"wdv",schedule:"sch",session:"ssn",trackingEvent:"tev",trackingStats:"sta",hllShard:"shr",timeline:"tln",notification:"ntf"};function Yr(e){return function(e="",t=""){return new zr(e,t)}(Wr[e])}const Hr="ses_sid",Zr="ses_aid";function Kr(){return""+Yr("session")}function Jr(){return""+Yr("anonymous")}const Qr=er("Page Viewed.Screen Viewed.Products Searched.Product List Viewed.Product List Filtered.Promotion Viewed.Promotion Clicked.Product Clicked.Product Viewed.Product Added.Product Removed.Cart Viewed.Checkout Started.Checkout Step Viewed.Checkout Step Completed.Payment Info Entered.Order Completed.Order Updated.Order Refunded.Order Cancelled.Coupon Entered.Coupon Applied.Coupon Denied.Coupon Removed.Product Added to Wishlist.Product Removed from Wishlist.Wishlist Product Added to Cart.Product Shared.Cart Shared.Product Reviewed".split(".")),Xr=Qr.enum;function eo(e){return Array.isArray(e)?e:null==e?[]:[e]}const to="orpc";var io=class extends Error{constructor(...e){super(...e),this.name="AbortError"}};function no(e){let t;return()=>{if(t)return t.result;let i=e();return t={result:i},i}}function ro(){return globalThis["__@orpc/shared@1.14.10/otel/config__"]}function oo(e,t={},i){return(ro()?.tracer)?.startSpan(e,t,i)}function ao(e,t,i={}){if(!e)return;let n=function(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return"code"in e&&("string"==typeof e.code||"number"==typeof e.code)&&(t.code=e.code),t}return{message:e+""}}(t);e.recordException(n),(!i.signal?.aborted||i.signal.reason!==t)&&e.setStatus({code:2,message:n.message})}async function so({name:e,context:t,...i},n){let r=ro()?.tracer;if(!r)return n();let o=async e=>{try{return await n(e)}catch(t){throw ao(e,t,i),t}finally{e.end()}};return t?r.startActiveSpan(e,i,t,o):r.startActiveSpan(e,i,o)}async function co(e,t){let i=ro();if(!e||!i)return t();let n=i.trace.setSpan(i.context.active(),e);return i.context.with(n,t)}function lo(e){return!(!e||"object"!=typeof e)&&"next"in e&&"function"==typeof e.next&&Symbol.asyncIterator in e&&"function"==typeof e[Symbol.asyncIterator]}const uo=Symbol.asyncDispose??Symbol.for("asyncDispose");var po=class{#e=!1;#t=!1;#i;#n;constructor(e,t){this.#i=t,this.#n=function(e){let t=Promise.resolve();return(...i)=>t=t.catch((()=>{})).then((()=>e(...i)))}((async()=>{if(this.#e)return{done:!0,value:void 0};try{let t=await e();return t.done&&(this.#e=!0),t}catch(e){throw this.#e=!0,e}finally{this.#e&&!this.#t&&(this.#t=!0,await this.#i("next"))}}))}next(){return this.#n()}async return(e){return this.#e=!0,this.#t||(this.#t=!0,await this.#i("return")),{done:!0,value:e}}async throw(e){throw this.#e=!0,this.#t||(this.#t=!0,await this.#i("throw")),e}async[uo](){this.#e=!0,this.#t||(this.#t=!0,await this.#i("dispose"))}[Symbol.asyncIterator](){return this}};function mo({name:e,...t},i){let n;return new po((async()=>{n??=oo(e);try{let e=await co(n,(()=>i.next()));return n?.addEvent(e.done?"completed":"yielded"),e}catch(e){throw ao(n,e,t),e}}),(async e=>{try{"next"!==e&&await co(n,(()=>i.return?.()))}catch(e){throw ao(n,e,t),e}finally{n?.end()}}))}function ho(e,t,i){let n=(t,r)=>{let o=e[r];return o?o({...t,next:(e=t)=>n(e,r+1)}):i(t)};return n(t,0)}function fo(e){if(e)return JSON.parse(e)}function yo(e){return JSON.stringify(e)}function go(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function vo(e){return!!e&&("object"==typeof e||"function"==typeof e)}function bo(e,t){let i=e;for(let e of t){if(!vo(i))return;i=i[e]}return i}const wo=(()=>{let e=function(){};return Object.freeze(e.prototype=Object.create(null)),e})();function $o(e,...t){return"function"==typeof e?e(...t):e}function Io(e){return new Proxy(e,{get(e,t,i){let n=Reflect.get(e,t,i);return"then"!==t||"function"!=typeof n?n:new Proxy(n,{apply(t,i,n){if(2!==n.length||n.some((e=>!function(e){return"function"==typeof e&&Eo.test(""+e)}(e))))return Reflect.apply(t,i,n);let r=!0;n[0].call(i,Io(new Proxy(e,{get:(e,t,i)=>{if(!r||"then"!==t)return Reflect.get(e,t,i);r=!1}})))}})}})}const Eo=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/,ko={BAD_REQUEST:{status:400,message:"Bad Request"},UNAUTHORIZED:{status:401,message:"Unauthorized"},FORBIDDEN:{status:403,message:"Forbidden"},NOT_FOUND:{status:404,message:"Not Found"},METHOD_NOT_SUPPORTED:{status:405,message:"Method Not Supported"},NOT_ACCEPTABLE:{status:406,message:"Not Acceptable"},TIMEOUT:{status:408,message:"Request Timeout"},CONFLICT:{status:409,message:"Conflict"},PRECONDITION_FAILED:{status:412,message:"Precondition Failed"},PAYLOAD_TOO_LARGE:{status:413,message:"Payload Too Large"},UNSUPPORTED_MEDIA_TYPE:{status:415,message:"Unsupported Media Type"},UNPROCESSABLE_CONTENT:{status:422,message:"Unprocessable Content"},TOO_MANY_REQUESTS:{status:429,message:"Too Many Requests"},CLIENT_CLOSED_REQUEST:{status:499,message:"Client Closed Request"},INTERNAL_SERVER_ERROR:{status:500,message:"Internal Server Error"},NOT_IMPLEMENTED:{status:501,message:"Not Implemented"},BAD_GATEWAY:{status:502,message:"Bad Gateway"},SERVICE_UNAVAILABLE:{status:503,message:"Service Unavailable"},GATEWAY_TIMEOUT:{status:504,message:"Gateway Timeout"}};let To;var Ao=class e extends Error{defined;code;status;data;static{let t=Symbol.for("__@orpc/client@1.14.10/error/ORPC_ERROR_CONSTRUCTORS__");globalThis[t]??=new WeakSet,To=globalThis[t],To.add(e)}constructor(e,...t){let i=function(e){return e[0]??{}}(t);if(void 0!==i.status&&!So(i.status))throw Error("[ORPCError] Invalid error status code.");let n=function(e,t){return t||ko[e]?.message||e}(e,i.message);super(n,i),this.code=e,this.status=function(e,t){return t??ko[e]?.status??500}(e,i.status),this.defined=i.defined??!1,this.data=i.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](e){if(To.has(this)){let t=function(e){return vo(e)?Object.getPrototypeOf(e)?.constructor:null}(e);if(t&&To.has(t))return!0}return super[Symbol.hasInstance](e)}};function xo(e){return e instanceof Ao?e:new Ao("INTERNAL_SERVER_ERROR",{message:"Internal server error",cause:e})}function So(e){return e<200||e>=400}function Do(e){if(!go(e))return!1;let t=["defined","code","status","message","data"];return!Object.keys(e).some((e=>!t.includes(e)))&&"defined"in e&&"boolean"==typeof e.defined&&"code"in e&&"string"==typeof e.code&&"status"in e&&"number"==typeof e.status&&So(e.status)&&"message"in e&&"string"==typeof e.message}function Co(e,t={}){return new Ao(e.code,{...t,...e})}var Oo=class extends TypeError{},Po=class extends TypeError{},Ro=class extends Error{data;constructor(e){super(e?.message??"An error event was received",e),this.data=e?.data}};function _o(e){let t=e.replace(/\n+$/,"").split(/\n/),i={data:void 0,event:void 0,id:void 0,retry:void 0,comments:[]};for(let e of t){let t=e.indexOf(":"),n=-1===t?e:e.slice(0,t),r=-1===t?"":e.slice(t+1).replace(/^\s/,"");if(0===t)i.comments.push(r);else if("data"===n)i.data??="",i.data+=r+"\n";else if("event"===n)i.event=r;else if("id"===n)i.id=r;else if("retry"===n){let e=Number.parseInt(r);Number.isInteger(e)&&e>=0&&""+e===r&&(i.retry=e)}}return i.data=i.data?.replace(/\n$/,""),i}var No=class{constructor(e={}){this.options=e}incomplete="";feed(e){this.incomplete+=e;let t=this.incomplete.lastIndexOf("\n\n");if(-1===t)return;let i=this.incomplete.slice(0,t).split(/\n\n/);this.incomplete=this.incomplete.slice(t+2);for(let e of i){let t=_o(e+"\n\n");this.options.onEvent&&this.options.onEvent(t)}}end(){if(this.incomplete)throw new Po("Event Iterator ended before complete")}},Uo=class extends TransformStream{constructor(){let e;super({start(t){e=new No({onEvent:e=>{t.enqueue(e)}})},transform(t){e.feed(t)},flush(){e.end()}})}};function Mo(e){if(e.includes("\n"))throw new Oo("Event's id must not contain a newline character")}function Lo(e){if(!Number.isInteger(e)||e<0)throw new Oo("Event's retry must be a integer and >= 0")}function qo(e){if(e.includes("\n"))throw new Oo("Event's comment must not contain a newline character")}function Go(e){let t="";return t+=function(e){let t="";for(let i of e??[])qo(i),t+=`: ${i}\n`;return t}(e.comments),void 0!==e.event&&(function(e){if(e.includes("\n"))throw new Oo("Event's event must not contain a newline character")}(e.event),t+=`event: ${e.event}\n`),void 0!==e.retry&&(Lo(e.retry),t+=`retry: ${e.retry}\n`),void 0!==e.id&&(Mo(e.id),t+=`id: ${e.id}\n`),t+=function(e){let t=e?.split(/\n/)??[],i="";for(let e of t)i+=`data: ${e}\n`;return i}(e.data),t+="\n",t}const jo=Symbol("ORPC_EVENT_SOURCE_META");function Bo(e,t){if(void 0===t.id&&void 0===t.retry&&!t.comments?.length)return e;if(void 0!==t.id&&Mo(t.id),void 0!==t.retry&&Lo(t.retry),void 0!==t.comments)for(let e of t.comments)qo(e);return new Proxy(e,{get:(e,i,n)=>i===jo?t:Reflect.get(e,i,n)})}function Fo(e){return vo(e)?Reflect.get(e,jo):void 0}function Vo(e,t){let i={...e};for(let e in t)Array.isArray(t[e])?i[e]=[...eo(i[e]),...t[e]]:void 0!==t[e]&&(i[e]=Array.isArray(i[e])?[...i[e],t[e]]:void 0===i[e]?t[e]:[i[e],t[e]]);return i}function zo(e,t){let i=async e=>{let i=await t.error(e);if(i!==e){let t=Fo(e);t&&vo(i)&&(i=Bo(i,t))}return i};return new po((async()=>{let{done:n,value:r}=await(async()=>{try{return await e.next()}catch(e){throw await i(e)}})(),o=await t.value(r,n);if(o!==r){let e=Fo(r);e&&vo(o)&&(o=Bo(o,e))}return{done:n,value:o}}),(async()=>{try{await(e.return?.())}catch(e){throw await i(e)}}))}function Wo(e,t={}){let i=t.path??[];return Io(new Proxy((async(...[t,n={}])=>await e.call(i,t,function(e){return{...e,context:e.context??{}}}(n))),{get:(t,n)=>"string"==typeof n?Wo(e,{path:[...i,n]}):Reflect.get(t,n)}))}function Yo(e,t){return{...e,...t}}var Ho=class{"~orpc";constructor(e){if(e.route?.successStatus&&So(e.route.successStatus))throw Error("[ContractProcedure] Invalid successStatus.");if(Object.values(e.errorMap).some((e=>e&&e.status&&!So(e.status))))throw Error("[ContractProcedure] Invalid error status code.");this["~orpc"]=e}};function Zo(e){return e instanceof Ho||("object"==typeof e||"function"==typeof e)&&null!==e&&"~orpc"in e&&"object"==typeof e["~orpc"]&&null!==e["~orpc"]&&"errorMap"in e["~orpc"]&&"route"in e["~orpc"]&&"meta"in e["~orpc"]}function Ko(e,t){return{...e,...t}}function Jo(e,t){return{...e,...t}}function Qo(e,t){return e?`${e}${t}`:t}function Xo(e,t){return e?[...e,...t]:t}function ea(e,t){let i=e;return t.prefix&&(i=function(e,t){return e.path?{...e,path:`${t}${e.path}`}:e}(i,t.prefix)),t.tags?.length&&(i=function(e,t){return{...e,tags:[...t,...e.tags??[]]}}(i,t.tags)),i}function ta(e,t){if(Zo(e))return new Ho({...e["~orpc"],errorMap:Yo(t.errorMap,e["~orpc"].errorMap),route:ea(e["~orpc"].route,t)});if("object"!=typeof e||!e)return e;let i={};for(let n in e)i[n]=ta(e[n],t);return i}const ia=new class e extends Ho{constructor(e){super(e),this["~orpc"].prefix=e.prefix,this["~orpc"].tags=e.tags}$meta(t){return new e({...this["~orpc"],meta:t})}$route(t){return new e({...this["~orpc"],route:t})}$input(t){return new e({...this["~orpc"],inputSchema:t})}errors(t){return new e({...this["~orpc"],errorMap:Yo(this["~orpc"].errorMap,t)})}meta(t){return new e({...this["~orpc"],meta:Ko(this["~orpc"].meta,t)})}route(t){return new e({...this["~orpc"],route:Jo(this["~orpc"].route,t)})}input(t){return new e({...this["~orpc"],inputSchema:t})}output(t){return new e({...this["~orpc"],outputSchema:t})}prefix(t){return new e({...this["~orpc"],prefix:Qo(this["~orpc"].prefix,t)})}tag(...t){return new e({...this["~orpc"],tags:Xo(this["~orpc"].tags,t)})}router(e){return ta(e,this["~orpc"])}}({errorMap:{},route:{},meta:{}}),na={defaultMethod:"POST",defaultSuccessStatus:200,defaultSuccessDescription:"OK",defaultInputStructure:"compact",defaultOutputStructure:"compact"};function ra(e,t){return void 0===t?na[e]:t}const oa={},aa={};function sa(e,t){try{let i=(oa[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return i in aa?aa[i]:ca(i,i.split(":"))}catch{if(e in aa)return aa[e];let t=e?.match(da);return t?ca(e,t.slice(1)):NaN}}const da=/([+-]\d\d):?(\d\d)?/;function ca(e,t){let i=+(t[0]||0),n=+(t[1]||0),r=(t[2]||0)/60;return aa[e]=60*i+n>0?60*i+n+r:60*i-n-r}var la=class e extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(sa(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),ma(this,e)):this.setTime(Date.now())}static tz(t,...i){return i.length?new e(...i,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-sa(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),pa(this),+this}[Symbol.for("constructDateFrom")](t){return new e(+new Date(t),this.timeZone)}};const ua=/^(get|set)(?!UTC)/;function pa(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-sa(e.timeZone,e)))}function ma(e,t){let i=Array.isArray(t)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(t):+e.internal,n=sa(e.timeZone,e),r=n>0?Math.floor(n):Math.ceil(n),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);let a=-new Date(+e).getTimezoneOffset(),s=-new Date(+o).getTimezoneOffset(),d=a;if(a-s&&a!==r&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),i=a-r;i&&t.setUTCMinutes(t.getUTCMinutes()+i);let n=sa(e.timeZone,t);(n>0?Math.floor(n):Math.ceil(n))===r&&(d=s)}let c=d-r;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);let l=new Date(+e);l.setUTCSeconds(0);let u=a>0?l.getSeconds():(l.getSeconds()-60)%60,p=Math.round(-60*sa(e.timeZone,e))%60;(p||u)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+u);let m=sa(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),f=h!==r,y=-new Date(+e).getTimezoneOffset()-h-c,g=h-r,v=i-60*h*1e3,b=g>0&&ha(e)-i==60*g*1e3&&ha(e,v)!==i;if(f&&y&&!b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);let t=sa(e.timeZone,e),i=h-(t>0?Math.floor(t):Math.ceil(t));i&&y<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i)}pa(e);let w=(t?i:i+1e3*p)-+e.internal;w&&Math.abs(w)<18e5&&(Date.prototype.setTime.call(e,+e+w),pa(e))}function ha(e,t){let i=new Date(t??+e);return i.setUTCSeconds(i.getUTCSeconds()-Math.round(60*-sa(e.timeZone,i))),+i}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!ua.test(e))return;let t=e.replace(ua,"$1UTC");la.prototype[t]&&(e.startsWith("get")?la.prototype[e]=function(){return this.internal[t]()}:(la.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),ma(e)}(this),+this},la.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),pa(this),+this}))}));const fa=Symbol.for("constructDateFrom");function ya(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&fa in e?e[fa](t):e instanceof Date?new e.constructor(t):new Date(t)}function ga(e,t){let i=function(e){return ya(e,e)}(e);return isNaN(t)?ya(e,NaN):(t&&i.setDate(i.getDate()+t),i)}function va(e){return("string"==typeof e?new Date(e):e).toISOString().replace(/\.\d{3}Z$/,"")}const ba=["ALWAYS","HIDDEN","AFTER_ADMISSION"];let wa;function $a(e){return function(e,t){return new In({type:"number",coerce:!0,checks:[],...C(t)})}(0,e)}function Ia(e){return function(e,t){return new An({type:"boolean",coerce:!0,...C(t)})}(0,e)}!function(e){e.signature="a1B2c3D4e5F6g7H8";let t=e.Tenant={id:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",oldId:"none",name:"Session Services",slug:"session-services",email:"hello@session.services",adminTeamId:"tem_01jqpjksnsen9vprw95et60t3m",defaultCurrency:"AUD",smsSenderId:"SESSIONS",baseUrl:{dev:"http://localhost:3000",production:"https://app.session.services"},logo:{icon:{src:"https://assets.session.services/icon-bg.png",width:29,height:29},email:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},website:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},qr:{src:"https://assets.session.services/tenants/session-services/qr.svg"}},favicon:"https://assets.session.services/tenants/session-services/favicon.svg"};e.Region={country:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",name:"Australia",slug:"australia",kind:"COUNTRY",order:1},state:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",name:"New South Wales",slug:"nsw",kind:"STATE",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",order:2},city:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf4",name:"Sydney",slug:"sydney",kind:"CITY",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",latitude:-33.8688,longitude:151.2093,radius:25,order:3}};let i=e.User={id:"usr_01jps5cgsd4tzjghtnt45qnhn0",email:"test@session.services",firstName:"Jay",lastName:"McMullen",imageUrl:void 0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),tenantId:t.id,deleted:!1};e.EmailVerification={id:"emlvrf_01jps5cgsd4tzjghtnt45qnhn0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+18e5).toISOString(),createdAt:(new Date).toISOString()},e.PasswordReset={id:"pwrst_01jps5cgsd4tzjghtnt45qnhn0",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+9e5).toISOString(),emailVerified:!1,twoFactorVerified:!1,createdAt:(new Date).toISOString()};let n=e.Team={id:"tem_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Session Services",slug:"session-services",description:"This is only a test...",type:"PROMOTER",approval:"APPROVED",isDemo:!1,tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1},r=e.Promoter={id:"pmt_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,name:"Session Services",slug:"session-services",description:"This is only a test...",payoutFrequency:"AFTER_EVENT",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",geohash:"r3gx1",location:{id:"loc_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney",address:"Sydney NSW 2000, Australia",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney"},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1};e.Venue={id:"ven_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,locationId:"loc_01jqpjksnsen9vprw95et60t3m",approval:"APPROVED",name:"Sydney Opera House",slug:"sydney-opera-house",description:"Iconic performing arts venue in Sydney, Australia",type:"THEATER",logo:{src:"https://assets.session.services/venues/sydney-opera-house.png",alt:"Sydney Opera House",width:800,height:800},images:[{src:"https://assets.session.services/venues/sydney-opera-house-1.jpg",alt:"Sydney Opera House exterior",width:1920,height:1080}],contact:{email:"info@sydneyoperahouse.com",phone:"+61 2 9250 7111",website:"https://www.sydneyoperahouse.com",instagram:"https://instagram.com/sydneyoperahouse",facebook:"https://facebook.com/sydneyoperahouse",twitter:"https://twitter.com/sydneyoperahouse"},location:{id:"loc_01jqpjksnsen9vprw95et60t3m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney Opera House",address:"Bennelong Point, Sydney NSW 2000",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8567844,longitude:151.2152967,timeZone:"Australia/Sydney",image:{src:"https://assets.session.services/locations/sydney-opera-house.jpg",alt:"Sydney Opera House",width:1200,height:800}},geohash:"r3gx2f9",capacity:5738,tenantId:t.id,deleted:!1};let o=e.PromoterMember={id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,userId:i.id,user:{id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,imageUrl:i.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id};e.TeamMember={id:"mbr_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,userId:i.id,user:{id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,imageUrl:i.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id},e.TeamInvite={id:"inv_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),expiresAt:Math.floor(ga(new Date,7).getTime()/1e3),teamId:n.id,token:"a76e3c5d7109345b58e383e6d90f7728b75f9a38b727f0b9edd5b977e8c3b5d0",email:"team-invite@session.services",invitedBy:i.id,permissions:["event.write","order.write"],tenantId:t.id},e.CurrentSession={user:i,initials:"JM",isTenantAdmin:!0,promoters:[{...r,member:o}]},e.Session={id:"sess_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,expiresAt:ga(new Date,30).toISOString(),twoFactorVerified:!1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.BackupCode={id:"bkc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,code:"ABC123DEF456",used:!1,createdAt:(new Date).toISOString()},e.UserSession={id:"uss_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,ipAddress:"192.168.1.100",userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",location:"Sydney, Australia",isCurrent:!0,expiresAt:ga(new Date,30).toISOString(),createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.PasskeyCredential={id:"pkc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,name:"iPhone Touch ID",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!0,credentialBackupState:!1,credentialDeviceType:"singleDevice",counter:1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.SecurityKeyCredential={id:"skc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,name:"YubiKey 5 NFC",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!1,credentialBackupState:!1,credentialDeviceType:"crossPlatform",counter:5,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.TOTPCredential={id:"tpc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,secret:"JBSWY3DPEHPK3PXP",verified:!0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()};let a=e.Location={id:"loc_01hk153x00eh99pagyydz03sbz",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJ6zWCPUyxEmsRmc6BPrNaP4s",name:"Watson's EQ",address:"The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",city:"Moore Park",state:"New South Wales",postcode:"2021",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney",types:["establishment","point_of_interest","restaurant","bar"],image:{src:"https://assets.session.services/locations/watsons-eq.jpg",alt:"Watson's EQ",width:1200,height:800}};e.CarouselLocation={id:"loc_01hk153x00efq9ygdkc9eb3rjt",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJc8-zlGSvEmsR0rbZWpCP6z0",name:"Carousel Bar & Ballroom",address:"169 Oxford St, Darlinghurst NSW 2010, Australia",city:"Darlinghurst",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8803603,longitude:151.2161228,timeZone:"Australia/Sydney",types:["establishment","night_club","point_of_interest"],image:{src:"https://assets.session.services/locations/loc_01hk153x00efq9ygdkc9eb3rjt.jpg",alt:"Carousel Bar & Ballroom",width:1200,height:800}};let s=e.Event={id:"evt_01jps5cgsenjrazw6wswmyspa3",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Test Event",slug:"test-event",description:"This is only a test...",approval:"APPROVED",status:"UPCOMING",visibility:"PUBLIC",currency:"AUD",entryStartsAt:va(ga(new Date,1)),entryEndsAt:va(ga(new Date,2)),publishAt:va(new Date),images:{mobile:{src:"https://assets.session.services/event-mobile.jpg",alt:"Mobile Event Image",width:1080,height:1350},desktop:{src:"https://assets.session.services/event-desktop.jpg",alt:"Desktop Event Image",width:1920,height:1080}},geohash:"r3gx1",location:a,teamId:n.id,promoterId:r.id,tenantId:t.id,deleted:!1},d=e.Section={id:"sct_01jps5cgse0g3qj16kpq8t221r",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,promoterId:r.id,eventId:s.id,eventSlug:s.slug,name:"General Admission",capacity:1e3,limit:-1,available:700,sold:200,reserved:100,order:0,visibility:"ALWAYS",location:a,passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"},c=e.Admission={id:"adm_01jps5cgsee0xvapbk92e8eb4g",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sectionId:d.id,teamId:n.id,promoterId:r.id,eventId:s.id,eventSlug:s.slug,name:"Final Release",subtitle:"Entry before 10pm",description:"Early bird pricing with priority entry. Must present valid ID at gate.",capacity:1e5,limit:-1,available:7e4,sold:2e4,reserved:1e4,order:0,entryStartsAt:va(ga(new Date,1)),entryEndsAt:va(ga(new Date,2)),saleStartsAt:va(new Date),saleEndsAt:va(ga(new Date,2)),saleEndsBehavior:"SALE_ENDED",price:{base:1e3,booking:200,currency:"AUD"},visibility:"ALWAYS",passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"};e.DetailedEvent={...s,admissions:[c],sections:[d]};let l=e.Beneficiary={id:"ben_01jps5cgse5n6mg1ymkew9tsfh",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"My Bank Account",currency:"AUD",gatewayId:"7489cb17-24c5-4acf-a0cf-d93ed38081fe",gateway:"AIRWALLEX",teamId:n.id,teamIds:[n.id],venueIds:[],tenantId:t.id};e.AirwallexBeneficiary={transfer_methods:["LOCAL"],beneficiary:{additional_info:{personal_email:"test@session.services"},address:{city:"Sydney",country_code:"AU",postcode:"2000",state:"AU-NSW",street_address:"123 George Street"},bank_details:{account_currency:"AUD",account_name:"John Doe",account_number:"999994",account_routing_type1:"bsb",account_routing_value1:"062004",bank_country_code:"AU",local_clearing_system:"BANK_TRANSFER"},entity_type:"PERSONAL",company_name:"Doe Enterprises Pty Ltd",first_name:"John",last_name:"Doe"}};let u=e.Coupon={id:"cpn_01jps5cgsfzs1ksqaet5hba8ac",couponId:"cpn_01jps5cgsfzs1ksqaet5hba8ac",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"TEAM",currency:"AUD",discount:50,uses:0,limit:-1,orderLimit:void 0,membersOnly:!1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:n.id,tenantId:t.id,deleted:!1},p=e.CouponCode={id:"cod_01jps5cgsfzftw7hxcvr2wftk2",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST50",uses:0,tenantId:t.id,couponId:u.id,teamId:n.id,deleted:!1},m=e.AmountCoupon={id:"cpn_01jps5cgsfndn8jcsfvh72x811",couponId:"cpn_01jps5cgsfndn8jcsfvh72x811",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"EVENTS",currency:"AUD",eventIds:[s.id],discount:50,uses:0,limit:-1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:n.id,tenantId:t.id};e.AmountCouponCode={id:"cod_01jps5cgsfq06xvvhg0hn2rdzd",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST5DOLLAR",uses:0,tenantId:t.id,couponId:m.id,teamId:n.id};let h=e.Customer={id:"cus_01jps5cgsf4pn2a32eamppnap1",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),firstName:"Test",lastName:"User",email:"test@session.services",phone:"+61411111111",tenantId:t.id},f=e.PayoutTransfer={id:"xfr_01jq8s6c38f97w9yfrfcdhf47v",createdAt:(new Date).toISOString(),kind:"TICKETS",amount:1e3,currency:"AUD",fee:0,feeCurrency:"AUD",reference:"XYZ",gateway:"AIRWALLEX",gatewayId:"fe33fb0f-d9d8-47cd-8eef-6a19bd6223eb",beneficiary:l.name,beneficiaryId:l.id};e.PayoutDeduction={id:"pdn_01jq8s6c38f97w9yfrfcdhf47v",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),amount:-1e3,currency:"AUD",description:"Legacy payout deduction",gateway:"AIRWALLEX",gatewayId:"fe33fb0f-d9d8-47cd-8eef-6a19bd6223eb",beneficiary:l.name,beneficiaryId:l.id};let y=e.Payout={id:"pyt_01jps5cgsfv2wre6hd0rc4w4t8",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),paidAt:(new Date).toISOString(),status:"PAID",method:"AIRWALLEX",structure:"DEFAULT",approval:"PENDING",frequency:"AFTER_EVENT",transfers:[f],event:{id:s.id,name:s.name,slug:s.slug,location:s.location.name},price:{net:1e3,total:1e3,gross:1e3,base:1e3,booking:0,refunded:0,discount:0,gateway:0,dispute:0,deductions:0,shipping:0,sms:0,currency:"AUD"},eventId:s.id,teamId:n.id,promoterId:r.id,promoterSlug:r.slug,tenantId:t.id},g=e.OrderItem={id:"itm_01jps5cgsfwyxj0516571eaf17",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:"ord_01jps5cgsfgve5b5g2666kyryh",kind:"ADMISSION",quantity:2,admissionId:c.id,sectionId:d.id,price:{net:c.price.base+c.price.booking,total:c.price.base+c.price.booking,gross:c.price.base+c.price.booking,base:c.price.base,booking:c.price.booking,refunded:0,discount:0,currency:c.price.currency}};e.OrderFee={id:"fee_01jps5cgsgamykd6kh2t738qkh",createdAt:(new Date).toISOString(),reason:"Gateway Fee",amount:-30,currency:"AUD",requestId:"att_sgpdz4v2ph1axmdmdx8_m8w6qv"};let v=e.OrderOffer={kind:"SMS_DELIVERY",label:"SMS ticket delivery",price:{amount:200,currency:"AUD"}},b=e.Order={id:"ord_01jps5cgsfgve5b5g2666kyryh",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),reservedAt:(new Date).toISOString(),status:"PENDING",price:{net:500,total:1400,gross:2200,base:1e3,booking:400,discount:-1e3,refunded:-700,gateway:0,dispute:0,shipping:0,sms:200,currency:"AUD"},code:{id:p.id,name:p.name},event:{id:s.id,name:s.name,slug:s.slug},fees:[],items:[g],customer:wa.Customer,customerId:wa.Customer.id,teamId:wa.Team.id,promoterId:wa.Promoter.id,promoterSlug:wa.Promoter.slug,eventId:wa.Event.id,eventSlug:wa.Event.slug,payment:{method:"AIRWALLEX",source:"CARD"},payoutIds:[y.id],refunds:[],offers:[v],tenantId:wa.Tenant.id,checkoutUrl:t.baseUrl.dev+"/checkout/ord_01jps5cgsfgve5b5g2666kyryh",signature:"Q2hXbG9uZ1NpZzE2"},w=e.TicketScan={id:"scn_01jq4rjmtzyzgtsavn9f34mxan",scannedAt:(new Date).toISOString(),scannedBy:{id:i.id,firstName:i.firstName,lastName:i.lastName,email:i.email},scannedById:i.id,deviceId:"dev_01jq4rjvrgar43zwvyakbje22m",kind:"CHECK_IN"};e.OrderRefund={id:"rfd_01jps5cgsfgve5b5g2666kyryh",request:{idempotencyKey:"refund_12345_customer_request"},status:"SUCCEEDED",acceptedAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),price:{currency:"AUD",total:1200,items:1200,shipping:0,fees:0},reason:"CUSTOMER_REQUEST",note:"Customer requested refund due to schedule conflict",tickets:{cancelRequested:!0,cancelled:!0,cancelledCount:2},gateway:{provider:"STRIPE",refundId:"re_1234567890abcdef",idempotencyKey:"rfd_01jps5cgsfgve5b5g2666kyryh"},actor:{type:"USER",userId:i.id},notification:{requested:!0,sentAt:(new Date).toISOString()},createdAt:(new Date).toISOString()},e.OrderRefundItem={orderItemId:g.id,quantity:2,amount:1200,ticketIds:["tkt_01jps5cgsg0s32w2pr73vbccde"]},e.Notification={id:"ntf_01jps5cgsfgve5b5g2666kyryh",aggregateType:"ORDER",aggregateId:b.id,eventId:s.id,kind:"ORDER_CONFIRMATION",channel:"EMAIL",status:"DELIVERED",providerMessageId:"msg_abc123def456",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sentAt:(new Date).toISOString(),deliveredAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),failureCode:"BOUNCE",failureReason:"Mailbox unavailable",tenantId:t.id},e.Timeline={id:"tln_01jps5cgsfgve5b5g2666kyryh"},e.SmsOrder={id:"ord_01k74g0tbwfvnb7b0e2esms001"},e.Ticket={id:"tkt_01jps5cgsg0s32w2pr73vbccde",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"REDEEMED",scans:[w],token:"7b81e13025f78f9935d5933eec3ab25e3c2bb811c99f2470182dd6ba4394ff82",attendee:{email:h.email,firstName:h.firstName,lastName:h.lastName},event:{id:s.id,name:s.name,slug:s.slug,location:s.location,entryStartsAt:s.entryStartsAt,entryEndsAt:s.entryEndsAt,images:s.images},admission:{id:c.id,name:c.name,price:c.price,entryStartsAt:c.entryStartsAt,entryEndsAt:c.entryEndsAt},eventId:s.id,admissionId:c.id,customerId:h.id,orderId:b.id,orderItemId:g.id,teamId:n.id,promoterId:r.id,promoterSlug:r.slug,tenantId:t.id}}(wa||={});const Ea=er(["PENDING","APPROVED","REJECTED"]).meta({description:"Approval status. PENDING: awaiting review, APPROVED: approved for operation, REJECTED: rejected and cannot operate"}),ka=new Set("AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" ")),Ta=Qi().trim().toUpperCase().regex(/^[A-Z]{2}$/,"Enter a two-letter ISO country code").refine((e=>ka.has(e)),{message:"Enter an assigned ISO country code"}).meta({description:"ISO 3166-1 alpha-2 country code",examples:["AU"]}),Aa=er("AED.ALL.AMD.ANG.AOA.ARS.AUD.AWG.AZN.BAM.BBD.BDT.BGN.BHD.BIF.BMD.BND.BOB.BRL.BSD.BTN.BWP.BZD.CAD.CHF.CLP.CNY.COP.CRC.CVE.CZK.DJF.DKK.DOP.DZD.EGP.ERN.ETB.EUR.FJD.FKP.GBP.GEL.GHS.GIP.GMD.GNF.GTQ.GYD.HKD.HNL.HUF.IDR.ILS.INR.ISK.JMD.JOD.JPY.KES.KGS.KHR.KMF.KRW.KWD.KYD.KZT.LAK.LBP.LKR.LRD.LSL.LYD.MAD.MDL.MGA.MKD.MNT.MOP.MUR.MVR.MWK.MXN.MYR.NAD.NGN.NIO.NOK.NPR.NZD.OMR.PAB.PEN.PGK.PHP.PKR.PLN.PYG.QAR.RON.RSD.RWF.SAR.SBD.SCR.SEK.SGD.SHP.SLE.SRD.SVC.SZL.THB.TJS.TMT.TND.TOP.TRY.TTD.TWD.TZS.UAH.UGX.USD.UYU.UZS.VND.VUV.WST.XAF.XCD.XOF.XPF.ZAR.ZMW.ZWL".split(".")).meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for transactions and payouts"}),xa={BAD_REQUEST:{status:400},INPUT_VALIDATION_FAILED:{status:422,data:Vn({formErrors:Bn(Qi()),fieldErrors:Qn(Qi(),Bn(Qi()))})},UNAUTHORIZED:{status:401},FORBIDDEN:{status:403},NOT_FOUND:{status:404},CONFLICT:{status:409},PRECONDITION_FAILED:{status:412},TOO_MANY_REQUESTS:{status:429},INTERNAL_SERVER_ERROR:{status:500},NOT_IMPLEMENTED:{status:501},SERVICE_UNAVAILABLE:{status:503}},Sa=er([{category:"Day Party",group:"Event Type",priority:"core",notes:'Daytime or afternoon-focused event, often starting before evening and ending earlier than club nights; common signals include "day party", "day sesh", "Sunday session", "afternoon", "sunset", "courtyard", "rooftop", "poolside" or "open air".'},{category:"Festival",group:"Event Type",priority:"core",notes:'Large-scale event with multiple artists, stages, areas, brands or sessions; may run all day, across multiple days, or as a major ticketed programme; match terms like "festival", "lineup", "multi-stage", "weekender", "one-day festival" or "camping".'},{category:"Club Night",group:"Event Type",priority:"core",notes:'DJ-led nightclub or club-room event, usually late-night and dancefloor-focused; match "club night", "nightclub", "club room", "resident DJ", "guest DJ", "DJ sets", "all night" or explicitly club-focused programming. Do not use for every electronic event or DJ set without a club/nightclub context.'},{category:"Concert",group:"Event Type",priority:"high",notes:'Headline live music event in a concert, gig, theatre, arena or show format; match "concert", "gig", "headline show", "live show", "tour date", "arena", "theatre" or "standing room". Use alongside "Live Performance" when live performers are explicit.'},{category:"Listening Party",group:"Event Type",priority:"medium",notes:'Playback, album launch or listening-focused event centred on hearing recorded music together; match "listening party", "album playback", "record launch", "listening session", "label preview" or "listening bar".'},{category:"Workshop",group:"Event Type",priority:"medium",notes:'Educational, participatory or skills-focused event; match "workshop", "masterclass", "clinic", "class", "seminar", "producer workshop", "DJ workshop" or "hands-on session".'},{category:"Afterparty",group:"Event Type",priority:"high",notes:'Post-main-event continuation, usually late-night or early-morning, often tied to a festival, concert, gig, show, launch or headline act; match "official afterparty", "after party", "kick-ons", "continue the night" or "late-night session".'},{category:"Boat Party",group:"Event Type",priority:"high",notes:'Event held on a boat, yacht, harbour cruise or floating venue; strong signals include "boat party", "cruise", "harbour", "on the water", "boarding time", "sailing", "wharf", "dock" or "yacht".'},{category:"Pool Party",group:"Event Type",priority:"high",notes:'Party centred around a pool, resort, hotel or swim-friendly venue; usually daytime or summer-focused; match "pool party", "poolside", "swimwear", "cabana", "resort", "hotel pool", "daybed" or "summer session".'},{category:"Live Performance",group:"Event Type",priority:"high",notes:'Event includes live acts, bands, vocalists, instrumentalists or live electronic performance rather than only DJ sets; match "live", "live set", "performing live", "band", "vocalist", "singer", "instrumental", "live show" or "concert".'},{category:"Warehouse",group:"Venue Type",priority:"core",notes:'Industrial, raw or repurposed warehouse-style venue; often underground, large-room, concrete, late-night or rave-oriented; match "warehouse", "industrial space", "secret warehouse", "inner west warehouse", "factory", "converted space" or "underground location".'},{category:"Nightclub",group:"Venue Type",priority:"core",notes:'Purpose-built nightlife or dance venue, club room or nightclub setting; match "nightclub", "night club", "club room", "dance club" or venues explicitly described as clubs. This describes the venue, not the event programme.'},{category:"Bar",group:"Venue Type",priority:"core",notes:'Event held at a bar, pub, tavern or cocktail bar; match "bar", "pub", "tavern", "cocktail bar", "wine bar" or "hotel bar". Do not use for every venue with a bar service.'},{category:"Open Air",group:"Venue Type",priority:"core",notes:'Outdoor event in an uncovered or partly outdoor setting; match "open air", "outdoor", "under the sky", "courtyard", "garden", "terrace", "park", "field", "amphitheatre" or "sunset session".'},{category:"Arena",group:"Venue Type",priority:"high",notes:'Large indoor arena, stadium or major venue built for high-capacity concerts, sports or touring shows; match "arena", "stadium", "entertainment centre", "exhibition centre" or "convention centre".'},{category:"Rooftop",group:"Venue Type",priority:"high",notes:'Event held on a rooftop, terrace or elevated city-view venue; often summer, sunset, cocktail or skyline-focused; match "rooftop", "terrace", "skyline", "city views", "above the city", "sunset rooftop" or "open-air rooftop".'},{category:"Beach Party",group:"Venue Type",priority:"high",notes:'Coastal, beachfront or seaside event; may be on the sand, near the beach, at a beach club or coastal venue; match "beach party", "beachfront", "seaside", "coastal", "on the sand", "ocean views" or "beach club".'},{category:"Secret Location",group:"Venue Type",priority:"high",notes:'Venue is hidden, TBA, revealed later or sent only to ticket holders; common in underground, warehouse and rave events; match "secret location", "TBA", "location revealed", "address released", "SMS location" or "ticket holders only".'},{category:"DIY",group:"Venue Type",priority:"medium",notes:'Independent, self-organised or non-traditional event, often in unconventional spaces, bush settings or community-run venues; match "DIY", "bush doof", "renegade", "self-organised", "community-run", "off-grid" or "independent party".'},{category:"Basement",group:"Venue Type",priority:"medium",notes:'Small, low-ceiling, underground or downstairs venue; usually intimate, dark, club-focused or late-night; match "basement", "cellar", "downstairs", "underground room", "low ceiling" or "intimate club room".'},{category:"Free Entry",group:"Entry",priority:"core",notes:'No ticket or cover charge required to attend; match "free entry", "free event", "no cover", "free before", "RSVP free", "complimentary entry" or "walk-ins welcome". Do not confuse with free RSVP if paid entry may still apply.'},{category:"Donation",group:"Entry",priority:"medium",notes:'Entry is by donation, pay-what-you-can or voluntary contribution rather than a fixed ticket price; match "donation", "pay what you want", "PWYW", "suggested donation", "gold coin" or "contribute at the door".'},{category:"Vinyl Only",group:"Music",priority:"high",notes:'DJs perform using vinyl records only, usually signalling collector, selector, audiophile or purist culture; match "vinyl only", "all vinyl", "records only", "turntables", "wax", "crate diggers" or "strictly vinyl".'},{category:"Silent Disco",group:"Music",priority:"medium",notes:'Attendees listen through wireless headphones rather than a traditional speaker system; often multiple channels or DJs; match "silent disco", "headphone party", "wireless headphones", "choose your channel" or "multi-channel headphones".'},{category:"Underground",group:"Vibe",priority:"high",notes:'Non-mainstream, independent or subcultural event with raw, niche, alternative or anti-commercial positioning; match "underground", "leftfield", "subculture", "no frills", "raw", "for the heads", "heads only" or "off the beaten path".'},{category:"Intimate",group:"Vibe",priority:"high",notes:'Small-capacity, close-quarters or personal event; often limited tickets, small room, listening bar or community feel; match "intimate", "limited capacity", "small room", "close and personal", "cosy", "private" or "exclusive".'},{category:"Queer Friendly",group:"Vibe",priority:"high",notes:'Event explicitly welcomes, centres or is safe for LGBTQI+ communities; match "queer", "LGBTQI+", "LGBTQIA+", "gay", "trans inclusive", "rainbow community", "queer-friendly" or "queer party". Use when identity/community focus is explicit.'},{category:"FLINTA",group:"Vibe",priority:"high",notes:'Event explicitly centres or welcomes women, lesbians, intersex, non-binary, trans and agender people; match "FLINTA", "FLINTA*", "women and gender diverse", "trans and non-binary", "femme-led" or "gender-diverse community".'},{category:"Safe Space",group:"Vibe",priority:"high",notes:'Event emphasises inclusion, consent, harm minimisation, anti-harassment or community safety policies; match "safe space", "safer space", "consent policy", "zero tolerance", "harm reduction", "inclusive space" or "respectful dancefloor".'},{category:"No Photos",group:"Vibe",priority:"medium",notes:'Event discourages or bans photography/video to protect privacy, immersion or dancefloor culture; match "no photos", "no filming", "no cameras", "phone stickers", "camera policy", "be present" or "respect the dancefloor".'},{category:"Rave",group:"Vibe",priority:"high",notes:'High-energy dance event rooted in rave culture; often late-night, warehouse, underground, fast, heavy or euphoric; match "rave", "all-night", "warehouse rave", "doof", "hard dance", "strobe", "lasers" or "rave culture".'},{category:"BYO",group:"Amenities",priority:"core",notes:'Attendees can or must bring their own alcohol, drinks or supplies; match "BYO", "bring your own", "bring drinks", "no bar", "esky", "cooler", "bottle shop run" or "self-catered drinks".'},{category:"Cash Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall accepts cash but not card payments; match "cash only", "bring cash", "no EFTPOS", "no card", "cash at the door" or "ATM nearby".'},{category:"Card Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall is cashless and accepts card or digital payments only; match "card only", "cashless", "no cash", "tap only", "EFTPOS only" or "card payments only".'},{category:"Food Available",group:"Amenities",priority:"medium",notes:'Food is available at or near the event through vendors, kitchen, food trucks or venue menu; match "food available", "food trucks", "kitchen open", "snacks", "menu", "vendors", "street food" or "dinner available".'},{category:"Dress Code",group:"Other",priority:"high",notes:'Event requires, encourages or enforces specific clothing, theme, footwear or presentation; match "dress code", "strict dress code", "theme", "costume", "black tie", "no thongs", "collared shirts", "dress to impress" or "entry may be refused".'}].map((e=>e.category))),Da=Bn(Sa).max(10).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10 categories)",examples:[["Day Party","Open Air","Free Entry"]]}),Ca=er([{genre:"House",category:"House",priority:"core",notes:"Broad 4/4 dance music rooted in Chicago house; warm grooves, steady kicks, club-focused; use when event says house music generally without a clear subgenre."},{genre:"Deep House",category:"House",priority:"core",notes:"Smooth, warm, soulful or jazzy house; deeper basslines, softer drums, slower club tempo; often described as intimate, sophisticated, sunset, lounge or underground."},{genre:"Tech House",category:"House",priority:"core",notes:"Groovy house with techno-influenced drums, rolling basslines, minimal vocals and big club energy; common in Ibiza, festivals, commercial underground and peak-time club events."},{genre:"Progressive House",category:"House",priority:"core",notes:"Melodic house with long builds, emotional breakdowns and gradual progression; often associated with mainstage, euphoric, cinematic or journey-style sets."},{genre:"Minimal House",category:"House",priority:"core",notes:"Stripped-back, repetitive house with sparse percussion, subtle grooves and restrained arrangements; common in European club, afterhours and vinyl-focused events."},{genre:"Romanian Minimal",category:"House",priority:"core",notes:'Hypnotic, micro-detailed minimal house/techno linked to Romania; long-form grooves, subtle swing, deep rolling bass, afterhours, vinyl, underground and "ro-minimal" wording.'},{genre:"Afro House",category:"House",priority:"core",notes:"House music with African percussion, polyrhythms, chants, soulful vocals and warm melodic grooves; often spiritual, organic, sunset, beach club or global house oriented."},{genre:"Afro Tech",category:"House",priority:"core",notes:"Darker, tougher and more electronic Afro House; heavier drums, driving bass, tribal percussion and peak-time club energy; sits between Afro House and melodic techno."},{genre:"Acid House",category:"House",priority:"high",notes:"House built around squelchy Roland TB-303 acid basslines; raw, psychedelic, ravey or retro Chicago/UK warehouse references."},{genre:"Funky House",category:"House",priority:"high",notes:"Upbeat, feel-good house with funk, disco samples, bass guitar grooves, bright hooks and party-friendly energy; often vocal, summery or nostalgic."},{genre:"Jackin House",category:"House",priority:"high",notes:"Bouncy Chicago-style house with shuffled drums, chunky grooves, cut-up samples and playful energy; often raw, funky, loop-based and dancefloor-driven."},{genre:"Soulful House",category:"House",priority:"medium",notes:"Vocal-led house with gospel, soul and R&B influence; rich chords, emotional vocals, uplifting messages and warm classic house feel."},{genre:"Melodic House",category:"House",priority:"high",notes:"Modern melodic, emotional house with polished production, arpeggios, atmospheric pads and deep/progressive feel; often Anjunadeep, sunset, rooftop or organic club energy."},{genre:"Latin House",category:"House",priority:"medium",notes:"House with Latin percussion, Spanish or Portuguese vocals, salsa, samba, reggaeton or Afro-Latin rhythmic influence; upbeat, percussive and dancefloor-friendly."},{genre:"Techno",category:"Techno",priority:"core",notes:"Broad 4/4 electronic club music rooted in Detroit and Berlin; repetitive, mechanical, driving, hypnotic or warehouse-focused; use when techno is named without a clearer subtype."},{genre:"Melodic Techno",category:"Techno",priority:"core",notes:"Emotional, cinematic techno with big synth melodies, arpeggios, dark builds and dramatic drops; often Afterlife, Tale Of Us, lasers, visuals or large-room events."},{genre:"Hard Techno",category:"Techno",priority:"core",notes:"Fast, aggressive techno with pounding kicks, distorted drums, high energy and rave/warehouse intensity; often 145+ BPM and associated with modern hard rave trends."},{genre:"Industrial Techno",category:"Techno",priority:"high",notes:"Dark, harsh techno with distorted kicks, metallic percussion, noise textures and warehouse or dystopian aesthetics; more abrasive than standard techno."},{genre:"Minimal Techno",category:"Techno",priority:"high",notes:"Stripped-back techno built from repetition, subtle changes, sparse drums and hypnotic grooves; less melodic and more mechanical than minimal house."},{genre:"Detroit Techno",category:"Techno",priority:"medium",notes:"Techno rooted in Detroit's futuristic, soulful and machine-funk sound; classic, purist, historical or old-school techno references."},{genre:"Dub Techno",category:"Techno",priority:"medium",notes:"Deep techno with dub chords, echo, reverb, spacious atmospheres and slow hypnotic movement; often smoky, deep, aquatic or meditative."},{genre:"Acid Techno",category:"Techno",priority:"medium",notes:"Techno driven by squelchy 303 acid lines, looping percussion and rave energy; harder and more driving than acid house."},{genre:"Hypnotic Techno",category:"Techno",priority:"medium",notes:"Repetitive, deep, rolling techno designed for trance-like immersion; subtle loops, long blends, minimal melody and underground warehouse feel."},{genre:"Drum & Bass",category:"Bass",priority:"core",notes:"Fast breakbeat music around 160-180 BPM with heavy basslines and chopped drums; use for D&B, drum and bass, rollers, jump-up or bass-heavy rave events."},{genre:"Jungle",category:"Bass",priority:"core",notes:"Breakbeat-heavy precursor to D&B with chopped amen breaks, reggae/dub samples, ragga vocals and 90s UK rave energy."},{genre:"Dubstep",category:"Bass",priority:"core",notes:"Bass-heavy UK-origin genre around 140 BPM; half-time drums, sub-bass, wobble bass, dark atmospheres or aggressive drops."},{genre:"Bass House",category:"Bass",priority:"core",notes:"House-tempo club music with heavy bass drops, punchy drums and EDM/festival energy; blends house groove with dubstep or bass music sound design."},{genre:"Breakbeat",category:"Bass",priority:"core",notes:"Electronic music built on syncopated broken drum patterns instead of straight 4/4; often rave, electro, UK club, breaks or old-school references."},{genre:"UK Garage",category:"Bass",priority:"core",notes:'Skippy UK club music with swung 2-step rhythms, chopped vocals, sub-bass and soulful/R&B influence; often "UKG", "garage", "2-step" or "speed garage".'},{genre:"Bassline",category:"Bass",priority:"high",notes:"UK 4x4 garage-derived bass music with warping basslines, fast club energy and playful vocal chops; often northern UK or speed garage adjacent."},{genre:"Grime",category:"Bass",priority:"high",notes:"UK rap and electronic bass hybrid around 140 BPM; MC-led, sparse beats, aggressive flows, eski sounds and London street culture references."},{genre:"Liquid DnB",category:"Bass",priority:"medium",notes:"Melodic, smooth and soulful drum & bass; rolling breaks, warm bass, vocals, pads and emotional or uplifting atmosphere."},{genre:"Neurofunk",category:"Bass",priority:"medium",notes:"Technical, dark and aggressive drum & bass with complex bass sound design, precise drums and futuristic, intense energy."},{genre:"Footwork",category:"Bass",priority:"medium",notes:"Fast Chicago club style around 160 BPM with syncopated kicks, chopped vocal samples and jittery rhythms; related to juke and dance battles."},{genre:"Jersey Club",category:"Bass",priority:"medium",notes:"Fast, bouncy US club music with chopped samples, triplet kick patterns and call-and-response energy; often party, dance challenge or club edit focused."},{genre:"Trance",category:"Trance",priority:"core",notes:"Euphoric electronic dance music with emotional melodies, long builds, breakdowns and big climaxes; often 90s, festival, uplifting or hands-in-the-air language."},{genre:"Psytrance",category:"Trance",priority:"core",notes:"Fast psychedelic trance with rolling basslines, hypnotic repetition, alien/psychedelic sound design and outdoor festival or doof culture references."},{genre:"Progressive Trance",category:"Trance",priority:"high",notes:"Smoother, slower trance with gradual melodic builds, deep atmospheres and less explosive drops than uplifting trance; often journey-based and emotional."},{genre:"Disco",category:"Disco",priority:"core",notes:"Classic dance music with live-sounding drums, strings, funk bass, soul vocals and 70s/80s references; use for retro disco, disco party or classic dance events."},{genre:"Nu Disco",category:"Disco",priority:"core",notes:"Modern electronic disco with polished production, house tempo, funk basslines, synths and retro dancefloor feel; often contemporary disco edits or poolside energy."},{genre:"Italo Disco",category:"Disco",priority:"medium",notes:"European 80s disco style with synth bass, drum machines, dramatic vocals and retro-futurist melodies; often Italian, cult, synth-heavy or nostalgic."},{genre:"Funk",category:"Disco",priority:"high",notes:"Groove-based music with syncopated bass, live drums, brass, guitars and rhythmic vocals; often party, rare groove, soul-funk or dancefloor classics."},{genre:"Soul",category:"Disco",priority:"medium",notes:"Vocal-focused music rooted in R&B, gospel and Motown traditions; emotional vocals, warm instrumentation and classic groove; may overlap with disco and house roots."},{genre:"Balearic",category:"Disco",priority:"medium",notes:"Eclectic Ibiza-influenced sound blending downtempo, disco, house, pop, world and chillout; sunset, beach, terrace, poolside or open-air language."},{genre:"Hardcore",category:"Hard Dance",priority:"high",notes:"Very fast, intense rave music with distorted kicks, aggressive synths and high BPM; use when event says hardcore, ravecore or extreme hard dance."},{genre:"Hardstyle",category:"Hard Dance",priority:"high",notes:"Dutch-origin hard dance with distorted reverse-bass kicks, euphoric melodies, screeches and festival anthems; usually around 150 BPM."},{genre:"Gabber",category:"Hard Dance",priority:"low",notes:"Extreme Dutch hardcore style with very fast BPM, distorted kicks, raw rave energy and Rotterdam/hakken culture references."},{genre:"Happy Hardcore",category:"Hard Dance",priority:"low",notes:"Fast, euphoric hardcore with bright melodies, pitched-up vocals, piano riffs and 90s UK rave nostalgia; playful rather than dark."},{genre:"Amapiano",category:"Global",priority:"core",notes:"South African club music with log drums, shakers, jazzy chords, smooth vocals and laid-back but danceable grooves; often piano-led and percussive."},{genre:"Gqom",category:"Global",priority:"high",notes:"Dark, minimal South African club sound from Durban; heavy broken rhythms, raw percussion, sparse vocals and intense hypnotic energy."},{genre:"Afrobeats",category:"Global",priority:"core",notes:"West African pop and club sound, especially Nigerian/Ghanaian; melodic vocals, dancehall/highlife/hip-hop influence, warm rhythms and mainstream crossover."},{genre:"Kuduro",category:"Global",priority:"medium",notes:"Angolan and Portuguese club music with fast, hard percussion, energetic chants and raw dancefloor intensity; often Afro-Portuguese or Lisbon club references."},{genre:"Singeli",category:"Global",priority:"low",notes:"Extremely fast Tanzanian electronic dance music, often 180-220+ BPM; frantic rhythms, rapid vocals and high-energy East African street sound."},{genre:"Baile Funk",category:"Global",priority:"high",notes:"Brazilian funk carioca with heavy drums, MC vocals, Portuguese lyrics and raw party energy; often Rio, favela, proibidao or funk mandelao references."},{genre:"Reggaeton",category:"Global",priority:"high",notes:"Latin urban dance music with dembow rhythm, Spanish vocals, pop/hip-hop influence and mainstream club appeal; often perreo or Latin party events."},{genre:"Dancehall",category:"Global",priority:"high",notes:"Jamaican club music with riddims, patois vocals, reggae influence and sound system culture; can be party, bashment, Caribbean or crossover pop."},{genre:"Dembow",category:"Global",priority:"medium",notes:"Dominican-origin club style built on repetitive dembow rhythm, Spanish MC vocals and raw Latin street-party energy; more minimal and percussive than reggaeton."},{genre:"Ambient",category:"Downtempo",priority:"high",notes:"Atmospheric, beatless or low-rhythm electronic music focused on texture, mood and space; suited to listening rooms, chill rooms, sound baths or pre/post-event settings."},{genre:"Downtempo",category:"Downtempo",priority:"high",notes:"Slower electronic music with relaxed beats, warm textures and lounge/chillout feel; use for chill, sunset, listening, cafe, pre-party or afterhours decompression events."},{genre:"Electronica",category:"Downtempo",priority:"high",notes:"Broad non-club-focused electronic music; experimental, melodic, listening-oriented or pop-adjacent; use when event says electronic but not clearly house/techno/bass."},{genre:"Trip Hop",category:"Downtempo",priority:"low",notes:"Moody 90s Bristol sound blending hip-hop beats, dub, soul, jazz and atmospheric vocals; dark, smoky, cinematic or Massive Attack/Portishead references."},{genre:"Lo-Fi",category:"Downtempo",priority:"medium",notes:"Relaxed, hazy, imperfect-sounding beats with soft drums, samples, jazz chords and study/chill aesthetics; often lo-fi hip-hop or bedroom production references."},{genre:"Electro",category:"Electronic",priority:"core",notes:"Syncopated electronic music with 808 drums, robotic funk, vocoders, breakbeats and Detroit/80s futurism; distinct from electro-house."},{genre:"Synth Pop",category:"Electronic",priority:"medium",notes:"Pop-oriented electronic music with catchy vocals, 80s synths, drum machines and new wave influence; often retro, nostalgic or indie-pop crossover."},{genre:"Industrial",category:"Electronic",priority:"medium",notes:"Dark electronic or rock-influenced music with harsh textures, machine rhythms, noise and dystopian aesthetics; may overlap with EBM and industrial techno."},{genre:"EBM",category:"Electronic",priority:"low",notes:"Electronic Body Music: hard, repetitive industrial dance with shouted vocals, rigid basslines and militaristic rhythms; 80s/Belgian/German club references."},{genre:"Indie Dance",category:"Electronic",priority:"high",notes:"Danceable blend of indie rock, disco, synth pop and electronic production; often band/DJ crossover, nu-disco-adjacent, stylish or alternative club sound."},{genre:"Experimental",category:"Electronic",priority:"medium",notes:"Unconventional electronic music that avoids standard genre structures; abstract, avant-garde, noise, leftfield, art-focused or boundary-pushing events."},{genre:"Hip-Hop",category:"Non-Electronic",priority:"high",notes:"Rap-led music with beats, MCs, sampling, trap, boom bap or old-school references; use for hip-hop parties, rap nights or DJ sets centred on rap."},{genre:"R&B",category:"Non-Electronic",priority:"high",notes:"Smooth vocal-led music with soul, hip-hop and pop influence; 90s/2000s R&B, slow jams, contemporary R&B or club crossover events."},{genre:"Jazz",category:"Non-Electronic",priority:"medium",notes:"Improvised or live instrumental music with swing, bebop, fusion, soul-jazz or jazz club references; often live band or listening-focused."},{genre:"Pop",category:"Non-Electronic",priority:"medium",notes:"Mainstream, chart-focused music with recognisable hits, singalong vocals and broad commercial appeal; use for general pop parties or top-40 events."},{genre:"Rock",category:"Non-Electronic",priority:"low",notes:"Guitar-driven band music; indie rock, classic rock, punk, alternative or live venue references; usually non-electronic unless explicitly DJ edits."},{genre:"Reggae",category:"Non-Electronic",priority:"medium",notes:"Jamaican-origin music with offbeat guitar rhythms, dub influence, roots vocals and sound system culture; includes roots, dub and reggae parties."},{genre:"Live",category:"Non-Electronic",priority:"medium",notes:"Event is centred on live performance rather than DJ genre; bands, singers, instrumentalists or live electronic acts; use only when performance format is the key signal."}].map((e=>e.genre))),Oa=Bn(Ca).min(1).max(5).meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]});function Pa(e,t){return Qi().regex(RegExp(`^${e}_[0-9a-z]{26}$`),`Must be a valid ${t} ID`).describe(`Unique ${t} identifier`)}Bn(Ca).max(5).optional().meta({description:"Music genres for the event (up to 5 genres)",examples:[["Tech House","Melodic Techno"]]});const Ra=Pa("tem","team"),_a=Pa("txp","tax profile");Pa("tnt","tenant");const Na=Pa("tdl","team deletion operation"),Ua=Pa("evt","event"),Ma=Pa("ven","venue"),La=Pa("loc","location"),qa=Pa("usr","user"),Ga=Pa("cnl","order cancellation"),ja=Pa("ord","order"),Ba=Pa("tkt","ticket"),Fa=Pa("pmt","promoter");Pa("cpn","coupon"),Pa("cod","coupon code");const Va=Pa("cus","customer"),za=Pa("adm","admission"),Wa=Pa("sct","section");Pa("ben","beneficiary");const Ya=Pa("pyt","payout"),Ha=Pa("mbr","team member"),Za=Pa("inv","team invite"),Ka=Pa("ecl","event collaborator"),Ja=Pa("psc","permission scope"),Qa=Pa("prl","permission role"),Xa=Pa("ntf","notification"),es=Pa("int","integration"),ts=Pa("ibf","integration backfill"),is=Vn({src:an().meta({examples:["https://assets.session.services/my-image.jpg"]}),alt:Qi().meta({examples:["My Image"]}),width:En().meta({examples:[1080]}),height:En().meta({examples:[1080]})});function ns(){return En().min(-1)}function rs(){return En().min(-1).refine((e=>0!==e),{message:"Limit cannot be 0. Use -1 for unlimited or a positive number for a specific limit"})}const os=Yn([Qi(),En(),xn(),On()]),as=new vr({type:"lazy",getter:()=>Yn([os,Bn(as),Qn(Qi(),as)])}),ss=Qn(Qi().min(1).max(40).meta({description:"Metadata key. Must be 1-40 characters"}),Qi().max(500).meta({description:"Metadata value. Must not exceed 500 characters"})).refine((e=>Object.keys(e).length<=50),{message:"Metadata cannot exceed 50 keys"}).optional().meta({description:"Flexible key-value metadata storage for custom configuration. Similar to Stripe's metadata API. Maximum 50 keys, key names up to 40 characters, values up to 500 characters."}),ds=Qi().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/,"Must be a naive datetime without timezone (YYYY-MM-DDTHH:mm:ss)").meta({description:"Wall clock time without timezone (displays same everywhere)",examples:["2025-03-15T19:30:00"]});function cs(e){return $a().int().min(1).max(100).prefault(20).meta({examples:[20],description:`Maximum number of ${e} to return per request (1-100, default: 20)`})}const ls=Qi().meta({description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."}),us="[a-z][a-z0-9-]*",ps=RegExp(`^-?(?:\\*|(?:${us})(?:\\.${us})*(?:\\.\\*|\\.bypass|\\.[a-z]{3}_[0-9a-z]{26})?)$`),ms=/^[a-z]{3}_[0-9a-z]{26}$/,hs=["tem","pmt","ven","evt","ord","tkt","cpn"],fs=new Set("team.read,team.write,team.oauth.read,team.oauth.write,team.member.read,team.member.write,team.invite.read,team.invite.write,team.gateway.read,team.gateway.connect,team.gateway.write,team.tax.read,team.tax.write,team.performance.read,cms.read,cms.write,role.read,role.write,event.read,event.write,event.performance.read,promoter.read,promoter.write,promoter.performance.read,venue.read,venue.write,order.read,order.write,ticket.read,ticket.write,ticket.scan,coupon.read,coupon.write,membership.read,membership.write,beneficiary.read,beneficiary.write,payout.read,payout.write,*".split(",")),ys=new Set(["tenant","team","team.oauth","team.member","team.invite","team.gateway","team.tax","team.performance","cms","role","event","event.performance","promoter","promoter.performance","venue","order","ticket","coupon","membership","beneficiary","payout"]),gs={"team.read":["tem"],"team.write":["tem"],"team.oauth.read":["tem"],"team.oauth.write":["tem"],"team.member.read":["tem"],"team.member.write":["tem"],"team.invite.read":["tem"],"team.invite.write":["tem"],"team.gateway.read":["tem","pmt"],"team.gateway.connect":["tem"],"team.gateway.write":["tem","pmt"],"team.tax.read":["tem"],"team.tax.write":["tem"],"team.performance.read":["tem","pmt","ven","evt"],"cms.read":[],"cms.write":[],"role.read":["tem"],"role.write":["tem"],"event.read":["tem","pmt","ven","evt"],"event.write":["tem","pmt","ven","evt"],"event.performance.read":["tem","pmt","ven","evt"],"promoter.read":["tem","pmt","evt"],"promoter.write":["tem","pmt","evt"],"promoter.performance.read":["tem","pmt","evt"],"venue.read":["tem","ven","evt"],"venue.write":["tem","ven","evt"],"order.read":["tem","pmt","ven","evt","ord"],"order.write":["tem","pmt","ven","evt","ord"],"ticket.read":["tem","pmt","ven","evt","ord","tkt"],"ticket.write":["tem","pmt","ven","evt","ord","tkt"],"ticket.scan":["tem","pmt","ven","evt","ord","tkt"],"coupon.read":["tem","pmt","evt","cpn"],"coupon.write":["tem","pmt","evt","cpn"],"membership.read":["tem"],"membership.write":["tem"],"beneficiary.read":["tem","pmt"],"beneficiary.write":["tem","pmt"],"payout.read":["tem","pmt","ven"],"payout.write":["tem","pmt"],"*":[]};function vs(e){let[t]=e.split("_");return!!t&&hs.includes(t)}function bs(e,t){return!(!fs.has(e)||!function(e){return ms.test(e)&&vs(e)}(t))&&function(e,t){let i=function(e){let[t]=e.split("_");return t&&vs(e)?t:null}(t);return!!i&&(gs[e]??[]).includes(i)}(e,t)}const ws=[function(e){return fs.has(e)},function(e){return!!e.endsWith(".bypass")&&fs.has(e.slice(0,-7))},function(e){let t=function(e){let t=e.match(/^((?:[a-z][a-z0-9-]*)(?:\.[a-z][a-z0-9-]*)*)\.([a-z]{3}_[0-9a-z]{26})$/);return t?function(e){let t=e[1],i=e[2];return t&&i?{base:t,resourceId:i}:null}(t):null}(e);return!!t&&bs(t.base,t.resourceId)},function(e){if(!e.endsWith(".*"))return!1;let t=e.slice(0,-2);return ys.has(t)||fs.has(t)}],$s=Qi().regex(ps,"Invalid permission node. Use lowercase dot notation with optional wildcard, resource target, bypass target, and deny prefix.").refine((function(e){let t=function(e){return e.startsWith("-")?e.slice(1):e}(e);return ws.some((e=>e(t)))}),{message:"Unsupported permission node. Only nodes from the canonical permission catalog are allowed."}).meta({description:"Permission node in minecraft-style format. Supports exact, scoped wildcard, resource target, bypass target, and deny prefix.",examples:["team.read","team.member.write","ticket.scan","ticket.scan.*","ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1","team.gateway.connect.bypass","team.*","*","-team.gateway.write","-ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1"]}),Is=Bn($s).meta({description:"Array of permission nodes. Supports wildcard and negation. Empty arrays are allowed.",examples:[[],["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),Es=Is.min(1).meta({description:"Non-empty array of permission nodes. Supports wildcard and negation.",examples:[["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),ks=Qi().max(1e4).meta({description:"Public-facing description with a maximum length of 10000 characters"}),Ts=Qi().length(16).meta({examples:[wa.signature],description:"HMAC signature for secure access (16 characters, base64url encoded)"}),As=Vn({promoterIds:Bn(Fa).nullable().meta({description:"Null means team-wide promoter access. An array means access is restricted to those promoters."})}).meta({description:"Promoter access assigned to a team member or invite."}),xs=Vn({promoterIds:Bn(Fa).min(1).nullable().meta({description:"Null grants team-wide promoter access. A non-empty array restricts access to those promoters."})}).meta({description:"Promoter access assignment input."}),Ss=er(["SALE_ENDED","SOLD_OUT","DOOR"]),Ds=Vn({booking:En().min(4).max(10).meta({examples:[7.5],description:"Booking fee percentage used to calculate the booking fee."})}).meta({description:"Admission-level pricing override used to calculate derived fee amounts."});function Cs(e){return Vn({base:Tn().min(0).meta({examples:[wa.Admission.price.base],description:"Organiser-entered ticket price before any added tax or booking fees, in cents"}),booking:Tn().min(0).meta({examples:[wa.Admission.price.booking],description:e.booking}),tax:Tn().min(0).optional().meta({description:"Ticket tax component in cents. This excludes tax contained in booking fees."}),total:Tn().min(0).optional().meta({description:"Customer-facing total in cents, including ticket tax and booking fees."}),currency:Aa.meta({examples:[wa.Admission.price.currency],description:e.currency}),override:Ds.optional().meta({description:"Optional pricing override used to calculate derived fee amounts."})}).meta({examples:[wa.Admission.price],description:e.price})}const Os=Vn({id:za.readonly().meta({description:"A unique identifier for this admission",examples:[wa.Admission.id]}),name:Qi().meta({description:"The display name of the admission type shown to customers",examples:[wa.Admission.name]}),subtitle:Qi().max(100).optional().meta({description:"Short supporting text shown below the admission name",examples:[wa.Admission.subtitle]}),description:Qi().max(500).optional().meta({description:"Detailed information shown when customers expand 'More info'",examples:[wa.Admission.description]}),capacity:ns().prefault(-1).meta({examples:[wa.Admission.capacity],description:"Maximum number of tickets that can be sold for this admission type. A value of -1 indicates unlimited"}),limit:rs().prefault(-1).meta({examples:[wa.Admission.limit??-1],description:"Maximum number of tickets of this admission type that can be purchased in a single order. A value of -1 indicates unlimited"}),available:En().min(-1).readonly().meta({examples:[wa.Admission.available],description:"Current number of tickets available for purchase, calculated as capacity minus sold minus reserved. A value of -1 indicates unlimited"}),sold:En().min(0).readonly().meta({examples:[wa.Admission.sold],description:"Total number of tickets of this admission type that have been purchased"}),reserved:En().min(0).readonly().meta({examples:[wa.Admission.reserved],description:"Number of tickets held for customers during checkout and not available to others"}),order:En().min(0).meta({examples:[wa.Admission.order],description:"Determines the position in which this admission type appears when listed. Lower values appear first"}),createdAt:Di().readonly().meta({examples:[wa.Admission.createdAt],description:"Timestamp in ISO 8601 format when this admission type was created"}),updatedAt:Di().readonly().meta({examples:[wa.Admission.updatedAt],description:"Timestamp in ISO 8601 format when this admission type was last updated"}),entryStartsAt:ds.meta({examples:[wa.Admission.entryStartsAt],description:"Wall clock time from which tickets of this type are valid for entry (no timezone)"}),entryEndsAt:ds.meta({examples:[wa.Admission.entryEndsAt],description:"Wall clock time until which tickets of this type are valid for entry (no timezone)"}),saleStartsAt:ds.meta({examples:[wa.Admission.saleStartsAt],description:"Wall clock time when ticket sales for this admission type begin (no timezone)"}),saleEndsAt:ds.meta({examples:[wa.Admission.saleEndsAt],description:"Wall clock time when ticket sales for this admission type end (no timezone)"}),saleEndsBehavior:Ss.default("SALE_ENDED").meta({examples:[wa.Admission.saleEndsBehavior],description:"Label to display for this admission after ticket sales have ended"}),price:Cs({booking:"Additional booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the ticket price",price:"Pricing details for this admission type, including base cost and fees in cents, and currency"}),visibility:er(ba).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls whether this admission type is shown publicly, revealed by a scoped coupon, or unlocked after another admission."}),visibleAfterAdmissionId:za.nullable().optional().meta({description:"Admission that must sell out or close before this admission can be purchased."}),sectionId:Wa.nullable().optional().meta({examples:[wa.Admission.sectionId],description:"Identifier of the section this admission type belongs to, if any"}),teamId:Ra.meta({description:"Team that owns this admission. Denormalized for efficient queries."}),promoterId:Fa.meta({examples:[wa.Admission.promoterId],description:"Identifier of the promoter responsible for this admission type"}),eventId:Ua.meta({examples:[wa.Admission.eventId],description:"Identifier of the event to which this admission type is linked"}),eventSlug:Qi().meta({examples:[wa.Admission.eventSlug],description:"URL-friendly slug for the event associated with this admission type"})}).meta({description:"Admission represents a specific type or category of ticket available for an event",examples:[wa.Admission]}),Ps=Os.omit({id:!0,createdAt:!0,updatedAt:!0,available:!0,sold:!0,reserved:!0}).extend({price:Os.shape.price.omit({tax:!0,total:!0}).strict()}).meta({description:"Schema for creating a new admission type for an event"}),Rs=Os.pick({id:!0}).extend({eventId:Os.shape.eventId.meta({examples:[wa.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for deleting an admission type from an event. This performs a soft delete by setting the deletedAt timestamp"}),_s=Os.pick({id:!0}).extend({eventId:Ua.meta({examples:[wa.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for retrieving a specific admission type"}),Ns=zn({eventId:Qi().max(128).meta({examples:[wa.Admission.eventId],description:"Identifier of the event to list admission types for"}),sectionId:Qi().max(128).optional().meta({examples:[wa.Admission.sectionId],description:"Filter admission types by section identifier. If provided, only admissions for this section are returned"}),query:Qi().max(120).optional().meta({examples:["Early Bird"],description:"Optional search query to filter admissions by name. When provided, search-backed pagination is used."}),limit:cs("admission types").optional(),cursor:Qi().max(768).optional().meta({examples:["eyJpZCI6ImFkbV8wMWpwczVjZ3NlZTB4dmFwYms5MmU4ZWI0ZyJ9"],description:"Pagination cursor for retrieving the next set of results. Obtained from previous response"})}).meta({description:"Schema for listing admission types with pagination and filtering options"});function Us(e,t){return Vn({[t]:Bn(e).meta({description:`Array of ${t} for the current result set`}),before:Qi().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNqIn19"],description:"Cursor for navigating backward in the result set. Omitted when there are no prior results."}),after:Qi().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNkIn19"],description:"Cursor for navigating forward in the result set. Omitted when there are no subsequent results."}),limit:$a().min(1).meta({examples:[20],description:"Maximum number of items to return in each result set"})})}const Ms=Us(Os,"admissions"),Ls=Vn({min:Tn().min(0).meta({description:"Minimum booking fee in the quote currency's minor units"}).optional(),max:Tn().min(0).meta({description:"Maximum booking fee in the quote currency's minor units"}).optional(),percent:En().min(0).meta({description:"Percentage applied when calculating the booking fee"}).optional()}),qs=Os.pick({eventId:!0}).extend({message:Qi().meta({examples:["7.5% of the ticket price or $2 AUD, whichever is higher"],description:"Detailed explanation of the booking fee calculation applied to this admission type"}),source:er(["EVENT","CUSTOM"]).meta({description:"Whether the quote uses the resolved event fee or an admission-level custom percentage."}),rule:Ls.meta({description:"Effective booking fee rule in the quote currency after conversion."}),price:Cs({booking:"Calculated booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the quoted price",price:"Pricing quote for this admission type, showing base cost and calculated booking fee in cents"})}).meta({description:"Response schema for admission pricing quotes, including booking fee calculations and explanatory messages"}),Gs=Os.pick({eventId:!0}).extend({base:Tn().min(0).meta({examples:[wa.Admission.price.base],description:"Base cost of a ticket for this admission type before fees, in cents"}),currency:Aa.meta({examples:[wa.Admission.price.currency],description:"Three-letter ISO 4217 currency code for the ticket price"}),override:Ds.optional().meta({description:"Optional admission-level booking fee percentage to preview instead of the event fee formula."})}).meta({description:"Request schema for generating a pricing quote for an admission type, including booking fee calculations"}),js=Vn({quote:qs}),Bs=Vn({admission:Os}),Fs=Vn({id:Os.shape.id,eventId:Os.shape.eventId,name:Os.shape.name.optional(),subtitle:Os.shape.subtitle,description:Os.shape.description,capacity:ns().optional(),limit:rs().optional(),order:Os.shape.order.optional(),entryStartsAt:Os.shape.entryStartsAt.optional(),entryEndsAt:Os.shape.entryEndsAt.optional(),saleStartsAt:Os.shape.saleStartsAt.optional(),saleEndsAt:Os.shape.saleEndsAt.optional(),saleEndsBehavior:Ss.optional(),price:Os.shape.price.omit({tax:!0,total:!0}).strict().extend({override:Ds.nullable().optional().meta({description:"Admission pricing override. Pass null to clear it; omit to leave it unchanged."})}).optional(),visibility:er(ba).optional(),visibleAfterAdmissionId:za.nullable().optional(),sectionId:Wa.nullable().optional().meta({description:"Section ID. Pass null to unassign from section; omit to leave unchanged."})}).meta({description:"Schema for updating an existing admission type."}),Vs=Vn({eventId:Qi().meta({description:"Event identifier"})}),zs=Vn({code:Qi().meta({description:"Coupon code captured on the order"}),totalTickets:Tn().min(0).meta({description:"Valid tickets purchased with this coupon code"}),checkedIn:Tn().min(0).meta({description:"Coupon tickets currently checked in"}),noShows:Tn().min(0).meta({description:"Coupon tickets not currently checked in"}),checkInRate:En().min(0).max(100).meta({description:"Percentage of coupon tickets checked in"})}),Ws=Vn({totalTickets:Tn().min(0).meta({description:"Total valid tickets purchased with a coupon code"}),checkedIn:Tn().min(0).meta({description:"Total coupon tickets currently checked in"}),noShows:Tn().min(0).meta({description:"Total coupon tickets not currently checked in"}),checkInRate:En().min(0).max(100).meta({description:"Overall percentage of coupon tickets checked in"}),coupons:Bn(zs).meta({description:"Check-in attendance breakdown by coupon code, sorted by total tickets descending"})}),Ys=Oi().describe("Date (YYYY-MM-DD)"),Hs=Qi().min(1).max(128).optional().describe("IANA time zone for interpreting date ranges"),Zs=Vn({startDate:Ys.describe("Start date (YYYY-MM-DD)"),endDate:Ys.describe("End date (YYYY-MM-DD)"),timeZone:Hs}),Ks={startDate:Ys.optional().describe("Start date (YYYY-MM-DD)"),endDate:Ys.optional().describe("End date (YYYY-MM-DD)"),timeZone:Hs},Js=e=>!e.startDate&&!e.endDate||!(!e.startDate||!e.endDate);function Qs(e){return Vn(e).extend(Zs.shape)}function Xs(e){return Vn({...e,...Ks}).refine(Js,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"})}Vn(Ks).refine(Js,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"});const ed=Vn({value:En().describe("Current period value"),previous:En().describe("Comparison period value"),change:En().describe("Percentage change from previous period"),changeType:er(["increase","decrease","unchanged"]).describe("Direction of change")}),td=Vn({eventId:Qi().describe("Event identifier"),eventName:Qi().describe("Event name"),ticketCount:En().describe("Number of tickets sold"),sharePercent:En().describe("Percentage of total tickets")}),id=Vn({start:Qi().describe("Period start date"),end:Qi().describe("Period end date")}),nd=Vn({start:Qi().describe("Comparison period start date"),end:Qi().describe("Comparison period end date")}),rd=er(["HOUR","DAY","WEEK","MONTH"]),od=Vn({date:Qi().describe("Date (YYYY-MM-DD)"),revenue:En().describe("Revenue in cents"),tickets:En().describe("Tickets sold")}),ad=od.extend({orders:En().describe("Orders placed")}),sd=Vn({revenue:En().describe("Total revenue for period in cents"),tickets:En().describe("Total tickets for period")}),dd=sd.extend({orders:En().describe("Total orders for period")}),cd=Vn({revenue:ed.describe("Total revenue in cents"),ticketsSold:ed.describe("Number of tickets sold"),averageOrderValue:ed.describe("Average order value in cents"),conversionRate:ed.describe("Overall conversion rate (%)"),activeEvents:ed.describe("Number of active events in period"),uniqueCustomers:ed.describe("Unique customers (estimated)"),orderCount:ed.describe("Number of orders placed"),pageViews:ed.describe("Total page views from tracking")}),ld=Vn({events:Bn(td),totalTickets:En().describe("Total tickets across all events")});function ud(e,t){return Qs({...fd(e,t),currency:Qi().optional().describe("Currency code for revenue metrics")})}function pd(e){return Vn({meta:Vn({...e,currency:Qi().describe("Primary currency code"),currencies:Bn(Qi()).describe("All currencies with transactions"),dateRange:id,comparisonRange:nd}),metrics:cd})}function md(e,t){return Qs({...fd(e,t),granularity:rd.optional().default("DAY").describe("Time granularity"),currency:Qi().optional().describe("Currency filter")})}function hd(e,t){return Qs({...fd(e,t),limit:En().optional().default(5).describe("Maximum number of events to return")})}function fd(e,t){return{[e]:Qi().describe(t)}}const yd=Xs({eventId:Qi().describe("Event identifier")}).meta({description:"Event performance summary request"}),gd=Vn({meta:Vn({eventId:Qi().describe("Event identifier"),eventName:Qi().describe("Event name"),currency:Qi().describe("Currency code (e.g., USD, EUR)"),dateRange:id.optional().describe("Present only when startDate/endDate are provided"),comparisonRange:nd.optional().describe("Present only when startDate/endDate are provided")}),metrics:Vn({revenue:ed.describe("Total revenue in cents"),ticketsSold:ed.describe("Number of tickets sold"),orderCount:ed.describe("Number of orders placed"),averageOrderValue:ed.describe("Average order value in cents"),conversionRate:ed.extend({convertedVisitors:En().describe("Unique eligible visitors who completed an order").meta({description:"Unique eligible visitors who completed an order"}),eligibleVisitors:En().describe("Unique visitors eligible for conversion").meta({description:"Unique visitors eligible for conversion"})}).describe("Visitor purchase conversion for the selected period"),pageViews:ed.describe("Total page/product views"),uniqueVisitors:ed.describe("Unique visitors (estimated)"),checkoutStarted:ed.describe("Number of checkout started events (external link clicks for external events)")})}),vd=Qs({eventId:Qi().describe("Event identifier"),granularity:rd.optional().default("DAY").describe("Time granularity for aggregation"),breakdown:er(["TOTAL"]).optional().default("TOTAL").describe("Breakdown type (always TOTAL for performance)"),includeBreakdowns:xn().optional().default(!0).describe("Whether to include admission and section breakdowns in each time bucket")}),bd=Vn({meta:Vn({eventId:Qi(),eventName:Qi().describe("Event name"),currency:Qi().describe("Currency code"),dateRange:id,granularity:rd}),series:Bn(Vn({date:Qi().describe("Date or timestamp"),tickets:En().describe("Tickets sold in period"),revenue:En().describe("Revenue in period (cents)"),admissions:Bn(Vn({id:Qi(),name:Qi(),quantity:En()})),sections:Bn(Vn({id:Qi(),name:Qi(),quantity:En()}))}))}),wd=er(["HOUR","DAY","WEEK","MONTH"]).describe("Time granularity for aggregation"),$d=Qs({eventId:Qi().describe("Event identifier"),granularity:wd.optional().default("DAY")}).meta({description:"Event performance time series request"}),Id=Vn({meta:Vn({eventId:Qi(),eventName:Qi().describe("Event name"),currency:Qi().describe("Currency code"),dateRange:id,granularity:wd}),series:Bn(Vn({date:Qi().describe("Date or timestamp"),revenue:En().describe("Net revenue in period (cents)"),tickets:En().describe("Tickets sold in period"),orders:En().describe("Completed orders in period"),pageViews:En().describe("Product/page views in period"),visitors:En().describe("Unique visitors in period (estimated)"),checkoutStarted:En().describe("Checkout started events in period"),convertedVisitors:En().describe("Unique visitors who completed an order in period"),eligibleVisitors:En().describe("Unique visitors eligible for conversion in period"),conversionRate:En().describe("Converted visitors divided by eligible visitors in period (%)")}))}),Ed=Qs({eventId:Qi().describe("Event identifier")}),kd=Vn({meta:Vn({eventId:Qi(),eventName:Qi().describe("Event name"),currency:Qi().describe("Currency code"),dateRange:id}),totals:Vn({entered:En().describe("Total entered funnel (product viewed)"),completed:En().describe("Total completed (orders)"),overallConversionRate:En().describe("Overall conversion rate (%)"),totalDropped:En().describe("Total dropped off")}),stages:Bn(Vn({id:Qi().describe("Funnel stage identifier"),name:Qi().describe("Human-readable stage name"),count:En().describe("Number of events at this stage"),conversionRate:En().describe("Conversion rate from first stage (%)"),dropoffRate:En().describe("Dropoff rate from previous stage (%)")}))});Vn({meta:Vn({eventId:Qi(),dimension:Qi().describe("Dimension type"),dateRange:id,limit:En().optional()}),data:Bn(Vn({name:Qi().describe("Dimension value (e.g., campaign name)"),views:En().describe("Page/product views"),clicks:En().describe("Ticket link clicks").optional(),conversions:En().describe("Completed orders"),revenue:En().describe("Total revenue in cents"),conversionRate:En().describe("Conversion rate (%)"),share:En().describe("Percentage share of total").optional()})),totals:Vn({views:En(),conversions:En(),revenue:En()}).optional()});const Td=er(["HOUR","DAY","WEEK","MONTH"]),Ad=Vn({eventId:Qi().describe("Event identifier"),eventName:Qi().describe("Event name"),currency:Qi().describe("Currency code (e.g., USD, EUR)"),dateRange:id}),xd=Ad.extend({limit:En().describe("Maximum number of results returned")}),Sd=er(["MOBILE","DESKTOP","TABLET","Unknown"]),Dd=er(["revenue","tickets","orders","pageViews","visitors","conversion","clicks","clickRate"]).describe("Metric used to sort breakdown rows before limiting results");Qs({eventId:Qi(),granularity:Td.optional()}),Vn({granularity:Td,data:Bn(Vn({date:Qi(),revenue:En(),ticketsSold:En()}))});const Cd=Qs({eventId:Qi(),limit:En().min(1).max(100).optional().default(10)}),Od=Vn({meta:xd,totals:Vn({uses:En().describe("Total coupon uses across all coupons"),revenue:En().describe("Total revenue from coupon-discounted orders (cents)")}),coupons:Bn(Vn({id:Qi().describe("Coupon code identifier"),code:Qi().describe("Coupon code"),uses:En().describe("Number of times this coupon was used"),revenue:En().describe("Revenue from this coupon (cents)"),discount:Qi().describe("Discount amount or percentage"),share:En().describe("Share of total coupon uses (%)")})).describe("Coupons sorted by uses descending")}),Pd=Qs({eventId:Qi(),limit:En().min(1).max(100).optional().default(10),sortBy:Dd.optional().default("orders")}),Rd=Vn({data:Bn(Vn({campaign:Qi(),views:En(),visitors:En(),clicks:En().optional(),orders:En(),tickets:En(),revenue:En(),conversionRate:En(),sharePercent:En()})),totalOrders:En(),totalTickets:En(),totalRevenue:En()}),_d=Qs({eventId:Qi(),limit:En().min(1).max(100).optional().default(10),sortBy:Dd.optional().default("orders")}),Nd=Vn({meta:xd,totals:Vn({views:En().describe("Total views across all mediums"),visitors:En().describe("Total unique visitors across all mediums"),orders:En().describe("Total orders across all mediums"),tickets:En().describe("Total tickets across all mediums"),revenue:En().describe("Total revenue across all mediums (cents)")}),mediums:Bn(Vn({id:Qi().describe("Medium identifier (e.g., 'social', 'email')"),name:Qi().describe("Medium name"),views:En().describe("Views from this medium"),visitors:En().describe("Unique visitors from this medium"),clicks:En().optional().describe("Ticket link clicks"),orders:En().describe("Orders from this medium"),tickets:En().describe("Tickets from this medium"),revenue:En().describe("Revenue from this medium (cents)"),conversionRate:En().describe("Conversion rate (%)"),share:En().describe("Share of total orders (%)")})).describe("Mediums sorted by orders descending")}),Ud=Qs({eventId:Qi(),limit:En().min(1).max(100).optional().default(10),sortBy:Dd.optional().default("orders")}),Md=Vn({meta:Ad,totals:Vn({views:En().describe("Total views across all devices"),visitors:En().describe("Total unique visitors across all devices"),revenue:En().describe("Total revenue across all devices (cents)"),orders:En().describe("Total orders across all devices"),tickets:En().describe("Total tickets across all devices")}),devices:Bn(Vn({id:Sd.describe("Device type"),name:Qi().describe("Human-readable device name"),views:En().optional().describe("Page views from this device"),visitors:En().describe("Unique visitors from this device"),revenue:En().describe("Revenue from this device (cents)"),clicks:En().optional().describe("Ticket link clicks"),orders:En().describe("Orders from this device"),tickets:En().describe("Tickets from this device"),conversionRate:En().describe("Conversion rate (%)"),share:En().describe("Share of total orders (%)")})).describe("Devices sorted by orders descending")}),Ld=Qs({eventId:Qi(),limit:En().min(1).max(100).optional().default(10),sortBy:Dd.optional().default("visitors")}),qd=Vn({meta:xd,totals:Vn({views:En().describe("Total views across all browsers"),visitors:En().describe("Total unique visitors across all browsers"),orders:En().describe("Total orders across all browsers"),tickets:En().describe("Total tickets across all browsers"),revenue:En().describe("Total revenue across all browsers (cents)")}),browsers:Bn(Vn({id:Qi().describe("Browser identifier"),name:Qi().describe("Human-readable browser name"),views:En().describe("Page views from this browser"),clicks:En().optional().describe("Ticket link clicks"),visitors:En().describe("Unique visitors from this browser"),orders:En().describe("Orders from this browser"),tickets:En().describe("Tickets from this browser"),revenue:En().describe("Revenue from this browser (cents)"),conversionRate:En().describe("Conversion rate (%)"),share:En().describe("Share of total visitors (%)")})).describe("Browsers sorted by visitors descending")}),Gd=Qs({eventId:Qi(),limit:En().min(1).max(100).optional().default(10),sortBy:Dd.optional().default("pageViews")}),jd=Vn({meta:xd,totals:Vn({views:En().describe("Total views across all locations"),visitors:En().describe("Total unique visitors across all locations"),orders:En().describe("Total orders across all locations"),tickets:En().describe("Total tickets across all locations"),revenue:En().describe("Total revenue across all locations (cents)")}),locations:Bn(Vn({id:Qi().describe("Location/region code (e.g., 'US-CA', 'GB')"),name:Qi().describe("Human-readable location name"),views:En().describe("Page views from this location"),visitors:En().describe("Unique visitors from this location"),clicks:En().optional().describe("Ticket link clicks"),orders:En().describe("Orders from this location"),tickets:En().describe("Tickets from this location"),revenue:En().describe("Revenue from this location (cents)"),conversionRate:En().describe("Conversion rate (%)"),share:En().describe("Share of total views (%)")})).describe("Locations sorted by views descending")}),Bd=Qs({eventId:Qi(),limit:En().min(1).max(100).optional().default(10),sortBy:Dd.optional().default("pageViews")}),Fd=Vn({meta:xd,totals:Vn({sessions:En().describe("Total sessions across all sources"),visitors:En().describe("Total unique visitors across all sources"),orders:En().describe("Total orders across all sources"),tickets:En().describe("Total tickets across all sources"),revenue:En().describe("Total revenue across all sources (cents)")}),sources:Bn(Vn({id:Qi().describe("Traffic source identifier"),name:Qi().describe("Traffic source name"),referrer:Qi().describe("Referrer URL or domain"),sessions:En().describe("Sessions from this source"),visitors:En().describe("Unique visitors from this source"),clicks:En().optional().describe("Ticket link clicks"),orders:En().describe("Orders from this source"),tickets:En().describe("Tickets from this source"),conversionRate:En().describe("Conversion rate (%)"),revenue:En().describe("Revenue from this source (cents)"),share:En().describe("Share of total sessions (%)")})).describe("Traffic sources sorted by sessions descending")}),Vd=Vn({eventId:Qi(),includeAdmission:xn().optional().default(!0),includeSection:xn().optional().default(!0),granularity:er(["HOUR","MINUTE"]).optional()}),zd=Vn({totalTickets:En(),checkedIn:En(),notCheckedIn:En(),checkinRate:En()}),Wd=zd.extend({admissionId:Qi(),admissionName:Qi()}),Yd=zd.extend({sectionId:Qi(),sectionName:Qi()}),Hd=Yn([zd.extend({byAdmission:Bn(Wd),bySection:Bn(Yd)}),Vn({granularity:er(["HOUR","MINUTE"]),totalTickets:En(),data:Bn(Vn({timestamp:Qi(),checkedIn:En(),rate:En(),checkinsThisPeriod:En()})),byAdmission:Bn(Vn({admissionId:Qi(),admissionName:Qi(),data:Bn(Vn({timestamp:Qi(),checkedIn:En(),rate:En()}))})).optional(),bySection:Bn(Vn({sectionId:Qi(),sectionName:Qi(),data:Bn(Vn({timestamp:Qi(),checkedIn:En(),rate:En()}))})).optional()})]),Zd=Vn({eventId:Qi(),limit:En().min(1).max(50).optional().default(10)}),Kd=Vn({totalCheckIns:En(),scanners:Bn(Vn({userId:Qi(),name:Qi(),email:Qi(),checkIns:En(),sharePercent:En(),firstScanAt:Qi().nullable(),lastScanAt:Qi().nullable(),activeMinutes:En(),scansPerHour:En(),devices:Bn(Vn({deviceId:Qi(),checkIns:En()}))})).describe("Door staff sorted by check-ins descending")}),Jd=Vn({eventId:Qi(),includeAdmission:xn().optional().default(!0),includeSection:xn().optional().default(!0)}),Qd=Vn({totalTickets:En(),checkedIn:En(),noShows:En(),checkInRate:En(),noShowRate:En()}),Xd=Qd.extend({admissionId:Qi(),admissionName:Qi()}),ec=Qd.extend({sectionId:Qi(),sectionName:Qi()}),tc=Qd.extend({byAdmission:Bn(Xd),bySection:Bn(ec)}),ic=Vn({eventId:Qi(),granularity:er(["MINUTE","FIFTEEN_MINUTE","HOUR"]).optional().default("FIFTEEN_MINUTE")}),nc=Vn({granularity:er(["MINUTE","FIFTEEN_MINUTE","HOUR"]),totalCheckIns:En(),peakWindow:Vn({start:Qi().nullable(),end:Qi().nullable(),checkIns:En()}),data:Bn(Vn({timestamp:Qi(),checkIns:En(),cumulativeCheckIns:En(),cumulativeRate:En()}))}),rc=ud("promoterId","Promoter identifier"),oc=pd({promoterId:Qi().describe("Promoter identifier"),promoterName:Qi().describe("Promoter name"),teamId:Qi().describe("Team identifier"),teamName:Qi().describe("Team name")}),ac=md("promoterId","Promoter identifier"),sc=Vn({meta:Vn({promoterId:Qi(),dateRange:id,granularity:rd}),currencies:Bn(Vn({currency:Qi().describe("Currency code (e.g., USD, EUR)"),series:Bn(od),totals:sd})).describe("Time-series data grouped by currency")}),dc=hd("promoterId","Promoter identifier"),cc=ld,lc=ud("teamId","Team identifier"),uc=pd({teamId:Qi().describe("Team identifier"),teamName:Qi().describe("Team name")}),pc=md("teamId","Team identifier"),mc=Vn({meta:Vn({teamId:Qi(),dateRange:id,granularity:rd}),currencies:Bn(Vn({currency:Qi().describe("Currency code (e.g., USD, EUR)"),series:Bn(ad),totals:dd})).describe("Time-series data grouped by currency")});Qs({teamId:Qi().describe("Team identifier"),limit:En().optional().default(10).describe("Number of events to return"),sortBy:er(["revenue","tickets","conversion"]).optional().default("revenue").describe("Sort metric")}),Vn({meta:Vn({teamId:Qi(),dateRange:Vn({start:Qi(),end:Qi()}),limit:En(),sortBy:Qi()}),data:Bn(Vn({eventId:Qi().describe("Event identifier"),eventName:Qi().describe("Event name"),eventDate:Qi().describe("Event date").optional(),status:Qi().describe("Event status"),revenue:En().describe("Total revenue in cents"),tickets:En().describe("Tickets sold"),views:En().describe("Page views"),conversionRate:En().describe("Conversion rate (%)"),contribution:En().describe("% of promoter's total revenue")})),totals:Vn({events:En().describe("Total events in period"),revenue:En().describe("Combined revenue"),tickets:En().describe("Combined tickets")})});const hc=hd("teamId","Team identifier"),fc=ld,yc=Qs({teamId:Qi().describe("Team identifier")}),gc=Vn({stages:Bn(Vn({stageId:Qi().describe("Funnel stage identifier"),stageLabel:Qi().describe("Human-readable stage name"),count:En().describe("Number of events at this stage"),conversionRate:En().describe("Conversion rate from first stage (%)"),dropoffPercent:En().describe("Dropoff rate from previous stage (%)")}))}),vc=Qs({teamId:Qi().describe("Team identifier"),groupBy:er(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).optional().default("HOUR").describe("Time breakdown for aggregation"),timeZone:Qi().optional().default("UTC").describe("IANA timezone for hour/day aggregation (e.g., 'America/New_York')")}),bc=Vn({groupBy:er(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).describe("The grouping used for aggregation"),buckets:Bn(Vn({key:Yn([En(),Qi()]).describe("Bucket key (hour 0-23, day 0-6, or date string)"),label:Qi().describe("Human-readable label"),orderCount:En().describe("Number of orders"),sharePercent:En().describe("Percentage of total orders")})),totalOrders:En().describe("Total orders across all buckets")}),wc=Qs({teamId:Qi().describe("Team identifier"),limit:En().optional().default(10).describe("Maximum number of admissions to return")}),$c=Vn({admissions:Bn(Vn({admissionId:Qi().describe("Admission identifier"),admissionName:Qi().describe("Admission name"),ticketCount:En().describe("Number of tickets sold"),sharePercent:En().describe("Percentage of total tickets")})),totalTickets:En().describe("Total tickets across all admissions")}),Ic=Qs({teamId:Qi().describe("Team identifier"),type:er(["campaign","medium","source"]).describe("Dimension type to analyze"),limit:En().optional().default(20).describe("Maximum number of results to return")}),Ec=Vn({dimensionType:er(["campaign","medium","source"]).describe("The dimension type analyzed"),data:Bn(Vn({dimensionValue:Qi().describe("The dimension value (e.g., campaign name)"),dimensionLabel:Qi().describe("Human-readable label"),views:En().describe("Total page views"),conversions:En().describe("Total conversions (orders)"),conversionRate:En().describe("Conversion rate (%)"),sharePercent:En().describe("Share of total conversions (%)")})),totalConversions:En().describe("Total conversions across all dimensions")}),kc=Vn({teamId:Qi().describe("Team identifier"),startAt:Di().describe("Inclusive period start timestamp"),endAt:Di().describe("Exclusive period end timestamp")}),Tc=Vn({currency:Qi().describe("Currency code"),disputedOrders:En().describe("Orders currently marked as disputed"),orderCount:En().describe("Successful orders"),refunded:En().describe("Refunded amount in cents"),refundCount:En().describe("Orders with refunded value"),refundRate:En().describe("Refunded order rate as a percentage"),revenue:En().describe("Total order value in cents"),ticketsSold:En().describe("Tickets sold")}),Ac=Tc.omit({currency:!0}),xc=Vn({currencies:Bn(Tc),comparison:Vn({totals:Ac}),meta:Vn({endAt:Qi().describe("Exclusive period end timestamp"),startAt:Qi().describe("Inclusive period start timestamp"),teamId:Qi().describe("Team identifier")}),totals:Ac}),Sc=Vn({teamId:Qi().describe("Team identifier")}),Dc=Yn([Sc.extend({startDate:Ys.describe("Start date (YYYY-MM-DD)"),endDate:Ys.describe("End date (YYYY-MM-DD)")}),Sc.extend({startDate:Dn().optional(),endDate:Dn().optional()})]),Cc=Vn({amount:En().describe("Payout net amount in cents"),count:En().describe("Number of payouts in this currency"),currency:Qi().describe("Currency code")}),Oc=Vn({amount:En().describe("Payout net amount in cents"),currency:Qi().nullable().describe("Currency code"),dueAt:Qi().nullable().describe("Payout due timestamp"),payoutId:Qi().nullable().describe("Payout identifier")}),Pc=Vn({amount:En().describe("Payout net amount in cents"),currency:Qi().nullable().describe("Currency code"),paidAt:Qi().nullable().describe("Payout paid timestamp"),payoutId:Qi().nullable().describe("Payout identifier")}),Rc=Vn({upcoming:Vn({count:En().describe("Upcoming payouts matching the request"),pendingApproval:En().describe("Upcoming payouts still awaiting approval"),totals:Bn(Cc).describe("Upcoming payout totals by currency"),next:Oc}),lastPaid:Pc}),_c=Vn({teamId:Qi().describe("Team identifier"),startDate:Ys.describe("Start date (YYYY-MM-DD)"),endDate:Ys.describe("End date (YYYY-MM-DD)"),granularity:rd.optional().default("DAY").describe("Time granularity"),currency:Qi().optional().describe("Currency filter")}),Nc=er(["revenue","credits","refunds","disputes","payouts"]),Uc=Vn({id:Qi().optional().describe("Source identifier"),label:Qi().describe("Human-readable source label"),kind:Nc,amount:En().describe("Signed movement amount in cents"),eventId:Qi().optional().describe("Related event identifier"),eventName:Qi().optional().describe("Related event name")}),Mc=Vn({date:Qi().describe("Bucket date"),label:Qi().describe("Human-readable bucket label"),revenue:En().describe("Successful order total after discounts in cents"),credits:En().describe("Positive credit amount in cents"),refunds:En().describe("Signed refund adjustment amount in cents"),disputes:En().describe("Signed dispute principal and fee adjustment amount in cents"),payouts:En().describe("Signed paid payout amount in cents"),movements:Bn(Uc)}),Lc=Vn({revenue:En().describe("Successful order total after discounts in cents"),credits:En().describe("Positive credit amount in cents"),refunds:En().describe("Signed refund adjustment amount in cents"),disputes:En().describe("Signed dispute principal and fee adjustment amount in cents"),payouts:En().describe("Signed paid payout amount in cents"),net:En().describe("Net signed money movement in cents")}),qc=Vn({amount:En().describe("Outstanding adjustment amount in cents"),count:En().describe("Outstanding adjustment count"),currency:Qi().describe("Currency code")}),Gc=Vn({meta:Vn({teamId:Qi(),dateRange:id,granularity:rd}),cards:Vn({upcomingPayouts:Vn({count:En(),pendingApproval:En(),totals:Bn(Cc)}),adjustments:Vn({count:En(),totals:Bn(qc)}),nextPayout:Oc,lastPaid:Pc}),currencies:Bn(Vn({currency:Qi().describe("Currency code"),series:Bn(Mc),totals:Lc}))}),jc=Qs({teamId:Qi().describe("Team identifier"),granularity:er(["DAY","WEEK","MONTH"]).optional().default("DAY").describe("Time granularity for aggregation")}),Bc=Vn({granularity:er(["DAY","WEEK","MONTH"]).describe("The granularity used"),series:Bn(Vn({date:Qi().describe("Date key (YYYY-MM-DD, YYYY-Www, or YYYY-MM)"),label:Qi().describe("Human-readable label"),productViewed:En().describe("Page views"),productAdded:En().describe("Add to cart events"),checkoutStarted:En().describe("Checkout started events"),orderCompleted:En().describe("Completed orders")})),totals:Vn({productViewed:En().describe("Total page views"),productAdded:En().describe("Total add to cart"),checkoutStarted:En().describe("Total checkouts started"),orderCompleted:En().describe("Total orders completed"),uniqueVisitors:En().describe("Unique visitors (estimated via HyperLogLog, ~0.8% error)")})}),Fc=Vn({product_id:Qi().optional().describe("admission_id in ticketing context"),sku:Qi().optional().describe("admission_id or admission_name"),category:Qi().optional().describe('event_name or "Admission"'),name:Qi().optional().describe("admission_name"),brand:Qi().optional().describe("promoter_name"),variant:Qi().optional().describe("section_name"),price:En().optional().describe("admission price (base + booking fee) in major currency units"),quantity:En().optional().describe("number of tickets"),coupon:Qi().optional().describe("coupon code applied"),position:En().optional().describe("position in list"),url:Qi().optional().describe("URL to event/admission page"),image_url:Qi().optional().describe("event image"),admission_id:Qi().optional().describe("Explicit admission ID"),section_id:Qi().optional().describe("Section ID if applicable"),event_id:Qi().optional().describe("Event ID for this admission"),promoter_id:Qi().optional().describe("Promoter ID"),price_base:En().nullish().describe("Base price before fees in minor currency units"),price_booking_fee:En().nullish().describe("Booking fee in minor currency units"),capacity:En().optional().describe("Total capacity for this admission"),available:En().optional().describe("Remaining tickets available"),sold:En().optional().describe("Tickets already sold")}),Vc=Vn({type:Qi(),value:Qi()}),zc=Vn({type:Qi(),value:Qi()}),Wc=Vn({query:Yn([Qi(),Qn(Qi(),_n())]).optional(),list_id:Qi().optional(),category:Qi().optional(),filters:Bn(Vc).optional(),sorts:Bn(zc).optional(),promotion_id:Qi().optional(),creative:Qi().optional(),name:Qi().optional(),position:Yn([Qi(),En()]).optional(),product_id:Qi().optional(),sku:Qi().optional(),brand:Qi().optional(),variant:Qi().optional(),price:En().optional().describe("Product price in major currency units"),quantity:En().optional(),coupon:Qi().optional(),currency:Qi().optional().describe("ISO 4217 currency code"),value:En().optional().describe("Event value in major currency units"),url:Qi().optional(),image_url:Qi().optional(),cart_id:Qi().optional(),step:En().optional(),shipping_method:Qi().optional(),payment_method:Qi().optional(),ticketing_mode:er(["internal","external"]).optional(),external_ticket_url:Qi().optional(),external_ticket_domain:Qi().optional(),cta_surface:Qi().optional(),order_id:Qi().optional(),affiliation:Qi().optional(),subtotal:En().optional().describe("Order subtotal in major currency units"),total:En().optional().describe("Order total in major currency units"),revenue:En().optional().describe("Order revenue in major currency units"),shipping:En().optional().describe("Shipping amount in major currency units"),tax:En().optional().describe("Tax amount in major currency units"),discount:En().optional().describe("Discount amount in major currency units"),coupon_id:Qi().optional(),coupon_name:Qi().optional(),reason:Qi().optional(),wishlist_id:Qi().optional(),wishlist_name:Qi().optional(),share_via:Qi().optional(),share_message:Qi().optional(),recipient:Qi().optional(),review_id:Qi().optional(),review_body:Qi().optional(),rating:Qi().optional(),products:Bn(Fc).optional(),event_id:Qi().optional().describe("ID of the ticketed event (evt_xxx)"),event_name:Qi().optional().describe("Name of the ticketed event"),event_slug:Qi().optional().describe("URL slug of event"),event_starts_at:ds.optional().describe("When the event starts (naive datetime, no timezone)"),event_ends_at:ds.optional().describe("When the event ends (naive datetime, no timezone)"),event_status:er(["UPCOMING","LIVE","ENDED","CANCELLED"]).optional(),event_visibility:er(["PUBLIC","PRIVATE"]).optional(),event_location:Qi().optional().describe("Venue name"),event_city:Qi().optional().describe("Venue city"),event_country:Qi().optional().describe("Venue country"),promoter_id:Qi().optional().describe("ID of the promoter (pmt_xxx)"),promoter_name:Qi().optional().describe("Name of the promoter"),promoter_slug:Qi().optional().describe("URL slug of promoter"),admission_id:Qi().optional().describe("ID of admission type (adm_xxx)"),admission_name:Qi().optional().describe('Name of admission (e.g., "General Admission")'),admission_capacity:En().optional().describe("Total capacity for this admission"),admission_available:En().optional().describe("Tickets still available"),admission_sold:En().optional().describe("Tickets already sold"),section_id:Qi().optional().describe("ID of section (sct_xxx)"),section_name:Qi().optional().describe('Name of section (e.g., "VIP", "General")'),section_capacity:En().optional().describe("Total capacity for this section"),section_available:En().optional().describe("Spots still available in section"),ticket_id:Qi().optional().describe("Individual ticket ID (tkt_xxx)"),ticket_status:er(["VALID","REDEEMED","CANCELLED"]).optional(),tickets_quantity:En().optional().describe("Number of tickets in transaction"),customer_id:Qi().optional().describe("Customer ID (cus_xxx)"),customer_email:Qi().optional().describe("Customer email"),customer_first_name:Qi().optional(),customer_last_name:Qi().optional(),price_base:En().nullish().describe("Base price before fees in minor currency units"),price_booking_fee:En().nullish().describe("Booking fee amount in minor currency units"),price_discount_amount:En().nullish().describe("Discount amount applied in minor currency units"),sale_starts_at:ds.optional().describe("When tickets go on sale (naive datetime, no timezone)"),sale_ends_at:ds.optional().describe("When ticket sales end (naive datetime, no timezone)"),entry_starts_at:ds.optional().describe("When entry to event begins (naive datetime, no timezone)"),entry_ends_at:ds.optional().describe("When entry to event ends (naive datetime, no timezone)"),funnel_step:Qi().optional().describe('Current funnel step (e.g., "browse", "cart", "checkout")'),time_to_purchase:En().optional().describe("Seconds from first view to purchase"),session_duration:En().optional().describe("Total session duration in seconds"),referrer_type:er(["DIRECT","SOCIAL","EMAIL","SEARCH","REFERRAL","AD"]).optional(),campaign_id:Qi().optional().describe("Marketing campaign ID"),affiliate_id:Qi().optional().describe("Affiliate partner ID"),promo_code_used:Qi().optional().describe("Promotional code applied"),platform:er(["WEB","MOBILE_WEB","IOS","ANDROID"]).optional(),app_version:Qi().optional(),device_type:er(["MOBILE","TABLET","DESKTOP"]).optional(),anonymous_id:Qi().optional(),browser:Qi().optional(),browser_session_id:Qi().optional(),country:Qi().optional(),page_path:Qi().optional(),page_title:Qi().optional(),page_url:Qi().optional(),referrer:Qi().optional(),region:Qi().optional(),user_agent:Qi().optional(),utm_source:Qi().optional(),utm_medium:Qi().optional(),utm_campaign:Qi().optional(),utm_term:Qi().optional(),utm_content:Qi().optional()}),Yc=Vn({session_id:Qi(),user_id:Qi().optional(),anonymous_id:Qi().optional(),utm_source:Qi().optional(),utm_medium:Qi().optional(),utm_campaign:Qi().optional(),utm_term:Qi().optional(),utm_content:Qi().optional(),page:Vn({url:Qi(),path:Qi(),title:Qi()}),referrer:Qi().optional(),user_agent:Qi().optional(),ip:Qi().optional(),geo:Vn({country:Qi().optional().describe('Country code (e.g., "AU")'),countryName:Qi().optional().describe('Country name (e.g., "Australia")'),region:Qi().optional().describe("State/province code"),regionName:Qi().optional().describe('State/province name (e.g., "New South Wales")'),city:Qi().optional().describe("City name"),latitude:Qi().optional().describe("Latitude"),longitude:Qi().optional().describe("Longitude")}).optional(),fbc:Qi().optional().describe("Facebook click ID"),fbp:Qi().optional().describe("Facebook browser ID"),ttclid:Qi().optional().describe("TikTok click ID")}),Hc=Vn({id:Qi(),eventId:Qi().min(1).describe("Event being tracked (evt_123)"),teamId:Qi().min(1).describe("Team ID (team_123)"),promoterId:Qi().min(1).describe("Promoter ID (pmt_123)"),eventType:Qr,timestamp:Qi(),date:Qi().describe("YYYY-MM-DD"),hour:En().int().min(0).max(23),properties:Wc,context:Yc,productId:Qi().optional(),createdAt:Qi(),updatedAt:Qi()}),Zc=Hc.omit({id:!0,timestamp:!0,date:!0,hour:!0,createdAt:!0,updatedAt:!0}).extend({messageId:Qi().min(1).optional().meta({description:"Analytics message id for retry-safe event delivery and linking."}),occurredAt:Di().optional().meta({description:"Client-observed event time. Server ingest time remains authoritative for writes."})}).meta({description:"Schema for tracking an analytics event. Excludes system-generated fields"}),Kc=Vn({legacyOrgId:Qi().min(1),legacyEventId:Qi().min(1),legacyTeamId:Qi().min(1),legacyEventName:Qi().optional(),legacyEventSlug:Qi().optional(),legacyEventCreatedAt:Yn([Qi(),Gn(),On()]).optional(),legacyTeamCreatedAt:Yn([Qi(),Gn(),On()]).optional()}),Jc=Yn([Zc,Vn({eventName:Qi().min(1).optional(),eventType:Qr.optional(),eventId:Qi().min(1).optional(),teamId:Qi().min(1).optional(),promoterId:Qi().min(1).optional(),properties:Qn(Qi(),_n()).optional(),context:Yc.partial().optional(),legacyContext:Kc.optional()}).passthrough().meta({description:"Compatibility schema for legacy Sash analytics payloads that require server-side ID normalization"})]).meta({description:"Analytics ingress schema accepting both canonical payloads and legacy Sash-compatible payloads"});Xs({eventId:Qi().meta({description:"Event ID to get tracking events for"}),limit:$a().int().positive().optional().meta({description:"Maximum number of events to return"})}).meta({description:"Schema for retrieving tracking events for an event"});const Qc=er(["AIRWALLEX","STRIPE"]),Xc=Vn({id:Qi().readonly().meta({examples:[wa.Beneficiary.id],description:"A unique identifier for this beneficiary."}),createdAt:Di().readonly().meta({examples:[wa.Beneficiary.createdAt],description:"Timestamp in ISO 8601 format when this beneficiary was created."}),updatedAt:Di().readonly().meta({examples:[wa.Beneficiary.updatedAt],description:"Timestamp in ISO 8601 format when this beneficiary was last updated."}),name:Qi().meta({examples:[wa.Beneficiary.name],description:"The account name for this beneficiary."}),currency:Aa.meta({examples:[wa.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts."}),gateway:Qc.meta({examples:["STRIPE"],description:"The payment gateway used for processing payouts."}),gatewayId:Qi().meta({examples:[wa.Beneficiary.gatewayId],description:"The identifier assigned by the payment gateway to this account."}),teamId:Qi().meta({description:"Team that owns this beneficiary account."}),teamIds:Bn(Qi()).meta({examples:[[]],description:"List of team IDs this beneficiary is assigned to. Empty array means available to all teams."}),venueIds:Bn(Qi()).meta({examples:[[]],description:"List of venue IDs this beneficiary is assigned to. Empty array means team-level only (available to all venues)."})}).meta({description:"beneficiary"}),el=Vn({city:Qi().optional(),country_code:Qi(),postcode:Qi().optional(),state:Qi().optional(),street_address:Qi().optional()}),tl=Vn({account_currency:Qi(),account_name:Qi(),account_number:Qi().optional(),account_routing_type1:Qi().optional(),account_routing_value1:Qi().optional(),account_routing_type2:Qi().optional(),account_routing_value2:Qi().optional(),bank_account_category:Qi().optional(),bank_branch:Qi().optional(),bank_country_code:Qi(),bank_name:Qi().optional(),bank_street_address:Qi().optional(),binding_mobile_number:Qi().optional(),fingerprint:Qi().optional(),iban:Qi().optional(),local_clearing_system:Qi().optional(),swift_code:Qi().optional(),transaction_reference:Qi().optional(),account_identifier_type:Qi().optional(),account_identifier_value:Qi().optional()}),il=Vn({transfer_methods:Bn(er(["SWIFT","LOCAL"])).meta({examples:[["LOCAL"]],description:"Transfer methods supported for this beneficiary"}),beneficiary:Vn({company_name:Qi().optional(),date_of_birth:Qi().optional(),entity_type:Qi().meta({examples:["COMPANY"],description:"Whether the beneficiary is PERSONAL or COMPANY"}),first_name:Qi().optional(),last_name:Qi().optional(),address:el,bank_details:tl,additional_info:Vn({personal_email:tn().optional()}).optional()}).meta({description:"Beneficiary details including personal/company info, address, and bank details"})}).meta({description:"Complete beneficiary request structure for Airwallex validation"}),nl=il.extend({id:Qi().optional()}),rl=Xc.omit({id:!0,createdAt:!0,updatedAt:!0,currency:!0}).extend({currency:Aa.meta({examples:[wa.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts to this beneficiary account"}),airwallex:nl.optional().meta({examples:[wa.AirwallexBeneficiary],description:"Airwallex-specific beneficiary details including bank account information and address (required when gateway is AIRWALLEX)"}),teamIds:Bn(Qi()).optional().default([]).meta({examples:[[]],description:"List of team IDs to assign this beneficiary to. Empty array or omitted means available to all teams."}),venueIds:Bn(Qi()).optional().default([]).meta({examples:[[]],description:"List of venue IDs to assign this beneficiary to. Empty array or omitted means team-level only."})}).meta({description:"Schema for creating a new beneficiary account for receiving payouts"}),ol=Xc.pick({id:!0}).meta({description:"Schema for retrieving a single beneficiary by its unique identifier"}),al=ol.meta({description:"Schema for deleting a beneficiary account - requires the beneficiary ID"}),sl=Vn({teamId:Qi().optional().meta({examples:[wa.Team.id],description:"Optional identifier of the team whose beneficiaries to list. When provided, only beneficiaries for that team are returned."}),gateway:er(["AIRWALLEX","STRIPE"]).optional().meta({examples:[wa.Beneficiary.gateway],description:"Filter beneficiaries by payment gateway provider (optional)"}),currency:Aa.optional().meta({examples:[wa.Beneficiary.currency],description:"Filter beneficiaries by currency code (optional)"}),query:Qi().optional().meta({examples:["beneficiary"],description:"Optional search query to filter beneficiaries by name or gateway identifier. When provided, search-backed pagination is used."}),limit:cs("beneficiaries").optional(),cursor:Qi().optional().meta({examples:["eyJpZCI6ImJlbl8wMWpwczVjZ3NlNW42bWcxeW1rZXc5dHNmaCJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Query parameters for listing beneficiaries with pagination and optional filters"}),dl=Us(Xc,"beneficiaries"),cl=Vn({beneficiary:Xc}),ll=Vn({min:En().optional().meta({description:"Minimum number of time units for the transfer"}),max:En().optional().meta({description:"Maximum number of time units for the transfer"}),unit:Qi().optional().meta({examples:["day"],description:"Time unit (e.g., 'day', 'hour')"})}).meta({description:"Expected transfer completion time range"}),ul=Vn({min:En().optional().meta({description:"Minimum transfer amount"}),max:En().optional().meta({description:"Maximum transfer amount"})}).meta({description:"Transfer amount limits"}),pl=Vn({label:Qi().meta({description:"Display label for the option"}),value:Qi().meta({description:"Value to submit when selected"}),flightTime:ll.optional().meta({description:"Expected transfer time for TRANSFER_METHOD options"}),transferLimit:ul.optional().meta({description:"Transfer amount limits for TRANSFER_METHOD options"}),processingTime:Qi().optional().meta({description:"Human-readable processing time description"})}).meta({description:"A selectable option in a form field"}),ml=Vn({type:er(["INPUT","SELECT","RADIO","TRANSFER_METHOD","DYNAMIC_SELECT"]).meta({examples:["INPUT"],description:"The type of form input to render"}),label:Qi().optional().meta({description:"Display label for the field"}),placeholder:Qi().optional().meta({description:"Placeholder text for input fields"}),description:Qi().optional().meta({description:"Detailed description of the field"}),tip:Qi().optional().meta({description:"Tooltip information shown on hover"}),example:Qi().optional().meta({description:"Example value for the field"}),default:Qi().optional().meta({description:"Default value to pre-populate the field"}),key:Qi().optional().meta({description:"Unique key identifier for the field"}),options:Bn(pl).optional().meta({description:"Available options for SELECT and RADIO field types"}),refresh:xn().optional().meta({description:"When true, changing this field's value should trigger a schema refresh. Note: only documented API parameters (transfer_method, local_clearing_system) actually update the schema."})}).meta({description:"Field definition containing type, label, options, and metadata from Airwallex"}),hl=Vn({pattern:Qi().optional().meta({description:"Regex pattern for field validation"}),type:Qi().optional().meta({description:"Validation type identifier"})}).meta({description:"Validation rules for a form field"}),fl=Vn({path:Qi().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field in the beneficiary request object"}),enabled:xn().meta({examples:[!0],description:"Whether this field should be displayed"}),required:xn().meta({examples:[!0],description:"Whether this field is required for submission"}),field:ml.optional().meta({description:"Field definition with type, label, and options"}),rule:hl.optional().meta({description:"Validation rules for the field"})}).meta({description:"A single field in the beneficiary form schema with display and validation rules"}),yl=Vn({bankCountryCode:Qi().regex(/^[A-Z]{2}$/).meta({examples:["AU"],description:"Two-letter ISO 3166-1 alpha-2 country code for the bank location"}),accountCurrency:Aa.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for the beneficiary account"}),entityType:er(["PERSONAL","COMPANY"]).meta({examples:["COMPANY"],description:"Whether the beneficiary is an individual or a company"}),transferMethod:er(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"Transfer method: SWIFT for international wire transfers, LOCAL for domestic transfers"}),localClearingSystem:Qi().optional().meta({examples:["NPP"],description:"Local clearing system for domestic transfers (e.g., NPP, BANK_TRANSFER, BPAY for Australia). Only applicable when transferMethod is LOCAL."}),fieldValues:Qn(Qi(),Qi()).optional().meta({examples:[{"beneficiary.bank_details.account_routing_type1":"phone_number"}],description:"Current values of fields with refresh=true. Used to get dynamic schema updates based on user selections."})}).superRefine(((e,t)=>{e.localClearingSystem&&"SWIFT"===e.transferMethod&&t.addIssue({code:"custom",path:["localClearingSystem"],message:"Local clearing system requires LOCAL transfer method"})})).meta({description:"Parameters to fetch the form schema for a beneficiary."}),gl=Vn({unavailableReason:ir("UNSUPPORTED_COMBINATION").optional().meta({description:"When present, the selected country, currency, recipient type or transfer options are unsupported and fields is empty."}),fields:Bn(fl).meta({description:"Array of form fields with their display and validation configuration"}),selectedTransferMethod:er(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"The transfer method used to generate this schema. When not provided in the request, LOCAL is auto-selected if available."}),selectedLocalClearingSystem:Qi().optional().meta({examples:["NPP"],description:"The local clearing system used to generate this schema, if applicable."})}).meta({description:"Form schema response containing all fields needed to collect beneficiary details"}),vl=ia.route({method:"GET",path:"/beneficiaries/schema",summary:"Get beneficiary form schema",description:"Returns the form schema containing all fields required to create a beneficiary for the given country, currency, entity type, and transfer method combination. Use this to dynamically render the beneficiary creation form.",tags:["Beneficiaries"]}).input(yl.strict()).output(gl),bl=Vn({source:Qi().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field that failed validation"}),code:Qi().meta({examples:["001"],description:"Airwallex validation error code"}),message:Qi().meta({examples:["This field is required"],description:"Human-readable error message"})}).meta({description:"Details about a single validation error for a field"}),wl=il.meta({description:"Beneficiary request data to validate against Airwallex rules before creating"}),$l=Vn({valid:xn().meta({examples:[!0],description:"Whether the beneficiary request passed all validation rules"}),errors:Bn(bl).optional().meta({description:"Array of validation errors when valid is false. Each error contains the field path, error code, and message."})}).meta({description:"Validation result indicating whether the beneficiary request is valid for creation"}),Il=ia.route({method:"POST",path:"/beneficiaries/validate",summary:"Validate beneficiary request",description:"Validates a beneficiary request against Airwallex rules without creating the beneficiary. Use this to provide real-time validation feedback before submission.",tags:["Beneficiaries"]}).input(wl.strict()).output($l),El=er(["AMOUNT","PERCENT"]),kl=er(["TEAM","PROMOTER","EVENTS","SECTIONS","ADMISSIONS"]),Tl=Vn({id:Qi().readonly().meta({examples:[wa.Coupon.id],description:"A unique identifier for this coupon."}),couponId:Qi().optional().readonly().meta({examples:[wa.Coupon.couponId],description:"Duplicate of id field for GSI queries."}),createdAt:Di().readonly().meta({examples:[wa.Coupon.createdAt],description:"Timestamp in ISO 8601 format when this coupon was created."}),updatedAt:Di().readonly().meta({examples:[wa.Coupon.updatedAt],description:"Timestamp in ISO 8601 format when this coupon was last updated."}),name:Qi().meta({examples:[wa.Coupon.name],description:"Internal label for the coupon, visible to event organisers."}),active:xn().optional().meta({examples:[wa.Coupon.active],description:"Whether this coupon is currently active."}),showHidden:xn().optional().meta({examples:[!1],description:"Whether this coupon reveals hidden admissions and sections within its scope."}),kind:El.meta({examples:["PERCENT"],description:"Type of discount this coupon gives: a fixed amount or a percentage."}),filter:kl.meta({examples:["EVENTS"],description:"Scope of the coupon. TEAM applies to all events in the team. PROMOTER applies to all events by specified promoters. EVENTS/SECTIONS/ADMISSIONS apply to specific items."}),currency:Aa.optional().meta({examples:[wa.Coupon.currency],description:"Three-letter ISO 4217 currency code. Required for AMOUNT coupons. Optional for PERCENT coupons - when omitted, applies to all currencies."}),discount:En().min(0).meta({examples:[wa.Coupon.discount],description:"The discount value. If kind is 'amount', this is a currency amount. If kind is 'percent', this is a percentage."}),limit:En().meta({examples:[wa.Coupon.limit],description:"Maximum number of times the coupon can be redeemed across all customers."}),uses:En().optional().meta({examples:[wa.Coupon.uses],description:"Number of times this coupon has been redeemed so far."}),orderLimit:En().int().min(1).optional().meta({examples:[2],description:"Maximum number of admission units this coupon can discount within a single order. Omit to discount every eligible unit."}),membersOnly:xn().optional().meta({examples:[!1],description:"Whether this coupon can only be redeemed by a signed-in user holding an active membership pass for the coupon's team."}),promoters:Bn(Vn({id:Qi().meta({description:"Identifier of a promoter this coupon applies to."}),name:Qi().meta({description:"Name of a promoter this coupon applies to."}),slug:Qi().meta({description:"URL slug of a promoter this coupon applies to."})})).optional().meta({description:"List of promoters this coupon applies to when filter is PROMOTER."}),events:Bn(Vn({id:Qi().meta({description:"Identifier of an event this coupon applies to."}),name:Qi().meta({description:"Name of an event this coupon applies to."}),slug:Qi().meta({description:"URL slug of an event this coupon applies to."})})).optional().meta({description:"List of events this coupon applies to when filter is EVENTS."}),sections:Bn(Vn({id:Qi().meta({description:"Identifier of a section this coupon applies to."}),name:Qi().meta({description:"Name of a section this coupon applies to."}),eventId:Qi().meta({description:"Identifier of the event this section belongs to."})})).optional().meta({description:"List of sections this coupon applies to when filter is 'sections'."}),admissions:Bn(Vn({id:Qi().meta({description:"Identifier of an admission this coupon applies to."}),name:Qi().meta({description:"Name of an admission this coupon applies to."}),eventId:Qi().meta({description:"Identifier of the event this admission belongs to."})})).optional().meta({description:"List of admissions this coupon applies to when filter is 'admissions'."}),saleStartsAt:ds.meta({examples:[wa.Coupon.saleStartsAt],description:"Wall clock time when this coupon becomes valid (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),saleEndsAt:ds.optional().meta({examples:[wa.Coupon.saleEndsAt],description:"Wall clock time when this coupon expires (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),teamId:Qi().meta({description:"Team that created this coupon."})}).meta({description:"coupon"}),Al=Vn({id:Qi().readonly().meta({examples:[wa.CouponCode.id],description:"A unique identifier for this coupon code."}),createdAt:Di().readonly().meta({examples:[wa.CouponCode.createdAt],description:"Timestamp in ISO 8601 format when this coupon code was created."}),updatedAt:Di().readonly().meta({examples:[wa.CouponCode.updatedAt],description:"Timestamp in ISO 8601 format when this coupon code was last updated."}),name:Qi().meta({examples:[wa.CouponCode.name],description:"The code string that customers enter to redeem the coupon."}),active:xn().meta({examples:[wa.CouponCode.active],description:"Whether this coupon code is currently enabled for use."}),couponId:Qi().meta({examples:[wa.Coupon.id],description:"Identifier of the coupon to which this code belongs."}),teamId:Qi().meta({description:"Team that created this coupon code."}),uses:En().int().nonnegative().default(0).readonly().meta({examples:[0],description:"Number of times this specific coupon code has been used in successful orders."})}).meta({description:"coupon-code"}),xl=Al.pick({id:!0});Vn({couponId:Qi().meta({examples:[wa.Coupon.id]})}),Vn({name:Qi(),couponId:Qi().optional().meta({examples:[wa.Coupon.id]})});const Sl=Al.omit({id:!0,createdAt:!0,updatedAt:!0,uses:!0}),Dl=Al.omit({createdAt:!0,updatedAt:!0,couponId:!0,teamId:!0,uses:!0}).partial().extend({id:Al.shape.id}),Cl=xl,Ol=Vn({couponId:Qi().optional().meta({examples:[wa.Coupon.id],description:"Optional filter to retrieve coupon codes for a specific coupon"}),teamId:Qi().optional().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Optional filter to retrieve coupon codes created by a specific team"}),active:Ia().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupon codes"}),query:Qi().optional().meta({examples:["SUMMER"],description:"Optional search query to filter coupon codes by name. When provided, search-backed pagination is used."}),limit:cs("coupon codes").optional(),cursor:Qi().optional().meta({examples:["eyJpZCI6ImNwY18wMWpwczVjZ3NmenR3N2h4Y3ZyMndmdGsyIn0"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupon codes with optional filtering, search, and pagination"}),Pl=Us(Al,"codes"),Rl=Vn({couponCode:Al}),_l=Tl.omit({id:!0,createdAt:!0,updatedAt:!0}).strict().refine((e=>"PERCENT"!==e.kind||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for creating a new coupon without system-generated fields"}),Nl=Tl.pick({id:!0}).meta({description:"Schema for retrieving a single coupon by ID"}),Ul=Nl.meta({description:"Schema for deleting a coupon by ID with optional soft-delete filtering"}),Ml=Vn({teamId:Qi().meta({examples:[wa.Team.id],description:"Unique identifier of the team whose coupons to retrieve"}),active:Ia().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupons"}),query:Qi().optional().meta({examples:["Half Price"],description:"Optional search query to filter coupons by name or description. When provided, search-backed pagination is used."}),limit:cs("coupons").optional(),cursor:Qi().optional().meta({examples:["eyJpZCI6ImNwbl8wMWpwczVjZ3NmenMxa3NxYWV0NWhiYThhYyJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupons belonging to a specific team with optional filtering and pagination"}),Ll=Us(Tl,"coupons"),ql=Vn({coupon:Tl}),Gl=Tl.omit({createdAt:!0,updatedAt:!0,teamId:!0}).partial().extend({id:Tl.shape.id.meta({examples:[wa.Coupon.id],description:"Unique identifier of the coupon to update"}),saleEndsAt:ds.nullable().optional().meta({examples:[wa.Coupon.saleEndsAt],description:"Expiry time. Pass null to remove end date; omit to leave unchanged."}),currency:Aa.nullable().optional().meta({examples:["AUD","USD","GBP"],description:"Three-letter ISO 4217 currency code. Pass null to clear; omit to leave unchanged."}),orderLimit:Tl.shape.orderLimit.unwrap().nullable().optional().meta({examples:[2],description:"Maximum number of admission units this coupon can discount within a single order. Pass null to remove the per-order limit; omit to leave unchanged."})}).strict().refine((e=>"PERCENT"!==e.kind||void 0===e.discount||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for updating an existing coupon."}),jl=Vn({address:Qi().meta({examples:[wa.Location.address],description:"Complete formatted address"}),city:Qi().optional().meta({examples:[wa.Location.city],description:"City or locality"}),state:Qi().optional().meta({examples:[wa.Location.state],description:"State, province, or region"}),postcode:Qi().optional().meta({examples:[wa.Location.postcode],description:"Postal code"}),country:Qi().meta({examples:[wa.Location.country],description:"Country name"}),countryCode:Ta.optional().meta({description:"ISO country code when supplied by the location provider"})}).meta({description:"Provider-independent formatted address details"}),Bl=Vn({id:La.readonly().meta({examples:[wa.Location.id],description:"Location identifier"}),googlePlaceId:Qi().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),createdAt:Di().meta({examples:[wa.Location.createdAt],description:"Timestamp in ISO 8601 format when the location was created"}),updatedAt:Di().meta({examples:[wa.Location.updatedAt],description:"Timestamp in ISO 8601 format when the location was last updated"}),name:Qi().meta({examples:[wa.Location.name],description:"Location name"}),...jl.shape,latitude:En().min(-90).max(90).meta({examples:[wa.Location.latitude],description:"Latitude coordinate"}),longitude:En().min(-180).max(180).meta({examples:[wa.Location.longitude],description:"Longitude coordinate"}),timeZone:Qi().min(1).regex(/^[A-Za-z0-9_+-]+(\/[A-Za-z0-9_+-]+)*$/,{message:"Must be a valid IANA timezone identifier format"}).meta({examples:[wa.Location.timeZone],description:"IANA timezone identifier (e.g., 'America/New_York', 'Europe/London', 'Australia/Sydney', 'UTC'). Must be validated against the IANA timezone database where used."}),types:Bn(Qi()).optional().meta({examples:[["establishment","point_of_interest","stadium"]],description:"Google Place types indicating the category and nature of this location"}),description:Qi().optional().meta({examples:["Historic outdoor amphitheater known for summer concerts"],description:"AI-generated description of the place, when available"}),image:is.optional().meta({description:"Primary location photo"}),venueId:Ma.optional().meta({description:"Venue identifier if this location is a managed venue on the platform"})}).meta({description:"Location with full details including coordinates and timezone"}),Fl=Bl.omit({venueId:!0}).extend({venue:Vn({id:Ma.meta({description:"Venue identifier"}),name:Qi().meta({description:"Venue name"}),slug:Qi().meta({description:"URL-friendly venue slug"}),teamId:Qi().meta({description:"Team that owns this venue"}),approval:Ea.meta({description:"Venue approval status"}),image:is.optional().meta({description:"Venue image"}),description:Qi().optional().meta({description:"Venue description"})}).optional().meta({description:"Denormalized venue details if this location is a managed venue. Only included when venue is approved."})}),Vl=Qi().regex(/^G-[A-Z0-9]+$/,"Google Analytics Measurement ID must start with G-"),zl=Vn({id:Fa.readonly().meta({examples:[wa.Promoter.id],description:"Unique identifier for the promoter organization"}),createdAt:Di().readonly().meta({examples:[wa.Promoter.createdAt],description:"Timestamp in ISO 8601 format when the promoter was created"}),updatedAt:Di().readonly().meta({examples:[wa.Promoter.updatedAt],description:"Timestamp in ISO 8601 format when the promoter was last updated"}),name:Qi().min(3).max(30).meta({examples:[wa.Promoter.name],description:"Display name of the promoter organization. Must be between 3 and 30 characters"}),slug:Qi().min(3).max(30).meta({examples:[wa.Promoter.slug],description:"URL-friendly slug for the promoter organization. Must be unique and between 3 and 30 characters"}),teamId:Ra.meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that owns this promoter. Establishes team-based organization and permissions."}),description:Qi().meta({examples:[wa.Promoter.description],description:"Detailed description of the promoter organization and their events"}),approval:Ea.meta({examples:[wa.Promoter.approval],description:"Approval status of the promoter. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),image:is.optional().meta({description:"Optional promotional image for the promoter organization with dimensions and alt text"}),location:Fl.meta({description:"Primary location details for the promoter including address, coordinates, and timezone"}),geohash:Qi().meta({examples:[wa.Promoter.geohash],description:"Geohash encoding of the promoter's location for efficient spatial queries"}),tracking:Vn({fbId:Qi().optional().meta({examples:[wa.Promoter.tracking.fbId],description:"Facebook pixel ID for tracking conversions and analytics"}),gaId:Vl.optional().meta({examples:[wa.Promoter.tracking.gaId],description:"Google Analytics 4 Measurement ID for web analytics"}),tikTokId:Qi().optional().meta({examples:[wa.Promoter.tracking.tikTokId],description:"TikTok pixel ID for advertising and conversion tracking"})}).optional().meta({description:"Optional tracking configuration for analytics and advertising platforms"}),metadata:ss}).meta({description:"Promoter organization with location and approval status"}),Wl=Vn({id:Qi().readonly().meta({examples:[wa.Section.id],description:"Unique identifier for the section"}),createdAt:Di().readonly().meta({examples:[wa.Section.createdAt],description:"Timestamp when the section was created in ISO 8601 format"}),updatedAt:Di().readonly().meta({examples:[wa.Section.updatedAt],description:"Timestamp when the section was last updated in ISO 8601 format"}),name:Qi().meta({examples:[wa.Section.name],description:"Display name of the section (e.g., 'VIP Area', 'General Admission')"}),capacity:ns().prefault(-1).meta({examples:[wa.Section.capacity],description:"Maximum number of attendees for this section. Use -1 for unlimited capacity"}),limit:rs().prefault(-1).meta({examples:[wa.Section.limit??-1],description:"Maximum number of tickets for this section that can be purchased in a single order. A value of -1 indicates unlimited"}),available:En().min(-1).readonly().meta({examples:[wa.Section.available],description:"Number of tickets currently available for purchase in this section. Use -1 when capacity is unlimited"}),sold:En().min(0).readonly().meta({examples:[wa.Section.sold],description:"Number of tickets sold for this section"}),reserved:En().readonly().meta({examples:[wa.Section.reserved],description:"Number of tickets currently reserved (in pending orders) for this section"}),order:En().min(0).meta({examples:[wa.Section.order],description:"Display order of the section. Lower numbers appear first in listings"}),visibility:er(["ALWAYS","STACKED","HIDDEN"]).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls how this section is shown: always list all visible admissions, stack to show the cheapest available admission, or hide until a scoped coupon reveals it."}),location:Bl.meta({description:"Physical location details for the section"}),teamId:Qi().meta({description:"Team that owns this section. Denormalized for efficient queries."}),promoterId:Qi().meta({examples:[wa.Section.promoterId],description:"Unique identifier of the promoter who owns this section"}),eventId:Qi().meta({examples:[wa.Section.eventId],description:"Unique identifier of the event this section belongs to"}),eventSlug:Qi().meta({examples:[wa.Section.eventSlug],description:"URL-friendly identifier of the event this section belongs to"})}).meta({description:"A section represents a distinct area or tier within an event venue with its own capacity and pricing"}),Yl=er(["AUD","NZD","USD"]),Hl=er(["FEATURE_DISABLED","UNSUPPORTED_CURRENCY","NOT_ROUTED","NO_CONNECTED_GATEWAY","CHARGES_DISABLED","INCOMPATIBLE_FEE_STRUCTURE"]),Zl=Vn({available:xn().meta({description:"Whether Stripe Connect can be used for the selected team, event, and currency."}),reasons:Bn(Hl).meta({description:"Machine-readable reasons Stripe Connect is unavailable. Empty when available is true."}),supportedCurrencies:Bn(Yl).meta({description:"Currencies currently supported for Stripe Connect routing in this tenant flow."})});Vn({code:ir("STRIPE_CONNECT_UNAVAILABLE").meta({description:"Stable error code returned when Stripe Connect is unavailable."}),availability:Zl.meta({description:"Detailed Stripe Connect availability result for UI filtering and recovery."})});const Kl=er(["UPCOMING","ENDED"]),Jl=er(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE","CANCELLED"]),Ql=er(["HIDDEN","SCHEDULED","PUBLIC"]),Xl=Vn({visibility:Ql.optional().meta({description:"Whether public event surfaces show the full location address. Missing values are treated as PUBLIC unless legacy location reveal data says otherwise."}),publishAt:ds.optional().meta({description:"Wall clock time when the location address becomes public. Required when location visibility is SCHEDULED."}),sendAt:ds.optional().meta({description:"Wall clock time when customers with successful orders can see the full location address and receive the notification."}),instructions:Qi().max(2e3).optional().meta({description:"Arrival instructions shown to customers once the location address has been sent."})}),eu=Fl.extend(Xl.shape),tu=Vn({id:Ua.readonly().meta({examples:[wa.Event.id],description:"A unique identifier for this event"}),createdAt:Di().readonly().meta({examples:[wa.Event.createdAt],description:"Timestamp in ISO 8601 format when this event was created"}),updatedAt:Di().readonly().meta({examples:[wa.Event.updatedAt],description:"Timestamp in ISO 8601 format when this event was last updated"}),name:Qi().meta({examples:[wa.Event.name],description:"The title of the event shown to attendees"}),slug:Qi().meta({examples:[wa.Event.slug],description:"URL-friendly identifier for the event"}),description:Qi().meta({examples:[wa.Event.description],description:"Detailed description of the event"}),approval:Ea.meta({examples:["APPROVED"],description:"Approval status of the event"}),status:Kl.meta({examples:["UPCOMING","ENDED"],description:"Current stage of the event lifecycle"}),visibility:Jl.meta({examples:["PUBLIC"],description:"Who can see the event"}),currency:Aa.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code used for ticket prices"}),url:an().optional().meta({examples:["https://example.com"],description:"External URL for the event website or ticket page"}),entryStartsAt:ds.meta({examples:[wa.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:ds.meta({examples:[wa.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),publishAt:ds.meta({examples:[wa.Event.publishAt],description:"Wall clock time when the event becomes publicly visible (no timezone)"}),locationRevealAt:ds.optional().meta({description:"Deprecated. Use location.sendAt for customer access and location.publishAt for scheduled public address visibility."}),entryInstructions:Qi().max(2e3).optional().meta({description:"Deprecated. Use location.instructions for customer-facing arrival instructions."}),images:Vn({mobile:is.meta({description:"Mobile-optimized image for the event"}),desktop:is.meta({description:"Desktop-optimized image for the event"})}),geohash:Qi().meta({examples:[wa.Event.geohash],description:"Geohash representing the event location"}),location:eu.meta({description:"Structured location details for the event"}),teamId:Ra.meta({description:"Team that owns this event. Denormalized for efficient queries."}),promoterId:Fa.meta({examples:[wa.Promoter.id],description:"Promoter organizing the event. Must belong to the team."}),taxProfileId:_a.optional().meta({description:"Team tax profile currently used for ticket sales"}),metadata:ss,genres:Bn(Qi()).optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:Bn(Qi()).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),featured:xn().optional().meta({description:"Whether this event is an editorial pick",examples:[!0]}),likes:En().int().min(0).optional().meta({description:"Number of users who liked this event",examples:[42]}),stripeConnectAvailability:Zl.optional().meta({description:"Stripe Connect availability metadata for tenant event UI."})}).meta({description:"event"}),iu=zl.pick({id:!0,name:!0,slug:!0,description:!0,image:!0}),nu=Vn({event:tu.extend({passcode:Qi().optional().meta({description:"Plain-text event passcode. Included only on internal event detail responses for users with event.read access."}),sections:Bn(Wl),admissions:Bn(Os),promoter:iu.optional().meta({description:"Public summary of the promoter organizing this event. Included on event detail responses only."}),liked:xn().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]})})}),ru=er(["APPROVED","REJECTED"]);er(["CREATED","UPDATED","MANUAL"]);const ou=Vn({key:Qi().meta({examples:[wa.Event.id,wa.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),teamId:Ra.optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}).meta({description:"Schema for retrieving internal event approval state."}),au=Vn({eventId:Ua,teamId:Ra,approval:Ea,reason:Qi().max(2e3).nullable(),requestedAt:Di().nullable(),changedAt:Di().nullable(),changedByUserId:Qi().nullable(),submittedByUserId:Qi().nullable()}).meta({description:"Internal approval workflow state for an event."}),su=Vn({approval:au}),du=ou.meta({description:"Schema for requesting or resubmitting event approval."}),cu=Vn({key:Qi().meta({examples:[wa.Event.id,wa.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),approval:ru.meta({examples:["APPROVED"],description:"Approval decision for the event"}),reason:Qi().max(2e3).optional().meta({description:"Optional reason shown to the event submitter when rejecting the event"}),requestedAt:Di().optional().meta({description:"Approval request timestamp from an email action. When provided, the event must still be pending for that request."})}).meta({description:"Schema for approving or rejecting an event."}),lu=1e6,uu=er(["INCLUSIVE","EXCLUSIVE"]),pu=jl.extend({address:Qi().trim().min(1).max(500).meta({description:"Complete formatted registered address"}),city:Qi().trim().min(1).max(100).optional().meta({description:"City or locality of the registered address"}),state:Qi().trim().min(1).max(100).optional().meta({description:"State, province, or region of the registered address"}),postcode:Qi().trim().min(1).max(32).optional().meta({description:"Postal code of the registered address"}),country:Qi().trim().min(1).max(100).meta({description:"Country name of the registered address"}),countryCode:Ta.meta({description:"Supplier country as an ISO 3166-1 alpha-2 code",examples:["AU"]})}).strict().meta({description:"Registered postal address used on customer receipts"}),mu=Vn({legalName:Qi().trim().min(1).max(200).meta({description:"Legal or trading name of the ticket supplier"}),registrationNumber:Qi().trim().min(1).max(100).optional().meta({description:"Tax or business registration number shown on customer receipts"}),address:pu.meta({description:"Registered address of the ticket supplier"})}).strict().meta({description:"Ticket supplier identity shown on customer receipts"}),hu=Vn({taxName:Qi().trim().min(1).max(50).meta({description:"Customer-facing tax name, such as GST or VAT",examples:["GST"]}),ratePpm:Tn().min(1).max(lu).meta({description:"Tax rate in parts per million, where 100000 represents 10%",examples:[1e5]}),priceMode:uu.meta({description:"Whether organiser-entered ticket prices include or exclude tax",examples:["INCLUSIVE"]})}).strict().meta({description:"Tax collection and ticket price configuration"}),fu=Vn({supplier:mu.meta({description:"Legal supplier details used on customer receipts"}),collection:hu.meta({description:"Tax collection configuration for ticket sales"})}).strict();function yu(e,t){e.supplier.registrationNumber||t.addIssue({code:"custom",message:"A registration number is required when collecting tax",path:["supplier","registrationNumber"]})}fu.superRefine(yu).meta({description:"Editable tax profile data"});const gu=fu.extend({profileId:_a.readonly().meta({description:"Tax profile used for this ticket tax snapshot"}),profileUpdatedAt:Di().readonly().meta({description:"Version timestamp of the snapshotted tax profile"})}).superRefine(yu).meta({description:"Tax profile snapshot stored on an order"}),vu=Zn("mode",[Vn({mode:ir("TEAM_DEFAULT")}).strict().meta({description:"Use the team's current default tax profile"}),Vn({mode:ir("PROFILE"),profileId:_a}).strict().meta({description:"Use a specific team tax profile"})]).meta({description:"Tax profile choice for an event"}),bu=fu.extend({id:_a.readonly().meta({description:"Unique tax profile identifier"}),tenantId:Qi().readonly().meta({description:"Tenant that owns this tax profile"}),teamId:Ra.readonly().meta({description:"Team that owns this tax profile"}),createdAt:Di().readonly().meta({description:"Timestamp when the tax profile was created"}),updatedAt:Di().readonly().meta({description:"Timestamp when the tax profile was last updated"}),updatedByUserId:Qi().readonly().meta({description:"User who most recently updated the tax profile"})}).superRefine(yu).meta({description:"Reusable supplier and tax configuration for a team"}),wu=Vn({teamId:Ra.meta({description:"Team whose tax profiles should be retrieved"})}).strict().meta({description:"List the tax profiles configured for a team"}),$u=fu.extend({teamId:Ra.meta({description:"Team that owns the tax profile"})}),Iu=$u.superRefine(yu).meta({description:"Create a reusable team tax profile"}),Eu=$u.extend({profileId:_a.meta({description:"Tax profile to update"})}).superRefine(yu).meta({description:"Update a reusable team tax profile"}),ku=Vn({teamId:Ra,profileId:_a}).strict().meta({description:"Identify a tax profile owned by a team"}),Tu=Vn({profiles:Bn(bu).meta({description:"Reusable tax profiles owned by the team"}),defaultProfileId:_a.nullable().meta({description:"Default profile selected for new events, or null when none exist"})}).strict().superRefine(((e,t)=>{0===e.profiles.length&&null===e.defaultProfileId||e.defaultProfileId&&e.profiles.some((t=>t.id===e.defaultProfileId))||t.addIssue({code:"custom",message:"The default tax profile must be one of the listed profiles",path:["defaultProfileId"]})})).meta({description:"Team tax profiles and the current default"}),Au=tu.omit({id:!0,teamId:!0,createdAt:!0,updatedAt:!0,status:!0,approval:!0,geohash:!0,location:!0,likes:!0,stripeConnectAvailability:!0,taxProfileId:!0}).extend({description:ks.meta({examples:[wa.Event.description],description:"Detailed description of the event"}),slug:Qi().min(3).max(100).optional().meta({examples:[wa.Event.slug],description:"URL-friendly slug for the event. If not provided, will be automatically generated from the name. Must be unique and between 3 and 100 characters"}),passcode:Qi().optional().meta({description:"Passcode for protected access to the event"}),locationId:La.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:Qi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."}),location:Xl.optional().meta({description:"Event-specific location visibility, customer send time, and arrival instructions."}),taxSettingsSelection:vu.optional().meta({description:"Tax profile to associate with the event. Omit to use the team's current default profile."}),genres:Oa.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:Da.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]})}).refine((e=>e.locationId||e.googlePlaceId),{message:"Either locationId or googlePlaceId must be provided"}),xu=Vn({key:Qi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[wa.Event.id,wa.Event.slug]})}),Su=Vn({key:Qi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[wa.Event.id,wa.Event.slug]}),name:Qi().min(1).meta({description:"Name for the duplicated event",examples:[wa.Event.name+" (Copy)"]}),entryStartsAt:ds.meta({description:"New event entry start time. Other copied event and admission datetimes are shifted by the same offset.",examples:[wa.Event.entryStartsAt]}),url:an().nullable().optional().meta({description:"External ticketing URL for the duplicated event. Pass null to create the copy without an external URL; omit to copy the source URL.",examples:["https://example.com/events/summer-festival-2025"]})}),Du=Vn({key:Qi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[wa.Event.id,wa.Event.slug]}),featured:xn().meta({description:"Whether the event should be featured (editorial pick)",examples:[!0,!1]})}),Cu=Vn({key:Qi().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[wa.Event.id,wa.Event.slug]}),passcode:Qi().optional().meta({description:"Passcode for accessing protected events"}),couponCode:Qi().optional().meta({description:"Coupon code used to reveal hidden admissions and sections when eligible."}),teamId:Qi().optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}),Ou=Vn({admissions:En().int().min(0).optional().meta({description:"Number of active admissions configured for the event"}),sold:En().min(0).meta({description:"Number of tickets sold (net of refunds)"}),reserved:En().min(0).meta({description:"Number of tickets reserved"}),available:En().min(-1).meta({description:"Number of tickets available (-1 for unlimited)"}),capacity:En().min(-1).meta({description:"Total capacity (-1 for unlimited)"})}),Pu=er(["entryStartsAt","distance","createdAt"]),Ru=er(["asc","desc"]),_u=zn({status:er(["UPCOMING","ENDED"]).optional().meta({examples:["UPCOMING"],description:"Filter events by their current lifecycle status"}),approval:Ea.optional().meta({examples:["APPROVED"],description:"Filter events by their approval status"}),visibility:er(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE"]).optional().meta({examples:["PUBLIC"],description:"Filter events by their visibility setting"}),promoterId:Qi().max(128).optional().meta({examples:[wa.Promoter.id],description:"Filter events to only those belonging to a specific promoter. If not provided, returns events from all promoters the user has access to"}),teamId:Qi().max(128).optional().meta({description:"Filter events to only those belonging to a specific team. If not provided, returns events from all teams the user has access to"}),venueId:Qi().max(128).optional().meta({description:"Filter events to only those at a specific venue. If not provided, returns events at all venues"}),limit:$a().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of events to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:Qi().max(768).optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Cursor token for pagination. Provide the cursor from the previous response to continue fetching results"}),query:function(){return new Ji({type:"string",coerce:!0,...C(undefined)})}(0,void 0).max(120).optional().meta({examples:["Test Event"],description:"Search term to filter events by name, description, or location. Triggers full‑text search when provided"}),latitude:$a().min(-90).max(90).optional().meta({examples:[wa.Event.location.latitude],description:"Latitude coordinate for geographic search. Provide with longitude (and optional radius)"}),longitude:$a().min(-180).max(180).optional().meta({examples:[wa.Event.location.longitude],description:"Longitude coordinate for geographic search. Provide with latitude (and optional radius)"}),radius:$a().positive().max(2e4).optional().meta({examples:[20],description:"Search radius in kilometers from the provided coordinates. Defaults to 20km"}),country:Qi().max(120).optional().meta({examples:["australia"],description:"Filter by country region slug. Matches events where location.country equals the region name"}),state:Qi().max(120).optional().meta({examples:["nsw"],description:"Filter by state/province region slug. Matches events where location.state equals the region name"}),city:Qi().max(120).optional().meta({examples:["sydney"],description:"Filter by city region slug. Matches events where location.city equals the region name"}),from:Qi().date().optional().meta({examples:["2024-01-01"],description:"Filter events that start on or after this date (YYYY-MM-DD format). Events with entryStartsAt >= from"}),to:Qi().date().optional().meta({examples:["2024-12-31"],description:"Filter events that start on or before this date (YYYY-MM-DD format). Events with entryStartsAt <= to"}),sort:Pu.optional().meta({examples:["entryStartsAt"],description:"Optional list sort field. Defaults to event start time. Use `distance` with latitude and longitude to return nearest events first, or `createdAt` to return newest or oldest events first."}),direction:Ru.optional().meta({examples:["desc"],description:"Sort direction for event start or creation time. Defaults to lifecycle-aware event start order; distance sorting always returns nearest events first."}),genres:wr((e=>"string"==typeof e?[e]:e),Bn(Ca).max(20,"Cannot filter by more than 20 genres")).optional().meta({examples:[["Tech House","Melodic Techno"]],description:"Filter events by music genre(s). Returns events matching ANY of the provided genres (OR logic). Maximum 20 genres"}),categories:wr((e=>"string"==typeof e?[e]:e),Bn(Sa).max(10,"Cannot filter by more than 10 categories")).optional().meta({examples:[["Day Party","Open Air"]],description:"Filter events by category(s). Returns events matching ANY of the provided categories (OR logic). Maximum 10 categories"}),featured:xn().optional().meta({examples:[!0],description:"Filter to only featured (editorial pick) events"})}).meta({description:"List events with filtering, full‑text search, geo queries, date range filtering, genre/category filtering, and cursor-based pagination"}),Nu=_u,Uu=Cs({booking:"Booking fee for the cheapest publicly purchasable admission, in cents",currency:"Three-letter ISO 4217 currency code for the cheapest publicly purchasable admission",price:"Cheapest publicly purchasable admission price for this event, selected by customer-facing total"}),Mu=Us(tu.extend({inventory:Ou.optional(),liked:xn().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]}),price:Uu.nullable().meta({description:"Cheapest publicly purchasable admission price, or null when no public admission is currently available"})}),"events"),Lu=Vn({event:tu});er(["ONLINE","DOOR","SALE_ENDED","SOLD_OUT"]);const qu=_u.omit({cursor:!0,limit:!0}).extend({limit:$a().int().min(1).max(1e3).prefault(1e3).meta({examples:[1e3],description:"Maximum number of event slugs to return. Must be between 1 and 1000, defaults to 1000"}),skip:$a().int().min(0).max(1e4).prefault(0).meta({examples:[0],description:"Number of matching event slugs to skip before returning results"})}),Gu=Vn({slugs:Bn(Qi()).meta({description:"Current event slugs for the matching event list"}),skip:$a().int().min(0).meta({examples:[0],description:"Number of matching event slugs skipped"}),limit:$a().int().min(1).max(1e3).meta({examples:[1e3],description:"Maximum number of event slugs returned"})}),ju=Vn({visibility:Ql.optional().meta({description:"Whether public event surfaces show the full location address. Omit to leave unchanged."}),publishAt:Xl.shape.publishAt.nullable().optional().meta({description:"Public location address publish time. Pass null to clear; omit to leave unchanged."}),sendAt:Xl.shape.sendAt.nullable().optional().meta({description:"Customer location address send time. Pass null to clear; omit to leave unchanged."}),instructions:Xl.shape.instructions.nullable().optional().meta({description:"Arrival instructions for customers. Pass null to clear; omit to leave unchanged."})}),Bu=tu.omit({createdAt:!0,updatedAt:!0,geohash:!0,status:!0,approval:!0,location:!0,likes:!0,stripeConnectAvailability:!0,taxProfileId:!0}).partial().extend({description:ks.optional().meta({examples:[wa.Event.description],description:"Detailed description of the event. Omit to leave unchanged."}),key:Qi().meta({examples:[wa.Event.id,wa.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),slug:Qi().min(3).max(100).optional().meta({examples:[wa.Event.slug],description:"URL-friendly slug for the event. Omit to leave unchanged. Must be unique and between 3 and 100 characters"}),passcode:Qi().nullable().optional().meta({description:"Passcode for protected access. Pass null to clear; changing visibility away from PASSCODE also clears it."}),url:an().nullable().optional().meta({examples:["https://example.com/events/summer-festival-2025"],description:"External event URL. Pass null to clear; omit to leave unchanged."}),locationRevealAt:tu.shape.locationRevealAt.nullable().optional().meta({description:"Wall clock time when the venue address becomes visible. Pass null to clear before reveal; omit to leave unchanged."}),entryInstructions:tu.shape.entryInstructions.nullable().optional().meta({description:"Entrance instructions sent when the location is revealed. Pass null to clear; omit to leave unchanged."}),locationId:La.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:Qi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),location:ju.optional().meta({description:"Event-specific location visibility, public publish time, customer send time, and arrival instructions."}),taxSettingsSelection:vu.optional().meta({description:"Associate the event with the current default or a selected team tax profile."}),genres:Oa.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:Da.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),notify:xn().optional().meta({description:"Whether attendees should be notified about this event update.",examples:[!0]})}).meta({description:"Schema for updating an existing event."}),Fu=Vn({id:Ka.readonly().meta({description:"Unique identifier for the event collaborator"}),createdAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was added"}),updatedAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was last updated"}),eventId:Ua.meta({description:"Event this collaboration applies to"}),promoterId:Fa.meta({description:"Promoter collaborating on the event"}),acceptedBy:qa.meta({description:"User ID who accepted the invitation to collaborate"}),promoter:Vn({id:Fa.meta({description:"Unique identifier of the promoter"}),name:Qi().meta({description:"Name of the promoter"}),teamId:Ra.meta({description:"Team ID of the promoter"})}).optional().meta({description:"Populated promoter details. Only included when explicitly requested."}),permissions:Is.meta({description:"Permissions granted to this collaborator. User must have permission in BOTH this grant AND their team membership (intersection).",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),tenantId:Qi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active event collaborator. Created when a promoter accepts an invitation or is directly added to an event. Hard deleted when removed."}),Vu=Fu.pick({id:!0,eventId:!0}).meta({description:"Schema for accepting an event promoter collaboration invitation. User accepting must be a member of the invited promoter's team."}),zu=Vn({id:Ka.readonly().meta({description:"Unique identifier for the event collaboration invitation"}),createdAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),eventId:Ua.meta({description:"Event this invitation applies to"}),promoterId:Fa.meta({description:"Promoter being invited to collaborate on the event."}),invitedByPromoterId:Fa.meta({description:"Promoter who sent this invitation (event owner or collaborator with permission)."}),permissions:Is.meta({description:"Permissions the promoter will receive upon accepting the invitation.",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),token:Qi().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),invitedBy:qa.meta({description:"User ID who sent the invitation"}),expiresAt:En().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),tenantId:Qi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending event collaborator invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates an EventCollaborator record and deletes the invitation."}),Wu=zu.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,token:!0,expiresAt:!0,invitedByPromoterId:!0}).meta({description:"Schema for inviting a promoter to collaborate on an event. Creates a pending invitation that the promoter can accept."}),Yu=Vn({eventId:Ua.meta({description:"Event ID that the collaboration belongs to"}),id:Ka.meta({description:"Event team access grant ID to retrieve"})}),Hu=Vn({invite:zu}),Zu=Vn({eventId:Qi().meta({description:"Event ID to list collaborators for"}),accessPromoterId:Qi().optional().meta({description:"DEPRECATED: Use 'promoterId' instead. Filter by collaborating promoter ID (what events can this promoter access). Maintained for backward compatibility."}),ownerPromoterId:Qi().optional().meta({description:"DEPRECATED: No longer used. Maintained for backward compatibility only."}),limit:cs("event collaborators"),cursor:Qi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active event collaborations with pagination and filtering. Only returns accepted collaborations (not pending invitations). Use invite endpoints for pending invitations."}),Ku=Us(Fu,"grants"),Ju=Vn({collaborator:Fu}),Qu=ir("audience-republic").meta({description:"Integration provider."}),Xu=Vn({listName:Qi().trim().min(1).max(200).meta({description:"Shared Audience Republic mailing list name for email and SMS."})}).strict(),ep=Vn({id:es,teamId:Ra,provider:Qu,enabled:xn().meta({description:"Whether this integration is connected."}),configured:xn().meta({description:"Whether an encrypted credential is stored. Credentials are never returned."}),revision:En().int().positive().meta({description:"Version required for conditional updates."}),activatedAt:Di().meta({description:"Start of future-only team delivery for this connection."}),settings:Xu,canManageTeam:xn().meta({description:"Whether the caller may change credentials and the shared mailing list."}),tenantDestination:xn().meta({description:"Whether tenant configuration references this integration for tenant-wide delivery."})}).meta({description:"Team-owned integration sharing one provider account and mailing list across all promoters."}),tp=Vn({teamId:Ra}).strict(),ip=Vn({integrations:Bn(ep),canManageTeam:xn()}).meta({description:"Integrations visible to the caller in this team."}),np=Vn({id:es}).strict(),rp=Vn({teamId:Ra,provider:Qu,apiKey:Qi().trim().min(1).max(4096).meta({description:"Write-only shared provider API key."}),settings:Xu}).strict(),op=Vn({id:es,revision:En().int().positive(),apiKey:Qi().trim().min(1).max(4096).optional().meta({description:"Replace the shared key. Omit to retain it; required to reconnect."}),settings:Xu}).strict(),ap=np.extend({revision:En().int().positive()}).strict(),sp=Vn({id:ts,integrationId:es,scope:er(["team","tenant"]),status:er(["QUEUED","RUNNING","PAUSED","COMPLETED","FAILED","CANCELLED"]),createdAt:Di(),updatedAt:Di(),processed:En().int().nonnegative(),skipped:En().int().nonnegative(),failed:En().int().nonnegative(),error:Qi().optional()}).meta({description:"Durable historical import progress. Counts refer to orders, not unique buyers."}),dp=np.extend({scope:er(["team","tenant"]).default("team")}).strict(),cp=np.extend({jobId:ts}).strict(),lp=Vn({key:Qi().min(1).meta({description:"Location key - either a location ID (loc_xxx format) or provider-specific identifier (e.g., Google Place ID)",examples:[wa.Location.id,"ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}),up=Vn({query:Qi().min(1).meta({examples:["sydney opera"],description:"Search query for location search"}),latitude:$a().min(-90).max(90).optional().meta({examples:[wa.Location.latitude],description:"User's latitude for proximity-based results (optional for better relevance)"}),longitude:$a().min(-180).max(180).optional().meta({examples:[wa.Location.longitude],description:"User's longitude for proximity-based results (optional for better relevance)"}),types:Bn(Qi()).optional().meta({examples:[["establishment"]],description:"Filter results by Google Place types (e.g., 'establishment', 'night_club', 'bar')"})}).meta({description:"Parameters for searching locations"}),pp=Vn({googlePlaceId:Qi().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),name:Qi().meta({examples:[wa.Location.name],description:"Primary name of the location"}),description:Qi().meta({examples:[wa.Location.address],description:"Full formatted address"}),venue:Vn({id:Ma.meta({examples:[wa.Venue.id],description:"Venue ID if this location is a managed venue"}),name:Qi().meta({examples:[wa.Venue.name],description:"Venue name"}),teamId:Qi().meta({description:"Team that manages this venue"}),image:is.optional().meta({description:"Primary venue image"})}).optional().meta({description:"Present if this location is a managed venue on the platform"})}).meta({description:"Single location search result with optional venue overlay"}),mp=Vn({predictions:Bn(pp).meta({description:"Array of location predictions"})}).meta({description:"Response containing location search results"}),hp=Vn({location:Fl}),fp=er(["DRAFT","ACTIVE","PAUSED","RETIRED"]),yp=er(["ACTIVE","SUSPENDED","INACTIVE"]),gp=er(["PENDING","COMPLETED","DUPLICATE"]),vp=Vn({id:Qi().meta({description:"Membership program ID"}),teamId:Qi().meta({description:"Team that owns the program"}),name:Qi().meta({description:"Name shown to members",examples:["S.A.S.H Membership"]}),state:fp.meta({description:"Only an ACTIVE program can be bought. PAUSED and RETIRED programs keep honouring existing passes."}),price:En().int().nonnegative().meta({description:"Tax-inclusive annual price in currency minor units",examples:[14999]}),currency:Qi().length(3).meta({description:"ISO 4217 currency code",examples:["AUD"]}),termsUrl:an().meta({description:"Current membership terms the buyer must acknowledge"})}).meta({description:"An annual membership offer owned by a team"}),bp=Vn({id:Qi().meta({description:"Membership pass ID"}),programId:Qi(),teamId:Qi(),userId:Qi(),memberNumber:En().int().meta({description:"Sequential number identifying the pass within its program. The first pass receives 200.",examples:[200]}),state:yp,active:xn().meta({description:"True while the pass is ACTIVE and its paid term has not ended"}),paidThrough:Di().meta({description:"End of the latest paid annual term"}),cancelAt:Di().optional().meta({description:"Present when renewal is scheduled to stop. Benefits continue until paidThrough."}),complimentary:xn().meta({description:"True while the current term was granted by staff for free. It never renews; a paidThrough of MEMBERSHIP_NO_END means it has no end date."}),createdAt:Di()}).meta({description:"A durable membership owned by one user"}),wp=Vn({id:Qi().meta({description:"Membership purchase ID"}),programId:Qi(),teamId:Qi(),state:gp.meta({description:"PENDING until the provider confirms payment. DUPLICATE means a payment arrived for a user who already held an active pass and needs a manual refund."}),price:En().int().nonnegative(),currency:Qi().length(3),termsUrl:an(),expiresAt:Di().meta({description:"When the provider abandons an unpaid attempt"}),passId:Qi().optional()}).meta({description:"A checkout attempt for a membership program"}),$p=Vn({provider:ir("STRIPE"),clientSecret:Qi().meta({description:"Client secret that confirms the first invoice"}),stripeAccountId:Qi().meta({description:"Connected account the payment is taken on"})}).meta({description:"What the browser needs to collect the first payment"}),Ip=zn({programId:Qi().max(128)}),Ep=Vn({provider:ir("STRIPE"),stripeAccountId:Qi().meta({description:"Connected account the payment form must be loaded for"}),customerSessionClientSecret:Qi().optional().meta({description:"Lets the payment form show the buyer's saved cards. Absent when the provider declined to issue one."})}).meta({description:"What the payment form needs before the purchase starts"}),kp=zn({teamSlug:Qi().min(1).max(128).meta({description:"Slug of the team whose current program is wanted",examples:["sash"]})}),Tp=Vn({program:vp,payment:Vn({provider:ir("STRIPE"),stripeAccountId:Qi().meta({description:"Connected account the payment form must be loaded for"})}).optional().meta({description:"How the membership is paid for. Absent when the team cannot take membership payments right now."}),team:Vn({id:Qi(),slug:Qi(),name:Qi(),image:is.optional().meta({description:"The team's avatar, shown beside the program at checkout"})})}),Ap=zn({programId:Qi().max(128),termsAccepted:ir(!0).meta({description:"The buyer has acknowledged the program's current terms and the automatic annual renewal"})}),xp=Vn({purchase:wp,payment:$p}),Sp=zn({id:Qi().max(128)}),Dp=Vn({purchase:wp,pass:bp.optional()}),Cp=Vn({reason:er(["ALREADY_MEMBER","MEMBERSHIP_SUSPENDED","PROGRAM_NOT_ON_SALE","PAYMENT_UNAVAILABLE"])}),Op=zn({teamId:Qi().max(128).optional()}),Pp=Vn({passes:Bn(bp)}),Rp=bp.extend({member:Vn({firstName:Qi(),lastName:Qi(),email:Qi()}).optional().meta({description:"Absent when the user account no longer exists"})}).meta({description:"A membership pass with its owner, for staff"}),_p=zn({teamId:Qi().max(128),memberNumber:En().int().min(1).max(99999).meta({description:"The serial printed on the keyring being handed over. It becomes the member number.",examples:[42]}),email:tn().max(254).meta({description:"The member's email. Their existing account is used, or a new one is created that they sign in to with this email."}),firstName:Qi().trim().min(1).max(100),lastName:Qi().trim().min(1).max(100),endsAt:Di().nullable().meta({description:"When the free membership ends. Null for no end date. See defaultMembershipGrantEnd()."})}),Np=zn({teamId:Qi().max(128),memberNumber:En().int().min(1).max(99999)}),Up=Vn({status:er(["AVAILABLE","TAKEN","LAPSED","NO_KEYRING"]).meta({description:"AVAILABLE: free. TAKEN: a current or suspended member holds it. LAPSED: a lapsed member holds it, and only they can be given it again. NO_KEYRING: no imported keyring has this serial."})}),Mp=zn({eventId:Qi().max(128),fobId:Qi().regex(/^fob_[0-9a-z]{26}$/).meta({description:"The QR value scanned from the member's keyring"})}),Lp=Vn({memberNumber:En().int(),member:Vn({firstName:Qi(),lastName:Qi()}).optional().meta({description:"Absent when the user account no longer exists"})}),qp=Zn("status",[Lp.extend({status:ir("REDEEMED"),passId:Qi(),discount:Vn({kind:er(["AMOUNT","PERCENT"]),amount:En().int().meta({description:"Minor units for AMOUNT, whole percent for PERCENT"}),currency:Qi().optional()}),undoUntil:Di().meta({description:"The scanning staff member may undo until this moment"})}),Lp.extend({status:ir("ALREADY_USED"),source:er(["ONLINE","DOOR"]),pending:xn(),usedAt:Di().optional(),orderId:Qi().optional(),usedBy:Vn({firstName:Qi()}).optional().meta({description:"The staff member who scanned it, for a door use"})}),Lp.extend({status:ir("INACTIVE"),reason:er(["EXPIRED","SUSPENDED","ENDED"])}),Lp.extend({status:ir("NO_DISCOUNT")}),Vn({status:ir("NOT_A_MEMBER"),reason:er(["UNKNOWN_KEYRING","OTHER_TEAM","UNASSIGNED"])})]).meta({description:"What door staff are told about a scanned keyring"}),Gp=zn({eventId:Qi().max(128),passId:Qi().max(128)}),jp=zn({teamId:Qi().max(128),passId:Qi().max(128)}),Bp=Vn({reason:er(["ALREADY_MEMBER","MEMBERSHIP_SUSPENDED","NUMBER_TAKEN","MEMBER_NUMBER_MISMATCH","NO_KEYRING","NOT_COMPLIMENTARY"]),memberNumber:En().int().optional().meta({description:"The member number the account already holds, for ALREADY_MEMBER and MEMBER_NUMBER_MISMATCH"})}),Fp=zn({teamId:Qi().max(128),limit:cs("members"),cursor:Qi().max(768).optional().meta({description:"Pagination cursor from the previous response"})}),Vp=Us(Rp,"members").extend({program:vp.optional()}),zp=er(["PROCESSING","TICKETS_CANCELLED","CANCELLED"]),Wp=Qi().trim().min(1,"Enter a reason").max(500,"Reason must be 500 characters or fewer"),Yp=Vn({id:Ga,request:Vn({cancelOrder:xn().optional().meta({description:"Whether this request closes the order to further ticket issuance."}),idempotencyKey:Qi().meta({description:"Client key identifying the accepted cancellation request."}),ticketIds:Bn(Ba).optional().meta({description:"Original ticket selection for replaying the request. Omitted to select all tickets."})}).meta({description:"Original request identity and selection."}),ticketIds:Bn(Ba).meta({description:"Tickets selected for this cancellation operation."}),fullCancellation:xn().meta({description:"Whether the request selected all tickets. Closing the order is controlled separately by request.cancelOrder."}),reason:Wp.meta({description:"Reason shared with the buyer."}),actor:Vn({type:er(["USER","SYSTEM"]).meta({description:"Actor responsible for the cancellation."}),userId:qa.optional(),name:Qi().optional().meta({description:"Actor name captured when the cancellation was requested."})}),createdAt:Di().meta({description:"Time the cancellation request was accepted."}),completedAt:Di().optional().meta({description:"Time ticket cancellation completed."}),status:er(["PROCESSING","SUCCEEDED"]).meta({description:"Ticket cancellation progress, independent of email delivery."}),retryAction:er(["RESUME_CANCELLATION"]).optional().meta({description:"Replay the original request to complete unfinished cancellation work."}),notification:Vn({requested:xn().meta({description:"Whether staff requested a buyer email. Delivery is tracked by the shared notification service."})})}).meta({description:"Staff-only cancellation history, including notification preference."}),Hp=Vn({cancellation:Yp}),Zp=Vn({cancellations:Bn(Yp)}),Kp=Vn({id:Ga,reason:Wp.meta({description:"Reason shared with the buyer."}),ticketIds:Bn(Ba).meta({description:"Tickets affected by this cancellation."})}).meta({description:"Buyer-visible cancellation details."}),Jp=Vn({name:Qi().meta({examples:["tenant-web","team-web","api","partner"],description:"Free-form channel identifier describing where the order originated."}),referrer:Qi().optional().meta({examples:["https://sash.teams.mixmag.au/events/example-event"],description:"Optional referrer URL captured at order creation for redirect routing and attribution."}),utmSource:Qi().optional().meta({examples:["instagram"],description:"Optional UTM source captured from the originating URL."}),utmMedium:Qi().optional().meta({examples:["social"],description:"Optional UTM medium captured from the originating URL."}),utmCampaign:Qi().optional().meta({examples:["summer-launch"],description:"Optional UTM campaign captured from the originating URL."}),deviceType:er(["MOBILE","TABLET","DESKTOP"]).optional().meta({examples:["MOBILE"],description:"Optional analytics device classification captured at order creation."}),browser:Qi().optional().meta({examples:["Chrome"],description:"Optional analytics browser classification captured at order creation."}),country:Qi().optional().meta({examples:["Australia"],description:"Optional viewer country captured at order creation for analytics attribution."}),region:Qi().optional().meta({examples:["Australia - New South Wales"],description:"Optional viewer region captured at order creation for analytics attribution."}),sessionId:Qi().optional().meta({examples:["ses_01HX..."],description:"Session ID captured at order creation for client/server analytics linking."}),anonymousId:Qi().optional().meta({examples:["aid_01HX..."],description:"Browser anonymous ID captured at order creation for attribution linking."})}),Qp=Vn({id:Qi().meta({examples:[wa.CouponCode.id],description:"Unique identifier of the coupon code used in the order"}),name:Qi().meta({examples:[wa.CouponCode.name],description:"The coupon code string that was entered by the customer"}),couponId:Qi().meta({examples:[wa.CouponCode.couponId],description:"Unique identifier of the parent coupon configuration"})}),Xp=Vn({id:Qi().meta({examples:[wa.Customer.id],description:"Unique identifier of the customer who placed the order"}),firstName:Qi().meta({examples:[wa.Customer.firstName],description:"First name of the customer"}),lastName:Qi().meta({examples:[wa.Customer.lastName],description:"Last name of the customer"}),email:tn().meta({examples:[wa.Customer.email],description:"Email address of the customer"}),phone:Qi().meta({examples:[wa.Customer.phone],description:"Customer phone number in E.164 format for SMS delivery"}).optional()}),em=Vn({id:Qi().meta({examples:[wa.Event.id],description:"Unique identifier of the event associated with the order"}),name:Qi().meta({examples:[wa.Event.name],description:"Display name of the event"}),slug:Qi().meta({examples:[wa.Event.slug],description:"URL-friendly slug of the event"}),location:Qi().meta({examples:[wa.Event.location.name],description:"Name of the venue or location where the event takes place"}).optional(),locationAddress:Qi().optional().meta({examples:[wa.Event.location.address],description:"Full venue address, available once the event location is revealed."}),locationLatitude:En().optional().meta({examples:[wa.Event.location.latitude],description:"Venue latitude, available once the event location is revealed."}),locationLongitude:En().optional().meta({examples:[wa.Event.location.longitude],description:"Venue longitude, available once the event location is revealed."}),entryInstructions:Qi().max(2e3).optional().meta({description:"Latest entry instructions for customers once the event location is revealed."})}),tm=er(["GATEWAY","SHIPPING","SMS_DELIVERY"]).meta({description:"Type of fee applied to an order"}),im=Vn({id:Qi().meta({examples:[wa.OrderFee.id],description:"Unique identifier for this order fee"}),createdAt:Di().readonly().meta({examples:[wa.OrderFee.createdAt],description:"Timestamp in ISO 8601 format when this fee was created"}),reason:Qi().meta({examples:[wa.OrderFee.reason],description:"Description explaining why this fee was applied to the order"}),amount:En().finite("Amount must be a valid number").meta({examples:[wa.OrderFee.amount],description:"Fee amount in cents (positive value indicates charge to customer, negative value indicates credit or discount)"}),currency:Aa.meta({examples:[wa.OrderFee.currency],description:"Currency code in ISO 4217 format"}),requestId:Qi().meta({examples:[wa.OrderFee.requestId],description:"External payment processor request identifier for tracking this fee"}),kind:tm.optional().meta({examples:["GATEWAY"],description:"Type of fee for categorization and reporting"})}),nm=Vn({net:Tn().min(0).meta({examples:[wa.OrderItem.price.net],description:"Total amount to pay to promoter in cents.\nCalculated as: total - booking - refunded"}),total:Tn().min(0).meta({examples:[wa.OrderItem.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross - discount"}),gross:Tn().min(0).meta({examples:[wa.OrderItem.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + tax added to the entered price + booking"}),base:Tn().min(0).meta({examples:[wa.OrderItem.price.base],description:"Total ticket price in cents"}),booking:Tn().min(0).meta({examples:[wa.OrderItem.price.booking],description:"Total booking fees in cents (non-refundable)"}),tax:Tn().min(0).optional().meta({description:"Ticket tax component in cents. Informational when already included in the entered price and included in total when added to it."}),refunded:Tn().max(0).meta({examples:[wa.OrderItem.price.refunded],description:"Total amount refunded in cents"}),discount:Tn().max(0).meta({examples:[wa.OrderItem.price.discount],description:"Total amount discounted in cents"}),currency:Aa.meta({examples:[wa.OrderItem.price.currency],description:"Currency code in ISO 4217 format."})}),rm={taxableAmount:Tn().min(0).meta({description:"Amount excluding collected tax, in minor currency units"}),amount:Tn().min(0).meta({description:"Collected tax amount in minor currency units"}),grossAmount:Tn().min(0).meta({description:"Amount including collected tax, in minor currency units"})};function om(e){return e.grossAmount===e.taxableAmount+e.amount}Vn(rm).refine(om,{message:"Gross amount must equal taxable amount plus tax amount",path:["grossAmount"]});const am=Vn({...rm,settings:gu.meta({description:"Event tax settings snapshot used for this order item"})}).refine(om,{message:"Gross amount must equal taxable amount plus tax amount",path:["grossAmount"]}).meta({description:"Immutable ticket tax snapshot and calculated amount"}),sm=Vn({supplierLegalName:Qi().trim().min(1).meta({description:"Legal entity supplying the platform booking service"}),registrationLabel:Qi().trim().min(1).max(50).optional().meta({description:"Label for the platform supplier registration number"}),registrationNumber:Qi().trim().min(1).max(100).meta({description:"Platform supplier tax or business registration number"}),taxName:Qi().trim().min(1).max(50).meta({description:"Customer-facing tax name for the platform booking fee"}),ratePpm:Tn().min(1).max(lu).meta({description:"Platform fee tax rate in parts per million"}),priceMode:ir("INCLUSIVE").meta({description:"Platform booking fees are displayed inclusive of tax"})}).strict().meta({description:"Platform booking fee tax settings snapshot"}),dm=Vn({ticket:gu.optional().meta({description:"Ticket supplier tax settings used for this order"}),platformFee:sm.optional().meta({description:"Platform booking fee tax settings used for this order"})}).strict().refine((e=>void 0!==e.ticket||void 0!==e.platformFee),{message:"Include at least one tax settings snapshot"}).meta({description:"Immutable supplier tax settings used by the order"}),cm=er(["ADMISSION","ADDON"]),lm=Vn({id:Qi().meta({examples:[wa.OrderItem.id],description:"Unique identifier for this order item"}),kind:cm.meta({examples:[wa.OrderItem.kind],description:"Type of item: ADMISSION for tickets, ADDON for additional products or services"}),quantity:Tn().min(1).meta({examples:[wa.OrderItem.quantity],description:"Number of items purchased (minimum 1)"}),admissionId:Qi().optional().meta({examples:[wa.OrderItem.admissionId],description:"Unique identifier of the admission ticket type, required for ADMISSION items"}),sectionId:Qi().optional().meta({examples:[wa.OrderItem.sectionId],description:"Unique identifier of the venue section for this admission"}),admission:Os.optional().meta({examples:[wa.Admission],description:"Complete admission details captured at time of purchase. This is a snapshot that preserves the exact ticket type information as it was when the order was placed"}),section:Wl.optional().meta({examples:[wa.Section],description:"Complete section details captured at time of purchase. This is a snapshot that preserves the exact venue area or category information as it was when the order was placed"}),price:nm.meta({description:"Pricing breakdown for this order item including all fees and discounts"}),tax:am.optional().meta({description:"Tax settings and amount fixed when this item was priced"})}),um=lm.superRefine(((e,t)=>{void 0!==e.price.tax==(void 0!==e.tax)?e.tax&&e.price.tax!==e.tax.amount&&t.addIssue({code:"custom",message:"Price tax must equal the item tax amount",path:["price","tax"]}):t.addIssue({code:"custom",message:"Price tax and item tax snapshot must be provided together",path:["price","tax"]})})),pm=Vn({promoter:xn(),tenant:xn()}),mm=er(["SMS_DELIVERY"]).meta({description:"Type of pre-computed offer available for this order"}),hm=Vn({amount:Tn().min(0).meta({examples:[200],description:"Offer price in the smallest currency unit (e.g. cents)"}),currency:Aa.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code"})}),fm=Vn({kind:mm.meta({examples:["SMS_DELIVERY"],description:"Discriminator identifying the type of offer"}),label:Qi().meta({examples:["SMS ticket delivery"],description:"Human-readable label for the offer"}),price:hm.meta({description:"Pre-computed price for this offer"})}),ym=er(["FREE","AIRWALLEX","STRIPE"]),gm=er(["AMERICAN_EXPRESS","CARTES_BANCAIRES","CHINA_UNION_PAY","DINERS_CLUB_INTERNATIONAL","DISCOVER","EFTPOS_AUSTRALIA","INTERAC","JCB","LINK","MAESTRO","MASTERCARD","OTHER","UNKNOWN","UNION_PAY","VISA"]),vm=er("ACH_DIRECT_DEBIT.ACSS_DEBIT.AFFIRM.AFTERPAY.ALFAMART.ALIPAY.ALIPAYCN.ALIPAYHK.ALMA.AMEX_EXPRESS_CHECKOUT.AMAZON_PAY.APPLEPAY.ATOME.BACS_DIRECT_DEBIT.BANCONTACT.BANK_TRANSFER.BECS_DIRECT_DEBIT.BILLIE.BITPAY.BLIK.BOLETO.BOOST.CARD.CARD_PRESENT.CASHAPP.CRYPTO.CUSTOM.CUSTOMER_BALANCE.DANA.DOKU_EWALLET.DRAGONPAY.DUIT_NOW.EFT_DIRECT_DEBIT.EPS.ESUN.FAMILY_MART.FPX.FPS.GCASH.GIROPAY.GOOGLEPAY.GO_PAY.GRABPAY.HI_LIFE.IDEAL.INDOMARET.INTERAC_PRESENT.JENIUS_PAY.KAKAOPAY.KLARNA.KONBINI.KOREAN_LOCAL_CARD.LINK.LINKAJA.MASTERPASS.MAXIMA.MB_WAY.MOBILEPAY.MULTIBANCO.MYBANK.NARVESEN.NAVER_PAY.NZ_BANK_ACCOUNT.ONLINE_BANKING.OVO.OXXO.P24.PAYBYBANKAPP.PAYCO.PAYEASY.PAYPAL.PAYPAY.PAYSAFECASH.PAYSAFECARD.PAYSERA.PAY_NOW.PERLAS_TERMINALS.PIX.PROMPTPAY.RABBIT_LINE_PAY.REVOLUT_PAY.SAMSUNG_PAY.SATISPAY.SEPA_DIRECT_DEBIT.SEVEN_ELEVEN.SHOPEE_PAY.SKRILL.SOFORT.SWISH.TNG.TOSS_PAY.TRUEMONEY.TRUSTLY.TWINT.VERKKOPANKKI.VISA_CHECKOUT.WECHATPAY.ZIP".split(".")),bm=Vn({method:ym.meta({examples:["FREE"],description:"Payment gateway used to process this order: FREE for no-cost orders, AIRWALLEX or STRIPE for paid orders"}),source:vm.optional().meta({examples:["APPLEPAY","GOOGLEPAY","CARD"],description:"Payment method used by the customer such as ApplePay, GooglePay, or card-based payments"}),brand:gm.optional().meta({examples:["VISA","MASTERCARD","AMERICAN_EXPRESS"],description:"Card brand when source is CARD (Visa, Mastercard, American Express, etc.)"}),last4:Qi().optional().meta({examples:["4242"],description:"Last 4 digits of the card number when source is CARD"}),stripeId:Qi().optional().meta({examples:["pi_1234567890abcdef"],description:"Stripe payment intent identifier when using Stripe gateway"}),stripeClientSecret:Qi().optional().meta({examples:["pi_1234567890abcdef_secret_xyz"],description:"Stripe PaymentIntent client secret associated with the order, used to complete the payment flow"}),stripeCustomerSessionClientSecret:Qi().optional().meta({examples:["cuss_1234567890abcdef_secret_xyz"],description:"Stripe CustomerSession client secret used by the Payment Element to offer and redisplay saved payment methods"}),stripeAccountId:Qi().optional().meta({examples:["acct_1234567890abcdef"],description:"Connected Stripe account ID for direct charges. When present, payment is processed directly on the connected account rather than the platform account."}),airwallexId:Qi().optional().meta({examples:["int_hkdmr7v9rg1j8donpkmv96"],description:"Airwallex payment intent identifier when using Airwallex gateway"}),airwallexClientSecret:Qi().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiaW50ZW50X2lkIjoiaW50X2hrZG1yN3Y5cmcxajhkb25wa212OTYifQ.K8vLx2nPzQHdR5mT1wYcBfJkLmNpS3xG7aE9dH4qZvM"],description:"Airwallex client secret used to authenticate requests for payment initialization"}),airwallexCustomerId:Qi().optional().meta({examples:["cus_hkdmrhkh8he4j3kvela"],description:"Airwallex customer ID attached to the PaymentIntent for saved cards functionality"}),airwallexCustomerClientSecret:Qi().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiY3VzdG9tZXJfaWQiOiJjdXNfaGtkbXJoa2g4aGU0ajNrdmVsYSJ9.abc123"],description:"Airwallex customer client secret for accessing saved payment methods in the Drop-in Element"})}),wm=Vn({total:Tn().meta({description:"Customer refunds in settlement minor units, negative for refunds."}),items:Tn().meta({description:"Refunded ticket and product principal, negative for refunds."}),shipping:Tn().meta({description:"Refunded shipping, negative for refunds."}),fees:Tn().meta({description:"Refunded customer fees, reported separately from organiser principal."}),count:Tn().nonnegative().meta({description:"Successful refunds included at the accounting cutoff."}),tickets:Tn().nonnegative().meta({description:"Tickets cancelled by the included successful refunds."})}),$m=Vn({refundBreakdown:wm.optional().meta({description:"Refund components at the settlement cutoff. Absent on legacy prices."}),net:Tn().meta({examples:[wa.Order.price.net],description:"Total amount to pay to promoter in cents.\nTicket and shipping revenue after organiser-funded refunds and disputes, excluding booking and SMS fees."}),total:Tn().meta({examples:[wa.Order.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross + discount + sms"}),gross:Tn().min(0).meta({examples:[wa.Order.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + tax added to entered prices + booking + shipping"}),base:Tn().min(0).meta({examples:[wa.Order.price.base],description:"Total ticket price in cents"}),booking:Tn().min(0).meta({examples:[wa.Order.price.booking],description:"Total booking fees in cents (non-refundable)"}),tax:Tn().min(0).optional().meta({description:"Total ticket tax component in cents. This excludes tax contained in platform booking fees."}),shipping:Tn().min(0).meta({examples:[wa.Order.price.shipping],description:"Total shipping amount in cents"}),sms:Tn().min(0).default(0).meta({examples:[wa.Order.price.sms],description:"SMS delivery fee in cents (customer-facing price in event currency)"}),refunded:Tn().max(0).meta({examples:[wa.Order.price.refunded],description:"Total amount refunded in cents (negative value)"}),discount:Tn().max(0).meta({examples:[wa.Order.price.discount],description:"Total amount discounted in cents (negative value)"}),gateway:Tn().max(0).meta({examples:[wa.Order.price.gateway],description:"Total absorbed payment gateway fees in cents (negative value)"}),dispute:Tn().max(0).meta({examples:[wa.Order.price.dispute],description:"Total non-absorbed payment gateway fees in cents (negative value)"}),currency:Aa.meta({examples:[wa.Order.price.currency],description:"Currency code in ISO 4217 format"})}),Im=er(["PENDING","PROCESSING","SUCCEEDED","FAILED"]),Em=er(["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED","OTHER"]),km=er(["USER","GATEWAY","SYSTEM"]),Tm=Vn({orderItemId:Qi().meta({examples:[wa.OrderRefundItem.orderItemId],description:"Identifier of the order item being refunded"}),quantity:Tn().min(1).meta({examples:[wa.OrderRefundItem.quantity],description:"Number of units refunded for this item"}),amount:Tn().min(0).meta({examples:[wa.OrderRefundItem.amount],description:"Refund amount for this item in cents, after discounts, including any exclusive ticket tax and excluding booking fees"}),taxAmount:Tn().min(0).optional().meta({description:"Ticket tax component reversed by this refund item"}),ticketIds:Bn(Qi()).meta({examples:[wa.OrderRefundItem.ticketIds],description:"Specific ticket identifiers that were refunded (selected via FIFO)"})}),Am=Vn({idempotencyKey:Qi().optional().meta({examples:[wa.OrderRefund.request.idempotencyKey],description:"Client-provided key to prevent duplicate refund processing"})}),xm=Vn({currency:Qi().meta({examples:["AUD"],description:"Currency used for all refund amounts"}),total:Tn().min(1).meta({examples:[wa.OrderRefund.price.total],description:"Total refund amount in cents, including ticket, shipping, and fee portions."}),items:Tn().min(0).meta({examples:[wa.OrderRefund.price.items],description:"Ticket item portion of the refund in cents"}),shipping:Tn().min(0).meta({examples:[wa.OrderRefund.price.shipping],description:"Shipping portion of the refund in cents"}),fees:Tn().min(0).meta({examples:[wa.OrderRefund.price.fees],description:"Fee portion of the refund in cents"}),tax:Tn().min(0).optional().meta({description:"Ticket tax component reversed by this refund"})}),Sm=Vn({cancelRequested:xn().meta({examples:[wa.OrderRefund.tickets.cancelRequested],description:"Whether ticket cancellation was requested for the refund"}),cancelled:xn().meta({examples:[wa.OrderRefund.tickets.cancelled],description:"Whether tickets were cancelled as part of this refund"}),cancelledCount:Tn().min(0).meta({examples:[wa.OrderRefund.tickets.cancelledCount],description:"Number of tickets that were cancelled"})}),Dm=Vn({provider:ym.meta({examples:["STRIPE","AIRWALLEX"],description:"Payment gateway used to process the refund"}),refundId:Qi().optional().meta({examples:[wa.OrderRefund.gateway.refundId],description:"Refund identifier from the payment gateway"}),idempotencyKey:Qi().optional().meta({examples:[wa.OrderRefund.gateway.idempotencyKey],description:"Idempotency key sent to the payment gateway"})}),Cm=Vn({type:km.meta({examples:["USER","GATEWAY"],description:"Who initiated the refund"}),userId:Qi().optional().meta({examples:[wa.OrderRefund.actor.userId],description:"Identifier of the user who initiated the refund"})}),Om=Vn({requested:xn().meta({examples:[wa.OrderRefund.notification.requested],description:"Whether a customer refund confirmation email was requested."}),sentAt:Di().optional().meta({examples:[wa.OrderRefund.notification.sentAt],description:"Timestamp when the refund confirmation email was sent."})}),Pm=Vn({reason:Qi().meta({examples:["Insufficient funds for refund"],description:"Gateway or system failure reason"}),message:Qi().optional().meta({examples:["The refund could not be processed."],description:"User-facing failure message when available"})}),Rm=Vn({id:Qi().meta({examples:[wa.OrderRefund.id],description:"Unique identifier for this refund"}),request:Am.optional().meta({description:"Request metadata supplied by Sessions or API callers"}),status:Im.meta({examples:["PENDING","SUCCEEDED"],description:"Current processing status. PENDING: awaiting gateway confirmation or async processing (e.g., bank transfers). PROCESSING: gateway confirmed, ticket cancellation in progress. SUCCEEDED/FAILED: terminal states."}),acceptedAt:Di().optional().meta({examples:[wa.OrderRefund.acceptedAt],description:"Timestamp when the payment gateway accepted the refund"}),failedAt:Di().optional().meta({examples:[wa.OrderRefund.failedAt],description:"Timestamp when the refund failed"}),failure:Pm.optional().meta({description:"Failure details when the refund failed"}),price:xm.meta({description:"Refund amount breakdown"}),reason:Em.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund used for analytics"}),note:Qi().optional().meta({examples:[wa.OrderRefund.note],description:"Free-form notes explaining the refund"}),items:Bn(Tm).meta({description:"Line items included in this refund with quantities and amounts"}),tickets:Sm.meta({description:"Ticket cancellation state for the refund"}),gateway:Dm.meta({description:"Gateway refund identifiers"}),actor:Cm.meta({description:"Refund initiator"}),metadata:Qn(Qi(),Qi()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"}),notification:Om.meta({description:"Refund confirmation notification state"}),createdAt:Di().meta({examples:[wa.OrderRefund.createdAt],description:"Timestamp when the refund was created"})}),_m=$m.extend({exchangeRate:En().meta({examples:[1.4],description:"Conversion rate applied from the original payment currency to the settlement currency. 1.0 when both currencies are the same"})}).meta({description:"Settled price breakdown in the payout currency. All amounts from the original order price are converted using the exchange rate. For same-currency orders the values match the order price with an exchange rate of 1.0",examples:[{base:14e3,booking:700,shipping:0,sms:0,discount:0,refunded:0,gateway:0,dispute:0,gross:14700,total:14700,net:14e3,currency:"AUD",exchangeRate:1.4}]});function Nm(e,t,i={}){return Vn({id:Qi().meta({examples:t.idExamples,description:t.idDescription}),createdAt:Di().readonly().meta({examples:t.createdAtExamples,description:"Timestamp in ISO 8601 format when this timeline entry was created"}),...i,kind:e.meta({examples:t.kindExamples,description:t.kindDescription}),editable:xn().meta({examples:[!1],description:"Whether this timeline entry can be edited by users"}),pinned:xn().meta({examples:[!1],description:"Whether this timeline entry is pinned to the top of the timeline"}),description:Qi().meta({examples:t.descriptionExamples,description:"Human-readable description of what happened in this timeline event"}),author:Qi().meta({examples:["System"],description:"Name of the user or system that created this timeline entry"}),userId:Qi().optional().meta({examples:[wa.User.id],description:t.userIdDescription??"Identifier of the user who created this timeline entry, when available"}),externalId:Qi().optional().meta({examples:t.externalIdExamples,description:t.externalIdDescription})})}const Um=Nm(er("ORDER_STATUS_UPDATED.ORDER_EXPIRED.ORDER_COMPLETED.PAYMENT_INITIATED.PAYMENT_PROCESSING.PAYMENT_FAILED.PAYMENT_SUCCEEDED.REFUND_INITIATED.REFUND_PROCESSING.REFUND_SUCCEEDED.REFUND_SETTLED.REFUND_FAILED.CHARGEBACK_INITIATED.CHARGEBACK_EVIDENCE_SUBMITTED.CHARGEBACK_WON.CHARGEBACK_LOST.CHARGEBACK_FUNDS_WITHDRAWN.TICKETS_GENERATED.TICKET_ADDED.TICKETS_SCANNED.TICKET_EDITED.TICKET_STATUS_CHANGED.EMAIL_SENT.EMAIL_DELIVERED.EMAIL_OPENED.EMAIL_BOUNCED.EMAIL_COMPLAINED.EMAIL_FAILED.SMS_SENT.SMS_DELIVERED.SMS_FAILED.NOTE".split(".")),{createdAtExamples:[wa.Order.createdAt],descriptionExamples:["Order was created successfully"],externalIdDescription:"External idempotency key for deduplication (e.g., SES messageId + eventType)",externalIdExamples:["ses:01234567-89ab-cdef-0123-456789abcdef:Delivery"],idDescription:"Unique identifier of the timeline entry",idExamples:[wa.Timeline.id],kindDescription:"Type of timeline event (ORDER_COMPLETED, PAYMENT_SUCCEEDED, REFUND_INITIATED, etc.)",kindExamples:["ORDER_COMPLETED"],userIdDescription:"Identifier of the user who created this timeline entry, when available."},{status:Qi().optional().meta({examples:["SUCCESSFUL"],description:"Order status associated with this timeline entry, when applicable."})}),Mm=er(["PENDING","PROCESSING","SUCCESSFUL","DISPUTED","ABANDONED"]),Lm=Vn({id:ja.readonly().meta({examples:[wa.Order.id],description:"A unique identifier for this order."}),createdAt:Di().readonly().meta({examples:[wa.Order.createdAt],description:"Timestamp in ISO 8601 format when this order was created."}),updatedAt:Di().readonly().meta({examples:[wa.Order.updatedAt],description:"Timestamp in ISO 8601 format when this order was last updated."}),status:Mm.meta({examples:["PENDING"],description:"Current payment lifecycle status. PENDING: awaiting payment. PROCESSING: payment in progress. SUCCESSFUL: payment confirmed. DISPUTED: chargeback filed. ABANDONED: expired or cancelled."}),cancellationStatus:zp.optional().meta({description:"Ticket cancellation state, independent of payment status."}),cancellations:Bn(Kp).optional().meta({description:"Buyer-visible reasons and affected tickets. Available on order detail responses."}),payment:bm.optional().meta({description:"Payment gateway details including method, card brand, and transaction identifiers. Absent for free orders."}),items:Bn(um).meta({description:"Line items in this order, each with a ticket type, quantity, and price breakdown."}),fees:Bn(im).meta({description:"Gateway fees recorded against this order from settlement processing (e.g. payment processing fees, dispute fees)."}),price:$m.meta({description:"Price breakdown in the event currency. This reflects what the customer was charged."}),tax:dm.optional().meta({description:"Immutable ticket and platform fee tax settings used to calculate this order"}),settlement:_m.optional().meta({description:"Price breakdown in the payout currency with the exchange rate applied. When the event currency differs from the settlement currency, all amounts are converted. For same-currency orders the values match the order price with an exchange rate of 1.0."}),couponCode:Qp.optional().meta({description:"Coupon code applied to this order for discount calculation."}),customer:Xp.optional().meta({description:"Customer who placed this order. Absent for guest checkouts before customer details are captured."}),marketingConsent:pm.optional().meta({description:"Marketing opt-in choices captured during checkout."}),timeline:Bn(Um).optional().meta({description:"Chronological audit trail of events for this order (payments, refunds, emails, scans)."}),refunds:Bn(Rm).default([]).meta({description:"Refunds processed for this order including pending, succeeded, and failed attempts."}),offers:Bn(fm).default([]).meta({description:"Pre-computed add-on offers available during checkout (e.g. SMS ticket delivery)."}),customerId:Va.optional().meta({examples:[wa.Customer.id],description:"Identifier of the customer who placed this order."}),createdBy:Xp.optional().meta({description:"Admin user who created this order on behalf of the customer."}),teamId:Ra.meta({description:"Team that owns this order."}),promoterId:Fa.meta({examples:[wa.Promoter.id],description:"Promoter managing this order."}),event:em.meta({description:"Snapshot of the event at time of purchase (name, slug, location)."}),payoutIds:Bn(Ya.meta({examples:["pay_01HQXYZ"],description:"Payout identifier."})).meta({description:"Payout identifiers for settlements that included this order."}),eventId:Ua.meta({examples:[wa.Event.id],description:"Identifier of the event this order belongs to."}),checkoutUrl:Qi().optional().readonly().meta({examples:["https://example.com/checkout/ord_1234567890"],description:"Derived checkout URL where the customer can complete payment for this order."}),returnUrl:Qi().optional().meta({examples:["/orders"],description:"Frozen registered confirmation URL, tenant return, or approved native return. External web selection requires returnDestinationKey."}),returnDestinationKey:Qi().optional(),channel:Jp.optional().meta({description:"Channel metadata captured at order creation to identify origin and redirect context."}),reservedAt:Di().optional().meta({examples:[(new Date).toISOString()],description:"Timestamp when inventory was reserved for this order. Used for checkout countdown timer."})}).meta({description:"A customer order for event tickets. Tracks the full lifecycle from checkout through payment, settlement, and payout."}),qm=Vn({id:Qi().meta({examples:[wa.Admission.id],description:"Admission ID reference"}),name:Qi().meta({examples:["VIP Access","General Admission","Early Bird"],description:"Admission type name at time of purchase"}),price:Vn({base:En().meta({description:"Base price in smallest currency unit (cents)"}),booking:En().meta({description:"Booking fee in smallest currency unit (cents)"}),currency:Qi().meta({examples:["USD","EUR","GBP"],description:"ISO 4217 currency code"})}).meta({description:"Price snapshot at time of purchase"}),entryStartsAt:ds.meta({description:"Wall clock time when ticket holder can enter (no timezone, displays same everywhere)"}),entryEndsAt:ds.meta({description:"Wall clock time when entry period ends (no timezone, displays same everywhere)"})}).meta({description:"Admission details for this ticket"}),Gm=Vn({firstName:Qi().trim().min(1).meta({examples:[wa.Customer.firstName],description:"First name of the ticket attendee"}),lastName:Qi().trim().min(1).meta({examples:[wa.Customer.lastName],description:"Last name of the ticket attendee"}),email:tn().meta({examples:[wa.Customer.email],description:"Email address of the ticket attendee"}),phone:Qi().meta({examples:[wa.Customer.phone],description:"Phone number of the ticket attendee (optional)"}).optional()}).meta({description:"Attendee information for a ticket - can be edited by tenant admins. Defaults to the order customer details when ticket is created."}),jm=Vn({id:Qi().meta({examples:[wa.Event.id],description:"Event ID reference"}),name:Qi().meta({examples:[wa.Event.name],description:"The title of the event shown to attendees"}),slug:Qi().meta({examples:[wa.Event.slug],description:"URL-friendly identifier for the event"}),location:Bl.meta({description:"Structured location details for the event"}),entryStartsAt:ds.meta({examples:[wa.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:ds.meta({examples:[wa.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),images:Vn({mobile:is.meta({description:"Mobile-optimized image for the event"}),desktop:is.meta({description:"Desktop-optimized image for the event"})})}).meta({description:"Event details for this ticket"}),Bm=Vn({id:Qi().meta({examples:[wa.User.id],description:"Unique identifier of the user who performed the ticket scan"}),firstName:Qi().meta({examples:[wa.User.firstName],description:"First name of the user who performed the scan"}),lastName:Qi().meta({examples:[wa.User.lastName],description:"Last name of the user who performed the scan"}),email:tn().meta({examples:[wa.User.email],description:"Email address of the user who performed the scan"})}).meta({description:"Information about the user who scanned a ticket"}),Fm=er(["CHECK_IN","CHECK_OUT"]),Vm=Vn({id:Qi().meta({examples:[wa.TicketScan.id],description:"Unique identifier of the ticket scan record"}),scannedAt:Di().readonly().meta({examples:[wa.TicketScan.scannedAt],description:"Timestamp when the ticket was scanned in ISO 8601 format"}),scannedById:Qi().meta({examples:[wa.TicketScan.scannedById],description:"Unique identifier of the user who performed the scan"}),scannedBy:Bm.meta({description:"Detailed information about the user who performed the scan"}),deviceId:Qi().meta({examples:[wa.TicketScan.deviceId],description:"Unique identifier of the device used for scanning"}),kind:Fm.meta({examples:["CHECK_IN"],description:"Type of scan operation: CHECK_IN for entry, CHECK_OUT for exit"})}).meta({description:"Record of a ticket scan operation including when, who, and what type of scan"}),zm=Vn({id:Qi().meta({examples:[wa.Section.id],description:"Section ID reference"}),name:Qi().meta({examples:["Floor Section A","Balcony Left","VIP Lounge"],description:"Section name at time of purchase"}),location:Vn({name:Qi().meta({description:"Venue or location name"}),address:Qi().optional().meta({description:"Street address"}),city:Qi().optional().meta({description:"City name"}),state:Qi().optional().meta({description:"State or province"}),postcode:Qi().optional().meta({description:"Postal/ZIP code"}),country:Qi().optional().meta({description:"ISO country code"}),latitude:En().optional().meta({description:"Geographic latitude coordinate"}),longitude:En().optional().meta({description:"Geographic longitude coordinate"}),timeZone:Qi().optional().meta({examples:["America/New_York","Europe/London"],description:"IANA timezone identifier"})}).meta({description:"Physical location details"})}).meta({description:"Section details for this ticket"}),Wm=er(["ACTIVE","REDEEMED","CANCELLED"]),Ym=Vn({id:Qi().readonly().meta({examples:[wa.Ticket.id],description:"Unique identifier for the ticket"}),qrValue:an().optional().meta({description:"Signed QR payload. Private to authorized ticket readers."}),createdAt:Di().readonly().meta({examples:[wa.Ticket.createdAt],description:"Timestamp when the ticket was created in ISO 8601 format"}),updatedAt:Di().readonly().meta({examples:[wa.Ticket.updatedAt],description:"Timestamp when the ticket was last updated in ISO 8601 format"}),scans:Bn(Vm).meta({description:"Array of all scan records for this ticket (check-ins and check-outs)"}),status:Wm.meta({examples:["ACTIVE"],description:"Current status of the ticket: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),attendee:Gm.meta({description:"Attendee information for this ticket - editable by tenant admins"}),customerId:Va.meta({examples:[wa.Ticket.customerId],description:"Unique identifier of the customer who purchased this ticket (read-only)"}),eventId:Ua.meta({examples:[wa.Ticket.eventId],description:"Unique identifier of the event this ticket grants access to"}),event:jm.meta({description:"Event details for this ticket"}),admissionId:za.meta({examples:[wa.Ticket.admissionId],description:"Unique identifier of the admission type/tier this ticket represents"}),admission:qm.meta({description:"Admission details for this ticket"}),section:zm.optional().meta({description:"Section details for this ticket (if assigned to a section)"}),orderId:ja.meta({examples:[wa.Ticket.orderId],description:"Unique identifier of the order this ticket was purchased in"}),orderItemId:Qi().meta({examples:[wa.Ticket.orderItemId],description:"Unique identifier of the specific order item this ticket represents"}).optional(),teamId:Ra.meta({examples:[wa.Ticket.teamId],description:"Identifier of the team that owns this ticket"}),promoterId:Fa.meta({examples:[wa.Ticket.promoterId],description:"Unique identifier of the promoter/organizer who created this event"})}).meta({description:"A ticket represents a customer's admission to an event. It tracks the purchase, scanning history, and current status."}),Hm=Vn({id:Qi().meta({examples:[wa.Order.id],description:"Unique identifier of the order to retrieve"}),signature:Ts.optional().meta({description:"HMAC signature for public order access (16 characters, base64url encoded)"})}),Zm=Hm.required().extend({cursor:Qi().max(4096).optional().meta({description:"Opaque cursor from the previous page of tickets."})}).strict().meta({description:"Signed request for an order's confirmation and its QR tickets."}),Km=Vn({expectedTicketCount:En().int().nonnegative().meta({description:"Total tickets this order will have once issuing completes, across all pages."}),order:Lm.pick({id:!0,status:!0,event:!0,createdAt:!0,items:!0,price:!0,returnDestinationKey:!0,returnUrl:!0}).extend({refunds:Bn(Rm.pick({id:!0,status:!0,price:!0,createdAt:!0}))}),tickets:Bn(Ym.pick({id:!0,status:!0,admission:!0}).extend({qrValue:an().meta({description:"Signed QR payload. Private to the ticket holder."})})),nextCursor:Qi().optional().meta({description:"Cursor for the next page of tickets. Omitted on the last."})}).meta({description:"An order's confirmation with its issued QR tickets and refund history."}),Jm=Lm.pick({id:!0,createdAt:!0,status:!0}).extend({price:Lm.shape.price.pick({total:!0,currency:!0,refunded:!0}),event:Lm.shape.event.pick({id:!0,name:!0,slug:!0})}).meta({description:"One purchase in the current buyer's history for the website's account Team."}),Qm=zn({cursor:Qi().max(16384).optional().meta({description:"Opaque cursor from the previous page."}),limit:En().int().min(1).max(25).default(20).meta({description:"Maximum purchases to return."})}).meta({description:"Page request for the current buyer's purchases."}),Xm=Vn({teamId:Ra,orders:Bn(Jm),nextCursor:Qi().optional().meta({description:"Cursor for the next page. Omitted on the last page."})}).meta({description:"A page of the current buyer's purchases for the website's account Team."}),eh=zn({id:ja,cursor:Qi().max(16384).optional().meta({description:"Opaque cursor from the purchase list."})}).meta({description:"Reference to one of the current buyer's purchases."}),th=Km.extend({teamId:Ra,order:Jm.extend({event:Lm.shape.event,items:Lm.shape.items,refunds:Km.shape.order.shape.refunds})}).meta({description:"Full detail for one purchase the current buyer owns."}),ih=eh.omit({cursor:!0}).extend({ticketId:Ba,provider:er(["apple","google"]).meta({description:"Wallet provider the pass is requested for."})}).meta({description:"Request for a wallet pass on a purchase the buyer owns."}),nh=Zn("provider",[Vn({teamId:Ra,provider:ir("apple"),data:Qi().max(4e6).meta({description:"Base64-encoded Apple Wallet pass. Do not cache or log."})}),Vn({teamId:Ra,provider:ir("google"),url:an().meta({description:"Validated Google Wallet save URL."})})]).meta({description:"An approved wallet pass, returned only to the buyer who owns the ticket."}),rh=Vn({id:Qi().meta({examples:[wa.Order.id],description:"Unique identifier of the order to add a note to"}),note:Qi().min(1).max(1e3).meta({examples:["Customer requested special seating arrangements"],description:"Note text content (1-1000 characters)"})}),oh=Vn({id:ja,cancelOrder:xn().optional().meta({description:"Close the order and cancel all its tickets. Omit or use false to cancel tickets while allowing replacement issuance."}),ticketIds:Bn(Ba).min(1).max(500).optional().meta({description:"Tickets to cancel. Omit to cancel every ticket on the order."}),idempotencyKey:Qi().min(1).max(128).meta({description:"Stable key for this cancellation. Reuse when retrying."}),reason:Wp.meta({description:"Reason shown to the buyer and included in their email when notification is enabled, 1–500 characters after trimming."}),notify:xn().default(!0).meta({description:"Email the order buyer after cancellation."})}),ah=lm.omit({id:!0,price:!0,kind:!0}).extend({id:Qi().optional().meta({examples:["itm_01jps5cgsfwyxj0516571eaf17"],description:"Unique identifier for this order item. When omitted, the server assigns an id during processing"})}),sh=Vn({eventId:Qi().meta({description:"Unique identifier of the event for which to create a complimentary order"}),items:Bn(ah).min(1).meta({description:"Admission items to include in the complimentary order"}),customer:Vn({firstName:Qi().min(1),lastName:Qi().min(1),email:tn()}),notifyCustomer:xn().default(!0).meta({description:"Whether to send the standard order confirmation email after tickets are generated"}),reason:Qi().min(1),idempotencyKey:Qi().trim().min(1).max(255).optional()});Vn({reason:er(["MEMBER_SIGN_IN_REQUIRED","MEMBERSHIP_REQUIRED","MEMBER_BENEFIT_USED"])}).meta({description:"Why a coupon code could not be applied, when the checkout can act on it"});const dh=Vn({postHogDistinctId:Qi().min(1).max(256).optional()}),ch=Vn({eventId:Qi().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to create the order"}),items:Bn(ah).meta({description:"List of items to include in the new order"}),couponCode:Qi().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the order"}),returnUrl:Qi().optional().meta({examples:["/orders"],description:"Optional tenant-relative, same-tenant-origin, or explicitly approved native return URL. External web returns require returnDestinationKey."}),returnDestinationKey:Qi().min(1).max(80).optional().meta({description:"Registered checkout confirmation destination, fixed when the order is created."}),channel:Jp.optional().meta({description:"Optional channel metadata for where the order originated (for attribution and redirect routing)."}),analytics:dh.optional().meta({description:"Optional browser analytics metadata used for cross-domain checkout attribution."}),idempotencyKey:Qi().trim().min(1).max(255).optional().meta({description:"Optional key that makes repeated order creation requests return the same order."})}),lh=Vn({id:Qi().meta({examples:[wa.Order.id],description:"Unique identifier of the order"}),noteId:Qi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),uh=er(["EMAIL","SMS"]).meta({examples:["EMAIL"],description:"Method used to deliver tickets to the customer: EMAIL or SMS"});Vn({id:Qi().meta({examples:[wa.Order.id],description:"Unique identifier of the order to edit"}),signature:Ts.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for editing order items."}),items:Bn(ah).min(1).meta({description:"Updated list of items for the order (replaces existing items). Prices will be recalculated and payment intent updated."})});const ph=er(["STATUS","CANCELLATION_STATUS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","COUPON_CODE","PAYMENT_SOURCE","PAYMENT_METHOD","CURRENCY","CREATED_AT","UPDATED_AT","RESERVED_AT","TOTAL","TICKETS","ORDER_ID","CUSTOMER_ID","EVENT_ID","PROMOTER_ID","PAYOUT_ID"]),mh=er(["IS","IS_NOT","IS_ANY_OF","CONTAINS","IS_EMPTY","IS_NOT_EMPTY","BETWEEN","GTE","LTE"]),hh=new Set(["IS_EMPTY","IS_NOT_EMPTY"]),fh=new Set(["IS_ANY_OF"]),yh=new Set(["IS","IS_NOT","CONTAINS","GTE","LTE"]),gh=new Set(["BETWEEN"]),vh={CANCELLATION_STATUS:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),STATUS:new Set(["IS","IS_NOT","IS_ANY_OF"]),DELIVERY_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF"]),CUSTOMER_EMAIL:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),CUSTOMER_PHONE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),COUPON_CODE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),PAYMENT_SOURCE:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),PAYMENT_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),CURRENCY:new Set(["IS","IS_NOT","IS_ANY_OF"]),CREATED_AT:new Set(["BETWEEN","GTE","LTE"]),UPDATED_AT:new Set(["BETWEEN","GTE","LTE"]),RESERVED_AT:new Set(["BETWEEN","GTE","LTE","IS_EMPTY","IS_NOT_EMPTY"]),TOTAL:new Set(["BETWEEN","GTE","LTE"]),TICKETS:new Set(["BETWEEN","GTE","LTE"]),ORDER_ID:new Set(["IS","IS_NOT","CONTAINS"]),CUSTOMER_ID:new Set(["IS","IS_NOT","IS_EMPTY","IS_NOT_EMPTY"]),EVENT_ID:new Set(["IS","IS_NOT"]),PROMOTER_ID:new Set(["IS","IS_NOT"]),PAYOUT_ID:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"])},bh={STATUS:Mm,CANCELLATION_STATUS:zp,DELIVERY_METHOD:uh,PAYMENT_SOURCE:vm,PAYMENT_METHOD:ym},wh=new Set(["CREATED_AT","UPDATED_AT","RESERVED_AT"]),$h=new Set(["TOTAL","TICKETS"]),Ih=Vn({field:ph,operator:mh,values:Bn(Qi()).max(20)}).superRefine(((e,t)=>{vh[e.field].has(e.operator)||t.addIssue({code:"custom",path:["operator"],message:`${e.operator} is not supported for ${e.field}`}),function(e,t){let i=e.values.length;hh.has(e.operator)&&0!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" does not accept values"}),yh.has(e.operator)&&1!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly one value"}),fh.has(e.operator)&&i<1&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires at least one value"}),gh.has(e.operator)&&2!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly two values"})}(e,t),function(e,t){let i=bh[e.field];i&&e.values.forEach(((n,r)=>{i.safeParse(n).success||t.addIssue({code:"custom",path:["values",r],message:`${n} is not valid for ${e.field}`})}))}(e,t),function(e,t){wh.has(e.field)&&e.values.forEach(((e,i)=>{Number.isNaN(Date.parse(e))&&t.addIssue({code:"custom",path:["values",i],message:e+" is not a valid date"})}))}(e,t),function(e,t){$h.has(e.field)&&e.values.forEach(((e,i)=>{/^-?\d+$/.test(e)||t.addIssue({code:"custom",path:["values",i],message:e+" is not a valid integer"})}))}(e,t)})),Eh="Either locationId or googlePlaceId must be provided",kh={locationId:La.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:Qi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."})};function Th(e){return!(!e.locationId&&!e.googlePlaceId)}const Ah=Wl.omit({id:!0,createdAt:!0,updatedAt:!0,order:!0,available:!0,sold:!0,reserved:!0,visibility:!0,promoterId:!0,eventSlug:!0,location:!0}).extend({order:En().optional().meta({examples:[wa.Section.order],description:"Display order of the section. Lower numbers appear first in listings. Defaults to 0 if not specified"}),visibility:Wl.shape.visibility.optional(),...kh}).refine(Th,{message:Eh}).meta({description:"Schema for creating a new section within an event venue. Excludes system-generated fields and fields derived from the event"}),xh=Wl.pick({id:!0}).extend({eventId:Qi().meta({examples:[wa.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for soft-deleting a section by setting its deletedAt timestamp"}),Sh=Wl.pick({id:!0}).extend({eventId:Qi().meta({examples:[wa.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for retrieving a specific section by ID"}),Dh=zn({eventId:Wl.shape.eventId,query:Qi().max(120).optional().meta({examples:["VIP"],description:"Optional search query. When provided, automatically uses search-backed pagination for full-text search capabilities"}),limit:$a().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of sections to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:Qi().max(768).optional().meta({examples:["eyJpbnRlbnQiOnsicmVzb3VyY2UiOiJzZWN0aW9uLmxpc3QifSwicG9zaXRpb24iOnsiZW5naW5lIjoiZHluYW1vIiwgImN1cnNvciI6InNlY18wMWpwczVjZ3NlMGczcWo1NnZkODZ6N3FqIiwgImhpc3RvcnkiOltdfX0="],description:"Opaque pagination cursor from a previous response. Provide to continue fetching subsequent results"})}).meta({description:"Schema for listing sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided"}),Ch=Us(Wl,"sections"),Oh=Vn({section:Wl}),Ph=Wl.omit({promoterId:!0,createdAt:!0,updatedAt:!0,eventSlug:!0,available:!0,sold:!0,reserved:!0,location:!0,teamId:!0,name:!0,capacity:!0,limit:!0,order:!0}).extend({id:Qi().meta({examples:[wa.Section.id],description:"Unique identifier of the section to update"}),eventId:Qi().meta({examples:[wa.Section.eventId],description:"Unique identifier of the event to verify section belongs to"}),name:Wl.shape.name.optional(),capacity:ns().optional(),limit:rs().optional(),order:Wl.shape.order.optional(),visibility:er(["ALWAYS","STACKED","HIDDEN"]).optional(),locationId:La.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:Qi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."})}).meta({description:"Schema for updating an existing section."}),Rh=um.safeExtend({admission:Os.optional().meta({description:"Complete admission details for this order item when available"}),section:Wl.optional().meta({description:"Complete section details for this order item when applicable"})}),_h=er(["UPDATED_AT","CREATED_AT","EVENT_NAME","TOTAL","STATUS","CUSTOMER_NAME","PAYMENT_SOURCE","COUPON_CODE","TICKETS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","ORDER_ID"]),Nh=er(["asc","desc"]),Uh=Vn({mine:xn().optional().meta({examples:[!0],description:"When true, returns only the authenticated user's orders. Can be combined with teamId or eventId to further filter results."}),teamId:Qi().optional().meta({description:"Filter orders by team unique identifier"}),eventId:Qi().optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Filter orders by event unique identifier"}),status:Mm.optional().meta({examples:["SUCCESSFUL"],description:"Filter orders by payment status"}),query:Qi().optional().meta({examples:["John Doe"],description:"Optional search query to filter orders by customer details. When provided, search-backed pagination is used."}),includeEventTerms:xn().optional().meta({examples:[!0],description:"When true for authenticated user-owned order searches, also matches event name, slug, and location unless eventId is already provided."}),filters:Bn(Ih).max(10).optional().meta({description:"Optional advanced filters for order lists."}),sort:_h.optional().meta({examples:["UPDATED_AT","CREATED_AT","CUSTOMER_NAME"],description:"Field to sort order lists by."}),direction:Nh.optional().meta({examples:["asc","desc"],description:"Sort direction for order lists. Defaults to `desc` when omitted."}),from:Qi().date().optional().meta({examples:["2025-01-01"],description:"Filter orders created on or after this date (YYYY-MM-DD format). Inclusive of the entire day."}),to:Qi().date().optional().meta({examples:["2025-12-31"],description:"Filter orders created on or before this date (YYYY-MM-DD format). Inclusive of the entire day."}),limit:cs("orders"),cursor:Qi().optional().meta({examples:["eyJpZCI6Im9yZF8wMWpwczVjZ3NmZ3ZlNWI1ZzI2NjZreXJ5aCJ9"],description:"Pagination cursor for continuing to fetch subsequent results"})}),Mh=Us(Lm,"orders"),Lh=Vn({items:Bn(Rh).meta({description:"List of order items with complete pricing and admission details"}),price:$m.meta({description:"Total pricing breakdown for the entire order quote"}),couponCode:Al.optional().meta({description:"Applied coupon code details if a discount was used in this quote"}),stripeConnectAvailability:Zl.optional().meta({description:"Stripe Connect availability metadata for tenant checkout UI."})}),qh=Vn({eventId:Qi().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to generate a price quote"}),items:Bn(ah).meta({description:"List of items to include in the price quote calculation"}),couponCode:Qi().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the quote"})}),Gh=Vn({quote:Lh}),jh=Vn({orderItemId:Qi().meta({examples:[wa.OrderRefundItem.orderItemId],description:"Identifier of the order item to refund"}),quantity:Tn().min(1).meta({examples:[wa.OrderRefundItem.quantity],description:"Number of units to refund for this item"})}),Bh=Vn({id:ja.meta({examples:[wa.Order.id],description:"Identifier of the order to refund"}),fullRefund:xn().default(!1).meta({examples:[!1],description:"When true, refunds all remaining refundable items. Mutually exclusive with items."}),items:Bn(jh).optional().meta({description:"Specific items and quantities to refund. Required if fullRefund is false."}),shippingAmount:Tn().min(0).optional().meta({examples:[500],description:"Amount of shipping to refund in cents. Cannot exceed remaining refundable shipping."}),cancelTickets:xn().default(!0).meta({examples:[!0],description:"Whether to cancel tickets associated with refunded items. Defaults to true."}),notify:xn().default(!0).meta({examples:[!0],description:"Whether to send a refund confirmation email to the customer. Defaults to true."}),reason:Em.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund"}),note:Qi().optional().meta({examples:["Customer requested refund due to schedule conflict"],description:"Free-form notes explaining the refund"}),idempotencyKey:Qi().optional().meta({examples:["refund_12345_customer_request"],description:"Client-provided key to prevent duplicate refund processing. Recommended for programmatic refunds."}),metadata:Qn(Qi(),Qi()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"})}),Fh=Vn({refund:Rm}),Vh=Vn({id:Qi().meta({examples:[wa.Order.id],description:"Order ID to resend tickets for"}),email:Qi().email().optional().meta({examples:["customer@example.com"],description:"Email address to send tickets to. If not provided, uses order.customer.email"})}),zh=Vn({id:Qi().meta({examples:[wa.Order.id],description:"Unique identifier of the order to reserve inventory for"}),signature:Ts.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded)."})}),Wh=Vn({code:ir("ORDER_NOT_RESERVABLE")}),Yh=Vn({order:Lm}),Hh=Vn({order:Lm.extend({userId:qa.meta({description:"The verified buyer who owns this purchase"})})}).meta({description:"An order created for the authenticated buyer"});var Zh={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[0-79]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},Kh={}.constructor;function Jh(e){return null!=e&&e.constructor===Kh}function Qh(e){return Qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qh(e)}function Xh(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ef(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=Qh(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=Qh(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==Qh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function tf(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function nf(e){var t,i,n,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o,a,s=[],d=!0,c=!1;try{if(o=(i=i.call(e)).next,0===t);else for(;!(d=(n=o.call(i)).done)&&(s.push(n.value),s.length!==t);d=!0);}catch(e){c=!0,r=e}finally{try{if(!d&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tf(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?tf(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(e),4),o=r[0],a=r[1],s=r[2],d=r[3];if("string"!=typeof o)throw TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!Jh(a))throw Error("Invalid second argument: "+a);s?(i=a,n=s):n=a}else d?(i=s,n=d):(i=void 0,n=s),a&&(i=function(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?Xh(Object(i),!0).forEach((function(t){ef(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Xh(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({defaultCountry:a},i));return{text:t,options:i,metadata:n}}var rf="0-90-9٠-٩۰-۹",of="-‐-―−ー-//..  ­​⁠ ()()[]\\[\\]~⁓∼~";function af(e){return af="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},af(e)}function sf(e){var t="function"==typeof Map?new Map:void 0;return sf=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch{return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return function(e,t,i){if(df())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var r=new(e.bind.apply(e,n));return i&&cf(r,i.prototype),r}(e,arguments,lf(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),cf(i,e)},sf(e)}function df(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(df=function(){return!!e})()}function cf(e,t){return cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cf(e,t)}function lf(e){return lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lf(e)}var uf=function(){function e(t){var i;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),i=function(e,t,i){return t=lf(t),function(e,t){if(t&&("object"==af(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,df()?Reflect.construct(t,i||[],lf(e).constructor):t.apply(e,i))}(this,e,[t]),Object.setPrototypeOf(i,e.prototype),i.name=i.constructor.name,i}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cf(e,t)}(e,sf(Error)),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(e)}();function pf(e,t){e=e.split("-"),t=t.split("-");for(var i=e[0].split("."),n=t[0].split("."),r=0;r<3;r++){var o=Number(i[r]),a=Number(n[r]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var mf=/^\d+$/;function hf(e){return hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hf(e)}function ff(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function yf(e,t){return t&&function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gf(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gf(e){var t=function(e){if("object"!=hf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=hf(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==hf(t)?t:t+""}var vf=" ext. ",bf=yf((function e(t){ff(this,e),Tf(t),this.metadata=t,Sf.call(this,t)}),[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){var i,n;if(e&&(function(e){return mf.test(e)}(e)?n=e:i=e),t&&(n=t),i&&"001"!==i){var r=this.getCountryMetadata(i);if(!r)throw Error("Unknown country: "+i);this.numberingPlan=new wf(r,this)}else if(n){if(!this.hasCallingCode(n))throw Error("Unknown calling code: "+n);this.numberingPlan=new wf(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t)return 1===t.length&&3===t[0].length?void 0:t}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var i=this.nonGeographic()[e];if(i)return i}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),wf=yf((function e(t,i){ff(this,e),this.globalMetadataObject=i,this.metadata=t,Sf.call(this,i.metadata)}),[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"_getDefaultCountryMetadataForThisCallingCode",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this._getDefaultCountryMetadataForThisCallingCode()}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map((function(t){return new $f(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&kf(this.types(),e))return new Ef(kf(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?vf:this.metadata[13]||vf}}]),$f=yf((function e(t,i){ff(this,e),this._format=t,this.metadata=i}),[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||If.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),If=/^\(?\$1\)?$/,Ef=yf((function e(t,i){ff(this,e),this.type=t,this.metadata=i}),[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]);function kf(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function Tf(e){if(!e)throw Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Jh(e)||!Jh(e.countries))throw Error(`[libphonenumber-js] \`metadata\` argument was passed but it's not a valid metadata. Must be an object having \`.countries\` child object property. Got ${Jh(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Af(e)+": "+e}.`)}var Af=function(e){return hf(e)};function xf(e,t){var i=new bf(t);if(i.hasCountry(e))return i.selectNumberingPlan(e).countryCallingCode();throw Error("Unknown country: "+e)}function Sf(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===pf(t,"1.2.0")?this.v2=!0:-1===pf(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var Df=function(e){return`([${rf}]{1,${e}})`};function Cf(){var e="[  \\t,]*",t="[:\\..]?[  \\t,-]*",i="#?",n="[  \\t]*";return";ext="+Df("20")+"|"+e+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+t+Df("20")+"#?|"+e+"(?:[xx##~~]|int|int)"+t+Df("9")+"#?|[- ]+"+Df("6")+"#|"+n+"(?:,{2}|;)"+t+Df("15")+"#?|"+n+"(?:,)+"+t+Df("9")+i}var Of="["+rf+"]{2}",Pf="[++]{0,1}(?:["+of+"]*["+rf+"]){3,}["+of+rf+"]*",Rf=RegExp("^[++]{0,1}(?:["+of+"]*["+rf+"]){1,2}$","i"),_f=Pf+"(?:"+Cf()+")?",Nf=RegExp("^"+Of+"$|^"+_f+"$","i"),Uf=RegExp("(?:"+Cf()+")$","i"),Mf={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Lf(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function qf(e){for(var t,i="",n=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Lf(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Lf(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=n()).done;)i+=Gf(t.value,i)||"";return i}function Gf(e,t){if("+"===e){if(t)return;return"+"}return function(e){return Mf[e]}(e)}function jf(e,t,i){return function(e,t,i,n){i&&(n=new bf(n.metadata)).selectNumberingPlan(i);var r=n.type(void 0),o=r&&r.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,s=o[0];return s===a?"IS_POSSIBLE":s>a?"TOO_SHORT":o[o.length-1]<a?"TOO_LONG":o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,0,t,i)}function Bf(e,t){return"IS_POSSIBLE"===jf(e,void 0,t)}function Ff(e,t){return e||="",RegExp("^(?:"+t+")$").test(e)}function Vf(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var zf=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Wf(e,t,i){if(t||={},e.country||e.countryCallingCode){var n=new bf(i);n.selectNumberingPlan(e.country||e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Ff(r,n.nationalNumberPattern())){if(Yf(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()||!n.type("MOBILE")||Yf(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var o,a=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Vf(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Vf(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(zf);!(o=a()).done;){var s=o.value;if(Yf(r,s,n))return s}}}}function Yf(e,t,i){var n=i.type(t);return!(!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0)&&Ff(e,n.pattern())}var Hf=/^[A-Z]{2}$/;var Zf=RegExp("(["+rf+"])");function Kf(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Jf(e,t){var i=t.nationalNumber,n=t.metadata,r=n.getCountryCodesForCallingCode(e);if(r)return 1===r.length?r[0]:function(e,t,i){for(var n,r=new bf(i),o=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Kf(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Kf(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=o()).done;){var a=n.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(Wf({phone:e,country:a},void 0,r.metadata))return a}}(i,r,n.metadata)}function Qf(e,t,i){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var i=RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=i.exec(e);if(n){var r,o,a,s=n.length-1,d=s>0&&n[s];if(t.nationalPrefixTransformRule()&&d?(r=e.replace(i,t.nationalPrefixTransformRule()),s>1&&(o=n[1])):(r=e.slice(n[0].length),d&&(o=n[1])),d){var c=e.indexOf(n[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=n[0];return{nationalNumber:r,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,i),r=n.carrierCode,o=n.nationalNumber;return o===e||function(e,t,i){return!(Ff(e,i.nationalNumberPattern())&&!Ff(t,i.nationalNumberPattern()))}(e,o,i)&&(!i.numberingPlan.possibleLengths()||(t||=Jf(i.numberingPlan.callingCode(),{nationalNumber:o,metadata:i}),function(e,t,i){switch(jf(e,t,i)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,i)))?{nationalNumber:o,carrierCode:r}:{nationalNumber:e}}function Xf(e,t,i,n,r){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,i,n){if(t){var r=new bf(n);r.selectNumberingPlan(t||i);var o=RegExp(r.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(Zf);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,i,n,r);if(!a||a===e){if(i||n){var s=function(e,t,i,n,r){if(!i&&!n)return{number:e};var o=i?xf(i,r):n;if(0===e.indexOf(o)){var a=new bf(r);a.selectNumberingPlan(i||n);var s=e.slice(o.length),d=Qf(s,void 0,a).nationalNumber,c=Qf(e,void 0,a).nationalNumber;if(!Ff(c,a.nationalNumberPattern())&&Ff(d,a.nationalNumberPattern())||"TOO_LONG"===jf(c,void 0,a))return{countryCallingCode:o,number:s}}return{number:e}}(e,0,i,n,r),d=s.countryCallingCode;if(d)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:d,number:s.number}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};for(var c=new bf(r),l=2;l-1<=3&&l<=e.length;){var u=e.slice(1,l);if(c.hasCallingCode(u))return c.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(l)};l++}return{}}var ey=/(\$\d)/;var ty=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/,iy={formatExtension:function(e,t,i){return`${e}${i.ext()}${t}`}};function ny(e,t,i,n,r){var o=function(e,t){return function(e,t){for(var i=0;i<e.length;){if(t(e[i]))return e[i];i++}}(e,(function(e){if(e.leadingDigitsPatterns().length>0){var i=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==t.search(i))return!1}return Ff(t,e.pattern())}))}(n.formats(),e);return o?function(e,t,i){var n=i.useInternationalFormat,r=i.withNationalPrefix,o=e.replace(RegExp(t.pattern()),n?t.internationalFormat():r&&t.nationalPrefixFormattingRule()?t.format().replace(ey,t.nationalPrefixFormattingRule()):t.format());return n?function(e){return e.replace(RegExp(`[${of}]+`,"g")," ").trim()}(o):o}(e,o,{useInternationalFormat:"INTERNATIONAL"===i,withNationalPrefix:!(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&r&&!1===r.nationalPrefix)}):e}function ry(e,t,i,n){return t?n(e,t,i):e}function oy(e){return oy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oy(e)}function ay(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function sy(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?ay(Object(i),!0).forEach((function(t){dy(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ay(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function dy(e,t,i){return(t=cy(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function cy(e){var t=function(e){if("object"!=oy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=oy(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==oy(t)?t:t+""}var ly=function(e,t){return t&&function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cy(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,i,n){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),!t)throw TypeError("First argument is required");if("string"!=typeof t)throw TypeError("First argument must be a string");if("+"===t[0]&&!i)throw TypeError("`metadata` argument not passed");if(Jh(i)&&Jh(i.countries)){n=i;var r=t;if(!uy.test(r))throw Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=Xf(r,0,void 0,void 0,n);if(t=o.countryCallingCode,!(i=o.number))throw Error("Invalid `number` argument passed: too short")}if(!i)throw TypeError("`nationalNumber` argument is required");if("string"!=typeof i)throw TypeError("`nationalNumber` argument must be a string");Tf(n);var a=function(e,t){var i,n,r=new bf(t);return function(e){return Hf.test(e)}(e)?(r.selectNumberingPlan(i=e),n=r.countryCallingCode()):n=e,{country:i,callingCode:n}}(t,n),s=a.callingCode;this.country=a.country,this.countryCallingCode=s,this.nationalNumber=i,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}),[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,i){var n=new bf(i).getCountryCodesForCallingCode(e);return n?n.filter((function(e){return function(e,t,i){var n=new bf(i);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,i)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,i){void 0===t&&(t={});var n=new bf(i);if(t.v2){if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.country||e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw Error("Unknown country: "+e.country);n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Bf(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,i){t||={};var n=new bf(i);return n.selectNumberingPlan(e.country||e.countryCallingCode),n.hasTypes()?void 0!==Wf(e,t,n.metadata):Ff(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new bf(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Wf(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,i,n){i=i?function(){for(var e=1,t=[...arguments];e<t.length;){if(t[e])for(var i in t[e])t[0][i]=t[e][i];e++}return t[0]}({},iy,i):iy;var r=new bf(n);if(e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw Error("Unknown country: "+e.country);r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var o=r.countryCallingCode(),a=i.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?ry(ny(a,0,"NATIONAL",r,i),e.ext,r,i.formatExtension):"";case"INTERNATIONAL":return a?ry(`+${o} ${ny(a,0,"INTERNATIONAL",r,i)}`,e.ext,r,i.formatExtension):"+"+o;case"E.164":return`+${o}${a}`;case"RFC3966":return function(e){var t=e.number,i=e.ext;if(!t)return"";if("+"!==t[0])throw Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${i?";ext="+i:""}`}({number:`+${o}${a}`,ext:e.ext});case"IDD":if(!i.fromCountry)return;var s=function(e,t,i,n,r){if(xf(n,r.metadata)===i){var o=ny(e,0,"NATIONAL",r);return"1"===i?i+" "+o:o}var a=function(e,t,i){var n=new bf(i);return n.selectNumberingPlan(e||void 0),n.defaultIDDPrefix()?n.defaultIDDPrefix():ty.test(n.IDDPrefix())?n.IDDPrefix():void 0}(n,0,r.metadata);if(a)return`${a} ${i} ${ny(e,0,"INTERNATIONAL",r)}`}(a,0,o,i.fromCountry,r);return s?ry(s,e.ext,r,i.formatExtension):void 0;default:throw Error(`Unknown "format" argument passed to "formatNumber()": "${t}"`)}}(this,e,t?sy(sy({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}]),uy=/^\+\d+$/,py="(["+rf+"]|[\\-\\.\\(\\)]?)",my=RegExp("^\\+"+py+"*["+rf+"]"+py+"*$","g"),hy=RegExp("^(["+rf+"]+((\\-)*["+rf+"])*\\.)*[a-zA-Z]+((\\-)*["+rf+"])*\\.?$","g"),fy=";phone-context=";var yy=RegExp("[++"+rf+"]"),gy=RegExp("[^"+rf+"#]+$");function vy(e,t,i){t||={};var n=new bf(i);if(t.defaultCountry&&!n.hasCountry(t.defaultCountry))throw t.v2?new uf("INVALID_COUNTRY"):Error("Unknown country: "+t.defaultCountry);var r=function(e,t,i){var n=function(e,t){var i,n=t.extractFormattedPhoneNumber,r=function(e){var t=e.indexOf(fy);if(t<0)return null;var i=t+15;if(i>=e.length)return"";var n=e.indexOf(";",i);return n>=0?e.substring(i,n):e.substring(i)}(e);if(!function(e){return null===e||0!==e.length&&(my.test(e)||hy.test(e))}(r))throw new uf("NOT_A_NUMBER");if(null===r)i=n(e)||"";else{i="","+"===r.charAt(0)&&(i+=r);var o=e.indexOf("tel:"),a=o>=0?o+4:0,s=e.indexOf(fy);i+=e.substring(a,s)}var d=i.indexOf(";isub=");if(d>0&&(i=i.substring(0,d)),""!==i)return i}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,i){if(e){if(e.length>250){if(i)throw new uf("TOO_LONG");return}if(!1===t)return e;var n=e.search(yy);if(!(n<0))return e.slice(n).replace(gy,"")}}(e,i,t)}});if(!n)return{};if(!function(e){return e.length>=2&&Nf.test(e)}(n))return function(e){return Rf.test(e)}(n)?{error:"TOO_SHORT"}:{};var r=function(e){var t=e.search(Uf);if(t<0)return{};for(var i=e.slice(0,t),n=e.match(Uf),r=1;r<n.length;){if(n[r])return{number:i,ext:n[r]};r++}}(n);return r.ext?r:{number:n}}(e,t.v2,t.extract),o=r.number,a=r.ext;if(!o){if(t.v2)throw new uf("TOO_SHORT"===r.error?"TOO_SHORT":"NOT_A_NUMBER");return{}}var s=function(e,t,i,n){var r,o=Xf(qf(e),0,t,i,n.metadata),a=o.countryCallingCodeSource,s=o.countryCallingCode,d=o.number;if(s)n.selectNumberingPlan(s);else{if(!d||!t&&!i)return{};t?(r=t,n.selectNumberingPlan(t),s=n.numberingPlan.callingCode()):(n.selectNumberingPlan(i),s=i)}if(!d)return{countryCallingCodeSource:a,countryCallingCode:s};var c=Qf(qf(d),void 0,n),l=c.nationalNumber,u=c.carrierCode,p=Jf(s,{nationalNumber:l,metadata:n});return p&&(r=p,"001"===p||n.selectNumberingPlan(r)),{country:r,countryCallingCode:s,countryCallingCodeSource:a,nationalNumber:l,carrierCode:u}}(o,t.defaultCountry,t.defaultCallingCode,n),d=s.country,c=s.nationalNumber,l=s.countryCallingCode,u=s.countryCallingCodeSource,p=s.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new uf("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new uf("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new uf("TOO_LONG");return{}}if(t.v2){var m=new ly(l,c,n.metadata);return d&&(m.country=d),p&&(m.carrierCode=p),a&&(m.ext=a),m.__countryCallingCodeSource=u,m}var h=!!(t.extended?n.hasSelectedNumberingPlan():d)&&Ff(c,n.nationalNumberPattern());return t.extended?{country:d,countryCallingCode:l,carrierCode:p,valid:h,possible:!!h||!(!0!==t.extended||!n.possibleLengths()||!Bf(c,n)),phone:c,ext:a}:h?function(e,t,i){var n={country:e,phone:t};return i&&(n.ext=i),n}(d,c,a):{}}function by(e){return by="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},by(e)}function wy(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function $y(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?wy(Object(i),!0).forEach((function(t){Iy(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):wy(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Iy(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=by(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=by(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==by(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ey(e){return Ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ey(e)}function ky(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ty(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?ky(Object(i),!0).forEach((function(t){Ay(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ky(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ay(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=Ey(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=Ey(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==Ey(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function xy(e){return xy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xy(e)}function Sy(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Dy(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?Sy(Object(i),!0).forEach((function(t){Cy(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Sy(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Cy(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=xy(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=xy(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==xy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Oy(){var e=nf(arguments),t=e.options,i=e.metadata,n=function(e,t,i){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,i)&&(t=Ty(Ty({},t),{},{defaultCountry:void 0}));try{return function(e,t,i){return vy(e,$y($y({},t),{},{v2:!0}),i)}(e,t,i)}catch(e){if(!(e instanceof uf))throw e}}(e.text,t=Dy(Dy({},t),{},{extract:!1}),i);return n&&n.isValid()||!1}const Py=ch.omit({eventId:!0,channel:!0,analytics:!0}).partial().extend({id:Qi().meta({examples:[wa.Order.id],description:"Unique identifier of the order to update"}),signature:Ts.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for all order updates."}),items:Bn(ah).min(1).optional().meta({description:"Updated list of items for the order. Requires signature. Prices will be recalculated and payment intent updated."}),customer:Vn({firstName:Qi().meta({examples:[wa.Customer.firstName],description:"Updated first name of the customer"}).optional(),lastName:Qi().meta({examples:[wa.Customer.lastName],description:"Updated last name of the customer"}).optional(),email:tn().meta({examples:[wa.Customer.email],description:"Updated email address of the customer"}).optional(),phone:Qi().refine((e=>!e||function(){return function(e,t){var i=Array.prototype.slice.call(t);return i.push(Zh),e.apply(this,i)}(Oy,arguments)}(e)),{message:"Phone must be in E.164 format (e.g., +61412345678)"}).meta({examples:[wa.Customer.phone],description:"Updated phone number in E.164 format (e.g., +61412345678)"}).optional(),deliveryMethod:uh.optional()}).optional().meta({description:"Updated customer information for the order. All fields are optional for partial updates."}),marketingConsent:pm.optional().meta({description:"Marketing opt-in choices captured during checkout."})}),Ry=Vn({id:Qi().meta({examples:[wa.Order.id],description:"Unique identifier of the order"}),noteId:Qi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:Qi().min(1).max(1e3).meta({examples:["Updated: Customer confirmed special seating arrangements"],description:"Updated note text content (1-1000 characters)"})});Vn({success:xn().meta({description:"Whether the payout approval was successful"}),message:Qi().optional().meta({description:"Optional message about the approval result"}),payoutId:Qi().meta({description:"ID of the payout that was approved"})});const _y=Vn({payoutId:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown of orders and financial calculations."})}),Ny=er(["DISPUTE_REVERSAL_CREDIT","REFUND_REVERSAL_CREDIT"]),Uy=Vn({source:er(["AIRWALLEX_SETTLEMENT_CREDIT"]),kind:Ny,adjustmentId:Qi(),adjustmentUniqueKey:Qi(),sourceKey:Qi(),sourcePayoutId:Qi(),settlementId:Qi(),transactionId:Qi().optional(),paymentIntentId:Qi().optional(),paymentAttemptId:Qi().optional(),createdActionPublishedAt:Di().optional()}),My=Vn({id:Qi().readonly().meta({examples:[wa.PayoutDeduction.id],description:"Unique identifier for this deduction record."}),createdAt:Di().readonly().meta({examples:[wa.PayoutDeduction.createdAt],description:"Timestamp in ISO 8601 format when this deduction was created."}),updatedAt:Di().readonly().meta({examples:[wa.PayoutDeduction.updatedAt],description:"Timestamp in ISO 8601 format when this deduction was last updated."}),amount:Tn().max(0).meta({examples:[wa.PayoutDeduction.amount],description:"Deprecated legacy deduction amount in cents. Negative values reduce the payout."}),currency:Aa.meta({examples:[wa.PayoutDeduction.currency],description:"Currency code in ISO 4217 format for the deduction amount."}),description:Qi().meta({examples:[wa.PayoutDeduction.description],description:"Human-readable description explaining the reason for this legacy deduction."}),gateway:Qi().meta({examples:[wa.PayoutDeduction.gateway],description:"Payment gateway identifier where this legacy deduction was processed."}),gatewayId:Qi().meta({examples:[wa.PayoutDeduction.gatewayId],description:"Unique identifier assigned by the payment gateway for this legacy deduction transaction."}),beneficiary:Qi().meta({examples:[wa.PayoutDeduction.beneficiary],description:"Human-readable name of the beneficiary account from which this legacy deduction was taken."}),beneficiaryId:Qi().meta({examples:[wa.PayoutDeduction.beneficiaryId],description:"Unique identifier of the beneficiary account from which this legacy deduction was taken."}),transferId:Qi().optional().meta({description:"Optional reference to a transfer record when this legacy deduction resulted in money being moved to a future payout."}),transferPayoutId:Qi().optional().meta({description:"Optional reference to a future payout where the legacy deducted amount was applied."})}),Ly=Vn({id:Qi().meta({examples:[wa.Event.id],description:"Unique identifier for the event associated with this payout."}),name:Qi().meta({examples:[wa.Event.name],description:"Human-readable name of the event."}),slug:Qi().meta({examples:[wa.Event.slug],description:"URL-friendly slug identifier for the event."}),location:Qi().optional().meta({examples:[wa.Event.location.name],description:"Optional human-readable location name where the event takes place."})}),qy=Vn({net:Tn().meta({examples:[wa.Payout.price.net],description:"Total amount to pay to promoter.\nTicket and shipping revenue after organiser-funded refunds and disputes, excluding booking and SMS fees."}),total:Tn().meta({examples:[wa.Payout.price.total],description:"Customer charges including booking, shipping and SMS fees.\nCalculated as: gross + discount + sms"}),gross:Tn().min(0).meta({examples:[wa.Payout.price.gross],description:"Total amount before refunds, disputes and discounts.\nCalculated as: base + booking + shipping"}),base:Tn().min(0).meta({examples:[wa.Payout.price.base],description:"Total value of tickets."}),booking:Tn().min(0).meta({examples:[wa.Payout.price.booking],description:"Total value of booking fees (non-refundable)."}),shipping:Tn().min(0).meta({examples:[wa.Payout.price.shipping],description:"Total value of shipping."}),sms:Tn().min(0).default(0).meta({examples:[wa.Payout.price.sms],description:"Total SMS delivery fees collected in cents (owed to Session Services, not the event organiser)."}),refunded:Tn().max(0).meta({examples:[wa.Payout.price.refunded],description:"Total value of refunds (negative value)."}),discount:Tn().max(0).meta({examples:[wa.Payout.price.discount],description:"Total value of discounts (negative value)."}),gateway:Tn().meta({examples:[wa.Payout.price.gateway],description:"Total value of absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),dispute:Tn().meta({examples:[wa.Payout.price.dispute],description:"Total value of non-absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),deductions:Tn().max(0).optional().meta({examples:[wa.Payout.price.deductions],description:"Deprecated total value of legacy payout-level deductions. New recovery amounts are exposed through payout adjustments."}),currency:Aa.meta({examples:[wa.Payout.price.currency],description:"Currency code in ISO 4217 format."})}),Gy=Nm(er(["CREATED","APPROVED","REJECTED","PROCESSING","PAID","FAILED","CANCELLED","NOTE"]),{createdAtExamples:[wa.Payout.createdAt],descriptionExamples:["Payout was created after event settlement"],externalIdDescription:"External idempotency key for deduplication (e.g., Airwallex transfer events)",externalIdExamples:["airwallex:transfer_abc123:completed"],idDescription:"Unique identifier for this timeline entry",idExamples:["tl_01jgxyz123abc"],kindDescription:"Type of timeline event (CREATED, APPROVED, PROCESSING, PAID, NOTE, etc.)",kindExamples:["CREATED","APPROVED","PAID"]}),jy=Vn({id:Qi().meta({examples:[wa.PayoutTransfer.id],description:"Unique identifier for this transfer record."}),createdAt:Di().meta({examples:[wa.PayoutTransfer.createdAt],description:"Timestamp in ISO 8601 format when this transfer was created."}),kind:er(["TICKETS","TENANT","VENUE","TEAM","SESSIONS","UNKNOWN"]).meta({examples:["TICKETS"],description:"Type of transfer. TICKETS: revenue from ticket sales, TENANT: platform fees, VENUE: venue split, TEAM: team split, SESSIONS: platform commission, UNKNOWN: unclassified transfer."}),amount:Tn().min(0).meta({examples:[wa.PayoutTransfer.amount],description:"Transfer amount in cents. Positive values represent money being transferred to the beneficiary."}),currency:Aa.meta({examples:[wa.PayoutTransfer.currency],description:"Currency code in ISO 4217 format for the transfer amount."}),fee:Tn().min(0).meta({examples:[wa.PayoutTransfer.fee],description:"Gateway processing fee for this transfer in cents. This fee is deducted from the transfer amount."}),feeCurrency:Aa.meta({examples:[wa.PayoutTransfer.feeCurrency],description:"Currency code in ISO 4217 format for the gateway fee."}),reference:Qi().meta({examples:[wa.PayoutTransfer.reference],description:"External reference identifier for tracking this transfer with the payment gateway."}),gateway:er(["AIRWALLEX","STRIPE"]).meta({examples:["AIRWALLEX"],description:"Payment gateway used to process this transfer."}),gatewayId:Qi().meta({examples:[wa.PayoutTransfer.gatewayId],description:"Unique identifier assigned by the payment gateway for this transfer."}),beneficiary:Qi().meta({examples:[wa.PayoutTransfer.beneficiary],description:"Human-readable name of the beneficiary receiving this transfer."}),beneficiaryId:Qi().meta({examples:[wa.PayoutTransfer.beneficiaryId],description:"Unique identifier of the beneficiary account receiving this transfer."}),status:Qi().optional().meta({examples:["SCHEDULED"],description:"Transfer status from the payment gateway (e.g. SCHEDULED, IN_PROGRESS, COMPLETED)."}),settlementAmount:Tn().min(0).optional().meta({examples:[3550],description:"Amount received by the beneficiary in their local currency, in cents. Present only for cross-currency transfers where the settlement currency differs from the source currency."}),settlementCurrency:Aa.optional().meta({examples:["USD"],description:"Currency code in ISO 4217 format for the settlement amount. Present only for cross-currency transfers."}),deductionId:Qi().optional().meta({description:"Deprecated optional reference to a legacy deduction record."}),deductionPayoutId:Qi().optional().meta({description:"Deprecated optional reference to the payout that originated a legacy deduction transfer."})}),By=er(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]),Fy=er(["AIRWALLEX","STRIPE","MANUAL"]),Vy=er(["DAILY","WEEKLY","AFTER_EVENT","ON_DEMAND"]),zy=Vn({id:Qi().readonly().meta({examples:[wa.Payout.id],description:"A unique identifier for this payout."}),createdAt:Di().readonly().meta({examples:[wa.Payout.createdAt],description:"Timestamp in ISO 8601 format when this payout was created."}),updatedAt:Di().readonly().meta({examples:[wa.Payout.updatedAt],description:"Timestamp in ISO 8601 format when this payout was last updated."}),statementPending:xn().optional().meta({description:"Whether the completed payout is awaiting its accounting statement snapshot."}),statementVersion:Tn().positive().optional().meta({description:"Version of the immutable issued statement, absent on legacy payouts."}),paidAt:Di().optional().meta({examples:[wa.Payout.paidAt],description:"Timestamp in ISO 8601 format when this payout was completed."}),dueAt:Di().optional().meta({examples:[wa.Payout.createdAt],description:"Earliest timestamp in ISO 8601 format when this payout can be picked up for processing. This is not a guaranteed bank arrival time."}),status:By.meta({examples:["PAID"],description:"Current payment status of this payout."}),method:Fy.meta({examples:["MANUAL"],description:"The payout channel used for disbursing funds."}),failedAttempts:Tn().nonnegative().optional().meta({description:"Failures since approval. After four failures an administrator must explicitly retry the payout. Absent on legacy payouts."}),approval:Ea.meta({examples:["APPROVED"],description:"Approval status for this payout."}),frequency:Vy.default("AFTER_EVENT").meta({examples:["AFTER_EVENT"],description:"Schedule on which this payout is generated."}),structure:Qi().meta({examples:[wa.Payout.structure],description:"Data structure defining how funds are allocated in this payout."}),transfers:Bn(jy).meta({description:"List of individual transfer records included in this payout."}),deductions:Bn(My).optional().meta({description:"Deprecated legacy deductions applied before calculating the payout total. New recovery amounts are exposed through payout adjustments."}),price:qy.meta({description:"Summary of event/order-derived amounts for this payout."}),unsettled:qy.optional().meta({description:"Completed sales assigned to this payout that are still awaiting settlement."}),unsettledCount:En().int().nonnegative().optional().meta({description:"Number of orders still awaiting settlement."}),recovery:Uy.optional().meta({description:"Optional recovery metadata when this payout exists to return settlement-proven recovered funds."}),event:Ly.meta({description:"Information about the event associated with this payout."}),timeline:Bn(Gy).optional().meta({description:"Chronological list of status changes and notes for this payout."}),eventId:Qi().meta({examples:[wa.Payout.eventId],description:"Identifier of the event for which this payout was generated."}),teamId:Qi().meta({description:"Team receiving this payout. BREAKING CHANGE: Replaced promoterId/promoterSlug."})}).meta({description:"payout"});Vn({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout to approve for processing."})}),Vn({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout to reject."}),reason:Qi().optional().meta({examples:["Insufficient funds in account"],description:"Optional reason for rejecting the payout. This will be recorded for audit purposes."})}),Vn({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout to process and initiate transfers."})}),Vn({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout to retry transfer processing for."})});const Wy=Vn({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout to add a note to"}),note:Qi().trim().min(1).max(1e3).meta({examples:["Transfer confirmed via bank statement"],description:"Note text content (1-1000 characters)"})}),Yy=er(["REFUND","DISPUTE_PRINCIPAL","DISPUTE_FEE","GATEWAY_FEE","NEGATIVE_PAYOUT_CARRY_FORWARD","LEGACY_ADJUSTMENT"]),Hy=er(["RESERVED","OPEN","PARTIALLY_APPLIED","APPLIED"]),Zy=er(["OUTSTANDING","APPLIED","ALL"]),Ky=er(["event","payout"]),Jy=Vn({id:Qi(),name:Qi(),slug:Qi()}),Qy=Vn({id:Qi(),status:By,approval:Ea,method:Fy,dueAt:Di().optional(),paidAt:Di().optional(),event:Jy,price:qy,unsettled:qy.optional()}),Xy=Vn({id:Qi(),payoutId:Qi(),amount:Tn().min(0),currency:Aa,appliedAt:Di(),transferId:Qi().optional(),payout:Qy.optional()}),eg=Vn({id:Qi(),createdAt:Di(),updatedAt:Di(),provenAt:Di(),teamId:Qi(),eventId:Qi().optional(),orderId:Qi().optional(),payoutId:Qi().optional(),sourcePayoutId:Qi().optional(),gateway:Fy,kind:Yy,direction:ir("DEBIT"),status:Hy,amount:Tn().min(0),appliedAmount:Tn().min(0),remainingAmount:Tn().min(0),currency:Aa,beneficiary:Qi(),beneficiaryId:Qi(),description:Qi(),settlementId:Qi().optional(),transactionId:Qi().optional(),feeType:Qi().optional(),feeSourceId:Qi().optional(),disputeId:Qi().optional(),refundId:Qi().optional(),paymentIntentId:Qi().optional(),paymentAttemptId:Qi().optional(),customer:Xp.optional(),event:Jy.optional(),sourcePayout:Qy.optional(),applications:Bn(Xy)}),tg=Vn({id:Qi()}),ig=Vn({adjustmentId:Qi(),amount:Tn().min(0),currency:Aa}),ng=Vn({amount:Tn().min(0),appliedAmount:Tn().min(0),remainingAmount:Tn().min(0),projectedAmount:Tn().min(0),currency:Aa}),rg=Vn({id:Qi(),event:Jy.optional(),adjustments:Bn(eg),totals:Bn(ng)}),og=Vn({id:Qi(),payout:Qy,adjustments:Bn(eg),projections:Bn(ig),totals:Bn(ng),projectedNetAmount:Tn()}),ag=Vn({adjustmentCount:Tn().min(0),eventCount:Tn().min(0),upcomingPayoutCount:Tn().min(0),totals:Bn(ng)}),sg=Vn({teamId:Qi(),query:Qi().optional(),status:Zy.optional(),groupBy:Ky.optional(),eventId:Qi().optional(),currency:Aa.optional(),limit:cs("adjustments").optional(),cursor:ls.optional()}),dg=Vn({adjustments:Bn(eg),eventGroups:Bn(rg),payoutGroups:Bn(og),summary:ag,summaryScope:ir("PAGE"),before:Qi().nullish(),after:Qi().nullish(),limit:En().int().min(1)}),cg=Vn({adjustment:eg,adjustments:Bn(eg),eventGroups:Bn(rg),payoutGroups:Bn(og),summary:ag}),lg=Vn({name:Qi(),gateway:er(["AIRWALLEX","STRIPE","FREE"]),message:Qi(),eventIds:Bn(Qi()).optional(),venues:Bn(Qi()).optional(),tenants:Bn(Qi()).optional(),teams:Bn(Qi()).optional(),ticketBeneficiaryTeamId:Qi().optional(),venueBeneficiaryTeamId:Qi().optional(),min:En().optional(),max:En().optional(),percent:En().optional(),split:Vn({tenant:En(),team:En(),venue:En(),sessions:En()})}).refine((e=>e.split.venue<=0||void 0!==e.venueBeneficiaryTeamId),{message:"Venue fee splits require a beneficiary team",path:["venueBeneficiaryTeamId"]}),ug="tem_01kach7nnvfvmbtfvgtgkb47kc",pg="tem_01kqbww0g2fersexg66rbsffmd",mg="tem_01kach7nntfvmbtfttvvqfgwbz",hg="tem_01kh7xaxpbebj9538fp9nn019f";lg.array().parse([{name:"DEFAULT",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",min:200,percent:7.5,split:{tenant:0,team:0,venue:0,sessions:1}},{name:"MIXMAG_ANZ_DEFAULT",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],min:200,percent:7.5,split:{tenant:.7,team:0,venue:0,sessions:.3}},{name:"MIXMAG_ASIA_DEFAULT",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",tenants:["tnt_01hk153x00ee4sgh15mp929k20"],min:200,percent:7.5,split:{tenant:.7,team:0,venue:0,sessions:.3}},{name:"MIXMAG_ANZ_SASH",gateway:"AIRWALLEX",message:"Controlled by S.A.S.H, flat rate of $5 AUD",tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],teams:[mg],min:500,max:500,split:{team:1,tenant:0,venue:0,sessions:0}},{name:"MIXMAG_ANZ_SASH_FLAT_5",gateway:"AIRWALLEX",message:"Controlled by S.A.S.H, flat rate of $5 AUD",eventIds:["evt_01kztzvgvdecrt5xq7vn67vd5k"],tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],ticketBeneficiaryTeamId:mg,venueBeneficiaryTeamId:mg,min:500,max:500,split:{team:0,tenant:0,venue:1,sessions:0}},{name:"MIXMAG_ANZ_CAROUSEL_FLAT_5",gateway:"AIRWALLEX",message:"Controlled by Carousel, flat rate of $5 AUD",eventIds:["evt_01m0pz27j2fk7atvaa51e1sh8j"],tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],ticketBeneficiaryTeamId:ug,venueBeneficiaryTeamId:ug,min:500,max:500,split:{team:0,tenant:0,venue:1,sessions:0}},{name:"MIXMAG_ANZ_CAROUSEL",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],teams:[ug,pg,hg],venues:["Carousel Bar & Ballroom","Carousel","169 Oxford St"],ticketBeneficiaryTeamId:ug,venueBeneficiaryTeamId:ug,min:200,percent:7.5,split:{team:0,tenant:0,venue:1,sessions:0}}]),lg.array().parse([{name:"MIXMAG_ANZ_YAW_PLACE",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2.50 AUD, whichever is higher",ticketBeneficiaryTeamId:ug,venueBeneficiaryTeamId:hg,min:250,percent:7.5,split:{tenant:0,team:0,venue:1,sessions:0}},{name:"MIXMAG_ANZ_KANDY",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2.50 AUD, whichever is higher",ticketBeneficiaryTeamId:ug,venueBeneficiaryTeamId:pg,min:250,percent:7.5,split:{tenant:0,team:0,venue:1,sessions:0}}]);const fg=Vn({tenant:En().meta({examples:[5e4],description:"Amount allocated to the tenant (platform) in cents. This represents the platform's share of the revenue."}),venue:En().meta({examples:[25e3],description:"Amount allocated to the venue in cents. This represents the venue's share of the revenue from events held at their location."}),team:En().meta({examples:[2e4],description:"Amount allocated to the team in cents. This represents the team's share of the revenue after fees and other deductions."}),sessions:En().meta({examples:[3e3],description:"Amount allocated to Sessions platform commission in cents. This represents the platform's service fees."}),tickets:En().meta({examples:[2e3],description:"Amount allocated to ticketing fees in cents. This represents fees charged for ticket processing and management."})});Vn({payout:zy.meta({description:"Complete payout record containing all financial details and metadata for calculating beneficiary allocations."}),feeStructure:lg.meta({description:"Fee structure configuration that defines how revenue is split between different parties (promoter, venue, platform, etc.)."}),split:fg.meta({description:"Calculated split amounts showing how the payout total is divided among the different beneficiaries in cents."})});const yg=Vn({tickets:Tn().nonnegative().optional().meta({description:"Admission ticket count captured for this statement, retained when source orders are removed."}),orders:En().meta({examples:[150],description:"Total number of orders included in this payout breakdown."}),price:$m.meta({description:"Aggregated price information for all orders included in this payout, showing total revenue, fees, refunds, and disputes."}),split:fg.meta({description:"How the total payout amount is split between different beneficiaries (tenant, venue, promoter, etc.) in cents."}),structure:Qi().meta({examples:["DEFAULT"],description:"Fee structure identifier that was used to calculate the payout split and allocations."})}),gg=Vn({name:Qi().meta({description:"Captured fee structure name."}),gateway:er(["AIRWALLEX","STRIPE","FREE"]).meta({description:"Payment gateway."}),message:Qi().meta({description:"Customer-facing fee description."}),split:Vn({tenant:En().meta({description:"Tenant booking fee share."}),team:En().meta({description:"Organiser booking fee share."}),venue:En().meta({description:"Venue booking fee share."}),sessions:En().meta({description:"Session Services booking fee share."})}).meta({description:"Captured booking fee allocations."}),ticketBeneficiaryTeamId:Qi().optional().meta({description:"Ticket revenue recipient override."}),venueBeneficiaryTeamId:Qi().optional().meta({description:"Venue booking fee recipient."})}).refine((e=>e.split.venue<=0||void 0!==e.venueBeneficiaryTeamId),{message:"Venue fee splits require a beneficiary team",path:["venueBeneficiaryTeamId"]}).meta({description:"Statement allocations without internal applicability selectors."}),vg=Vn({statement:Vn({version:Tn().positive().meta({description:"Immutable statement version."}),capturedAt:Di().meta({description:"Statement accounting cutoff."}),feeStructure:gg.meta({description:"Beneficiary allocations captured for this statement."}),adjustments:Tn().meta({description:"Applied organiser adjustments in settlement minor units; debits are positive."})}).optional().meta({description:"Frozen accounting basis for an issued payout statement."}),total:yg.meta({description:"Summary totals for all orders included in this payout breakdown, including aggregated financial calculations."}),orders:Bn(Vn({order:Lm.meta({description:"Complete order information including customer details, items, and payment status."}),price:$m.meta({description:"Settled price information for this specific order, showing final amounts after refunds and adjustments."}),split:fg.meta({description:"How this individual order's revenue is split between different beneficiaries in cents."}),structure:Qi().meta({examples:["DEFAULT"],description:"Fee structure identifier used to calculate the split for this order."})})).meta({description:"Detailed breakdown of individual orders included in this payout, showing how each order contributes to the total."})});zy.pick({id:!0,eventId:!0}).extend({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown."}),eventId:Qi().meta({examples:[wa.Event.id],description:"Unique identifier of the event associated with the payout breakdown."})}),zy.pick({eventId:!0,teamId:!0,method:!0,frequency:!0}).partial({method:!0,frequency:!0}).meta({description:"Schema for creating a new payout record"}).extend({eventId:Qi().meta({examples:[wa.Event.id],description:"Unique identifier of the event for which the payout is being created"}),teamId:Qi().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Unique identifier of the team who will receive the payout"}),method:er(["AIRWALLEX","STRIPE","MANUAL"]).optional().meta({examples:["AIRWALLEX"],description:"Optional payment method for the payout. Defaults to promoter's preferred method if not specified"}),frequency:er(["DAILY","WEEKLY","AFTER_EVENT"]).optional().meta({examples:["AFTER_EVENT"],description:"Optional payout frequency. Defaults to 'AFTER_EVENT' if not specified"})});const bg=Vn({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout"}),noteId:Qi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),wg=zy.pick({id:!0}).extend({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout to retrieve."})}),$g=er(["createdAt"]),Ig=er(["asc","desc"]),Eg=Vn({mine:xn().optional().meta({examples:[!0],description:"When true, returns payouts from teams where the authenticated user has payout access (for example, `payout.read` or `payout.write`)."}),teamId:Qi().optional().meta({description:"Filter payouts by specific team unique identifier. BREAKING CHANGE: Replaced promoterId filter."}),eventId:Qi().optional().meta({examples:[wa.Event.id],description:"Filter payouts by specific event unique identifier. When provided, only returns payouts for this event."}),status:er(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]).optional().meta({examples:["PAID"],description:"Filter payouts by payment status. UPCOMING: scheduled but not yet processed, FAILED: failed processing and will retry, PROCESSING: currently being processed, PAID: successfully completed, CANCELLED: cancelled before completion."}),approval:Ea.optional().meta({examples:["APPROVED"],description:"Filter payouts by approval status. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected and will not be processed."}),manualApprovalOnly:xn().optional().meta({description:"Only include manual payouts and recovery credits that require an operator approval decision."}),query:Qi().optional().meta({examples:["PAID venue:sydney"],description:"Optional search query to filter payouts by text fields. When provided, search-backed pagination is used."}),sort:$g.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest payouts first."}),direction:Ig.optional().meta({examples:["desc"],description:"Sort direction for payout lists. Defaults to `desc` when `sort` is provided."}),limit:cs("payouts").optional(),cursor:Qi().optional().meta({examples:["eyJpZCI6InBheV8wMWpwczVjZ3NmdjJ3cmU2aGQwcmM0dzR0OCJ9"],description:"Pagination cursor for continuing to fetch subsequent results. Use the cursor from the previous response to continue."})}).meta({description:"Schema for listing payouts with optional filtering, search, and cursor-based pagination"}),kg=Us(zy,"payouts"),Tg=Vn({status:er(["VALID","FALLBACK","MISSING"]).meta({examples:["VALID"],description:"Resolution status for the beneficiary used by this split. FALLBACK indicates a non-strict match was used, MISSING means no beneficiary is configured."}),warning:Qi().optional().meta({examples:["Using fallback beneficiary with matching gateway only."],description:"Optional warning message shown when fallback or missing beneficiary resolution was required."}),beneficiary:Vn({id:Qi().optional().meta({examples:[wa.Beneficiary.id],description:"Identifier for the beneficiary."}),teamId:Qi().optional().meta({examples:[wa.Team.id],description:"Team that owns this beneficiary configuration."}),name:Qi().meta({examples:[wa.Beneficiary.name],description:"Display name for the resolved beneficiary."}),gateway:er(["AIRWALLEX","STRIPE"]).optional().meta({examples:[wa.Beneficiary.gateway],description:"Payment gateway for this beneficiary when available from configuration."}),gatewayId:Qi().meta({examples:[wa.Beneficiary.gatewayId],description:"Gateway-specific beneficiary identifier used for transfer creation."}),currency:Aa.meta({examples:[wa.Beneficiary.currency],description:"Currency configured for this beneficiary."})}).optional()}),Ag=Vn({kind:er(["tickets","tenant","venue","team","sessions"]).meta({examples:["tickets"],description:"Split component represented by this row."}),amount:En().int().meta({examples:[114500],description:"Amount in cents for this split component."}),currency:Aa.meta({examples:[wa.Payout.price.currency],description:"Currency code for this split component."}),beneficiary:Tg}),xg=er(["TRACKED","N_A","SKIPPED"]),Sg=Vn({orders:En().int().meta({examples:[12],description:"Number of orders in this settlement bucket."}),price:$m.meta({description:"Aggregated totals for the orders in this bucket, in the bucket's native currency."})}),Dg=Vn({state:xg.meta({examples:["TRACKED"],description:"Whether settlement tracking applies to this payout preview. Non-Airwallex payouts return N_A."}),settled:Sg.optional().meta({description:"Completed Airwallex orders that already have settlement data available."}),awaitingSettlement:Sg.optional().meta({description:"Completed Airwallex orders still waiting on settlement ingestion."})}),Cg=Vn({payout:zy.pick({id:!0,status:!0,approval:!0,method:!0,frequency:!0,structure:!0,createdAt:!0,dueAt:!0,teamId:!0,eventId:!0,event:!0,price:!0}).meta({description:"Lightweight payout summary used by approvals and payout queue UIs."}),rows:Bn(Ag).meta({description:"Non-zero split rows with beneficiary resolution status and warnings."}),settlementSummary:Dg.meta({description:"Settlement status summary for the payout event. Airwallex payouts expose settled vs awaiting-settlement buckets."})}),Og=wg.extend({includeSettlementSummary:xn().optional().meta({examples:[!0],description:"When true, includes the Airwallex settlement summary for the payout preview."})}),Pg=Vn({payout:zy,breakdown:vg,appliedAdjustments:Bn(eg),projectedAdjustmentGroup:og.optional(),canExportBookingFees:xn()}),Rg=Qn(Qi(),Qn(Qi(),Vn({net:En(),total:En(),gross:En(),base:En(),booking:En(),shipping:En(),refunded:En(),discount:En(),gateway:En(),dispute:En(),deductions:En().default(0)}))).meta({description:"Payout statistics grouped by period (current/previous) and currency",examples:[{current:{USD:{net:1e5,total:12e4,gross:115e3,base:11e4,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:3e3,dispute:0}},previous:{USD:{net:8e4,total:95e3,gross:9e4,base:85e3,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:2500,dispute:0}}}]}),_g=Vn({teamId:Qi().optional().meta({description:"Filter stats by team ID"}),startDate:Qi().optional().meta({description:"Start date for stats period (YYYY-MM-DD)"}),endDate:Qi().optional().meta({description:"End date for stats period (YYYY-MM-DD)"})}),Ng=zy.pick({id:!0}).merge(zy.pick({status:!0,approval:!0}).partial()).extend({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout to update."}),status:er(["CANCELLED"]).optional().meta({examples:["CANCELLED"],description:"Optional new payment status for the payout. Only CANCELLED is allowed for manual updates."}),approval:Ea.optional().meta({examples:["APPROVED"],description:"Optional new approval status for the payout. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected."})}),Ug=Vn({id:Qi().meta({examples:[wa.Payout.id],description:"Unique identifier of the payout"}),noteId:Qi().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:Qi().trim().min(1).max(1e3).meta({examples:["Updated: Transfer confirmed - reference #12345"],description:"Updated note text content (1-1000 characters)"})}),Mg=er(["PROMOTER","VENUE"]).meta({description:"Type of permission scope. PROMOTER: applies to all events by a specific promoter. VENUE: applies to all events at a specific venue."}),Lg=Vn({id:Qi().readonly().meta({description:"Unique identifier for the permission scope"}),createdAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was created"}),updatedAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was last updated"}),teamMemberId:Qi().meta({description:"Team member this scope applies to"}),teamId:Qi().meta({description:"Team the member belongs to"}),userId:Qi().meta({description:"ID of the user this permission scope applies to"}),permissions:Bn($s).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:Bn(Qi()).optional().meta({description:"Optional role IDs applied at this scope. Role-derived permissions are merged with explicit scoped nodes."}),tenantId:Qi().readonly().meta({description:"Tenant identifier"})}),qg=Zn("kind",[Lg.extend({kind:ir("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:Qi().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),Lg.extend({kind:ir("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:Qi().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions using REPLACE semantics."}),Gg=Vn({permissions:Bn($s).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:Bn(Qi()).optional().meta({description:"Optional role IDs to apply at this scope."})}),jg=Zn("kind",[Gg.extend({kind:ir("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:Qi().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"Create a PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),Gg.extend({kind:ir("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:Qi().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"Create a VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Schema for creating a new permission scope. Must specify kind (PROMOTER or VENUE) and corresponding ID."}),Bg=Vn({id:Ja.meta({description:"Unique identifier for the permission scope"})}).meta({description:"Schema for retrieving a single permission scope by ID"}),Fg=Vn({teamMemberId:Qi().optional().meta({description:"Filter by team member ID"}),userId:Qi().optional().meta({description:"Filter by user ID"}),kind:Mg.optional().meta({description:"Filter by scope kind (PROMOTER or VENUE)"}),promoterId:Qi().optional().meta({description:"Filter by promoter ID (only for kind=PROMOTER scopes)"}),venueId:Qi().optional().meta({description:"Filter by venue ID (only for kind=VENUE scopes)"}),limit:cs("permission scopes"),cursor:Qi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing permission scopes with pagination and filtering"}),Vg=Us(qg,"items").meta({description:"Paginated response containing permission scopes with cursor for next page"}),zg=Gg.meta({description:"Schema for updating an existing permission scope. Only permissions array can be modified."}),Wg=Vn({id:Qa.meta({description:"Permission role ID"}),teamId:Ra.meta({description:"Team that owns this role"}),name:Qi().min(1).meta({description:"Role display name"}),description:Qi().optional().meta({description:"Optional role description"}),permissions:Es.meta({description:"Permission nodes granted by this role"}),createdAt:Di().meta({description:"Timestamp in ISO 8601 format when the role was created"}),updatedAt:Di().meta({description:"Timestamp in ISO 8601 format when the role was last updated"})}).meta({description:"Team-scoped permission role"}),Yg=Vn({role:Wg}),Hg=Vn({roles:Bn(Wg)}),Zg=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"})}),Kg=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),roleId:Qa}),Jg=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),name:Qi().min(1).meta({description:"Role display name"}),description:Qi().optional().meta({description:"Optional role description"}),permissions:Es}),Qg=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),roleId:Qa,name:Qi().min(1).meta({description:"Role display name"}),description:Qi().optional().meta({description:"Optional role description"}),permissions:Es}),Xg=Vn({memberId:Ha,permissions:Bn($s),updatedAt:Di()}),ev=Vn({member:Xg}),tv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),memberId:Ha}),iv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),memberId:Ha,permissions:Bn($s).meta({description:"Direct permission nodes for this member. Full-replace semantics; use an empty array to remove all direct grants."})}),nv=Vn({memberId:Ha,roleIds:Bn(Qa).meta({description:"Role IDs assigned to this member"}),updatedAt:Di()}),rv=Vn({member:nv}),ov=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),memberId:Ha}),av=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),memberId:Ha,roleIds:Bn(Qa)}),sv=Vn({direct:Bn(Qi()),fromRoles:Bn(Qi()),effective:Bn(Qi()),denied:Bn(Qi())});Vn({memberId:Ha,permissions:sv}),Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),memberId:Ha,domain:Qi().optional().meta({description:"Optional domain filter (for example: ticket, event)"}),action:Qi().optional().meta({description:"Optional action filter (for example: read, write, scan)"}),resourceId:Qi().optional().meta({description:"Optional resource ID filter"})});var dv={roles:{list:ia.route({method:"GET",path:"/teams/{key}/roles",summary:"List team roles",description:"Returns all roles configured for a team.",tags:["Permissions"]}).input(Zg.strict()).output(Hg),create:ia.route({method:"POST",path:"/teams/{key}/roles",summary:"Create team role",description:"Creates a team-scoped permission role.",tags:["Permissions"]}).input(Jg.strict()).output(Yg),get:ia.route({method:"GET",path:"/teams/{key}/roles/{roleId}",summary:"Get team role",description:"Retrieves a team role by ID.",tags:["Permissions"]}).input(Kg.strict()).output(Yg),update:ia.route({method:"PUT",path:"/teams/{key}/roles/{roleId}",summary:"Replace team role",description:"Full-replace, idempotent update for role name, description, and permissions.",tags:["Permissions"]}).input(Qg.strict()).output(Yg),remove:ia.route({method:"DELETE",path:"/teams/{key}/roles/{roleId}",summary:"Delete team role",description:"Deletes a team role.",tags:["Permissions"]}).input(Kg.strict()).output(Yg)},members:{permissions:{get:ia.route({method:"GET",path:"/teams/{key}/members/{memberId}/permissions",summary:"Get member direct permissions",description:"Returns direct permission nodes assigned to a member.",tags:["Permissions"]}).input(tv.strict()).output(ev),replace:ia.route({method:"PUT",path:"/teams/{key}/members/{memberId}/permissions",summary:"Replace member direct permissions",description:"Full-replace, idempotent update for direct permission nodes assigned to a member.",tags:["Permissions"]}).input(iv.strict()).output(ev)},roles:{get:ia.route({method:"GET",path:"/teams/{key}/members/{memberId}/roles",summary:"Get member role assignments",description:"Returns role IDs assigned to a member.",tags:["Permissions"]}).input(ov.strict()).output(rv),replace:ia.route({method:"PUT",path:"/teams/{key}/members/{memberId}/roles",summary:"Replace member role assignments",description:"Full-replace, idempotent update for role assignments on a member.",tags:["Permissions"]}).input(av.strict()).output(rv)}}};const cv=Vn({key:Qi().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[wa.Promoter.id,wa.Promoter.slug]})}).meta({description:"Request schema for retrieving a promoter by either its unique ID or slug"});zl.pick({slug:!0});const lv=zl.omit({id:!0,createdAt:!0,updatedAt:!0,geohash:!0,approval:!0,location:!0}).extend({description:ks.meta({examples:[wa.Promoter.description],description:"Detailed description of the promoter organization and their events"}),teamId:Qi().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that will own this promoter. User must be a member of this team."}),slug:Qi().min(3).max(30).optional().meta({examples:[wa.Promoter.slug],description:"URL-friendly slug for the promoter organization. If not provided, will be automatically generated from the name. Must be unique and between 3 and 30 characters"}),...kh}).refine(Th,{message:Eh}).meta({description:"Schema for creating a new promoter organization. The system automatically generates the ID, tenant association, geohash, and timestamps"}),uv=Vn({key:Qi().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[wa.Promoter.id,wa.Promoter.slug]})}).meta({description:"Schema for removing (soft deleting) a promoter organization by key (ID or slug)"});zl.pick({id:!0}).meta({description:"Schema for retrieving a specific promoter by ID"});const pv=er(["createdAt"]),mv=er(["asc","desc"]),hv=zn({teamId:Qi().max(128).optional().meta({description:"Filter promoters to only those belonging to a specific team"}),approval:Ea.optional().meta({examples:[wa.Promoter.approval],description:"Filter promoters by approval status. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),query:Qi().max(120).optional().meta({examples:["Session Services"],description:"Optional search query. When provided, results are fetched from search with unified cursor pagination."}),latitude:$a().min(-90).max(90).optional().meta({examples:[wa.Promoter.location.latitude],description:"Latitude used with longitude and radius to filter promoters by proximity when searching."}),longitude:$a().min(-180).max(180).optional().meta({examples:[wa.Promoter.location.longitude],description:"Longitude used with latitude and radius to filter promoters by proximity when searching."}),radius:$a().min(1).max(2e4).optional().meta({examples:[50],description:"Search radius in kilometers applied when latitude and longitude are provided."}),mine:Ia().optional().meta({examples:[!0],description:"When true, limits results to promoters from teams the current user belongs to. When combined with teamId, returns only that team's promoters (bypassing tenant-wide admin scope)."}),sort:pv.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest promoters first."}),direction:mv.optional().meta({examples:["desc"],description:"Sort direction for promoter lists. Defaults to `desc` when omitted."}),limit:wr((e=>{if(null!=e)return"string"==typeof e?function(e){let t=e.trim();if(0===t.length)return;let i=Number(t);return Number.isNaN(i)?e:i}(e):e}),En().min(1).max(100).prefault(20)).meta({examples:[20],description:"Maximum number of promoters to return (1-100, defaults to 20)"}).optional(),cursor:Qi().max(768).optional().meta({examples:["eyJpZCI6InByb18wMWpxcGprc25zZW45dnBydzk1ZXQ2MHQybSJ9"],description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."})}).meta({description:"Schema for listing promoters with optional filtering by team, full-text search, and cursor pagination"}),fv=Us(zl,"promoters"),yv=Vn({promoter:zl}),gv=zl.omit({createdAt:!0,updatedAt:!0,id:!0,location:!0}).partial().extend({description:ks.optional().meta({examples:[wa.Promoter.description],description:"Detailed description of the promoter organization. Omit to leave unchanged."}),key:Qi().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[wa.Promoter.id,wa.Promoter.slug]}),locationId:La.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:Qi().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),image:is.nullable().optional().meta({description:"Promoter image. Pass null to clear; omit to leave unchanged.",examples:[wa.Promoter.image,null]}),tracking:Vn({fbId:Qi().optional(),gaId:Vl.optional(),tikTokId:Qi().optional()}).nullable().optional().meta({description:"Analytics tracking config. Pass null to clear all tracking; omit to leave unchanged."})}).meta({description:"Schema for updating an existing promoter."}),vv=er(["PAYOUT_STATEMENT","PAYOUT_ORDER_BREAKDOWN","PAYOUT_BOOKING_FEE_BREAKDOWN","PAYOUT_ADJUSTMENT_BREAKDOWN","EVENT_ORDERS","MEMBERSHIP_MEMBERS"]),bv=er(["QUEUED","PROCESSING","COMPLETED","FAILED"]),wv=Vn({payoutId:Qi().describe("Payout identifier"),teamId:Qi().optional().describe("Requesting team identifier")}),$v=Vn({eventId:Qi().describe("Event identifier")}),Iv=Vn({teamId:Qi().describe("Team whose current membership program is exported")}),Ev=Zn("type",[Vn({type:ir("PAYOUT_STATEMENT"),params:wv}),Vn({type:ir("PAYOUT_ORDER_BREAKDOWN"),params:wv}),Vn({type:ir("PAYOUT_BOOKING_FEE_BREAKDOWN"),params:wv}),Vn({type:ir("PAYOUT_ADJUSTMENT_BREAKDOWN"),params:wv}),Vn({type:ir("EVENT_ORDERS"),params:$v}),Vn({type:ir("MEMBERSHIP_MEMBERS"),params:Iv})]),kv=Vn({id:Qi().describe("Report job identifier")}),Tv=Vn({id:Qi(),type:vv,status:bv,createdAt:Qi(),updatedAt:Qi(),expiresAt:Qi().optional(),filename:Qi().optional(),contentType:Qi().optional(),sizeBytes:En().optional(),error:Qi().optional(),downloadUrl:Qi().optional()}),Av=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),inviteId:Qi().meta({description:"Team invite ID to accept"}),token:Qi().meta({description:"Secure token used to accept the team invite. This token must match the one sent in the invitation email."})}),xv=er(["TEAM","EVENTS"]),Sv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),scope:xv.meta({description:"Stripe Connect event routing scope. TEAM routes every team event through Stripe Connect. EVENTS routes selected events only.",examples:["EVENTS"]}),eventIds:Bn(Ua).max(100).optional().meta({description:"Event IDs routed through Stripe Connect when scope is EVENTS. Omit or pass an empty array to keep Stripe Connect disabled for all events in EVENTS mode."})}),Dv=Vn({provider:er(["STRIPE","AIRWALLEX"]).meta({description:"Payment gateway provider type"}),connectedAt:Di().meta({description:"Timestamp when the payment gateway was connected to this team"}),connectedBy:Qi().meta({description:"User ID of the team member who connected the payment gateway"}),accountId:Qi().meta({description:"Connected account ID. For Stripe: acct_xxxxx. For Airwallex: business account open ID."}),scope:xv.optional().meta({description:"Stripe Connect routing scope. TEAM routes all team events through Stripe Connect. EVENTS routes only selected events."}),eventIds:Bn(Ua).optional().meta({description:"Event IDs routed through Stripe Connect when scope is EVENTS."}),chargesEnabled:xn().optional().meta({description:"Whether the connected Stripe account can currently accept charges."}),payoutsEnabled:xn().optional().meta({description:"Whether the connected Stripe account can currently receive payouts."}),requirementsDue:Bn(Qi()).optional().meta({description:"Stripe Connect account requirements currently due before the account can remain fully enabled."}),disabledReason:Qi().optional().meta({description:"Stripe disabled reason for the connected account, when Stripe reports one."}),syncedAt:Di().optional().meta({description:"Timestamp when gateway account status was last synced from the provider."})}).meta({description:"Payment gateway configuration for direct payouts to the team's connected account"}),Cv=Vn({id:Ra.readonly().meta({description:"Unique identifier for the team organization"}),createdAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the team was created"}),updatedAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the team was last updated"}),name:Qi().min(3).max(30).meta({description:"Display name of the team organization. Must be between 3 and 30 characters"}),slug:Qi().min(3).max(30).meta({description:"URL-friendly slug for the team organization. Must be unique within tenant and between 3 and 30 characters"}),supportEmail:Qi().email().optional().meta({description:"Support email address for customer inquiries. Used as reply-to address in order confirmation emails"}),publicBaseUrl:an().optional().meta({description:"Optional public website base URL for team-owned event and order links. When present, it overrides the tenant public base URL.",examples:["https://sash.net.au"]}),image:is.optional().meta({description:"Team image with dimensions and alt text for branding across the platform"}),metadata:ss,approval:Ea.meta({description:"Approval status of the team. PENDING: awaiting review, APPROVED: can create promoters/venues/events, REJECTED: cannot operate"}),deletedAt:Di().optional().readonly().meta({description:"Timestamp in ISO 8601 format when the team was soft deleted. Only present for deleted teams."}),tenantId:Qi().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),isAdmin:xn().optional().meta({description:"Whether this team is the admin team for the tenant"}),isDemo:xn().readonly().meta({description:"Whether this team is protected seeded demo data"}),gateway:Dv.optional().meta({description:"Connected payment gateway for direct payouts. When connected, funds from ticket sales go directly to the team's account with platform fees deducted."})}).meta({description:"Team organization that owns promoters and venues. Multiple brands can exist under one team."});Cv.extend({promoter:zl.meta({description:"The primary promoter brand associated with this team"})}).meta({description:"Team organization with its primary promoter brand included for convenience"});const Ov=Cv.extend({member:Vn({id:Ha.meta({description:"Current user's team member identifier for this team"}),permissions:Is.meta({description:"Permissions the current user has for this team. Controls access to team resources.",examples:[[],["team.read","team.write"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),isOwner:xn().meta({description:"Whether the current user is the owner of this team. Owners have full control."})}).optional().meta({description:"Current user's membership details for this team. Present when user is a member."})}).meta({description:"Team organization with the current user's membership details"}),Pv=Vn({key:Qi().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[wa.Team.id,wa.Team.slug]})}).meta({description:"Request schema for retrieving a team by either its unique ID or slug"}),Rv=Cv.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0,isAdmin:!0,isDemo:!0}).extend({slug:Qi().min(3).max(30).optional().meta({description:"URL-friendly slug for the team organization. If not provided, will be automatically generated from the name. Must be unique within tenant and between 3 and 30 characters"}),approval:Cv.shape.approval.optional().meta({description:"Approval status of the team. Defaults to PENDING if not specified."})}).meta({description:"Schema for creating a new team organization. The system automatically generates the ID, tenant association, and timestamps"});Vn({id:Ra.meta({description:"Team ID to delete"})});const _v=Vn({team:Ov.extend({isAdmin:xn().optional().meta({description:"Whether this team is the tenant admin team"}),stripeConnectAvailability:Zl.optional().meta({description:"Stripe Connect availability metadata for tenant payment settings UI."})})}),Nv=er(["QUEUED","PROCESSING","BLOCKED","COMPLETED","FAILED"]).meta({description:"Current state of an asynchronous team deletion operation"}),Uv=Vn({reason:er(["ADMIN_TEAM","DEMO_TEAM","EVENTS","ORDERS","EVENTS_AND_ORDERS","BUSINESS_RECORDS","SETUP_IN_USE"]).meta({description:"Stable business reason preventing team deletion"}),hasEvents:xn().meta({description:"Whether active events prevent deletion"}),hasOrders:xn().meta({description:"Whether orders prevent deletion"})}).meta({description:"Structured business condition preventing team deletion"}),Mv=Vn({id:Na.readonly().meta({description:"Unique identifier for the deletion operation"}),teamId:Ra.readonly().meta({description:"Team being deleted"}),status:Nv,createdAt:Di().readonly().meta({description:"Timestamp when deletion was requested"}),updatedAt:Di().readonly().meta({description:"Timestamp when deletion progress last changed"}),completedAt:Di().optional().readonly().meta({description:"Timestamp when deletion completed"}),blocker:Uv.optional(),error:Qi().optional().meta({description:"Safe failure description when manual recovery is needed"})}).meta({description:"Asynchronous team deletion operation"}),Lv=Vn({id:Na}).meta({description:"Request for the state of a team deletion operation"}),qv=_v.extend({deletion:Mv}).meta({description:"Accepted team deletion request and its operation state"});Vn({id:Ra.meta({description:"Team ID to retrieve"})});const Gv=Vn({id:Za.readonly().meta({description:"Unique identifier for the team invitation"}),createdAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),teamId:Ra.meta({description:"Team this invitation is for"}),email:tn().meta({description:"Email address of the invited user. Used for sending invitation."}),permissions:Bn($s).meta({description:"Permissions the user will receive upon accepting the invitation. Can be overridden per promoter or venue.",examples:[[],["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:Bn(Qi()).optional().meta({description:"Role IDs assigned on invite acceptance. Effective permissions are role + explicit nodes."}),access:As.optional().meta({description:"Promoter access to apply when the invitation is accepted."}),token:Qi().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),expiresAt:En().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),invitedBy:qa.meta({description:"User ID who sent the invitation"}),tenantId:Qi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending team invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates a TeamMember record and deletes the invitation."}),jv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),inviteId:Qi().meta({description:"Team invite ID to cancel"})}),Bv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),email:tn().meta({description:"Email address of the user to invite"}),roleIds:Bn(Qi()).min(1).meta({description:"Role IDs to grant to the invited user."}),access:xs.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."})}),Fv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),inviteId:Za.meta({description:"Team invite ID to retrieve"})}),Vv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),query:Qi().optional().meta({description:"Search query to filter invitations by email. Case-insensitive partial match"}),limit:En().int().min(1).max(100).default(20).optional().meta({description:"Maximum number of invitations to return per page"}),cursor:Qi().optional().meta({description:"Pagination cursor for fetching the next page"})}),zv=Us(Gv,"invites"),Wv=Vn({invite:Gv}),Yv=er(["createdAt"]),Hv=er(["asc","desc"]),Zv=Vn({userId:qa.optional().meta({description:"Filter teams by user membership. If omitted, returns all teams (tenant admin only). If provided, returns teams where the specified user is a member"}),approval:Ea.optional().meta({description:"Filter teams by approval status. PENDING: awaiting review, APPROVED: can operate, REJECTED: cannot operate"}),query:Qi().optional().meta({description:"Optional search query for filtering teams by name or slug"}),sort:Yv.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest teams first."}),direction:Hv.optional().meta({examples:["desc"],description:"Sort direction for team lists. Defaults to `desc` when `sort` is provided."}),limit:cs("teams"),cursor:Qi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing teams with pagination and filtering"}),Kv=Us(Ov,"teams"),Jv=er(["STRIPE","AIRWALLEX"]),Qv=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),provider:Jv.meta({description:"Payment processor to connect",examples:["STRIPE","AIRWALLEX"]})}),Xv=Vn({authorizationUrl:Qi().url().meta({description:"URL to redirect the user to for OAuth authorization. Open in a new window or redirect the current page.",examples:["https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_xxx&scope=read_write&redirect_uri=..."]})}),eb=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"})}),tb=Vn({id:Qi().meta({description:"Role ID"}),teamId:Qi().meta({description:"Team ID this role belongs to"}),key:Qi().meta({description:"Role key"}),name:Qi().meta({description:"Role display name"}),description:Qi().optional().meta({description:"Role description"}),permissions:Bn(Qi()).meta({description:"Permission nodes granted by this role"}),scope:ir("TEAM").meta({description:"Role scope"}),isPreset:xn().meta({description:"Whether this role is a system preset role"}),presetKey:Qi().optional().meta({description:"Stable system preset identifier. It remains unchanged when a preset role is renamed."})});Vn({key:Qi().meta({description:"Team identifier (ID or slug)"})}),Vn({roles:Bn(tb)});const ib=Vn({slug:Qi().min(3).max(30).meta({description:"Candidate team URL slug to check after server normalization."}),key:Qi().min(1).optional().meta({description:"Current team key to exclude when checking availability during team edits."})}).meta({description:"Request schema for checking team slug availability."}),nb=Vn({slug:Qi().min(3).max(30).meta({description:"Normalized team URL slug that was checked."}),available:xn().meta({description:"Whether the normalized slug is available in this tenant."})}).meta({description:"Team slug availability result."}),rb=Cv.omit({tenantId:!0,createdAt:!0,updatedAt:!0,id:!0,isAdmin:!0,isDemo:!0}).partial().extend({key:Qi().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[wa.Team.id,wa.Team.slug]}),supportEmail:Qi().email().nullable().optional().meta({description:"Support email for customer inquiries. Pass null to clear, omit to leave unchanged."}),publicBaseUrl:an().nullable().optional().meta({description:"Public website base URL for team-owned event and order links. Pass null to clear, omit to leave unchanged."}),image:is.nullable().optional().meta({description:"Team image. Pass null to clear, omit to leave unchanged."})}).meta({description:"Schema for updating an existing team organization. Pass null to clear optional fields."}),ob=Vn({id:Ha.readonly().meta({description:"Unique identifier for the team member"}),createdAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the member was created"}),updatedAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the member was last updated"}),teamId:Ra.meta({description:"Team this member belongs to"}),userId:qa.meta({description:"User ID of the team member"}),user:Vn({id:qa.meta({description:"Unique identifier of the user"}),email:tn().meta({description:"Email address of the user"}),firstName:Qi().meta({description:"First name of the user"}),lastName:Qi().meta({description:"Last name of the user"}),imageUrl:Qi().optional().meta({description:"Profile image URL of the user"})}).meta({description:"Denormalized user details for quick access without additional queries."}),permissions:Bn($s).optional().meta({description:"Base permissions across the team. Can be overridden per promoter or venue. Undefined means no base permissions (permissions come from PermissionScope only).",examples:[["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:Bn(Qi()).optional().meta({description:"Role IDs assigned to this team member. Effective permissions are derived from role nodes plus explicit permission nodes."}),isOwner:xn().meta({description:"Whether this member is the owner of the team. Only one owner per team is allowed. Owner has full control and cannot be deleted."}),access:As.optional().meta({description:"Promoter access summary. Omitted only for legacy/no-access records."}),tenantId:Qi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active team member with base permissions. Permissions can be overridden per promoter or venue. Created when a user accepts an invitation or is directly added to a team."}),ab=Vn({member:ob}),sb=ob.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,user:!0,teamId:!0,permissions:!0,isOwner:!0}).extend({key:Qi().meta({description:"Team identifier (ID or slug)"}),roleIds:Bn(Qi()).min(1).meta({description:"Role IDs assigned to this team member."}),access:xs.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."}),isOwner:ir(!1).optional().meta({description:"Team ownership cannot be assigned when creating a member. External clients sending isOwner: true receive an input validation error; create the non-owner member first, then migrate ownership through POST /teams/{key}/transfer with newOwnerId."})}).meta({description:"Schema for adding an existing user to a team. Requires userId of an existing user account."}),db=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),userId:Qi().meta({description:"User ID of the team member to retrieve"})}),cb=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),query:Qi().optional().meta({description:"Search query to filter members by name or email. Case-insensitive partial match"}),limit:cs("team members"),cursor:Qi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active team members with pagination and search"}),lb=Us(ob,"members"),ub=Vn({key:Qi().meta({description:"Team identifier (ID or slug)"}),newOwnerId:Qi().meta({description:"Team member ID of the new owner. This member must already exist with ACTIVE status."})}).meta({description:"Schema for making an active team member the sole owner of their team."}),pb=Vn({previousOwner:ob.meta({description:"Primary previous owner retained for compatibility. This member keeps their existing access and loses isOwner status. On an idempotent retry after the transfer is already applied, this is the unchanged current owner."}),newOwner:ob.meta({description:"The new owner (now has isOwner: true)"}),demotedOwners:Bn(ob).meta({description:"All previous owners whose isOwner status was cleared by the transfer."})}).meta({description:"Response payload for team ownership transfer operation"}),mb=Vn({id:Qi().meta({description:"Team member ID to update"}),roleIds:Bn(Qi()).min(1).meta({description:"Replace role assignments for this team member with the provided role IDs."}),isOwner:xn().optional().meta({description:"Whether this team member is an owner of the team"}),access:xs.optional().meta({description:"Optional promoter access assignment. Omit to update only role assignments."})}).meta({description:"Schema for updating team member roles. Cannot update teamId, userId, or owner status."});var hb={get:ia.route({method:"GET",path:"/teams/{key}/members/{userId}",summary:"Get team member by user ID",description:"Retrieve a team member using the team key (ID or slug) and user ID",tags:["Team Members"]}).input(db.strict()).output(ab),list:ia.route({method:"GET",path:"/teams/{key}/members",summary:"List team members with cursor-based pagination",description:"Returns active team members for a specific team with cursor pagination. Team key can be ID or slug. For pending invitations, use the team invites endpoint instead.",tags:["Team Members"]}).input(cb.strict()).output(lb),create:ia.route({method:"POST",path:"/teams/{key}/members",summary:"Add an existing user to a team",description:"Directly add an existing user to a team. Team key can be ID or slug. Requires at least one role ID. To invite a new user by email, use the team invites endpoint instead.",tags:["Team Members"]}).input(sb.strict()).output(ab),update:ia.route({method:"PATCH",path:"/teams/{key}/members/{userId}",summary:"Update a team member's roles",description:"Update an existing active team member. Team key can be ID or slug. Replaces role assignments. Cannot modify isOwner (use transfer endpoint instead).",tags:["Team Members"]}).input(mb.extend({key:Qi(),userId:Qi()}).strict()).output(ab),remove:ia.route({method:"DELETE",path:"/teams/{key}/members/{userId}",summary:"Remove a team member",description:"Remove an active member from a team. Team key can be ID or slug. Cannot remove the team owner (transfer ownership first). To cancel pending invitations, use the team invites endpoint.",tags:["Team Members"]}).input(db.strict()).output(ab),transfer:ia.route({method:"POST",path:"/teams/{key}/transfer",summary:"Transfer team ownership",description:"Make an active team member the sole owner. Team key can be ID or slug. A current team owner or tenant administrator can perform this action. The new owner receives the team Admin role, while previous owners keep their existing access and lose only isOwner status.",tags:["Team Members"]}).input(ub.strict()).output(pb)};const fb=er(["ALL","COUNTRY","STATE","CITY","VENUE"]),yb=Vn({id:Qi(),name:Qi(),slug:Qi(),kind:fb,parentId:Qi().optional(),latitude:En().optional(),longitude:En().optional(),radius:En().optional(),enabled:xn(),order:En(),zoom:En().optional(),heroImage:Qi().optional(),description:Qi().optional()}),gb=Vn({tenant:Vn({id:Qi(),name:Qi(),slug:Qi(),adminTeamId:Qi(),legacyTenantsToTeams:Qn(Qi(),Qi()).optional(),features:Qn(Qi(),xn()).optional(),defaultCurrency:Qi(),logo:Vn({email:Vn({src:Qi(),width:En(),height:En()}),website:Vn({src:Qi(),width:En(),height:En()})}),baseUrl:Vn({dev:Qi().optional(),production:Qi().optional()}),publicBaseUrl:Vn({dev:Qi().optional(),sandbox:Qi().optional(),production:Qi().optional()}).optional()}),regions:Bn(yb)}),vb=Vn({regions:Bn(yb)}),bb=Vn({teamId:Qi().optional()}),wb=Vn({counts:Vn({teams:xn(),promoters:xn(),venues:xn(),events:xn(),payouts:xn()})}),$b=Vn({kind:er(["CHECK_IN","CHECK_OUT"]).meta({description:"The most recent attendee scan action."}),scannedAt:Di().meta({description:"Timestamp for the most recent attendee scan."})}),Ib=Vn({key:er("#ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")).meta({description:"Alpha navigation bucket key for attendee roster jumps."}),count:$a().int().min(0).meta({description:"Number of roster rows currently available in this bucket."}),anchor:Qi().meta({description:"Server-issued bookmark for the first roster row in this bucket under the active filters."})}),Eb=qm.pick({id:!0,name:!0,entryEndsAt:!0}),kb=zm.pick({id:!0,name:!0}),Tb=Vn({id:Ba.meta({examples:[wa.Ticket.id],description:"Ticket identifier for this attendee roster row."}),orderId:ja.meta({examples:[wa.Ticket.orderId],description:"Order identifier used to navigate to order details."}),status:Wm.meta({description:"Current ticket status for the attendee row."}),attendee:Gm.meta({description:"Editable attendee identity fields for this ticket."}),admission:Eb.meta({description:"Admission snapshot needed for roster labels and expiry state."}),section:kb.optional().meta({description:"Optional section label shown in the roster row."}),lastScan:$b.optional().meta({description:"Most recent scan event for compact roster activity text."}),lastCheckInAt:Di().optional().meta({description:"Timestamp for the most recent check-in scan, used for checked-in labels."})}),Ab=Vn({eventId:Ua.meta({examples:[wa.Event.id],description:"Event identifier for the attendee roster."}),since:Di().meta({examples:["2026-09-25T10:00:00.000Z"],description:"Return roster rows updated at or after this instant. Pass the previous response's serverTime."}),admissionIds:Bn(za).optional().meta({examples:[[wa.Admission.id]],description:"Optional admission filters, matching the roster list."}),sectionIds:Bn(Wa).optional().meta({examples:[[wa.Section.id]],description:"Optional section filters, matching the roster list."})}),xb=Vn({tickets:Bn(Tb).meta({description:"Roster rows changed since the requested instant, oldest change first."}),truncated:xn().meta({description:"True when more rows changed than one response carries; reload the roster window instead of applying these rows."}),serverTime:Di().meta({description:"Server time for this response; pass it as `since` on the next poll."})}),Sb=Vn({buckets:Bn(Ib).meta({description:"Available attendee alpha buckets for the active filter set."})}),Db=Vn({eventId:Ua.meta({examples:[wa.Event.id],description:"Event identifier for the attendee alpha index."}),admissionIds:Bn(za).optional().meta({examples:[[wa.Admission.id]],description:"Optional admission filters used when computing available attendee buckets."}),sectionIds:Bn(Wa).optional().meta({examples:[[wa.Section.id]],description:"Optional section filters used when computing available attendee buckets."})}),Cb=$a().int().min(1).max(100).prefault(100).meta({examples:[100],description:"Maximum number of attendee roster rows to return per request (1-100, default: 100)."}),Ob=Vn({eventId:Ua.meta({examples:[wa.Event.id],description:"Event identifier for the attendee roster."}),admissionIds:Bn(za).optional().meta({examples:[[wa.Admission.id]],description:"Optional admission filters. When provided, only matching ticket admissions are included."}),sectionIds:Bn(Wa).optional().meta({examples:[[wa.Section.id]],description:"Optional section filters. When provided, only matching ticket sections are included."}),query:Qi().optional().meta({examples:["John","john@example.com","+61400000000"],description:"Optional attendee search query. Matches attendee name, email, and phone."}),cursor:ls.optional(),before:ls.optional().meta({description:"Cursor for loading roster rows before the current window. Mutually exclusive with cursor and anchor."}),anchor:Qi().optional().meta({description:"Server-issued bookmark used to jump to a roster bucket. Mutually exclusive with cursor and before."}),limit:Cb.optional()}),Pb=Us(Tb,"tickets"),Rb=Ym.pick({status:!0,admissionId:!0,orderItemId:!0}).extend({orderId:Qi().meta({examples:[wa.Order.id],description:"The order this ticket belongs to"}),customerId:Qi().meta({examples:[wa.Customer.id],description:"The customer who purchased this ticket"}),attendee:Gm.optional().meta({description:"Optional attendee information - defaults to order customer details if not provided"})}).meta({description:"Schema for creating a new ticket - caller provides minimal input; derived fields are populated by the service"}),_b=Ym.pick({id:!0}).extend({signature:Ts.optional().meta({description:"HMAC signature for public ticket access (16 characters, base64url encoded)"})}).meta({description:"Schema for retrieving a specific ticket by ID with optional signature validation"}),Nb=Vn({promoterId:Qi().optional().meta({examples:[wa.Promoter.id],description:"Filter tickets by promoter/organizer unique identifier (optional)"}),eventId:Qi().optional().meta({examples:[wa.Event.id],description:"Filter tickets by event unique identifier (optional)"}),customerId:Qi().optional().meta({examples:[wa.Customer.id],description:"Filter tickets by customer unique identifier (optional)"}),orderId:Qi().optional().meta({examples:[wa.Order.id],description:"Filter tickets by order unique identifier (optional)"}),status:Wm.optional().meta({examples:["ACTIVE"],description:"Filter tickets by status: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),orderSignature:Ts.optional().meta({description:"Order signature used to access tickets for a specific order without permissions (16 characters, base64url encoded)"}),query:Qi().optional().meta({examples:["John Doe"],description:"Optional search query to filter tickets by customer details. When provided, search-backed pagination is used."}),limit:cs("tickets").optional(),cursor:Qi().optional().meta({examples:["eyJpZCI6InRrdF8wMWpwczVjZ3NnMHMzMncycHI3M3ZiY2NkZSJ9"],description:"Pagination cursor for continuing to fetch subsequent results (optional)"})}).meta({description:"Schema for listing tickets with optional filtering, search, and cursor-based pagination"}),Ub=Us(Ym,"tickets"),Mb=Vn({ticket:Ym}),Lb=Ym.pick({id:!0,eventId:!0}).extend({key:Ym.shape.id.meta({description:"Transition key. Supports canonical ticket IDs (tkt_*) and order IDs (ord_*)."}),deviceId:Ym.shape.scans.element.shape.deviceId.optional().meta({description:"Unique identifier of the scanning device (optional)."}),eventId:Ym.shape.eventId.optional().meta({description:"Optional event scope guard for check-in transitions. When provided, check-in fails if the ticket/order event does not match."}),allowPartialOrderCheckIn:xn().optional().meta({description:"Confirms an order-level check-in when some tickets are already redeemed and some remain active."}),admissionIds:Bn(za).optional().meta({description:"Optional scanner admission filters. When provided, check-in only applies to matching ticket admissions."}),sectionIds:Bn(Wa).optional().meta({description:"Optional scanner section filters. When provided, check-in only applies to matching ticket sections."}),idempotencyKey:Qi().trim().min(1).max(255).optional().meta({description:"Stable client-generated key used to replay a scan request without turning a timed-out success into a duplicate denial."})}).omit({id:!0}).meta({description:"Schema for check-in/check-out transitions addressed by key, where key may resolve to a ticket or order identifier."}),qb=er(["ticket","order"]),Gb=er(["NOOP_TRANSITION"]),jb=er(["PARTIAL_ORDER_CONFIRMATION_REQUIRED"]),Bb=er(["EVENT_MISMATCH"]),Fb=er(["FILTERED_OUT"]),Vb=Vn({id:Ym.shape.orderId,checkedInCount:En().int().nonnegative().optional(),items:Bn(Vn({quantity:En().int().positive()}))}),zb=jm.pick({id:!0,name:!0,slug:!0,entryStartsAt:!0}).extend({teamId:Ym.shape.teamId}),Wb=Yn([Vn({reason:Gb,kind:er(["CHECK_IN","CHECK_OUT"]),targetType:qb,order:Vb.optional(),ticket:Ym.optional()}),Vn({reason:Bb,kind:er(["CHECK_IN","CHECK_OUT"]),targetType:qb,requestedEventId:Ym.shape.eventId.optional(),event:zb,order:Vb.optional(),ticket:Ym.optional()}),Vn({reason:jb,kind:ir("CHECK_IN"),targetType:ir("order"),order:Vb,ticket:Ym.optional()}),Vn({reason:Fb,kind:ir("CHECK_IN"),targetType:qb,order:Vb.optional(),ticket:Ym.optional()})]),Yb=Vn({tickets:Bn(Ym).meta({description:"Transition result tickets. Single-item array for ticket targets and full order tickets for order targets."}),targetType:qb.meta({description:"Resolved target scope from the provided key."}),order:Vb.optional()}),Hb=er(["ACTIVE","CANCELLED"]).describe("Status updates allowed via PATCH: ACTIVE (reactivate), CANCELLED (void). REDEEMED is set via scan endpoint."),Zb=Vn({id:Qi().meta({examples:[wa.Ticket.id],description:"Unique identifier of the ticket to update"}),status:Hb.optional().meta({description:"Update ticket status: CANCELLED to void, ACTIVE to reactivate"}),attendee:Gm.partial().nullable().optional().meta({description:"Attendee info. Pass object to set/update, null to clear, or omit to leave unchanged."}),admissionId:Qi().optional().meta({examples:[wa.Admission.id],description:"Change ticket type/admission (admission and section objects will be fetched from event and stored)"})}).meta({description:"Schema for updating a ticket."}),Kb={id:wa.User.id,createdAt:wa.User.createdAt,updatedAt:wa.User.updatedAt,email:wa.User.email,firstName:wa.User.firstName,lastName:wa.User.lastName,imageUrl:"https://assets.session.services/examples/avatar.jpg",tenantId:wa.User.tenantId},Jb=Vn({id:Qi().readonly().meta({description:"Unique identifier for the user",examples:[wa.User.id]}),createdAt:Di().readonly().meta({description:"ISO 8601 timestamp when the user account was created",examples:[wa.User.createdAt]}),updatedAt:Di().readonly().meta({description:"ISO 8601 timestamp when the user account was last updated",examples:[wa.User.updatedAt]}),email:tn().meta({description:"User's email address, used for authentication and communication",examples:[wa.User.email]}),firstName:Qi().min(1).meta({description:"User's first name",examples:[wa.User.firstName]}),lastName:Qi().min(1).meta({description:"User's last name",examples:[wa.User.lastName]}),imageUrl:an().optional().meta({description:"Optional URL to the user's profile image or avatar",examples:["https://assets.session.services/examples/avatar.jpg"]}),metadata:Qn(Qi(),as).optional().meta({description:"Arbitrary key-value metadata for storing user preferences and settings",examples:[{"widgets:team_abc123":{visibleWidgets:["revenue"]}}]})}).meta({ref:"User",description:"User entity containing profile and audit information scoped to a specific tenant",examples:[Kb]}),Qb=Vn({kind:er(["PROMOTER","VENUE"]).meta({description:"Resource type that the permission scope applies to."}),resourceId:Qi().meta({description:"Promoter or venue identifier for this permission scope."}),permissions:Bn($s).meta({description:"Effective permissions for this resource, including role permissions assigned at the scope."})}).meta({ref:"MePermissionScope",description:"Effective resource-specific permissions for the current user."}),Xb=ob.extend({scopes:Bn(Qb).optional().meta({description:"Resource-specific permissions. Omitted when the membership has no promoter or venue scopes."})}).meta({ref:"MeTeamMember",description:"Team membership for the current user with role-expanded team permissions and separate resource scopes."}),ew=Vn({access:Qi().meta({description:"JWT access token with updated user data"}),refresh:Qi().meta({description:"Refresh token for obtaining new access tokens"})}).meta({ref:"Tokens",description:"Authentication tokens for client session management"}),tw=Vn({user:Jb.meta({description:"The updated user profile"}),tokens:ew.optional().meta({description:"New JWT tokens with updated user data. Present when refresh token was provided in request."})}).meta({ref:"UserUpdateResponse",description:"Response payload for PATCH /users/me containing the updated user profile."}),iw=Vn({deleted:ir(!0).meta({description:"Whether the current user account was deleted."})}).meta({ref:"UserDeleteResponse",description:"Response payload for DELETE /users/me after deleting the current account."}),nw=Vn({user:Jb.nullable().meta({description:"Current authenticated user profile, null if not authenticated"}),isAdmin:xn().meta({description:"Whether the current user has admin privileges for the tenant"}),members:Bn(Xb).meta({description:"All team memberships for the current user within this tenant."})}).meta({ref:"MeResponse",description:"Response payload for GET /users/me providing the current user, tenant admin status, and team memberships.",examples:[{user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",createdAt:"2025-09-19T16:07:46.418Z",updatedAt:"2025-09-19T16:07:46.418Z",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},isAdmin:!0,members:[{id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:"2025-09-25T03:25:46.080Z",updatedAt:"2025-09-25T03:25:46.080Z",teamId:"tem_01jqpjksnsen9vprw95et60t2m",userId:"usr_01k5hbpkfje048zccqmqfhjpep",user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},permissions:["*"],isOwner:!0,tenantId:"tnt_01abc123"}]}]}),rw=Vn({id:Qi().readonly().meta({description:"Unique identifier for the venue"}),createdAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was created"}),updatedAt:Di().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was last updated"}),teamId:Qi().meta({description:"Team that manages this venue"}),locationId:La.meta({examples:["loc_01h2xk3j9k8m2n5p7q9r1s3t4v"],description:"Location identifier for this venue"}),googlePlaceId:Qi().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID when this venue is linked to a Google Places location"}),approval:Ea.meta({examples:["APPROVED"],description:"Approval status of the venue"}),name:Qi().min(3).max(100).meta({description:"Display name of the venue. Must be between 3 and 100 characters"}),slug:Qi().min(3).meta({description:"URL-friendly slug for the venue. Must be unique within tenant"}),description:Qi().optional().meta({description:"Short description of the venue for listings and discovery"}),image:is.optional().meta({description:"Venue image"}),contact:Vn({email:tn().optional().meta({description:"Public contact email for venue inquiries"}),phone:Qi().optional().meta({description:"Public contact phone number"}),website:an().optional().meta({description:"Venue website URL"}),instagram:Qi().optional().meta({description:"Instagram profile URL"}),facebook:Qi().optional().meta({description:"Facebook page URL"}),twitter:Qi().optional().meta({description:"Twitter/X profile URL"}),tiktok:Qi().optional().meta({description:"TikTok profile URL"}),youtube:Qi().optional().meta({description:"YouTube channel URL"})}).optional().meta({description:"Public contact information and social media links"}),location:Bl.omit({venueId:!0}).meta({description:"Physical location details including address, coordinates, and timezone"}),geohash:Qi().meta({description:"Geohash encoding of the venue's location for efficient spatial queries"}),capacity:En().int().min(1).optional().meta({description:"Maximum capacity of the venue (number of attendees)"}),metadata:ss,deletedAt:Di().readonly().optional().meta({description:"Timestamp in ISO 8601 format when the venue was soft-deleted. Null if not deleted"}),tenantId:Qi().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Managed venue with custom branding and details. Teams can claim venues which then appear in location search results."}),ow=rw.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,geohash:!0,deletedAt:!0,location:!0,googlePlaceId:!0,approval:!0}).extend({description:ks.optional().meta({description:"Short description of the venue for listings and discovery"}),slug:Qi().min(3).optional().meta({description:"URL-friendly slug for the venue. If not provided, will be automatically generated from the name. Must be unique within tenant"})}).meta({description:"Schema for creating a new venue. The system automatically derives location details and Google Place ID from the locationId"}),aw=Vn({key:Qi().min(1).meta({description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug",examples:[wa.Venue.id,wa.Venue.slug]})}),sw=Vn({key:Qi().meta({examples:[wa.Venue.id,wa.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"})}),dw=er(["createdAt"]),cw=er(["asc","desc"]),lw=zn({teamId:Qi().max(128).optional().meta({description:"Filter venues by owner team ID"}),approval:Ea.optional().meta({description:"Filter venues by approval status. PENDING: awaiting review, APPROVED: can be used for events, REJECTED: cannot be used"}),query:Qi().max(120).optional().meta({description:"Optional search query for filtering venues by name or slug"}),latitude:$a().min(-90).max(90).optional().meta({description:"Latitude for location-based search. Must be used with longitude"}),longitude:$a().min(-180).max(180).optional().meta({description:"Longitude for location-based search. Must be used with latitude"}),radius:$a().min(1).max(2e4).optional().meta({description:"Search radius in kilometers (1-20000). Requires latitude and longitude"}),sort:dw.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest venues first."}),direction:cw.optional().meta({examples:["desc"],description:"Sort direction for venue lists. Defaults to `desc` when `sort` is provided."}),limit:cs("venues"),cursor:Qi().max(768).optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing venues with pagination, filtering, and location-based search"}),uw=Us(rw,"venues").meta({description:"Paginated response containing venues with cursor for next page"}),pw=Vn({venue:rw}),mw=rw.omit({id:!0,tenantId:!0,teamId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0,geohash:!0}).partial().extend({key:Qi().meta({examples:[wa.Venue.id,wa.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"}),description:ks.nullable().optional().meta({description:"Short description of the venue. Pass null to clear, omit to leave unchanged."}),image:is.nullable().optional().meta({description:"Venue image. Pass null to clear, omit to leave unchanged."}),capacity:En().int().min(1).nullable().optional().meta({description:"Maximum capacity. Pass null to clear, omit to leave unchanged."}),contact:Vn({email:tn().optional(),phone:Qi().optional(),website:an().optional(),instagram:Qi().optional(),facebook:Qi().optional(),twitter:Qi().optional(),tiktok:Qi().optional(),youtube:Qi().optional()}).nullable().optional().meta({description:"Contact information. Pass null to clear all contact fields, omit to leave unchanged."}),googlePlaceId:Qi().nullable().optional().meta({description:"Google Place ID. Pass null to unlink from Google Places, omit to leave unchanged."})}).meta({description:"Schema for updating an existing venue. Cannot change teamId (owner). Pass null to clear optional fields."});zn({id:Qi(),email:tn(),firstName:Qi(),lastName:Qi(),imageUrl:Qi().url().optional(),tenantId:Qi(),createdAt:Qi().datetime(),updatedAt:Qi().datetime()});const hw=er(["ORDER","EVENT","TEAM","TEAM_INVITE"]).meta({description:"Aggregate type this notification belongs to"}),fw=er(["ORDER_CONFIRMATION","REFUND_CONFIRMATION","TICKET_CANCELLATION","ORDER_REMINDER","ORDER_CANCELLATION","ORDER_TIME_CHANGE","ORDER_VENUE_CHANGE","ORDER_TIME_AND_VENUE_CHANGE","ORDER_LOCATION_REVEAL","EVENT_APPROVAL_REQUEST","EVENT_APPROVAL_DECISION","TEAM_INVITE","ORDER_TICKETS_RESEND","INTERNAL_FEEDBACK"]).meta({description:"Notification kind"}),yw=er(["SMS","EMAIL"]).meta({description:"Delivery channel"}),gw=er(["PENDING","PROCESSING","SENT","DELIVERED","FAILED","CANCELLED"]).meta({description:"Current notification status"});function vw(e,t={}){return so({name:"parse_standard_body",signal:t.signal},(async()=>{let i=e.headers.get("content-disposition");if("string"==typeof i){let t=function(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&"string"==typeof t[2])return function(e){try{return decodeURIComponent(e)}catch{return e}}(t[2]);let i=e.match(/filename="((?:\\"|[^"])*)"/i);return i&&"string"==typeof i[1]?i[1].replace(/\\"/g,'"'):void 0}(i)??"blob",n=await e.blob();return new File([n],t,{type:n.type})}let n=e.headers.get("content-type");if(!n||n.startsWith("application/json"))return fo(await e.text());if(n.startsWith("multipart/form-data"))return await e.formData();if(n.startsWith("application/x-www-form-urlencoded")){let t=await e.text();return new URLSearchParams(t)}if(n.startsWith("text/event-stream"))return function(e,t={}){let i,n=(e?.pipeThrough(new TextDecoderStream).pipeThrough(new Uo))?.getReader(),r=!1;return new po((async()=>{i??=oo("consume_event_iterator_stream");try{for(;;){if(void 0===n)return{done:!0,value:void 0};let{done:e,value:t}=await co(i,(()=>n.read()));if(e){if(r)throw new io("Stream was cancelled");return{done:!0,value:void 0}}switch(t.event){case"message":{let e=fo(t.data);return vo(e)&&(e=Bo(e,t)),i?.addEvent("message"),{done:!1,value:e}}case"error":{let e=new Ro({data:fo(t.data)});throw e=Bo(e,t),i?.addEvent("error"),e}case"done":{let e=fo(t.data);return vo(e)&&(e=Bo(e,t)),i?.addEvent("done"),{done:!0,value:e}}default:i?.addEvent("maybe_keepalive")}}}catch(e){throw e instanceof Ro||ao(i,e,t),e}}),(async e=>{try{"next"!==e&&(r=!0,i?.addEvent("cancelled")),await co(i,(()=>n?.cancel()))}catch(e){throw ao(i,e,t),e}finally{i?.end()}}))}(e.body,t);if(n.startsWith("text/plain"))return await e.text();let r=await e.blob();return new File([r],"blob",{type:r.type})}))}function bw(e,t={}){return e.forEach(((e,i)=>{Array.isArray(t[i])?t[i].push(e):t[i]=void 0===t[i]?e:[t[i],e]})),t}function ww(e,t={}){let i=function(e,t=new Headers){for(let[i,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(i,e);else void 0!==n&&t.append(i,n);return t}(e.headers),n=function(e,t,i={}){if(e instanceof ReadableStream)return e;let n=t.get("content-disposition");return t.delete("content-type"),t.delete("content-disposition"),void 0!==e?e instanceof Blob?(t.set("content-type",e.type),t.set("content-length",""+e.size),t.set("content-disposition",n??function(e,t="inline"){return`${t}; filename="${e.replace(/[^\x20-\x7E]/g,"_").replace(/"/g,'\\"')}"; filename*=utf-8''${encodeURIComponent(e).replace(/['()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())).replace(/%(7C|60|5E)/g,((e,t)=>String.fromCharCode(Number.parseInt(t,16))))}`}(e instanceof File?e.name:"blob")),e):e instanceof FormData||e instanceof URLSearchParams?e:lo(e)?(t.set("content-type","text/event-stream"),function(e,t={}){let i,n,r=t.eventIteratorKeepAliveEnabled??!0,o=t.eventIteratorKeepAliveInterval??5e3,a=t.eventIteratorKeepAliveComment??"",s=t.eventIteratorInitialCommentEnabled??!0,d=t.eventIteratorInitialComment??"",c=!1;return new ReadableStream({start(e){n=oo("stream_event_iterator"),s&&e.enqueue(Go({comments:[d]}))},async pull(t){try{r&&(i=setInterval((()=>{t.enqueue(Go({comments:[a]})),n?.addEvent("keepalive")}),o));let s=await co(n,(()=>e.next()));if(clearInterval(i),c)return;let d=Fo(s.value);if(!s.done||void 0!==s.value||void 0!==d){let e=s.done?"done":"message";t.enqueue(Go({...d,event:e,data:yo(s.value)})),n?.addEvent(e)}s.done&&(t.close(),n?.end())}catch(e){if(clearInterval(i),c)return;e instanceof Ro?(t.enqueue(Go({...Fo(e),event:"error",data:yo(e.data)})),n?.addEvent("error"),t.close()):(ao(n,e),t.error(e)),n?.end()}},async cancel(){try{c=!0,clearInterval(i),n?.addEvent("cancelled"),await co(n,(()=>e.return?.()))}catch(e){throw ao(n,e),e}finally{n?.end()}}}).pipeThrough(new TextEncoderStream)}(e,i)):(t.set("content-type","application/json"),yo(e)):void 0}(e.body,i,t);return new Request(e.url,{signal:e.signal,method:e.method,headers:i,body:n})}Vn({id:Xa.meta({examples:[wa.Notification.id],description:"Unique notification identifier"}),createdAt:Di().readonly().meta({examples:[wa.Notification.createdAt],description:"Timestamp when notification was created"}),updatedAt:Di().readonly().meta({examples:[wa.Notification.updatedAt],description:"Timestamp when notification was last updated"}),aggregateType:hw.meta({examples:[wa.Notification.aggregateType]}),aggregateId:Yn([ja,Ua,Ra,Za]).meta({examples:[wa.Notification.aggregateId],description:"Aggregate identifier for the notification owner"}),eventId:Ua.optional().meta({examples:[wa.Notification.eventId],description:"Associated event identifier when applicable"}),kind:fw.meta({examples:[wa.Notification.kind]}),channel:yw.meta({examples:[wa.Notification.channel]}),status:gw.meta({examples:[wa.Notification.status]}),providerMessageId:Qi().optional().meta({examples:[wa.Notification.providerMessageId],description:"Provider message identifier"}),sentAt:Di().optional().meta({examples:[wa.Notification.sentAt],description:"Timestamp when provider accepted send request"}),deliveredAt:Di().optional().meta({examples:[wa.Notification.deliveredAt],description:"Timestamp when provider confirmed delivery"}),failedAt:Di().optional().meta({examples:[wa.Notification.failedAt],description:"Timestamp when notification failed"}),failureCode:Qi().optional().meta({examples:[wa.Notification.failureCode],description:"Failure code when notification is FAILED"}),failureReason:Qi().optional().meta({examples:[wa.Notification.failureReason],description:"Failure reason when notification is FAILED"})}).meta({description:"Notification delivery record"}),Vn({id:Ha.meta({description:"Team member ID to delete"})});var $w=class{plugins;constructor(e=[]){this.plugins=[...e].sort(((e,t)=>(e.order??0)-(t.order??0)))}init(e){for(let t of this.plugins)t.init?.(e)}},Iw=class{constructor(e,t,i={}){this.codec=e,this.sender=t,new $w(i.plugins).init(i),this.interceptors=eo(i.interceptors),this.clientInterceptors=eo(i.clientInterceptors)}interceptors;clientInterceptors;call(e,t,i){return so({name:`${to}.${e.join("/")}`,signal:i.signal},(n=>(n?.setAttribute("rpc.system",to),n?.setAttribute("rpc.method",e.join(".")),lo(t)&&(t=mo({name:"consume_event_iterator_input",signal:i.signal},t)),ho(this.interceptors,{...i,path:e,input:t},(async({path:e,input:t,...i})=>{let r,o=ro(),a=o?.trace.getActiveSpan()??n;a&&o&&(r=o?.trace.setSpan(o.context.active(),a));let s=await so({name:"encode_request",context:r},(()=>this.codec.encode(e,t,i))),d=await ho(this.clientInterceptors,{...i,input:t,path:e,request:s},(({input:e,path:t,request:i,...n})=>so({name:"send_request",signal:n.signal,context:r},(()=>this.sender.call(i,n,t,e))))),c=await so({name:"decode_response",context:r},(()=>this.codec.decode(d,i,e,t)));return lo(c)?mo({name:"consume_event_iterator_output",signal:i.signal},c):c})))))}};function Ew(e){return"/"+e.map(encodeURIComponent).join("/")}var kw=class extends $w{initRuntimeAdapter(e){for(let t of this.plugins)t.initRuntimeAdapter?.(e)}},Tw=class{fetch;toFetchRequestOptions;adapterInterceptors;constructor(e){new kw(e.plugins).initRuntimeAdapter(e),this.fetch=e.fetch??globalThis.fetch.bind(globalThis),this.toFetchRequestOptions=e,this.adapterInterceptors=eo(e.adapterInterceptors)}async call(e,t,i,n){let r=ww(e,this.toFetchRequestOptions);return function(e,t={}){return{body:no((()=>vw(e,t))),status:e.status,get headers(){let t=bw(e.headers);return Object.defineProperty(this,"headers",{value:t,writable:!0}),t},set headers(e){Object.defineProperty(this,"headers",{value:e,writable:!0})}}}(await ho(this.adapterInterceptors,{...t,request:r,path:i,input:n,init:{redirect:"manual"}},(({request:e,path:t,input:i,init:n,...r})=>this.fetch(e,n,r,t,i))),{signal:r.signal})}},Aw=class{maxArrayIndex;constructor(e={}){this.maxArrayIndex=e.maxBracketNotationArrayIndex??9999}serialize(e,t=[],i=[]){if(Array.isArray(e))e.forEach(((e,n)=>{this.serialize(e,[...t,n],i)}));else if(go(e))for(let n in e)this.serialize(e[n],[...t,n],i);else i.push([this.stringifyPath(t),e]);return i}deserialize(e){if(0===e.length)return{};let t=new WeakSet,i={value:[]};for(let[n,r]of e){let e=this.parsePath(n),o=i,a="value";e.forEach(((i,n)=>{!Array.isArray(o[a])&&!go(o[a])&&(o[a]=[]),n===e.length-1?Array.isArray(o[a])&&(""===i?o[a].length&&!t.has(o[a])&&(o[a]=Sw(o[a])):t.has(o[a])?(t.delete(o[a]),o[a]=Dw(o[a])):xw(i,this.maxArrayIndex)||(o[a]=Sw(o[a]))):Array.isArray(o[a])&&!xw(i,this.maxArrayIndex)&&(t.has(o[a])?(t.delete(o[a]),o[a]=Dw(o[a])):o[a]=Sw(o[a])),o=o[a],a=i})),Array.isArray(o)&&""===a?(t.add(o),o.push(r)):a in o?Array.isArray(o[a])?o[a].push(r):o[a]=[o[a],r]:o[a]=r}return i.value}stringifyPath(e){return e.map((e=>(""+e).replace(/[\\[\]]/g,(e=>{switch(e){case"\\":return"\\\\";case"[":return"\\[";case"]":return"\\]";default:return e}})))).reduce(((e,t,i)=>0===i?t:`${e}[${t}]`),"")}parsePath(e){let t=[],i=!1,n="",r=0;for(let o=0;o<e.length;o++){let a=e[o],s=e[o+1];!i||"]"!==a||void 0!==s&&"["!==s||r%2!=0?0===t.length&&"["===a&&r%2==0?(i=!0,t.push(n),n=""):"\\"===a?r++:(n+="\\".repeat(r/2)+a,r=0):(void 0===s&&(i=!1),t.push(n),n="",o++)}return i||0===t.length?[e]:t}};function xw(e,t){return/^0$|^[1-9]\d*$/.test(e)&&Number(e)<=t}function Sw(e){let t=new wo;return e.forEach(((e,i)=>{t[i]=e})),t}function Dw(e){let t=new wo;return t[""]=1===e.length?e[0]:e,t}var Cw=class{customSerializers;constructor(e={}){this.customSerializers=e.customJsonSerializers??[]}serialize(e,t={value:!1}){for(let i of this.customSerializers)if(i.condition(e))return this.serialize(i.serialize(e),t);if(e instanceof Blob)return t.value=!0,[e,t.value];if(e instanceof Set)return this.serialize(Array.from(e),t);if(e instanceof Map)return this.serialize(Array.from(e.entries()),t);if(Array.isArray(e))return[e.map((e=>void 0===e?null:this.serialize(e,t)[0])),t.value];if(go(e)){let i={};for(let n in e)"toJSON"===n&&"function"==typeof e[n]||(i[n]=this.serialize(e[n],t)[0]);return[i,t.value]}return"bigint"==typeof e||e instanceof RegExp||e instanceof URL?[""+e,t.value]:e instanceof Date?[Number.isNaN(e.getTime())?null:e.toISOString(),t.value]:Number.isNaN(e)?[null,t.value]:[e,t.value]}};function Ow(e){return"/"+e.replace(/\/{2,}/g,"/").replace(/^\/|\/$/g,"")}function Pw(e){return e?Ow(e).match(/\/\{[^}]+\}/g)?.map((e=>({raw:e,name:e.match(/\{\+?([^}]+)\}/)[1]}))):void 0}var Rw=class{constructor(e,t,i){this.contract=e,this.serializer=t,this.baseUrl=i.url,this.headers=i.headers??{},this.customErrorResponseBodyDecoder=i.customErrorResponseBodyDecoder}baseUrl;headers;customErrorResponseBodyDecoder;async encode(e,t,i){let n=function(e){return"function"==typeof e.forEach?bw(e):e}(await $o(this.headers,i,e,t));void 0!==i.lastEventId&&(n=Vo(n,{"last-event-id":i.lastEventId}));let r=await $o(this.baseUrl,i,e,t),o=bo(this.contract,e);if(!Zo(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+e.join("."));return"compact"===ra("defaultInputStructure",o["~orpc"].route.inputStructure)?this.#e(o,e,t,i,r,n):this.#t(o,e,t,i,r,n)}#e(e,t,i,n,r,o){let a=Ow(e["~orpc"].route.path??Ew(t)),s=i,d=Pw(a);if(d?.length){if(!go(i))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "compact" structure when has dynamic params at ${t.join(".")}.`);let e={...i};for(let t of d)a=a.replace(t.raw,"/"+encodeURIComponent(""+this.serializer.serialize(i[t.name]))),delete e[t.name];s=Object.keys(e).length?e:void 0}let c=ra("defaultMethod",e["~orpc"].route.method),l=new URL(r);if(l.pathname=`${l.pathname.replace(/\/$/,"")}${a}`,"GET"===c){let e=this.serializer.serialize(s,{outputFormat:"URLSearchParams"});for(let[t,i]of e)l.searchParams.append(t,i);return{url:l,method:c,headers:o,body:void 0,signal:n.signal}}return{url:l,method:c,headers:o,body:this.serializer.serialize(s),signal:n.signal}}#t(e,t,i,n,r,o){let a=Ow(e["~orpc"].route.path??Ew(t)),s=Pw(a);if(!go(i)&&void 0!==i)throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "detailed" structure at ${t.join(".")}.`);if(s?.length){if(!go(i?.params))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.params shape for "detailed" structure when has dynamic params at ${t.join(".")}.`);for(let e of s)a=a.replace(e.raw,"/"+encodeURIComponent(""+this.serializer.serialize(i.params[e.name])))}let d=o;if(void 0!==i?.headers){if(!go(i.headers))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.headers shape for "detailed" structure at ${t.join(".")}.`);d=Vo(i.headers,o)}let c=ra("defaultMethod",e["~orpc"].route.method),l=new URL(r);if(l.pathname=`${l.pathname.replace(/\/$/,"")}${a}`,void 0!==i?.query){let e=this.serializer.serialize(i.query,{outputFormat:"URLSearchParams"});for(let[t,i]of e)l.searchParams.append(t,i)}return"GET"===c?{url:l,method:c,headers:d,body:void 0,signal:n.signal}:{url:l,method:c,headers:d,body:this.serializer.serialize(i?.body),signal:n.signal}}async decode(e,t,i){let n=!So(e.status),r=await(async()=>{let t=!1;try{let i=await e.body();return t=!0,this.serializer.deserialize(i)}catch(e){throw Error(t?"Invalid OpenAPI response format.":"Cannot parse response body, please check the response body and content-type.",{cause:e})}})();if(!n)throw this.customErrorResponseBodyDecoder?.(r,e)??(Do(r)?Co(r):new Ao(function(e){return Object.entries(ko).find((([,t])=>t.status===e))?.[0]??"MALFORMED_ORPC_ERROR_RESPONSE"}(e.status),{status:e.status,data:{...e,body:r}}));let o=bo(this.contract,i);if(!Zo(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+i.join("."));return"compact"===ra("defaultOutputStructure",o["~orpc"].route.outputStructure)?r:{status:e.status,headers:e.headers,body:r}}},_w=class{constructor(e,t){this.jsonSerializer=e,this.bracketNotation=t}serialize(e,t={}){return lo(e)&&!t.outputFormat?zo(e,{value:async e=>this.#e(e,{outputFormat:"plain"}),error:async e=>new Ro({data:this.#e(xo(e).toJSON(),{outputFormat:"plain"}),cause:e})}):this.#e(e,t)}#e(e,t){let[i,n]=this.jsonSerializer.serialize(e);if("plain"===t.outputFormat)return i;if("URLSearchParams"===t.outputFormat){let e=new URLSearchParams;for(let[t,n]of this.bracketNotation.serialize(i))("string"==typeof n||"number"==typeof n||"boolean"==typeof n)&&e.append(t,""+n);return e}if(i instanceof Blob||void 0===i||!n)return i;let r=new FormData;for(let[e,t]of this.bracketNotation.serialize(i))"string"==typeof t||"number"==typeof t||"boolean"==typeof t?r.append(e,""+t):t instanceof Blob&&r.append(e,t);return r}deserialize(e){return e instanceof URLSearchParams||e instanceof FormData?this.bracketNotation.deserialize(Array.from(e.entries())):lo(e)?zo(e,{value:async e=>e,error:async e=>e instanceof Ro&&Do(e.data)?Co(e.data,{cause:e}):e}):e}},Nw=class extends Iw{constructor(e,t,i){super(new Rw(e,new _w(new Cw(i),new Aw({maxBracketNotationArrayIndex:4294967294})),i),t,i)}},Uw=class extends Nw{constructor(e,t){super(e,new Tw(t),t)}};const Mw=ia.route({method:"GET",path:"/events/{eventId}/admissions/{id}",summary:"Get admission by ID",tags:["Admissions"]}).input(_s.strict()).output(Bs),Lw=ia.route({method:"POST",path:"/events/{eventId}/admissions",summary:"Create a new admission",tags:["Admissions"]}).input(Ps.strict()).output(Bs),qw=ia.route({method:"PUT",path:"/events/{eventId}/admissions/{id}",summary:"Update an admission",tags:["Admissions"]}).input(Fs.strict()).output(Bs);var Gw={get:Mw,list:ia.route({method:"GET",path:"/events/{eventId}/admissions",summary:"List admissions",description:"Returns admissions with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Admissions"]}).input(Ns.strict()).output(Ms),create:Lw,update:qw,remove:ia.route({method:"DELETE",path:"/events/{eventId}/admissions/{id}",summary:"Delete an admission",tags:["Admissions"]}).input(Rs.strict()).output(Bs),quote:ia.route({method:"POST",path:"/events/{eventId}/admissions/quote",summary:"Create an admission quote",tags:["Admissions"]}).input(Gs.strict()).output(js)};const jw={BAD_REQUEST:{status:400,data:Vn({unresolvedRequired:Bn(Qi()),unresolvedOptional:Bn(Qi()).optional(),issues:Bn(Qi()).optional()}).optional()}};var Bw={track:ia.route({method:"POST",path:"/analytics/track",summary:"Track event",tags:["Analytics"]}).input(Jc).errors(jw).output(Hc),page:ia.route({method:"POST",path:"/analytics/page",summary:"Page event",tags:["Analytics"]}).input(Jc).errors(jw).output(Hc),identify:ia.route({method:"POST",path:"/analytics/identify",summary:"Identify event",tags:["Analytics"]}).input(Jc).errors(jw).output(Hc),alias:ia.route({method:"POST",path:"/analytics/alias",summary:"Alias event",tags:["Analytics"]}).input(Jc).errors(jw).output(Hc),group:ia.route({method:"POST",path:"/analytics/group",summary:"Group event",tags:["Analytics"]}).input(Jc).errors(jw).output(Hc),screen:ia.route({method:"POST",path:"/analytics/screen",summary:"Screen event",tags:["Analytics"]}).input(Jc).errors(jw).output(Hc)};const Fw=Vn({expected:Qi(),actual:Qi()}),Vw=Vn({currency:Aa.meta({description:"Currency already assigned to another payout account"})}).meta({description:"Details about a conflicting beneficiary payout account"}),zw=ia.route({method:"GET",path:"/beneficiaries/{id}",summary:"Get beneficiary by ID",tags:["Beneficiaries"]}).input(ol.strict()).output(cl),Ww=ia.route({method:"POST",path:"/beneficiaries",summary:"Create a new beneficiary",tags:["Beneficiaries"]}).input(rl.strict()).errors({BAD_REQUEST:{status:400,data:Fw.optional()},CONFLICT:{status:409,data:Vw}}).output(cl);var Yw={get:zw,list:ia.route({method:"GET",path:"/beneficiaries",summary:"List beneficiaries with cursor-based pagination",description:"Returns beneficiary data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Beneficiaries"]}).input(sl.strict()).output(dl),create:Ww,remove:ia.route({method:"DELETE",path:"/beneficiaries/{id}",summary:"Delete a beneficiary",tags:["Beneficiaries"]}).input(al.strict()).output(cl),schema:vl,validate:Il};const Hw=Yn([Vn({field:ir("code"),reason:ir("taken"),value:Qi()}),Vn({code:Qi()})]),Zw=ia.route({method:"GET",path:"/coupon-codes/{id}",summary:"Get coupon code by ID",tags:["Coupon Codes"]}).input(xl.strict()).output(Rl),Kw=ia.route({method:"POST",path:"/coupon-codes",summary:"Create a new coupon code",tags:["Coupon Codes"]}).input(Sl.strict()).errors({CONFLICT:{status:409,data:Hw.optional()}}).output(Rl),Jw=ia.route({method:"PUT",path:"/coupon-codes/{id}",summary:"Update a coupon code",tags:["Coupon Codes"]}).input(Dl.strict()).output(Rl);var Qw={get:Zw,list:ia.route({method:"GET",path:"/coupon-codes",summary:"List coupon codes with cursor-based pagination",description:"Returns coupon code data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupon Codes"]}).input(Ol.strict()).output(Pl),create:Kw,update:Jw,remove:ia.route({method:"DELETE",path:"/coupon-codes/{id}",summary:"Delete a coupon code",tags:["Coupon Codes"]}).input(Cl.strict()).output(Rl)};const Xw=Vn({committedAndHeldUses:En(),requestedLimit:En()}),e$=ia.route({method:"GET",path:"/coupons/{id}",summary:"Get coupon by ID",tags:["Coupons"]}).input(Nl.strict()).output(ql),t$=ia.route({method:"POST",path:"/coupons",summary:"Create a new coupon",tags:["Coupons"]}).input(_l).output(ql),i$=ia.route({method:"PUT",path:"/coupons/{id}",summary:"Update a coupon",tags:["Coupons"]}).input(Gl).errors({BAD_REQUEST:{status:400,data:Xw.optional()}}).output(ql);var n$={get:e$,list:ia.route({method:"GET",path:"/coupons",summary:"List coupons with cursor-based pagination",description:"Returns coupon data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupons"]}).input(Ml.strict()).output(Ll),create:t$,update:i$,remove:ia.route({method:"DELETE",path:"/coupons/{id}",summary:"Delete a coupon",tags:["Coupons"]}).input(Ul.strict()).output(ql),code:Qw};const r$=Vn({eventId:Ua.optional().meta({description:"Event ID for rate limiting and change detection. If provided, suggestions are limited to once per day per event and only if the description changed significantly.",examples:[wa.Event.id]}),description:Qi().min(100).max(1e4).meta({description:"Event description to analyze for genre and category suggestions. Minimum 100 characters required for meaningful AI analysis.",examples:["Join us for an all-night warehouse party featuring the best in tech house and melodic techno. BYO drinks, intimate vibes, and a killer sound system."]}),eventName:Qi().optional().meta({description:"Optional event name for additional context",examples:["Warehouse Sessions Vol. 5"]}),imageUrl:an().optional().meta({description:"Optional event artwork URL for visual analysis (multimodal)",examples:["https://assets.session.services/events/poster.jpg"]})}).meta({description:"Input for AI-powered event tag suggestions"}),o$=Vn({genres:Bn(Ca).max(5).meta({description:"Suggested music genres based on event description and artwork",examples:[["Tech House","Melodic Techno"]]}),categories:Bn(Sa).max(10).meta({description:"Suggested event categories based on description and artwork",examples:[["Warehouse","Underground","BYO"]]}),confidence:En().min(0).max(1).meta({description:"AI confidence score for the suggestions (0-1)",examples:[.85]}),startDate:Qi().optional().meta({description:"Event start date/time. Either ISO 8601 format (if specific date found) or natural language hint for relative dates (e.g., 'next Saturday 9pm').",examples:["2025-02-15T21:00:00","next Saturday 9pm"]}),endDate:Qi().optional().meta({description:"Event end date/time. Either ISO 8601 format (if specific date found) or natural language hint.",examples:["2025-02-16T04:00:00","6am Sunday"]}),venueName:Qi().optional().meta({description:"Venue or location name extracted from the description or artwork. Used to search for and prefill the event location.",examples:["Warehouse 21","The Metro Theatre"]}),ticketUrl:an().optional().meta({description:"External ticket purchase URL if found in the description. Only extracted if different from the host platform.",examples:["https://www.eventbrite.com/e/warehouse-sessions-tickets-123"]})}).meta({description:"AI-generated genre and category suggestions for an event"});Vn({estimatedInputTokens:En().int().meta({description:"Estimated input tokens for the request",examples:[500]}),estimatedOutputTokens:En().int().meta({description:"Estimated output tokens for the response",examples:[100]}),estimatedCostUsd:En().meta({description:"Estimated cost in USD",examples:[.002]}),includesImage:xn().meta({description:"Whether the estimate includes image analysis",examples:[!0]})}).meta({description:"Cost estimate for an AI tag suggestion request"});var a$={suggestTags:ia.route({method:"POST",path:"/events/tags",summary:"Suggest event genres and categories",description:"Uses AI to analyze event description and optional artwork to suggest relevant music genres and event categories. Returns up to 5 genres and 10 categories with a confidence score.",tags:["Events"]}).input(r$.strict()).output(o$)};const s$=Vn({eventId:Ua.meta({description:"Event to like"})}).meta({description:"Request to like an event"}),d$=Vn({limit:cs("likes"),cursor:Qi().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing the current user's liked events with pagination. Returns events sorted by most recently liked first."}),c$=Vn({tenantId:Qi().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),userId:qa.readonly().meta({description:"User who liked the event"}),eventId:Ua.meta({description:"Event the user liked"}),createdAt:Di().readonly().meta({description:"Timestamp when the user liked the event"})}).meta({description:"Represents a user's like on an event. Used for tracking popular events and building personalized recommendations."}),l$=Us(c$,"likes").meta({description:"Paginated list of event likes. Use cursor-based pagination to navigate through results."}),u$=Vn({eventId:Ua.meta({description:"Event to remove like from"})}).meta({description:"Request to remove the current user's like from an event"}),p$=Vn({like:c$});var m$={add:ia.route({method:"POST",path:"/events/{eventId}/like",summary:"Like an event",description:"Like an event as the current user. Atomically increments the event's likes counter.",tags:["Events"]}).input(s$).output(p$),remove:ia.route({method:"DELETE",path:"/events/{eventId}/like",summary:"Remove like from an event",description:"Remove the current user's like from an event. Atomically decrements the event's likes counter.",tags:["Events"]}).input(u$).output(Ln()),list:ia.route({method:"GET",path:"/events/likes",summary:"List liked events",description:"List all events the current user has liked, with cursor-based pagination.",tags:["Events"]}).input(d$).output(l$)};const h$=Pd.extend({limit:$a().min(1).max(100).optional().default(10)}),f$=Cd.extend({limit:$a().min(1).max(100).optional().default(10)}),y$=Ld.extend({limit:$a().min(1).max(100).optional().default(10)}),g$=_d.extend({limit:$a().min(1).max(100).optional().default(10)}),v$=Ud.extend({limit:$a().min(1).max(100).optional().default(10)}),b$=Gd.extend({limit:$a().min(1).max(100).optional().default(10)}),w$=Bd.extend({limit:$a().min(1).max(100).optional().default(10)}),$$=Zd.extend({limit:$a().min(1).max(50).optional().default(10)}),I$=Jd.extend({includeAdmission:Ia().optional().default(!0),includeSection:Ia().optional().default(!0)}),E$=ic.extend({}),k$=ia.route({method:"GET",path:"/events/{eventId}/performance/summary",summary:"Get event performance summary",description:"Top-level KPI metrics with period comparison based on tracking events",tags:["Event Performance"]}).input(yd).output(gd),T$=ia.route({method:"GET",path:"/events/{eventId}/performance/tickets",summary:"Get ticket sales performance",description:"Time series of sold tickets and successful-order revenue by period, with admission and section breakdowns",tags:["Event Performance"]}).input(vd).output(bd),A$=ia.route({method:"GET",path:"/events/{eventId}/performance/timeseries",summary:"Get event metric time series",description:"Per-bucket series of revenue, tickets, orders, page views, visitors, and conversion rate for the selected range",tags:["Event Performance"]}).input($d).output(Id),x$=ia.route({method:"GET",path:"/events/{eventId}/performance/funnel",summary:"Get sales funnel performance",description:"Conversion funnel showing drop-off at each stage from tracking events",tags:["Event Performance"]}).input(Ed).output(kd),S$=ia.route({method:"GET",path:"/events/{eventId}/performance/campaigns",summary:"Get campaign performance",description:"Marketing campaign metrics from tracking events (UTM campaign parameter)",tags:["Event Performance"]}).input(h$).output(Rd),D$=ia.route({method:"GET",path:"/events/{eventId}/performance/coupons",summary:"Get coupon performance",description:"Coupon usage and revenue from actual order data",tags:["Event Performance"]}).input(f$).output(Od),C$=ia.route({method:"GET",path:"/events/{eventId}/performance/mediums",summary:"Get traffic medium performance",description:"Performance by traffic medium (social, email, cpc) from tracking events",tags:["Event Performance"]}).input(g$).output(Nd),O$=ia.route({method:"GET",path:"/events/{eventId}/performance/devices",summary:"Get device performance",description:"Performance breakdown by device type from tracking events",tags:["Event Performance"]}).input(v$).output(Md),P$=ia.route({method:"GET",path:"/events/{eventId}/performance/browsers",summary:"Get browser performance",description:"Traffic breakdown by browser from tracking events",tags:["Event Performance"]}).input(y$).output(qd),R$=ia.route({method:"GET",path:"/events/{eventId}/performance/locations",summary:"Get geographic performance",description:"Performance by geographic location from tracking events",tags:["Event Performance"]}).input(b$).output(jd),_$=ia.route({method:"GET",path:"/events/{eventId}/performance/traffic",summary:"Get traffic source performance",description:"Top referral sources and channels from tracking events",tags:["Event Performance"]}).input(w$).output(Fd),N$=ia.route({method:"GET",path:"/events/{eventId}/performance/attendance",summary:"Get event attendance statistics",description:"Check-in statistics and attendance breakdown by admission and section",tags:["Event Performance"]}).input(Vd).output(Hd),U$=ia.route({method:"GET",path:"/events/{eventId}/performance/scanners",summary:"Get door staff scanner activity",description:"Ranked check-in activity by scanner for post-event door staff analytics",tags:["Event Performance"]}).input($$).output(Kd),M$=ia.route({method:"GET",path:"/events/{eventId}/performance/turnout",summary:"Get event turnout analysis",description:"Post-event sold versus checked-in tickets by admission and section",tags:["Event Performance"]}).input(I$).output(tc),L$=ia.route({method:"GET",path:"/events/{eventId}/performance/pace",summary:"Get event check-in pace",description:"Post-event check-in flow over the admission entry window with peak door volume",tags:["Event Performance"]}).input(E$).output(nc);var q$={couponAttendance:ia.route({method:"GET",path:"/events/{eventId}/performance/coupon-attendance",summary:"Get check-in attendance by coupon code",tags:["Event Performance"]}).input(Vs).output(Ws),summary:k$,tickets:T$,timeseries:A$,funnel:x$,campaigns:S$,coupons:D$,mediums:C$,devices:O$,browsers:P$,locations:R$,traffic:_$,attendance:N$,scanners:U$,turnout:M$,pace:L$};const G$=ia.route({method:"GET",path:"/events/slugs",summary:"List event slugs",description:"List current event slugs with the same filters and access rules as event lists. Supports skip/limit pagination for sitemap generation.",tags:["Events"]}).input(qu).output(Gu),j$=ia.route({method:"GET",path:"/events/{key}",summary:"Get event by ID or slug",description:"Retrieve an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(Cu).output(nu),B$=ia.route({method:"POST",path:"/events",summary:"Create a new event",tags:["Events"]}).input(Au.strict()).output(Lu),F$=ia.route({method:"POST",path:"/events/{key}/duplicate",summary:"Duplicate an event",description:"Create a new event by copying event details, sections, and admissions from an existing event.",tags:["Events"]}).input(Su.strict()).output(Lu),V$=ia.route({method:"PUT",path:"/events/{key}",summary:"Update an event",description:"Update an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(Bu.strict()).output(Lu),z$={get:ia.route({method:"GET",path:"/events/{key}/approval",summary:"Get event approval status",description:"Get internal event approval status and reviewer feedback. Requires event.read permission on the event owner team.",tags:["Events"]}).input(ou.strict()).output(su),request:ia.route({method:"POST",path:"/events/{key}/approval/request",summary:"Request event approval",description:"Request or resubmit event approval. Requires event.write permission on the event owner team.",tags:["Events"]}).input(du.strict()).output(Lu),update:ia.route({method:"PUT",path:"/events/{key}/approval",summary:"Approve or reject an event",description:"Approve or reject an event. Requires event.write permission on the tenant admin team.",tags:["Events"]}).input(cu.strict()).output(Lu)};var W$={slugs:G$,get:j$,list:ia.route({method:"GET",path:"/events",summary:"List events",description:"List events with filters for status, approval, visibility, and promoter. Supports full‑text search (query), geo search (latitude/longitude/radius), and cursor-based pagination.",tags:["Events"]}).input(Nu).output(Mu),create:B$,duplicate:F$,update:V$,approval:z$,remove:ia.route({method:"DELETE",path:"/events/{key}",summary:"Delete an event",description:"Delete an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(xu.strict()).output(Lu),feature:ia.route({method:"POST",path:"/events/{key}/feature",summary:"Toggle event featured status",description:"Set or remove featured status on an event. Tenant admin only.",tags:["Events"]}).input(Du.strict()).output(Lu),like:m$,performance:q$,tags:a$.suggestTags},Y$={get:ia.route({method:"GET",path:"/events/{eventId}/collaborators/{id}",summary:"Get event collaborator by ID",description:"Retrieve an active event collaboration by its unique ID. Returns the collaborator record with promoter and permission details.",tags:["Event Collaborators"]}).input(Yu.strict()).output(Ju),list:ia.route({method:"GET",path:"/events/{eventId}/collaborators",summary:"List active event collaborators with cursor-based pagination",description:"Returns active event collaborations for a specific event with cursor pagination. Only shows accepted collaborators. For pending invitations, use the invite endpoints.",tags:["Event Collaborators"]}).input(Zu.strict()).output(Ku),create:ia.route({method:"POST",path:"/events/{eventId}/collaborators",summary:"Invite a promoter to collaborate on an event",description:"Send a collaboration invitation to a promoter (can be from a different team). Enables cross-team promoter-to-promoter collaboration. Creates a pending invitation with a secure token that expires in 7 days. The invited promoter must accept to create an active collaboration.",tags:["Event Collaborators"]}).input(Wu.strict()).output(Hu),accept:ia.route({method:"POST",path:"/events/{eventId}/collaborators/{id}/accept",summary:"Accept an event collaboration invitation",description:"Accept a pending event collaboration invitation. User must be a member of the invited promoter's team. Deletes the invitation and creates an active collaboration record.",tags:["Event Collaborators"]}).input(Vu.strict()).output(Ju),remove:ia.route({method:"DELETE",path:"/events/{eventId}/collaborators/{id}",summary:"Remove active event collaboration",description:"Remove an active collaboration (hard delete). Can be done by event team members or the collaborating team members. This completely removes access.",tags:["Event Collaborators"]}).input(Yu.strict()).output(Ln())},H$={list:ia.route({method:"GET",path:"/integrations",tags:["Integrations"],summary:"List team integrations"}).input(tp).output(ip),get:ia.route({method:"GET",path:"/integrations/{id}",tags:["Integrations"],summary:"Get an integration"}).input(np).output(ep),create:ia.route({method:"POST",path:"/integrations",tags:["Integrations"],summary:"Connect a team integration"}).input(rp).output(ep).errors({BAD_GATEWAY:{status:502}}),update:ia.route({method:"PATCH",path:"/integrations/{id}",tags:["Integrations"],summary:"Update the shared integration settings"}).input(op).output(ep).errors({BAD_GATEWAY:{status:502}}),remove:ia.route({method:"DELETE",path:"/integrations/{id}",tags:["Integrations"],summary:"Disconnect an integration"}).input(ap).output(ep),backfills:ia.route({method:"GET",path:"/integrations/{id}/backfills",tags:["Integrations"],summary:"Get recent import progress"}).input(np).output(Bn(sp)),requestBackfill:ia.route({method:"POST",path:"/integrations/{id}/backfills",tags:["Integrations"],summary:"Request a historical import"}).input(dp).output(sp),retryBackfill:ia.route({method:"POST",path:"/integrations/{id}/backfills/{jobId}/retry",tags:["Integrations"],summary:"Retry an interrupted import"}).input(cp).output(sp)};const Z$=Vn({language:Qi().trim().max(80).optional(),platform:Qi().trim().max(120).optional(),timezone:Qi().trim().max(120).optional(),userAgent:Qi().trim().max(800).optional(),viewport:Vn({width:En().int().positive().max(1e4),height:En().int().positive().max(1e4),devicePixelRatio:En().positive().max(10).optional()}).optional()}),K$=Vn({key:Qi().trim().min(1),message:Qi().trim().min(10).max(4e3),pageUrl:an().max(2e3),pageTitle:Qi().trim().max(300).optional(),browser:Z$.optional()}),J$=Vn({ok:ir(!0)}),Q$=Vn({file:new Pn({type:"any"}).describe("Image file to upload (max 10MB)"),folder:er(["avatars","events","teams","promoters","venues"]).describe("Folder to upload to"),width:$a().int().positive().optional().describe("Target width in pixels"),height:$a().int().positive().optional().describe("Target height in pixels")}),X$=is,eI=ia.route({method:"POST",path:"/internal/upload/image",summary:"Upload and compress image",description:"Upload an image file (PNG, JPEG, or SVG), optionally resize it, and compress it for web. SVG files are rasterized before publication. Returns the uploaded image URL and metadata.",tags:["Internal"]}).input(Q$.strict()).output(X$);var tI={shareFeedback:ia.route({method:"POST",path:"/internal/feedback",summary:"Share product feedback",description:"Send authenticated tenant dashboard feedback to the Sessions team.",tags:["Internal"]}).input(K$.strict()).output(J$),uploadImage:eI},iI={list:ia.route({method:"GET",path:"/locations",summary:"Search for locations",description:"Search for locations by query. Returns predictions with venue badges for locations that are managed venues on the platform. The query parameter is required.",tags:["Locations"]}).input(up.strict()).output(mp).errors({BAD_GATEWAY:{status:502}}),get:ia.route({method:"GET",path:"/locations/{key}",summary:"Get location details",description:"Fetch full location details including coordinates, timezone, and photo. Accepts location ID or provider identifier (e.g., Google Place ID). Uses cache-first strategy.",tags:["Locations"]}).input(lp.strict()).output(hp).errors({BAD_GATEWAY:{status:502}})};const nI=ia.route({method:"POST",path:"/membership/programs/current",summary:"Get a team's current membership program",description:"Returns the one non-retired membership program for a team. Responds NOT_FOUND when the team sells no membership.",tags:["Membership"]}).input(kp).output(Tp),rI=ia.route({method:"POST",path:"/account/membership/payment-session",summary:"Prepare the payment form for the current buyer",description:"Ensures the signed-in buyer exists as a customer on the team's connected account and returns a customer session so the payment form can show their saved cards.",tags:["Membership"]}).input(Ip).errors({CONFLICT:{status:409,data:Cp.optional()}}).output(Ep),oI=ia.route({method:"POST",path:"/account/membership/purchases",summary:"Start a membership purchase for the current buyer",description:"Creates the provider subscription for the signed-in buyer and returns what the browser needs to collect the first annual payment. A pending attempt for the same program is reused.",tags:["Membership"]}).input(Ap).errors({CONFLICT:{status:409,data:Cp.optional()}}).output(xp),aI=ia.route({method:"POST",path:"/account/membership/purchases/{id}/detail",summary:"Get one of the current buyer's membership purchases",description:"Returns the purchase and, once payment is confirmed, the membership pass with its member number.",tags:["Membership"]}).input(Sp).output(Dp),sI=ia.route({method:"POST",path:"/account/membership/passes/query",summary:"List the current buyer's membership passes",tags:["Membership"]}).input(Op).output(Pp),dI=ia.route({method:"POST",path:"/membership/members/query",summary:"List a team's members in member number order",description:"Staff view of the passes in the team's current membership program. Requires membership.read.",tags:["Membership"]}).input(Fp).output(Vp),cI=ia.route({method:"POST",path:"/membership/members",summary:"Grant a free membership",description:"Staff give a member a complimentary membership on the keyring they hand over. The keyring's serial becomes the member number. Requires membership.write.",tags:["Membership"]}).input(_p).errors({CONFLICT:{status:409,data:Bp},NOT_FOUND:{status:404,data:Bp.optional()}}).output(Rp),lI=ia.route({method:"POST",path:"/membership/members/number",summary:"Check a keyring number",description:"Whether a keyring's number can be given to someone, before their details are entered. Requires membership.write.",tags:["Membership"]}).input(Np).output(Up),uI=ia.route({method:"POST",path:"/membership/door/redeem",summary:"Use a member's discount at the door",description:"Door staff scan a member's keyring when they pay cash. The member's one discount for the event is used, shared with online use, and nothing is sold. Requires ticket.scan for the event.",tags:["Membership"]}).input(Mp).output(qp),pI=ia.route({method:"POST",path:"/membership/door/undo",summary:"Undo a door discount just given",description:"Gives back a door use the same staff member made in the last few minutes, such as a keyring scanned by mistake. Requires ticket.scan for the event.",tags:["Membership"]}).input(Gp).errors({CONFLICT:{status:409}}).output(Vn({undone:ir(!0)}));var mI={program:nI,paymentSession:rI,startPurchase:oI,getPurchase:aI,myPasses:sI,members:dI,grant:cI,checkNumber:lI,end:ia.route({method:"POST",path:"/membership/members/{passId}/end",summary:"End a free membership",description:"Ends a complimentary membership now. The member keeps their number. Paid memberships end through a refund or cancellation instead. Requires membership.write.",tags:["Membership"]}).input(jp).errors({CONFLICT:{status:409,data:Bp}}).output(Rp),redeemAtDoor:uI,undoDoorRedemption:pI};const hI=zn({clientId:Qi().min(1).meta({description:"Immutable OAuth client identifier."}),teamId:Ra,tenantId:Qi().min(1).meta({description:"Tenant this application belongs to."}),name:Qi().trim().min(1).max(100).meta({description:"Operator-facing name for this website."}),redirectUris:Bn(an().max(2048)).min(1).max(10).meta({description:"Exact HTTPS callback URLs. HTTP is allowed only for non-production loopback."}),enabled:xn().meta({description:"Disabled applications stop authenticating immediately."}),revision:En().int().positive().meta({description:"Optimistic concurrency token. Send the value you read."}),credentials:Bn(zn({id:Qi().meta({description:"Opaque credential identifier. It reveals nothing about the secret."}),expiresAt:En().int().nonnegative().optional().meta({description:"Credential expiry as Unix milliseconds. Omitted for credentials that do not expire."})}))}).meta({description:"A Team-owned website login application. Credential secrets are never included."}),fI=zn({teamId:Ra}).meta({description:"Lists the website applications a Team owns."}),yI=hI.pick({teamId:!0,name:!0,redirectUris:!0}).extend({requestId:ci(rn,void 0).meta({description:"Caller-generated idempotency key. Reusing it returns a conflict rather than a second application."})}).meta({description:"Registration request for a new Team website."}),gI=hI.pick({teamId:!0,clientId:!0,revision:!0}).meta({description:"Reference to one Team website application at a known revision. A stale revision is rejected."}),vI=gI.extend({name:hI.shape.name,redirectUris:hI.shape.redirectUris,enabled:xn()}).meta({description:"Full replacement of a Team website's settings."}),bI=gI.extend({credentialId:Qi().min(1).meta({description:"Credential to revoke. Revoking a credential that is already gone succeeds unchanged."})}).meta({description:"Revocation request for one website credential."}),wI=zn({application:hI,clientSecret:Qi().meta({description:"New credential. Display once and store only on the website server."})}).meta({description:"One-time credential issuance response. Must not be logged or cached."}),$I=ia.errors({CONFLICT:{status:409},SERVICE_UNAVAILABLE:{status:503}}),II={create:$I.route({method:"POST",path:"/oauth-applications/{clientId}/credentials",tags:["OAuth applications"],summary:"Issue a replacement credential",description:"Issues a second credential so the website can roll over without downtime. Revoke the old one once it is out of use."}).input(gI).output(wI),delete:$I.route({method:"DELETE",path:"/oauth-applications/{clientId}/credentials/{credentialId}",tags:["OAuth applications"],summary:"Revoke a website credential",description:"Revokes one credential. Revoking a credential that is already gone succeeds without changing the application, and the last credential of an enabled application cannot be revoked."}).input(bI).output(hI)};var EI={list:$I.route({method:"GET",path:"/oauth-applications",tags:["OAuth applications"],summary:"List Team website clients",description:"Lists the website applications a Team owns. Credential secrets are never returned."}).input(fI).output(Bn(hI)),create:$I.route({method:"POST",path:"/oauth-applications",tags:["OAuth applications"],summary:"Register a Team website",description:"Registers a website login client for a Team and returns its first credential once."}).input(yI).output(wI),update:$I.route({method:"PATCH",path:"/oauth-applications/{clientId}",tags:["OAuth applications"],summary:"Update a Team website",description:"Replaces a website's name, callbacks and enabled state at a known revision."}).input(vI).output(hI),credentials:II},kI={create:ia.route({method:"POST",path:"/account/orders",summary:"Create an order for the current buyer",description:"Creates an order owned by the signed-in buyer. The order is attributed to the verified website client's account Team.",tags:["Account"]}).input(ch.strict()).output(Hh),list:ia.route({method:"POST",path:"/account/orders/query",summary:"List the current buyer's website-Team purchase history",description:"Returns the signed-in buyer's purchases for the verified website client's account Team, newest first.",tags:["Account"]}).input(Qm).output(Xm),get:ia.route({method:"POST",path:"/account/orders/{id}/detail",summary:"Get one of the current buyer's purchases",description:"Returns full detail for a purchase the signed-in buyer owns within the website client's account Team.",tags:["Account"]}).input(eh).output(th),wallet:ia.route({method:"POST",path:"/account/orders/{id}/wallet",summary:"Get a wallet pass for one of the current buyer's tickets",description:"Returns an Apple Wallet pass or a validated Google Wallet URL for a ticket on a purchase the signed-in buyer owns.",tags:["Account"]}).input(ih).output(nh)},TI={create:ia.route({method:"POST",path:"/orders/{id}/notes",summary:"Add note to order timeline (promoter only)",description:"Add a user note to the order timeline. Note will be marked as editable by the author.",tags:["Orders"]}).input(rh.strict()).output(Yh),update:ia.route({method:"PATCH",path:"/orders/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Orders"]}).input(Ry.strict()).output(Yh),remove:ia.route({method:"DELETE",path:"/orders/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Orders"]}).input(lh.strict()).output(Ln())};const AI=ia.route({method:"POST",path:"/orders/{id}/confirmation",summary:"Read signed order confirmation and QR tickets",tags:["Orders"]}).input(Zm).output(Km),xI=ia.route({method:"GET",path:"/orders/{id}",summary:"Get order by ID",tags:["Orders"]}).input(Hm.strict()).output(Yh),SI=ia.route({method:"GET",path:"/orders",summary:"List orders with cursor-based pagination",description:"Returns order data with cursor-based pagination, optional full-text search via `query`, advanced filters, and deterministic sorting.",tags:["Orders"]}).input(Uh.strict()).output(Mh),DI=ia.route({method:"POST",path:"/orders/quote",summary:"Create order quote",tags:["Orders"]}).input(qh.strict()).output(Gh),CI=ia.route({method:"POST",path:"/orders",summary:"Create a new order",tags:["Orders"]}).input(ch.strict()).output(Yh),OI=ia.route({method:"POST",path:"/orders/complimentary",summary:"Create a complimentary order",tags:["Orders"]}).input(sh.strict()).output(Yh),PI=ia.route({method:"PUT",path:"/orders/{id}",summary:"Update an order",tags:["Orders"]}).input(Py.strict()).output(Yh),RI=ia.route({method:"POST",path:"/orders/{id}/reserve",summary:"Re-reserve inventory for an abandoned order",description:"Attempts to re-reserve inventory for an abandoned order. If inventory is available, the order status is set back to PENDING with a new reservation timer. Returns the updated order with a new reservedAt timestamp if successful.",tags:["Orders"]}).input(zh.strict()).errors({BAD_REQUEST:{status:400,data:Wh.optional()}}).output(Yh),_I=ia.route({method:"POST",path:"/orders/{id}/resend",summary:"Resend tickets to customer",description:"Resend order tickets to the customer's email. Optionally provide a different email address.",tags:["Orders"]}).input(Vh.strict()).output(Yh),NI=ia.route({method:"POST",path:"/orders/{id}/refund",summary:"Refund order items",description:"Process a refund for order items. Supports full or partial refunds with optional ticket cancellation.",tags:["Orders"]}).input(Bh.strict()).output(Fh);var UI={account:kI,cancel:ia.route({method:"POST",path:"/orders/{id}/cancel",summary:"Cancel tickets or close an order without a refund",tags:["Orders"]}).input(oh.strict()).output(Hp),cancellations:ia.route({method:"GET",path:"/orders/{id}/cancellations",summary:"Get staff cancellation history",tags:["Orders"]}).input(Hm.pick({id:!0}).strict()).output(Zp),confirmation:AI,get:xI,list:SI,create:CI,createComplimentary:OI,update:PI,reserve:RI,quote:DI,resend:_I,refund:NI,note:TI};const MI=Vn({payout:zy});var LI={create:ia.route({method:"POST",path:"/payouts/{id}/notes",summary:"Add note to payout timeline (`payout.write` required)",description:"Add a user note to the payout timeline. Note will be marked as editable by the author.",tags:["Payouts"]}).input(Wy.strict()).output(MI),update:ia.route({method:"PATCH",path:"/payouts/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Payouts"]}).input(Ug.strict()).output(MI),remove:ia.route({method:"DELETE",path:"/payouts/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Payouts"]}).input(bg.strict()).output(MI)},qI={get:ia.route({method:"GET",path:"/payouts/{id}",summary:"Get payout by ID with breakdown",tags:["Payouts"]}).input(wg.strict()).output(Pg),list:ia.route({method:"GET",path:"/payouts",summary:"List payouts with cursor-based pagination",description:"Returns payout data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Payouts"]}).input(Eg.strict()).output(kg),preview:ia.route({method:"GET",path:"/payouts/{id}/preview",summary:"Get payout preview for approvals",description:"Returns lightweight payout split rows and beneficiary resolution status used by approvals dropdowns.",tags:["Payouts"]}).input(Og.strict()).output(Cg),adjustments:ia.route({method:"GET",path:"/payouts/adjustments",summary:"List Airwallex payout adjustments",description:"Returns settlement-proven Airwallex refund and dispute adjustments grouped for tenant payout review.",tags:["Payouts"]}).input(sg.strict()).output(dg),adjustment:ia.route({method:"GET",path:"/payouts/adjustments/{id}",summary:"Get payout adjustment by ID",description:"Returns a payout adjustment detail payload with related adjustment rows, applications, and upcoming payout projections.",tags:["Payouts"]}).input(tg.strict()).output(cg),stats:ia.route({method:"POST",path:"/payouts/stats",summary:"Get payout statistics",tags:["Payouts"]}).input(_g.strict()).output(Rg),breakdown:ia.route({method:"GET",path:"/payouts/{payoutId}/breakdown",summary:"Get payout breakdown",tags:["Payouts"]}).input(_y.strict()).output(vg),update:ia.route({method:"PATCH",path:"/payouts/{id}",summary:"Update a payout",description:"Update payout status or approval. Use approval field to approve or reject payouts.",tags:["Payouts"]}).input(Ng.strict()).output(zy),note:LI};const GI=Vn({key:Qi(),memberId:Qi()}),jI=GI.merge(Bg).strict();var BI={get:ia.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Get permission scope by ID",description:"Retrieve a permission scope using its unique ID",tags:["Permission Scopes"]}).input(jI).output(qg),list:ia.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"List permission scopes with cursor-based pagination",description:"Returns permission scopes for a specific team member with cursor pagination. Can filter by kind (PROMOTER or VENUE).",tags:["Permission Scopes"]}).input(GI.merge(Fg).strict()).output(Vg),create:ia.route({method:"POST",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"Create a new permission scope",description:"Create a permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions.",tags:["Permission Scopes"]}).input(GI.and(jg)).output(qg),update:ia.route({method:"PATCH",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Update a permission scope",description:"Update an existing permission scope. Only the permissions array can be modified.",tags:["Permission Scopes"]}).input(GI.extend({id:Qi()}).merge(zg).strict()).output(qg),remove:ia.route({method:"DELETE",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Delete a permission scope",description:"Remove a permission scope. Team member will revert to lower-tier permissions for the affected resource.",tags:["Permission Scopes"]}).input(jI).output(qg)},FI={summary:ia.route({method:"GET",path:"/promoters/{promoterId}/performance/summary",summary:"Get promoter performance summary",description:"Overview KPIs for a single promoter based on tracking data (excludes entity-based data like payouts)",tags:["Promoter Performance"]}).input(rc).output(oc),revenue:ia.route({method:"GET",path:"/promoters/{promoterId}/performance/revenue",summary:"Get promoter revenue over time",description:"Time-series data for revenue and tickets sold for a single promoter",tags:["Promoter Performance"]}).input(ac).output(sc),events:ia.route({method:"GET",path:"/promoters/{promoterId}/performance/events",summary:"Get promoter top events by tickets",description:"Top events by ticket count for a single promoter",tags:["Promoter Performance"]}).input(dc).output(cc)};const VI=Vn({eventCount:En().optional()}),zI=ia.route({method:"GET",path:"/promoters/{key}",summary:"Get promoter by ID or slug",description:"Retrieve a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(cv.strict()).output(yv),WI=ia.route({method:"POST",path:"/promoters",summary:"Create a new promoter",description:"Create a new promoter brand within a team",tags:["Promoters"]}).input(lv.strict()).output(yv),YI=ia.route({method:"PUT",path:"/promoters/{key}",summary:"Update a promoter",description:"Update a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(gv.strict()).output(yv);var HI={get:zI,list:ia.route({method:"GET",path:"/promoters",summary:"List promoters with cursor-based pagination",description:"Returns promoters with cursor pagination. Filter by teamId to see promoters for a specific team.",tags:["Promoters"]}).input(hv.strict()).output(fv),create:WI,update:YI,remove:ia.route({method:"DELETE",path:"/promoters/{key}",summary:"Delete a promoter",description:"Delete a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(uv.strict()).errors({CONFLICT:{status:409,data:VI.optional()}}).output(yv),performance:FI},ZI={create:ia.route({method:"POST",path:"/reports",summary:"Create report generation job",description:"Creates an asynchronous report job. Download the report once the job status is COMPLETED.",tags:["Reports"]}).input(Ev).output(Tv),get:ia.route({method:"GET",path:"/reports/{id}",summary:"Get report generation job",tags:["Reports"]}).input(kv.strict()).output(Tv)};const KI=ia.route({method:"GET",path:"/events/{eventId}/sections/{id}",summary:"Get section by ID",tags:["Sections"]}).input(Sh.strict()).output(Oh),JI=ia.route({method:"POST",path:"/events/{eventId}/sections",summary:"Create a new section",tags:["Sections"]}).input(Ah.strict()).output(Oh),QI=ia.route({method:"PUT",path:"/events/{eventId}/sections/{id}",summary:"Update a section",tags:["Sections"]}).input(Ph.strict()).output(Oh);var XI={get:KI,list:ia.route({method:"GET",path:"/events/{eventId}/sections",summary:"List sections",description:"Returns sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Sections"]}).input(Dh.strict()).output(Ch),create:JI,update:QI,remove:ia.route({method:"DELETE",path:"/events/{eventId}/sections/{id}",summary:"Delete a section",tags:["Sections"]}).input(xh.strict()).output(Oh)};const eE=ia.route({method:"GET",path:"/teams/{teamId}/tax-profiles",summary:"List team tax profiles",description:"Retrieve reusable organiser tax profiles and the default.",tags:["Team Tax"]}).input(wu).output(Tu),tE=ia.route({method:"POST",path:"/teams/{teamId}/tax-profiles",summary:"Create a team tax profile",description:"Create a reusable organiser tax profile.",tags:["Team Tax"]}).input(Iu).output(Tu),iE=ia.route({method:"PUT",path:"/teams/{teamId}/tax-profiles/{profileId}",summary:"Update a team tax profile",description:"Update a reusable organiser tax profile.",tags:["Team Tax"]}).input(Eu).output(Tu);var nE={create:tE,list:eE,remove:ia.route({method:"DELETE",path:"/teams/{teamId}/tax-profiles/{profileId}",summary:"Delete a team tax profile",description:"Delete a tax profile that is not the required default and is not used by an event.",tags:["Team Tax"]}).input(ku).output(Tu),setDefault:ia.route({method:"PUT",path:"/teams/{teamId}/tax-profiles/{profileId}/default",summary:"Set the default team tax profile",description:"Use this profile by default for future events.",tags:["Team Tax"]}).input(ku).output(Tu),update:iE},rE={summary:ia.route({method:"GET",path:"/teams/{teamId}/performance/summary",summary:"Get team performance summary",description:"Overview KPIs aggregated across all promoters in the team, based on tracking data (excludes entity-based data like payouts)",tags:["Team Performance"]}).input(lc).output(uc),revenue:ia.route({method:"GET",path:"/teams/{teamId}/performance/revenue",summary:"Get team revenue over time",description:"Time-series data for revenue and tickets sold aggregated across all promoters in the team",tags:["Team Performance"]}).input(pc).output(mc),funnel:ia.route({method:"GET",path:"/teams/{teamId}/performance/funnel",summary:"Get team conversion funnel",description:"Conversion funnel showing drop-off rates from product view to purchase, aggregated across all events in the team",tags:["Team Performance"]}).input(yc).output(gc),traffic:ia.route({method:"GET",path:"/teams/{teamId}/performance/traffic",summary:"Get team traffic sources",description:"Traffic source breakdown by campaign, medium, or source, aggregated across all events in the team",tags:["Team Performance"]}).input(Ic).output(Ec),insights:ia.route({method:"GET",path:"/teams/{teamId}/performance/insights",summary:"Get team performance insights",description:"Order-backed revenue, tickets, refund, and dispute totals for an exact time window",tags:["Team Performance"]}).input(kc).output(xc),payouts:ia.route({method:"GET",path:"/teams/{teamId}/performance/payouts",summary:"Get team payout performance",description:"Upcoming and recently paid payout totals aggregated across the team",tags:["Team Performance"]}).input(Dc).output(Rc),finance:ia.route({method:"GET",path:"/teams/{teamId}/performance/finance",summary:"Get team finance overview",description:"Finance overview combining gross order value with payout and adjustment data",tags:["Team Performance"]}).input(_c).output(Gc),events:ia.route({method:"GET",path:"/teams/{teamId}/performance/events",summary:"Get team top events by tickets",description:"Top events by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(hc).output(fc),admissions:ia.route({method:"GET",path:"/teams/{teamId}/performance/admissions",summary:"Get team top admissions by tickets",description:"Top admission types by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(wc).output($c),orders:ia.route({method:"GET",path:"/teams/{teamId}/performance/orders",summary:"Get team orders distribution",description:"Order counts grouped by time breakdown (hour, day of week, day, week, month)",tags:["Team Performance"]}).input(vc).output(bc),tracking:ia.route({method:"GET",path:"/teams/{teamId}/performance/tracking",summary:"Get team tracking time series",description:"Time-series tracking data (page views, add to cart, checkout, orders) aggregated at team or tenant level",tags:["Team Performance"]}).input(jc).output(Bc)};const oE=Uv.meta({description:"Business records that prevent a team from being deleted"});var aE={get:ia.route({method:"GET",path:"/teams/{key}",summary:"Get team by ID or slug",description:"Retrieve a team with membership details. User must be a member of the team.",tags:["Teams"]}).input(Pv.strict()).output(_v),list:ia.route({method:"GET",path:"/teams",summary:"List teams with cursor-based pagination",description:"Returns teams the current user has access to with cursor pagination",tags:["Teams"]}).input(Zv.strict()).output(Kv),create:ia.route({method:"POST",path:"/teams",summary:"Create a new team",description:"Create a new team organization",tags:["Teams"]}).input(Rv.strict()).output(_v),slugAvailability:ia.route({method:"GET",path:"/teams/slugs/{slug}/availability",summary:"Check team slug availability",description:"Check whether a team URL slug is available within the current tenant.",tags:["Teams"]}).input(ib.strict()).output(nb),update:ia.route({method:"PATCH",path:"/teams/{key}",summary:"Update a team",description:"Update an existing team by ID or slug",tags:["Teams"]}).input(rb.strict()).output(_v),remove:ia.route({method:"DELETE",path:"/teams/{key}",summary:"Start team deletion",description:"Soft-delete a team immediately and queue its asynchronous cleanup by ID or slug",tags:["Teams"]}).input(Pv.strict()).errors({CONFLICT:{status:409,data:oE.optional()},FORBIDDEN:{status:403}}).output(qv),deletion:{get:ia.route({method:"GET",path:"/team-deletions/{id}",summary:"Get team deletion status",description:"Retrieve progress for an asynchronous team deletion request",tags:["Teams"]}).input(Lv.strict()).errors({FORBIDDEN:{status:403},NOT_FOUND:{status:404}}).output(Mv)},performance:rE},sE={list:ia.route({method:"GET",path:"/teams/{key}/invites",summary:"List pending team invitations with cursor-based pagination",description:"Returns pending team invitations for a specific team. Team key can be ID or slug. These are email-based invitations that have not yet been accepted.",tags:["Team Invites"]}).input(Vv.strict()).output(zv),get:ia.route({method:"GET",path:"/teams/{key}/invites/{inviteId}",summary:"Get pending invitation by ID",description:"Retrieve a pending team invitation by its ID. Team key can be ID or slug.",tags:["Team Invites"]}).input(Fv.strict()).output(Wv),create:ia.route({method:"POST",path:"/teams/{key}/invites",summary:"Create a team invitation",description:"Invite a user to join a team by email. Team key can be ID or slug. Creates a pending invitation with a secure token that expires in 7 days. The invited user will receive an email with an acceptance link.",tags:["Team Invites"]}).input(Bv.strict()).output(Wv),accept:ia.route({method:"PATCH",path:"/teams/{key}/invites/{inviteId}",summary:"Accept a team invitation",description:"Accept a pending team invitation using the secure token. Team key can be ID or slug. This deletes the invitation and creates an active TeamMember record. Returns the newly created team member.",tags:["Team Invites"]}).input(Av.strict()).output(ab),resend:ia.route({method:"POST",path:"/teams/{key}/invites/{inviteId}/resend",summary:"Resend invitation email",description:"Resend the invitation email with a new token and extended expiry. Team key can be ID or slug. Useful when the original invitation has expired or was not received.",tags:["Team Invites"]}).input(Fv.strict()).output(Wv),cancel:ia.route({method:"DELETE",path:"/teams/{key}/invites/{inviteId}",summary:"Cancel a pending invitation",description:"Cancel a pending team invitation before it is accepted. Team key can be ID or slug. Deletes the invitation record.",tags:["Team Invites"]}).input(jv.strict()).output(Wv)},dE={connect:ia.route({method:"POST",path:"/teams/{key}/payment/connect",summary:"Initiate payment processor connection",description:"Start the OAuth flow to connect a team's payment processor account. Returns an authorization URL to redirect the user to the payment provider's OAuth page. The OAuth callback is handled directly by the payment gateway.",tags:["Team Payments"]}).input(Qv.strict()).output(Xv),disconnect:ia.route({method:"POST",path:"/teams/{key}/payment/disconnect",summary:"Disconnect payment processor",description:"Remove the payment processor connection from a team. Future ticket sales will use the platform account. Only the team owner can disconnect the payment processor.",tags:["Team Payments"]}).input(eb.strict()).output(Cv),gateway:{update:ia.route({method:"PATCH",path:"/teams/{key}/payment/gateway",summary:"Update Stripe Connect event routing",description:"Configure whether Stripe Connect applies to every team event or only selected events.",tags:["Team Payments"]}).input(Sv.strict()).output(Cv)}};const cE=ia.route({method:"GET",path:"/tenant/config",summary:"Get tenant configuration",tags:["Tenant"],description:"Returns tenant configuration including features and regions. Requires x-tenant-id header."}).output(gb),lE=ia.route({method:"GET",path:"/tenant/regions",summary:"Get tenant regions",tags:["Tenant"],description:"Returns available regions for the tenant. Requires x-tenant-id header."}).output(vb);var uE={approvals:ia.route({method:"GET",path:"/tenant/approvals",summary:"Get tenant approval badges",tags:["Tenant"],description:"Returns lightweight booleans for pending approvals. Requires tenant admin access."}).input(bb).output(wb),config:cE,regions:lE};const pE=ia.route({method:"GET",path:"/tickets/{id}",summary:"Get ticket by ID",tags:["Tickets"]}).input(_b.strict()).output(Mb),mE=ia.route({method:"POST",path:"/tickets",summary:"Create a new ticket",tags:["Tickets"]}).input(Rb.strict()).output(Mb),hE=ia.route({method:"PUT",path:"/tickets/{id}",summary:"Update a ticket",tags:["Tickets"]}).input(Zb.strict()).output(Mb);var fE={get:pE,list:ia.route({method:"GET",path:"/tickets",summary:"List tickets with cursor-based pagination",description:"Returns ticket data with cursor-based pagination, optional full-text search via `query`, and a fixed attendee-name ascending order for non-search list paths.",tags:["Tickets"]}).input(Nb.strict()).output(Ub),attendees:{list:ia.route({method:"GET",path:"/tickets/attendees",summary:"List event attendees with alpha-navigation support",description:"Returns ticket-backed attendee roster rows for an event. Supports bounded browsing, alpha jump bookmarks, and attendee search.",tags:["Tickets"]}).input(Ob.strict()).output(Pb),index:ia.route({method:"GET",path:"/tickets/attendees/index",summary:"Get attendee alpha-navigation buckets",description:"Returns available alpha buckets and server-issued bookmarks for the ticket attendee roster.",tags:["Tickets"]}).input(Db.strict()).output(Sb),changes:ia.route({method:"GET",path:"/tickets/attendees/changes",summary:"List attendee roster rows changed since an instant",description:"Returns roster rows updated since `since`, so clients can keep a loaded roster window current without reloading it.",tags:["Tickets"]}).input(Ab.strict()).output(xb)},create:mE,update:hE,checkInByKey:ia.route({method:"PUT",path:"/tickets/{key}/check-in",summary:"Check in tickets by key",tags:["Tickets"]}).input(Lb.strict()).errors({BAD_REQUEST:{status:400,data:Wb.optional()}}).output(Yb),checkOutByKey:ia.route({method:"PUT",path:"/tickets/{key}/check-out",summary:"Check out tickets by key",tags:["Tickets"]}).input(Lb.strict()).errors({BAD_REQUEST:{status:400,data:Wb.optional()}}).output(Yb)};const yE=ia.route({method:"GET",path:"/users/me",summary:"Get the current user and their team memberships",tags:["Users"]}).output(nw),gE=Vn({firstName:Qi().min(1).optional(),lastName:Qi().min(1).optional(),imageUrl:an().nullable().optional(),metadata:Qn(Qi(),as).optional(),refreshToken:Qi().optional().meta({description:"Current refresh token. When provided, new tokens with updated user data will be returned."})}).meta({ref:"UpdateUserInput",description:"Input for updating the current user's profile"}),vE=ia.route({method:"PATCH",path:"/users/me",summary:"Update the current user's profile",tags:["Users"]}).input(gE).output(tw);var bE={me:yE,remove:ia.route({method:"DELETE",path:"/users/me",summary:"Delete the current user's account",tags:["Users"]}).output(iw),update:vE};const wE={oauthApplication:EI,integration:H$,analytics:Bw,beneficiary:Yw,section:XI,event:W$,eventCollaborator:Y$,admission:Gw,order:UI,ticket:fE,location:iI,coupon:n$,payout:qI,teams:dv,permissionScope:BI,promoter:HI,report:ZI,team:aE,teamInvite:sE,teamPayment:dE,teamMember:hb,teamTax:nE,tenant:uE,venue:{get:ia.route({method:"GET",path:"/venues/{key}",summary:"Get venue by ID or slug",description:"Retrieve a venue using its unique ID or slug",tags:["Venues"]}).input(sw.strict()).output(pw),list:ia.route({method:"GET",path:"/venues",summary:"List venues with cursor-based pagination",description:"Returns venues with cursor pagination. Supports filtering by team, location-based search, and text query",tags:["Venues"]}).input(lw.strict()).output(uw),create:ia.route({method:"POST",path:"/venues",summary:"Create a new venue",description:"Create a new venue. Venue will be owned by the specified team but can be used by all teams for their events",tags:["Venues"]}).input(ow.strict()).output(pw),update:ia.route({method:"PATCH",path:"/venues/{key}",summary:"Update a venue",description:"Update an existing venue. Cannot change venue ownership (teamId)",tags:["Venues"]}).input(mw.strict()).output(pw),remove:ia.route({method:"DELETE",path:"/venues/{key}",summary:"Delete a venue",description:"Soft delete a venue",tags:["Venues"]}).input(aw.strict()).output(pw),linkLocation:ia.route({method:"POST",path:"/venues/{key}/locations",summary:"Link location to venue",description:"Link a location to this venue. Allows the venue to be discovered when users search for this location. A venue can have multiple linked locations (e.g., different addresses, branded names). Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(sw.extend({locationKey:Qi().meta({description:"Location ID (loc_xxx) or Google Place ID to link to this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(pw),unlinkLocation:ia.route({method:"DELETE",path:"/venues/{key}/locations/{locationKey}",summary:"Unlink location from venue",description:"Remove a location link from this venue. The location will no longer show this venue's branding. Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(sw.extend({locationKey:Qi().meta({description:"Location ID (loc_xxx) or Google Place ID to unlink from this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(pw)},user:bE},$E={...wE,internal:tI,membership:mI};function IE(e){return ia.errors(xa).router(e)}const EE=IE(wE);IE($E);const kE=EE,TE={sandbox:"https://api.sandbox.session.services",prod:"https://api.session.services"};function AE(e){return e in TE?TE[e]:e}function xE(e){let t=e.toLowerCase();return t?function(e){return!!/ipad|tablet|playbook|silk|kindle|sm-t|tab/.test(e)||/android/.test(e)&&!/mobile/.test(e)}(t)?"TABLET":function(e){return/iphone|ipod|android|windows phone|blackberry|bb10|mobile/.test(e)}(t)?"MOBILE":"DESKTOP":"DESKTOP"}function SE(e){let t=e.toLowerCase();return t?t.includes("instagram")?"Instagram App":/fban|fbav|fb_iab|fbios|facebook/.test(t)?"Facebook App":/tiktok|musical_ly|bytedance|bytelo/.test(t)?"TikTok App":t.includes("snapchat")?"Snapchat App":t.includes("pinterest")?"Pinterest App":t.includes("linkedin")?"LinkedIn App":/twitter|twitterandroid/.test(t)?"X App":t.includes("micromessenger")?"WeChat App":/\bline\//.test(t)?"LINE App":t.includes("gsa/")?"Google App":/edg\/|edge|edgios|edga/.test(t)?"Edge":t.includes("samsungbrowser")?"Samsung Internet":/opr\/|opera|opios/.test(t)?"Opera":/firefox|fxios/.test(t)?"Firefox":t.includes("crios")?"Chrome":/iphone|ipod|ipad/.test(t)&&t.includes("safari")?"Mobile Safari":t.includes("android")&&t.includes("wv")?"Android WebView":/chrome|chromium/.test(t)?"Chrome":t.includes("safari")?"Safari":"Other":"Unknown"}const DE="sessions_attribution";function CE(e,t){return e.get(t)||void 0}function OE(e){return!(!e||!Object.values(e).some(Boolean))}function PE(){try{let e=window.localStorage?.getItem(DE);if(!e)return;let t=JSON.parse(e);if(!t||"object"!=typeof t)return void window.localStorage?.removeItem(DE);let i=t;return!i.expiresAt||i.expiresAt<=Date.now()?void window.localStorage?.removeItem(DE):i}catch{return}}function RE(e){return"string"==typeof e&&e.length>0?e:void 0}function _E(){if(typeof window>"u")return;let e=function(e){return{source:CE(e,"utm_source"),medium:CE(e,"utm_medium"),name:CE(e,"utm_campaign"),term:CE(e,"utm_term"),content:CE(e,"utm_content")}}(new URLSearchParams(window.location.search));return OE(e)?(function(e){if(OE(e))try{window.localStorage?.setItem(DE,JSON.stringify({...PE(),expiresAt:Date.now()+2592e6,utm_campaign:e?.name,utm_content:e?.content,utm_medium:e?.medium,utm_source:e?.source,utm_term:e?.term}))}catch{return}}(e),e):function(){let e=PE();if(!e)return;let t={source:RE(e.utm_source),medium:RE(e.utm_medium),name:RE(e.utm_campaign),term:RE(e.utm_term),content:RE(e.utm_content)};return OE(t)?t:void 0}()}function NE(e){return{anonymous_id:e.anonymousId,browser:SE(e.context.userAgent),browser_session_id:e.sessionId,device_type:xE(e.context.userAgent),page_path:e.context.page.path,page_title:e.context.page.title,page_url:e.context.page.url,referrer:e.context.page.referrer,user_agent:e.context.userAgent||void 0,utm_campaign:e.context.campaign?.name,utm_content:e.context.campaign?.content,utm_medium:e.context.campaign?.medium,utm_source:e.context.campaign?.source,utm_term:e.context.campaign?.term}}function UE(){return typeof window>"u"?{page:{url:"",path:"",title:"",referrer:void 0},userAgent:"",campaign:void 0}:{page:{url:window.location.href,path:window.location.pathname,title:document.title,referrer:document.referrer||void 0},userAgent:navigator.userAgent,campaign:_E()}}function ME(e,t,i){null==i||""===i||(e[t]=i)}function LE(...e){return e.find((e=>null!=e&&""!==e))}const qE={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},GE=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]),jE=new Set,BE=new Map;function FE(e){if(Array.from(document.scripts??[]).some((e=>e.src.includes("connect.facebook.net/en_US/fbevents.js"))))return!0;let t=document.createElement("script");t.async=!0,t.src="https://connect.facebook.net/en_US/fbevents.js",t.addEventListener?.("load",(()=>{YE(e,"[Facebook Pixel] fbevents.js loaded")})),t.addEventListener?.("error",(()=>{YE(e,"[Facebook Pixel] fbevents.js failed to load")}));let i=document.getElementsByTagName("script")[0],n=i?.parentNode??document.head??document.body;return!!n&&(n.insertBefore(t,i??null),YE(e,"[Facebook Pixel] inserted fbevents.js"),!0)}function VE(e,t){!t||!Array.isArray(t)||(e.content_ids=t.flatMap((e=>e.product_id?[e.product_id]:[])),e.num_items=t.length,e.contents=function(e){if(Array.isArray(e))return e.map((e=>({id:e.product_id,quantity:e.quantity||1,item_price:e.price})))}(t))}function zE(e,t){let i=window;typeof window>"u"||!i.fbq||(t?i.fbq("init",e,{external_id:t}):i.fbq("init",e))}function WE(e,t,i){let n=window;typeof window>"u"||!n.fbq||n.fbq(e,t,i)}function YE(e,...t){e&&console.log(...t)}function HE(e,t,i){return!!function(e){if(typeof window>"u")return!1;let t=window;if(t.fbq)return FE(e);let i=(...e)=>{i.callMethod?i.callMethod(...e):i.queue.push(e)};return i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],t.fbq=i,t._fbq||=i,FE(e)}(i)&&(function(e,t,i){let n=BE.get(e);return!(!t||t===n||(zE(e,t),BE.set(e,t),jE.add(e),YE(i,`[Facebook Pixel] Re-initialized pixel ${e} with userId ${t}`),0))}(e,t,i)||jE.has(e)||function(e,t,i){zE(e,t),jE.add(e),t&&BE.set(e,t),YE(i,"[Facebook Pixel] Initialized pixel "+e)}(e,t,i),!0)}const ZE=(e,t)=>{(function(e,t){t&&(e.content_ids=[t])})(e,t.product_id),function(e,t){ME(e,"content_name",t.name),ME(e,"value",LE(t.value,t.price)),e.content_type="product"}(e,t)},KE=function(e){return(t,i)=>{e(t,i),ME(t,"content_category",i.category)}}(ZE);function JE(e,t){ZE(e,t),t.product_id&&(e.contents=[{id:t.product_id,quantity:t.quantity||1,item_price:t.price}])}function QE(e,t){VE(e,t.products),function(e,t){ME(e,"value",LE(t.value,t.total))}(e,t),e.content_type="product",ME(e,"order_id",t.order_id)}function XE(e,t){ME(e,"value",t.value),t.product_id&&(e.content_ids=[t.product_id])}const ek={ViewContent:KE,AddToCart:JE,InitiateCheckout:QE,AddPaymentInfo:QE,Purchase:function(e,t){VE(e,t.products),function(e,t){ME(e,"value",LE(t.value,t.total,t.revenue))}(e,t),e.content_type="product",ME(e,"order_id",t.order_id)},"Product List Viewed":function(e,t){VE(e,t.products),e.content_type="product"},"Product Removed":JE,"Cart Viewed":QE,"Coupon Applied":QE,"Coupon Removed":QE};function tk(e,t){let i={};return ME(i,"currency",t.currency),ME(i,"event_id",t.event_id),(ek[e.name]??ek[e.sourceName]??XE)(i,t),i}function ik(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return ik(decodeURIComponent(i),t-1)}catch{return i}}function nk(e){let t=e.match(/[A-Za-z0-9]+/g);return t?t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(""):"Unknown"}function rk(e){let t=ik(function(e){return e.name||"Unknown"}(e)),i=qE[t]||t;return GE.has(i)?{method:"track",name:i,sourceName:t}:{method:"trackCustom",name:nk(i),sourceName:t}}function ok(e=!1){let t=(t,i)=>{i.fbId&&HE(i.fbId,t.userId,e)&&(WE("track","PageView",{}),YE(e,"[Facebook Pixel] Sent PageView"))};return{name:"Facebook Pixel",preload:(t,i)=>{i.fbId&&HE(i.fbId,t.userId,e)},track:(t,i)=>{if(!i.fbId||!HE(i.fbId,t.userId,e))return;let n=rk(t),r=tk(n,t.properties);WE(n.method,n.name,r),YE(e,`[Facebook Pixel] Sent ${n.name}:`,r)},page:t,screen:t,identify:(t,i)=>{!i.fbId||!t.userId||(HE(i.fbId,t.userId,e),YE(e,"[Facebook Pixel] Identity synced: "+t.userId))}}}const ak={"Product Viewed":"view_item","Product Added":"add_to_cart","Product Removed":"remove_from_cart","Checkout Started":"begin_checkout","Payment Info Entered":"add_payment_info","Order Completed":"purchase","Product List Viewed":"view_item_list","Cart Viewed":"view_cart","Coupon Entered":"coupon_entered","Coupon Applied":"coupon_applied","Coupon Denied":"coupon_denied","Coupon Removed":"coupon_removed"},sk=new Set;function dk(e){return"google-analytics-"+e}function ck(e,t,i){if(typeof window>"u")return;let n=window;n.gtag&&n.gtag("event",t,{...i,send_to:e})}function lk(e,t,i){if(typeof window>"u")return;let n=window;!n.gtag||!e||(n.gtag("config",e,{user_id:t,send_page_view:!1}),uk(i,"[Google Analytics] User ID updated"))}function uk(e,...t){e&&console.log(...t)}function pk(e){return"string"==typeof e&&e.length>0?e:void 0}function mk(e,t,i){null==i||""===i||(e[t]=i)}function hk(e){return"number"==typeof e.price}function fk(e){let t=e.filter(hk);if(0!==t.length)return t.reduce(((e,t)=>e+t.price*function(e){return"number"==typeof e.quantity?e.quantity:1}(t)),0)}function yk(e){return{item_id:e.product_id||e.sku,item_name:e.name,item_category:e.category,item_variant:pk(e.variant),price:e.price,quantity:e.quantity??1}}function gk(e){return!e.product_id||e.products?[]:[{item_id:e.product_id,item_name:e.name,item_category:e.category,item_variant:pk(e.variant),price:e.price,quantity:e.quantity??1}]}function vk(e){return Array.isArray(e.products)?e.products.map(yk):[]}function bk(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return bk(decodeURIComponent(i),t-1)}catch{return i}}function wk(e){let t=bk(e.name||"Unknown");return ak[t]||function(e){let t=e.match(/[A-Za-z0-9]+/g)?.join("_").toLowerCase()||"custom_event";return/^[a-z]/.test(t)?t:"event_"+t}(t)}function $k(e,t){mk(e,"event_id",t.properties.event_id),mk(e,"team_id",t.properties.team_id),mk(e,"promoter_id",t.properties.promoter_id),mk(e,"order_id",t.properties.order_id)}function Ik(e,t){if(function(e){return!(!e||!/^G-[A-Z0-9]+$/.test(e))}(e.gaId))return function(e,t){if(typeof window>"u")return!1;let i=window;return i.dataLayer=i.dataLayer||[],i.gtag||(i.gtag=function(){i.dataLayer?.push(arguments)},i.gtag("js",new Date)),function(e){if(document.getElementById(dk(e)))return;let t=document.createElement("script");t.id=dk(e),t.async=!0,t.src="https://www.googletagmanager.com/gtag/js?id="+e;let i=document.getElementsByTagName("script")[0];i?.parentNode?.insertBefore(t,i)}(e),sk.has(e)||(i.gtag("config",e,{send_page_view:!1}),sk.add(e),uk(t,"[Google Analytics] Initialized "+e)),!0}(e.gaId,t)?e.gaId:void 0}function Ek(e=!1){let t;return{name:"Google Analytics",preload:(t,i)=>{Ik(i,e)},track:(t,i)=>{let n=Ik(i,e);if(!n)return;let r=wk(t),o=function(e,t){let i={},n=function(e){return[...gk(e),...vk(e)]}(t.properties);return $k(i,t),n.length>0&&(i.items=n),mk(i,"currency",t.properties.currency),mk(i,"value",function(e,t){return function(e){return e.find((e=>"number"==typeof e))}([e.value,e.total,e.revenue,fk(t)])}(t.properties,n)),mk(i,"coupon",t.properties.coupon),mk(i,"payment_type",pk(t.properties.payment_type)??pk(t.properties.payment_method)),mk(i,"item_list_id",t.properties.list_id),mk(i,"item_list_name",t.properties.list_name),"purchase"===e&&mk(i,"transaction_id",function(e){return pk(e.transaction_id)??pk(e.order_id)}(t.properties)),i}(r,t);ck(n,r,o),uk(e,`[Google Analytics] Sent ${r}:`,o)},page:(t,i)=>{let n=Ik(i,e);if(!n)return;let r={page_location:t.context.page.url,page_path:t.context.page.path,page_title:t.context.page.title};$k(r,t),mk(r,"page_referrer",t.context.page.referrer),ck(n,"page_view",r),uk(e,"[Google Analytics] Sent page_view:",r)},screen:(t,i)=>{let n=Ik(i,e);if(!n)return;let r={};$k(r,t),mk(r,"screen_name",t.name||"Unknown"),ck(n,"screen_view",r),uk(e,"[Google Analytics] Sent screen_view:",r)},identify:(i,n)=>{if(!i.userId)return;let r=Ik(n,e);r&&(t=r,lk(r,i.userId,e),uk(e,"[Google Analytics] Identity available"))},reset:()=>{lk(t,null,e),t=void 0}}}const kk=new Set(Object.values(Xr));function Tk(e){return e.messageId??"msg_"+e.timestamp.toString(36)}function Ak(e){let t=e.context.campaign??{};return{session_id:e.sessionId,anonymous_id:e.anonymousId,user_id:e.userId,page:{url:e.context.page.url,path:e.context.page.path,title:e.context.page.title},referrer:e.context.page.referrer,user_agent:e.context.userAgent,utm_source:t.source,utm_medium:t.medium,utm_campaign:t.name,utm_term:t.term,utm_content:t.content}}function xk(e,t,i){return i&&t?{...e,name:t}:e}const Sk={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},Dk=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","ApplicationApproval","CompleteRegistration","Contact","CustomizeProduct","Download","FindLocation","InitiateCheckout","Purchase","Schedule","Search","StartTrial","SubmitApplication","SubmitForm","Subscribe","ViewContent"]),Ck=new Set,Ok="https://analytics.tiktok.com/i18n/pixel/events.js";function Pk(e,t){let i=window;typeof window>"u"||!i.ttq||i.ttq.instance(e).identify?.({external_id:t})}function Rk(e){let t={};return ME(t,"event_id",e),Object.keys(t).length>0?t:void 0}function _k(e,...t){e&&console.log(...t)}function Nk(e,t){return!!function(){if(typeof window>"u")return!1;let e=window;if(e.ttq)return!0;e.TiktokAnalyticsObject="ttq";let t=[];t.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],t.setAndDefer=(e,t)=>{e[t]=(...i)=>{e.push([t,...i])}};for(let e of t.methods)t.setAndDefer(t,e);return t.instance=e=>{let i=t._i[e]??[];for(let e of t.methods)t.setAndDefer(i,e);return i},t._i={},t._t={},t._o={},t.load=(e,i={})=>{t._i[e]=t._i[e]??[],t._i[e]._u=Ok,t._t[e]=Date.now(),t._o[e]=i,function(e){if(function(e){return Array.from(document.scripts??[]).some((t=>t.src.includes(Ok)&&t.src.includes("sdkid="+e)))}(e))return;let t=document.createElement("script");t.async=!0,t.src=`${Ok}?sdkid=${e}&lib=ttq`;let i=document.getElementsByTagName("script")[0];i?.parentNode?.insertBefore(t,i)}(e)},e.ttq=t,!0}()&&(Ck.has(e)||(function(e){let t=window;typeof window>"u"||!t.ttq||t.ttq.load(e)}(e),Ck.add(e),_k(t,"[TikTok Pixel] Initialized pixel "+e)),!0)}function Uk(e){return"number"==typeof e.quantity?e.quantity:1}function Mk(e){if("number"==typeof e.price)return e.price*Uk(e)}function Lk(e){return Array.isArray(e)?function(e){let t=e.filter((e=>"number"==typeof e.price));if(0!==t.length)return t.reduce(((e,t)=>e+Number(t.price)*Uk(t)),0)}(e):void 0}function qk(e){return function(e){return e.find((e=>"number"==typeof e))}([e.value,e.total,e.revenue,Lk(e.products),Mk(e)])}function Gk(e,t){(function(e,t){ME(e,"content_ids",t?[t]:void 0)})(e,t.product_id),ME(e,"content_name",t.name),ME(e,"price",t.price),ME(e,"quantity",t.product_id?Uk(t):void 0),ME(e,"value",qk(t)),e.content_type="product"}function jk(e){let t={content_type:"product"};return ME(t,"content_id",e.product_id),ME(t,"content_name",e.name),ME(t,"quantity",Uk(e)),ME(t,"price",e.price),t}function Bk(e,t){Array.isArray(t)&&(ME(e,"contents",t.map(jk)),ME(e,"content_ids",function(e){return e.flatMap((e=>e.product_id?[e.product_id]:[]))}(t)),ME(e,"quantity",function(e){return e.reduce(((e,t)=>e+Uk(t)),0)}(t)),e.content_type="product")}function Fk(e,t){Bk(e,t.products),ME(e,"value",qk(t))}function Vk(e,t){ME(e,"value",t.value)}const zk={ViewContent:function(e,t){Gk(e,t),ME(e,"content_category",t.category)},AddToCart:function(e,t){Gk(e,t)},InitiateCheckout:Fk,AddPaymentInfo:Fk,Purchase:function(e,t){Bk(e,t.products),ME(e,"value",qk(t)),ME(e,"order_id",t.order_id)}};function Wk(e,t){let i={};return ME(i,"currency",t.currency),(zk[e]??Vk)(i,t),i}function Yk(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return Yk(decodeURIComponent(i),t-1)}catch{return i}}function Hk(e){let t=Yk(function(e){return e.name||"Unknown"}(e)),i=Sk[t]||t;return Dk.has(i)?i:function(e){let t=e.match(/[A-Za-z0-9]+/g)?.join("")||"CustomEvent";return/^[A-Za-z]/.test(t)?t.slice(0,50):("Event"+t).slice(0,50)}(i)}function Zk(e){return e.tikTokId}function Kk(e=!1){let t=(t,i)=>{let n=Zk(i);n&&Nk(n,e)&&(function(e,t){let i=window;if(typeof window>"u"||!i.ttq)return;let n=i.ttq.instance(e).page;if(!n)return;let r=Rk(t);r?n(r):n()}(n,t.properties.event_id),_k(e,"[TikTok Pixel] Sent page view"))};return{name:"TikTok Pixel",preload:(t,i)=>{let n=Zk(i);n&&Nk(n,e)&&t.userId&&Pk(n,t.userId)},track:(t,i)=>{let n=Zk(i);if(!n||!Nk(n,e))return;let r=Hk(t),o=Wk(r,t.properties);(function(e,t,i,n){let r=window;if(typeof window>"u"||!r.ttq)return;let o=r.ttq.instance(e).track;if(!o)return;let a=Rk(n);a?o(t,i,a):o(t,i)})(n,r,o,t.properties.event_id),_k(e,`[TikTok Pixel] Sent ${r}:`,o)},page:t,screen:t,identify:(t,i)=>{let n=Zk(i);!n||!t.userId||Nk(n,e)&&(Pk(n,t.userId),_k(e,"[TikTok Pixel] Identity synced"))}}}const Jk={preload:(e,t,i)=>e.preload(t,i),track:(e,t,i)=>e.track(t,i),page:(e,t,i)=>e.page(t,i),screen:(e,t,i)=>e.screen(t,i),identify:(e,t,i)=>e.identify(t,i)},Qk=["fbId","gaId","tikTokId"];function Xk(e){return e||void 0}function eT(e,t=!1,i={}){let n=new Map,r=new Map,o=!1===i.sessions?null:function(e,t=!1){let i=async(i,n,r)=>{let o=function(e){let{event_id:t,team_id:i,promoter_id:n,...r}=e;return{eventId:t,teamId:i,promoterId:n,rest:r}}(n.properties);if(!function(e){return!!(e.eventId&&e.teamId&&e.promoterId)}(o))return void function(e,t,i){e&&console.warn(`[Sessions API] Missing required fields, skipping ${t}:`,{eventId:i.eventId,teamId:i.teamId,promoterId:i.promoterId})}(t,i,o);let a=r??n.name;if(!function(e){return!(!e||!kk.has(e))}(a))return void function(e,t,i){e&&console.warn(`[Sessions API] Invalid or missing eventType "${i}", skipping ${t}`)}(t,i,a);let s=function(e,t,i,n){return{eventId:t.eventId,teamId:t.teamId,promoterId:t.promoterId,eventType:i,messageId:Tk(e),occurredAt:new Date(e.timestamp).toISOString(),properties:xk(t.rest,e.name,n),context:Ak(e)}}(n,o,a,r);(function(e,t,i){e&&console.log(`[Sessions API] Sending ${t}:`,i)})(t,i,s),await e.analytics[i](s)};return{name:"Sessions API",preload:()=>{t&&console.log("[Sessions API] Preload received (no-op)")},track:e=>i("track",e).catch((e=>{t&&console.error("[Sessions API] track error:",e)})),page:e=>i("page",e,"Page Viewed").catch((e=>{t&&console.error("[Sessions API] page error:",e)})),screen:e=>i("screen",e,"Screen Viewed").catch((e=>{t&&console.error("[Sessions API] screen error:",e)})),identify:e=>{t&&console.log("[Sessions API] Identify received (logged only):",{userId:e.userId,traits:e.traits})}}}(e,t),a=[!1===i.facebook?null:ok(t),!1===i.googleAnalytics?null:Ek(t),!1===i.tikTok?null:Kk(t)].filter((e=>!!e)),s=async i=>{try{let n=function(e){let t=e??{};return Object.fromEntries(Qk.map((e=>[e,Xk(t[e])])))}((await e.promoter.get({key:i})).promoter?.tracking);return function(e,t,i){e&&console.log(`[DestinationManager] Fetched config for promoter ${t}:`,i)}(t,i,n),n}catch(e){return function(e,t,i){e&&console.warn(`[DestinationManager] Failed to fetch promoter ${t} config:`,i)}(t,i,e),{}}},d=async(e,i,n)=>{try{await u(e,i,n)}catch(i){t&&console.error(`[DestinationManager] ${e.name} error:`,i)}},c=e=>{try{e.reset?.()}catch(i){t&&console.error(`[DestinationManager] ${e.name} reset error:`,i)}},l=async e=>{let t=n.get(e);if(t)return t;let i=r.get(e);if(i)return i;i=s(e),r.set(e,i);try{let t=await i;return n.set(e,t),t}finally{r.delete(e)}},u=(e,t,i)=>Jk[t.type]?.(e,t,i);return{sendEvent:async(e,t)=>{if(!o&&0===a.length)return;let i=o?d(o,e,{}):Promise.resolve();if(0===a.length)return void await i;let n=await l(t);if(!function(e){return Qk.some((t=>!!e[t]))}(n))return void await i;let r=Promise.all(a.map((t=>d(t,e,n))));await Promise.all([i,r])},clearCache:()=>{n.clear(),r.clear();for(let e of a)c(e)}}}var tT,iT={},nT=function(){if(tT)return iT;tT=1,Object.defineProperty(iT,"__esModule",{value:!0}),iT.parseCookie=s,iT.parse=s,iT.stringifyCookie=function(i,n){let r=n?.encode||encodeURIComponent,o=[];for(let n of Object.keys(i)){let a=i[n];if(void 0===a)continue;if(!e.test(n))throw TypeError("cookie name is invalid: "+n);let s=r(a);if(!t.test(s))throw TypeError("cookie val is invalid: "+a);o.push(`${n}=${s}`)}return o.join("; ")},iT.stringifySetCookie=d,iT.serialize=d,iT.parseSetCookie=function(e,t){let i=t?.decode||p,n=e.length,o=c(e,0,n),a=l(e,0,o),s=-1===a?{name:"",value:i(u(e,0,o))}:{name:u(e,0,a),value:i(u(e,a+1,o))},d=o+1;for(;d<n;){let t=c(e,d,n),i=l(e,d,t),o=u(e,d,-1===i?t:i),a=-1===i?void 0:u(e,i+1,t);switch(o.toLowerCase()){case"httponly":s.httpOnly=!0;break;case"secure":s.secure=!0;break;case"partitioned":s.partitioned=!0;break;case"domain":s.domain=a;break;case"path":s.path=a;break;case"max-age":a&&r.test(a)&&(s.maxAge=Number(a));break;case"expires":if(!a)break;let e=new Date(a);Number.isFinite(e.valueOf())&&(s.expires=e);break;case"priority":if(!a)break;let t=a.toLowerCase();("low"===t||"medium"===t||"high"===t)&&(s.priority=t);break;case"samesite":if(!a)break;let i=a.toLowerCase();("lax"===i||"strict"===i||"none"===i)&&(s.sameSite=i)}d=t+1}return s},iT.stringifySetCookie=d,iT.serialize=d;let e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,r=/^-?\d+$/,o=Object.prototype.toString,a=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function s(e,t){let i=new a,n=e.length;if(n<2)return i;let r=t?.decode||p,o=0;do{let t=l(e,o,n);if(-1===t)break;let a=c(e,o,n);if(t>a){o=e.lastIndexOf(";",t-1)+1;continue}let s=u(e,o,t);void 0===i[s]&&(i[s]=r(u(e,t+1,a))),o=a+1}while(o<n);return i}function d(r,o,a){let s="object"==typeof r?r:{...a,name:r,value:o+""},d=("object"==typeof o?o:a)?.encode||encodeURIComponent;if(!e.test(s.name))throw TypeError("argument name is invalid: "+s.name);let c=s.value?d(s.value):"";if(!t.test(c))throw TypeError("argument val is invalid: "+s.value);let l=s.name+"="+c;if(void 0!==s.maxAge){if(!Number.isInteger(s.maxAge))throw TypeError("option maxAge is invalid: "+s.maxAge);l+="; Max-Age="+s.maxAge}if(s.domain){if(!i.test(s.domain))throw TypeError("option domain is invalid: "+s.domain);l+="; Domain="+s.domain}if(s.path){if(!n.test(s.path))throw TypeError("option path is invalid: "+s.path);l+="; Path="+s.path}if(s.expires){if(!m(s.expires)||!Number.isFinite(s.expires.valueOf()))throw TypeError("option expires is invalid: "+s.expires);l+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.partitioned&&(l+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw TypeError("option priority is invalid: "+s.priority)}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid: "+s.sameSite)}return l}function c(e,t,i){let n=e.indexOf(";",t);return-1===n?i:n}function l(e,t,i){let n=e.indexOf("=",t);return n<i?n:-1}function u(e,t,i){let n=t,r=i;do{let t=e.charCodeAt(n);if(32!==t&&9!==t)break}while(++n<r);for(;r>n;){let t=e.charCodeAt(r-1);if(32!==t&&9!==t)break;r--}return e.slice(n,r)}function p(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch{return e}}function m(e){return"[object Date]"===o.call(e)}return iT}();function rT(e,t={}){let i=function(e){return e&&"j"===e[0]&&":"===e[1]?e.substr(2):e}(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}var oT=class{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;let e=this.cookies;this.cookies=nT.parse(document.cookie),this._checkChanges(e)};let i=typeof document>"u"?"":document.cookie;this.cookies=function(e){return"string"==typeof e?nT.parse(e):"object"==typeof e&&e?e:{}}(e||i),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=function(){let e=typeof globalThis>"u"?void 0:globalThis.TEST_HAS_DOCUMENT_COOKIE;return"boolean"==typeof e?e:"object"==typeof document&&"string"==typeof document.cookie}()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach((t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:rT(this.cookies[t])})}))}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),rT(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();let t={};for(let i in this.cookies)t[i]=rT(this.cookies[i],e);return t}set(e,t,i){i=i?Object.assign(Object.assign({},this.defaultSetOptions),i):this.defaultSetOptions;let n="string"==typeof t?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:n}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=nT.serialize(e,n,i)),this._emitChange({name:e,value:t,options:i})}remove(e,t){let i=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=nT.serialize(e,"",i)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&1===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){let t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&0===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}removeAllChangeListeners(){for(;this.changeListeners.length>0;)this.removeChangeListener(this.changeListeners[0])}};function aT(){return typeof document>"u"?null:new oT}const sT={deleteCookie:function(e){let t=aT();t&&t.remove(e,{path:"/"})},getCookie:function(e){return aT()?.get(e)??null},getItem:function(e){if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}},removeItem:function(e){if(!(typeof localStorage>"u"))try{localStorage.removeItem(e)}catch{}},setCookie:function(e,t){let i=aT();i&&i.set(e,t,{path:"/",sameSite:"lax",secure:"https:"===window.location.protocol})},setItem:function(e,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(e,t)}catch{}}};function dT(){return function(e){let t=e.getCookie(Hr);if(t)return t;let i=Kr();return e.setCookie(Hr,i),i}(sT)}function cT(){return function(e){let t=e.getItem(Zr);if(t)return t;let i=Jr();return e.setItem(Zr,i),i}(sT)}function lT(){return globalThis.crypto?.randomUUID?.()??`msg_${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}`}function uT(e="tenant-web"){let t=UE(),i=NE({anonymousId:cT(),context:t,sessionId:dT()});return{name:e,referrer:t.page.referrer,utmSource:t.campaign?.source,utmMedium:t.campaign?.medium,utmCampaign:t.campaign?.name,browser:pT(i.browser),deviceType:mT(i.device_type),sessionId:pT(i.browser_session_id),anonymousId:pT(i.anonymous_id)}}function pT(e){return"string"==typeof e&&e.length>0?e:void 0}function mT(e){return"MOBILE"===e||"TABLET"===e||"DESKTOP"===e?e:void 0}const hT={AED:{name:"United Arab Emirates Dirham",symbol:"AED",locale:"ar-AE",decimals:2,airwallex:!0},AUD:{name:"Australian Dollar",symbol:"A$",locale:"en-AU",decimals:2,airwallex:!0},BRL:{name:"Brazilian Real",symbol:"R$",locale:"pt-BR",decimals:2,airwallex:!0},CAD:{name:"Canadian Dollar",symbol:"CA$",locale:"en-CA",decimals:2,airwallex:!0},CHF:{name:"Swiss Franc",symbol:"CHF",locale:"de-CH",decimals:2,airwallex:!0},CNY:{name:"Chinese Yuan",symbol:"CN¥",locale:"zh-CN",decimals:2,airwallex:!0},CZK:{name:"Czech Koruna",symbol:"CZK",locale:"cs-CZ",decimals:2,airwallex:!0},DKK:{name:"Danish Krone",symbol:"DKK",locale:"da-DK",decimals:2,airwallex:!0},EUR:{name:"Euro",symbol:"€",locale:"de-DE",decimals:2,airwallex:!0},GBP:{name:"British Pound Sterling",symbol:"£",locale:"en-GB",decimals:2,airwallex:!0},HKD:{name:"Hong Kong Dollar",symbol:"HK$",locale:"zh-HK",decimals:2,airwallex:!0},HUF:{name:"Hungarian Forint",symbol:"HUF",locale:"hu-HU",decimals:2,airwallex:!0},ILS:{name:"Israeli New Sheqel",symbol:"₪",locale:"he-IL",decimals:2,airwallex:!0},JPY:{name:"Japanese Yen",symbol:"¥",locale:"ja-JP",decimals:0,airwallex:!0},KRW:{name:"South Korean Won",symbol:"₩",locale:"ko-KR",decimals:0,airwallex:!0},MXN:{name:"Mexican Peso",symbol:"MX$",locale:"es-MX",decimals:2,airwallex:!0},NOK:{name:"Norwegian Krone",symbol:"NOK",locale:"nb-NO",decimals:2,airwallex:!0},NZD:{name:"New Zealand Dollar",symbol:"NZ$",locale:"en-NZ",decimals:2,airwallex:!0},PLN:{name:"Polish Zloty",symbol:"PLN",locale:"pl-PL",decimals:2,airwallex:!0},RON:{name:"Romanian Leu",symbol:"RON",locale:"ro-RO",decimals:2,airwallex:!0},SEK:{name:"Swedish Krona",symbol:"SEK",locale:"sv-SE",decimals:2,airwallex:!0},SGD:{name:"Singapore Dollar",symbol:"SGD",locale:"en-SG",decimals:2,airwallex:!0},THB:{name:"Thai Baht",symbol:"THB",locale:"th-TH",decimals:2,airwallex:!0},USD:{name:"US Dollar",symbol:"$",locale:"en-US",decimals:2,airwallex:!0},VND:{name:"Vietnamese Dong",symbol:"₫",locale:"vi-VN",decimals:0,airwallex:!0},ZAR:{name:"South African Rand",symbol:"ZAR",locale:"en-ZA",decimals:2,airwallex:!0},BIF:{name:"Burundi Franc",symbol:"BIF",locale:"fr-BI",decimals:0},CLP:{name:"Chilean Peso",symbol:"CLP",locale:"es-CL",decimals:0},DJF:{name:"Djibouti Franc",symbol:"DJF",locale:"fr-DJ",decimals:0},GNF:{name:"Guinea Franc",symbol:"GNF",locale:"fr-GN",decimals:0},ISK:{name:"Iceland Krona",symbol:"ISK",locale:"is-IS",decimals:0},KMF:{name:"Comoro Franc",symbol:"KMF",locale:"fr-KM",decimals:0},PYG:{name:"Paraguayan Guarani",symbol:"PYG",locale:"es-PY",decimals:0},RWF:{name:"Rwanda Franc",symbol:"RWF",locale:"rw-RW",decimals:0},SLE:{name:"Sierra Leonean Leone",symbol:"Le",locale:"en-SL",decimals:0},UGX:{name:"Uganda Shilling",symbol:"UGX",locale:"en-UG",decimals:0},VUV:{name:"Vanuatu Vatu",symbol:"VUV",locale:"en-VU",decimals:0},XAF:{name:"CFA Franc BEAC",symbol:"FCFA",locale:"fr-CM",decimals:0},XOF:{name:"CFA Franc BCEAO",symbol:"CFA",locale:"fr-SN",decimals:0},XPF:{name:"CFP Franc",symbol:"CFPF",locale:"fr-PF",decimals:0},BHD:{name:"Bahraini Dinar",symbol:"BHD",locale:"ar-BH",decimals:3},JOD:{name:"Jordanian Dinar",symbol:"JOD",locale:"ar-JO",decimals:3},KWD:{name:"Kuwaiti Dinar",symbol:"KWD",locale:"ar-KW",decimals:3},LYD:{name:"Libyan Dinar",symbol:"LYD",locale:"ar-LY",decimals:3},OMR:{name:"Rial Omani",symbol:"OMR",locale:"ar-OM",decimals:3},TND:{name:"Tunisian Dinar",symbol:"TND",locale:"ar-TN",decimals:3},ALL:{name:"Albanian Lek",symbol:"ALL",locale:"sq-AL",decimals:2},AMD:{name:"Armenian Dram",symbol:"֏",locale:"hy-AM",decimals:2},ANG:{name:"Netherlands Antillean Guilder",symbol:"ANG",locale:"nl-CW",decimals:2},AOA:{name:"Angolan Kwanza",symbol:"Kz",locale:"pt-AO",decimals:2},ARS:{name:"Argentine Peso",symbol:"ARS",locale:"es-AR",decimals:2},AWG:{name:"Aruban Florin",symbol:"AWG",locale:"nl-AW",decimals:2},AZN:{name:"Azerbaijani Manat",symbol:"₼",locale:"az-AZ",decimals:2},BAM:{name:"Convertible Mark",symbol:"KM",locale:"bs-BA",decimals:2},BBD:{name:"Barbadian Dollar",symbol:"BBD",locale:"en-BB",decimals:2},BDT:{name:"Bangladeshi Taka",symbol:"BDT",locale:"bn-BD",decimals:2},BGN:{name:"Bulgarian Lev",symbol:"лв",locale:"bg-BG",decimals:2},BMD:{name:"Bermudian Dollar",symbol:"BMD",locale:"en-BM",decimals:2},BND:{name:"Brunei Dollar",symbol:"BND",locale:"en-BN",decimals:2},BOB:{name:"Bolivian Boliviano",symbol:"BOB",locale:"es-BO",decimals:2},BSD:{name:"Bahamian Dollar",symbol:"BSD",locale:"en-BS",decimals:2},BTN:{name:"Bhutanese Ngultrum",symbol:"Nu.",locale:"dz-BT",decimals:2},BWP:{name:"Botswanan Pula",symbol:"BWP",locale:"en-BW",decimals:2},BZD:{name:"Belize Dollar",symbol:"BZD",locale:"en-BZ",decimals:2},COP:{name:"Colombian Peso",symbol:"COP",locale:"es-CO",decimals:2},CRC:{name:"Costa Rican Colon",symbol:"CRC",locale:"es-CR",decimals:2},CVE:{name:"Cabo Verde Escudo",symbol:"CVE",locale:"pt-CV",decimals:2},DOP:{name:"Dominican Peso",symbol:"DOP",locale:"es-DO",decimals:2},DZD:{name:"Algerian Dinar",symbol:"DZD",locale:"ar-DZ",decimals:2},EGP:{name:"Egyptian Pound",symbol:"EGP",locale:"ar-EG",decimals:2},ERN:{name:"Eritrean Nakfa",symbol:"Nfk",locale:"ti-ER",decimals:2},ETB:{name:"Ethiopian Birr",symbol:"ETB",locale:"am-ET",decimals:2},FJD:{name:"Fijian Dollar",symbol:"FJD",locale:"en-FJ",decimals:2},FKP:{name:"Falkland Islands Pound",symbol:"FKP",locale:"en-FK",decimals:2},GEL:{name:"Georgian Lari",symbol:"₾",locale:"ka-GE",decimals:2},GHS:{name:"Ghana Cedi",symbol:"GH₵",locale:"en-GH",decimals:2},GIP:{name:"Gibraltar Pound",symbol:"GIP",locale:"en-GI",decimals:2},GMD:{name:"Gambian Dalasi",symbol:"GMD",locale:"en-GM",decimals:2},GTQ:{name:"Guatemalan Quetzal",symbol:"GTQ",locale:"es-GT",decimals:2},GYD:{name:"Guyanaese Dollar",symbol:"GYD",locale:"en-GY",decimals:2},HNL:{name:"Honduran Lempira",symbol:"HNL",locale:"es-HN",decimals:2},IDR:{name:"Indonesian Rupiah",symbol:"IDR",locale:"id-ID",decimals:2},INR:{name:"Indian Rupee",symbol:"₹",locale:"en-IN",decimals:2},JMD:{name:"Jamaican Dollar",symbol:"JMD",locale:"en-JM",decimals:2},KES:{name:"Kenyan Shilling",symbol:"KES",locale:"en-KE",decimals:2},KGS:{name:"Kyrgyzstani Som",symbol:"сом",locale:"ky-KG",decimals:2},KHR:{name:"Cambodian Riel",symbol:"KHR",locale:"km-KH",decimals:2},KYD:{name:"Cayman Islands Dollar",symbol:"KYD",locale:"en-KY",decimals:2},KZT:{name:"Kazakhstani Tenge",symbol:"KZT",locale:"kk-KZ",decimals:2},LAK:{name:"Laotian Kip",symbol:"LAK",locale:"lo-LA",decimals:2},LBP:{name:"Lebanese Pound",symbol:"LBP",locale:"ar-LB",decimals:2},LKR:{name:"Sri Lankan Rupee",symbol:"LKR",locale:"en-LK",decimals:2},LRD:{name:"Liberian Dollar",symbol:"LRD",locale:"en-LR",decimals:2},LSL:{name:"Lesotho Loti",symbol:"LSL",locale:"en-LS",decimals:2},MAD:{name:"Moroccan Dirham",symbol:"MAD",locale:"ar-MA",decimals:2},MDL:{name:"Moldovan Leu",symbol:"MDL",locale:"ro-MD",decimals:2},MGA:{name:"Malagasy Ariary",symbol:"Ar",locale:"fr-MG",decimals:2},MKD:{name:"Macedonian Denar",symbol:"ден",locale:"mk-MK",decimals:2},MNT:{name:"Mongolian Tugrik",symbol:"MNT",locale:"mn-MN",decimals:2},MOP:{name:"Macanese Pataca",symbol:"MOP",locale:"zh-MO",decimals:2},MUR:{name:"Mauritian Rupee",symbol:"MUR",locale:"en-MU",decimals:2},MVR:{name:"Maldivian Rufiyaa",symbol:"MVR",locale:"dv-MV",decimals:2},MWK:{name:"Malawian Kwacha",symbol:"MWK",locale:"en-MW",decimals:2},MYR:{name:"Malaysian Ringgit",symbol:"MYR",locale:"ms-MY",decimals:2},NAD:{name:"Namibian Dollar",symbol:"NAD",locale:"en-NA",decimals:2},NGN:{name:"Nigerian Naira",symbol:"NGN",locale:"en-NG",decimals:2},NIO:{name:"Nicaraguan Cordoba",symbol:"NIO",locale:"es-NI",decimals:2},NPR:{name:"Nepalese Rupee",symbol:"NPR",locale:"ne-NP",decimals:2},PAB:{name:"Panamanian Balboa",symbol:"PAB",locale:"es-PA",decimals:2},PEN:{name:"Peruvian Nuevo Sol",symbol:"PEN",locale:"es-PE",decimals:2},PGK:{name:"Papua New Guinean Kina",symbol:"PGK",locale:"en-PG",decimals:2},PHP:{name:"Philippine Peso",symbol:"PHP",locale:"en-PH",decimals:2},PKR:{name:"Pakistani Rupee",symbol:"PKR",locale:"en-PK",decimals:2},QAR:{name:"Qatari Rial",symbol:"QAR",locale:"ar-QA",decimals:2},RSD:{name:"Serbian Dinar",symbol:"din.",locale:"sr-RS",decimals:2},SAR:{name:"Saudi Riyal",symbol:"SAR",locale:"ar-SA",decimals:2},SBD:{name:"Solomon Islands Dollar",symbol:"SBD",locale:"en-SB",decimals:2},SCR:{name:"Seychellois Rupee",symbol:"SCR",locale:"en-SC",decimals:2},SHP:{name:"Saint Helena Pound",symbol:"SHP",locale:"en-SH",decimals:2},SRD:{name:"Surinamese Dollar",symbol:"SRD",locale:"nl-SR",decimals:2},STD:{name:"Sao Tome and Principe Dobra",symbol:"STD",locale:"pt-ST",decimals:2},SVC:{name:"Salvadoran Colon",symbol:"SVC",locale:"es-SV",decimals:2},SZL:{name:"Swazi Lilangeni",symbol:"SZL",locale:"en-SZ",decimals:2},TJS:{name:"Tajikistani Somoni",symbol:"SM",locale:"tg-TJ",decimals:2},TMT:{name:"Turkmenistani Manat",symbol:"TMT",locale:"tk-TM",decimals:2},TOP:{name:"Tongan Pa'anga",symbol:"TOP",locale:"to-TO",decimals:2},TRY:{name:"Turkish Lira",symbol:"₺",locale:"tr-TR",decimals:2},TTD:{name:"Trinidad and Tobago Dollar",symbol:"TTD",locale:"en-TT",decimals:2},TWD:{name:"New Taiwan Dollar",symbol:"NT$",locale:"zh-TW",decimals:2},TZS:{name:"Tanzanian Shilling",symbol:"TZS",locale:"sw-TZ",decimals:2},UAH:{name:"Ukrainian Hryvnia",symbol:"UAH",locale:"uk-UA",decimals:2},UYU:{name:"Uruguayan Peso",symbol:"UYU",locale:"es-UY",decimals:2},UZS:{name:"Uzbekistani Som",symbol:"UZS",locale:"uz-UZ",decimals:2},WST:{name:"Samoan Tala",symbol:"WST",locale:"sm-WS",decimals:2},XCD:{name:"East Caribbean Dollar",symbol:"EC$",locale:"en-AG",decimals:2},ZMW:{name:"Zambian Kwacha",symbol:"ZK",locale:"en-ZM",decimals:2},ZWL:{name:"Zimbabwean Dollar",symbol:"ZWL",locale:"en-ZW",decimals:2}};Object.entries(hT).filter((([,e])=>e.airwallex)).map((([e])=>e));var fT,yT,gT={},vT={},bT={},wT={};function $T(){return yT||(yT=1,wT.tzName=function(e,t,i="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:i}).format(t).split(/\s/g).slice(2).join(" ")}),wT}var IT,ET,kT,TT={},AT={};function xT(){if(IT)return AT;IT=1,AT.tzOffset=function(r,o){try{const i=(e[r]||=new Intl.DateTimeFormat("en-US",{timeZone:r,timeZoneName:"longOffset"}).format)(o).split("GMT")[1];return i in t?t[i]:n(i,i.split(":"))}catch{if(r in t)return t[r];const e=r?.match(i);return e?n(r,e.slice(1)):NaN}};const e={},t={},i=/([+-]\d\d):?(\d\d)?/;function n(e,i){const n=+(i[0]||0),r=+(i[1]||0),o=+(i[2]||0)/60;return t[e]=60*n+r>0?60*n+r+o:60*n-r-o}return AT}function ST(){if(ET)return TT;ET=1,TT.TZDateMini=void 0;var e=xT();class t extends Date{constructor(...t){super(),t.length>1&&"string"==typeof t[t.length-1]&&(this.timeZone=t.pop()),this.internal=new Date,isNaN((0,e.tzOffset)(this.timeZone,this))?this.setTime(NaN):t.length?"number"==typeof t[0]&&(1===t.length||2===t.length&&"number"!=typeof t[1])?this.setTime(t[0]):"string"==typeof t[0]?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),r(this,t)):this.setTime(Date.now())}static tz(e,...i){return i.length?new t(...i,e):new t(Date.now(),e)}withTimeZone(e){return new t(+this,e)}getTimezoneOffset(){const t=-(0,e.tzOffset)(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(e){return Date.prototype.setTime.apply(this,arguments),n(this),+this}[Symbol.for("constructDateFrom")](e){return new t(+new Date(e),this.timeZone)}}TT.TZDateMini=t;const i=/^(get|set)(?!UTC)/;function n(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,t)))}function r(t,i){const r=Array.isArray(i)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(i):+t.internal,a=(0,e.tzOffset)(t.timeZone,t),s=a>0?Math.floor(a):Math.ceil(a),d=new Date(+t);d.setUTCHours(d.getUTCHours()-1);const c=-new Date(+t).getTimezoneOffset(),l=-new Date(+d).getTimezoneOffset();let u=c;if(c-l&&c!==s&&Date.prototype.getHours.apply(t)!==(Array.isArray(i)?i[3]||0:t.internal.getUTCHours())){const i=new Date(+t),n=c-s;n&&i.setUTCMinutes(i.getUTCMinutes()+n);const r=(0,e.tzOffset)(t.timeZone,i);(r>0?Math.floor(r):Math.ceil(r))===s&&(u=l)}const p=u-s;p&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+p);const m=new Date(+t);m.setUTCSeconds(0);const h=c>0?m.getSeconds():(m.getSeconds()-60)%60,f=Math.round(-60*(0,e.tzOffset)(t.timeZone,t))%60;(f||h)&&Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+f+h);const y=(0,e.tzOffset)(t.timeZone,t),g=y>0?Math.floor(y):Math.ceil(y),v=g!==s,b=-new Date(+t).getTimezoneOffset()-g-p,w=g-s,$=r-60*g*1e3,I=w>0&&o(t)-r==60*w*1e3&&o(t,$)!==r;if(v&&b&&!I){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+b);const i=(0,e.tzOffset)(t.timeZone,t),n=g-(i>0?Math.floor(i):Math.ceil(i));n&&b<0&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+n)}n(t);const E=(i?r:r+1e3*f)-+t.internal;E&&Math.abs(E)<18e5&&(Date.prototype.setTime.call(t,+t+E),n(t))}function o(t,i){const n=new Date(i??+t);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,n))),+n}return Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!i.test(e))return;const o=e.replace(i,"$1UTC");t.prototype[o]&&(e.startsWith("get")?t.prototype[e]=function(){return this.internal[o]()}:(t.prototype[e]=function(){return Date.prototype[o].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),r(e)}(this),+this},t.prototype[o]=function(){return Date.prototype[o].apply(this,arguments),n(this),+this}))})),TT}function DT(){if(kT)return bT;kT=1,bT.TZDate=void 0;var e=$T(),t=ST();class i extends t.TZDateMini{static tz(e,...t){return t.length?new i(...t,e):new i(Date.now(),e)}toISOString(){const[e,t,i]=this.tzComponents(),n=`${e}${t}:${i}`;return this.internal.toISOString().slice(0,-1)+n}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,i,n]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${i} ${t} ${n}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[i,n,r]=this.tzComponents();return`${t} GMT${i}${n}${r} (${(0,e.tzName)(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",(Math.floor(Math.abs(e)/60)+"").padStart(2,"0"),(Math.abs(e)%60+"").padStart(2,"0")]}withTimeZone(e){return new i(+this,e)}[Symbol.for("constructDateFrom")](e){return new i(+new Date(e),this.timeZone)}}return bT.TZDate=i,bT}var CT,OT,PT,RT={},_T={},NT=(PT||(PT=1,function(e){var t=(fT||(fT=1,vT.constructFromSymbol=void 0,vT.constructFromSymbol=Symbol.for("constructDateFrom")),vT);Object.keys(t).forEach((function(i){"default"!==i&&"__esModule"!==i&&(i in e&&e[i]===t[i]||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}}))}));var i=DT();Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var n=ST();Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}}))}));var r=function(){if(CT)return RT;CT=1,RT.tz=void 0;var e=DT();return RT.tz=t=>i=>e.TZDate.tz(t,+new Date(i)),RT}();Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))}));var o=xT();Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var a=function(){if(OT)return _T;OT=1,_T.tzScan=function(t,i){const n=[],r=new Date(i.start);r.setUTCSeconds(0,0);const o=new Date(i.end);o.setUTCSeconds(0,0);const a=+o;let s=(0,e.tzOffset)(t,r);for(;+r<a;){r.setUTCMonth(r.getUTCMonth()+1);const i=(0,e.tzOffset)(t,r);if(i!=s){const i=new Date(r);i.setUTCMonth(i.getUTCMonth()-1);const o=+r;for(s=(0,e.tzOffset)(t,i);+i<o;){i.setUTCDate(i.getUTCDate()+1);const r=(0,e.tzOffset)(t,i);if(r!=s){const r=new Date(i);r.setUTCDate(r.getUTCDate()-1);const o=+i;for(s=(0,e.tzOffset)(t,r);+r<o;){r.setUTCHours(r.getUTCHours()+1);const i=(0,e.tzOffset)(t,r);i!==s&&n.push({date:new Date(r),change:i-s,offset:i}),s=i}}s=r}}s=i}return n};var e=xT();return _T}();Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}));var s=$T();Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}))}(gT)),gT);function UT(e,t){const[i,n,r,o,a,s]=function(e){const[t,i]=e.split("T");if(!t||!i)throw Error("Invalid naive datetime format: "+e);const n=[...t.split("-"),...i.split(":")].map(Number);if(n.length<6)throw Error("Invalid naive datetime format: "+e);return n.slice(0,6)}(e);return new NT.TZDate(i,n-1,r,o,a,s,t)}function MT(e,t){return UT(e,t)<new NT.TZDate(new Date,t)}function LT(e,t){return UT(e,t)>new NT.TZDate(new Date,t)}function qT(e){return null==e||-1===e?1/0:Math.max(0,e)}function GT(e){return Math.min(qT(e.admission.available),qT(e.admission.limit),qT(e.section?.available),qT(e.section?.limit))}function jT(e){return GT(e)<=0}function BT(e,t,i,n=new Date){return function(e,t,i,n=new Date){return"AFTER_ADMISSION"===e.visibility&&!function(e,t,i=new Date){return!!e&&(!!(e.saleEndsAt&&UT(e.saleEndsAt,t)<i)||null!=e.capacity&&-1!==e.capacity&&(e.sold??0)>=e.capacity)}(function(e,t){if("AFTER_ADMISSION"===e.visibility&&e.visibleAfterAdmissionId)return t.find((t=>t.id===e.visibleAfterAdmissionId))}(e,t),i,n)}(e,t,i,n)?{text:"Available soon"}:null}function FT(e){return e?.trim().toUpperCase()??""}function VT(e){return`${e.admissionId}::${e.sectionId??"none"}`}const zT=["__puppeteer_evaluation_script__","__puppeteer"],WT=["__playwright","__playwright__binding__","__pw_manual","__pwInitScripts"],YT=["_selenium","callSelenium","_Selenium_IDE_Recorder","__selenium_evaluate","__webdriver_evaluate","__webdriver_script_function","__fxdriver_evaluate","domAutomation","domAutomationController"],HT=["callPhantom","_phantom","__phantomas","__casper","slimer","__nightmare"],ZT=["$cdc_","$wdc_","$chrome_asyncScriptInfo"];function KT(e,t){return t.some((t=>t in e))}const JT="en-US";function QT(e,t){return`${e}::${t||"none"}`}function XT(e){return e?"number"==typeof e.total?e.total:(e.base??0)+(e.booking??0):0}function eA(e){return e?Math.max(XT(e)-(e.booking??0),0):0}function tA(e){return e.location?.timeZone??"UTC"}function iA(e){return new Map(e.sections.map((e=>[e.id??"",e])))}function nA(e,t){return!e.sectionId||t.has(e.sectionId)}function rA(e){const t=iA(e),i=tA(e);return e.admissions.some((n=>function(e,t,i,n){return!!nA(e,n)&&!BT(e,t,i)&&!!function(e,t){return!LT(e.saleStartsAt,t)&&!MT(e.saleEndsAt,t)}(e,i)&&function(e,t){return GT({admission:e,section:t})>0}(e,function(e,t){if(e.sectionId)return t.get(e.sectionId)}(e,n))}(n,e.admissions,i,t)))}function oA(e,t,i){if(!LT(e.saleStartsAt,t))return null;const n=UT(e.saleStartsAt,"UTC");return{text:`On sale ${aA(i,{day:"numeric",month:"short",timeZone:"UTC",weekday:"short"}).format(n)} · ${aA(i,{hour:"numeric",minute:"2-digit",timeZone:"UTC"}).format(n)}`,tone:"muted"}}function aA(e,t){try{return new Intl.DateTimeFormat(e,t)}catch{return new Intl.DateTimeFormat(JT,t)}}function sA(e){const t=QT(e.admission.id??"",e.section.id??null);return fA({admission:e.admission,initialPrice:e.initialAdmissionPrices?.[t],previewItem:e.previewItems.get(t),quoteItem:e.quoteItems.get(t)}).base}function dA(e){return null==e||-1===e?1/0:Math.max(0,e)}function cA(e,t,i){if(!e.id)return[];const n=t.filter((t=>t.sectionId===e.id)).sort(((e,t)=>e.order-t.order));if("STACKED"!==e.visibility||n.length<=1)return n;const r=i.mode??"default",o=n.filter((t=>function(e){return"door"===e.mode||!e.event||!hA({admission:e.admission,event:e.event,section:e.section}).disabled}({admission:t,event:i.event,mode:r,section:e}))),a=o.length>0?o:n,[s,d]=[...a].sort(function(e,t){const i=yA(e.previewQuote??null),n=yA(e.quote??null);return(r,o)=>{const a=sA({admission:r,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:i,quoteItems:n,section:t})-sA({admission:o,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:i,quoteItems:n,section:t});if(0!==a)return a;const s=r.order-o.order;return 0!==s?s:(r.id??"").localeCompare(o.id??"")}}(i,e));return s?d&&function(e){const t=dA(e.available);if(!Number.isFinite(t))return!1;const i=dA(e.limit);return Number.isFinite(i)?i>t:t<10}(s)?[s,d]:[s]:[]}function lA(e,t,i){return e.map((e=>({admissions:cA(e,t,i),section:e,type:"section"}))).filter((e=>e.admissions.length>0))}function uA(e){return"section"===e.type?e.section.order:e.admission.order}function pA(e,t){return function(e,t){return-1===e.available&&-1===e.capacity&&(!t||-1===t.available)}(e,t)?10:Math.min(GT({admission:e,section:t}),10)}function mA(e,t,i){const n=e.available??0;return[!t,!i,n>0,n<=5].every(Boolean)}function hA(e){const t=tA(e.event),i=BT(e.admission,e.event.admissions,t),n=LT(e.admission.saleStartsAt,t),r=MT(e.admission.saleEndsAt,t),o=!!e.sectionSoldOut||r&&"SOLD_OUT"===e.admission.saleEndsBehavior||jT({admission:e.admission,section:e.section}),a=o||n||r,s=function(e){return"DOOR"===e.value&&(e.soldOut||e.saleEnded)?{text:"Available At Door",tone:"success"}:e.soldOut?{text:"Sold Out",tone:"destructive"}:e.saleEnded?{text:"Sale Ended",tone:"destructive"}:null}({saleEnded:r,soldOut:o,value:e.admission.saleEndsBehavior});return{disabled:a||!!i,label:i?{...i,tone:"muted"}:oA(e.admission,t,e.locale??JT),maxQuantity:pA(e.admission,e.section),postSale:r,showScarcity:mA(e.admission,o,a),soldOut:o,statusLabel:s?.text??null,statusTone:s?.tone??null}}function fA(e){const t=e.quoteItem??e.previewItem;if(t){const e=function(e){return Math.max(e?.quantity??1,1)}(t),i=Math.round(t.price.booking/e),n=Math.max(Math.round((t.price.total??t.price.base+t.price.booking+t.price.discount)/e)-i,0);return t.price.discount>=0?{base:n,discounted:!1,fees:i}:{base:n,discounted:!0,fees:i,gross:Math.max(Math.round((t.price.gross??t.price.base+t.price.booking)/e)-i,0)}}if(e.initialPrice&&e.initialPrice.discount<0){const t=e.admission.price.booking??0;return{base:Math.max(e.initialPrice.total-t,0),discounted:!0,fees:t,gross:Math.max(e.initialPrice.gross-t,0)}}return{base:eA(e.admission.price),discounted:!1,fees:e.admission.price.booking??0}}function yA(e){return function(e){return new Map((e?.items??[]).filter((e=>"ADMISSION"===e.kind&&e.admissionId)).map((e=>[VT({admissionId:e.admissionId??"",sectionId:e.sectionId}),e])))}(e)}const gA=QT,vA=XT,bA=tA,wA=function(e){const t=function(e){return MT(e.entryEndsAt,tA(e))}(e),i=e.url||void 0,n=function(e){return!rA(e)&&"DOOR"===function(e){const t=iA(e),i=e.admissions.filter((e=>nA(e,t)));if(0!==i.length)return rA(e)?"ONLINE":function(e,t){const i=e.filter((e=>MT(e.saleEndsAt,t)));if(0!==i.length)return i.some((e=>"DOOR"===e.saleEndsBehavior))?"DOOR":i.every((e=>"SOLD_OUT"===e.saleEndsBehavior))?"SOLD_OUT":"SALE_ENDED"}(i,tA(e))}(e)}(e),r=!t&&!!i,o=!t&&!r&&function(e){const t=iA(e);return e.admissions.some((e=>nA(e,t)))}(e);return{externalTicketUrl:i,isDoorOnly:n,isEnded:t,isUnavailableForSale:!n&&!rA(e)&&o,showExternalTicketing:r,showTicketing:o,ticketHeading:n?"Tickets at the Door":"Get Tickets"}};function $A(e){return hA(e)}function IA(e){return yA(e)}const EA=function(e){const t=new Set(e.sections.map((e=>e.id))),i=tA(e);return e.admissions.filter((n=>!(BT(n,e.admissions,i)||n.sectionId&&!t.has(n.sectionId)||LT(n.saleStartsAt,i)||MT(n.saleEndsAt,i)))).flatMap((e=>e.id?[{admissionId:e.id,quantity:1,sectionId:e.sectionId??void 0}]:[]))},kA=e=>e.price?.total??0;function TA(e,t){return function(e,t){const i=function(e){return hT[e]?.decimals??2}(t),n=10**i;return Number(e)/n}(e,t??"")}function AA(e,t){return TA(vA(e),e?.currency??t)}function xA(e,t){return TA(kA(e),e.price?.currency??t)}function SA(e,t){return e instanceof Error?e.message:t}function DA(e){const t=function(e){if(e&&"object"==typeof e)return e.code}(e);return"string"==typeof t?t:void 0}async function CA(e,t){let i;const n=new Promise(((t,n)=>{i=setTimeout((()=>{e.abort(),n(Error("The request timed out"))}),15e3)}));try{return await Promise.race([t(e.signal),n])}finally{i&&clearTimeout(i)}}function OA(e){try{return JSON.parse(e)}catch{return null}}function PA(e){return e.teamId?e.promoterId?null:"missing_promoter_id":"missing_team_id"}function RA(e){return[e.location?.venue?.name,e.location?.name].find(Boolean)}function _A(e){return e||void 0}function NA(e){if(!e)return"external site";try{return new URL(e).hostname.replace(/^www\./,"")}catch{return"external site"}}function UA(e){return!!e?.items?.length}function MA(e){return{product_id:e.admissionId,sku:e.admissionId,quantity:e.quantity,admission_id:e.admissionId,section_id:e.sectionId}}function LA({event:e,admission:t,section:i}){return{name:t?.name,category:e?.name,variant:i?.name}}function qA(e){return{price:AA(e.price),price_base:e.price?.base,price_booking_fee:e.price?.booking}}const GA=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M8 2v4"}),r("path",{d:"M16 2v4"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),r("path",{d:"M3 10h18"})),jA=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),r("circle",{cx:"12",cy:"10",r:"3"})),BA=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.checkoutInit=n(this,"checkoutInit"),this.cartUpdate=n(this,"cartUpdate"),this.errorOccurred=n(this,"errorOccurred"),this.analyticsEventSkipped=n(this,"analyticsEventSkipped")}get host(){return this}tenantId;eventId;apiUrl="https://api.session.services";locale="en-US";returnUrl;returnDestinationKey;createOrder;couponCode;initialAdmissionPrices;initialPreviewQuote;passcode;stickyCheckout=!1;theme="system";enableAnalytics=!0;debugAnalytics=!1;event=null;selectedItems=new Map;quote=null;previewQuote=null;initialLoading=!0;eventLoading=!1;retryLoading=!1;passcodeLoading=!1;error=null;errorKind=null;refreshError=null;quoteLoading=!1;previewLoading=!1;quoteError=null;couponError=null;couponInput="";appliedCouponCode="";passcodeInput="";activePasscode="";passcodeDenied=!1;selectionPrompt=!1;checkoutLoading=!1;checkoutError=null;currentTheme="light";openModalAdmissionId=null;verificationRequired=!1;checkoutInit;cartUpdate;errorOccurred;analyticsEventSkipped;client;analytics;mediaQueryList;requestId=0;previewRequestId=0;eventRequestId=0;checkoutRequestId=0;couponRequestId=0;initializeId=0;initialSettled=!1;active=!0;trackedIdentity;quoteRevision;checkoutIdempotencyKeys=new Map;eventController;quoteController;previewController;checkoutController;couponController;quoteTimer;promptTimer;botBypassed=!1;modalTrigger;modalFocusPending=!1;modalRestorePending=!1;connectedCallback(){this.active=!0,"undefined"!=typeof window&&window.addEventListener("popstate",this.handleDiscountQueryChange)}componentWillLoad(){this.startInitialization()}componentDidRender(){if(this.modalFocusPending){const e=this.host.shadowRoot?.querySelector(".modal-content");if(!e)return;return this.modalFocusPending=!1,void e.querySelector("button")?.focus()}this.modalRestorePending&&(this.modalRestorePending=!1,this.modalTrigger?.focus(),this.modalTrigger=void 0)}propsChanged(){this.startInitialization()}couponCodeChanged(){this.setInitialCoupon().catch((e=>{this.setCouponError(SA(e,"Failed to update coupon"))}))}themeChanged(){this.setupTheme()}disconnectedCallback(){this.active=!1,this.initializeId++,this.invalidateRequests(),"undefined"!=typeof window&&window.removeEventListener&&window.removeEventListener("popstate",this.handleDiscountQueryChange),this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),document.removeEventListener("keydown",this.handleModalKeyDown),this.clearQuoteTimer(),this.clearPromptTimer()}handleDiscountQueryChange=()=>{FT(this.couponCode)||this.setInitialCoupon().catch((()=>{}))};continueAfterVerification=async()=>{this.botBypassed=!0,this.verificationRequired=!1;const e=this.initializeComponent(),t=this.initializeId;try{await e}catch(e){t===this.initializeId&&this.handleInitializationError(e)}};startInitialization(){const e=this.initializeComponent(),t=this.initializeId;e.catch((e=>{t===this.initializeId&&this.handleInitializationError(e)}))}handleInitializationError=e=>{const t=SA(e,"Failed to load event data");this.error=t,this.errorKind="transient",this.finishInitialLoad(!this.initialSettled),this.errorOccurred.emit({error:t})};async initializeComponent(){const e=++this.initializeId,t=!this.initialSettled;if(this.invalidateRequests(),this.error=null,this.errorKind=null,this.refreshError=null,this.event=null,this.selectedItems=new Map,this.quote=null,this.previewQuote=null,this.quoteError=null,this.checkoutError=null,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutLoading=!1,this.couponError=null,this.couponInput=this.initialCouponCode(),this.appliedCouponCode=this.couponInput,this.activePasscode=this.passcode||"",this.passcodeInput=this.activePasscode,this.passcodeDenied=!1,this.verificationRequired=!1,this.initialLoading=t,this.eventLoading=!t,this.retryLoading=!1,this.passcodeLoading=!1,!this.tenantId||!this.eventId)return this.error="Missing required configuration: tenantId and eventId",this.errorKind="configuration",void this.finishInitialLoad(t);if(this.setupTheme(),!this.botBypassed&&function(e){try{return"https://api.session.services"===new URL(e).origin}catch{return!1}}(this.apiUrl)&&function(){try{const e=function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator)return{globals:window,root:document.documentElement,userAgent:navigator.userAgent,webdriver:navigator.webdriver}}();return e?function(e){const t=Object.keys(e.globals),i=[!0===e.webdriver?"webdriver":void 0,/HeadlessChrome|Playwright|PhantomJS/i.test(e.userAgent)?"automation-user-agent":void 0,KT(e.globals,zT)?"puppeteer":void 0,KT(e.globals,WT)?"playwright":void 0,KT(e.globals,YT)||e.root.hasAttribute("webdriver")||e.root.hasAttribute("selenium")?"selenium":void 0,t.some((e=>ZT.some((t=>e.startsWith(t)))))?"chromedriver":void 0,KT(e.globals,HT)?"phantomjs":void 0].filter((e=>void 0!==e));return{bot:i.length>0,signals:i}}(e):{bot:!1,signals:[]}}catch{return{bot:!1,signals:[]}}}().bot)return this.verificationRequired=!0,void this.finishInitialLoad(t);this.client=function(e){return Wo(new Uw(kE,{url:AE(e.environment),headers:{"x-tenant-id":e.tenantId??"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",...e.headers??{}}}))}({environment:this.apiUrl,tenantId:this.tenantId}),this.analytics=void 0;const i=await this.loadEventData({mode:t?"initial":"refresh"});e===this.initializeId&&"success"===i.status&&(this.handleLoadedEvent(i.event),await this.updatePreviewQuote())}handleLoadedEvent(e){const t=`${this.apiUrl}::${this.tenantId}::${this.eventId}`;this.setupAnalytics(e),t!==this.trackedIdentity&&(this.trackedIdentity=t,this.trackLoadedEvent(e))}finishInitialLoad(e){e&&(this.initialSettled=!0,this.initialLoading=!1),this.eventLoading=!1}invalidateRequests(){this.eventRequestId++,this.requestId++,this.previewRequestId++,this.checkoutRequestId++,this.couponRequestId++,this.eventController?.abort(),this.quoteController?.abort(),this.previewController?.abort(),this.checkoutController?.abort(),this.couponController?.abort(),this.eventController=void 0,this.quoteController=void 0,this.previewController=void 0,this.checkoutController=void 0,this.couponController=void 0,this.clearQuoteTimer(),this.quoteRevision=void 0,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutLoading=!1}async setInitialCoupon(){const e=this.initialCouponCode();if(this.couponInput=e,this.quoteError=null,this.couponError=null,!this.event)return this.appliedCouponCode=e,void(this.previewQuote=this.activeInitialPreviewQuote(e));this.selectedItems.size>0?await this.applyCartCoupon(e):await this.applyPreviewCoupon(e)}initialCouponCode(){return FT(this.couponCode)||("undefined"!=typeof window&&window.location?FT(function(e){return new URLSearchParams(e).get("discount")??""}(window.location.search)):"")}parsedInitialPreviewQuote(){return this.initialPreviewQuote?"string"!=typeof this.initialPreviewQuote?this.initialPreviewQuote:OA(this.initialPreviewQuote):null}parsedInitialAdmissionPrices(){if(this.initialAdmissionPrices)return"string"!=typeof this.initialAdmissionPrices?this.initialAdmissionPrices:OA(this.initialAdmissionPrices)??void 0}activeInitialPreviewQuote(e=this.appliedCouponCode){return e?e!==this.initialCouponCode()?null:this.parsedInitialPreviewQuote():null}activeInitialAdmissionPrices(){if(this.appliedCouponCode&&this.appliedCouponCode===this.initialCouponCode())return this.parsedInitialAdmissionPrices()}setupTheme(){this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),"system"===this.theme?(this.mediaQueryList=window.matchMedia("(prefers-color-scheme: dark)"),this.currentTheme=this.mediaQueryList.matches?"dark":"light",this.mediaQueryList.addEventListener("change",this.handleSystemThemeChange)):this.currentTheme=this.theme}handleSystemThemeChange=e=>{"system"===this.theme&&(this.currentTheme=e.matches?"dark":"light")};trackEvent(e,t={}){const i=this.analyticsContext(e);i&&i.analytics.track(e,{...this.analyticsProperties(i.event),...t})}analyticsProperties(e,t={}){return{event_id:this.eventId,team_id:e.teamId,promoter_id:e.promoterId,event_name:e.name,event_slug:e.slug,currency:e.currency,...t}}analyticsForEvent(e,t){if(!this.enableAnalytics)return;const i=PA(t);if(i)this.emitAnalyticsEventSkipped(e,i,t);else{if(this.analytics)return this.analytics;this.emitAnalyticsEventSkipped(e,"analytics_not_initialized",t)}}analyticsContext(e){const t=this.event;if(!t)return void this.emitAnalyticsEventSkipped(e,"missing_event");const i=this.analyticsForEvent(e,t);return i?{analytics:i,event:t}:void 0}emitAnalyticsEventSkipped(e,t,i,n){const r={eventType:e,eventId:this.eventId,reason:t,promoterId:i?.promoterId||void 0,teamId:i?.teamId||void 0};this.analyticsEventSkipped.emit(r),this.debugAnalytics&&console.warn("[SessionServicesTicketing] Analytics event skipped:",r,n)}getLowestPrice(){const e=this.event;return e?.admissions.length?Math.min(...e.admissions.map((e=>vA(e.price)))):0}getAdmissionListProducts(e){return e.admissions.map(((t,i)=>({product_id:t.id,sku:t.id,name:t.name,category:e.name,price:AA(t.price,e.currency),quantity:1,position:i+1,admission_id:t.id,section_id:t.sectionId,price_base:t.price?.base,price_booking_fee:t.price?.booking,available:t.available,capacity:t.capacity})))}async loadEventData(e={}){const t=e.mode??"refresh",i=this.client,n=this.eventId;if(!i||!this.tenantId||!n){const e="Missing required configuration: tenantId and eventId";return this.error=e,this.errorKind="configuration",{status:"error",error:e,kind:"configuration"}}const r=++this.eventRequestId,o=new AbortController;this.eventController?.abort(),this.eventController=o,"coupon"===t&&(this.couponController=o),"initial"===t&&(this.initialLoading=!0),"refresh"===t&&(this.eventLoading=!0),"retry"===t&&(this.retryLoading=!0),"passcode"===t&&(this.passcodeLoading=!0);try{"coupon"!==t&&"passcode"!==t&&(this.error=null,this.errorKind=null,this.refreshError=null);const a=await CA(o,(t=>i.event.get({key:n,couponCode:(e.couponCode??this.appliedCouponCode)||void 0,passcode:(e.passcode??this.activePasscode)||void 0},{signal:t})));return this.isEventRequestCurrent(r,n,o)?(!1!==e.commit&&(this.event=a.event,this.pruneSelectedItems(a.event)),this.passcodeDenied=!1,{status:"success",event:a.event}):{status:"stale"}}catch(e){if(!this.isEventRequestCurrent(r,n,o))return{status:"stale"};const i=function(e){return function(e){const t=SA(e,"");return!!/incorrect passcode/i.test(t)||"UNAUTHORIZED"===DA(e)&&/passcode/i.test(t)}(e)?"access":"NOT_FOUND"===DA(e)?"not_found":"transient"}(e),a=SA(e,"Failed to load event data");return this.passcodeDenied="access"===i,"coupon"!==t&&(!this.event||"refresh"!==t&&"retry"!==t?(this.error=a,this.errorKind=i):this.refreshError=a,this.errorOccurred.emit({error:a})),{status:"error",error:a,kind:i}}finally{r===this.eventRequestId&&("initial"===t&&this.finishInitialLoad(!0),"refresh"===t&&(this.eventLoading=!1),"retry"===t&&(this.retryLoading=!1),"passcode"===t&&(this.passcodeLoading=!1),this.eventController===o&&(this.eventController=void 0),this.couponController===o&&(this.couponController=void 0))}}isEventRequestCurrent(e,t,i){return this.active&&e===this.eventRequestId&&t===this.eventId&&this.eventController===i}pruneSelectedItems(e){this.openModalAdmissionId&&!e.admissions.some((e=>e.id===this.openModalAdmissionId))&&this.closeModal();const t=new Set(e.admissions.map((e=>gA(e.id,e.sectionId??null)))),i=Array.from(this.selectedItems).filter((([e])=>t.has(e)));i.length!==this.selectedItems.size&&(this.selectedItems=new Map(i),this.invalidateQuote(),this.selectedItems.size>0&&this.scheduleQuoteUpdate())}trackLoadedEvent(e){this.setupAnalytics(e)&&(this.trackPageViewed(e),this.trackProductViewed(e),this.trackEvent("Product List Viewed",{list_id:this.eventId,category:"Admissions",products:this.getAdmissionListProducts(e)}))}setupAnalytics(e){if(!this.enableAnalytics)return!1;const t=PA(e);if(t)return this.emitAnalyticsEventSkipped("Page Viewed",t,e),!1;if(this.analytics)return!0;try{this.analytics=function(e){let t,i=e.debug??!1,n=eT(e.client,i,e.destinations),r=dT(),o=cT();i&&console.log("[Analytics] Initialized:",{sessionId:r,anonymousId:o});let a=(e,i,n)=>{let a=UE();return{type:e,name:i,properties:{...NE({anonymousId:o,context:a,sessionId:r}),...n},context:a,timestamp:Date.now(),messageId:lT(),sessionId:r,anonymousId:o,userId:t}},s=async(e,t)=>{try{await n.sendEvent(e,t)}catch(e){i&&console.error("[Analytics] Failed to send event:",e)}},d=(e,t)=>{let n=e.promoter_id;return!n&&i&&console.warn(`[Analytics] ${t}() called without promoter_id, skipping`),n},c=async(e,t={})=>{let i=d(t,"track");i&&await s(a("track",e,t),i)},l=async(e={})=>{let t=d(e,"preload");t&&await s(a("preload","Preload",e),t)},u=async(e,t={})=>{let i=d(t,"page");i&&await s(a("page",e||"Page Viewed",t),i)},p=async(e,t={})=>{let i=d(t,"screen");i&&await s(a("screen",e||"Screen Viewed",t),i)},m=async(e,n={})=>{t=e;let a=n.promoter_id;a&&await s({type:"identify",properties:{},context:UE(),timestamp:Date.now(),messageId:lT(),sessionId:r,anonymousId:o,userId:e,traits:n},a),i&&console.log("[Analytics] User identified:",e)},h=async(e,n={})=>{let a=n.promoter_id;a&&await s({type:"group",properties:{},context:UE(),timestamp:Date.now(),messageId:lT(),sessionId:r,anonymousId:o,userId:t,groupId:e,traits:n},a),i&&console.log("[Analytics] Group called:",{groupId:e,traits:n})};return{preload:(e={})=>{l(e)},preloadAsync:l,track:(e,t={})=>{c(e,t)},trackAsync:c,page:(e,t={})=>{u(e,t)},pageAsync:u,screen:(e,t={})=>{p(e,t)},screenAsync:p,identify:(e,t={})=>{m(e,t)},identifyAsync:m,alias:(e,t)=>{i&&console.log("[Analytics] Alias called:",{userId:e,previousId:t})},group:(e,t={})=>{h(e,t)},groupAsync:h,reset:()=>{let e=function(e){let t=Kr(),i=Jr();return e.setCookie(Hr,t),e.setItem(Zr,i),{sessionId:t,anonymousId:i}}(sT);r=e.sessionId,o=e.anonymousId,t=void 0,n.clearCache(),i&&console.log("[Analytics] Session reset:",{sessionId:r,anonymousId:o})}}}({client:this.client,debug:this.debugAnalytics})}catch(t){return this.emitAnalyticsEventSkipped("Page Viewed","analytics_initialization_failed",e,t),!1}return!0}trackPageViewed(e){const t=this.analyticsForEvent("Page Viewed",e);t&&t.page("Ticketing Widget",this.analyticsProperties(e))}trackProductViewed(e){const t=this.getLowestPrice();this.trackEvent("Product Viewed",{product_id:this.eventId,sku:this.eventId,name:e.name,category:"Event",value:TA(t,e.currency),price:TA(t,e.currency),event_date:e.entryStartsAt,venue_name:RA(e),venue_city:e.location?.city})}async updateQuantity(e,t,i){const n=gA(e,t);await this.setQuantity(e,t,(this.selectedItems.get(n)||0)+i)}async setQuantity(e,t,i){if(this.checkoutLoading)return;const n=gA(e,t),r=this.event?.admissions.find((t=>t.id===e));if(!r)return;const o=this.selectedItems.get(n)||0,a=Math.max(0,Math.min(i,this.getMaxQuantity(r,t)));if(o===a)return;this.selectionPrompt=!1,this.setSelectedQuantity(n,a),this.invalidateQuote(),this.checkoutError=null;const s=t?this.event?.sections.find((e=>e.id===t)):null;this.trackQuantityChange({admission:r,section:s,sectionId:t,delta:a-o}),this.scheduleQuoteUpdate()}setSelectedQuantity(e,t){0===t?this.selectedItems.delete(e):this.selectedItems.set(e,t),this.selectedItems=new Map(this.selectedItems)}trackQuantityChange(e){e.delta>0?this.trackProductAdded(e):e.delta<0&&this.trackProductRemoved(e)}trackProductAdded(e){this.trackEvent("Product Added",{...this.getQuantityAnalytics(e),price_base:e.admission.price?.base,price_booking_fee:e.admission.price?.booking})}trackProductRemoved(e){this.trackEvent("Product Removed",this.getQuantityAnalytics(e))}getQuantityAnalytics(e){return{product_id:e.admission.id,sku:e.admission.id,name:e.admission.name,category:this.event?.name,variant:e.section?.name,price:AA(e.admission.price,this.event?.currency),quantity:Math.abs(e.delta),admission_id:e.admission.id,section_id:_A(e.sectionId),section_name:e.section?.name}}async updateQuote(){if(this.clearQuoteTimer(),0===this.selectedItems.size)return this.invalidateQuote(),this.quote=null,this.quoteError=null,this.quoteLoading=!1,void await this.updatePreviewQuote();const e=++this.requestId,t=this.eventId,i=this.appliedCouponCode,n=this.getQuoteRequestItems(),r=this.quoteRevisionFor(t,i,n),o=new AbortController;this.quoteController?.abort(),this.quoteController=o;try{this.quoteLoading=!0,this.quoteError=null;const a=await this.fetchCartQuote(t,n,i,o);this.applyQuote(a.quote,e,r)}catch(t){this.handleQuoteError(e)}finally{e===this.requestId&&(this.quoteLoading=!1,this.quoteController===o&&(this.quoteController=void 0))}}scheduleQuoteUpdate(){this.clearQuoteTimer(),0!==this.selectedItems.size?(this.quoteLoading=!0,this.quoteTimer=setTimeout((()=>{this.quoteTimer=void 0,this.updateQuote().catch((()=>{}))}),150)):this.updateQuote().catch((()=>{}))}clearQuoteTimer(){this.quoteTimer&&(clearTimeout(this.quoteTimer),this.quoteTimer=void 0)}invalidateQuote(){this.requestId++,this.couponRequestId++,this.checkoutRequestId++,this.quoteController?.abort(),this.previewController?.abort(),this.checkoutController?.abort(),this.couponController?.abort(),this.quoteController=void 0,this.previewController=void 0,this.checkoutController=void 0,this.couponController=void 0,this.quoteRevision=void 0,this.quote=null,this.quoteError=null,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutError=null,this.checkoutLoading=!1}clearPromptTimer(){this.promptTimer&&(clearTimeout(this.promptTimer),this.promptTimer=void 0)}promptTicketSelection(){this.selectionPrompt=!0,this.clearPromptTimer(),this.promptTimer=setTimeout((()=>{this.selectionPrompt=!1,this.promptTimer=void 0}),800)}getQuoteRequestItems(){return Array.from(this.selectedItems,(([e,t])=>{const i=function(e){const[t="",i="none"]=e.split("::");return{admissionId:t,sectionId:"none"===i?void 0:i}}(e);return{quantity:t,admissionId:i.admissionId,sectionId:i.sectionId}}))}fetchCartQuote(e,t,i,n){return CA(n,(n=>this.client.order.quote({eventId:e,items:t,couponCode:i||void 0},{signal:n})))}applyQuote(e,t,i=this.currentQuoteRevision()){t===this.requestId&&(this.quote=e,this.quoteRevision=i,this.quoteError=null,this.cartUpdate.emit(this.quote),this.trackEvent("Cart Viewed",{products:this.getCartProducts(),value:xA(this.quote,this.event?.currency),currency:this.event?.currency}))}handleQuoteError(e){e===this.requestId&&(this.quote=null,this.quoteRevision=void 0,this.quoteError="Failed to update cart. Please try again.",this.errorOccurred.emit({error:this.quoteError}))}quoteRevisionFor(e,t,i){return JSON.stringify({eventId:e,coupon:t,items:i,returnUrl:this.returnUrl,returnDestinationKey:this.returnDestinationKey})}currentQuoteRevision(){return this.quoteRevisionFor(this.eventId,this.appliedCouponCode,this.getQuoteRequestItems())}async updatePreviewQuote(){const e=this.event;if(!e||!this.appliedCouponCode)return this.previewRequestId++,this.previewController?.abort(),this.previewController=void 0,this.previewLoading=!1,void(this.previewQuote=null);const t=this.activeInitialPreviewQuote();if(t)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=t);if(0===EA(e).length)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=null);this.previewRequestId++;const i=this.previewRequestId,n=this.appliedCouponCode,r=this.eventId,o=new AbortController;this.previewController?.abort(),this.previewController=o;try{this.previewLoading=!0;const t=await this.fetchPreviewQuote(e,n,o);i===this.previewRequestId&&r===this.eventId&&n===this.appliedCouponCode&&(this.previewQuote=t.quote)}catch(e){i===this.previewRequestId&&(this.previewQuote=null,this.setCouponError())}finally{i===this.previewRequestId&&(this.previewLoading=!1,this.previewController===o&&(this.previewController=void 0))}}fetchPreviewQuote(e,t,i){return CA(i,(i=>this.client.order.quote({eventId:e.id,items:EA(e),couponCode:t},{signal:i})))}handleCouponInput=e=>{e.target instanceof HTMLInputElement&&(this.couponInput=e.target.value.toUpperCase())};handleCouponKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.applyCoupon().catch((()=>{})))};async applyCoupon(){const e=FT(this.couponInput);this.couponInput=e,this.quoteError=null,this.couponError=null,this.trackCouponEntered(e),this.selectedItems.size>0?await this.applyCartCoupon(e):await this.applyPreviewCoupon(e)}async removeCoupon(){this.couponError=null,this.quoteError=null,this.selectedItems.size>0?await this.removeCartCoupon():await this.applyPreviewCoupon("")}async applyCartCoupon(e){const t=++this.couponRequestId,i=++this.requestId,n=this.appliedCouponCode,r=this.getQuoteRequestItems(),o=this.eventId,a=this.quoteRevisionFor(o,e,r),s=new AbortController;this.quoteController?.abort(),this.quoteController=s;try{this.quoteLoading=!0;const d=await this.loadEventData({commit:!1,couponCode:e,mode:"coupon"});if(!this.isCouponOperationCurrent(t,i))return;if("success"!==d.status)throw Error("Coupon load failed");const c=await this.fetchCartQuote(o,r,e,s);if(!this.isCouponOperationCurrent(t,i))return;if(this.event=d.event,this.appliedCouponCode=e,this.couponInput=e,this.previewQuote=null,this.pruneSelectedItems(d.event),a!==this.currentQuoteRevision())return this.invalidateQuote(),void this.scheduleQuoteUpdate();this.applyQuote(c.quote,i,a),e?this.trackCouponApplied(e,c.quote):this.trackCouponRemoved(n,c.quote)}catch(r){if(!this.isCouponOperationCurrent(t,i))return;this.couponInput=n||e,this.setCouponError(e?void 0:"Failed to remove coupon. Your current discount is still applied."),e&&this.trackCouponDenied(e)}finally{i===this.requestId&&(this.quoteLoading=!1,this.quoteController===s&&(this.quoteController=void 0))}}async applyPreviewCoupon(e){const t=this.appliedCouponCode,i=++this.couponRequestId,n=++this.previewRequestId,r=new AbortController;this.previewController?.abort(),this.previewController=r;try{this.previewLoading=!0;const o=await this.loadEventData({commit:!1,couponCode:e,mode:"coupon"});if(!this.isPreviewCouponOperationCurrent(i,n))return;if("success"!==o.status)throw Error("Coupon load failed");const a=this.activeInitialPreviewQuote(e),s=a||!e||0===EA(o.event).length?null:await this.fetchPreviewQuote(o.event,e,r);if(!this.isPreviewCouponOperationCurrent(i,n))return;this.event=o.event,this.pruneSelectedItems(o.event),this.appliedCouponCode=e,this.couponInput=e,this.previewQuote=a??s?.quote??null,e?this.trackCouponApplied(e,this.previewQuote):this.trackCouponRemoved(t,null)}catch(r){if(!this.isPreviewCouponOperationCurrent(i,n))return;this.couponInput=t||e,this.setCouponError(e?void 0:"Failed to remove coupon. Your current discount is still applied."),e&&this.trackCouponDenied(e)}finally{n===this.previewRequestId&&(this.previewLoading=!1,this.previewController===r&&(this.previewController=void 0))}}async removeCartCoupon(){await this.applyCartCoupon("")}isCouponOperationCurrent(e,t){return this.active&&e===this.couponRequestId&&t===this.requestId}isPreviewCouponOperationCurrent(e,t){return this.active&&e===this.couponRequestId&&t===this.previewRequestId}setCouponError(e="Failed to apply coupon. Please check the code."){this.couponError=e,this.errorOccurred.emit({error:this.couponError})}trackCouponEntered(e){e&&this.trackEvent("Coupon Entered",{coupon:e})}trackCouponApplied(e,t){e&&this.trackEvent("Coupon Applied",{coupon:e,products:this.getProductsForQuote(t),total:t?xA(t,this.event?.currency):0,value:t?xA(t,this.event?.currency):0})}trackCouponDenied(e){e&&this.trackEvent("Coupon Denied",{coupon:e,reason:this.couponError})}trackCouponRemoved(e,t){e&&this.trackEvent("Coupon Removed",{coupon:e,products:this.getProductsForQuote(t),total:t?xA(t,this.event?.currency):0,value:t?xA(t,this.event?.currency):0})}handlePasscodeInput=e=>{e.target instanceof HTMLInputElement&&(this.passcodeInput=e.target.value)};async submitPasscode(e){e.preventDefault();const t=this.passcodeInput.trim();this.activePasscode=t;const i=await this.loadEventData({mode:"passcode",passcode:t});"success"===i.status&&(this.error=null,this.errorKind=null,this.handleLoadedEvent(i.event),await this.updatePreviewQuote())}async retryEventLoad(){if(!this.tenantId||!this.eventId)return void await this.initializeComponent();const e=await this.loadEventData({mode:"retry"});"success"===e.status&&(this.handleLoadedEvent(e.event),await this.updatePreviewQuote())}async initiateCheckout(){if(this.isCheckoutDisabled())return;const e=this.quote;if(!e)return;const t=++this.checkoutRequestId,i=this.eventId,n=this.appliedCouponCode,r=this.currentQuoteRevision(),o=new AbortController;this.checkoutController?.abort(),this.checkoutController=o;try{this.checkoutLoading=!0,this.checkoutError=null;const a=await this.getCheckoutIdempotencyKey(r);if(!this.isCheckoutRequestCurrent(t,i,n,r))return;const s=await CA(o,(async t=>(this.createOrder??this.client.order.create)({eventId:i,items:this.getCheckoutItems(e),couponCode:n||void 0,returnUrl:this.returnUrl,returnDestinationKey:this.returnDestinationKey,channel:uT("elements"),idempotencyKey:a},{signal:t})));if(!this.isCheckoutRequestCurrent(t,i,n,r))return;this.trackCheckoutStarted(e,s.order.id),this.handleCheckoutOrder(s.order,t)}catch(e){this.isCheckoutRequestCurrent(t,i,n,r)&&this.handleCheckoutError()}finally{t===this.checkoutRequestId&&this.checkoutController===o&&(this.checkoutController=void 0)}}async getCheckoutIdempotencyKey(e){const t=this.checkoutIdempotencyKeys.get(e);if(t)return t;const i=await async function(e){if(!globalThis.crypto?.subtle)return;const t=await globalThis.crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e));return"session-services:checkout:"+Array.from(new Uint8Array(t),(e=>e.toString(16).padStart(2,"0"))).join("")}(`${this.apiUrl}\0${this.tenantId}\0${e}`),n=function(e){if(e&&"undefined"!=typeof window)try{return window.sessionStorage?.getItem(e)||void 0}catch{return}}(i),r=n??function(){const e=globalThis.crypto.getRandomValues(new Uint8Array(16));return"elements_"+Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("")}();return this.checkoutIdempotencyKeys.set(e,r),n||function(e,t){if(e&&"undefined"!=typeof window)try{window.sessionStorage?.setItem(e,t)}catch{}}(i,r),r}isCheckoutRequestCurrent(e,t,i,n){return this.active&&e===this.checkoutRequestId&&t===this.eventId&&i===this.appliedCouponCode&&n===this.currentQuoteRevision()&&n===this.quoteRevision}trackCheckoutStarted(e,t){const i=xA(e,this.event?.currency);this.trackEvent("Checkout Started",{order_id:t,value:i,revenue:i,currency:this.event?.currency,products:this.getCheckoutProducts()})}trackExternalTicketClick(e,t){this.trackEvent("Checkout Started",{ticketing_mode:"external",external_ticket_url:e,external_ticket_domain:NA(e),cta_surface:t})}getCheckoutItems(e){return e.items.map((e=>({quantity:e.quantity,admissionId:e.admissionId,sectionId:e.sectionId})))}handleCheckoutOrder(e,t){this.active&&t===this.checkoutRequestId&&(this.checkoutInit.emit({orderId:e.id,checkoutUrl:e.checkoutUrl}),e.checkoutUrl?window.location.href=function(e){if(typeof document>"u"||!document.body)return e;let t;try{t=document.createElement("a"),t.href=e,t.style.display="none",document.body.appendChild(t);let i=t.href;t.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0}));let n=t.href;return n!==i&&n.includes("_gl=")?n:e}catch{return e}finally{t?.remove()}}(e.checkoutUrl):this.checkoutLoading=!1)}handleCheckoutError(){this.checkoutError="We couldn’t open checkout. Your tickets are still selected, so you can try again.",this.errorOccurred.emit({error:this.checkoutError}),this.checkoutLoading=!1}handleStickyCheckoutClick(e){if(e.isDoorOnly||!UA(this.quote))return this.promptTicketSelection(),void this.scrollToTicketSelector();this.initiateCheckout().catch((()=>{}))}scrollToTicketSelector(){const e=this.host.shadowRoot?.querySelector(".tickets-wrapper")??this.host;window.scrollTo({behavior:!0===window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",top:Math.max(e.getBoundingClientRect().top+window.scrollY-100,0)})}getCartProducts(){return this.quote?this.getProductsForQuote(this.quote):[]}getCheckoutProducts(){return this.quote?this.quote.items.map((e=>({...this.getQuoteProduct(e),section_name:this.getQuoteSection(e)?.name}))):[]}getProductsForQuote(e){return e?e.items.map((e=>this.getQuoteProduct(e))):[]}getQuoteProduct(e){return{...MA(e),...LA(this.quoteProductContext(e)),...qA(e)}}quoteProductContext(e){return{event:this.event,admission:this.getQuoteAdmission(e),section:this.getQuoteSection(e)}}getQuoteAdmission(e){return this.event?.admissions.find((t=>t.id===e.admissionId))}getQuoteSection(e){return e.sectionId?this.event?.sections.find((t=>t.id===e.sectionId)):null}formatDateTimeRange(e,t){const i=this.event?bA(this.event):"UTC";try{const n=UT(e,i),r=UT(t,i),o=this.dateFormatter({day:"numeric",month:"short",timeZone:i,weekday:"short"}).format(n),a=this.dateFormatter({hour:"numeric",minute:"2-digit",timeZone:i});return`${o} · ${a.format(n)} – ${a.format(r)}`}catch{return`${e} – ${t}`}}dateFormatter(e){try{return new Intl.DateTimeFormat(this.locale,e)}catch{return new Intl.DateTimeFormat("en-US",e)}}formatPriceValue(e){const t=this.event?.currency;if(!t)return new Intl.NumberFormat(this.locale,{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(TA(e));try{return new Intl.NumberFormat(this.locale,{style:"currency",currency:t}).format(TA(e,t))}catch{return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(TA(e,t))}}handleQuantityDecrease=async(e,t)=>{await this.updateQuantity(e,t,-1)};handleQuantityIncrease=async(e,t)=>{await this.updateQuantity(e,t,1)};handleQuantityInput=async(e,t,i)=>{i.target instanceof HTMLInputElement&&await this.setQuantity(e,t,Number(i.target.value)||0)};openModal=(e,t)=>{t.stopPropagation(),this.modalTrigger=t.currentTarget,this.modalFocusPending=!0,this.openModalAdmissionId=e,document.addEventListener("keydown",this.handleModalKeyDown)};closeModal=()=>{this.openModalAdmissionId=null,this.modalFocusPending=!1,this.modalRestorePending=!0,"undefined"!=typeof document&&document.removeEventListener("keydown",this.handleModalKeyDown)};handleModalKeyDown=e=>{if("Escape"===e.key)return e.preventDefault(),void this.closeModal();if("Tab"!==e.key)return;const t=this.host.shadowRoot?.querySelector(".modal-content");if(!t)return;const i=Array.from(t.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===i.length)return e.preventDefault(),void t.focus();const n=i[0],r=i.at(-1),o=this.host.shadowRoot?.activeElement;if(e.shiftKey&&o===n)return e.preventDefault(),void r?.focus();e.shiftKey||o!==r||(e.preventDefault(),n?.focus())};handleBackdropClick=e=>{e.target instanceof i&&e.target.classList.contains("modal-backdrop")&&this.closeModal()};renderQuantityControls(e,t,i,n){const o=gA(e.id,t),a=this.selectedItems.get(o)||0;return r("div",{class:"quantity-controls"},r("button",{type:"button",class:"quantity-btn decrease",onClick:()=>this.handleQuantityDecrease(e.id,t),disabled:i||0===a,"aria-label":"Decrease quantity","data-testid":"event-admission-decrement"},"−"),r("input",{class:"quantity-value",type:"number",min:"0",max:n,inputmode:"numeric",value:a,onInput:i=>this.handleQuantityInput(e.id,t,i),disabled:i,"aria-label":"Quantity for "+e.name,"data-testid":"event-admission-quantity-input"}),r("button",{type:"button",class:"quantity-btn increase",onClick:()=>this.handleQuantityIncrease(e.id,t),disabled:i||a>=n,"aria-label":"Increase quantity","data-testid":"event-admission-increment"},"+"))}getMaxQuantity(e,t){return this.event?$A({admission:e,event:this.event,locale:this.locale,section:this.getSection(t)}).maxQuantity:0}getSection(e){if(e)return this.event?.sections.find((t=>t.id===e))}renderEventTimeAndLocation(e){return r(r.Fragment,null,this.renderEventTime(e,"admission-time"),this.renderEventLocation(e,"admission-venue"))}renderEventTime(e,t){return e.entryStartsAt&&e.entryEndsAt?r("div",{class:t},GA(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderAdmissionTime(e,t){return e?.entryStartsAt&&e.entryEndsAt?r("div",{class:t},GA(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderSectionLocation(e){const t=[e.location?.name,e.location?.city].filter(Boolean).join(", ");return t?r("div",{class:"section-venue"},jA(),t):null}renderEventLocation(e,t){return e.location?r("div",{class:t},jA(),e.location.name):null}renderPriceAndControls(e,t,i,n){const o=gA(e.id,t),a=function(e){return fA(e)}({admission:e,initialPrice:this.activeInitialAdmissionPrices()?.[o],quoteItem:IA(this.quote).get(o),previewItem:IA(this.previewQuote).get(o)}),s=function(e){return e.discounted&&void 0!==e.gross?Math.max(e.gross-e.base,0):0}(a);return r("div",{class:"admission-price-info"},r("div",{class:"admission-price-wrapper"},s>0&&r("span",{class:"admission-savings"},"Save ",this.formatPriceValue(s)),this.renderAdmissionPrice(a),a.fees>0&&r("span",{class:"admission-booking-fee"},this.formatPriceValue(a.fees)," Booking Fee"),i.showScarcity&&r("span",{class:"admission-availability"},e.available," tickets remaining"),i.label&&r("span",{class:"admission-sale-label "+i.label.tone},i.label.text)),this.renderAdmissionControls(e,t,i,n))}renderAdmissionPrice(e){return e.discounted?r("span",{class:"admission-price-row"},r("span",{class:"admission-price discounted"},this.formatPriceValue(e.base)),void 0!==e.gross&&r("span",{class:"admission-price-original"},this.formatPriceValue(e.gross))):r("span",{class:"admission-price"},this.formatPriceValue(e.base))}renderAdmissionControls(e,t,i,n){return i.statusLabel?r("div",{class:"sold-out-controls "+(i.statusTone??"")},r("span",{class:"sold-out-text"},i.statusLabel)):"door"===n?null:this.renderQuantityControls(e,t,i.disabled||this.checkoutLoading,i.maxQuantity)}renderAdmission(e,t,i,n=!1,o="default"){const a=$A({admission:e,event:t,locale:this.locale,section:i,sectionSoldOut:n}),s=i?.id||null;return r("section",{class:this.getAdmissionClassName(a,i),key:gA(e.id,s),"aria-label":this.getAdmissionAriaLabel(e,i,a),"data-testid":"event-admission-card","data-admission-id":e.id,"data-admission-name":e.name,"data-section-id":i?.id??""},r("div",{class:"admission-content"},r("div",{class:"admission-details"},this.renderAdmissionHeader(e),this.renderAdmissionBody(e,t,s,a,o))))}getAdmissionClassName(e,t){return`admission-card ${e.soldOut?"sold-out":""} ${e.disabled&&!e.soldOut?"unavailable":""} ${t?"":"solo-admission"}`}getAdmissionAriaLabel(e,t,i){return function(e,t,i){return t?`${e.name} in ${t.name} - ${i}`:`${e.name} - ${i}`}(e,t,i.statusLabel??this.admissionStatusText(e,i.soldOut))}admissionStatusText(e,t){if(t)return"Sold Out";const i=vA(e.price);return(e.price.booking??0)<=0?this.formatPriceValue(i):`${this.formatPriceValue(i-e.price.booking)} plus ${this.formatPriceValue(e.price.booking)} booking fee`}renderAdmissionHeader(e){return r("div",{class:"admission-header"},r("div",{class:"admission-header-text"},r("h3",{class:"admission-title"},e.name),e.subtitle&&r("p",{class:"admission-subtitle"},e.subtitle)),this.renderMoreInfoButton(e))}renderMoreInfoButton(e){return e.description?r("button",{type:"button",class:"more-info-badge",onClick:t=>this.openModal(e.id,t),"aria-label":"More info about "+e.name},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("circle",{cx:"12",cy:"12",r:"10"}),r("path",{d:"M12 16v-4"}),r("path",{d:"M12 8h.01"})),r("span",null,"More info")):null}renderAdmissionBody(e,t,i,n,o){return i?this.renderPriceAndControls(e,i,n,o):r(r.Fragment,null,this.renderEventTimeAndLocation(t),this.renderPriceAndControls(e,i,n,o))}renderSectionHeader(e,t){return r("div",{class:"section-header"},r("h2",{class:"section-name"},e.name),this.renderAdmissionTime(t[0],"section-time"),this.renderSectionLocation(e))}renderSectionWithAdmissions(e,t,i,n){const o=function(e){return!!e.section&&(!!function(e){return[e.available,e.limit].some((e=>qT(e)<=0))}(e.section)||e.admissions.length>0&&e.admissions.every((t=>jT({admission:t,section:e.section}))))}({admissions:t,section:e});return r("div",{class:"ticket-section "+(o?"section-sold-out":""),key:e.id},this.renderSectionHeader(e,t),r("div",{class:"admissions-list"},t.map((t=>this.renderAdmission(t,i,e,o,n)))))}renderLoadingState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container",role:"status","aria-live":"polite","aria-label":"Loading ticket options"},r("span",{class:"sr-only"},"Loading ticket options"),r("div",{class:"tickets-wrapper"},r("h2",{class:"tickets-heading"},"Get Tickets"),r("div",{class:"ticket-section loading-ticket-section"},r("div",{class:"admissions-list"},[0,1,2].map((e=>r("div",{"aria-hidden":"true",class:"admission-card loading-admission",key:e}))))))))}renderErrorState(){if("access"===this.errorKind)return this.renderPasscodeState();if("not_found"===this.errorKind)return this.renderNotFoundState();const e="configuration"===this.errorKind;return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("div",{class:"message-state",role:"alert","aria-live":"assertive"},r("strong",null,e?"Ticket widget needs setup":"Tickets didn’t load"),r("span",null,e?"This ticket widget is missing its event or tenant details.":"Something got in the way. Try again to load the ticket options."),!e&&r("button",{type:"button",class:"checkout-btn",onClick:()=>this.retryEventLoad(),disabled:this.retryLoading},this.retryLoading?"Loading tickets…":"Try again"))))}renderUpdatingState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container",role:"status","aria-live":"polite"},r("div",{class:"message-state"},r("strong",null,"Loading ticket options…"),r("span",null,"This should only take a moment."))))}renderVerificationState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("section",{class:"message-state","aria-labelledby":"ticket-verification-title","aria-describedby":"ticket-verification-description"},r("h2",{id:"ticket-verification-title"},"Let’s get your tickets"),r("p",{id:"ticket-verification-description"},"We just need you to confirm before we load the ticket options."),r("button",{type:"button",class:"checkout-btn",onClick:this.continueAfterVerification},"Load tickets"))))}renderPasscodeState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("form",{class:"passcode-form",onSubmit:e=>this.submitPasscode(e)},r("h2",null,"Enter passcode"),r("p",null,"Enter the event passcode to view tickets and event details."),r("input",{type:"text",name:"passcode",value:this.passcodeInput,onInput:this.handlePasscodeInput,autocomplete:"one-time-code",placeholder:"Passcode","aria-label":"Passcode","aria-invalid":this.passcodeDenied,"aria-describedby":this.passcodeDenied?"ticket-passcode-error":void 0,disabled:this.passcodeLoading}),this.passcodeDenied&&this.activePasscode&&r("span",{id:"ticket-passcode-error",class:"error-message",role:"alert","aria-live":"assertive"},"That passcode didn’t work. Check it and try again."),r("button",{type:"submit",class:"checkout-btn",disabled:!this.passcodeInput.trim()||this.passcodeLoading},this.passcodeLoading?"Unlocking…":"Unlock event"))))}renderNotFoundState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("div",{class:"message-state",role:"alert"},r("strong",null,"Event not found"),r("span",null,"We couldn’t find this event. The link may be incorrect or expired."))))}renderCouponPanel(){const e=this.couponInput.trim().length>0,t=this.quoteLoading||this.previewLoading||this.checkoutLoading,i=e&&!t;return r("div",{class:"coupon-panel"},r("div",{class:"coupon-row"},r("input",{id:"coupon-code",name:"coupon-code",placeholder:"Coupon Code",value:this.appliedCouponCode||this.couponInput,onInput:this.handleCouponInput,onKeyDown:this.handleCouponKeyDown,autocomplete:"off",disabled:t||!!this.appliedCouponCode,"aria-label":"Coupon code","aria-invalid":!!this.couponError,"aria-describedby":this.couponError?"coupon-error":void 0}),this.appliedCouponCode?r("button",{type:"button",class:"coupon-remove",onClick:()=>this.removeCoupon(),disabled:t,"aria-label":"Remove coupon"},"Remove"):r("button",{type:"button",class:"coupon-apply",onClick:()=>this.applyCoupon(),disabled:!i},"Apply")),this.couponError&&r("span",{id:"coupon-error",class:"error-message",role:"alert","aria-live":"assertive"},this.couponError))}isCheckoutDisabled(){return this.quoteLoading||this.checkoutLoading||!UA(this.quote)||this.quoteRevision!==this.currentQuoteRevision()}getCheckoutButtonText(){return this.checkoutLoading?"Processing...":this.checkoutError?"Try checkout again":this.quote?this.getQuoteCheckoutText():"Pay"}renderQuoteLoadingContent(){return r("span",{class:"checkout-spinner-wrapper","aria-hidden":"true"},r("svg",{class:"checkout-spinner",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})))}renderCheckoutButtonContent(){return this.quoteLoading?this.renderQuoteLoadingContent():this.getCheckoutButtonText()}isStickyCheckoutDisabled(e){return!e.isDoorOnly&&(e.isEnded||e.isUnavailableForSale||this.checkoutLoading||this.quoteLoading)}getStickyCheckoutText(e){return this.checkoutLoading?"Processing...":this.quote?this.getQuoteCheckoutText():this.selectionPrompt?"Select a ticket":e.isDoorOnly?"Get Tickets at the Door":e.isEnded?"Event Ended":e.isUnavailableForSale?"Tickets Unavailable":"Get Tickets"}renderStickyCheckoutButtonContent(e){return this.quoteLoading?this.renderQuoteLoadingContent():this.getStickyCheckoutText(e)}getQuoteCheckoutText(){return this.quote?0===kA(this.quote)?"Continue":"Pay "+this.getOrderTotalText():"Pay"}getOrderTotalText(){if(!this.quote)return"N/A";const e=kA(this.quote);return 0===e?"Free":this.formatPriceValue(e)}renderCheckoutActions(){return r("div",{class:"checkout-actions"},this.renderCouponPanel(),this.quoteError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},this.quoteError,r("button",{type:"button",class:"coupon-apply",onClick:()=>this.updateQuote(),disabled:this.quoteLoading},"Try again")),this.checkoutError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},this.checkoutError),r("button",{type:"button",class:"checkout-btn",onClick:()=>this.initiateCheckout(),disabled:this.isCheckoutDisabled(),"aria-label":this.quoteLoading?"Updating":void 0,"data-testid":"event-checkout-cta-desktop"},this.renderCheckoutButtonContent()))}renderStickyCheckout(e){return this.stickyCheckout&&e.showTicketing?r("div",{class:"sticky-checkout-bar"},e.isDoorOnly?r("div",{class:"sticky-door-info"},r("strong",null,"Tickets available at the door"),r("span",null,"Buy yours at the venue when you arrive.")):r("button",{type:"button",class:"checkout-btn sticky-checkout-btn "+(this.selectionPrompt?"selection-prompt":""),onClick:()=>this.handleStickyCheckoutClick(e),disabled:this.isStickyCheckoutDisabled(e),"aria-label":this.quoteLoading?"Updating":void 0},this.renderStickyCheckoutButtonContent(e))):null}renderStickyExternalTicketing(e){if(!this.stickyCheckout)return null;const t=e.externalTicketUrl;if(!t)return null;const i=NA(t);return r("div",{class:"sticky-checkout-bar"},r("a",{class:"external-ticket-button sticky-checkout-btn",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"sticky")},r("span",{class:"external-ticket-label"},"Get tickets"),r("span",{class:"external-ticket-domain"},"via ",i)))}renderModal(){if(!this.openModalAdmissionId)return null;const e=this.event?.admissions.find((e=>e.id===this.openModalAdmissionId));return e?r("div",{class:"modal-backdrop",onClick:this.handleBackdropClick},r("div",{class:"modal-content",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-description",tabindex:"-1"},r("button",{type:"button",class:"modal-close-btn",onClick:()=>this.closeModal(),"aria-label":"Close"},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M18 6 6 18"}),r("path",{d:"M6 6l12 12"}))),r("div",{class:"modal-header"},r("h2",{id:"modal-title",class:"modal-title"},e.name),e.subtitle&&r("p",{class:"modal-subtitle"},e.subtitle)),r("p",{id:"modal-description",class:"modal-description"},e.description))):null}renderTicketSections(e){const t=wA(e),i=t.isDoorOnly?"door":"default",n=function(e,t,i={}){return function(e,t,i={}){return[...lA(e,t,i),...t.filter((e=>!e.sectionId)).map((e=>({admission:e,type:"admission"})))].sort(((e,t)=>uA(e)-uA(t)))}(e,t,i)}(e.sections,function(e,t){return function(e,t){if("door"!==t)return e.admissions;const i=tA(e);return e.admissions.filter((t=>!BT(t,e.admissions,i)&&"DOOR"===t.saleEndsBehavior&&MT(t.saleEndsAt,i)))}(e,t)}(e,i),{event:e,initialAdmissionPrices:this.activeInitialAdmissionPrices(),mode:i,previewQuote:this.previewQuote,quote:this.quote});return r("div",{class:"tickets-wrapper"},this.renderDoorAlert(e,i),r("h2",{class:"tickets-heading"},t.ticketHeading),n.map((t=>this.renderTopLevelItem(t,e,i))))}renderTopLevelItem(e,t,i){return"section"===e.type?this.renderSectionWithAdmissions(e.section,e.admissions,t,i):r("div",{class:"ticket-section",key:e.admission.id},r("div",{class:"admissions-list"},this.renderAdmission(e.admission,t,void 0,!1,i)))}renderDoorAlert(e,t){if("door"!==t)return null;const i=e.location?.name?.trim()||"the venue";return r("div",{class:"door-alert"},r("strong",null,"Tickets are available at ",i),r("span",null,"Online sales are closed. Tickets are available at the venue when you arrive."))}loadingView(){return this.initialLoading?this.renderLoadingState():void 0}errorView(){return this.error&&!this.event?this.renderErrorState():void 0}verificationView(){return this.verificationRequired?this.renderVerificationState():void 0}missingEventView(){if(!this.event)return this.eventLoading||this.retryLoading?this.renderUpdatingState():this.renderNotFoundState()}pendingView(){return this.loadingView()??this.verificationView()??this.errorView()??this.missingEventView()}renderReadyState(){const e=this.event;if(!e)return this.renderNotFoundState();const t=wA(e);return t.showExternalTicketing?r(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},r("div",{class:"session-services-ticketing-container","aria-busy":this.eventLoading?"true":"false"},this.renderExternalTicketing(t)),this.renderStickyExternalTicketing(t)):r(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},r("div",{class:"session-services-ticketing-container","aria-busy":this.eventLoading||this.retryLoading||this.passcodeLoading?"true":"false","aria-hidden":this.openModalAdmissionId?"true":void 0,inert:!!this.openModalAdmissionId||void 0},this.eventLoading&&r("div",{class:"inline-status",role:"status","aria-live":"polite"},"Updating ticket options…"),this.refreshError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},r("span",null,"We couldn’t refresh the latest ticket details."),r("button",{type:"button",class:"inline-retry-btn",onClick:()=>this.retryEventLoad(),disabled:this.retryLoading},this.retryLoading?"Refreshing…":"Try again")),t.showTicketing?this.renderTicketSections(e):this.renderUnavailableState(t),!t.isDoorOnly&&t.showTicketing&&this.renderCheckoutActions()),this.renderStickyCheckout(t),this.renderModal())}renderExternalTicketing(e){const t=e.externalTicketUrl;if(!t)return null;const i=NA(t);return r("div",{class:"tickets-wrapper"},r("h2",{class:"tickets-heading"},e.ticketHeading),r("div",{class:"external-ticket-panel"},r("p",{class:"external-ticket-warning"},"This event sells through an external ticketing site. Checkout, tickets, and support are handled there."),r("a",{class:"external-ticket-button inline-external-ticket-button",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"inline")},r("span",{class:"external-ticket-label"},"Get tickets"),r("span",{class:"external-ticket-domain"},"via ",i))))}renderUnavailableState(e){return r("div",{class:"empty-ticketing-state"},r("strong",null,"Tickets Unavailable"),r("span",null,e.isEnded?"This event has ended, so tickets are no longer available.":"Tickets are not available for this event right now."))}render(){return this.pendingView()??this.renderReadyState()}static get watchers(){return{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}}static get style(){return':host{--background:transparent;--foreground:oklch(0.21 0.006 285.885);--card:oklch(1 0 0);--card-foreground:oklch(0.21 0.006 285.885);--popover:oklch(1 0 0);--popover-foreground:oklch(0.21 0.006 285.885);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(0 0 0 / 4%);--secondary-foreground:oklch(0.21 0.006 285.885);--muted:oklch(0 0 0 / 4%);--muted-foreground:oklch(0.442 0.017 285.786);--accent:oklch(0 0 0 / 4%);--accent-foreground:oklch(0.21 0.006 285.885);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.505 0.213 27.518);--border:oklch(0 0 0 / 12%);--input:oklch(0 0 0 / 12%);--ring:oklch(0.705 0.015 286.067);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.488 0.243 264.376);--backdrop:oklch(0 0 0 / 0.32);--radius:0.625rem;--spacing-xs:0.25rem;--spacing-sm:0.5rem;--spacing-md:1rem;--spacing-lg:1.5rem;--spacing-xl:2rem;--font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--font-size-xs:0.75rem;--font-size-sm:0.875rem;--font-size-base:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--shadow-sm:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-base:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-md:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);--shadow-lg:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);--shadow-xl:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);--shadow-edge-light:0 1px oklch(0 0 0 / 4%);--shadow-edge-dark:0 -1px oklch(1 0 0 / 8%);--transition-fast:150ms cubic-bezier(0.4, 0, 0.2, 1);--transition-base:200ms cubic-bezier(0.4, 0, 0.2, 1);--transition-slow:300ms cubic-bezier(0.4, 0, 0.2, 1);--internal-background:var(--background, transparent);--internal-foreground:var(--foreground, oklch(0.21 0.006 285.885));--internal-card:var(--card, oklch(1 0 0));--internal-popover:var(--popover, oklch(1 0 0));--internal-popover-foreground:var(--popover-foreground, oklch(0.21 0.006 285.885));--internal-primary:var(--primary, oklch(0.537 0.1554 255));--internal-primary-foreground:var(--primary-foreground, oklch(0.985 0 0));--internal-secondary:var(--secondary, oklch(0 0 0 / 4%));--internal-muted:var(--muted, oklch(0 0 0 / 4%));--internal-muted-foreground:var(--muted-foreground, oklch(0.442 0.017 285.786));--internal-accent:var(--accent, oklch(0 0 0 / 4%));--internal-accent-foreground:var(--accent-foreground, oklch(0.21 0.006 285.885));--internal-destructive:var(--destructive, oklch(0.637 0.237 25.331));--internal-border:var(--border, oklch(0 0 0 / 12%));--internal-input:var(--input, oklch(0 0 0 / 12%));--internal-ring:var(--ring, oklch(0.705 0.015 286.067));--internal-success:var(--success, oklch(0.696 0.17 162.48));--internal-warning:var(--warning, oklch(0.769 0.188 70.08));--internal-info:var(--info, oklch(0.623 0.214 259.815));--internal-info-foreground:var(--info-foreground, oklch(0.488 0.243 264.376));--internal-backdrop:var(--backdrop, oklch(0 0 0 / 0.32));--internal-radius:var(--radius, 0.625rem);--internal-spacing-xs:var(--spacing-xs, 0.25rem);--internal-spacing-sm:var(--spacing-sm, 0.5rem);--internal-spacing-md:var(--spacing-md, 1rem);--internal-spacing-lg:var(--spacing-lg, 1.5rem);--internal-spacing-xl:var(--spacing-xl, 2rem);--internal-font-family:var(--font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif);--internal-font-size-xs:var(--font-size-xs, 0.75rem);--internal-font-size-sm:var(--font-size-sm, 0.875rem);--internal-font-size-base:var(--font-size-base, 1rem);--internal-font-size-lg:var(--font-size-lg, 1.125rem);--internal-font-size-xl:var(--font-size-xl, 1.25rem);--internal-font-weight-medium:var(--font-weight-medium, 500);--internal-font-weight-semibold:var(--font-weight-semibold, 600);--internal-font-weight-bold:var(--font-weight-bold, 700);--internal-shadow-lg:var(--shadow-lg, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1));--internal-shadow-xl:var(--shadow-xl, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1));--internal-shadow-edge-light:var(--shadow-edge-light, 0 1px oklch(0 0 0 / 4%));--internal-transition-fast:var(--transition-fast, 150ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-base:var(--transition-base, 200ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-slow:var(--transition-slow, 300ms cubic-bezier(0.4, 0, 0.2, 1));display:block;font-family:var(--internal-font-family);color:var(--internal-foreground);background:var(--internal-background);color-scheme:light}*{box-sizing:border-box;margin:0;padding:0}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}*:focus{outline:none}*:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px;border-radius:calc(var(--internal-radius) - 4px)}.session-services-ticketing-container{width:100%;max-width:100%;margin:0}:host([data-theme="dark"]){color-scheme:dark;--background:transparent;--foreground:oklch(0.967 0.001 286.375);--card:color-mix( in srgb, oklch(0.21 0.006 285.885) 80%, oklch(0.141 0.005 285.823) );--card-foreground:oklch(0.967 0.001 286.375);--popover:oklch(0.21 0.006 285.885);--popover-foreground:oklch(0.967 0.001 286.375);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(1 0 0 / 6%);--secondary-foreground:oklch(0.967 0.001 286.375);--muted:oklch(1 0 0 / 6%);--muted-foreground:oklch(0.705 0.015 286.067);--accent:oklch(1 0 0 / 6%);--accent-foreground:oklch(0.967 0.001 286.375);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.704 0.191 22.216);--border:oklch(1 0 0 / 12%);--input:oklch(1 0 0 / 12%);--ring:oklch(0.552 0.016 285.938);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.707 0.165 254.624)}.tickets-wrapper{padding:0;width:100%}.tickets-heading{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin:0 0 var(--internal-spacing-md)}.ticket-section.loading-ticket-section{overflow:visible;background:transparent;border:0;box-shadow:none}.loading-ticket-section .admissions-list{display:flex;flex-direction:column;gap:var(--internal-spacing-sm)}.admission-card.loading-admission{min-height:5.25rem;padding:0;background:oklch(from var(--internal-foreground) l c h / 0.07);border:0;border-radius:var(--internal-radius);box-shadow:none;pointer-events:none;animation:loading-card 1.6s ease-out infinite}@keyframes loading-card{0%,100%{opacity:0.48}50%{opacity:0.74}}.passcode-form,.passcode-form input,.ticket-section,.more-info-badge,.quantity-controls,.sold-out-controls,.coupon-row,.coupon-apply,.coupon-remove{border:1px solid var(--internal-input);box-shadow:var(--internal-shadow-edge-light)}.external-ticket-button,.checkout-btn{display:inline-flex;align-items:center;justify-content:center;background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);border-radius:calc(var(--internal-radius) - 2px);cursor:pointer;box-shadow:var(--internal-shadow-edge-light);transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), box-shadow var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast)}.external-ticket-button:hover,.checkout-btn:hover:not(:disabled){background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.external-ticket-button:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.passcode-form{display:flex;flex-direction:column;gap:var(--internal-spacing-sm);padding:var(--internal-spacing-lg);margin-bottom:var(--internal-spacing-md);background:var(--internal-card);border-radius:var(--internal-radius)}.passcode-form h2{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.passcode-form p{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.5}.door-alert,.empty-ticketing-state,.message-state{display:flex;flex-direction:column;gap:calc(var(--internal-spacing-xs) * 1.5);margin-bottom:var(--internal-spacing-md);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none}.door-alert strong,.empty-ticketing-state strong,.message-state strong,.message-state h2{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.door-alert span,.empty-ticketing-state span,.message-state span,.message-state p{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.4}.message-state .checkout-btn{margin-top:var(--internal-spacing-sm)}.external-ticket-button{flex-direction:column;gap:calc(var(--internal-spacing-xs) * 0.5);width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);text-decoration:none}.external-ticket-panel{display:flex;flex-direction:column;gap:var(--internal-spacing-md)}.external-ticket-warning{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.external-ticket-label{font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.2}.external-ticket-domain{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2;opacity:0.82}.passcode-form input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) + 0.125rem) var(--internal-spacing-sm);background:var(--internal-card);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font:inherit}.passcode-form input:disabled{opacity:0.6;cursor:not-allowed}.ticket-section{background:var(--internal-card);border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-lg) 0;overflow:hidden;width:100%;transition:background-color var(--internal-transition-base), border-color var(--internal-transition-base), box-shadow var(--internal-transition-base)}.tickets-wrapper>.ticket-section:last-child{margin-bottom:0}.ticket-section.section-sold-out{position:relative}.ticket-section.section-sold-out .section-header{padding-bottom:var(--internal-spacing-md)}.ticket-section.section-sold-out .section-name,.ticket-section.section-sold-out .section-time,.ticket-section.section-sold-out .section-venue{opacity:0.8}.ticket-section.section-sold-out .admissions-list{opacity:0.6;filter:grayscale(0.3)}.ticket-section.section-sold-out .admission-card{background:var(--internal-card)}.ticket-section.section-sold-out .quantity-controls,.ticket-section.section-sold-out .sold-out-controls{opacity:0.7}.section-header{padding:var(--internal-spacing-md) var(--internal-spacing-lg);border-bottom:1px solid var(--internal-border);background:var(--internal-card)}.section-name{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);letter-spacing:-0.025em;margin:0 0 var(--internal-spacing-xs) 0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.section-time,.section-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.section-time,.admission-time{margin-bottom:var(--internal-spacing-xs)}.section-time svg,.section-venue svg,.admission-time svg,.admission-venue svg{width:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));height:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));flex-shrink:0;opacity:0.8}.admissions-list{padding:0}.admission-card{border-bottom:1px solid var(--internal-border);padding:var(--internal-spacing-md) var(--internal-spacing-lg);position:relative;transition:background-color var(--internal-transition-base);cursor:default}.admission-card:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.admission-card.sold-out{background:var(--internal-card)}.admission-card.unavailable{opacity:0.72}.admission-card.sold-out .admission-price{opacity:0.5}.admission-card:last-child{border-bottom:none}.admission-content{display:flex;justify-content:space-between;align-items:center}.admission-details{flex:1}.admission-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--internal-spacing-md);margin-bottom:var(--internal-spacing-sm)}.admission-header-text{flex:1;min-width:0}.admission-title{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin-bottom:0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.admission-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.more-info-badge{display:inline-flex;align-items:center;gap:calc(var(--internal-spacing-xs) * 1.5);padding:calc(var(--internal-spacing-xs) * 1.5) var(--internal-spacing-sm);background:oklch(from var(--internal-info) l c h / 0.08);color:var(--internal-info-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast);white-space:nowrap;flex-shrink:0}.more-info-badge:hover{background:oklch(from var(--internal-info) l c h / 0.16)}.more-info-badge:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.more-info-badge svg{flex-shrink:0}.admission-time,.admission-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.admission-venue{margin-bottom:var(--internal-spacing-sm)}.solo-admission .admission-content{flex-direction:column;align-items:stretch}.solo-admission .admission-details{width:100%}.solo-admission .admission-price-info{margin-top:var(--internal-spacing-md);display:flex;justify-content:space-between;align-items:center;width:100%}.solo-admission .quantity-controls{margin-left:auto;flex-shrink:0}.admission-price-info{display:flex;align-items:center;justify-content:space-between;gap:var(--internal-spacing-sm);margin-bottom:var(--internal-spacing-sm);width:100%}.admission-price-wrapper{display:flex;flex-direction:column;row-gap:calc(var(--internal-spacing-xs) * 0.5)}.admission-price{color:var(--internal-foreground);font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-bold);letter-spacing:-0.025em;line-height:1.1}.admission-price-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--internal-spacing-sm)}.admission-price-original{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);text-decoration:line-through}.admission-booking-fee{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings,.admission-availability{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings{color:var(--internal-success)}.admission-availability{color:var(--internal-warning)}.admission-sale-label{display:block;margin-top:var(--internal-spacing-xs);color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.admission-sale-label.success{color:var(--internal-success)}.quantity-controls{display:inline-flex;align-items:center;gap:0;background:var(--internal-secondary);border-radius:calc(var(--internal-radius) - 2px);overflow:hidden;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), box-shadow var(--internal-transition-fast)}.quantity-controls:has(.quantity-value:focus-visible){box-shadow:0 0 0 2px var(--internal-ring)}.quantity-btn{width:calc(var(--internal-spacing-lg) * 1.5);height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-medium);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast);position:relative}.quantity-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.quantity-btn:hover:not(:disabled){background:var(--internal-accent);color:var(--internal-accent-foreground)}.quantity-btn:active:not(:disabled){transform:scale(0.95)}.quantity-btn:disabled{opacity:0.6;cursor:not-allowed;background:var(--internal-secondary);color:var(--internal-muted-foreground);border-color:var(--internal-border)}.quantity-btn.decrease{border-right:1px solid var(--internal-input)}.quantity-btn.increase{border-left:1px solid var(--internal-input)}.quantity-value{appearance:textfield;width:2.75rem;height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;min-width:2.5rem;text-align:center;font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);padding:0 var(--internal-spacing-xs)}.quantity-value:focus-visible{outline:none}.quantity-value::-webkit-inner-spin-button,.quantity-value::-webkit-outer-spin-button{appearance:none;margin:0}.quantity-value:disabled{opacity:0.6;cursor:not-allowed}.sold-out-controls{display:inline-flex;align-items:center;justify-content:center;min-width:calc(var(--internal-spacing-lg) * 1.5 * 2 + 2.5rem);height:calc(var(--internal-spacing-lg) * 1.5);padding:0;background:transparent;border:none;box-shadow:none}.sold-out-controls,.sold-out-text{color:var(--internal-destructive);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);letter-spacing:0.025em;text-transform:uppercase}.sold-out-controls.success,.sold-out-controls.success .sold-out-text{color:var(--internal-success)}.checkout-actions{margin:var(--internal-spacing-lg) 0 0 0;width:100%}.coupon-panel{margin-bottom:var(--internal-spacing-md)}.coupon-row{position:relative;display:flex;align-items:center;width:100%;min-width:0;overflow:hidden;background:var(--internal-background);background-clip:padding-box;border-radius:var(--internal-radius);transition:border-color var(--internal-transition-fast)}.coupon-row:focus-within{border-color:var(--internal-ring)}.coupon-row:has(input[aria-invalid="true"]){border-color:var(--internal-destructive)}.coupon-row:has(input:disabled){opacity:0.64}.coupon-row input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-xl) * 2.75) calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-md) - 1px);background:var(--internal-card);color:var(--internal-foreground);border:none;border-radius:inherit;font:inherit;font-size:var(--internal-font-size-sm);line-height:1.25rem;outline:none}.coupon-row input::placeholder{color:oklch(from var(--internal-muted-foreground) l c h / 0.64)}.coupon-row input:disabled{cursor:not-allowed}.coupon-apply,.coupon-remove{position:absolute;right:calc((var(--internal-spacing-xs) * 1.5) - 3px);top:50%;transform:translateY(-50%);padding:calc(var(--internal-spacing-xs) * 1.25) var(--internal-spacing-sm);background:var(--internal-secondary);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast)}.coupon-apply:hover:not(:disabled),.coupon-remove:hover:not(:disabled){background:oklch(from var(--internal-accent) l c h / 0.8)}.coupon-apply:focus-visible,.coupon-remove:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-1px}.coupon-apply:disabled,.coupon-remove:disabled{opacity:0.6;cursor:not-allowed}.checkout-btn{width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.25;position:relative;overflow:hidden}.checkout-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.checkout-btn:active:not(:disabled){transform:translateY(0)}.checkout-btn:disabled{opacity:0.5;cursor:not-allowed}.checkout-spinner-wrapper{display:inline-flex;align-items:center;justify-content:center;height:1.25em;vertical-align:middle}.checkout-spinner{width:1.125em;height:1.125em;animation:checkout-spinner 0.8s linear infinite}@keyframes checkout-spinner{to{transform:rotate(360deg)}}.sticky-checkout-bar{position:fixed;right:0;bottom:0;left:0;z-index:40;display:none;padding:var(--internal-spacing-md) var(--internal-spacing-md) calc(var(--internal-spacing-md) + env(safe-area-inset-bottom, 0px));background:var(--internal-card);border-top:1px solid var(--internal-border);box-shadow:var(--internal-shadow-lg)}.sticky-door-info{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--internal-spacing-xs) * 0.5);min-height:2.75rem;padding:var(--internal-spacing-sm) var(--internal-spacing-md);color:var(--internal-foreground);background:var(--internal-secondary);border:1px solid var(--internal-border);border-radius:calc(var(--internal-radius) - 2px);text-align:center}.sticky-door-info strong{font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);line-height:1.25}.sticky-door-info span{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-xs);line-height:1.3}.sticky-checkout-btn.selection-prompt{animation:selection-prompt-shake 400ms ease-in-out}@keyframes selection-prompt-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}.error-message{background:oklch( from var(--internal-destructive) calc(l + 0.4) calc(c * 0.2) h / 0.05 );border:1px solid oklch(from var(--internal-destructive) l c h / 0.2);color:var(--internal-destructive);padding:var(--internal-spacing-sm) var(--internal-spacing-md);border-radius:var(--internal-radius);margin-bottom:var(--internal-spacing-md);font-size:var(--internal-font-size-sm);line-height:1.4}.inline-status{display:flex;align-items:center;gap:var(--internal-spacing-sm);margin-bottom:var(--internal-spacing-md);color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.4}.inline-retry-btn{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;margin-top:var(--internal-spacing-sm);padding:calc(var(--internal-spacing-xs) * 1.5) var(--internal-spacing-md);background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);border-radius:calc(var(--internal-radius) - 2px);box-shadow:var(--internal-shadow-edge-light);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast)}.inline-retry-btn:hover:not(:disabled){background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.inline-retry-btn:disabled{opacity:0.5;cursor:not-allowed}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (min-width: 768px){.ticket-section{border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-md) 0}}@media (max-width: 767px){:host([data-sticky-checkout="true"]) .checkout-actions>.checkout-btn,:host([data-sticky-checkout="true"]) .inline-external-ticket-button{display:none}.sticky-checkout-bar{display:block}:host([data-sticky-checkout="true"]) .session-services-ticketing-container{padding-bottom:calc(6.5rem + env(safe-area-inset-bottom, 0px))}}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:var(--internal-spacing-md);background:var(--internal-backdrop);backdrop-filter:blur(4px);overscroll-behavior:contain;animation:modal-backdrop-fade-in var(--internal-transition-base) ease-out}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}.modal-content{position:relative;width:100%;max-width:32rem;max-height:calc(100vh - var(--internal-spacing-xl) * 2);overflow-y:auto;overscroll-behavior:contain;background:var(--internal-popover);color:var(--internal-popover-foreground);border:1px solid var(--internal-border);border-radius:var(--internal-radius);padding:var(--internal-spacing-lg);box-shadow:var(--internal-shadow-xl);animation:modal-content-scale-in var(--internal-transition-base) ease-out}@keyframes modal-content-scale-in{from{opacity:0;transform:scale(0.98)}to{opacity:1;transform:scale(1)}}.modal-close-btn{position:absolute;top:var(--internal-spacing-sm);right:var(--internal-spacing-sm);display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:1px solid transparent;border-radius:calc(var(--internal-radius) - 4px);color:var(--internal-muted-foreground);cursor:pointer;opacity:0.72;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast)}.modal-close-btn:hover{opacity:1;background:var(--internal-accent)}.modal-close-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:1px;opacity:1}.modal-header{margin-bottom:var(--internal-spacing-md);padding-right:var(--internal-spacing-xl)}.modal-title{font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);margin:0;line-height:1.2}.modal-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.modal-description{color:var(--internal-foreground);font-size:var(--internal-font-size-base);line-height:1.6;white-space:pre-wrap;margin:0}@media (prefers-reduced-motion: reduce){:host,*{scroll-behavior:auto !important}.admission-card.loading-admission,.checkout-spinner,.sticky-checkout-btn.selection-prompt,.modal-backdrop,.modal-content{animation:none}.external-ticket-button,.checkout-btn,.ticket-section,.more-info-badge,.quantity-controls,.quantity-btn,.coupon-row,.coupon-apply,.coupon-remove,.inline-retry-btn,.modal-close-btn{transition:none}}'}},[513,"session-services-ticketing",{tenantId:[1,"tenant-id"],eventId:[1,"event-id"],apiUrl:[1,"api-url"],locale:[1],returnUrl:[1,"return-url"],returnDestinationKey:[1,"return-destination-key"],createOrder:[16],couponCode:[1,"coupon-code"],initialAdmissionPrices:[1,"initial-admission-prices"],initialPreviewQuote:[1,"initial-preview-quote"],passcode:[1],stickyCheckout:[4,"sticky-checkout"],theme:[1],enableAnalytics:[4,"enable-analytics"],debugAnalytics:[4,"debug-analytics"],event:[32],selectedItems:[32],quote:[32],previewQuote:[32],initialLoading:[32],eventLoading:[32],retryLoading:[32],passcodeLoading:[32],error:[32],errorKind:[32],refreshError:[32],quoteLoading:[32],previewLoading:[32],quoteError:[32],couponError:[32],couponInput:[32],appliedCouponCode:[32],passcodeInput:[32],activePasscode:[32],passcodeDenied:[32],selectionPrompt:[32],checkoutLoading:[32],checkoutError:[32],currentTheme:[32],openModalAdmissionId:[32],verificationRequired:[32]},void 0,{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}]);function FA(){"undefined"!=typeof customElements&&["session-services-ticketing"].forEach((t=>{"session-services-ticketing"===t&&(customElements.get(e(t))||customElements.define(e(t),BA))}))}FA();const VA=BA,zA=FA;export{VA as SessionServicesTicketing,zA as defineCustomElement}
1
+ import{t as e,p as t,H as i,c as n,h as r,a as o}from"./index.js";function a(e){let t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,i])=>-1===t.indexOf(+e))).map((([e,t])=>t))}function s(e,t="|"){return e.map((e=>O(e))).join(t)}function d(e,t){return"bigint"==typeof t?""+t:t}var c=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}};function l(e){return new c(e)}function u(e){let t=+!!e.startsWith("^"),i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}const p=Symbol("evaluating");function m(e,t,i){Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}function h(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function f(e){return h(e._zod.def)??e._zod.def.shape}function y(e,t,i){Object.defineProperty(e,t,{get(){let e=i();return m(this,t,e),e},enumerable:!0,configurable:!0})}function g(e,t,i){t in e?m(e,t,i):e[t]=i}function v(e,t,i,n){let r=f(t);for(let o of i){let i=Object.getOwnPropertyDescriptor(r,o);i.enumerable&&(i.get?y(e,o,(()=>{let e=t._zod.def.shape[o];return n?n(e,o):e})):g(e,o,n?n(i.value,o):i.value))}}function b(...e){let t={};for(let i of e)Object.assign(t,Object.getOwnPropertyDescriptors(i));return Object.defineProperties({},t)}function w(e){return JSON.stringify(e)}const $="captureStackTrace"in Error?Error.captureStackTrace:()=>{};function I(e){return"object"==typeof e&&!!e&&!Array.isArray(e)}const E=l((()=>{if(de.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch{return!1}}));function k(e){if(!1===I(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let i=t.prototype;return!(!1===I(i)||!1===Object.prototype.hasOwnProperty.call(i,"isPrototypeOf"))}function T(e){return k(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const A=new Set(["string","number","symbol"]);function x(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function S(e,t,i){let n=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(n._zod.parent=e),n}function D(e){let t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function O(e){return"bigint"==typeof e?e+"n":"string"==typeof e?`"${e}"`:""+e}const C={safeint:[-9007199254740991,2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},P={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function _(e,t){let i=f(e),n=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(i,e)?.enumerable)throw Error(`Unrecognized key: "${e+""}"`);t[e]&&n.push(e)}return n}function R(e,t){let i={};return v(i,e,Reflect.ownKeys(f(e))),function(e,t){for(let i of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,i);n.enumerable&&(n.get?y(e,i,(()=>t[i])):g(e,i,n.value))}}(i,t),i}function N(e,t,i,n="partial"){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.${n}() cannot be used on object schemas containing refinements`);let o=i?new Set(_(t,i)):void 0,a={};return v(a,t,Reflect.ownKeys(f(t)),e&&((t,i)=>o&&!o.has(i)?t:new e({type:"optional",innerType:t}))),S(t,b(t._zod.def,{shape:a,checks:[]}))}function M(e,t=0){if(!0===e.aborted)return!0;for(let i=t;i<e.issues.length;i++)if(!0!==e.issues[i]?.continue)return!0;return!1}function U(e,t=0){if(!0===e.aborted)return!0;for(let i=t;i<e.issues.length;i++)if(!1===e.issues[i]?.continue)return!0;return!1}function L(e,t){return t.map((t=>{var i;return(i=t).path??(i.path=[]),t.path.unshift(e),t}))}function j(e){return"string"==typeof e?e:e?.message}function q(e){let t=[];for(let i of e??[]){let e=i._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let n=e.maximum??e.length??e.size;n>=0&&t.push([n,i])}return t}function G(e,t,i){var n;for(let r=t;r<e.length;r++)(n=e[r]).schema??(n.schema=i)}function B(e,t,i){var n;let r=e.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let o=e.schema===e.inst?void 0:e.schema?._zod.def?.error,a=e.message?e.message:j(e.inst?._zod.def?.error?.(e))??j(o?.(e))??j(t?.error?.(e))??j(i.customError?.(e))??j(i.localeError?.(e))??"Invalid input",s={};for(let t of Object.keys(e))"inst"===t||"schema"===t||"continue"===t||"input"===t||"__proto__"===t||(s[t]=e[t]);return s.path??=[],s.message=a,t?.reportInput&&(s.input=e.input),s}const F=/[\uD800-\uDBFF]/;function V(e){let t=e.length;if(!F.test(e))return t;let i=t;for(let n=0;n<t-1;n++)55296==(64512&e.charCodeAt(n))&&56320==(64512&e.charCodeAt(n+1))&&(i--,n++);return i}function z(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function W(...e){let[t,i,n]=e;return"string"==typeof t?{message:t,code:"custom",input:i,inst:n}:{...t}}function Y(e,t,i,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:i}),i}function Z(e,t,i){return Y(e,t,i,!1)}function H(e,t){for(let i in e){let n=e[i];Object.defineProperty(t,i,{configurable:!0,enumerable:!0,get(){return Y(this,i,n(this))},set(e){Y(this,i,e)}})}return t}function K(e,t,i){Object.defineProperty(e,t,{configurable:!0,get(){return null==this?i:Y(this,t,i.bind(this))},set(e){Y(this,t,e)}})}let J,Q=!1;const X={configurable:!0,get(){Q=!0}};function ee(e,t,i){let n=Object.getPrototypeOf(e._zod);t in n&&J!==e._zod?J=void 0:(J=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,X);let e=Q;Q=!1;try{let n=i(this);return Q?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n}),Q||=e,n}catch(i){throw delete this[t],Q||=e,i}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function te(e){let t=()=>e;return t["~constantCatch"]=!0,t}var ie;const ne={value:void 0,enumerable:!1};let re="captureStackTrace"in Error?Error:null;function oe(e,t,i,n){function r(e){this.def=e,this.constr=l,this.traits=new Set}r.prototype={};let o=i,a=o&&new WeakSet;function s(i,n){if(i._zod){if(i._zod.traits.has(e))return}else{ne.value=new r(n);try{Object.defineProperty(i,"_zod",ne)}finally{ne.value=void 0}}if(i._zod.traits.add(e),t(i,n),a){let e=Object.getPrototypeOf(i),t=i._zod.constr.prototype,n=e;for(;n&&n!==t;)n=Object.getPrototypeOf(n);let r=n??e;a.has(r)||(a.add(r),function(e,t){for(let i in t){let n=Object.getOwnPropertyDescriptor(t,i);n.get?Object.defineProperty(e,i,{...n,enumerable:!1}):K(e,i,n.value)}}(r,o))}let s=l.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in i||(i[e]=s[e].bind(i)))}let d=n?.Parent??Object;class c extends d{}function l(e){let t=n?.Parent?function(e){let t=re;if(t){let i=t.stackTraceLimit;if("number"==typeof i){try{t.stackTraceLimit=0}catch{return re=null,new e}try{return new e}finally{t.stackTraceLimit=i}}}return new e}(c):this;s(t,e);let i=t._zod.deferred;if(i){for(let e of i)e();t._zod.deferred=void 0}let r=globalThis.__zod_globalConfig?.postProcessor;return r&&r(t),t}return Object.defineProperty(c,"name",{value:e}),Object.defineProperty(l,"init",{value:s}),Object.defineProperty(l,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}var ae=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},se=class extends Error{constructor(e){super("Encountered unidirectional transform during encode: "+e),this.name="ZodEncodeError"}};(ie=globalThis).__zod_globalConfig??(ie.__zod_globalConfig={});const de=globalThis.__zod_globalConfig;function ce(e){return e&&Object.assign(de,e),de}const le={get:function(){let e=this._zod;return e.message??=JSON.stringify(e.def,d,2),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},ue={value:void 0,enumerable:!1},pe=new WeakSet([Object.prototype,Error.prototype]),me=(e,t)=>{e.name="$ZodError",ue.value=t,Object.defineProperty(e,"issues",ue),ue.value=void 0,Object.defineProperty(e,"message",le);let i=Object.getPrototypeOf(e);pe.has(i)||(pe.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},he=oe("$ZodError",me);function fe(e,t,i){return Object.prototype.hasOwnProperty.call(e,t)||("__proto__"===t?Object.defineProperty(e,t,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[t]=i()),e[t]}function ye(e,t){return{callee:t?.callee??e,Err:t?.Err}}oe("$ZodError",me,void 0,{Parent:Error});const ge=e=>{let t=(i,n,r,o)=>{let a=r?{...r,async:!1}:{async:!1},s=i._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new ae;if(s.issues.length){let i=new(o?.Err??e)(s.issues.map((e=>B(e,a,ce()))));throw $(i,o?.callee??t),i}return s.value};return t},ve=e=>{let t=async(i,n,r,o)=>{let a=r?{...r,async:!0}:{async:!0},s=i._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let i=new(o?.Err??e)(s.issues.map((e=>B(e,a,ce()))));throw $(i,o?.callee??t),i}return s.value};return t},be=e=>(t,i,n)=>{let r=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new ae;return o.issues.length?we(e,o.issues,r):{success:!0,data:o.value}};function we(e,t,i){let n;return{success:!1,get error(){return n||(n=new e(t.map((e=>B(e,i,ce())))),t=void 0,i=void 0),n},set error(e){n=e,t=void 0,i=void 0}}}const $e=e=>async(t,i,n)=>{let r=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?we(e,o.issues,r):{success:!0,data:o.value}},Ie=Symbol.for("zod.compile.invalid"),Ee=Symbol.for("zod.compile.fallback"),ke=/^[cC][0-9a-z]{6,}$/,Te=/^[0-9a-z]+$/,Ae=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,xe=/^[0-9a-vA-V]{20}$/,Se=/^[A-Za-z0-9]{27}$/,De=/^[a-zA-Z0-9_-]{21}$/,Oe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ce=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pe=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_e=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Re=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ne=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Me=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ue=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Le=/^https?$/,je=/^\+[1-9]\d{6,14}$/,qe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ge=RegExp(`^${qe}$`);function Be(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?""+t:0===e.precision?t+":[0-5]\\d":`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?t+":[0-5]\\d(?:\\.\\d+)?":t+"(?::[0-5]\\d(?:\\.\\d+)?)?"}const Fe=/^[\s\S]{0,}$/,Ve=/^-?\d+$/,ze=/^-?\d+(?:\.\d+)?$/,We=/^(?:true|false)$/i,Ye=/^null$/i,Ze=/^undefined$/i,He=/^[^A-Z]*$/,Ke=/^[^a-z]*$/,Je=oe("$ZodCheck",((e,t)=>{var i;e._zod??={},e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])})),Qe=e=>{let t=e.value;return!function(e){return null==e}(t)&&void 0!==t.length},Xe={number:"number",bigint:"bigint",object:"date"},et=oe("$ZodCheckLessThan",((e,t)=>{Je.init(e,t);let i=Xe[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:Xe[typeof n.value]??i,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),tt=oe("$ZodCheckGreaterThan",((e,t)=>{Je.init(e,t);let i=Xe[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:Xe[typeof n.value]??i,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),it=oe("$ZodCheckMultipleOf",((e,t)=>{Je.init(e,t),e._zod.check=i=>{if(typeof i.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof i.value?t.value!==BigInt(0)&&i.value%t.value===BigInt(0):0===function(e,t){let i=e/t,n=Math.round(i),r=4*2**-52*Math.max(Math.abs(i),1);return Math.abs(i-n)<r?0:i-n}(i.value,t.value))||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:t.value,input:i.value,inst:e,continue:!t.abort})}})),nt=oe("$ZodCheckNumberFormat",((e,t)=>{Je.init(e,t),t.format=t.format||"float64";let i=t.format?.includes("int"),n=i?"int":"number",[r,o]=C[t.format];e._zod.check=a=>{let s=a.value;if(i){if(!Number.isInteger(s))return void a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void a.issues.push(s>0?{input:s,code:"too_big",maximum:2**53-1,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}:{input:s,code:"too_small",minimum:-9007199254740991,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort})}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}})),rt=oe("$ZodCheckMaxLength",((e,t)=>{var i;Je.init(e,t),(i=e._zod.def).when??(i.when=Qe),e._zod.check=i=>{let n=i.value,r=n.length;if(("string"==typeof n&&r>t.maximum?V(n):r)<=t.maximum)return;let o=z(n);i.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}})),ot=oe("$ZodCheckMinLength",((e,t)=>{var i;Je.init(e,t),(i=e._zod.def).when??(i.when=Qe),e._zod.check=i=>{let n=i.value,r=n.length;if(("string"==typeof n&&r>=t.minimum&&r<2*t.minimum?V(n):r)>=t.minimum)return;let o=z(n);i.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}})),at=oe("$ZodCheckLengthEquals",((e,t)=>{var i;Je.init(e,t),(i=e._zod.def).when??(i.when=Qe),e._zod.check=i=>{let n=i.value,r=n.length,o="string"==typeof n&&r>=t.length&&r<=2*t.length?V(n):r;if(o===t.length)return;let a=z(n);i.issues.push({origin:a,...o>t.length?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}})),st=oe("$ZodCheckStringFormat",((e,t)=>{var i,n;Je.init(e,t),t.pattern?(i=e._zod).check??(i.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:""+t.pattern}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})})),dt=oe("$ZodCheckRegex",((e,t)=>{st.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:""+t.pattern,inst:e,continue:!t.abort})}})),ct=oe("$ZodCheckLowerCase",((e,t)=>{t.pattern??=He,st.init(e,t)})),lt=oe("$ZodCheckUpperCase",((e,t)=>{t.pattern??=Ke,st.init(e,t)})),ut=oe("$ZodCheckIncludes",((e,t)=>{Je.init(e,t);let i=x(t.includes);t.pattern=RegExp("number"==typeof t.position?`^.{${t.position},}${i}`:i),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}})),pt=oe("$ZodCheckStartsWith",((e,t)=>{Je.init(e,t);let i=RegExp(`^${x(t.prefix)}.*`);t.pattern??=i,e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}})),mt=oe("$ZodCheckEndsWith",((e,t)=>{Je.init(e,t);let i=RegExp(`.*${x(t.suffix)}$`);t.pattern??=i,e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}})),ht=oe("$ZodCheckOverwrite",((e,t)=>{Je.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));var ft=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});let t=e.split("\n").filter((e=>e)),i=Math.min(...t.map((e=>e.length-e.trimStart().length))),n=t.map((e=>e.slice(i))).map((e=>" ".repeat(2*this.indent)+e));for(let e of n)this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed))}};const yt={major:4,minor:6,patch:7},gt=oe("$ZodType",((e,t)=>{var i;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yt;let n=e._zod.def.checks,r=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let t of r)for(let i of t._zod.onattach)i(e);if(0===r.length)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{let t=(t,i,n)=>{if(t.memo)return t;let r,o=M(t);for(let a of i){if(a._zod.def.when){if(U(t)||!a._zod.def.when(t))continue}else if(o)continue;let i=t.issues.length,s=a._zod.check(t);if(s instanceof Promise&&!1===n?.async)throw new ae;if(r||s instanceof Promise)r=(r??Promise.resolve()).then((async()=>{await s,t.issues.length!==i&&(G(t.issues,i,e),o||=M(t,i))}));else{if(t.issues.length===i)continue;G(t.issues,i,e),o||=M(t,i)}}return r?r.then((()=>t)):t},i=(i,n,o)=>{if(M(i))return i.aborted=!0,i;let a=t(n,r,o);if(a instanceof Promise){if(!1===o.async)throw new ae;return a.then((t=>e._zod.parse(t,o)))}return e._zod.parse(a,o)};e._zod.run=(n,o)=>{if(o.skipChecks)return e._zod.parse(n,o);if("backward"===o.direction){let t=e._zod.parse({value:n.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then((e=>i(e,n,o))):i(t,n,o)}let a=e._zod.parse(n,o);if(a instanceof Promise){if(!1===o.async)throw new ae;return a.then((e=>t(e,r,o)))}return t(a,r,o)}}}),{get"~standard"(){return Z(this,"~standard",bt(this))},set"~standard"(e){Y(this,"~standard",e)}}),vt=(e,t)=>e.issues.length?{issues:e.issues.map((e=>B(e,t,ce())))}:{value:e.value};function bt(e){return{validate:t=>{let i={async:!1};try{let n=e._zod.run({value:t,issues:[]},i);if(!(n instanceof Promise))return vt(n,i)}catch{}return async function(e,t){let i={async:!0};return vt(await e._zod.run({value:t,issues:[]},i),i)}(e,t)},vendor:"zod",version:1}}const wt=oe("$ZodString",((e,t)=>{gt.init(e,t),e._zod.pattern=t.pattern??Fe,e._zod.parse=i=>{if(t.coerce)try{i.value=i.value+""}catch{}return"string"==typeof i.value||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}})),$t=oe("$ZodStringFormat",((e,t)=>{st.init(e,t),wt.init(e,t)})),It=oe("$ZodGUID",((e,t)=>{t.pattern??=Ce,$t.init(e,t)})),Et=oe("$ZodUUID",((e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Pe(e)}else t.pattern??=Pe();$t.init(e,t)})),kt=oe("$ZodEmail",((e,t)=>{t.pattern??=_e,$t.init(e,t)}));function Tt(e){try{return typeof URL<"u"&&"function"==typeof URL.canParse?URL.canParse(e):(new URL(e),!0)}catch{return!1}}const At=/[\t\n\r]/g;function xt(e){return e.replace(At,"")}const St=oe("$ZodURL",((e,t)=>{$t.init(e,t),e._zod.check=i=>{try{let n=i.value.trim(),r=function(e,t){return"normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===Le.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<"u"){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(e,t):Tt(e)||2}(n,t);return 1===r?void i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!t.abort}):2===r?void i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort}):!0===r?void(i.value=xt(n)):(t.hostname&&!function(e,t){return t.lastIndex=0,t.test(e.hostname)}(r,t.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort}),t.protocol&&!function(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}(r,t.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort}),void(i.value=t.normalize?r.href:xt(n)))}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}})),Dt=oe("$ZodEmoji",((e,t)=>{t.pattern??=RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u"),$t.init(e,t)})),Ot=oe("$ZodNanoID",((e,t)=>{if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error("Invalid nanoid length: "+t.length);t.pattern??=void 0===t.length?De:function(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}(t.length),$t.init(e,t)})),Ct=oe("$ZodCUID",((e,t)=>{t.pattern??=ke,$t.init(e,t)})),Pt=oe("$ZodCUID2",((e,t)=>{t.pattern??=Te,$t.init(e,t)})),_t=oe("$ZodULID",((e,t)=>{t.pattern??=Ae,$t.init(e,t)})),Rt=oe("$ZodXID",((e,t)=>{t.pattern??=xe,$t.init(e,t)})),Nt=oe("$ZodKSUID",((e,t)=>{t.pattern??=Se,$t.init(e,t)})),Mt=oe("$ZodISODateTime",((e,t)=>{t.pattern??=function(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${Be({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${i}|${Be({precision:e.precision})}`:i;return RegExp(`^${qe}T(?:${n})$`)}(t),$t.init(e,t)})),Ut=oe("$ZodISODate",((e,t)=>{t.pattern??=Ge,$t.init(e,t)})),Lt=oe("$ZodISOTime",((e,t)=>{t.pattern??=function(e){return RegExp(`^${Be(e)}$`)}(t),$t.init(e,t)})),jt=oe("$ZodISODuration",((e,t)=>{t.pattern??=Oe,$t.init(e,t)})),qt=oe("$ZodIPv4",((e,t)=>{t.pattern??=Re,$t.init(e,t)})),Gt=/^[0-9a-fA-F:.]+$/;function Bt(e){return!!Gt.test(e)&&Tt(`http://[${e}]`)}const Ft=oe("$ZodIPv6",((e,t)=>{t.pattern??=Ne,$t.init(e,t),e._zod.check=i=>{Bt(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}})),Vt=oe("$ZodCIDRv4",((e,t)=>{t.pattern??=Me,$t.init(e,t)})),zt=oe("$ZodCIDRv6",((e,t)=>{t.pattern??=Ue,$t.init(e,t),e._zod.check=i=>{(function(e){let t=e.split("/");if(2!==t.length)return!1;let[i,n]=t;if(!n)return!1;let r=Number(n);return!(""+r!==n||r<0||r>128)&&Bt(i)})(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}}));function Wt(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Yt=/^[0-9a-zA-Z+/]*={0,2}$/,Zt=oe("$ZodBase64",((e,t)=>{t.pattern??=Yt,$t.init(e,t),e._zod.check=i=>{Wt(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}})),Ht=/^[A-Za-z0-9_-]*$/,Kt=oe("$ZodBase64URL",((e,t)=>{t.pattern??=Ht,$t.init(e,t),e._zod.check=i=>{(function(e){if(!Ht.test(e))return!1;let t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return Wt(t.padEnd(4*Math.ceil(t.length/4),"="))})(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}})),Jt=oe("$ZodE164",((e,t)=>{t.pattern??=je,$t.init(e,t)})),Qt=oe("$ZodJWT",((e,t)=>{$t.init(e,t),e._zod.check=i=>{(function(e,t=null){try{let i=e.split(".");if(3!==i.length)return!1;let[n]=i;if(!n)return!1;let r=JSON.parse(atob(n));return!("typ"in r&&"JWT"!==r?.typ||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}})(i.value,t.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!t.abort})}})),Xt=oe("$ZodNumber",((e,t)=>{gt.init(e,t),e._zod.pattern=ze,e._zod.parse=i=>{if(t.coerce)try{i.value=Number(i.value)}catch{}let n=i.value;if("number"==typeof n&&!Number.isNaN(n)&&Number.isFinite(n))return i;let r="number"==typeof n?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:n+"":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...r?{received:r}:{}}),i}})),ei=oe("$ZodNumberFormat",((e,t)=>{nt.init(e,t),Xt.init(e,t)})),ti=oe("$ZodBoolean",((e,t)=>{gt.init(e,t),e._zod.pattern=We,e._zod.parse=i=>{if(t.coerce)try{i.value=!!i.value}catch{}let n=i.value;return"boolean"==typeof n||i.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),i}})),ii=oe("$ZodUndefined",((e,t)=>{gt.init(e,t),e._zod.pattern=Ze,e._zod.values=new Set([void 0]),e._zod.parse=t=>{let i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}})),ni=oe("$ZodNull",((e,t)=>{gt.init(e,t),e._zod.pattern=Ye,e._zod.values=new Set([null]),e._zod.parse=t=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}})),ri=oe("$ZodAny",((e,t)=>{gt.init(e,t),e._zod.parse=e=>e})),oi=oe("$ZodUnknown",((e,t)=>{gt.init(e,t),e._zod.parse=e=>e})),ai=oe("$ZodNever",((e,t)=>{gt.init(e,t),e._zod.parse=t=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),si=oe("$ZodVoid",((e,t)=>{gt.init(e,t),e._zod.parse=t=>{let i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}})),di=oe("$ZodDate",((e,t)=>{gt.init(e,t),e._zod.parse=i=>{if(t.coerce)try{i.value=new Date(i.value)}catch{}let n=i.value,r=n instanceof Date;return r&&!Number.isNaN(n.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:n,...r?{received:"Invalid Date"}:{},inst:e}),i}})),ci=e=>Array.isArray(e)?e.length:-1;function li(e,t,i){e.issues.length&&t.issues.push(...L(i,e.issues)),t.value[i]=e.value}const ui=oe("$ZodArray",((e,t)=>{gt.init(e,t);let i=de.memoizer;i?.attach(e),e._zod.parse=(n,r)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=i?i.alloc(e,n,Array(o.length),r):Array(o.length);let a=[],s=r?.abortEarly;for(let e=0;e<o.length;e++){let i=t.element._zod.run({value:o[e],issues:[]},r);if(i instanceof Promise)a.push(i.then((t=>li(t,n,e))));else if(li(i,n,e),s&&0!==i.issues.length&&M(i))break}return a.length?Promise.all(a).then((()=>n)):n},function(e,t){let i=q(e._zod.def.checks);if(!i.length)return;let n=Math.min(...i.map((e=>e[0]))),r=e._zod.parse;e._zod.parse=(i,o)=>{let a=t(i.value);if(a>n&&!o?.skipChecks&&"backward"!==o?.direction)for(let[t,n]of q(e._zod.def.checks))if(a>t&&n._zod.def.when(i)){let t=i.issues.length;return n._zod.check(i),i.issues[t].continue=!1,G(i.issues,t,e),i}return r(i,o)}}(e,ci)}));function pi(e,t,i,n,r,o){let a=i in n,s="optional"===o;if(a||!s||"optional"!==r){if(e.issues.length){if(void 0!==r&&s&&!a)return;t.issues.push(...L(i,e.issues))}if(!a&&void 0===r)return void(e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]}));void 0===e.value?(a||"defaulted"===r&&!s)&&(t.value[i]=void 0):t.value[i]=e.value}}const mi=[];function hi(e){let t=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),n=i.length?i:mi,r=n.length?[...t,...n]:t;for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t+""}": expected a Zod schema`);let o=function(e){return Object.keys(e).filter((t=>void 0!==e[t]._zod.optin&&"optional"===e[t]._zod.optout))}(e.shape);return{...e,allKeys:r,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function fi(e,t,i,n,r,o,a){let s=[],d=r.keySet,c=r.catchall._zod,l=c.def.type,u=c.optin,p=c.optout,m=0;for(let r in t){if(a&&i.issues.length!==m){if(M(i,m))break;m=i.issues.length}if(d.has(r))continue;if("__proto__"===r){"never"===l&&s.push(r);continue}if("never"===l){s.push(r);continue}let o=c.run({value:t[r],issues:[]},n);o instanceof Promise?e.push(o.then((e=>pi(e,i,r,t,u,p)))):pi(o,i,r,t,u,p)}return s.length&&i.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then((()=>i)):i}const yi=oe("$ZodObject",((e,t)=>{gt.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape"),n=i?.get?i.get.raw:t.shape??{};if(n){let e=()=>{let i={...n};return Object.defineProperty(t,"shape",{value:i}),e.raw=i,i};e.raw=n,Object.defineProperty(t,"shape",{get:e})}let r=l((()=>hi(t)));ee(e,"propValues",(e=>{let t=e.def.shape,i={};for(let e in t){let n=t[e]._zod;if(n.values){Object.prototype.hasOwnProperty.call(i,e)||m(i,e,new Set);for(let t of n.values)i[e].add(t);void 0!==n.optin&&i[e].add(void 0)}}return i}));let o,a=I,s=t.catchall,d=de.memoizer;d?.attach(e),e._zod.parse=(t,i)=>{o??=r.value;let n=t.value;if(!a(n))return t.issues.push({expected:"object",code:"invalid_type",input:n,inst:e}),t;t.value=d?d.alloc(e,t,{},i):{};let c=[],l=o.shape,u=i?.abortEarly,p=t.issues.length;for(let e of o.allKeys){if(u&&t.issues.length!==p){if(M(t,p))break;p=t.issues.length}if("__proto__"===e)continue;let r=l[e],o=r._zod.optin,a=r._zod.optout,s=r._zod.run({value:n[e],issues:[]},i);s instanceof Promise?c.push(s.then((i=>pi(i,t,e,n,o,a)))):pi(s,t,e,n,o,a)}return s?fi(c,n,t,i,r.value,e,!0===u):c.length?Promise.all(c).then((()=>t)):t}})),gi=oe("$ZodObjectJIT",((e,t)=>{yi.init(e,t);let i,n,r=e._zod.parse,o=l((()=>hi(t))),a=de.memoizer,s=t=>{let i=o.value,n=i.symbolKeys,r=new ft(["payload","ctx"],{shape:t,inst:e,memo:a,syms:n}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,d=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;r.write("const input = payload.value;");let c=Object.create(null),l=0;for(let e of i.allKeys)c[e]="key_"+l++;r.write(a?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let e of i.allKeys){if("__proto__"===e)continue;let i=c[e],o="symbol"==typeof e?`syms[${n.indexOf(e)}]`:w(e),a=o+" in input",l=t[e],u=l?._zod?.optin,p=void 0!==u,m="optional"===l?._zod?.optout;if(r.write(`const ${i} = ${s(o)};`),p&&m){let e="optional"===u?i+"_present":`${i}.value !== undefined || ${i}_present`;r.write(`\n const ${i}_present = ${a};\n if (!${i}.issues.length || ${i}_present) {\n if (${i}.issues.length) {${d(i,o)}\n }\n\n if (${e}) {\n newResult[${o}] = ${i}.value;\n }\n }\n\n `)}else p?(r.write(`\n if (${i}.issues.length) {${d(i,o)}\n }\n `),r.write("defaulted"===u?`newResult[${o}] = ${i}.value;`:`\n if (${i}.value !== undefined || ${a}) {\n newResult[${o}] = ${i}.value;\n }\n `)):r.write(`\n const ${i}_present = ${a};\n if (${i}.issues.length) {${d(i,o)}\n }\n if (!${i}_present && !${i}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${o}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${i}_present) {\n newResult[${o}] = ${i}.value;\n }\n\n `)}return r.write("payload.value = newResult;"),r.write("return payload;"),r.compile()},d=I,c=!de.jitless,u=c&&E.value,p=t.catchall;e._zod.parse=(a,l)=>{n??=o.value;let m=a.value;return d(m)?c&&u&&!1===l?.async&&!0!==l.jitless?(i||=s(t.shape),a=i(a,l),p?fi([],m,a,l,n,e,!0===l?.abortEarly):a):r(a,l):(a.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),a)}}));function vi(e,t,i,n){for(let i of e)if(0===i.issues.length)return t.value=i.value,t;let r=e.filter((e=>!M(e)));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map((e=>e.issues.map((e=>B(e,n,ce())))))}),t)}const bi=oe("$ZodUnion",((e,t)=>{gt.init(e,t),ee(e,"optin",(e=>e.def.options.some((e=>"defaulted"===e._zod.optin))?"defaulted":e.def.options.some((e=>void 0!==e._zod.optin))?"optional":void 0)),ee(e,"optout",(e=>e.def.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),ee(e,"values",(e=>{if(e.def.options.every((e=>e._zod.values)))return new Set(e.def.options.flatMap((e=>Array.from(e._zod.values))))})),ee(e,"pattern",(e=>{if(e.def.options.every((e=>e._zod.pattern))){let t=e.def.options.map((e=>e._zod.pattern));return RegExp(`^(${t.map((e=>u(e.source))).join("|")})$`)}}));let i=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,r)=>{if(i)return i(n,r);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then((t=>vi(t,n,e,r))):vi(a,n,e,r)}})),wi=oe("$ZodDiscriminatedUnion",((e,t)=>{t.inclusive=!1,bi.init(e,t);let i=e._zod.parse;ee(e,"propValues",(e=>{let t={},i=0;for(let n of e.def.options){let r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);r[e.def.discriminator]?.has(void 0)&&i++;for(let[e,i]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||m(t,e,new Set);for(let n of i)t[e].add(n)}}return!e.def.unionFallback&&i>1&&t[e.def.discriminator]?.delete(void 0),t})),t.options.forEach(((e,i)=>{let n=h(e._zod.def);if(n&&!Object.prototype.hasOwnProperty.call(n,t.discriminator))throw Error(`Invalid discriminated union option at index "${i}"`)}));let n=l((()=>function(e){let t=new Map;for(let i of e.options){let n=i._zod.propValues?.[e.discriminator];if(!n||0===n.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let e of n)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${e+""}"`);t.set(e,null)}else t.set(e,i)}return t}(t)));e._zod.parse=(r,o)=>{let a=r.value;if(!I(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=a?.[t.discriminator],d=n.value.get(s);return!d||void 0===s&&"backward"===o.direction?t.unionFallback||"backward"===o.direction?i(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter((e=>null!==n.value.get(e))),input:a,path:[t.discriminator],inst:e}),r):d._zod.run(r,o)}})),$i=oe("$ZodIntersection",((e,t)=>{gt.init(e,t),e._zod.parse=(e,i)=>{let n=e.value,r=t.left._zod.run({value:n,issues:[]},i),o=t.right._zod.run({value:n,issues:[]},i);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then((([t,i])=>Ei(e,t,i))):Ei(e,r,o)}}));function Ii(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(k(e)&&k(t)){let i=Object.keys(t),n=Object.keys(e).filter((e=>-1!==i.indexOf(e))),r={...e,...t};Object.prototype.hasOwnProperty.call(r,"__proto__")&&delete r.__proto__;for(let i of n){if("__proto__"===i)continue;let n=Ii(e[i],t[i]);if(!n.valid)return{valid:!1,mergeErrorPath:[i,...n.mergeErrorPath]};r[i]=n.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let n=0;n<e.length;n++){let r=Ii(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i.push(r.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Ei(e,t,i){let n,r=new Map,o=new Map,a=(e,t)=>{let i;if("unrecognized_keys"!==e.code||e.path?.length){if("invalid_key"!==e.code||"record"!==e.origin||1!==e.path?.length)return!1;{let t=e.path[0]+"";o.has(t)||o.set(t,e),i=[t]}}else n??=e,i=e.keys;for(let e of i)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let i of t.issues)a(i,"l")||e.issues.push(i);for(let t of i.issues)a(t,"r")||e.issues.push(t);let s=[...r].filter((([,e])=>e.l&&e.r)).map((([e])=>e));if(s.length){let t=n?s.filter((e=>n.keys.includes(e))):[];t.length&&e.issues.push({...n,keys:t});for(let i of s)!t.includes(i)&&o.has(i)&&e.issues.push(o.get(i))}let d=Ii(t.value,i.value);if(!d.valid){if(M(e))return e;throw Error("Unmergable intersection. Error path: "+JSON.stringify(d.mergeErrorPath))}return e.value=d.data,e}const ki=oe("$ZodRecord",((e,t)=>{gt.init(e,t);let i=de.memoizer;i?.attach(e),e._zod.parse=(n,r)=>{let o=n.value;if(!k(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){n.value=i?i.alloc(e,n,{},r):{};let d,c=new Set;for(let i of s)if("string"==typeof i||"number"==typeof i||"symbol"==typeof i){if(c.add("number"==typeof i?""+i:i),"__proto__"===i)continue;let s=t.keyType._zod.run({value:i,issues:[]},r);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map((e=>B(e,r,ce()))),input:i,path:[i],inst:e});continue}let d=s.value;if("__proto__"===d)continue;let l=t.valueType._zod.run({value:o[i],issues:[]},r);l instanceof Promise?a.push(l.then((e=>{e.issues.length&&n.issues.push(...L(i,e.issues)),n.value[d]=e.value}))):(l.issues.length&&n.issues.push(...L(i,l.issues)),n.value[d]=l.value)}for(let e in o)if(!c.has(e))if("loose"===t.mode){if("__proto__"===e)continue;n.value[e]=o[e]}else d??=[],d.push(e);d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d,continue:!0})}else{let d;n.value=i?i.alloc(e,n,{},r):{};for(let i of Reflect.ownKeys(o)){if("__proto__"===i||!Object.prototype.propertyIsEnumerable.call(o,i))continue;let c=t.keyType._zod.run({value:i,issues:[]},r);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof i&&ze.test(i)&&c.issues.length){let e=t.keyType._zod.run({value:Number(i),issues:[]},r);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(c=e)}if(c.issues.length){"loose"===t.mode?n.value[i]=o[i]:s?(d??=[],d.push(i)):n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map((e=>B(e,r,ce()))),input:i,path:[i],inst:e});continue}let l=c.value;if("__proto__"===l)continue;let u=t.valueType._zod.run({value:o[i],issues:[]},r);u instanceof Promise?a.push(u.then((e=>{e.issues.length&&n.issues.push(...L(i,e.issues)),n.value[l]=e.value}))):(u.issues.length&&n.issues.push(...L(i,u.issues)),n.value[l]=u.value)}d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d,continue:!0})}return a.length?Promise.all(a).then((()=>n)):n}})),Ti=oe("$ZodEnum",((e,t)=>{gt.init(e,t);let i=a(t.entries),n=new Set(i);e._zod.values=n,ee(e,"pattern",(e=>{let t=a(e.def.entries).filter((e=>A.has(typeof e)));return RegExp(t.length?`^(${t.map((e=>x(""+e))).join("|")})$`:"^[^\\s\\S]$")})),e._zod.parse=t=>{let r=t.value;return n.has(r)||t.issues.push({code:"invalid_value",values:i,input:r,inst:e}),t}})),Ai=oe("$ZodLiteral",((e,t)=>{gt.init(e,t);let i=new Set(t.values);e._zod.values=i,ee(e,"pattern",(e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map((e=>"string"==typeof e?x(e):e?x(""+e):e+"")).join("|")})$`:"^[^\\s\\S]$")})),e._zod.parse=n=>{let r=n.value;return i.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}})),xi=oe("$ZodTransform",((e,t)=>{gt.init(e,t),e._zod.optin="optional",de.memoizer?.guard(e),e._zod.parse=(i,n)=>{if("backward"===n.direction)throw new se(e.constructor.name);let r=t.transform(i.value,i);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then((e=>(i.value=e,i)));if(r instanceof Promise)throw new ae;return i.value=r,i}}));function Si(e,t){return e.value=t.issues.length?void 0:t.value,e}const Di=oe("$ZodOptional",((e,t)=>{gt.init(e,t),ee(e,"optin",(e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional")),e._zod.optout="optional",ee(e,"values",(e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0})),ee(e,"pattern",(e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${u(t.source)})?$`):void 0})),e._zod.parse=(e,i)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let n=t.innerType._zod.run({value:e.value,issues:[]},i);return n instanceof Promise?n.then((t=>Si(e,t))):Si(e,n)}return t.innerType._zod.run(e,i)}})),Oi=oe("$ZodExactOptional",((e,t)=>{Di.init(e,t),ee(e,"values",(e=>e.def.innerType._zod.values)),ee(e,"pattern",(e=>e.def.innerType._zod.pattern)),e._zod.parse=(e,i)=>t.innerType._zod.run(e,i)})),Ci=oe("$ZodNullable",((e,t)=>{gt.init(e,t),ee(e,"optin",(e=>e.def.innerType._zod.optin)),ee(e,"optout",(e=>e.def.innerType._zod.optout)),ee(e,"pattern",(e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${u(t.source)}|null)$`):void 0})),ee(e,"values",(e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0)),e._zod.parse=(e,i)=>null===e.value?e:t.innerType._zod.run(e,i)})),Pi=oe("$ZodDefault",((e,t)=>{gt.init(e,t),e._zod.optin="defaulted",ee(e,"values",(e=>e.def.innerType._zod.values)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then((e=>_i(e,t))):_i(n,t)}}));function _i(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Ri=oe("$ZodPrefault",((e,t)=>{gt.init(e,t),e._zod.optin="defaulted",ee(e,"values",(e=>e.def.innerType._zod.values)),e._zod.parse=(e,i)=>("backward"===i.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,i))})),Ni=oe("$ZodNonOptional",((e,t)=>{gt.init(e,t),ee(e,"values",(e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter((e=>void 0!==e))):void 0})),e._zod.parse=(i,n)=>{let r=t.innerType._zod.run(i,n);return r instanceof Promise?r.then((t=>Mi(t,e))):Mi(r,e)}}));function Mi(e,t){return!e.issues.length&&void 0===e.value&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Ui(e,t,i,n){return t.issues.length?(e.value=i.catchValue({...t,value:e.value,error:{issues:t.issues.map((e=>B(e,n,ce())))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Li=oe("$ZodCatch",((e,t)=>{gt.init(e,t),ee(e,"optin",(e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional")),ee(e,"optout",(e=>e.def.innerType._zod.optout)),ee(e,"values",(e=>e.def.innerType._zod.values)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);let n=t.innerType._zod.run({value:e.value,issues:[]},i);return n instanceof Promise?n.then((n=>Ui(e,n,t,i))):Ui(e,n,t,i)}})),ji=oe("$ZodPipe",((e,t)=>{gt.init(e,t),ee(e,"values",(e=>e.def.in._zod.values)),ee(e,"optin",(e=>e.def.in._zod.optin)),ee(e,"optout",(e=>e.def.out._zod.optout)),ee(e,"propValues",(e=>e.def.in._zod.propValues)),e._zod.parse=(e,i)=>{if("backward"===i.direction){let n=t.out._zod.run(e,i);return n instanceof Promise?n.then((e=>qi(e,t.in,i))):qi(n,t.in,i)}let n=t.in._zod.run(e,i);return n instanceof Promise?n.then((e=>qi(e,t.out,i))):qi(n,t.out,i)}}));function qi(e,t,i){return e.issues.some((e=>"unrecognized_keys"!==e.code))?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}const Gi=oe("$ZodPreprocess",((e,t)=>{ji.init(e,t)})),Bi=oe("$ZodReadonly",((e,t)=>{gt.init(e,t),ee(e,"propValues",(e=>e.def.innerType._zod.propValues)),ee(e,"values",(e=>e.def.innerType._zod.values)),ee(e,"optin",(e=>e.def.innerType?._zod?.optin)),ee(e,"optout",(e=>e.def.innerType?._zod?.optout)),e._zod.parse=(e,i)=>{if("backward"===i.direction)return t.innerType._zod.run(e,i);let n=t.innerType._zod.run(e,i);return n instanceof Promise?n.then(Fi):Fi(n)}}));function Fi(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Vi=oe("$ZodLazy",((e,t)=>{gt.init(e,t),function(e,t,i){let n;Object.defineProperty(e,t,{get(){if(n!==p)return void 0===n&&(n=p,n=i()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}(e._zod,"innerType",(()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner})),ee(e,"pattern",(e=>e.innerType?._zod?.pattern)),ee(e,"propValues",(e=>e.innerType?._zod?.propValues)),ee(e,"optin",(e=>e.innerType?._zod?.optin??void 0)),ee(e,"optout",(e=>e.innerType?._zod?.optout??void 0)),e._zod.parse=(t,i)=>e._zod.innerType._zod.run(t,i)})),zi=oe("$ZodCustom",((e,t)=>{Je.init(e,t),gt.init(e,t),e._zod.parse=e=>e,e._zod.check=i=>{let n=i.value,r=t.fn(n);if(r instanceof Promise)return r.then((t=>Wi(t,i,n,e)));Wi(r,i,n,e)}}));function Wi(e,t,i,n){if(!e){let e={code:"custom",input:i,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(W(e))}}var Yi=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}};const Zi="~memo",Hi=[];function Ki(e){return"object"==typeof e&&!!e}function Ji(e){return e.map((e=>e.path?{...e,path:e.path.slice()}:{...e}))}const Qi=new WeakMap;function Xi(e,t){let i=Qi.get(e);if(void 0!==i)return i?2:0;if(t.has(e))return 2;t.add(e);let n=0,r=e=>{if(2!==n&&e?._zod){let i=Xi(e,t);i>n&&(n=i)}},o=e=>{e>n&&(n=e)},a=e._zod.def;switch(a.type){case"object":{let e=h(a);o(e?(e=>{let i=0;for(let n of Reflect.ownKeys(e)){let r=Object.getOwnPropertyDescriptor(e,n);if(!r.enumerable)continue;let o=r.get?1:r.value?._zod?Xi(r.value,t):0;o>i&&(i=o)}return i})(e):1),r(a.catchall);break}case"array":r(a.element);break;case"tuple":for(let e of a.items)r(e);r(a.rest);break;case"record":case"map":r(a.keyType),r(a.valueType);break;case"set":r(a.valueType);break;case"union":for(let e of a.options)r(e);break;case"intersection":r(a.left),r(a.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":r(a.innerType);break;case"pipe":r(a.in),r(a.out);break;case"function":r(a.input),r(a.output);break;case"lazy":{let e=a._cachedInner??void 0;o(e?Xi(e,t):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let i=t.value;if(i&&"object"==typeof i)if(i._zod)r(i);else if(Array.isArray(i))for(let e of i)r(e)}}return t.delete(e),function(e,t){return 1!==t&&Qi.set(e,2===t),t}(e,n)}let en;const tn=[],nn={alloc(e,t,i){let n=en;if(!n)return i;en=void 0;let r={value:i,issues:null};return n.set(t.value,r),tn.push(r),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push((()=>{let t=e._zod.parse,i=(e,i)=>{if("backward"!==i.direction&&function(e,t){let i=e[Zi]?.backEdges;return void 0!==i&&Ki(t)&&i.has(t)}(i,e.value))throw new Yi;return t(e,i)};e._zod.parse=i,e._zod.run===t&&(e._zod.run=i)}))},attach(e){var t;let i,n,r,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push((()=>{let t=e._zod.parse,a=(s,d)=>{if(void 0===i){let n=Xi(e,new Set);if(0===n)return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(s,d);2===n||o?i=!0:o=!0}let c=s.value;if(!Ki(c))return t(s,d);let l,u=d[Zi];u||(u={buckets:new WeakMap,backEdges:void 0},d[Zi]=u),n===d?l=r:(l=function(e,t){let i=e.buckets.get(t);return i||(i=new WeakMap,e.buckets.set(t,i)),i}(u,e),n=d,r=l);let p=l.get(c);if(p)return s.value=p.value,p.issues?p.issues.length&&s.issues.push(...Ji(p.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(p.value)),s;en=l;let m=tn.length,h=t(s,d);en=void 0;let f=tn.length>m?tn.pop():void 0;return h instanceof Promise?h.then((e=>(f&&(f.issues=e.issues.length?Ji(e.issues):Hi),e))):(f&&(f.issues=h.issues.length?Ji(h.issues):Hi),h)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)}))}},rn=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}let i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function r(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?n[e]??e:t+""}return e=>{switch(e.code){case"invalid_type":return`Invalid input: expected ${r(e.expected)}, received ${r(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}(e.input),e.input)}`;case"invalid_value":return 1===e.values.length?"Invalid input: expected "+O(e.values[0]):"Invalid option: expected one of "+s(e.values,"|");case"too_big":{let i=e.exact?"exactly ":e.inclusive?"<=":"<",n=t(e.origin);return n?`Too big: expected ${e.origin??"value"} to have ${i}${""+e.maximum} ${n.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${i}${""+e.maximum}`}case"too_small":{let i=e.exact?"exactly ":e.inclusive?">=":">",n=t(e.origin);return n?`Too small: expected ${e.origin} to have ${i}${""+e.minimum} ${n.unit}`:`Too small: expected ${e.origin} to be ${i}${""+e.minimum}`}case"invalid_format":return"starts_with"===e.format?`Invalid string: must start with "${e.prefix}"`:"ends_with"===e.format?`Invalid string: must end with "${e.suffix}"`:"includes"===e.format?`Invalid string: must include "${e.includes}"`:"regex"===e.format?"Invalid string: must match pattern "+e.pattern:"Invalid "+(i[e.format]??e.format);case"not_multiple_of":return"Invalid number: must be a multiple of "+e.divisor;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${s(e.keys,", ")}`;case"invalid_key":return"Invalid key in "+e.origin;case"invalid_union":return e.options&&Array.isArray(e.options)&&e.options.length>0?"Invalid discriminator value. Expected "+e.options.map((e=>`'${e}'`)).join(" | "):!1===e.inclusive?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return"Invalid value in "+e.origin;default:return"Invalid input"}}};var on;(on=globalThis).__zod_globalRegistry??(on.__zod_globalRegistry=new class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let i=t[0];return this._map.set(e,i),i&&"object"==typeof i&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let i={...this.get(t)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});const an=globalThis.__zod_globalRegistry;function sn(e){return e.checks&&=[...e.checks],e}function dn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...D(t)})}function cn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...D(t)})}function ln(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...D(t)})}function un(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...D(t)})}function pn(e,t){return new e({type:"string",format:"date",check:"string_format",...D(t)})}function mn(e,t){return new et({check:"less_than",...D(t),value:e,inclusive:!1})}function hn(e,t){return new et({check:"less_than",...D(t),value:e,inclusive:!0})}function fn(e,t){return new tt({check:"greater_than",...D(t),value:e,inclusive:!1})}function yn(e,t){return new tt({check:"greater_than",...D(t),value:e,inclusive:!0})}function gn(e,t){return new it({check:"multiple_of",...D(t),value:e})}function vn(e,t){return new rt({check:"max_length",...D(t),maximum:e})}function bn(e,t){return new ot({check:"min_length",...D(t),minimum:e})}function wn(e,t){return new at({check:"length_equals",...D(t),length:e})}function $n(e){return new ht({check:"overwrite",tx:e})}function In(e,...t){for(let i of t)for(let t of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,t)&&m(e,t,i[t]);return e}function En(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??an,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function kn(e,t,i,n,r){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:n.path,message:r}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(r);return Object.assign(i,o),!0}function Tn(e,t,i={path:[],schemaPath:[]}){var n;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,i.schemaPath.includes(e)&&(o.cycle=i.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let n={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,n);else{let i=a.schema,o=t.processors[r.type];if(!o)throw Error("[toJSONSchema]: Non-representable type encountered: "+r.type);o(e,t,i,n)}let o=e._zod.parent;o&&(a.ref||=o,Tn(o,t,n),t.seen.get(o).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&In(a.schema,d),"input"===t.io&&Nn(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function An(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function xn(e,t){let i=e.seen.get(t);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let t of e.seen.entries()){let i=e.metadataRegistry.get(t[0])?.id;if(i){let e=n.get(i);if(e&&e!==t[0])throw Error(`Duplicate schema id "${i}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(i,t[0])}}let r=t=>{let n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let i=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(i)return{ref:r(i)};let o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${r("__shared")}#/${n}/${An(o)}`}}let r=`#/${n}/`;if(t[1]===i&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:r+An(o)}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:i,defId:n}=r(e);t.def={...t.schema},n&&(t.defId=n);let o=t.schema;for(let e in o)delete o[e];o.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let n=i[1];if(t!==i[0]){if(e.external){let n=e.external.registry.get(i[0])?.id;if(t!==i[0]&&n){o(i);continue}}(e.metadataRegistry.get(i[0])?.id||n.cycle||n.count>1&&"ref"===e.reused)&&o(i)}else o(i)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Sn(e){let t=e.anyOf;if(!Array.isArray(t)||0===t.length||void 0!==e.type)return;let i=[];for(let e of t){if(!e||"object"!=typeof e)return;Sn(e);let t=Object.keys(e);if(1!==t.length||"type"!==t[0])return;let n=e.type;for(let e of Array.isArray(n)?n:[n]){if("string"!=typeof e)return;i.includes(e)||i.push(e)}}delete e.anyOf,e.type=1===i.length?i[0]:i}const Dn=new Set(["type","properties","required","additionalProperties"]),On=["oneOf","anyOf"];function Cn(e){let t=e.additionalProperties;return void 0!==t&&!1!==t&&"object"==typeof t&&t&&Object.keys(t).length?t:null}function Pn(e){let t=[];for(let i of e){if("object"!=typeof i||"object"!==i.type)return null;for(let e in i)if(!Dn.has(e))return null;t.push(i)}let i={},n=new Set;for(let e of t){for(let n in e.properties){if(Object.prototype.hasOwnProperty.call(i,n))continue;let e=[];for(let i of t){let t=i.properties?.[n]??Cn(i);null!=t&&(e.some((e=>JSON.stringify(e)===JSON.stringify(t)))||e.push(t))}m(i,n,1===e.length?e[0]:Pn(e)??{allOf:e})}for(let t of e.required??[])n.add(t)}let r={type:"object",properties:i};if(n.size&&(r.required=[...n]),t.every((e=>!1===e.additionalProperties)))r.additionalProperties=!1;else{let e=[];for(let i of t){let t=Cn(i);t&&!e.some((e=>JSON.stringify(e)===JSON.stringify(t)))&&e.push(t)}1===e.length?r.additionalProperties=e[0]:e.length>1&&(r.additionalProperties={allOf:e})}return r}function _n(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Dn)if(t in e)return;let i=t.filter((e=>On.some((t=>Array.isArray(e[t]))))),n=null;if(i.length){let e=i[0],r=On.find((t=>Array.isArray(e[t])));if(1!==Object.keys(e).length)return;let o=t.filter((t=>t!==e)),a=e[r].map((e=>Pn([...o,e])));if(a.some((e=>!e)))return;n={[r]:a}}else n=Pn(t);n&&(delete e.allOf,In(e,n))}function Rn(e,t){let i=e.seen.get(t);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let i=e.seen.get(t);if(null===i.ref)return;let r=i.def??i.schema,o={...r},a=i.ref;if(i.ref=null,a){n(a);let i=e.seen.get(a),s=i.schema;if(!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?In(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),In(r,o),t._zod.parent===a)for(let e in r)"$ref"===e||"allOf"===e||e in o||delete r[e];if(s.$ref&&i.def)for(let e in r)"$ref"===e||"allOf"===e||e in i.def&&JSON.stringify(r[e])===JSON.stringify(i.def[e])&&delete r[e]}let s=t._zod.parent;if(s&&s!==a){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(let e in r)"$ref"===e||"allOf"===e||e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:i.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())n(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())Sn(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let i of e.seen.values())for(let e of[i.schema,i.def]){let i=e?.allOf;if(!Array.isArray(i))continue;let n=t.get(i);n?n.push(e):t.set(i,[e])}for(let i of e.intersections)for(let e of t.get(i)??[])_n(e)}}let r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target&&(r.$schema="http://json-schema.org/draft-04/schema#"),e.external?.uri){let i=e.external.registry.get(t)?.id;if(!i)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(i)}In(r,i.defId?i.schema:i.def??i.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&r.id===o&&delete r.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,m(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?r.$defs=a:r.definitions=a);try{let i=JSON.parse(JSON.stringify(r));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Mn(t,"input",e.processors),output:Mn(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw Error("Error converting schema to JSON.")}}function Nn(e,t){let i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);let n=e._zod.def;if("transform"===n.type)return!0;if("array"===n.type)return Nn(n.element,i);if("set"===n.type)return Nn(n.valueType,i);if("lazy"===n.type)return Nn(n.getter(),i);if("promise"===n.type||"optional"===n.type||"nonoptional"===n.type||"nullable"===n.type||"readonly"===n.type||"default"===n.type||"prefault"===n.type||"catch"===n.type)return Nn(n.innerType,i);if("intersection"===n.type)return Nn(n.left,i)||Nn(n.right,i);if("record"===n.type||"map"===n.type)return Nn(n.keyType,i)||Nn(n.valueType,i);if("pipe"===n.type)return!!e._zod.traits.has("$ZodCodec")||Nn(n.in,i)||Nn(n.out,i);if("object"===n.type){for(let e in n.shape)if(Nn(n.shape[e],i))return!0;return!1}if("union"===n.type){for(let e of n.options)if(Nn(e,i))return!0;return!1}if("tuple"===n.type){for(let e of n.items)if(Nn(e,i))return!0;return!(!n.rest||!Nn(n.rest,i))}return!1}const Mn=(e,t,i={})=>n=>{let{libraryOptions:r,target:o}=n??{},a=En({...r??{},target:o,io:t,processors:i});return Tn(e,a),xn(a,e),Rn(a,e)},Un=(e,t,i)=>{(void 0===e[t]||i>e[t])&&(e[t]=i)},Ln=(e,t,i)=>{(void 0===e[t]||i<e[t])&&(e[t]=i)},jn=(e,t)=>{Un(e,"minimum",t),Ln(e,"maximum",t)},qn=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Gn=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Bn=(e,t)=>{e.mime=e.mime?e.mime.filter((e=>t.includes(e))):[...t]},Fn=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},Vn=(e,t)=>Un(e,"minimum",t.minimum),zn=(e,t)=>Ln(e,"maximum",t.maximum),Wn=e=>(t,i)=>{Fn(t,i.format);let[n,r]=e[i.format];Un(t,"minimum",n),Ln(t,"maximum",r)},Yn={greater_than:(e,t)=>Un(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Ln(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>qn(e,t.value),number_format:Wn(C),bigint_format:Wn(P),min_length:Vn,max_length:zn,length_equals:(e,t)=>jn(e,t.length),min_size:Vn,max_size:zn,size_equals:(e,t)=>jn(e,t.size),string_format:(e,t)=>{Fn(e,t.format),t.pattern&&Gn(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>Bn(e,t.mime)};function Zn(e){let t={},i=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...i.checks??[]]:i.checks??[];for(let e of n)Yn[e._zod.def.check]?.(t,e._zod.def);let r=e._zod.bag;void 0!==r.minimum&&Un(t,"minimum",r.minimum),void 0!==r.exclusiveMinimum&&Un(t,"exclusiveMinimum",r.exclusiveMinimum),void 0!==r.maximum&&Ln(t,"maximum",r.maximum),void 0!==r.exclusiveMaximum&&Ln(t,"exclusiveMaximum",r.exclusiveMaximum),void 0!==r.multipleOf&&qn(t,r.multipleOf),void 0!==r.format&&(t.format??=r.format,r.format.includes("int")&&(t.isInt=!0)),r.mime&&Bn(t,r.mime);for(let e of r.patterns??[])Gn(t,e);return t}const Hn={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kn=new Map([[Yt,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[Ht,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),Jn=e=>Kn.get(e)??e,Qn=(e,t,i)=>{let n=a(e._zod.def.entries);0!==n.length?(n.every((e=>"number"==typeof e))&&(i.type="number"),n.every((e=>"string"==typeof e))&&(i.type="string"),i.enum=n):i.not={}};function Xn(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?Xn(t.out):"catch"===t.type?Xn(t.innerType):e._zod.optin}function er(e,t,i){if(t.$ref){if(i.has(t))return t;i.add(t);let n=e.get(t)?.def;if(!n)return t;let r=er(e,n,i);return r===n?t:r}for(let n of["anyOf","oneOf"]){let r=t[n];if(!Array.isArray(r))continue;let o=r.map((t=>er(e,t,i)));o.some(((e,t)=>e!==r[t]))&&(t={...t,[n]:o})}let n=Array.isArray(t.type)?t.type:[t.type],r=!n.includes("string")&&n.some((e=>"number"===e||"integer"===e)),o=t.enum??(void 0===t.const?void 0:[t.const]);if(!r&&!o?.some((e=>"number"==typeof e)))return t;let{minimum:a,maximum:s,exclusiveMinimum:d,exclusiveMaximum:c,multipleOf:l,format:u,id:p,...m}=t;return m.enum?m.enum=m.enum.map((e=>"number"==typeof e?e+"":e)):"number"==typeof m.const&&(m.const=m.const+""),r?(m.type="string",o||(m.pattern=(n.includes("number")?ze:Ve).source),m):m}const tr=new WeakMap,ir=Symbol();function nr(e,t,i,n,r){let o=!1,a=JSON.stringify(e,((e,t)=>"bigint"==typeof t?(o=!0,null):t));return o?(kn(t,i,n,r,"BigInt defaults cannot be represented in JSON Schema"),ir):JSON.parse(a)}const rr=(e,t,i,n)=>{let r=e._zod.def;Tn(r.innerType,t,n),t.seen.get(e).ref=r.innerType},or=new WeakSet([Object.prototype,Error.prototype]);function ar(e,t,i){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=i(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const sr=oe("ZodError",((e,t)=>{he.init(e,t),e.name="ZodError";let i=Object.getPrototypeOf(e);or.has(i)||(or.add(i),ar(i,"format",(e=>t=>function(e,t=e=>e.message){let i={_errors:[]},n=(e,r=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map((e=>n({issues:e},[...r,...o.path])));else if("invalid_key"===o.code)n({issues:o.issues},[...r,...o.path]);else if("invalid_element"===o.code)n({issues:o.issues},[...r,...o.path]);else{let e=[...r,...o.path];if(0===e.length)i._errors.push(t(o));else{let n=i,r=0;for(;r<e.length;){let i=e[r],a=r===e.length-1;if("_errors"===i){a&&n._errors.push(t(o)),r++;continue}Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=n[i];a&&s._errors.push(t(o)),n=s,r++}}}};return n(e),i}(e,t))),ar(i,"flatten",(e=>t=>function(e,t=e=>e.message){let i={},n=[];for(let r of e.issues)r.path.length>0?fe(i,r.path[0],(()=>[])).push(t(r)):n.push(t(r));return{formErrors:n,fieldErrors:i}}(e,t))),ar(i,"addIssue",(e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)})),ar(i,"addIssues",(e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)})),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))}),void 0,{Parent:Error}),dr=ge(sr),cr=ve(sr),lr=be(sr),ur=$e(sr),pr=(()=>{let e=ge(sr),t=(i,n,r,o)=>e(i,n,r?{...r,direction:"backward"}:{direction:"backward"},ye(t,o));return t})(),mr=(()=>{let e=ge(sr),t=(i,n,r,o)=>e(i,n,r,ye(t,o));return t})(),hr=(()=>{let e=ve(sr),t=async(i,n,r,o)=>await e(i,n,r?{...r,direction:"backward"}:{direction:"backward"},ye(t,o));return t})(),fr=(()=>{let e=ve(sr),t=async(i,n,r,o)=>await e(i,n,r,ye(t,o));return t})(),yr=(e=>(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return be(e)(t,i,r)})(sr),gr=(e=>(t,i,n)=>be(e)(t,i,n))(sr),vr=(e=>async(t,i,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return $e(e)(t,i,r)})(sr),br=(e=>async(t,i,n)=>$e(e)(t,i,n))(sr);function wr(){de.memoizer||ce({memoizer:nn})}const $r=oe("ZodType",((e,t)=>(de.localeError||ce({localeError:rn()}),gt.init(e,t),e.def=t,e.type=t.type,e)),{check(...e){let t=this.def;return this.clone(b(t,{checks:[...t.checks??[],...e.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return S(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,i){return new Ho({type:"custom",check:"custom",fn:t,...D(i)})}(0,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return function(e,t){let i=function(e,t){let i=new Je({check:"custom",...D(t)});return i._zod.check=e,i}((t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(W(e,t.value,i._zod.def));else{let n=e;n.fatal&&(n.continue=!1),n.code??="custom","input"in n||(n.input=t.value),n.inst??=i,n.continue??=!i._zod.def.abort,t.issues.push(W(n))}},e(t.value,t))),t);return i}(e,t)}(e,t))},overwrite(e){return this.check($n(e))},optional(){return Mo(this)},exactOptional(){return function(e){return new Uo({type:"optional",innerType:e})}(this)},nullable(){return jo(this)},nullish(){return Mo(jo(this))},nonoptional(e){return function(e,t){return new Bo({type:"nonoptional",innerType:e,...D(t)})}(this,e)},array(){return vo(this)},or(e){return Eo([this,e])},and(e){return function(e,t){return new Ao({type:"intersection",left:e,right:t})}(this,e)},transform(e){return zo(this,Ro(e))},default(e){return function(e,t){return new qo({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():T(t)}})}(this,e)},prefault(e){return function(e,t){return new Go({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():T(t)}})}(this,e)},catch(e){return function(e,t){return new Fo({type:"catch",innerType:e,catchValue:"function"==typeof t?t:te(t)})}(this,e)},pipe(e){return zo(this,e)},readonly(){return function(e){return new Yo({type:"readonly",innerType:e})}(this)},describe(e){let t=this.clone();return an.add(t,{description:e}),t},meta(...e){if(0===e.length)return an.get(this);let t=this.clone();return an.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return Z(this,"~standard",{...bt(this),jsonSchema:{input:Mn(this,"input"),output:Mn(this,"output")}})},set"~standard"(e){Y(this,"~standard",e)},parse:function e(t,i){return dr(this,t,i,{callee:e})},parseAsync:async function e(t,i){return await cr(this,t,i,{callee:e})},safeParse(e,t){return lr(this,e,t)},async safeParseAsync(e,t){return ur(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Y(this,"spa",e)},validate(e,t){return((e,t,i)=>{let n=e._zod.bag.validator;if(void 0!==n){if(n(t)!==Ie)return!0;if(!0===n.definite&&void 0===i)return!1}return function(e,t,i){let n,r=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(r[Ee]=!0,n=o({value:t,issues:[]},r)):n=e._zod.run({value:t,issues:[]},r),n instanceof Promise)throw new ae;return 0===n.issues.length}(e,t,i)})(this,e,t)},validateAsync(e,t){return(async(e,t,i)=>{let n=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},r=e._zod.run({value:t,issues:[]},n);return r instanceof Promise&&(r=await r),0===r.issues.length})(this,e,t)},encode:function e(t,i){return pr(this,t,i,{callee:e})},decode:function e(t,i){return mr(this,t,i,{callee:e})},encodeAsync:async function e(t,i){return await hr(this,t,i,{callee:e})},decodeAsync:async function e(t,i){return await fr(this,t,i,{callee:e})},safeEncode(e,t){return yr(this,e,t)},safeDecode(e,t){return gr(this,e,t)},async safeEncodeAsync(e,t){return vr(this,e,t)},async safeDecodeAsync(e,t){return br(this,e,t)},toJSONSchema(e){return((e,t={})=>i=>{let n=En({...i,processors:t});return Tn(e,n),xn(n,e),Rn(n,e)})(this,{})(e)},get description(){return an.get(this)?.description},get _def(){return this._zod.def}}),Ir=oe("_ZodString",((e,t)=>{wt.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i)=>((e,t,i)=>{let n=i;n.type="string";let{minimum:r,maximum:o,format:a,patterns:s,contentEncoding:d,laxFormat:c}=Zn(e);if("number"==typeof r&&(n.minLength=r),"number"==typeof o&&(n.maxLength=o),a&&(n.format=Hn[a]??a,""===n.format&&delete n.format,("time"===a||c)&&delete n.format),d&&(n.contentEncoding=d),s&&s.size>0){let e=[...s].map(Jn);1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map((e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source})))])}})(e,t,i)}),H({format:e=>Zn(e).format??null,minLength:e=>Zn(e).minimum??null,maxLength:e=>Zn(e).maximum??null},{regex(...e){return this.check(function(e,t){return new dt({check:"string_format",format:"regex",...D(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new ut({check:"string_format",format:"includes",...D(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new pt({check:"string_format",format:"starts_with",...D(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new mt({check:"string_format",format:"ends_with",...D(t),suffix:e})}(...e))},min(...e){return this.check(bn(...e))},max(...e){return this.check(vn(...e))},length(...e){return this.check(wn(...e))},nonempty(...e){return this.check(bn(1,...e))},lowercase(e){return this.check(function(e){return new ct({check:"string_format",format:"lowercase",...D(e)})}(e))},uppercase(e){return this.check(function(e){return new lt({check:"string_format",format:"uppercase",...D(e)})}(e))},trim(){return this.check($n((e=>e.trim())))},normalize(...e){return this.check(function(e){return $n((t=>t.normalize(e)))}(...e))},toLowerCase(){return this.check($n((e=>e.toLowerCase())))},toUpperCase(){return this.check($n((e=>e.toUpperCase())))},slugify(){return this.check($n((e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))))}})),Er=oe("ZodString",((e,t)=>{wt.init(e,t),Ir.init(e,t)}),{email(e){return this.check(dn(Or,e))},url(e){return this.check(ln(Rr,e))},jwt(e){return this.check(function(e,t){return new Kr({type:"string",format:"jwt",check:"string_format",abort:!1,...D(t)})}(0,e))},emoji(e){return this.check(function(e,t){return new Mr({type:"string",format:"emoji",check:"string_format",abort:!1,...D(t)})}(0,e))},guid(e){return this.check(function(e,t){return new Pr({type:"string",format:"guid",check:"string_format",abort:!1,...D(t)})}(0,e))},uuid(e){return this.check(cn(_r,e))},uuidv4(e){return this.check(function(e,t){return new _r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...D(t)})}(0,e))},uuidv6(e){return this.check(function(e,t){return new _r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...D(t)})}(0,e))},uuidv7(e){return this.check(function(e,t){return new _r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...D(t)})}(0,e))},nanoid(e){return this.check(function(e,t){return new Ur({type:"string",format:"nanoid",check:"string_format",abort:!1,...D(t)})}(0,e))},cuid(e){return this.check(function(e,t){return new Lr({type:"string",format:"cuid",check:"string_format",abort:!1,...D(t)})}(0,e))},cuid2(e){return this.check(function(e,t){return new jr({type:"string",format:"cuid2",check:"string_format",abort:!1,...D(t)})}(0,e))},ulid(e){return this.check(function(e,t){return new qr({type:"string",format:"ulid",check:"string_format",abort:!1,...D(t)})}(0,e))},base64(e){return this.check(function(e,t){return new Yr({type:"string",format:"base64",check:"string_format",abort:!1,...D(t)})}(0,e))},base64url(e){return this.check(function(e,t){return new Zr({type:"string",format:"base64url",check:"string_format",abort:!1,...D(t)})}(0,e))},xid(e){return this.check(function(e,t){return new Gr({type:"string",format:"xid",check:"string_format",abort:!1,...D(t)})}(0,e))},ksuid(e){return this.check(function(e,t){return new Br({type:"string",format:"ksuid",check:"string_format",abort:!1,...D(t)})}(0,e))},ipv4(e){return this.check(function(e,t){return new Fr({type:"string",format:"ipv4",check:"string_format",abort:!1,...D(t)})}(0,e))},ipv6(e){return this.check(function(e,t){return new Vr({type:"string",format:"ipv6",check:"string_format",abort:!1,...D(t)})}(0,e))},cidrv4(e){return this.check(function(e,t){return new zr({type:"string",format:"cidrv4",check:"string_format",abort:!1,...D(t)})}(0,e))},cidrv6(e){return this.check(function(e,t){return new Wr({type:"string",format:"cidrv6",check:"string_format",abort:!1,...D(t)})}(0,e))},e164(e){return this.check(function(e,t){return new Hr({type:"string",format:"e164",check:"string_format",abort:!1,...D(t)})}(0,e))},datetime(e){return this.check(un(Ar,e))},date(e){return this.check(pn(xr,e))},time(e){return this.check(function(e,t){return new Sr({type:"string",format:"time",check:"string_format",precision:null,...D(t)})}(0,e))},duration(e){return this.check(function(e,t){return new Dr({type:"string",format:"duration",check:"string_format",...D(t)})}(0,e))}});function kr(e){return function(e,t){return new Er(sn({type:"string",...D(t)}))}(0,e)}const Tr=oe("ZodStringFormat",((e,t)=>{$t.init(e,t),Ir.init(e,t)})),Ar=oe("ZodISODateTime",((e,t)=>{Mt.init(e,t),Tr.init(e,t)})),xr=oe("ZodISODate",((e,t)=>{Ut.init(e,t),Tr.init(e,t)})),Sr=oe("ZodISOTime",((e,t)=>{Lt.init(e,t),Tr.init(e,t)})),Dr=oe("ZodISODuration",((e,t)=>{jt.init(e,t),Tr.init(e,t)})),Or=oe("ZodEmail",((e,t)=>{kt.init(e,t),Tr.init(e,t)}));function Cr(e){return dn(Or,e)}const Pr=oe("ZodGUID",((e,t)=>{It.init(e,t),Tr.init(e,t)})),_r=oe("ZodUUID",((e,t)=>{Et.init(e,t),Tr.init(e,t)})),Rr=oe("ZodURL",((e,t)=>{St.init(e,t),Tr.init(e,t)}));function Nr(e){return ln(Rr,e)}const Mr=oe("ZodEmoji",((e,t)=>{Dt.init(e,t),Tr.init(e,t)})),Ur=oe("ZodNanoID",((e,t)=>{Ot.init(e,t),Tr.init(e,t)})),Lr=oe("ZodCUID",((e,t)=>{Ct.init(e,t),Tr.init(e,t)})),jr=oe("ZodCUID2",((e,t)=>{Pt.init(e,t),Tr.init(e,t)})),qr=oe("ZodULID",((e,t)=>{_t.init(e,t),Tr.init(e,t)})),Gr=oe("ZodXID",((e,t)=>{Rt.init(e,t),Tr.init(e,t)})),Br=oe("ZodKSUID",((e,t)=>{Nt.init(e,t),Tr.init(e,t)})),Fr=oe("ZodIPv4",((e,t)=>{qt.init(e,t),Tr.init(e,t)})),Vr=oe("ZodIPv6",((e,t)=>{Ft.init(e,t),Tr.init(e,t)})),zr=oe("ZodCIDRv4",((e,t)=>{Vt.init(e,t),Tr.init(e,t)})),Wr=oe("ZodCIDRv6",((e,t)=>{zt.init(e,t),Tr.init(e,t)})),Yr=oe("ZodBase64",((e,t)=>{Zt.init(e,t),Tr.init(e,t)})),Zr=oe("ZodBase64URL",((e,t)=>{Kt.init(e,t),Tr.init(e,t)})),Hr=oe("ZodE164",((e,t)=>{Jt.init(e,t),Tr.init(e,t)})),Kr=oe("ZodJWT",((e,t)=>{Qt.init(e,t),Tr.init(e,t)})),Jr=oe("ZodNumber",((e,t)=>{Xt.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,{minimum:o,maximum:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c,isInt:l}=Zn(e);r.type=l?"integer":"number";let u="number"==typeof d&&d<=(a??1/0),p="draft-04"===t.target||"openapi-3.0"===t.target;if("number"==typeof c&&c>=(o??-1/0)?p?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof o&&(r.minimum=o),u?p?(r.maximum=d,r.exclusiveMaximum=!0):r.exclusiveMaximum=d:"number"==typeof a&&(r.maximum=a),s){let i=new Set;for(let o of s)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):kn(e,t,r,n,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...a]=i;void 0!==o&&(r.multipleOf=o),a.length&&(r.allOf=[...r.allOf??[],...a.map((e=>({multipleOf:e})))])}})(e,t,i,n),e.isFinite=!0}),H({minValue:e=>{let{minimum:t,exclusiveMinimum:i}=Zn(e);return Math.max(t??-1/0,i??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:i}=Zn(e);return Math.min(t??1/0,i??1/0)},isInt:e=>{let{isInt:t,multipleOf:i}=Zn(e);return!!t||!!i?.some(Number.isSafeInteger)},format:e=>Zn(e).format??null},{gt(e,t){return this.check(fn(e,t))},gte(e,t){return this.check(yn(e,t))},min(e,t){return this.check(yn(e,t))},lt(e,t){return this.check(mn(e,t))},lte(e,t){return this.check(hn(e,t))},max(e,t){return this.check(hn(e,t))},int(e){return this.check(eo(e))},safe(e){return this.check(eo(e))},positive(e){return this.check(fn(0,e))},nonnegative(e){return this.check(yn(0,e))},negative(e){return this.check(mn(0,e))},nonpositive(e){return this.check(hn(0,e))},multipleOf(e,t){return this.check(gn(e,t))},step(e,t){return this.check(gn(e,t))},finite(){return this}}));function Qr(e){return function(e,t){return new Jr(sn({type:"number",checks:[],...D(t)}))}(0,e)}const Xr=oe("ZodNumberFormat",((e,t)=>{ei.init(e,t),Jr.init(e,t)}));function eo(e){return function(e,t){return new Xr({type:"number",check:"number_format",abort:!1,format:"safeint",...D(t)})}(0,e)}const to=oe("ZodBoolean",((e,t)=>{ti.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{i.type="boolean"})(0,0,t)}));function io(e){return function(e,t){return new to({type:"boolean",...D(t)})}(0,e)}const no=oe("ZodUndefined",((e,t)=>{ii.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{kn(e,t,i,n,"Undefined cannot be represented in JSON Schema")})(e,t,i,n)}));function ro(e){return function(e,t){return new no({type:"undefined",...D(t)})}(0,e)}const oo=oe("ZodNull",((e,t)=>{ni.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{"openapi-3.0"===t.target?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"})(0,e,t)}));function ao(e){return function(e,t){return new oo({type:"null",...D(t)})}(0,e)}const so=oe("ZodAny",((e,t)=>{ri.init(e,t),$r.init(e,t),e._zod.processJSONSchema=()=>{}})),co=oe("ZodUnknown",((e,t)=>{oi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=()=>{}}));function lo(){return new co({type:"unknown"})}const uo=oe("ZodNever",((e,t)=>{ai.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(e,t)=>((e,t,i)=>{i.not={}})(0,0,t)}));function po(e){return function(e,t){return new uo({type:"never",...D(t)})}(0,e)}const mo=oe("ZodVoid",((e,t)=>{si.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{kn(e,t,i,n,"Void cannot be represented in JSON Schema")})(e,t,i,n)}));function ho(e){return function(e,t){return new mo({type:"void",...D(t)})}(0,e)}const fo=oe("ZodDate",((e,t)=>{di.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{kn(e,t,i,n,"Date cannot be represented in JSON Schema")})(e,t,i,n),e.min=(t,i)=>e.check(yn(t,i)),e.max=(t,i)=>e.check(hn(t,i))}),H({minDate:e=>{let{minimum:t}=Zn(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Zn(e);return t?new Date(t):null}},{}));function yo(e){return function(e,t){return new fo({type:"date",...D(t)})}(0,e)}const go=oe("ZodArray",((e,t)=>{wr(),ui.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def,{minimum:a,maximum:s}=Zn(e);"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=Tn(o.element,t,{...n,path:[...n.path,"items"]})})(e,t,i,n),e.element=t.element}),{min(e,t){return this.check(bn(e,t))},nonempty(e){return this.check(bn(1,e))},max(e,t){return this.check(vn(e,t))},length(e,t){return this.check(wn(e,t))},unwrap(){return this.element}});function vo(e,t){return function(e,t,i){return new go({type:"array",element:t,...D(i)})}(0,e,t)}const bo=oe("ZodObject",((e,t)=>{wr(),gi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&kn(e,t,r,n,"Symbol keys cannot be represented in JSON Schema"))return;r.type="object",r.properties={};for(let e in a)m(r.properties,e,Tn(a[e],t,{...n,path:[...n.path,"properties",e]}));let s=[];for(let e of Object.keys(a)){let i=o.shape[e];("input"===t.io?void 0===Xn(i):void 0===i._zod.optout)&&s.push(e)}s.length>0&&(r.required=s),"never"===o.catchall?._zod.def.type?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Tn(o.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,i,n),function(e,t,i,n){let r=function(e,t){let i=Object.getPrototypeOf(e);return t in i?void 0:i}(e,t);r&&Object.defineProperty(r,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,e),e.value=i(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:e})}})}(e,"shape",(e=>e._zod.def.shape),!1)}),{keyof(){return Oo(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(b(this._zod.def,{catchall:e}))},passthrough(){return this.clone(b(this._zod.def,{catchall:lo()}))},loose(){return this.clone(b(this._zod.def,{catchall:lo()}))},strict(){return this.clone(b(this._zod.def,{catchall:po()}))},strip(){return this.clone(b(this._zod.def,{catchall:void 0}))},extend(e){return function(e,t){if(!k(t))throw Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let i=f(e);for(let e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(i,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return S(e,b(e._zod.def,{shape:R(e,t)}))}(this,e)},safeExtend(e){return function(e,t){if(!k(t))throw Error("Invalid input to safeExtend: expected a plain object");return S(e,b(e._zod.def,{shape:R(e,t)}))}(this,e)},merge(e){return function(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i={};return v(i,e,Reflect.ownKeys(f(e))),v(i,t,Reflect.ownKeys(f(t))),S(e,b(e._zod.def,{shape:i,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}(this,e)},pick(e){return function(e,t){let i=e._zod.def,n=i.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let r={};return v(r,e,_(e,t)),S(e,b(i,{shape:r,checks:[]}))}(this,e)},omit(e){return function(e,t){let i=e._zod.def,n=i.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let r=new Set(_(e,t)),o={};return v(o,e,Reflect.ownKeys(f(e)).filter((e=>!r.has(e)))),S(e,b(i,{shape:o,checks:[]}))}(this,e)},partial(...e){return N(No,this,e[0])},exactPartial(...e){return N(Uo,this,e[0],"exactPartial")},required(...e){return function(e,t,i){let n=i?new Set(_(t,i)):void 0,r={};return v(r,t,Reflect.ownKeys(f(t)),((t,i)=>n&&!n.has(i)?t:new e({type:"nonoptional",innerType:t}))),S(t,b(t._zod.def,{shape:r}))}(Bo,this,e[0])}});function wo(e,t){return new bo({type:"object",shape:e??{},...D(t)})}function $o(e,t){return new bo({type:"object",shape:e,catchall:po(),...D(t)})}const Io=oe("ZodUnion",((e,t)=>{bi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=!1===r.inclusive,a=r.options.map(((e,i)=>Tn(e,t,{...n,path:[...n.path,o?"oneOf":"anyOf",i]})));o?i.oneOf=a:i.anyOf=a})(e,t,i,n),e.options=t.options}));function Eo(e,t){return new Io({type:"union",options:e,...D(t)})}const ko=oe("ZodDiscriminatedUnion",((e,t)=>{Io.init(e,t),wi.init(e,t)}));function To(e,t,i){return new ko({type:"union",options:t,discriminator:e,...D(i)})}const Ao=oe("ZodIntersection",((e,t)=>{$i.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=Tn(r.left,t,{...n,path:[...n.path,"allOf",0]}),a=Tn(r.right,t,{...n,path:[...n.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,d=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];i.allOf=d,t.intersections.push(d)})(e,t,i,n)})),xo=oe("ZodRecord",((e,t)=>{wr(),ki.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=i,o=e._zod.def;r.type="object";let a=o.keyType,s=Zn(a).patterns;if("loose"===o.mode&&s&&s.size>0){let e=Tn(o.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});r.patternProperties={};for(let t of s)m(r.patternProperties,Jn(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=Tn(o.keyType,t,{...n,path:[...n.path,"propertyNames"]});let i=tr.get(t);i||(i=[],tr.set(t,i),t.deferred.push((()=>function(e){let t=new Map;for(let i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);let i=new Map;for(let n of tr.get(e)??[]){let r=e.seen.get(n),o=(r?.def??r?.schema)?.propertyNames;if(!o||!0===o||i.has(o))continue;let a=er(t,o,new Set);a!==o&&i.set(o,a)}if(i.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&i.get(e.propertyNames);t&&(e.propertyNames=t)}}(t)))),i.push(e)}r.additionalProperties=Tn(o.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let d=a._zod.values,c="input"===t.io&&void 0!==Xn(o.valueType);if(d&&!o.partial&&!c){let e=[...d].filter((e=>"string"==typeof e||"number"==typeof e));e.length>0&&(r.required=e.map(String))}})(e,t,i,n),e.keyType=t.keyType,e.valueType=t.valueType}));function So(e,t,i){return new xo(t&&t._zod?{type:"record",keyType:e,valueType:t,...D(i)}:{type:"record",keyType:kr(),valueType:e,...D(t)})}const Do=oe("ZodEnum",((e,t)=>{Ti.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i)=>Qn(e,0,i),e.enum=t.entries,e.options=[...e._zod.values];let i=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let r={};for(let n of e){if(!i.has(n))throw Error(`Key ${n} not found in enum`);r[n]=t.entries[n]}return new Do({...t,checks:[],...D(n),entries:r})},e.exclude=(e,n)=>{let r={...t.entries};for(let t of e){if(!i.has(t))throw Error(`Key ${t} not found in enum`);delete r[t]}return new Do({...t,checks:[],...D(n),entries:r})}}));function Oo(e,t){return new Do({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e,...D(t)})}const Co=oe("ZodLiteral",((e,t)=>{Ai.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;if(0===r.values.length)return void(i.not={});let o=[];for(let a of r.values)if(void 0===a){if(kn(e,t,i,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(kn(e,t,i,n,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0!==o.length)if(1===o.length){let e=o[0];i.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?i.enum=[e]:i.const=e}else o.every((e=>"number"==typeof e))&&(i.type="number"),o.every((e=>"string"==typeof e))&&(i.type="string"),o.every((e=>"boolean"==typeof e))&&(i.type="boolean"),o.every((e=>null===e))&&(i.type="null"),i.enum=o})(e,t,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function Po(e,t){return new Co({type:"literal",values:Array.isArray(e)?e:[e],...D(t)})}const _o=oe("ZodTransform",((e,t)=>{wr(),xi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{kn(e,t,i,n,"Transforms cannot be represented in JSON Schema")})(e,t,i,n),e._zod.parse=(i,n)=>{if("backward"===n.direction)throw new se(e.constructor.name);i.addIssue=n=>{if("string"==typeof n)i.issues.push(W(n,i.value,t));else{let t=n;t.fatal&&(t.continue=!1),t.code??="custom","input"in t||(t.input=i.value),t.inst??=e,i.issues.push(W(t))}};let r=t.transform(i.value,i);return r instanceof Promise?r.then((e=>(i.value=e,i))):(i.value=r,i)}}));function Ro(e){return new _o({type:"transform",transform:e})}const No=oe("ZodOptional",((e,t)=>{Di.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>rr(e,t,0,n),e.unwrap=()=>e._zod.def.innerType}));function Mo(e){return new No({type:"optional",innerType:e})}const Uo=oe("ZodExactOptional",((e,t)=>{Oi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>rr(e,t,0,n),e.unwrap=()=>e._zod.def.innerType})),Lo=oe("ZodNullable",((e,t)=>{Ci.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=Tn(r.innerType,t,n),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,i.nullable=!0):i.anyOf=[o,{type:"null"}]})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType}));function jo(e){return new Lo({type:"nullable",innerType:e})}const qo=oe("ZodDefault",((e,t)=>{Pi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;Tn(r.innerType,t,n),t.seen.get(e).ref=r.innerType;let o=nr(r.defaultValue,e,t,i,n);o!==ir&&(i.default=o)})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),Go=oe("ZodPrefault",((e,t)=>{Ri.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;if(Tn(r.innerType,t,n),t.seen.get(e).ref=r.innerType,"input"!==t.io)return;let o=nr(r.defaultValue,e,t,i,n);o!==ir&&(i._prefault=o)})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType})),Bo=oe("ZodNonOptional",((e,t)=>{Ni.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;Tn(r.innerType,t,n),t.seen.get(e).ref=r.innerType})(e,t,0,n),e.unwrap=()=>e._zod.def.innerType})),Fo=oe("ZodCatch",((e,t)=>{Li.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r,o=e._zod.def;Tn(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{r=o.catchValue(void 0)}catch{return void kn(e,t,i,n,"Dynamic catch values are not supported in JSON Schema")}i.default=r})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),Vo=oe("ZodPipe",((e,t)=>{ji.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a="input"===t.io?o?r.out:r.in:r.out;Tn(a,t,n),t.seen.get(e).ref=a})(e,t,0,n),e.in=t.in,e.out=t.out}));function zo(e,t){return new Vo({type:"pipe",in:e,out:t})}const Wo=oe("ZodPreprocess",((e,t)=>{Vo.init(e,t),Gi.init(e,t)})),Yo=oe("ZodReadonly",((e,t)=>{Bi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.def;Tn(r.innerType,t,n),t.seen.get(e).ref=r.innerType,i.readOnly=!0})(e,t,i,n),e.unwrap=()=>e._zod.def.innerType})),Zo=oe("ZodLazy",((e,t)=>{Vi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{let r=e._zod.innerType;Tn(r,t,n),t.seen.get(e).ref=r})(e,t,0,n),e.unwrap=()=>e._zod.def.getter()})),Ho=oe("ZodCustom",((e,t)=>{zi.init(e,t),$r.init(e,t),e._zod.processJSONSchema=(t,i,n)=>((e,t,i,n)=>{kn(e,t,i,n,"Custom types cannot be represented in JSON Schema")})(e,t,i,n)}));function Ko(e,t){return new Wo({type:"pipe",in:Ro(e),out:t})}for(var Jo=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,Qo=[],Xo=0;Xo<256;++Xo)Qo.push((Xo+256).toString(16).slice(1));function ea(e,t=0){return(Qo[e[t+0]]+Qo[e[t+1]]+Qo[e[t+2]]+Qo[e[t+3]]+"-"+Qo[e[t+4]]+Qo[e[t+5]]+"-"+Qo[e[t+6]]+Qo[e[t+7]]+"-"+Qo[e[t+8]]+Qo[e[t+9]]+"-"+Qo[e[t+10]]+Qo[e[t+11]]+Qo[e[t+12]]+Qo[e[t+13]]+Qo[e[t+14]]+Qo[e[t+15]]).toLowerCase()}var ta,ia=new Uint8Array(16);function na(){if(!ta&&!(ta=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ta(ia)}var ra=null,oa=null,aa=0;function sa(e,t){e||={};var i=0,n=t||new Uint8Array(16),r=e.random||(e.rng||na)(),o=void 0===e.msecs?Date.now():e.msecs,a=void 0===e.seq?null:e.seq,s=oa,d=ra;return o>aa&&void 0===e.msecs&&(aa=o,null!==a&&(s=null,d=null)),null!==a&&(a>2147483647&&(a=2147483647),s=a>>>19&4095,d=524287&a),(null===s||null===d)&&(s=(s=127&r[6])<<8|r[7],d=(d=(d=63&r[8])<<8|r[9])<<5|r[10]>>>3),o+1e4>aa&&null===a?++d>524287&&(d=0,++s>4095&&(s=0,aa++)):aa=o,oa=s,ra=d,n[i++]=aa/1099511627776&255,n[i++]=aa/4294967296&255,n[i++]=aa/16777216&255,n[i++]=aa/65536&255,n[i++]=aa/256&255,n[i++]=255&aa,n[i++]=s>>>4&15|112,n[i++]=255&s,n[i++]=d>>>13&63|128,n[i++]=d>>>5&255,n[i++]=d<<3&255|7&r[10],n[i++]=r[11],n[i++]=r[12],n[i++]=r[13],n[i++]=r[14],n[i++]=r[15],t||ea(n)}var da="0123456789abcdefghjkmnpqrstvwxyz",ca=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,255,18,19,255,20,21,255,22,23,24,25,26,255,27,28,29,30,31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);function la(e){let t=Array(26).fill("");if(16!==e.length)throw Error(`Invalid length. Expected 16 bytes, got ${e.length}. Input: ${e}`);return t[0]=da[(224&e[0])>>5],t[1]=da[31&e[0]],t[2]=da[(248&e[1])>>3],t[3]=da[(7&e[1])<<2|(192&e[2])>>6],t[4]=da[(62&e[2])>>1],t[5]=da[(1&e[2])<<4|(240&e[3])>>4],t[6]=da[(15&e[3])<<1|(128&e[4])>>7],t[7]=da[(124&e[4])>>2],t[8]=da[(3&e[4])<<3|(224&e[5])>>5],t[9]=da[31&e[5]],t[10]=da[(248&e[6])>>3],t[11]=da[(7&e[6])<<2|(192&e[7])>>6],t[12]=da[(62&e[7])>>1],t[13]=da[(1&e[7])<<4|(240&e[8])>>4],t[14]=da[(15&e[8])<<1|(128&e[9])>>7],t[15]=da[(124&e[9])>>2],t[16]=da[(3&e[9])<<3|(224&e[10])>>5],t[17]=da[31&e[10]],t[18]=da[(248&e[11])>>3],t[19]=da[(7&e[11])<<2|(192&e[12])>>6],t[20]=da[(62&e[12])>>1],t[21]=da[(1&e[12])<<4|(240&e[13])>>4],t[22]=da[(15&e[13])<<1|(128&e[14])>>7],t[23]=da[(124&e[14])>>2],t[24]=da[(3&e[14])<<3|(224&e[15])>>5],t[25]=da[31&e[15]],t.join("")}function ua(e){if(26!==e.length)throw Error(`Invalid length. Expected 26 bytes, got ${e.length}. Input: ${e}`);let t=(new TextEncoder).encode(e);if(255===ca[t[0]]||255===ca[t[1]]||255===ca[t[2]]||255===ca[t[3]]||255===ca[t[4]]||255===ca[t[5]]||255===ca[t[6]]||255===ca[t[7]]||255===ca[t[8]]||255===ca[t[9]]||255===ca[t[10]]||255===ca[t[11]]||255===ca[t[12]]||255===ca[t[13]]||255===ca[t[14]]||255===ca[t[15]]||255===ca[t[16]]||255===ca[t[17]]||255===ca[t[18]]||255===ca[t[19]]||255===ca[t[20]]||255===ca[t[21]]||255===ca[t[22]]||255===ca[t[23]]||255===ca[t[24]]||255===ca[t[25]])throw Error("Invalid base32 character");let i=new Uint8Array(16);return i[0]=ca[t[0]]<<5|ca[t[1]],i[1]=ca[t[2]]<<3|ca[t[3]]>>2,i[2]=(3&ca[t[3]])<<6|ca[t[4]]<<1|ca[t[5]]>>4,i[3]=(15&ca[t[5]])<<4|ca[t[6]]>>1,i[4]=(1&ca[t[6]])<<7|ca[t[7]]<<2|ca[t[8]]>>3,i[5]=(7&ca[t[8]])<<5|ca[t[9]],i[6]=ca[t[10]]<<3|ca[t[11]]>>2,i[7]=(3&ca[t[11]])<<6|ca[t[12]]<<1|ca[t[13]]>>4,i[8]=(15&ca[t[13]])<<4|ca[t[14]]>>1,i[9]=(1&ca[t[14]])<<7|ca[t[15]]<<2|ca[t[16]]>>3,i[10]=(7&ca[t[16]])<<5|ca[t[17]],i[11]=ca[t[18]]<<3|ca[t[19]]>>2,i[12]=(3&ca[t[19]])<<6|ca[t[20]]<<1|ca[t[21]]>>4,i[13]=(15&ca[t[21]])<<4|ca[t[22]]>>1,i[14]=(1&ca[t[22]])<<7|ca[t[23]]<<2|ca[t[24]]>>3,i[15]=(7&ca[t[24]])<<5|ca[t[25]],i}var pa=class extends Error{constructor(e){super(`Invalid prefix "${e}". Must be at most 63 ASCII letters [a-z_]`),this.name="InvalidPrefixError"}},ma=class extends Error{constructor(e,t){super(`Invalid TypeId. Prefix mismatch. Expected ${e}, got ${t}`),this.name="PrefixMismatchError"}},ha=class extends Error{constructor(e){super("Invalid TypeId. Prefix cannot be empty when there's a separator: "+e),this.name="EmptyPrefixError"}},fa=class extends Error{constructor(e){super("Invalid length. Suffix should have 26 characters, got "+e),this.name="InvalidSuffixLengthError"}},ya=class extends Error{constructor(e){super(`Invalid suffix. First character "${e}" must be in the range [0-7]`),this.name="InvalidSuffixCharacterError"}},ga=class extends Error{constructor(e,t){super(`Cannot convert TypeID of type ${e} to type ${t}`),this.name="TypeIDConversionError"}};function va(e="",t=""){if(!function(e){if(e.length>63)return!1;let t,i,n;for(i=0,n=e.length;i<n;i+=1){t=e.charCodeAt(i);let r=t>96&&t<123;if((0===i||i===n-1)&&!r||!r&&95!==t)return!1}return!0}(e))throw new pa(e);let i;if(t)i=t;else{let e=new Uint8Array(16);sa(void 0,e),i=la(e)}if(26!==i.length)throw new fa(i.length);if(i[0]>"7")throw new ya(i[0]);return ua(i),""===e?i:`${e}_${i}`}function ba(e){let t=e.lastIndexOf("_");return-1===t?"":e.substring(0,t)}function wa(e){let t=e.lastIndexOf("_");return-1===t?e:e.substring(t+1)}var $a=class{constructor(e,t=""){this.prefix=e,this.suffix=t;let i=va(e,t);this.prefix=ba(i),this.suffix=wa(i)}getType(){return this.prefix}getSuffix(){return this.suffix}asType(e){let t=this;if(t.prefix!==e)throw new ga(t.prefix,e);return t}toUUIDBytes(){return ua(this.suffix)}toUUID(){return function(e,t=0){var i=ea(e,t);if(!function(e){return"string"==typeof e&&Jo.test(e)}(i))throw TypeError("Stringified UUID is invalid");return i}(this.toUUIDBytes())}toString(){return""===this.prefix?this.suffix:`${this.prefix}_${this.suffix}`}static fromString(e,t){let i=function(e,t){let i,n,r=e.lastIndexOf("_");if(-1===r)i="",n=e;else if(i=e.substring(0,r),n=e.substring(r+1),!i)throw new ha(e);if(!n)throw new fa(0);if(t&&i!==t)throw new ma(t,i);return va(i,n)}(e,t);return new $a(ba(i),wa(i))}static fromUUIDBytes(e,t){return new $a(e,la(t))}static fromUUID(e,t){return new $a(e,la(function(e){let t,i=new Uint8Array(16);return i[0]=(t=parseInt(e.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(e.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(e.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(e.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}(t)))}};const Ia={admission:"adm",integration:"int",integrationBackfill:"ibf",anonymous:"anon",beneficiary:"ben",coupon:"cpn",couponCode:"cod",customer:"cus",event:"evt",eventCollaborator:"ecl",eventCollaboratorInvite:"evi",membership:"mem",membershipBenefitClaim:"mbc",membershipCharge:"mch",membershipFob:"fob",membershipProgram:"mpg",membershipPurchase:"mpu",membershipSubscription:"msb",membershipTerm:"mtm",order:"ord",orderItem:"itm",orderFee:"fee",permissionScope:"psc",permissionRole:"prl",permissionSnapshot:"pss",payout:"pyt",paymentDispute:"pds",webhookInboxEvent:"wih",payoutAdjustmentApplication:"paa",payoutAdjustment:"adj",platformFunding:"pfu",payoutTransfer:"xfr",promoter:"pmt",refund:"rfd",cancellation:"cnl",section:"sct",scan:"scn",team:"tem",teamDeletion:"tdl",teamMember:"mbr",teamInvite:"inv",teamGateway:"tgw",teamGatewayAccount:"tga",taxProfile:"txp",tenant:"tnt",ticket:"tkt",user:"usr",venue:"ven",location:"loc",request:"req",report:"rpt",walletDevice:"wdv",schedule:"sch",session:"ssn",trackingEvent:"tev",trackingStats:"sta",hllShard:"shr",timeline:"tln",notification:"ntf"};function Ea(e){return function(e="",t=""){return new $a(e,t)}(Ia[e])}const ka="ses_sid",Ta="ses_aid";function Aa(){return""+Ea("session")}function xa(){return""+Ea("anonymous")}const Sa=Oo("Page Viewed.Screen Viewed.Products Searched.Product List Viewed.Product List Filtered.Promotion Viewed.Promotion Clicked.Product Clicked.Product Viewed.Product Added.Product Removed.Cart Viewed.Checkout Started.Checkout Step Viewed.Checkout Step Completed.Payment Info Entered.Order Completed.Order Updated.Order Refunded.Order Cancelled.Coupon Entered.Coupon Applied.Coupon Denied.Coupon Removed.Product Added to Wishlist.Product Removed from Wishlist.Wishlist Product Added to Cart.Product Shared.Cart Shared.Product Reviewed".split(".")),Da=Sa.enum;function Oa(e){return Array.isArray(e)?e:null==e?[]:[e]}const Ca="orpc";var Pa=class extends Error{constructor(...e){super(...e),this.name="AbortError"}};function _a(e){let t;return()=>{if(t)return t.result;let i=e();return t={result:i},i}}function Ra(){return globalThis["__@orpc/shared@1.16.2/otel/config__"]}function Na(e,t={},i){return(Ra()?.tracer)?.startSpan(e,t,i)}function Ma(e,t,i={}){if(!e)return;let n=function(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return"code"in e&&("string"==typeof e.code||"number"==typeof e.code)&&(t.code=e.code),t}return{message:e+""}}(t);e.recordException(n),(!i.signal?.aborted||i.signal.reason!==t)&&e.setStatus({code:2,message:n.message})}async function Ua({name:e,context:t,...i},n){let r=Ra()?.tracer;if(!r)return n();let o=async e=>{try{return await n(e)}catch(t){throw Ma(e,t,i),t}finally{e.end()}};return t?r.startActiveSpan(e,i,t,o):r.startActiveSpan(e,i,o)}async function La(e,t){let i=Ra();if(!e||!i)return t();let n=i.trace.setSpan(i.context.active(),e);return i.context.with(n,t)}function ja(e){return!(!e||"object"!=typeof e)&&"next"in e&&"function"==typeof e.next&&Symbol.asyncIterator in e&&"function"==typeof e[Symbol.asyncIterator]}const qa=Symbol.asyncDispose??Symbol.for("asyncDispose");var Ga=class{#e=!1;#t=!1;#i;#n;constructor(e,t){this.#i=t,this.#n=function(e){let t=Promise.resolve();return(...i)=>t=t.catch((()=>{})).then((()=>e(...i)))}((async()=>{if(this.#e)return{done:!0,value:void 0};try{let t=await e();return t.done&&(this.#e=!0),t}catch(e){throw this.#e=!0,e}finally{this.#e&&!this.#t&&(this.#t=!0,await this.#i("next"))}}))}next(){return this.#n()}async return(e){return this.#e=!0,this.#t||(this.#t=!0,await this.#i("return")),{done:!0,value:e}}async throw(e){throw this.#e=!0,this.#t||(this.#t=!0,await this.#i("throw")),e}async[qa](){this.#e=!0,this.#t||(this.#t=!0,await this.#i("dispose"))}[Symbol.asyncIterator](){return this}};function Ba({name:e,...t},i){let n;return new Ga((async()=>{n??=Na(e);try{let e=await La(n,(()=>i.next()));return n?.addEvent(e.done?"completed":"yielded"),e}catch(e){throw Ma(n,e,t),e}}),(async e=>{try{"next"!==e&&await La(n,(()=>i.return?.()))}catch(e){throw Ma(n,e,t),e}finally{n?.end()}}))}function Fa(e,t,i){let n=(t,r)=>{let o=e[r];return o?o({...t,next:(e=t)=>n(e,r+1)}):i(t)};return n(t,0)}function Va(e){if(e)return JSON.parse(e)}function za(e){return JSON.stringify(e)}function Wa(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function Ya(e){return!!e&&("object"==typeof e||"function"==typeof e)}function Za(e,t){let i=e;for(let e of t){if(!Ya(i))return;i=i[e]}return i}const Ha=(()=>{let e=function(){};return Object.freeze(e.prototype=Object.create(null)),e})();function Ka(e,...t){return"function"==typeof e?e(...t):e}function Ja(e){return new Proxy(e,{get(e,t,i){let n=Reflect.get(e,t,i);return"then"!==t||"function"!=typeof n?n:new Proxy(n,{apply(t,i,n){if(2!==n.length||n.some((e=>!function(e){return"function"==typeof e&&Qa.test(""+e)}(e))))return Reflect.apply(t,i,n);let r=!0;n[0].call(i,Ja(new Proxy(e,{get:(e,t,i)=>{if(!r||"then"!==t)return Reflect.get(e,t,i);r=!1}})))}})}})}const Qa=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/,Xa=new Set(["bind","valueOf","toString","toJSON"]),es={BAD_REQUEST:{status:400,message:"Bad Request"},UNAUTHORIZED:{status:401,message:"Unauthorized"},FORBIDDEN:{status:403,message:"Forbidden"},NOT_FOUND:{status:404,message:"Not Found"},METHOD_NOT_SUPPORTED:{status:405,message:"Method Not Supported"},NOT_ACCEPTABLE:{status:406,message:"Not Acceptable"},TIMEOUT:{status:408,message:"Request Timeout"},CONFLICT:{status:409,message:"Conflict"},PRECONDITION_FAILED:{status:412,message:"Precondition Failed"},PAYLOAD_TOO_LARGE:{status:413,message:"Payload Too Large"},UNSUPPORTED_MEDIA_TYPE:{status:415,message:"Unsupported Media Type"},UNPROCESSABLE_CONTENT:{status:422,message:"Unprocessable Content"},TOO_MANY_REQUESTS:{status:429,message:"Too Many Requests"},CLIENT_CLOSED_REQUEST:{status:499,message:"Client Closed Request"},INTERNAL_SERVER_ERROR:{status:500,message:"Internal Server Error"},NOT_IMPLEMENTED:{status:501,message:"Not Implemented"},BAD_GATEWAY:{status:502,message:"Bad Gateway"},SERVICE_UNAVAILABLE:{status:503,message:"Service Unavailable"},GATEWAY_TIMEOUT:{status:504,message:"Gateway Timeout"}};function ts(e,t){return t??es[e]?.status??500}let is;var ns=class e extends Error{defined;code;status;data;static{let t=Symbol.for("__@orpc/client@1.16.2/error/ORPC_ERROR_CONSTRUCTORS__");globalThis[t]??=new WeakSet,is=globalThis[t],is.add(e)}constructor(e,...t){let i=function(e){return e[0]??{}}(t);if(void 0!==i.status&&!os(i.status))throw Error("[ORPCError] Invalid error status code.");let n=function(e,t){return t||es[e]?.message||e}(e,i.message);super(n,i),this.code=e,this.status=ts(e,i.status),this.defined=i.defined??!1,this.data=i.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](e){if(is.has(this)){let t=function(e){return Ya(e)?Object.getPrototypeOf(e)?.constructor:null}(e);if(t&&is.has(t))return!0}return super[Symbol.hasInstance](e)}};function rs(e){return e instanceof ns?e:new ns("INTERNAL_SERVER_ERROR",{message:"Internal server error",cause:e})}function os(e){return e<200||e>=400}function as(e){if(!Wa(e))return!1;let t=["defined","code","status","message","data"];return!Object.keys(e).some((e=>!t.includes(e)))&&"defined"in e&&"boolean"==typeof e.defined&&"code"in e&&"string"==typeof e.code&&"status"in e&&"number"==typeof e.status&&os(e.status)&&"message"in e&&"string"==typeof e.message}function ss(e,t={}){return new ns(e.code,{...t,...e})}var ds=class extends TypeError{},cs=class extends TypeError{},ls=class extends Error{data;constructor(e){super(e?.message??"An error event was received",e),this.data=e?.data}};const us=/\r\n|\r(?!\n)|\n/,ps=/(?:\r\n|\r(?!\n)|\n){2}/,ms=/(?:\r\n|\r(?!\n)|\n){2}/g;function hs(e){let t={data:void 0,event:void 0,id:void 0,retry:void 0,comments:[]};for(let i of e.split(us)){if(""===i)continue;let e=i.indexOf(":"),n=-1===e?"":i.slice(32===i.charCodeAt(e+1)?e+2:e+1);if(0!==e)switch(-1===e?i:i.slice(0,e)){case"data":t.data=void 0===t.data?n:`${t.data}\n${n}`;break;case"event":t.event=n;break;case"id":t.id=n;break;case"retry":{let e=Number.parseInt(n,10);e>=0&&""+e===n&&(t.retry=e);break}}else t.comments.push(n)}return t}var fs=class{constructor(e={}){this.options=e}pending=[];tail="";discardLeadingLF=!1;feed(e){if(""===e||this.discardLeadingLF&&(this.discardLeadingLF=!1,10===e.charCodeAt(0)&&""===(e=e.slice(1))))return;let t=this.tail+e;if(!ps.test(t))return this.pending.push(e),void(this.tail=t.slice(-3));this.pending.push(e);let i=1===this.pending.length?e:this.pending.join(""),n=i.length-t.length,r=[],o=0;for(let e of t.matchAll(ms))r.push(i.slice(o,n+e.index)),o=n+e.index+e[0].length;let a=i.slice(o);this.pending.length=0,this.tail=a.slice(-3),""===a?this.discardLeadingLF=13===e.charCodeAt(e.length-1):this.pending.push(a);for(let e of r){let t=hs(e);this.options.onEvent&&this.options.onEvent(t)}}end(){if(0!==this.pending.length)throw new cs("Event Iterator ended before complete")}},ys=class extends TransformStream{constructor(){let e;super({start(t){e=new fs({onEvent:e=>{t.enqueue(e)}})},transform(t){e.feed(t)},flush(){e.end()}})}};const gs=/\r\n|[\n\r]/,vs=/\r\n|[\n\r]/g;function bs(e){return gs.test(e)}function ws(e){if(bs(e))throw new ds("Event's id must not contain a carriage return or newline character")}function $s(e){if(!Number.isInteger(e)||e<0)throw new ds("Event's retry must be a integer and >= 0")}function Is(e){if(bs(e))throw new ds("Event's comment must not contain a carriage return or newline character")}function Es(e){let t="";return t+=function(e){let t="";for(let i of e??[])Is(i),t+=`: ${i}\n`;return t}(e.comments),void 0!==e.event&&(function(e){if(bs(e))throw new ds("Event's event must not contain a carriage return or newline character")}(e.event),t+=`event: ${e.event}\n`),void 0!==e.retry&&($s(e.retry),t+=`retry: ${e.retry}\n`),void 0!==e.id&&(ws(e.id),t+=`id: ${e.id}\n`),t+=function(e){return void 0===e?"":`data: ${e.replace(vs,"\ndata: ")}\n`}(e.data),t+="\n",t}const ks=Symbol("ORPC_EVENT_SOURCE_META");function Ts(e,t){if(void 0===t.id&&void 0===t.retry&&!t.comments?.length)return e;if(void 0!==t.id&&ws(t.id),void 0!==t.retry&&$s(t.retry),void 0!==t.comments)for(let e of t.comments)Is(e);return new Proxy(e,{get:(e,i,n)=>i===ks?t:Reflect.get(e,i,n)})}function As(e){return Ya(e)?Reflect.get(e,ks):void 0}function xs(e,t){let i={...e};for(let e in t)Array.isArray(t[e])?i[e]=[...Oa(i[e]),...t[e]]:void 0!==t[e]&&(i[e]=Array.isArray(i[e])?[...i[e],t[e]]:void 0===i[e]?t[e]:[i[e],t[e]]);return i}function Ss(e,t){let i=async e=>{let i=await t.error(e);if(i!==e){let t=As(e);t&&Ya(i)&&(i=Ts(i,t))}return i};return new Ga((async()=>{let{done:n,value:r}=await(async()=>{try{return await e.next()}catch(e){throw await i(e)}})(),o=await t.value(r,n);if(o!==r){let e=As(r);e&&Ya(o)&&(o=Ts(o,e))}return{done:n,value:o}}),(async()=>{try{await(e.return?.())}catch(e){throw await i(e)}}))}function Ds(e,t={}){let i=t.path??[];return Ja(new Proxy((async(...[t,n={}])=>await e.call(i,t,function(e){return{...e,context:e.context??{}}}(n))),{get:(t,n)=>"string"!=typeof n||Xa.has(n)?Reflect.get(t,n):Ds(e,{path:[...i,n]})}))}function Os(e,t){return{...e,...t}}var Cs=class{"~orpc";constructor(e){if(e.route?.successStatus&&os(e.route.successStatus))throw Error("[ContractProcedure] Invalid successStatus.");if(Object.values(e.errorMap).some((e=>e&&e.status&&!os(e.status))))throw Error("[ContractProcedure] Invalid error status code.");this["~orpc"]=e}};function Ps(e){return e instanceof Cs||("object"==typeof e||"function"==typeof e)&&null!==e&&"~orpc"in e&&"object"==typeof e["~orpc"]&&null!==e["~orpc"]&&"errorMap"in e["~orpc"]&&"route"in e["~orpc"]&&"meta"in e["~orpc"]}function _s(e,t){return{...e,...t}}function Rs(e,t){return{...e,...t}}function Ns(e,t){return e?`${e}${t}`:t}function Ms(e,t){return e?[...e,...t]:t}function Us(e,t){let i=e;return t.prefix&&(i=function(e,t){return e.path?{...e,path:`${t}${e.path}`}:e}(i,t.prefix)),t.tags?.length&&(i=function(e,t){return{...e,tags:[...t,...e.tags??[]]}}(i,t.tags)),i}function Ls(e,t){if(Ps(e))return new Cs({...e["~orpc"],errorMap:Os(t.errorMap,e["~orpc"].errorMap),route:Us(e["~orpc"].route,t)});if("object"!=typeof e||!e)return e;let i={};for(let n in e)i[n]=Ls(e[n],t);return i}const js=new class e extends Cs{constructor(e){super(e),this["~orpc"].prefix=e.prefix,this["~orpc"].tags=e.tags}$meta(t){return new e({...this["~orpc"],meta:t})}$route(t){return new e({...this["~orpc"],route:t})}$input(t){return new e({...this["~orpc"],inputSchema:t})}errors(t){return new e({...this["~orpc"],errorMap:Os(this["~orpc"].errorMap,t)})}meta(t){return new e({...this["~orpc"],meta:_s(this["~orpc"].meta,t)})}route(t){return new e({...this["~orpc"],route:Rs(this["~orpc"].route,t)})}input(t){return new e({...this["~orpc"],inputSchema:t})}output(t){return new e({...this["~orpc"],outputSchema:t})}prefix(t){return new e({...this["~orpc"],prefix:Ns(this["~orpc"].prefix,t)})}tag(...t){return new e({...this["~orpc"],tags:Ms(this["~orpc"].tags,t)})}router(e){return Ls(e,this["~orpc"])}}({errorMap:{},route:{},meta:{}}),qs={defaultMethod:"POST",defaultSuccessStatus:200,defaultSuccessDescription:"OK",defaultInputStructure:"compact",defaultOutputStructure:"compact"};function Gs(e,t){return void 0===t?qs[e]:t}const Bs={},Fs={};function Vs(e,t){try{let i=(Bs[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return i in Fs?Fs[i]:Ws(i,i.split(":"))}catch{if(e in Fs)return Fs[e];let t=e?.match(zs);return t?Ws(e,t.slice(1)):NaN}}const zs=/([+-]\d\d):?(\d\d)?/;function Ws(e,t){let i=+(t[0]||0),n=+(t[1]||0),r=(t[2]||0)/60;return Fs[e]=60*i+n>0?60*i+n+r:60*i-n-r}var Ys=class e extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Vs(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Ks(this,e)):this.setTime(Date.now())}static tz(t,...i){return i.length?new e(...i,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-Vs(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Hs(this),+this}[Symbol.for("constructDateFrom")](t){return new e(+new Date(t),this.timeZone)}};const Zs=/^(get|set)(?!UTC)/;function Hs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-Vs(e.timeZone,e)))}function Ks(e,t){let i=Array.isArray(t)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(t):+e.internal,n=Vs(e.timeZone,e),r=n>0?Math.floor(n):Math.ceil(n),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);let a=-new Date(+e).getTimezoneOffset(),s=-new Date(+o).getTimezoneOffset(),d=a;if(a-s&&a!==r&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),i=a-r;i&&t.setUTCMinutes(t.getUTCMinutes()+i);let n=Vs(e.timeZone,t);(n>0?Math.floor(n):Math.ceil(n))===r&&(d=s)}let c=d-r;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);let l=new Date(+e);l.setUTCSeconds(0);let u=a>0?l.getSeconds():(l.getSeconds()-60)%60,p=Math.round(-60*Vs(e.timeZone,e))%60;(p||u)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+u);let m=Vs(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),f=h!==r,y=-new Date(+e).getTimezoneOffset()-h-c,g=h-r,v=i-60*h*1e3,b=g>0&&Js(e)-i==60*g*1e3&&Js(e,v)!==i;if(f&&y&&!b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);let t=Vs(e.timeZone,e),i=h-(t>0?Math.floor(t):Math.ceil(t));i&&y<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i)}Hs(e);let w=(t?i:i+1e3*p)-+e.internal;w&&Math.abs(w)<18e5&&(Date.prototype.setTime.call(e,+e+w),Hs(e))}function Js(e,t){let i=new Date(t??+e);return i.setUTCSeconds(i.getUTCSeconds()-Math.round(60*-Vs(e.timeZone,i))),+i}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!Zs.test(e))return;let t=e.replace(Zs,"$1UTC");Ys.prototype[t]&&(e.startsWith("get")?Ys.prototype[e]=function(){return this.internal[t]()}:(Ys.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Ks(e)}(this),+this},Ys.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Hs(this),+this}))}));const Qs=Symbol.for("constructDateFrom");function Xs(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Qs in e?e[Qs](t):e instanceof Date?new e.constructor(t):new Date(t)}function ed(e,t){let i=function(e){return Xs(e,e)}(e);return isNaN(t)?Xs(e,NaN):(t&&i.setDate(i.getDate()+t),i)}function td(e){return("string"==typeof e?new Date(e):e).toISOString().replace(/\.\d{3}Z$/,"")}const id=["ALWAYS","HIDDEN","AFTER_ADMISSION"];let nd;function rd(e){return un(Ar,e)}function od(e){return function(e,t){return new Jr(sn({type:"number",coerce:!0,checks:[],...D(t)}))}(0,e)}function ad(e){return function(e,t){return new to({type:"boolean",coerce:!0,...D(t)})}(0,e)}!function(e){e.signature="a1B2c3D4e5F6g7H8";let t=e.Tenant={id:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",oldId:"none",name:"Session Services",slug:"session-services",email:"hello@session.services",adminTeamId:"tem_01jqpjksnsen9vprw95et60t3m",defaultCurrency:"AUD",smsSenderId:"SESSIONS",baseUrl:{dev:"http://localhost:3000",production:"https://app.session.services"},logo:{icon:{src:"https://assets.session.services/icon-bg.png",width:29,height:29},email:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},website:{src:"https://assets.session.services/icon-bg.png",width:165,height:76},qr:{src:"https://assets.session.services/tenants/session-services/qr.svg"}},favicon:"https://assets.session.services/tenants/session-services/favicon.svg"};e.Region={country:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",name:"Australia",slug:"australia",kind:"COUNTRY",order:1},state:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",name:"New South Wales",slug:"nsw",kind:"STATE",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf2",order:2},city:{id:"rgn_01jqpj2t2kfvmstt6f6tzkbaf4",name:"Sydney",slug:"sydney",kind:"CITY",parentId:"rgn_01jqpj2t2kfvmstt6f6tzkbaf3",latitude:-33.8688,longitude:151.2093,radius:25,order:3}};let i=e.User={id:"usr_01jps5cgsd4tzjghtnt45qnhn0",email:"test@session.services",firstName:"Jay",lastName:"McMullen",imageUrl:void 0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),tenantId:t.id,deleted:!1};e.EmailVerification={id:"emlvrf_01jps5cgsd4tzjghtnt45qnhn0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+18e5).toISOString(),createdAt:(new Date).toISOString()},e.PasswordReset={id:"pwrst_01jps5cgsd4tzjghtnt45qnhn0",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",userId:"usr_01jps5cgsd4tzjghtnt45qnhn0",tenantId:t.id,email:"test@session.services",code:"123456",expiresAt:new Date(Date.now()+9e5).toISOString(),emailVerified:!1,twoFactorVerified:!1,createdAt:(new Date).toISOString()};let n=e.Team={id:"tem_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Session Services",slug:"session-services",description:"This is only a test...",type:"PROMOTER",approval:"APPROVED",isDemo:!1,tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1},r=e.Promoter={id:"pmt_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,name:"Session Services",slug:"session-services",description:"This is only a test...",payoutFrequency:"AFTER_EVENT",image:{src:"https://assets.session.services/icon-bg.png",alt:"Session Services Logo",width:800,height:800},approval:"APPROVED",geohash:"r3gx1",location:{id:"loc_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney",address:"Sydney NSW 2000, Australia",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney"},tracking:{fbId:"485739562847563",gaId:"G-PSW1MY7HB4",tikTokId:"BQCKPH3RC77U8GPMLJ5G"},tenantId:"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",deleted:!1};e.Venue={id:"ven_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,locationId:"loc_01jqpjksnsen9vprw95et60t3m",approval:"APPROVED",name:"Sydney Opera House",slug:"sydney-opera-house",description:"Iconic performing arts venue in Sydney, Australia",type:"THEATER",logo:{src:"https://assets.session.services/venues/sydney-opera-house.png",alt:"Sydney Opera House",width:800,height:800},images:[{src:"https://assets.session.services/venues/sydney-opera-house-1.jpg",alt:"Sydney Opera House exterior",width:1920,height:1080}],contact:{email:"info@sydneyoperahouse.com",phone:"+61 2 9250 7111",website:"https://www.sydneyoperahouse.com",instagram:"https://instagram.com/sydneyoperahouse",facebook:"https://facebook.com/sydneyoperahouse",twitter:"https://twitter.com/sydneyoperahouse"},location:{id:"loc_01jqpjksnsen9vprw95et60t3m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Sydney Opera House",address:"Bennelong Point, Sydney NSW 2000",city:"Sydney",state:"New South Wales",postcode:"2000",country:"Australia",latitude:-33.8567844,longitude:151.2152967,timeZone:"Australia/Sydney",image:{src:"https://assets.session.services/locations/sydney-opera-house.jpg",alt:"Sydney Opera House",width:1200,height:800}},geohash:"r3gx2f9",capacity:5738,tenantId:t.id,deleted:!1};let o=e.PromoterMember={id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,userId:i.id,user:{id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,imageUrl:i.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id};e.TeamMember={id:"mbr_01jqpjksnsen9vprw95et60t2m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,userId:i.id,user:{id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,imageUrl:i.imageUrl},permissions:["*"],isOwner:!0,tenantId:t.id},e.TeamInvite={id:"inv_01jqpjksnsen9vprw95et60t4m",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),expiresAt:Math.floor(ed(new Date,7).getTime()/1e3),teamId:n.id,token:"a76e3c5d7109345b58e383e6d90f7728b75f9a38b727f0b9edd5b977e8c3b5d0",email:"team-invite@session.services",invitedBy:i.id,permissions:["event.write","order.write"],tenantId:t.id},e.CurrentSession={user:i,initials:"JM",isTenantAdmin:!0,promoters:[{...r,member:o}]},e.Session={id:"sess_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,expiresAt:ed(new Date,30).toISOString(),twoFactorVerified:!1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.BackupCode={id:"bkc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,code:"ABC123DEF456",used:!1,createdAt:(new Date).toISOString()},e.UserSession={id:"uss_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,ipAddress:"192.168.1.100",userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",location:"Sydney, Australia",isCurrent:!0,expiresAt:ed(new Date,30).toISOString(),createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.PasskeyCredential={id:"pkc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,name:"iPhone Touch ID",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!0,credentialBackupState:!1,credentialDeviceType:"singleDevice",counter:1,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.SecurityKeyCredential={id:"skc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,name:"YubiKey 5 NFC",credentialId:"cred_01jps5cgsd4tzjghtnt45qnhn0",credentialPublicKey:"pQECAyYgASFYIM...",credentialBackupEligible:!1,credentialBackupState:!1,credentialDeviceType:"crossPlatform",counter:5,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()},e.TOTPCredential={id:"tpc_01jps5cgsd4tzjghtnt45qnhn0",userId:i.id,tenantId:t.id,secret:"JBSWY3DPEHPK3PXP",verified:!0,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString()};let a=e.Location={id:"loc_01hk153x00eh99pagyydz03sbz",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJ6zWCPUyxEmsRmc6BPrNaP4s",name:"Watson's EQ",address:"The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",city:"Moore Park",state:"New South Wales",postcode:"2021",country:"Australia",latitude:-33.8944593,longitude:151.2252255,timeZone:"Australia/Sydney",types:["establishment","point_of_interest","restaurant","bar"],image:{src:"https://assets.session.services/locations/watsons-eq.jpg",alt:"Watson's EQ",width:1200,height:800}};e.CarouselLocation={id:"loc_01hk153x00efq9ygdkc9eb3rjt",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),googlePlaceId:"ChIJc8-zlGSvEmsR0rbZWpCP6z0",name:"Carousel Bar & Ballroom",address:"169 Oxford St, Darlinghurst NSW 2010, Australia",city:"Darlinghurst",state:"New South Wales",postcode:"2010",country:"Australia",latitude:-33.8803603,longitude:151.2161228,timeZone:"Australia/Sydney",types:["establishment","night_club","point_of_interest"],image:{src:"https://assets.session.services/locations/loc_01hk153x00efq9ygdkc9eb3rjt.jpg",alt:"Carousel Bar & Ballroom",width:1200,height:800}};let s=e.Event={id:"evt_01jps5cgsenjrazw6wswmyspa3",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Test Event",slug:"test-event",description:"This is only a test...",approval:"APPROVED",status:"UPCOMING",visibility:"PUBLIC",currency:"AUD",entryStartsAt:td(ed(new Date,1)),entryEndsAt:td(ed(new Date,2)),publishAt:td(new Date),images:{mobile:{src:"https://assets.session.services/event-mobile.jpg",alt:"Mobile Event Image",width:1080,height:1350},desktop:{src:"https://assets.session.services/event-desktop.jpg",alt:"Desktop Event Image",width:1920,height:1080}},geohash:"r3gx1",location:a,teamId:n.id,promoterId:r.id,tenantId:t.id,deleted:!1},d=e.Section={id:"sct_01jps5cgse0g3qj16kpq8t221r",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),teamId:n.id,promoterId:r.id,eventId:s.id,eventSlug:s.slug,name:"General Admission",capacity:1e3,limit:-1,available:700,sold:200,reserved:100,order:0,visibility:"ALWAYS",location:a,passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"},c=e.Admission={id:"adm_01jps5cgsee0xvapbk92e8eb4g",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sectionId:d.id,teamId:n.id,promoterId:r.id,eventId:s.id,eventSlug:s.slug,name:"Final Release",subtitle:"Entry before 10pm",description:"Early bird pricing with priority entry. Must present valid ID at gate.",capacity:1e5,limit:-1,available:7e4,sold:2e4,reserved:1e4,order:0,entryStartsAt:td(ed(new Date,1)),entryEndsAt:td(ed(new Date,2)),saleStartsAt:td(new Date),saleEndsAt:td(ed(new Date,2)),saleEndsBehavior:"SALE_ENDED",price:{base:1e3,booking:200,currency:"AUD"},visibility:"ALWAYS",passcode:void 0,tenantId:t.id,deleted:!1,orderPadded:"0000000000"};e.DetailedEvent={...s,admissions:[c],sections:[d]};let l=e.Beneficiary={id:"ben_01jps5cgse5n6mg1ymkew9tsfh",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"My Bank Account",currency:"AUD",gatewayId:"7489cb17-24c5-4acf-a0cf-d93ed38081fe",gateway:"AIRWALLEX",teamId:n.id,teamIds:[n.id],venueIds:[],tenantId:t.id};e.AirwallexBeneficiary={transfer_methods:["LOCAL"],beneficiary:{additional_info:{personal_email:"test@session.services"},address:{city:"Sydney",country_code:"AU",postcode:"2000",state:"AU-NSW",street_address:"123 George Street"},bank_details:{account_currency:"AUD",account_name:"John Doe",account_number:"999994",account_routing_type1:"bsb",account_routing_value1:"062004",bank_country_code:"AU",local_clearing_system:"BANK_TRANSFER"},entity_type:"PERSONAL",company_name:"Doe Enterprises Pty Ltd",first_name:"John",last_name:"Doe"}};let u=e.Coupon={id:"cpn_01jps5cgsfzs1ksqaet5hba8ac",couponId:"cpn_01jps5cgsfzs1ksqaet5hba8ac",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"TEAM",currency:"AUD",discount:50,uses:0,limit:-1,orderLimit:void 0,membersOnly:!1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:n.id,tenantId:t.id,deleted:!1},p=e.CouponCode={id:"cod_01jps5cgsfzftw7hxcvr2wftk2",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST50",uses:0,tenantId:t.id,couponId:u.id,teamId:n.id,deleted:!1},m=e.AmountCoupon={id:"cpn_01jps5cgsfndn8jcsfvh72x811",couponId:"cpn_01jps5cgsfndn8jcsfvh72x811",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),name:"Half Price",active:!0,kind:"PERCENT",filter:"EVENTS",currency:"AUD",eventIds:[s.id],discount:50,uses:0,limit:-1,saleStartsAt:"2025-02-10T03:00:00",saleEndsAt:void 0,deletedAt:void 0,teamId:n.id,tenantId:t.id};e.AmountCouponCode={id:"cod_01jps5cgsfq06xvvhg0hn2rdzd",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),active:!0,name:"TEST5DOLLAR",uses:0,tenantId:t.id,couponId:m.id,teamId:n.id};let h=e.Customer={id:"cus_01jps5cgsf4pn2a32eamppnap1",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),firstName:"Test",lastName:"User",email:"test@session.services",phone:"+61411111111",tenantId:t.id},f=e.PayoutTransfer={id:"xfr_01jq8s6c38f97w9yfrfcdhf47v",createdAt:(new Date).toISOString(),kind:"TICKETS",amount:1e3,currency:"AUD",fee:0,feeCurrency:"AUD",reference:"XYZ",gateway:"AIRWALLEX",gatewayId:"fe33fb0f-d9d8-47cd-8eef-6a19bd6223eb",beneficiary:l.name,beneficiaryId:l.id};e.PayoutDeduction={id:"pdn_01jq8s6c38f97w9yfrfcdhf47v",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),amount:-1e3,currency:"AUD",description:"Legacy payout deduction",gateway:"AIRWALLEX",gatewayId:"fe33fb0f-d9d8-47cd-8eef-6a19bd6223eb",beneficiary:l.name,beneficiaryId:l.id};let y=e.Payout={id:"pyt_01jps5cgsfv2wre6hd0rc4w4t8",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),paidAt:(new Date).toISOString(),status:"PAID",method:"AIRWALLEX",structure:"DEFAULT",approval:"PENDING",frequency:"AFTER_EVENT",transfers:[f],event:{id:s.id,name:s.name,slug:s.slug,location:s.location.name},price:{net:1e3,total:1e3,gross:1e3,base:1e3,booking:0,refunded:0,discount:0,gateway:0,dispute:0,deductions:0,shipping:0,sms:0,currency:"AUD"},eventId:s.id,teamId:n.id,promoterId:r.id,promoterSlug:r.slug,tenantId:t.id},g=e.OrderItem={id:"itm_01jps5cgsfwyxj0516571eaf17",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),orderId:"ord_01jps5cgsfgve5b5g2666kyryh",kind:"ADMISSION",quantity:2,admissionId:c.id,sectionId:d.id,price:{net:c.price.base+c.price.booking,total:c.price.base+c.price.booking,gross:c.price.base+c.price.booking,base:c.price.base,booking:c.price.booking,refunded:0,discount:0,currency:c.price.currency}};e.OrderFee={id:"fee_01jps5cgsgamykd6kh2t738qkh",createdAt:(new Date).toISOString(),reason:"Gateway Fee",amount:-30,currency:"AUD",requestId:"att_sgpdz4v2ph1axmdmdx8_m8w6qv"};let v=e.OrderOffer={kind:"SMS_DELIVERY",label:"SMS ticket delivery",price:{amount:200,currency:"AUD"}},b=e.Order={id:"ord_01jps5cgsfgve5b5g2666kyryh",token:"c76e3a5d7105345b58e383e6d90fe7728b75f938b727f0b9ecc5b977e8c3b5d0",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),reservedAt:(new Date).toISOString(),status:"PENDING",price:{net:500,total:1400,gross:2200,base:1e3,booking:400,discount:-1e3,refunded:-700,gateway:0,dispute:0,shipping:0,sms:200,currency:"AUD"},code:{id:p.id,name:p.name},event:{id:s.id,name:s.name,slug:s.slug},fees:[],items:[g],customer:nd.Customer,customerId:nd.Customer.id,teamId:nd.Team.id,promoterId:nd.Promoter.id,promoterSlug:nd.Promoter.slug,eventId:nd.Event.id,eventSlug:nd.Event.slug,payment:{method:"AIRWALLEX",source:"CARD"},payoutIds:[y.id],refunds:[],offers:[v],tenantId:nd.Tenant.id,checkoutUrl:t.baseUrl.dev+"/checkout/ord_01jps5cgsfgve5b5g2666kyryh",signature:"Q2hXbG9uZ1NpZzE2"},w=e.TicketScan={id:"scn_01jq4rjmtzyzgtsavn9f34mxan",scannedAt:(new Date).toISOString(),scannedBy:{id:i.id,firstName:i.firstName,lastName:i.lastName,email:i.email},scannedById:i.id,deviceId:"dev_01jq4rjvrgar43zwvyakbje22m",kind:"CHECK_IN"};e.OrderRefund={id:"rfd_01jps5cgsfgve5b5g2666kyryh",request:{idempotencyKey:"refund_12345_customer_request"},status:"SUCCEEDED",acceptedAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),price:{currency:"AUD",total:1200,items:1200,shipping:0,fees:0},reason:"CUSTOMER_REQUEST",note:"Customer requested refund due to schedule conflict",tickets:{cancelRequested:!0,cancelled:!0,cancelledCount:2},gateway:{provider:"STRIPE",refundId:"re_1234567890abcdef",idempotencyKey:"rfd_01jps5cgsfgve5b5g2666kyryh"},actor:{type:"USER",userId:i.id},notification:{requested:!0,sentAt:(new Date).toISOString()},createdAt:(new Date).toISOString()},e.OrderRefundItem={orderItemId:g.id,quantity:2,amount:1200,ticketIds:["tkt_01jps5cgsg0s32w2pr73vbccde"]},e.Notification={id:"ntf_01jps5cgsfgve5b5g2666kyryh",aggregateType:"ORDER",aggregateId:b.id,eventId:s.id,kind:"ORDER_CONFIRMATION",channel:"EMAIL",status:"DELIVERED",providerMessageId:"msg_abc123def456",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),sentAt:(new Date).toISOString(),deliveredAt:(new Date).toISOString(),failedAt:(new Date).toISOString(),failureCode:"BOUNCE",failureReason:"Mailbox unavailable",tenantId:t.id},e.Timeline={id:"tln_01jps5cgsfgve5b5g2666kyryh"},e.SmsOrder={id:"ord_01k74g0tbwfvnb7b0e2esms001"},e.Ticket={id:"tkt_01jps5cgsg0s32w2pr73vbccde",createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),status:"REDEEMED",scans:[w],token:"7b81e13025f78f9935d5933eec3ab25e3c2bb811c99f2470182dd6ba4394ff82",attendee:{email:h.email,firstName:h.firstName,lastName:h.lastName},event:{id:s.id,name:s.name,slug:s.slug,location:s.location,entryStartsAt:s.entryStartsAt,entryEndsAt:s.entryEndsAt,images:s.images},admission:{id:c.id,name:c.name,price:c.price,entryStartsAt:c.entryStartsAt,entryEndsAt:c.entryEndsAt},eventId:s.id,admissionId:c.id,customerId:h.id,orderId:b.id,orderItemId:g.id,teamId:n.id,promoterId:r.id,promoterSlug:r.slug,tenantId:t.id}}(nd||={});const sd=Oo(["PENDING","APPROVED","REJECTED"]).meta({description:"Approval status. PENDING: awaiting review, APPROVED: approved for operation, REJECTED: rejected and cannot operate"}),dd=new Set("AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" ")),cd=kr().trim().toUpperCase().regex(/^[A-Z]{2}$/,"Enter a two-letter ISO country code").refine((e=>dd.has(e)),{message:"Enter an assigned ISO country code"}).meta({description:"ISO 3166-1 alpha-2 country code",examples:["AU"]}),ld=Oo("AED.ALL.AMD.ANG.AOA.ARS.AUD.AWG.AZN.BAM.BBD.BDT.BGN.BHD.BIF.BMD.BND.BOB.BRL.BSD.BTN.BWP.BZD.CAD.CHF.CLP.CNY.COP.CRC.CVE.CZK.DJF.DKK.DOP.DZD.EGP.ERN.ETB.EUR.FJD.FKP.GBP.GEL.GHS.GIP.GMD.GNF.GTQ.GYD.HKD.HNL.HUF.IDR.ILS.INR.ISK.JMD.JOD.JPY.KES.KGS.KHR.KMF.KRW.KWD.KYD.KZT.LAK.LBP.LKR.LRD.LSL.LYD.MAD.MDL.MGA.MKD.MNT.MOP.MUR.MVR.MWK.MXN.MYR.NAD.NGN.NIO.NOK.NPR.NZD.OMR.PAB.PEN.PGK.PHP.PKR.PLN.PYG.QAR.RON.RSD.RWF.SAR.SBD.SCR.SEK.SGD.SHP.SLE.SRD.SVC.SZL.THB.TJS.TMT.TND.TOP.TRY.TTD.TWD.TZS.UAH.UGX.USD.UYU.UZS.VND.VUV.WST.XAF.XCD.XOF.XPF.ZAR.ZMW.ZWL".split(".")).meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for transactions and payouts"}),ud={BAD_REQUEST:{status:400},INPUT_VALIDATION_FAILED:{status:422,data:wo({formErrors:vo(kr()),fieldErrors:So(kr(),vo(kr()))})},UNAUTHORIZED:{status:401},FORBIDDEN:{status:403},NOT_FOUND:{status:404},CONFLICT:{status:409},PRECONDITION_FAILED:{status:412},TOO_MANY_REQUESTS:{status:429},INTERNAL_SERVER_ERROR:{status:500},NOT_IMPLEMENTED:{status:501},SERVICE_UNAVAILABLE:{status:503}},pd=Oo([{category:"Day Party",group:"Event Type",priority:"core",notes:'Daytime or afternoon-focused event, often starting before evening and ending earlier than club nights; common signals include "day party", "day sesh", "Sunday session", "afternoon", "sunset", "courtyard", "rooftop", "poolside" or "open air".'},{category:"Festival",group:"Event Type",priority:"core",notes:'Large-scale event with multiple artists, stages, areas, brands or sessions; may run all day, across multiple days, or as a major ticketed programme; match terms like "festival", "lineup", "multi-stage", "weekender", "one-day festival" or "camping".'},{category:"Club Night",group:"Event Type",priority:"core",notes:'DJ-led nightclub or club-room event, usually late-night and dancefloor-focused; match "club night", "nightclub", "club room", "resident DJ", "guest DJ", "DJ sets", "all night" or explicitly club-focused programming. Do not use for every electronic event or DJ set without a club/nightclub context.'},{category:"Concert",group:"Event Type",priority:"high",notes:'Headline live music event in a concert, gig, theatre, arena or show format; match "concert", "gig", "headline show", "live show", "tour date", "arena", "theatre" or "standing room". Use alongside "Live Performance" when live performers are explicit.'},{category:"Listening Party",group:"Event Type",priority:"medium",notes:'Playback, album launch or listening-focused event centred on hearing recorded music together; match "listening party", "album playback", "record launch", "listening session", "label preview" or "listening bar".'},{category:"Workshop",group:"Event Type",priority:"medium",notes:'Educational, participatory or skills-focused event; match "workshop", "masterclass", "clinic", "class", "seminar", "producer workshop", "DJ workshop" or "hands-on session".'},{category:"Afterparty",group:"Event Type",priority:"high",notes:'Post-main-event continuation, usually late-night or early-morning, often tied to a festival, concert, gig, show, launch or headline act; match "official afterparty", "after party", "kick-ons", "continue the night" or "late-night session".'},{category:"Boat Party",group:"Event Type",priority:"high",notes:'Event held on a boat, yacht, harbour cruise or floating venue; strong signals include "boat party", "cruise", "harbour", "on the water", "boarding time", "sailing", "wharf", "dock" or "yacht".'},{category:"Pool Party",group:"Event Type",priority:"high",notes:'Party centred around a pool, resort, hotel or swim-friendly venue; usually daytime or summer-focused; match "pool party", "poolside", "swimwear", "cabana", "resort", "hotel pool", "daybed" or "summer session".'},{category:"Live Performance",group:"Event Type",priority:"high",notes:'Event includes live acts, bands, vocalists, instrumentalists or live electronic performance rather than only DJ sets; match "live", "live set", "performing live", "band", "vocalist", "singer", "instrumental", "live show" or "concert".'},{category:"Warehouse",group:"Venue Type",priority:"core",notes:'Industrial, raw or repurposed warehouse-style venue; often underground, large-room, concrete, late-night or rave-oriented; match "warehouse", "industrial space", "secret warehouse", "inner west warehouse", "factory", "converted space" or "underground location".'},{category:"Nightclub",group:"Venue Type",priority:"core",notes:'Purpose-built nightlife or dance venue, club room or nightclub setting; match "nightclub", "night club", "club room", "dance club" or venues explicitly described as clubs. This describes the venue, not the event programme.'},{category:"Bar",group:"Venue Type",priority:"core",notes:'Event held at a bar, pub, tavern or cocktail bar; match "bar", "pub", "tavern", "cocktail bar", "wine bar" or "hotel bar". Do not use for every venue with a bar service.'},{category:"Open Air",group:"Venue Type",priority:"core",notes:'Outdoor event in an uncovered or partly outdoor setting; match "open air", "outdoor", "under the sky", "courtyard", "garden", "terrace", "park", "field", "amphitheatre" or "sunset session".'},{category:"Arena",group:"Venue Type",priority:"high",notes:'Large indoor arena, stadium or major venue built for high-capacity concerts, sports or touring shows; match "arena", "stadium", "entertainment centre", "exhibition centre" or "convention centre".'},{category:"Rooftop",group:"Venue Type",priority:"high",notes:'Event held on a rooftop, terrace or elevated city-view venue; often summer, sunset, cocktail or skyline-focused; match "rooftop", "terrace", "skyline", "city views", "above the city", "sunset rooftop" or "open-air rooftop".'},{category:"Beach Party",group:"Venue Type",priority:"high",notes:'Coastal, beachfront or seaside event; may be on the sand, near the beach, at a beach club or coastal venue; match "beach party", "beachfront", "seaside", "coastal", "on the sand", "ocean views" or "beach club".'},{category:"Secret Location",group:"Venue Type",priority:"high",notes:'Venue is hidden, TBA, revealed later or sent only to ticket holders; common in underground, warehouse and rave events; match "secret location", "TBA", "location revealed", "address released", "SMS location" or "ticket holders only".'},{category:"DIY",group:"Venue Type",priority:"medium",notes:'Independent, self-organised or non-traditional event, often in unconventional spaces, bush settings or community-run venues; match "DIY", "bush doof", "renegade", "self-organised", "community-run", "off-grid" or "independent party".'},{category:"Basement",group:"Venue Type",priority:"medium",notes:'Small, low-ceiling, underground or downstairs venue; usually intimate, dark, club-focused or late-night; match "basement", "cellar", "downstairs", "underground room", "low ceiling" or "intimate club room".'},{category:"Free Entry",group:"Entry",priority:"core",notes:'No ticket or cover charge required to attend; match "free entry", "free event", "no cover", "free before", "RSVP free", "complimentary entry" or "walk-ins welcome". Do not confuse with free RSVP if paid entry may still apply.'},{category:"Donation",group:"Entry",priority:"medium",notes:'Entry is by donation, pay-what-you-can or voluntary contribution rather than a fixed ticket price; match "donation", "pay what you want", "PWYW", "suggested donation", "gold coin" or "contribute at the door".'},{category:"Vinyl Only",group:"Music",priority:"high",notes:'DJs perform using vinyl records only, usually signalling collector, selector, audiophile or purist culture; match "vinyl only", "all vinyl", "records only", "turntables", "wax", "crate diggers" or "strictly vinyl".'},{category:"Silent Disco",group:"Music",priority:"medium",notes:'Attendees listen through wireless headphones rather than a traditional speaker system; often multiple channels or DJs; match "silent disco", "headphone party", "wireless headphones", "choose your channel" or "multi-channel headphones".'},{category:"Underground",group:"Vibe",priority:"high",notes:'Non-mainstream, independent or subcultural event with raw, niche, alternative or anti-commercial positioning; match "underground", "leftfield", "subculture", "no frills", "raw", "for the heads", "heads only" or "off the beaten path".'},{category:"Intimate",group:"Vibe",priority:"high",notes:'Small-capacity, close-quarters or personal event; often limited tickets, small room, listening bar or community feel; match "intimate", "limited capacity", "small room", "close and personal", "cosy", "private" or "exclusive".'},{category:"Queer Friendly",group:"Vibe",priority:"high",notes:'Event explicitly welcomes, centres or is safe for LGBTQI+ communities; match "queer", "LGBTQI+", "LGBTQIA+", "gay", "trans inclusive", "rainbow community", "queer-friendly" or "queer party". Use when identity/community focus is explicit.'},{category:"FLINTA",group:"Vibe",priority:"high",notes:'Event explicitly centres or welcomes women, lesbians, intersex, non-binary, trans and agender people; match "FLINTA", "FLINTA*", "women and gender diverse", "trans and non-binary", "femme-led" or "gender-diverse community".'},{category:"Safe Space",group:"Vibe",priority:"high",notes:'Event emphasises inclusion, consent, harm minimisation, anti-harassment or community safety policies; match "safe space", "safer space", "consent policy", "zero tolerance", "harm reduction", "inclusive space" or "respectful dancefloor".'},{category:"No Photos",group:"Vibe",priority:"medium",notes:'Event discourages or bans photography/video to protect privacy, immersion or dancefloor culture; match "no photos", "no filming", "no cameras", "phone stickers", "camera policy", "be present" or "respect the dancefloor".'},{category:"Rave",group:"Vibe",priority:"high",notes:'High-energy dance event rooted in rave culture; often late-night, warehouse, underground, fast, heavy or euphoric; match "rave", "all-night", "warehouse rave", "doof", "hard dance", "strobe", "lasers" or "rave culture".'},{category:"BYO",group:"Amenities",priority:"core",notes:'Attendees can or must bring their own alcohol, drinks or supplies; match "BYO", "bring your own", "bring drinks", "no bar", "esky", "cooler", "bottle shop run" or "self-catered drinks".'},{category:"Cash Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall accepts cash but not card payments; match "cash only", "bring cash", "no EFTPOS", "no card", "cash at the door" or "ATM nearby".'},{category:"Card Only",group:"Amenities",priority:"medium",notes:'Venue, bar, door or stall is cashless and accepts card or digital payments only; match "card only", "cashless", "no cash", "tap only", "EFTPOS only" or "card payments only".'},{category:"Food Available",group:"Amenities",priority:"medium",notes:'Food is available at or near the event through vendors, kitchen, food trucks or venue menu; match "food available", "food trucks", "kitchen open", "snacks", "menu", "vendors", "street food" or "dinner available".'},{category:"Dress Code",group:"Other",priority:"high",notes:'Event requires, encourages or enforces specific clothing, theme, footwear or presentation; match "dress code", "strict dress code", "theme", "costume", "black tie", "no thongs", "collared shirts", "dress to impress" or "entry may be refused".'}].map((e=>e.category))),md=vo(pd).max(10).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10 categories)",examples:[["Day Party","Open Air","Free Entry"]]}),hd=Oo([{genre:"House",category:"House",priority:"core",notes:"Broad 4/4 dance music rooted in Chicago house; warm grooves, steady kicks, club-focused; use when event says house music generally without a clear subgenre."},{genre:"Deep House",category:"House",priority:"core",notes:"Smooth, warm, soulful or jazzy house; deeper basslines, softer drums, slower club tempo; often described as intimate, sophisticated, sunset, lounge or underground."},{genre:"Tech House",category:"House",priority:"core",notes:"Groovy house with techno-influenced drums, rolling basslines, minimal vocals and big club energy; common in Ibiza, festivals, commercial underground and peak-time club events."},{genre:"Progressive House",category:"House",priority:"core",notes:"Melodic house with long builds, emotional breakdowns and gradual progression; often associated with mainstage, euphoric, cinematic or journey-style sets."},{genre:"Minimal House",category:"House",priority:"core",notes:"Stripped-back, repetitive house with sparse percussion, subtle grooves and restrained arrangements; common in European club, afterhours and vinyl-focused events."},{genre:"Romanian Minimal",category:"House",priority:"core",notes:'Hypnotic, micro-detailed minimal house/techno linked to Romania; long-form grooves, subtle swing, deep rolling bass, afterhours, vinyl, underground and "ro-minimal" wording.'},{genre:"Afro House",category:"House",priority:"core",notes:"House music with African percussion, polyrhythms, chants, soulful vocals and warm melodic grooves; often spiritual, organic, sunset, beach club or global house oriented."},{genre:"Afro Tech",category:"House",priority:"core",notes:"Darker, tougher and more electronic Afro House; heavier drums, driving bass, tribal percussion and peak-time club energy; sits between Afro House and melodic techno."},{genre:"Acid House",category:"House",priority:"high",notes:"House built around squelchy Roland TB-303 acid basslines; raw, psychedelic, ravey or retro Chicago/UK warehouse references."},{genre:"Funky House",category:"House",priority:"high",notes:"Upbeat, feel-good house with funk, disco samples, bass guitar grooves, bright hooks and party-friendly energy; often vocal, summery or nostalgic."},{genre:"Jackin House",category:"House",priority:"high",notes:"Bouncy Chicago-style house with shuffled drums, chunky grooves, cut-up samples and playful energy; often raw, funky, loop-based and dancefloor-driven."},{genre:"Soulful House",category:"House",priority:"medium",notes:"Vocal-led house with gospel, soul and R&B influence; rich chords, emotional vocals, uplifting messages and warm classic house feel."},{genre:"Melodic House",category:"House",priority:"high",notes:"Modern melodic, emotional house with polished production, arpeggios, atmospheric pads and deep/progressive feel; often Anjunadeep, sunset, rooftop or organic club energy."},{genre:"Latin House",category:"House",priority:"medium",notes:"House with Latin percussion, Spanish or Portuguese vocals, salsa, samba, reggaeton or Afro-Latin rhythmic influence; upbeat, percussive and dancefloor-friendly."},{genre:"Techno",category:"Techno",priority:"core",notes:"Broad 4/4 electronic club music rooted in Detroit and Berlin; repetitive, mechanical, driving, hypnotic or warehouse-focused; use when techno is named without a clearer subtype."},{genre:"Melodic Techno",category:"Techno",priority:"core",notes:"Emotional, cinematic techno with big synth melodies, arpeggios, dark builds and dramatic drops; often Afterlife, Tale Of Us, lasers, visuals or large-room events."},{genre:"Hard Techno",category:"Techno",priority:"core",notes:"Fast, aggressive techno with pounding kicks, distorted drums, high energy and rave/warehouse intensity; often 145+ BPM and associated with modern hard rave trends."},{genre:"Industrial Techno",category:"Techno",priority:"high",notes:"Dark, harsh techno with distorted kicks, metallic percussion, noise textures and warehouse or dystopian aesthetics; more abrasive than standard techno."},{genre:"Minimal Techno",category:"Techno",priority:"high",notes:"Stripped-back techno built from repetition, subtle changes, sparse drums and hypnotic grooves; less melodic and more mechanical than minimal house."},{genre:"Detroit Techno",category:"Techno",priority:"medium",notes:"Techno rooted in Detroit's futuristic, soulful and machine-funk sound; classic, purist, historical or old-school techno references."},{genre:"Dub Techno",category:"Techno",priority:"medium",notes:"Deep techno with dub chords, echo, reverb, spacious atmospheres and slow hypnotic movement; often smoky, deep, aquatic or meditative."},{genre:"Acid Techno",category:"Techno",priority:"medium",notes:"Techno driven by squelchy 303 acid lines, looping percussion and rave energy; harder and more driving than acid house."},{genre:"Hypnotic Techno",category:"Techno",priority:"medium",notes:"Repetitive, deep, rolling techno designed for trance-like immersion; subtle loops, long blends, minimal melody and underground warehouse feel."},{genre:"Drum & Bass",category:"Bass",priority:"core",notes:"Fast breakbeat music around 160-180 BPM with heavy basslines and chopped drums; use for D&B, drum and bass, rollers, jump-up or bass-heavy rave events."},{genre:"Jungle",category:"Bass",priority:"core",notes:"Breakbeat-heavy precursor to D&B with chopped amen breaks, reggae/dub samples, ragga vocals and 90s UK rave energy."},{genre:"Dubstep",category:"Bass",priority:"core",notes:"Bass-heavy UK-origin genre around 140 BPM; half-time drums, sub-bass, wobble bass, dark atmospheres or aggressive drops."},{genre:"Bass House",category:"Bass",priority:"core",notes:"House-tempo club music with heavy bass drops, punchy drums and EDM/festival energy; blends house groove with dubstep or bass music sound design."},{genre:"Breakbeat",category:"Bass",priority:"core",notes:"Electronic music built on syncopated broken drum patterns instead of straight 4/4; often rave, electro, UK club, breaks or old-school references."},{genre:"UK Garage",category:"Bass",priority:"core",notes:'Skippy UK club music with swung 2-step rhythms, chopped vocals, sub-bass and soulful/R&B influence; often "UKG", "garage", "2-step" or "speed garage".'},{genre:"Bassline",category:"Bass",priority:"high",notes:"UK 4x4 garage-derived bass music with warping basslines, fast club energy and playful vocal chops; often northern UK or speed garage adjacent."},{genre:"Grime",category:"Bass",priority:"high",notes:"UK rap and electronic bass hybrid around 140 BPM; MC-led, sparse beats, aggressive flows, eski sounds and London street culture references."},{genre:"Liquid DnB",category:"Bass",priority:"medium",notes:"Melodic, smooth and soulful drum & bass; rolling breaks, warm bass, vocals, pads and emotional or uplifting atmosphere."},{genre:"Neurofunk",category:"Bass",priority:"medium",notes:"Technical, dark and aggressive drum & bass with complex bass sound design, precise drums and futuristic, intense energy."},{genre:"Footwork",category:"Bass",priority:"medium",notes:"Fast Chicago club style around 160 BPM with syncopated kicks, chopped vocal samples and jittery rhythms; related to juke and dance battles."},{genre:"Jersey Club",category:"Bass",priority:"medium",notes:"Fast, bouncy US club music with chopped samples, triplet kick patterns and call-and-response energy; often party, dance challenge or club edit focused."},{genre:"Trance",category:"Trance",priority:"core",notes:"Euphoric electronic dance music with emotional melodies, long builds, breakdowns and big climaxes; often 90s, festival, uplifting or hands-in-the-air language."},{genre:"Psytrance",category:"Trance",priority:"core",notes:"Fast psychedelic trance with rolling basslines, hypnotic repetition, alien/psychedelic sound design and outdoor festival or doof culture references."},{genre:"Progressive Trance",category:"Trance",priority:"high",notes:"Smoother, slower trance with gradual melodic builds, deep atmospheres and less explosive drops than uplifting trance; often journey-based and emotional."},{genre:"Disco",category:"Disco",priority:"core",notes:"Classic dance music with live-sounding drums, strings, funk bass, soul vocals and 70s/80s references; use for retro disco, disco party or classic dance events."},{genre:"Nu Disco",category:"Disco",priority:"core",notes:"Modern electronic disco with polished production, house tempo, funk basslines, synths and retro dancefloor feel; often contemporary disco edits or poolside energy."},{genre:"Italo Disco",category:"Disco",priority:"medium",notes:"European 80s disco style with synth bass, drum machines, dramatic vocals and retro-futurist melodies; often Italian, cult, synth-heavy or nostalgic."},{genre:"Funk",category:"Disco",priority:"high",notes:"Groove-based music with syncopated bass, live drums, brass, guitars and rhythmic vocals; often party, rare groove, soul-funk or dancefloor classics."},{genre:"Soul",category:"Disco",priority:"medium",notes:"Vocal-focused music rooted in R&B, gospel and Motown traditions; emotional vocals, warm instrumentation and classic groove; may overlap with disco and house roots."},{genre:"Balearic",category:"Disco",priority:"medium",notes:"Eclectic Ibiza-influenced sound blending downtempo, disco, house, pop, world and chillout; sunset, beach, terrace, poolside or open-air language."},{genre:"Hardcore",category:"Hard Dance",priority:"high",notes:"Very fast, intense rave music with distorted kicks, aggressive synths and high BPM; use when event says hardcore, ravecore or extreme hard dance."},{genre:"Hardstyle",category:"Hard Dance",priority:"high",notes:"Dutch-origin hard dance with distorted reverse-bass kicks, euphoric melodies, screeches and festival anthems; usually around 150 BPM."},{genre:"Gabber",category:"Hard Dance",priority:"low",notes:"Extreme Dutch hardcore style with very fast BPM, distorted kicks, raw rave energy and Rotterdam/hakken culture references."},{genre:"Happy Hardcore",category:"Hard Dance",priority:"low",notes:"Fast, euphoric hardcore with bright melodies, pitched-up vocals, piano riffs and 90s UK rave nostalgia; playful rather than dark."},{genre:"Amapiano",category:"Global",priority:"core",notes:"South African club music with log drums, shakers, jazzy chords, smooth vocals and laid-back but danceable grooves; often piano-led and percussive."},{genre:"Gqom",category:"Global",priority:"high",notes:"Dark, minimal South African club sound from Durban; heavy broken rhythms, raw percussion, sparse vocals and intense hypnotic energy."},{genre:"Afrobeats",category:"Global",priority:"core",notes:"West African pop and club sound, especially Nigerian/Ghanaian; melodic vocals, dancehall/highlife/hip-hop influence, warm rhythms and mainstream crossover."},{genre:"Kuduro",category:"Global",priority:"medium",notes:"Angolan and Portuguese club music with fast, hard percussion, energetic chants and raw dancefloor intensity; often Afro-Portuguese or Lisbon club references."},{genre:"Singeli",category:"Global",priority:"low",notes:"Extremely fast Tanzanian electronic dance music, often 180-220+ BPM; frantic rhythms, rapid vocals and high-energy East African street sound."},{genre:"Baile Funk",category:"Global",priority:"high",notes:"Brazilian funk carioca with heavy drums, MC vocals, Portuguese lyrics and raw party energy; often Rio, favela, proibidao or funk mandelao references."},{genre:"Reggaeton",category:"Global",priority:"high",notes:"Latin urban dance music with dembow rhythm, Spanish vocals, pop/hip-hop influence and mainstream club appeal; often perreo or Latin party events."},{genre:"Dancehall",category:"Global",priority:"high",notes:"Jamaican club music with riddims, patois vocals, reggae influence and sound system culture; can be party, bashment, Caribbean or crossover pop."},{genre:"Dembow",category:"Global",priority:"medium",notes:"Dominican-origin club style built on repetitive dembow rhythm, Spanish MC vocals and raw Latin street-party energy; more minimal and percussive than reggaeton."},{genre:"Ambient",category:"Downtempo",priority:"high",notes:"Atmospheric, beatless or low-rhythm electronic music focused on texture, mood and space; suited to listening rooms, chill rooms, sound baths or pre/post-event settings."},{genre:"Downtempo",category:"Downtempo",priority:"high",notes:"Slower electronic music with relaxed beats, warm textures and lounge/chillout feel; use for chill, sunset, listening, cafe, pre-party or afterhours decompression events."},{genre:"Electronica",category:"Downtempo",priority:"high",notes:"Broad non-club-focused electronic music; experimental, melodic, listening-oriented or pop-adjacent; use when event says electronic but not clearly house/techno/bass."},{genre:"Trip Hop",category:"Downtempo",priority:"low",notes:"Moody 90s Bristol sound blending hip-hop beats, dub, soul, jazz and atmospheric vocals; dark, smoky, cinematic or Massive Attack/Portishead references."},{genre:"Lo-Fi",category:"Downtempo",priority:"medium",notes:"Relaxed, hazy, imperfect-sounding beats with soft drums, samples, jazz chords and study/chill aesthetics; often lo-fi hip-hop or bedroom production references."},{genre:"Electro",category:"Electronic",priority:"core",notes:"Syncopated electronic music with 808 drums, robotic funk, vocoders, breakbeats and Detroit/80s futurism; distinct from electro-house."},{genre:"Synth Pop",category:"Electronic",priority:"medium",notes:"Pop-oriented electronic music with catchy vocals, 80s synths, drum machines and new wave influence; often retro, nostalgic or indie-pop crossover."},{genre:"Industrial",category:"Electronic",priority:"medium",notes:"Dark electronic or rock-influenced music with harsh textures, machine rhythms, noise and dystopian aesthetics; may overlap with EBM and industrial techno."},{genre:"EBM",category:"Electronic",priority:"low",notes:"Electronic Body Music: hard, repetitive industrial dance with shouted vocals, rigid basslines and militaristic rhythms; 80s/Belgian/German club references."},{genre:"Indie Dance",category:"Electronic",priority:"high",notes:"Danceable blend of indie rock, disco, synth pop and electronic production; often band/DJ crossover, nu-disco-adjacent, stylish or alternative club sound."},{genre:"Experimental",category:"Electronic",priority:"medium",notes:"Unconventional electronic music that avoids standard genre structures; abstract, avant-garde, noise, leftfield, art-focused or boundary-pushing events."},{genre:"Hip-Hop",category:"Non-Electronic",priority:"high",notes:"Rap-led music with beats, MCs, sampling, trap, boom bap or old-school references; use for hip-hop parties, rap nights or DJ sets centred on rap."},{genre:"R&B",category:"Non-Electronic",priority:"high",notes:"Smooth vocal-led music with soul, hip-hop and pop influence; 90s/2000s R&B, slow jams, contemporary R&B or club crossover events."},{genre:"Jazz",category:"Non-Electronic",priority:"medium",notes:"Improvised or live instrumental music with swing, bebop, fusion, soul-jazz or jazz club references; often live band or listening-focused."},{genre:"Pop",category:"Non-Electronic",priority:"medium",notes:"Mainstream, chart-focused music with recognisable hits, singalong vocals and broad commercial appeal; use for general pop parties or top-40 events."},{genre:"Rock",category:"Non-Electronic",priority:"low",notes:"Guitar-driven band music; indie rock, classic rock, punk, alternative or live venue references; usually non-electronic unless explicitly DJ edits."},{genre:"Reggae",category:"Non-Electronic",priority:"medium",notes:"Jamaican-origin music with offbeat guitar rhythms, dub influence, roots vocals and sound system culture; includes roots, dub and reggae parties."},{genre:"Live",category:"Non-Electronic",priority:"medium",notes:"Event is centred on live performance rather than DJ genre; bands, singers, instrumentalists or live electronic acts; use only when performance format is the key signal."}].map((e=>e.genre))),fd=vo(hd).min(1).max(5).meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]});function yd(e,t){return kr().regex(RegExp(`^${e}_[0-9a-z]{26}$`),`Must be a valid ${t} ID`).describe(`Unique ${t} identifier`)}vo(hd).max(5).optional().meta({description:"Music genres for the event (up to 5 genres)",examples:[["Tech House","Melodic Techno"]]});const gd=yd("tem","team"),vd=yd("txp","tax profile");yd("tnt","tenant");const bd=yd("tdl","team deletion operation"),wd=yd("evt","event"),$d=yd("ven","venue"),Id=yd("loc","location"),Ed=yd("usr","user"),kd=yd("cnl","order cancellation"),Td=yd("ord","order"),Ad=yd("tkt","ticket"),xd=yd("pmt","promoter");yd("cpn","coupon"),yd("cod","coupon code");const Sd=yd("cus","customer"),Dd=yd("adm","admission"),Od=yd("sct","section");yd("ben","beneficiary");const Cd=yd("pyt","payout"),Pd=yd("mbr","team member"),_d=yd("inv","team invite"),Rd=yd("ecl","event collaborator"),Nd=yd("psc","permission scope"),Md=yd("prl","permission role"),Ud=yd("ntf","notification"),Ld=yd("int","integration"),jd=yd("ibf","integration backfill"),qd=wo({src:Nr().meta({examples:["https://assets.session.services/my-image.jpg"]}),alt:kr().meta({examples:["My Image"]}),width:Qr().meta({examples:[1080]}),height:Qr().meta({examples:[1080]})});function Gd(){return Qr().min(-1)}function Bd(){return Qr().min(-1).refine((e=>0!==e),{message:"Limit cannot be 0. Use -1 for unlimited or a positive number for a specific limit"})}const Fd=Eo([kr(),Qr(),io(),ao()]),Vd=new Zo({type:"lazy",getter:()=>Eo([Fd,vo(Vd),So(kr(),Vd)])}),zd=So(kr().min(1).max(40).meta({description:"Metadata key. Must be 1-40 characters"}),kr().max(500).meta({description:"Metadata value. Must not exceed 500 characters"})).refine((e=>Object.keys(e).length<=50),{message:"Metadata cannot exceed 50 keys"}).optional().meta({description:"Flexible key-value metadata storage for custom configuration. Similar to Stripe's metadata API. Maximum 50 keys, key names up to 40 characters, values up to 500 characters."}),Wd=kr().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/,"Must be a naive datetime without timezone (YYYY-MM-DDTHH:mm:ss)").meta({description:"Wall clock time without timezone (displays same everywhere)",examples:["2025-03-15T19:30:00"]});function Yd(e){return od().int().min(1).max(100).prefault(20).meta({examples:[20],description:`Maximum number of ${e} to return per request (1-100, default: 20)`})}const Zd=kr().meta({description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."}),Hd="[a-z][a-z0-9-]*",Kd=RegExp(`^-?(?:\\*|(?:${Hd})(?:\\.${Hd})*(?:\\.\\*|\\.bypass|\\.[a-z]{3}_[0-9a-z]{26})?)$`),Jd=/^[a-z]{3}_[0-9a-z]{26}$/,Qd=["tem","pmt","ven","evt","ord","tkt","cpn"],Xd=new Set("team.read,team.write,team.oauth.read,team.oauth.write,team.member.read,team.member.write,team.invite.read,team.invite.write,team.gateway.read,team.gateway.connect,team.gateway.write,team.tax.read,team.tax.write,team.performance.read,cms.read,cms.write,role.read,role.write,event.read,event.write,event.performance.read,promoter.read,promoter.write,promoter.performance.read,venue.read,venue.write,order.read,order.write,ticket.read,ticket.write,ticket.scan,coupon.read,coupon.write,membership.read,membership.write,beneficiary.read,beneficiary.write,payout.read,payout.write,*".split(",")),ec=new Set(["tenant","team","team.oauth","team.member","team.invite","team.gateway","team.tax","team.performance","cms","role","event","event.performance","promoter","promoter.performance","venue","order","ticket","coupon","membership","beneficiary","payout"]),tc={"team.read":["tem"],"team.write":["tem"],"team.oauth.read":["tem"],"team.oauth.write":["tem"],"team.member.read":["tem"],"team.member.write":["tem"],"team.invite.read":["tem"],"team.invite.write":["tem"],"team.gateway.read":["tem","pmt"],"team.gateway.connect":["tem"],"team.gateway.write":["tem","pmt"],"team.tax.read":["tem"],"team.tax.write":["tem"],"team.performance.read":["tem","pmt","ven","evt"],"cms.read":[],"cms.write":[],"role.read":["tem"],"role.write":["tem"],"event.read":["tem","pmt","ven","evt"],"event.write":["tem","pmt","ven","evt"],"event.performance.read":["tem","pmt","ven","evt"],"promoter.read":["tem","pmt","evt"],"promoter.write":["tem","pmt","evt"],"promoter.performance.read":["tem","pmt","evt"],"venue.read":["tem","ven","evt"],"venue.write":["tem","ven","evt"],"order.read":["tem","pmt","ven","evt","ord"],"order.write":["tem","pmt","ven","evt","ord"],"ticket.read":["tem","pmt","ven","evt","ord","tkt"],"ticket.write":["tem","pmt","ven","evt","ord","tkt"],"ticket.scan":["tem","pmt","ven","evt","ord","tkt"],"coupon.read":["tem","pmt","evt","cpn"],"coupon.write":["tem","pmt","evt","cpn"],"membership.read":["tem"],"membership.write":["tem"],"beneficiary.read":["tem","pmt"],"beneficiary.write":["tem","pmt"],"payout.read":["tem","pmt","ven"],"payout.write":["tem","pmt"],"*":[]};function ic(e){let[t]=e.split("_");return!!t&&Qd.includes(t)}function nc(e,t){return!(!Xd.has(e)||!function(e){return Jd.test(e)&&ic(e)}(t))&&function(e,t){let i=function(e){let[t]=e.split("_");return t&&ic(e)?t:null}(t);return!!i&&(tc[e]??[]).includes(i)}(e,t)}const rc=[function(e){return Xd.has(e)},function(e){return!!e.endsWith(".bypass")&&Xd.has(e.slice(0,-7))},function(e){let t=function(e){let t=e.match(/^((?:[a-z][a-z0-9-]*)(?:\.[a-z][a-z0-9-]*)*)\.([a-z]{3}_[0-9a-z]{26})$/);return t?function(e){let t=e[1],i=e[2];return t&&i?{base:t,resourceId:i}:null}(t):null}(e);return!!t&&nc(t.base,t.resourceId)},function(e){if(!e.endsWith(".*"))return!1;let t=e.slice(0,-2);return ec.has(t)||Xd.has(t)}],oc=kr().regex(Kd,"Invalid permission node. Use lowercase dot notation with optional wildcard, resource target, bypass target, and deny prefix.").refine((function(e){let t=function(e){return e.startsWith("-")?e.slice(1):e}(e);return rc.some((e=>e(t)))}),{message:"Unsupported permission node. Only nodes from the canonical permission catalog are allowed."}).meta({description:"Permission node in minecraft-style format. Supports exact, scoped wildcard, resource target, bypass target, and deny prefix.",examples:["team.read","team.member.write","ticket.scan","ticket.scan.*","ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1","team.gateway.connect.bypass","team.*","*","-team.gateway.write","-ticket.scan.evt_01h8c3jm9zs2v6h2k9p9r8f5a1"]}),ac=vo(oc).meta({description:"Array of permission nodes. Supports wildcard and negation. Empty arrays are allowed.",examples:[[],["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),sc=ac.min(1).meta({description:"Non-empty array of permission nodes. Supports wildcard and negation.",examples:[["team.read","team.member.write"],["event.read","event.write"],["*"],["-team.gateway.write"]]}),dc=kr().max(1e4).meta({description:"Public-facing description with a maximum length of 10000 characters"}),cc=kr().length(16).meta({examples:[nd.signature],description:"HMAC signature for secure access (16 characters, base64url encoded)"}),lc=wo({promoterIds:vo(xd).nullable().meta({description:"Null means team-wide promoter access. An array means access is restricted to those promoters."})}).meta({description:"Promoter access assigned to a team member or invite."}),uc=wo({promoterIds:vo(xd).min(1).nullable().meta({description:"Null grants team-wide promoter access. A non-empty array restricts access to those promoters."})}).meta({description:"Promoter access assignment input."}),pc=Oo(["SALE_ENDED","SOLD_OUT","DOOR"]),mc=wo({booking:Qr().min(4).max(10).meta({examples:[7.5],description:"Booking fee percentage used to calculate the booking fee."})}).meta({description:"Admission-level pricing override used to calculate derived fee amounts."});function hc(e){return wo({base:eo().min(0).meta({examples:[nd.Admission.price.base],description:"Organiser-entered ticket price before any added tax or booking fees, in cents"}),booking:eo().min(0).meta({examples:[nd.Admission.price.booking],description:e.booking}),tax:eo().min(0).optional().meta({description:"Ticket tax component in cents. This excludes tax contained in booking fees."}),total:eo().min(0).optional().meta({description:"Customer-facing total in cents, including ticket tax and booking fees."}),currency:ld.meta({examples:[nd.Admission.price.currency],description:e.currency}),override:mc.optional().meta({description:"Optional pricing override used to calculate derived fee amounts."})}).meta({examples:[nd.Admission.price],description:e.price})}const fc=wo({id:Dd.readonly().meta({description:"A unique identifier for this admission",examples:[nd.Admission.id]}),name:kr().meta({description:"The display name of the admission type shown to customers",examples:[nd.Admission.name]}),subtitle:kr().max(100).optional().meta({description:"Short supporting text shown below the admission name",examples:[nd.Admission.subtitle]}),description:kr().max(500).optional().meta({description:"Detailed information shown when customers expand 'More info'",examples:[nd.Admission.description]}),capacity:Gd().prefault(-1).meta({examples:[nd.Admission.capacity],description:"Maximum number of tickets that can be sold for this admission type. A value of -1 indicates unlimited"}),limit:Bd().prefault(-1).meta({examples:[nd.Admission.limit??-1],description:"Maximum number of tickets of this admission type that can be purchased in a single order. A value of -1 indicates unlimited"}),available:Qr().min(-1).readonly().meta({examples:[nd.Admission.available],description:"Current number of tickets available for purchase, calculated as capacity minus sold minus reserved. A value of -1 indicates unlimited"}),sold:Qr().min(0).readonly().meta({examples:[nd.Admission.sold],description:"Total number of tickets of this admission type that have been purchased"}),reserved:Qr().min(0).readonly().meta({examples:[nd.Admission.reserved],description:"Number of tickets held for customers during checkout and not available to others"}),order:Qr().min(0).meta({examples:[nd.Admission.order],description:"Determines the position in which this admission type appears when listed. Lower values appear first"}),createdAt:rd().readonly().meta({examples:[nd.Admission.createdAt],description:"Timestamp in ISO 8601 format when this admission type was created"}),updatedAt:rd().readonly().meta({examples:[nd.Admission.updatedAt],description:"Timestamp in ISO 8601 format when this admission type was last updated"}),entryStartsAt:Wd.meta({examples:[nd.Admission.entryStartsAt],description:"Wall clock time from which tickets of this type are valid for entry (no timezone)"}),entryEndsAt:Wd.meta({examples:[nd.Admission.entryEndsAt],description:"Wall clock time until which tickets of this type are valid for entry (no timezone)"}),saleStartsAt:Wd.meta({examples:[nd.Admission.saleStartsAt],description:"Wall clock time when ticket sales for this admission type begin (no timezone)"}),saleEndsAt:Wd.meta({examples:[nd.Admission.saleEndsAt],description:"Wall clock time when ticket sales for this admission type end (no timezone)"}),saleEndsBehavior:pc.default("SALE_ENDED").meta({examples:[nd.Admission.saleEndsBehavior],description:"Label to display for this admission after ticket sales have ended"}),price:hc({booking:"Additional booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the ticket price",price:"Pricing details for this admission type, including base cost and fees in cents, and currency"}),visibility:Oo(id).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls whether this admission type is shown publicly, revealed by a scoped coupon, or unlocked after another admission."}),visibleAfterAdmissionId:Dd.nullable().optional().meta({description:"Admission that must sell out or close before this admission can be purchased."}),sectionId:Od.nullable().optional().meta({examples:[nd.Admission.sectionId],description:"Identifier of the section this admission type belongs to, if any"}),teamId:gd.meta({description:"Team that owns this admission. Denormalized for efficient queries."}),promoterId:xd.meta({examples:[nd.Admission.promoterId],description:"Identifier of the promoter responsible for this admission type"}),eventId:wd.meta({examples:[nd.Admission.eventId],description:"Identifier of the event to which this admission type is linked"}),eventSlug:kr().meta({examples:[nd.Admission.eventSlug],description:"URL-friendly slug for the event associated with this admission type"})}).meta({description:"Admission represents a specific type or category of ticket available for an event",examples:[nd.Admission]}),yc=fc.omit({id:!0,createdAt:!0,updatedAt:!0,available:!0,sold:!0,reserved:!0}).extend({price:fc.shape.price.omit({tax:!0,total:!0}).strict()}).meta({description:"Schema for creating a new admission type for an event"}),gc=fc.pick({id:!0}).extend({eventId:fc.shape.eventId.meta({examples:[nd.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for deleting an admission type from an event. This performs a soft delete by setting the deletedAt timestamp"}),vc=fc.pick({id:!0}).extend({eventId:wd.meta({examples:[nd.Admission.eventId],description:"Identifier of the event to which this admission type belongs"})}).meta({description:"Schema for retrieving a specific admission type"}),bc=$o({eventId:kr().max(128).meta({examples:[nd.Admission.eventId],description:"Identifier of the event to list admission types for"}),sectionId:kr().max(128).optional().meta({examples:[nd.Admission.sectionId],description:"Filter admission types by section identifier. If provided, only admissions for this section are returned"}),query:kr().max(120).optional().meta({examples:["Early Bird"],description:"Optional search query to filter admissions by name. When provided, search-backed pagination is used."}),limit:Yd("admission types").optional(),cursor:kr().max(768).optional().meta({examples:["eyJpZCI6ImFkbV8wMWpwczVjZ3NlZTB4dmFwYms5MmU4ZWI0ZyJ9"],description:"Pagination cursor for retrieving the next set of results. Obtained from previous response"})}).meta({description:"Schema for listing admission types with pagination and filtering options"});function wc(e,t){return wo({[t]:vo(e).meta({description:`Array of ${t} for the current result set`}),before:kr().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNqIn19"],description:"Cursor for navigating backward in the result set. Omitted when there are no prior results."}),after:kr().nullish().meta({examples:["eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNkIn19"],description:"Cursor for navigating forward in the result set. Omitted when there are no subsequent results."}),limit:od().min(1).meta({examples:[20],description:"Maximum number of items to return in each result set"})})}const $c=wc(fc,"admissions"),Ic=wo({min:eo().min(0).meta({description:"Minimum booking fee in the quote currency's minor units"}).optional(),max:eo().min(0).meta({description:"Maximum booking fee in the quote currency's minor units"}).optional(),percent:Qr().min(0).meta({description:"Percentage applied when calculating the booking fee"}).optional()}),Ec=fc.pick({eventId:!0}).extend({message:kr().meta({examples:["7.5% of the ticket price or $2 AUD, whichever is higher"],description:"Detailed explanation of the booking fee calculation applied to this admission type"}),source:Oo(["EVENT","CUSTOM"]).meta({description:"Whether the quote uses the resolved event fee or an admission-level custom percentage."}),rule:Ic.meta({description:"Effective booking fee rule in the quote currency after conversion."}),price:hc({booking:"Calculated booking fee applied to the ticket price, in cents",currency:"Three-letter ISO 4217 currency code for the quoted price",price:"Pricing quote for this admission type, showing base cost and calculated booking fee in cents"})}).meta({description:"Response schema for admission pricing quotes, including booking fee calculations and explanatory messages"}),kc=fc.pick({eventId:!0}).extend({base:eo().min(0).meta({examples:[nd.Admission.price.base],description:"Base cost of a ticket for this admission type before fees, in cents"}),currency:ld.meta({examples:[nd.Admission.price.currency],description:"Three-letter ISO 4217 currency code for the ticket price"}),override:mc.optional().meta({description:"Optional admission-level booking fee percentage to preview instead of the event fee formula."})}).meta({description:"Request schema for generating a pricing quote for an admission type, including booking fee calculations"}),Tc=wo({quote:Ec}),Ac=wo({admission:fc}),xc=wo({id:fc.shape.id,eventId:fc.shape.eventId,name:fc.shape.name.optional(),subtitle:fc.shape.subtitle,description:fc.shape.description,capacity:Gd().optional(),limit:Bd().optional(),order:fc.shape.order.optional(),entryStartsAt:fc.shape.entryStartsAt.optional(),entryEndsAt:fc.shape.entryEndsAt.optional(),saleStartsAt:fc.shape.saleStartsAt.optional(),saleEndsAt:fc.shape.saleEndsAt.optional(),saleEndsBehavior:pc.optional(),price:fc.shape.price.omit({tax:!0,total:!0}).strict().extend({override:mc.nullable().optional().meta({description:"Admission pricing override. Pass null to clear it; omit to leave it unchanged."})}).optional(),visibility:Oo(id).optional(),visibleAfterAdmissionId:Dd.nullable().optional(),sectionId:Od.nullable().optional().meta({description:"Section ID. Pass null to unassign from section; omit to leave unchanged."})}).meta({description:"Schema for updating an existing admission type."}),Sc=wo({eventId:kr().meta({description:"Event identifier"})}),Dc=wo({code:kr().meta({description:"Coupon code captured on the order"}),totalTickets:eo().min(0).meta({description:"Valid tickets purchased with this coupon code"}),checkedIn:eo().min(0).meta({description:"Coupon tickets currently checked in"}),noShows:eo().min(0).meta({description:"Coupon tickets not currently checked in"}),checkInRate:Qr().min(0).max(100).meta({description:"Percentage of coupon tickets checked in"})}),Oc=wo({totalTickets:eo().min(0).meta({description:"Total valid tickets purchased with a coupon code"}),checkedIn:eo().min(0).meta({description:"Total coupon tickets currently checked in"}),noShows:eo().min(0).meta({description:"Total coupon tickets not currently checked in"}),checkInRate:Qr().min(0).max(100).meta({description:"Overall percentage of coupon tickets checked in"}),coupons:vo(Dc).meta({description:"Check-in attendance breakdown by coupon code, sorted by total tickets descending"})}),Cc=pn(xr,void 0).describe("Date (YYYY-MM-DD)"),Pc=kr().min(1).max(128).optional().describe("IANA time zone for interpreting date ranges"),_c=wo({startDate:Cc.describe("Start date (YYYY-MM-DD)"),endDate:Cc.describe("End date (YYYY-MM-DD)"),timeZone:Pc}),Rc={startDate:Cc.optional().describe("Start date (YYYY-MM-DD)"),endDate:Cc.optional().describe("End date (YYYY-MM-DD)"),timeZone:Pc},Nc=e=>!e.startDate&&!e.endDate||!(!e.startDate||!e.endDate);function Mc(e){return wo(e).extend(_c.shape)}function Uc(e){return wo({...e,...Rc}).refine(Nc,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"})}wo(Rc).refine(Nc,{message:"Both startDate and endDate must be provided together, or omit both for all-time data"});const Lc=wo({value:Qr().describe("Current period value"),previous:Qr().describe("Comparison period value"),change:Qr().describe("Percentage change from previous period"),changeType:Oo(["increase","decrease","unchanged"]).describe("Direction of change")}),jc=wo({eventId:kr().describe("Event identifier"),eventName:kr().describe("Event name"),ticketCount:Qr().describe("Number of tickets sold"),sharePercent:Qr().describe("Percentage of total tickets")}),qc=wo({start:kr().describe("Period start date"),end:kr().describe("Period end date")}),Gc=wo({start:kr().describe("Comparison period start date"),end:kr().describe("Comparison period end date")}),Bc=Oo(["HOUR","DAY","WEEK","MONTH"]),Fc=wo({date:kr().describe("Date (YYYY-MM-DD)"),revenue:Qr().describe("Revenue in cents"),tickets:Qr().describe("Tickets sold")}),Vc=Fc.extend({orders:Qr().describe("Orders placed")}),zc=wo({revenue:Qr().describe("Total revenue for period in cents"),tickets:Qr().describe("Total tickets for period")}),Wc=zc.extend({orders:Qr().describe("Total orders for period")}),Yc=wo({revenue:Lc.describe("Total revenue in cents"),ticketsSold:Lc.describe("Number of tickets sold"),averageOrderValue:Lc.describe("Average order value in cents"),conversionRate:Lc.describe("Overall conversion rate (%)"),activeEvents:Lc.describe("Number of active events in period"),uniqueCustomers:Lc.describe("Unique customers (estimated)"),orderCount:Lc.describe("Number of orders placed"),pageViews:Lc.describe("Total page views from tracking")}),Zc=wo({events:vo(jc),totalTickets:Qr().describe("Total tickets across all events")});function Hc(e,t){return Mc({...Xc(e,t),currency:kr().optional().describe("Currency code for revenue metrics")})}function Kc(e){return wo({meta:wo({...e,currency:kr().describe("Primary currency code"),currencies:vo(kr()).describe("All currencies with transactions"),dateRange:qc,comparisonRange:Gc}),metrics:Yc})}function Jc(e,t){return Mc({...Xc(e,t),granularity:Bc.optional().default("DAY").describe("Time granularity"),currency:kr().optional().describe("Currency filter")})}function Qc(e,t){return Mc({...Xc(e,t),limit:Qr().optional().default(5).describe("Maximum number of events to return")})}function Xc(e,t){return{[e]:kr().describe(t)}}const el=Uc({eventId:kr().describe("Event identifier")}).meta({description:"Event performance summary request"}),tl=wo({meta:wo({eventId:kr().describe("Event identifier"),eventName:kr().describe("Event name"),currency:kr().describe("Currency code (e.g., USD, EUR)"),dateRange:qc.optional().describe("Present only when startDate/endDate are provided"),comparisonRange:Gc.optional().describe("Present only when startDate/endDate are provided")}),metrics:wo({revenue:Lc.describe("Total revenue in cents"),ticketsSold:Lc.describe("Number of tickets sold"),orderCount:Lc.describe("Number of orders placed"),averageOrderValue:Lc.describe("Average order value in cents"),conversionRate:Lc.extend({convertedVisitors:Qr().describe("Unique eligible visitors who completed an order").meta({description:"Unique eligible visitors who completed an order"}),eligibleVisitors:Qr().describe("Unique visitors eligible for conversion").meta({description:"Unique visitors eligible for conversion"})}).describe("Visitor purchase conversion for the selected period"),pageViews:Lc.describe("Total page/product views"),uniqueVisitors:Lc.describe("Unique visitors (estimated)"),checkoutStarted:Lc.describe("Number of checkout started events (external link clicks for external events)")})}),il=Mc({eventId:kr().describe("Event identifier"),granularity:Bc.optional().default("DAY").describe("Time granularity for aggregation"),breakdown:Oo(["TOTAL"]).optional().default("TOTAL").describe("Breakdown type (always TOTAL for performance)"),includeBreakdowns:io().optional().default(!0).describe("Whether to include admission and section breakdowns in each time bucket")}),nl=wo({meta:wo({eventId:kr(),eventName:kr().describe("Event name"),currency:kr().describe("Currency code"),dateRange:qc,granularity:Bc}),series:vo(wo({date:kr().describe("Date or timestamp"),tickets:Qr().describe("Tickets sold in period"),revenue:Qr().describe("Revenue in period (cents)"),admissions:vo(wo({id:kr(),name:kr(),quantity:Qr()})),sections:vo(wo({id:kr(),name:kr(),quantity:Qr()}))}))}),rl=Oo(["HOUR","DAY","WEEK","MONTH"]).describe("Time granularity for aggregation"),ol=Mc({eventId:kr().describe("Event identifier"),granularity:rl.optional().default("DAY")}).meta({description:"Event performance time series request"}),al=wo({meta:wo({eventId:kr(),eventName:kr().describe("Event name"),currency:kr().describe("Currency code"),dateRange:qc,granularity:rl}),series:vo(wo({date:kr().describe("Date or timestamp"),revenue:Qr().describe("Net revenue in period (cents)"),tickets:Qr().describe("Tickets sold in period"),orders:Qr().describe("Completed orders in period"),pageViews:Qr().describe("Product/page views in period"),visitors:Qr().describe("Unique visitors in period (estimated)"),checkoutStarted:Qr().describe("Checkout started events in period"),convertedVisitors:Qr().describe("Unique visitors who completed an order in period"),eligibleVisitors:Qr().describe("Unique visitors eligible for conversion in period"),conversionRate:Qr().describe("Converted visitors divided by eligible visitors in period (%)")}))}),sl=Mc({eventId:kr().describe("Event identifier")}),dl=wo({meta:wo({eventId:kr(),eventName:kr().describe("Event name"),currency:kr().describe("Currency code"),dateRange:qc}),totals:wo({entered:Qr().describe("Total entered funnel (product viewed)"),completed:Qr().describe("Total completed (orders)"),overallConversionRate:Qr().describe("Overall conversion rate (%)"),totalDropped:Qr().describe("Total dropped off")}),stages:vo(wo({id:kr().describe("Funnel stage identifier"),name:kr().describe("Human-readable stage name"),count:Qr().describe("Number of events at this stage"),conversionRate:Qr().describe("Conversion rate from first stage (%)"),dropoffRate:Qr().describe("Dropoff rate from previous stage (%)")}))});wo({meta:wo({eventId:kr(),dimension:kr().describe("Dimension type"),dateRange:qc,limit:Qr().optional()}),data:vo(wo({name:kr().describe("Dimension value (e.g., campaign name)"),views:Qr().describe("Page/product views"),clicks:Qr().describe("Ticket link clicks").optional(),conversions:Qr().describe("Completed orders"),revenue:Qr().describe("Total revenue in cents"),conversionRate:Qr().describe("Conversion rate (%)"),share:Qr().describe("Percentage share of total").optional()})),totals:wo({views:Qr(),conversions:Qr(),revenue:Qr()}).optional()});const cl=Oo(["HOUR","DAY","WEEK","MONTH"]),ll=wo({eventId:kr().describe("Event identifier"),eventName:kr().describe("Event name"),currency:kr().describe("Currency code (e.g., USD, EUR)"),dateRange:qc}),ul=ll.extend({limit:Qr().describe("Maximum number of results returned")}),pl=Oo(["MOBILE","DESKTOP","TABLET","Unknown"]),ml=Oo(["revenue","tickets","orders","pageViews","visitors","conversion","clicks","clickRate"]).describe("Metric used to sort breakdown rows before limiting results");Mc({eventId:kr(),granularity:cl.optional()}),wo({granularity:cl,data:vo(wo({date:kr(),revenue:Qr(),ticketsSold:Qr()}))});const hl=Mc({eventId:kr(),limit:Qr().min(1).max(100).optional().default(10)}),fl=wo({meta:ul,totals:wo({uses:Qr().describe("Total coupon uses across all coupons"),revenue:Qr().describe("Total revenue from coupon-discounted orders (cents)")}),coupons:vo(wo({id:kr().describe("Coupon code identifier"),code:kr().describe("Coupon code"),uses:Qr().describe("Number of times this coupon was used"),revenue:Qr().describe("Revenue from this coupon (cents)"),discount:kr().describe("Discount amount or percentage"),share:Qr().describe("Share of total coupon uses (%)")})).describe("Coupons sorted by uses descending")}),yl=Mc({eventId:kr(),limit:Qr().min(1).max(100).optional().default(10),sortBy:ml.optional().default("orders")}),gl=wo({data:vo(wo({campaign:kr(),views:Qr(),visitors:Qr(),clicks:Qr().optional(),orders:Qr(),tickets:Qr(),revenue:Qr(),conversionRate:Qr(),sharePercent:Qr()})),totalOrders:Qr(),totalTickets:Qr(),totalRevenue:Qr()}),vl=Mc({eventId:kr(),limit:Qr().min(1).max(100).optional().default(10),sortBy:ml.optional().default("orders")}),bl=wo({meta:ul,totals:wo({views:Qr().describe("Total views across all mediums"),visitors:Qr().describe("Total unique visitors across all mediums"),orders:Qr().describe("Total orders across all mediums"),tickets:Qr().describe("Total tickets across all mediums"),revenue:Qr().describe("Total revenue across all mediums (cents)")}),mediums:vo(wo({id:kr().describe("Medium identifier (e.g., 'social', 'email')"),name:kr().describe("Medium name"),views:Qr().describe("Views from this medium"),visitors:Qr().describe("Unique visitors from this medium"),clicks:Qr().optional().describe("Ticket link clicks"),orders:Qr().describe("Orders from this medium"),tickets:Qr().describe("Tickets from this medium"),revenue:Qr().describe("Revenue from this medium (cents)"),conversionRate:Qr().describe("Conversion rate (%)"),share:Qr().describe("Share of total orders (%)")})).describe("Mediums sorted by orders descending")}),wl=Mc({eventId:kr(),limit:Qr().min(1).max(100).optional().default(10),sortBy:ml.optional().default("orders")}),$l=wo({meta:ll,totals:wo({views:Qr().describe("Total views across all devices"),visitors:Qr().describe("Total unique visitors across all devices"),revenue:Qr().describe("Total revenue across all devices (cents)"),orders:Qr().describe("Total orders across all devices"),tickets:Qr().describe("Total tickets across all devices")}),devices:vo(wo({id:pl.describe("Device type"),name:kr().describe("Human-readable device name"),views:Qr().optional().describe("Page views from this device"),visitors:Qr().describe("Unique visitors from this device"),revenue:Qr().describe("Revenue from this device (cents)"),clicks:Qr().optional().describe("Ticket link clicks"),orders:Qr().describe("Orders from this device"),tickets:Qr().describe("Tickets from this device"),conversionRate:Qr().describe("Conversion rate (%)"),share:Qr().describe("Share of total orders (%)")})).describe("Devices sorted by orders descending")}),Il=Mc({eventId:kr(),limit:Qr().min(1).max(100).optional().default(10),sortBy:ml.optional().default("visitors")}),El=wo({meta:ul,totals:wo({views:Qr().describe("Total views across all browsers"),visitors:Qr().describe("Total unique visitors across all browsers"),orders:Qr().describe("Total orders across all browsers"),tickets:Qr().describe("Total tickets across all browsers"),revenue:Qr().describe("Total revenue across all browsers (cents)")}),browsers:vo(wo({id:kr().describe("Browser identifier"),name:kr().describe("Human-readable browser name"),views:Qr().describe("Page views from this browser"),clicks:Qr().optional().describe("Ticket link clicks"),visitors:Qr().describe("Unique visitors from this browser"),orders:Qr().describe("Orders from this browser"),tickets:Qr().describe("Tickets from this browser"),revenue:Qr().describe("Revenue from this browser (cents)"),conversionRate:Qr().describe("Conversion rate (%)"),share:Qr().describe("Share of total visitors (%)")})).describe("Browsers sorted by visitors descending")}),kl=Mc({eventId:kr(),limit:Qr().min(1).max(100).optional().default(10),sortBy:ml.optional().default("pageViews")}),Tl=wo({meta:ul,totals:wo({views:Qr().describe("Total views across all locations"),visitors:Qr().describe("Total unique visitors across all locations"),orders:Qr().describe("Total orders across all locations"),tickets:Qr().describe("Total tickets across all locations"),revenue:Qr().describe("Total revenue across all locations (cents)")}),locations:vo(wo({id:kr().describe("Location/region code (e.g., 'US-CA', 'GB')"),name:kr().describe("Human-readable location name"),views:Qr().describe("Page views from this location"),visitors:Qr().describe("Unique visitors from this location"),clicks:Qr().optional().describe("Ticket link clicks"),orders:Qr().describe("Orders from this location"),tickets:Qr().describe("Tickets from this location"),revenue:Qr().describe("Revenue from this location (cents)"),conversionRate:Qr().describe("Conversion rate (%)"),share:Qr().describe("Share of total views (%)")})).describe("Locations sorted by views descending")}),Al=Mc({eventId:kr(),limit:Qr().min(1).max(100).optional().default(10),sortBy:ml.optional().default("pageViews")}),xl=wo({meta:ul,totals:wo({sessions:Qr().describe("Total sessions across all sources"),visitors:Qr().describe("Total unique visitors across all sources"),orders:Qr().describe("Total orders across all sources"),tickets:Qr().describe("Total tickets across all sources"),revenue:Qr().describe("Total revenue across all sources (cents)")}),sources:vo(wo({id:kr().describe("Traffic source identifier"),name:kr().describe("Traffic source name"),referrer:kr().describe("Referrer URL or domain"),sessions:Qr().describe("Sessions from this source"),visitors:Qr().describe("Unique visitors from this source"),clicks:Qr().optional().describe("Ticket link clicks"),orders:Qr().describe("Orders from this source"),tickets:Qr().describe("Tickets from this source"),conversionRate:Qr().describe("Conversion rate (%)"),revenue:Qr().describe("Revenue from this source (cents)"),share:Qr().describe("Share of total sessions (%)")})).describe("Traffic sources sorted by sessions descending")}),Sl=wo({eventId:kr(),includeAdmission:io().optional().default(!0),includeSection:io().optional().default(!0),granularity:Oo(["HOUR","MINUTE"]).optional()}),Dl=wo({totalTickets:Qr(),checkedIn:Qr(),notCheckedIn:Qr(),checkinRate:Qr()}),Ol=Dl.extend({admissionId:kr(),admissionName:kr()}),Cl=Dl.extend({sectionId:kr(),sectionName:kr()}),Pl=Eo([Dl.extend({byAdmission:vo(Ol),bySection:vo(Cl)}),wo({granularity:Oo(["HOUR","MINUTE"]),totalTickets:Qr(),data:vo(wo({timestamp:kr(),checkedIn:Qr(),rate:Qr(),checkinsThisPeriod:Qr()})),byAdmission:vo(wo({admissionId:kr(),admissionName:kr(),data:vo(wo({timestamp:kr(),checkedIn:Qr(),rate:Qr()}))})).optional(),bySection:vo(wo({sectionId:kr(),sectionName:kr(),data:vo(wo({timestamp:kr(),checkedIn:Qr(),rate:Qr()}))})).optional()})]),_l=wo({eventId:kr(),limit:Qr().min(1).max(50).optional().default(10)}),Rl=wo({totalCheckIns:Qr(),scanners:vo(wo({userId:kr(),name:kr(),email:kr(),checkIns:Qr(),sharePercent:Qr(),firstScanAt:kr().nullable(),lastScanAt:kr().nullable(),activeMinutes:Qr(),scansPerHour:Qr(),devices:vo(wo({deviceId:kr(),checkIns:Qr()}))})).describe("Door staff sorted by check-ins descending")}),Nl=wo({eventId:kr(),includeAdmission:io().optional().default(!0),includeSection:io().optional().default(!0)}),Ml=wo({totalTickets:Qr(),checkedIn:Qr(),noShows:Qr(),checkInRate:Qr(),noShowRate:Qr()}),Ul=Ml.extend({admissionId:kr(),admissionName:kr()}),Ll=Ml.extend({sectionId:kr(),sectionName:kr()}),jl=Ml.extend({byAdmission:vo(Ul),bySection:vo(Ll)}),ql=wo({eventId:kr(),granularity:Oo(["MINUTE","FIFTEEN_MINUTE","HOUR"]).optional().default("FIFTEEN_MINUTE")}),Gl=wo({granularity:Oo(["MINUTE","FIFTEEN_MINUTE","HOUR"]),totalCheckIns:Qr(),peakWindow:wo({start:kr().nullable(),end:kr().nullable(),checkIns:Qr()}),data:vo(wo({timestamp:kr(),checkIns:Qr(),cumulativeCheckIns:Qr(),cumulativeRate:Qr()}))}),Bl=Hc("promoterId","Promoter identifier"),Fl=Kc({promoterId:kr().describe("Promoter identifier"),promoterName:kr().describe("Promoter name"),teamId:kr().describe("Team identifier"),teamName:kr().describe("Team name")}),Vl=Jc("promoterId","Promoter identifier"),zl=wo({meta:wo({promoterId:kr(),dateRange:qc,granularity:Bc}),currencies:vo(wo({currency:kr().describe("Currency code (e.g., USD, EUR)"),series:vo(Fc),totals:zc})).describe("Time-series data grouped by currency")}),Wl=Qc("promoterId","Promoter identifier"),Yl=Zc,Zl=Hc("teamId","Team identifier"),Hl=Kc({teamId:kr().describe("Team identifier"),teamName:kr().describe("Team name")}),Kl=Jc("teamId","Team identifier"),Jl=wo({meta:wo({teamId:kr(),dateRange:qc,granularity:Bc}),currencies:vo(wo({currency:kr().describe("Currency code (e.g., USD, EUR)"),series:vo(Vc),totals:Wc})).describe("Time-series data grouped by currency")});Mc({teamId:kr().describe("Team identifier"),limit:Qr().optional().default(10).describe("Number of events to return"),sortBy:Oo(["revenue","tickets","conversion"]).optional().default("revenue").describe("Sort metric")}),wo({meta:wo({teamId:kr(),dateRange:wo({start:kr(),end:kr()}),limit:Qr(),sortBy:kr()}),data:vo(wo({eventId:kr().describe("Event identifier"),eventName:kr().describe("Event name"),eventDate:kr().describe("Event date").optional(),status:kr().describe("Event status"),revenue:Qr().describe("Total revenue in cents"),tickets:Qr().describe("Tickets sold"),views:Qr().describe("Page views"),conversionRate:Qr().describe("Conversion rate (%)"),contribution:Qr().describe("% of promoter's total revenue")})),totals:wo({events:Qr().describe("Total events in period"),revenue:Qr().describe("Combined revenue"),tickets:Qr().describe("Combined tickets")})});const Ql=Qc("teamId","Team identifier"),Xl=Zc,eu=Mc({teamId:kr().describe("Team identifier")}),tu=wo({stages:vo(wo({stageId:kr().describe("Funnel stage identifier"),stageLabel:kr().describe("Human-readable stage name"),count:Qr().describe("Number of events at this stage"),conversionRate:Qr().describe("Conversion rate from first stage (%)"),dropoffPercent:Qr().describe("Dropoff rate from previous stage (%)")}))}),iu=Mc({teamId:kr().describe("Team identifier"),groupBy:Oo(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).optional().default("HOUR").describe("Time breakdown for aggregation"),timeZone:kr().optional().default("UTC").describe("IANA timezone for hour/day aggregation (e.g., 'America/New_York')")}),nu=wo({groupBy:Oo(["HOUR","DAY_OF_WEEK","DAY","WEEK","MONTH"]).describe("The grouping used for aggregation"),buckets:vo(wo({key:Eo([Qr(),kr()]).describe("Bucket key (hour 0-23, day 0-6, or date string)"),label:kr().describe("Human-readable label"),orderCount:Qr().describe("Number of orders"),sharePercent:Qr().describe("Percentage of total orders")})),totalOrders:Qr().describe("Total orders across all buckets")}),ru=Mc({teamId:kr().describe("Team identifier"),limit:Qr().optional().default(10).describe("Maximum number of admissions to return")}),ou=wo({admissions:vo(wo({admissionId:kr().describe("Admission identifier"),admissionName:kr().describe("Admission name"),ticketCount:Qr().describe("Number of tickets sold"),sharePercent:Qr().describe("Percentage of total tickets")})),totalTickets:Qr().describe("Total tickets across all admissions")}),au=Mc({teamId:kr().describe("Team identifier"),type:Oo(["campaign","medium","source"]).describe("Dimension type to analyze"),limit:Qr().optional().default(20).describe("Maximum number of results to return")}),su=wo({dimensionType:Oo(["campaign","medium","source"]).describe("The dimension type analyzed"),data:vo(wo({dimensionValue:kr().describe("The dimension value (e.g., campaign name)"),dimensionLabel:kr().describe("Human-readable label"),views:Qr().describe("Total page views"),conversions:Qr().describe("Total conversions (orders)"),conversionRate:Qr().describe("Conversion rate (%)"),sharePercent:Qr().describe("Share of total conversions (%)")})),totalConversions:Qr().describe("Total conversions across all dimensions")}),du=wo({teamId:kr().describe("Team identifier"),startAt:rd().describe("Inclusive period start timestamp"),endAt:rd().describe("Exclusive period end timestamp")}),cu=wo({currency:kr().describe("Currency code"),disputedOrders:Qr().describe("Orders currently marked as disputed"),orderCount:Qr().describe("Successful orders"),refunded:Qr().describe("Refunded amount in cents"),refundCount:Qr().describe("Orders with refunded value"),refundRate:Qr().describe("Refunded order rate as a percentage"),revenue:Qr().describe("Total order value in cents"),ticketsSold:Qr().describe("Tickets sold")}),lu=cu.omit({currency:!0}),uu=wo({currencies:vo(cu),comparison:wo({totals:lu}),meta:wo({endAt:kr().describe("Exclusive period end timestamp"),startAt:kr().describe("Inclusive period start timestamp"),teamId:kr().describe("Team identifier")}),totals:lu}),pu=wo({teamId:kr().describe("Team identifier")}),mu=Eo([pu.extend({startDate:Cc.describe("Start date (YYYY-MM-DD)"),endDate:Cc.describe("End date (YYYY-MM-DD)")}),pu.extend({startDate:ro().optional(),endDate:ro().optional()})]),hu=wo({amount:Qr().describe("Payout net amount in cents"),count:Qr().describe("Number of payouts in this currency"),currency:kr().describe("Currency code")}),fu=wo({amount:Qr().describe("Payout net amount in cents"),currency:kr().nullable().describe("Currency code"),dueAt:kr().nullable().describe("Payout due timestamp"),payoutId:kr().nullable().describe("Payout identifier")}),yu=wo({amount:Qr().describe("Payout net amount in cents"),currency:kr().nullable().describe("Currency code"),paidAt:kr().nullable().describe("Payout paid timestamp"),payoutId:kr().nullable().describe("Payout identifier")}),gu=wo({upcoming:wo({count:Qr().describe("Upcoming payouts matching the request"),pendingApproval:Qr().describe("Upcoming payouts still awaiting approval"),totals:vo(hu).describe("Upcoming payout totals by currency"),next:fu}),lastPaid:yu}),vu=wo({teamId:kr().describe("Team identifier"),startDate:Cc.describe("Start date (YYYY-MM-DD)"),endDate:Cc.describe("End date (YYYY-MM-DD)"),granularity:Bc.optional().default("DAY").describe("Time granularity"),currency:kr().optional().describe("Currency filter")}),bu=Oo(["revenue","credits","refunds","disputes","payouts"]),wu=wo({id:kr().optional().describe("Source identifier"),label:kr().describe("Human-readable source label"),kind:bu,amount:Qr().describe("Signed movement amount in cents"),eventId:kr().optional().describe("Related event identifier"),eventName:kr().optional().describe("Related event name")}),$u=wo({date:kr().describe("Bucket date"),label:kr().describe("Human-readable bucket label"),revenue:Qr().describe("Successful order total after discounts in cents"),credits:Qr().describe("Positive credit amount in cents"),refunds:Qr().describe("Signed refund adjustment amount in cents"),disputes:Qr().describe("Signed dispute principal and fee adjustment amount in cents"),payouts:Qr().describe("Signed paid payout amount in cents"),movements:vo(wu)}),Iu=wo({revenue:Qr().describe("Successful order total after discounts in cents"),credits:Qr().describe("Positive credit amount in cents"),refunds:Qr().describe("Signed refund adjustment amount in cents"),disputes:Qr().describe("Signed dispute principal and fee adjustment amount in cents"),payouts:Qr().describe("Signed paid payout amount in cents"),net:Qr().describe("Net signed money movement in cents")}),Eu=wo({amount:Qr().describe("Outstanding adjustment amount in cents"),count:Qr().describe("Outstanding adjustment count"),currency:kr().describe("Currency code")}),ku=wo({meta:wo({teamId:kr(),dateRange:qc,granularity:Bc}),cards:wo({upcomingPayouts:wo({count:Qr(),pendingApproval:Qr(),totals:vo(hu)}),adjustments:wo({count:Qr(),totals:vo(Eu)}),nextPayout:fu,lastPaid:yu}),currencies:vo(wo({currency:kr().describe("Currency code"),series:vo($u),totals:Iu}))}),Tu=Mc({teamId:kr().describe("Team identifier"),granularity:Oo(["DAY","WEEK","MONTH"]).optional().default("DAY").describe("Time granularity for aggregation")}),Au=wo({granularity:Oo(["DAY","WEEK","MONTH"]).describe("The granularity used"),series:vo(wo({date:kr().describe("Date key (YYYY-MM-DD, YYYY-Www, or YYYY-MM)"),label:kr().describe("Human-readable label"),productViewed:Qr().describe("Page views"),productAdded:Qr().describe("Add to cart events"),checkoutStarted:Qr().describe("Checkout started events"),orderCompleted:Qr().describe("Completed orders")})),totals:wo({productViewed:Qr().describe("Total page views"),productAdded:Qr().describe("Total add to cart"),checkoutStarted:Qr().describe("Total checkouts started"),orderCompleted:Qr().describe("Total orders completed"),uniqueVisitors:Qr().describe("Unique visitors (estimated via HyperLogLog, ~0.8% error)")})}),xu=wo({product_id:kr().optional().describe("admission_id in ticketing context"),sku:kr().optional().describe("admission_id or admission_name"),category:kr().optional().describe('event_name or "Admission"'),name:kr().optional().describe("admission_name"),brand:kr().optional().describe("promoter_name"),variant:kr().optional().describe("section_name"),price:Qr().optional().describe("admission price (base + booking fee) in major currency units"),quantity:Qr().optional().describe("number of tickets"),coupon:kr().optional().describe("coupon code applied"),position:Qr().optional().describe("position in list"),url:kr().optional().describe("URL to event/admission page"),image_url:kr().optional().describe("event image"),admission_id:kr().optional().describe("Explicit admission ID"),section_id:kr().optional().describe("Section ID if applicable"),event_id:kr().optional().describe("Event ID for this admission"),promoter_id:kr().optional().describe("Promoter ID"),price_base:Qr().nullish().describe("Base price before fees in minor currency units"),price_booking_fee:Qr().nullish().describe("Booking fee in minor currency units"),capacity:Qr().optional().describe("Total capacity for this admission"),available:Qr().optional().describe("Remaining tickets available"),sold:Qr().optional().describe("Tickets already sold")}),Su=wo({type:kr(),value:kr()}),Du=wo({type:kr(),value:kr()}),Ou=wo({query:Eo([kr(),So(kr(),lo())]).optional(),list_id:kr().optional(),category:kr().optional(),filters:vo(Su).optional(),sorts:vo(Du).optional(),promotion_id:kr().optional(),creative:kr().optional(),name:kr().optional(),position:Eo([kr(),Qr()]).optional(),product_id:kr().optional(),sku:kr().optional(),brand:kr().optional(),variant:kr().optional(),price:Qr().optional().describe("Product price in major currency units"),quantity:Qr().optional(),coupon:kr().optional(),currency:kr().optional().describe("ISO 4217 currency code"),value:Qr().optional().describe("Event value in major currency units"),url:kr().optional(),image_url:kr().optional(),cart_id:kr().optional(),step:Qr().optional(),shipping_method:kr().optional(),payment_method:kr().optional(),ticketing_mode:Oo(["internal","external"]).optional(),external_ticket_url:kr().optional(),external_ticket_domain:kr().optional(),cta_surface:kr().optional(),order_id:kr().optional(),affiliation:kr().optional(),subtotal:Qr().optional().describe("Order subtotal in major currency units"),total:Qr().optional().describe("Order total in major currency units"),revenue:Qr().optional().describe("Order revenue in major currency units"),shipping:Qr().optional().describe("Shipping amount in major currency units"),tax:Qr().optional().describe("Tax amount in major currency units"),discount:Qr().optional().describe("Discount amount in major currency units"),coupon_id:kr().optional(),coupon_name:kr().optional(),reason:kr().optional(),wishlist_id:kr().optional(),wishlist_name:kr().optional(),share_via:kr().optional(),share_message:kr().optional(),recipient:kr().optional(),review_id:kr().optional(),review_body:kr().optional(),rating:kr().optional(),products:vo(xu).optional(),event_id:kr().optional().describe("ID of the ticketed event (evt_xxx)"),event_name:kr().optional().describe("Name of the ticketed event"),event_slug:kr().optional().describe("URL slug of event"),event_starts_at:Wd.optional().describe("When the event starts (naive datetime, no timezone)"),event_ends_at:Wd.optional().describe("When the event ends (naive datetime, no timezone)"),event_status:Oo(["UPCOMING","LIVE","ENDED","CANCELLED"]).optional(),event_visibility:Oo(["PUBLIC","PRIVATE"]).optional(),event_location:kr().optional().describe("Venue name"),event_city:kr().optional().describe("Venue city"),event_country:kr().optional().describe("Venue country"),promoter_id:kr().optional().describe("ID of the promoter (pmt_xxx)"),promoter_name:kr().optional().describe("Name of the promoter"),promoter_slug:kr().optional().describe("URL slug of promoter"),admission_id:kr().optional().describe("ID of admission type (adm_xxx)"),admission_name:kr().optional().describe('Name of admission (e.g., "General Admission")'),admission_capacity:Qr().optional().describe("Total capacity for this admission"),admission_available:Qr().optional().describe("Tickets still available"),admission_sold:Qr().optional().describe("Tickets already sold"),section_id:kr().optional().describe("ID of section (sct_xxx)"),section_name:kr().optional().describe('Name of section (e.g., "VIP", "General")'),section_capacity:Qr().optional().describe("Total capacity for this section"),section_available:Qr().optional().describe("Spots still available in section"),ticket_id:kr().optional().describe("Individual ticket ID (tkt_xxx)"),ticket_status:Oo(["VALID","REDEEMED","CANCELLED"]).optional(),tickets_quantity:Qr().optional().describe("Number of tickets in transaction"),customer_id:kr().optional().describe("Customer ID (cus_xxx)"),customer_email:kr().optional().describe("Customer email"),customer_first_name:kr().optional(),customer_last_name:kr().optional(),price_base:Qr().nullish().describe("Base price before fees in minor currency units"),price_booking_fee:Qr().nullish().describe("Booking fee amount in minor currency units"),price_discount_amount:Qr().nullish().describe("Discount amount applied in minor currency units"),sale_starts_at:Wd.optional().describe("When tickets go on sale (naive datetime, no timezone)"),sale_ends_at:Wd.optional().describe("When ticket sales end (naive datetime, no timezone)"),entry_starts_at:Wd.optional().describe("When entry to event begins (naive datetime, no timezone)"),entry_ends_at:Wd.optional().describe("When entry to event ends (naive datetime, no timezone)"),funnel_step:kr().optional().describe('Current funnel step (e.g., "browse", "cart", "checkout")'),time_to_purchase:Qr().optional().describe("Seconds from first view to purchase"),session_duration:Qr().optional().describe("Total session duration in seconds"),referrer_type:Oo(["DIRECT","SOCIAL","EMAIL","SEARCH","REFERRAL","AD"]).optional(),campaign_id:kr().optional().describe("Marketing campaign ID"),affiliate_id:kr().optional().describe("Affiliate partner ID"),promo_code_used:kr().optional().describe("Promotional code applied"),platform:Oo(["WEB","MOBILE_WEB","IOS","ANDROID"]).optional(),app_version:kr().optional(),device_type:Oo(["MOBILE","TABLET","DESKTOP"]).optional(),anonymous_id:kr().optional(),browser:kr().optional(),browser_session_id:kr().optional(),country:kr().optional(),page_path:kr().optional(),page_title:kr().optional(),page_url:kr().optional(),referrer:kr().optional(),region:kr().optional(),user_agent:kr().optional(),utm_source:kr().optional(),utm_medium:kr().optional(),utm_campaign:kr().optional(),utm_term:kr().optional(),utm_content:kr().optional()}),Cu=wo({session_id:kr(),user_id:kr().optional(),anonymous_id:kr().optional(),utm_source:kr().optional(),utm_medium:kr().optional(),utm_campaign:kr().optional(),utm_term:kr().optional(),utm_content:kr().optional(),page:wo({url:kr(),path:kr(),title:kr()}),referrer:kr().optional(),user_agent:kr().optional(),ip:kr().optional(),geo:wo({country:kr().optional().describe('Country code (e.g., "AU")'),countryName:kr().optional().describe('Country name (e.g., "Australia")'),region:kr().optional().describe("State/province code"),regionName:kr().optional().describe('State/province name (e.g., "New South Wales")'),city:kr().optional().describe("City name"),latitude:kr().optional().describe("Latitude"),longitude:kr().optional().describe("Longitude")}).optional(),fbc:kr().optional().describe("Facebook click ID"),fbp:kr().optional().describe("Facebook browser ID"),ttclid:kr().optional().describe("TikTok click ID")}),Pu=wo({id:kr(),eventId:kr().min(1).describe("Event being tracked (evt_123)"),teamId:kr().min(1).describe("Team ID (team_123)"),promoterId:kr().min(1).describe("Promoter ID (pmt_123)"),eventType:Sa,timestamp:kr(),date:kr().describe("YYYY-MM-DD"),hour:Qr().int().min(0).max(23),properties:Ou,context:Cu,productId:kr().optional(),createdAt:kr(),updatedAt:kr()}),_u=Pu.omit({id:!0,timestamp:!0,date:!0,hour:!0,createdAt:!0,updatedAt:!0}).extend({messageId:kr().min(1).optional().meta({description:"Analytics message id for retry-safe event delivery and linking."}),occurredAt:rd().optional().meta({description:"Client-observed event time. Server ingest time remains authoritative for writes."})}).meta({description:"Schema for tracking an analytics event. Excludes system-generated fields"}),Ru=wo({legacyOrgId:kr().min(1),legacyEventId:kr().min(1),legacyTeamId:kr().min(1),legacyEventName:kr().optional(),legacyEventSlug:kr().optional(),legacyEventCreatedAt:Eo([kr(),yo(),ao()]).optional(),legacyTeamCreatedAt:Eo([kr(),yo(),ao()]).optional()}),Nu=Eo([_u,wo({eventName:kr().min(1).optional(),eventType:Sa.optional(),eventId:kr().min(1).optional(),teamId:kr().min(1).optional(),promoterId:kr().min(1).optional(),properties:So(kr(),lo()).optional(),context:Cu.partial().optional(),legacyContext:Ru.optional()}).passthrough().meta({description:"Compatibility schema for legacy Sash analytics payloads that require server-side ID normalization"})]).meta({description:"Analytics ingress schema accepting both canonical payloads and legacy Sash-compatible payloads"});Uc({eventId:kr().meta({description:"Event ID to get tracking events for"}),limit:od().int().positive().optional().meta({description:"Maximum number of events to return"})}).meta({description:"Schema for retrieving tracking events for an event"});const Mu=Oo(["AIRWALLEX","STRIPE"]),Uu=wo({id:kr().readonly().meta({examples:[nd.Beneficiary.id],description:"A unique identifier for this beneficiary."}),createdAt:rd().readonly().meta({examples:[nd.Beneficiary.createdAt],description:"Timestamp in ISO 8601 format when this beneficiary was created."}),updatedAt:rd().readonly().meta({examples:[nd.Beneficiary.updatedAt],description:"Timestamp in ISO 8601 format when this beneficiary was last updated."}),name:kr().meta({examples:[nd.Beneficiary.name],description:"The account name for this beneficiary."}),currency:ld.meta({examples:[nd.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts."}),gateway:Mu.meta({examples:["STRIPE"],description:"The payment gateway used for processing payouts."}),gatewayId:kr().meta({examples:[nd.Beneficiary.gatewayId],description:"The identifier assigned by the payment gateway to this account."}),teamId:kr().meta({description:"Team that owns this beneficiary account."}),teamIds:vo(kr()).meta({examples:[[]],description:"List of team IDs this beneficiary is assigned to. Empty array means available to all teams."}),venueIds:vo(kr()).meta({examples:[[]],description:"List of venue IDs this beneficiary is assigned to. Empty array means team-level only (available to all venues)."})}).meta({description:"beneficiary"}),Lu=wo({city:kr().optional(),country_code:kr(),postcode:kr().optional(),state:kr().optional(),street_address:kr().optional()}),ju=wo({account_currency:kr(),account_name:kr(),account_number:kr().optional(),account_routing_type1:kr().optional(),account_routing_value1:kr().optional(),account_routing_type2:kr().optional(),account_routing_value2:kr().optional(),bank_account_category:kr().optional(),bank_branch:kr().optional(),bank_country_code:kr(),bank_name:kr().optional(),bank_street_address:kr().optional(),binding_mobile_number:kr().optional(),fingerprint:kr().optional(),iban:kr().optional(),local_clearing_system:kr().optional(),swift_code:kr().optional(),transaction_reference:kr().optional(),account_identifier_type:kr().optional(),account_identifier_value:kr().optional()}),qu=wo({transfer_methods:vo(Oo(["SWIFT","LOCAL"])).meta({examples:[["LOCAL"]],description:"Transfer methods supported for this beneficiary"}),beneficiary:wo({company_name:kr().optional(),date_of_birth:kr().optional(),entity_type:kr().meta({examples:["COMPANY"],description:"Whether the beneficiary is PERSONAL or COMPANY"}),first_name:kr().optional(),last_name:kr().optional(),address:Lu,bank_details:ju,additional_info:wo({personal_email:Cr().optional()}).optional()}).meta({description:"Beneficiary details including personal/company info, address, and bank details"})}).meta({description:"Complete beneficiary request structure for Airwallex validation"}),Gu=qu.extend({id:kr().optional()}),Bu=Uu.omit({id:!0,createdAt:!0,updatedAt:!0,currency:!0}).extend({currency:ld.meta({examples:[nd.Beneficiary.currency],description:"Three-letter ISO 4217 currency code for payouts to this beneficiary account"}),airwallex:Gu.optional().meta({examples:[nd.AirwallexBeneficiary],description:"Airwallex-specific beneficiary details including bank account information and address (required when gateway is AIRWALLEX)"}),teamIds:vo(kr()).optional().default([]).meta({examples:[[]],description:"List of team IDs to assign this beneficiary to. Empty array or omitted means available to all teams."}),venueIds:vo(kr()).optional().default([]).meta({examples:[[]],description:"List of venue IDs to assign this beneficiary to. Empty array or omitted means team-level only."})}).meta({description:"Schema for creating a new beneficiary account for receiving payouts"}),Fu=Uu.pick({id:!0}).meta({description:"Schema for retrieving a single beneficiary by its unique identifier"}),Vu=Fu.meta({description:"Schema for deleting a beneficiary account - requires the beneficiary ID"}),zu=wo({teamId:kr().optional().meta({examples:[nd.Team.id],description:"Optional identifier of the team whose beneficiaries to list. When provided, only beneficiaries for that team are returned."}),gateway:Oo(["AIRWALLEX","STRIPE"]).optional().meta({examples:[nd.Beneficiary.gateway],description:"Filter beneficiaries by payment gateway provider (optional)"}),currency:ld.optional().meta({examples:[nd.Beneficiary.currency],description:"Filter beneficiaries by currency code (optional)"}),query:kr().optional().meta({examples:["beneficiary"],description:"Optional search query to filter beneficiaries by name or gateway identifier. When provided, search-backed pagination is used."}),limit:Yd("beneficiaries").optional(),cursor:kr().optional().meta({examples:["eyJpZCI6ImJlbl8wMWpwczVjZ3NlNW42bWcxeW1rZXc5dHNmaCJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Query parameters for listing beneficiaries with pagination and optional filters"}),Wu=wc(Uu,"beneficiaries"),Yu=wo({beneficiary:Uu}),Zu=wo({min:Qr().optional().meta({description:"Minimum number of time units for the transfer"}),max:Qr().optional().meta({description:"Maximum number of time units for the transfer"}),unit:kr().optional().meta({examples:["day"],description:"Time unit (e.g., 'day', 'hour')"})}).meta({description:"Expected transfer completion time range"}),Hu=wo({min:Qr().optional().meta({description:"Minimum transfer amount"}),max:Qr().optional().meta({description:"Maximum transfer amount"})}).meta({description:"Transfer amount limits"}),Ku=wo({label:kr().meta({description:"Display label for the option"}),value:kr().meta({description:"Value to submit when selected"}),flightTime:Zu.optional().meta({description:"Expected transfer time for TRANSFER_METHOD options"}),transferLimit:Hu.optional().meta({description:"Transfer amount limits for TRANSFER_METHOD options"}),processingTime:kr().optional().meta({description:"Human-readable processing time description"})}).meta({description:"A selectable option in a form field"}),Ju=wo({type:Oo(["INPUT","SELECT","RADIO","TRANSFER_METHOD","DYNAMIC_SELECT"]).meta({examples:["INPUT"],description:"The type of form input to render"}),label:kr().optional().meta({description:"Display label for the field"}),placeholder:kr().optional().meta({description:"Placeholder text for input fields"}),description:kr().optional().meta({description:"Detailed description of the field"}),tip:kr().optional().meta({description:"Tooltip information shown on hover"}),example:kr().optional().meta({description:"Example value for the field"}),default:kr().optional().meta({description:"Default value to pre-populate the field"}),key:kr().optional().meta({description:"Unique key identifier for the field"}),options:vo(Ku).optional().meta({description:"Available options for SELECT and RADIO field types"}),refresh:io().optional().meta({description:"When true, changing this field's value should trigger a schema refresh. Note: only documented API parameters (transfer_method, local_clearing_system) actually update the schema."})}).meta({description:"Field definition containing type, label, options, and metadata from Airwallex"}),Qu=wo({pattern:kr().optional().meta({description:"Regex pattern for field validation"}),type:kr().optional().meta({description:"Validation type identifier"})}).meta({description:"Validation rules for a form field"}),Xu=wo({path:kr().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field in the beneficiary request object"}),enabled:io().meta({examples:[!0],description:"Whether this field should be displayed"}),required:io().meta({examples:[!0],description:"Whether this field is required for submission"}),field:Ju.optional().meta({description:"Field definition with type, label, and options"}),rule:Qu.optional().meta({description:"Validation rules for the field"})}).meta({description:"A single field in the beneficiary form schema with display and validation rules"}),ep=wo({bankCountryCode:kr().regex(/^[A-Z]{2}$/).meta({examples:["AU"],description:"Two-letter ISO 3166-1 alpha-2 country code for the bank location"}),accountCurrency:ld.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code for the beneficiary account"}),entityType:Oo(["PERSONAL","COMPANY"]).meta({examples:["COMPANY"],description:"Whether the beneficiary is an individual or a company"}),transferMethod:Oo(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"Transfer method: SWIFT for international wire transfers, LOCAL for domestic transfers"}),localClearingSystem:kr().optional().meta({examples:["NPP"],description:"Local clearing system for domestic transfers (e.g., NPP, BANK_TRANSFER, BPAY for Australia). Only applicable when transferMethod is LOCAL."}),fieldValues:So(kr(),kr()).optional().meta({examples:[{"beneficiary.bank_details.account_routing_type1":"phone_number"}],description:"Current values of fields with refresh=true. Used to get dynamic schema updates based on user selections."})}).superRefine(((e,t)=>{e.localClearingSystem&&"SWIFT"===e.transferMethod&&t.addIssue({code:"custom",path:["localClearingSystem"],message:"Local clearing system requires LOCAL transfer method"})})).meta({description:"Parameters to fetch the form schema for a beneficiary."}),tp=wo({unavailableReason:Po("UNSUPPORTED_COMBINATION").optional().meta({description:"When present, the selected country, currency, recipient type or transfer options are unsupported and fields is empty."}),fields:vo(Xu).meta({description:"Array of form fields with their display and validation configuration"}),selectedTransferMethod:Oo(["LOCAL","SWIFT"]).optional().meta({examples:["LOCAL"],description:"The transfer method used to generate this schema. When not provided in the request, LOCAL is auto-selected if available."}),selectedLocalClearingSystem:kr().optional().meta({examples:["NPP"],description:"The local clearing system used to generate this schema, if applicable."})}).meta({description:"Form schema response containing all fields needed to collect beneficiary details"}),ip=js.route({method:"GET",path:"/beneficiaries/schema",summary:"Get beneficiary form schema",description:"Returns the form schema containing all fields required to create a beneficiary for the given country, currency, entity type, and transfer method combination. Use this to dynamically render the beneficiary creation form.",tags:["Beneficiaries"]}).input(ep.strict()).output(tp),np=wo({source:kr().meta({examples:["beneficiary.bank_details.account_number"],description:"Dot-notation path to the field that failed validation"}),code:kr().meta({examples:["001"],description:"Airwallex validation error code"}),message:kr().meta({examples:["This field is required"],description:"Human-readable error message"})}).meta({description:"Details about a single validation error for a field"}),rp=qu.meta({description:"Beneficiary request data to validate against Airwallex rules before creating"}),op=wo({valid:io().meta({examples:[!0],description:"Whether the beneficiary request passed all validation rules"}),errors:vo(np).optional().meta({description:"Array of validation errors when valid is false. Each error contains the field path, error code, and message."})}).meta({description:"Validation result indicating whether the beneficiary request is valid for creation"}),ap=js.route({method:"POST",path:"/beneficiaries/validate",summary:"Validate beneficiary request",description:"Validates a beneficiary request against Airwallex rules without creating the beneficiary. Use this to provide real-time validation feedback before submission.",tags:["Beneficiaries"]}).input(rp.strict()).output(op),sp=Oo(["AMOUNT","PERCENT"]),dp=Oo(["TEAM","PROMOTER","EVENTS","SECTIONS","ADMISSIONS"]),cp=wo({id:kr().readonly().meta({examples:[nd.Coupon.id],description:"A unique identifier for this coupon."}),couponId:kr().optional().readonly().meta({examples:[nd.Coupon.couponId],description:"Duplicate of id field for GSI queries."}),createdAt:rd().readonly().meta({examples:[nd.Coupon.createdAt],description:"Timestamp in ISO 8601 format when this coupon was created."}),updatedAt:rd().readonly().meta({examples:[nd.Coupon.updatedAt],description:"Timestamp in ISO 8601 format when this coupon was last updated."}),name:kr().meta({examples:[nd.Coupon.name],description:"Internal label for the coupon, visible to event organisers."}),active:io().optional().meta({examples:[nd.Coupon.active],description:"Whether this coupon is currently active."}),showHidden:io().optional().meta({examples:[!1],description:"Whether this coupon reveals hidden admissions and sections within its scope."}),kind:sp.meta({examples:["PERCENT"],description:"Type of discount this coupon gives: a fixed amount or a percentage."}),filter:dp.meta({examples:["EVENTS"],description:"Scope of the coupon. TEAM applies to all events in the team. PROMOTER applies to all events by specified promoters. EVENTS/SECTIONS/ADMISSIONS apply to specific items."}),currency:ld.optional().meta({examples:[nd.Coupon.currency],description:"Three-letter ISO 4217 currency code. Required for AMOUNT coupons. Optional for PERCENT coupons - when omitted, applies to all currencies."}),discount:Qr().min(0).meta({examples:[nd.Coupon.discount],description:"The discount value. If kind is 'amount', this is a currency amount. If kind is 'percent', this is a percentage."}),limit:Qr().meta({examples:[nd.Coupon.limit],description:"Maximum number of times the coupon can be redeemed across all customers."}),uses:Qr().optional().meta({examples:[nd.Coupon.uses],description:"Number of times this coupon has been redeemed so far."}),orderLimit:Qr().int().min(1).optional().meta({examples:[2],description:"Maximum number of admission units this coupon can discount within a single order. Omit to discount every eligible unit."}),membersOnly:io().optional().meta({examples:[!1],description:"Whether this coupon can only be redeemed by a signed-in user holding an active membership pass for the coupon's team."}),promoters:vo(wo({id:kr().meta({description:"Identifier of a promoter this coupon applies to."}),name:kr().meta({description:"Name of a promoter this coupon applies to."}),slug:kr().meta({description:"URL slug of a promoter this coupon applies to."})})).optional().meta({description:"List of promoters this coupon applies to when filter is PROMOTER."}),events:vo(wo({id:kr().meta({description:"Identifier of an event this coupon applies to."}),name:kr().meta({description:"Name of an event this coupon applies to."}),slug:kr().meta({description:"URL slug of an event this coupon applies to."})})).optional().meta({description:"List of events this coupon applies to when filter is EVENTS."}),sections:vo(wo({id:kr().meta({description:"Identifier of a section this coupon applies to."}),name:kr().meta({description:"Name of a section this coupon applies to."}),eventId:kr().meta({description:"Identifier of the event this section belongs to."})})).optional().meta({description:"List of sections this coupon applies to when filter is 'sections'."}),admissions:vo(wo({id:kr().meta({description:"Identifier of an admission this coupon applies to."}),name:kr().meta({description:"Name of an admission this coupon applies to."}),eventId:kr().meta({description:"Identifier of the event this admission belongs to."})})).optional().meta({description:"List of admissions this coupon applies to when filter is 'admissions'."}),saleStartsAt:Wd.meta({examples:[nd.Coupon.saleStartsAt],description:"Wall clock time when this coupon becomes valid (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),saleEndsAt:Wd.optional().meta({examples:[nd.Coupon.saleEndsAt],description:"Wall clock time when this coupon expires (no timezone, ISO 8601 format: YYYY-MM-DDTHH:mm:ss)"}),teamId:kr().meta({description:"Team that created this coupon."})}).meta({description:"coupon"}),lp=wo({id:kr().readonly().meta({examples:[nd.CouponCode.id],description:"A unique identifier for this coupon code."}),createdAt:rd().readonly().meta({examples:[nd.CouponCode.createdAt],description:"Timestamp in ISO 8601 format when this coupon code was created."}),updatedAt:rd().readonly().meta({examples:[nd.CouponCode.updatedAt],description:"Timestamp in ISO 8601 format when this coupon code was last updated."}),name:kr().meta({examples:[nd.CouponCode.name],description:"The code string that customers enter to redeem the coupon."}),active:io().meta({examples:[nd.CouponCode.active],description:"Whether this coupon code is currently enabled for use."}),couponId:kr().meta({examples:[nd.Coupon.id],description:"Identifier of the coupon to which this code belongs."}),teamId:kr().meta({description:"Team that created this coupon code."}),uses:Qr().int().nonnegative().default(0).readonly().meta({examples:[0],description:"Number of times this specific coupon code has been used in successful orders."})}).meta({description:"coupon-code"}),up=lp.pick({id:!0});wo({couponId:kr().meta({examples:[nd.Coupon.id]})}),wo({name:kr(),couponId:kr().optional().meta({examples:[nd.Coupon.id]})});const pp=lp.omit({id:!0,createdAt:!0,updatedAt:!0,uses:!0}),mp=lp.omit({createdAt:!0,updatedAt:!0,couponId:!0,teamId:!0,uses:!0}).partial().extend({id:lp.shape.id}),hp=up,fp=wo({couponId:kr().optional().meta({examples:[nd.Coupon.id],description:"Optional filter to retrieve coupon codes for a specific coupon"}),teamId:kr().optional().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Optional filter to retrieve coupon codes created by a specific team"}),active:ad().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupon codes"}),query:kr().optional().meta({examples:["SUMMER"],description:"Optional search query to filter coupon codes by name. When provided, search-backed pagination is used."}),limit:Yd("coupon codes").optional(),cursor:kr().optional().meta({examples:["eyJpZCI6ImNwY18wMWpwczVjZ3NmenR3N2h4Y3ZyMndmdGsyIn0"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupon codes with optional filtering, search, and pagination"}),yp=wc(lp,"codes"),gp=wo({couponCode:lp}),vp=cp.omit({id:!0,createdAt:!0,updatedAt:!0}).strict().refine((e=>"PERCENT"!==e.kind||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for creating a new coupon without system-generated fields"}),bp=cp.pick({id:!0}).meta({description:"Schema for retrieving a single coupon by ID"}),wp=bp.meta({description:"Schema for deleting a coupon by ID with optional soft-delete filtering"}),$p=wo({teamId:kr().meta({examples:[nd.Team.id],description:"Unique identifier of the team whose coupons to retrieve"}),active:ad().optional().meta({examples:[!0],description:"Optional filter to retrieve only active or inactive coupons"}),query:kr().optional().meta({examples:["Half Price"],description:"Optional search query to filter coupons by name or description. When provided, search-backed pagination is used."}),limit:Yd("coupons").optional(),cursor:kr().optional().meta({examples:["eyJpZCI6ImNwbl8wMWpwczVjZ3NmenMxa3NxYWV0NWhiYThhYyJ9"],description:"Pagination cursor returned by a previous request. Omit on the first request."})}).meta({description:"Schema for listing coupons belonging to a specific team with optional filtering and pagination"}),Ip=wc(cp,"coupons"),Ep=wo({coupon:cp}),kp=cp.omit({createdAt:!0,updatedAt:!0,teamId:!0}).partial().extend({id:cp.shape.id.meta({examples:[nd.Coupon.id],description:"Unique identifier of the coupon to update"}),saleEndsAt:Wd.nullable().optional().meta({examples:[nd.Coupon.saleEndsAt],description:"Expiry time. Pass null to remove end date; omit to leave unchanged."}),currency:ld.nullable().optional().meta({examples:["AUD","USD","GBP"],description:"Three-letter ISO 4217 currency code. Pass null to clear; omit to leave unchanged."}),orderLimit:cp.shape.orderLimit.unwrap().nullable().optional().meta({examples:[2],description:"Maximum number of admission units this coupon can discount within a single order. Pass null to remove the per-order limit; omit to leave unchanged."})}).strict().refine((e=>"PERCENT"!==e.kind||void 0===e.discount||e.discount<=100),{path:["discount"],message:"Discount must be 100 or less for PERCENT coupons"}).meta({description:"Schema for updating an existing coupon."}),Tp=wo({address:kr().meta({examples:[nd.Location.address],description:"Complete formatted address"}),city:kr().optional().meta({examples:[nd.Location.city],description:"City or locality"}),state:kr().optional().meta({examples:[nd.Location.state],description:"State, province, or region"}),postcode:kr().optional().meta({examples:[nd.Location.postcode],description:"Postal code"}),country:kr().meta({examples:[nd.Location.country],description:"Country name"}),countryCode:cd.optional().meta({description:"ISO country code when supplied by the location provider"})}).meta({description:"Provider-independent formatted address details"}),Ap=wo({id:Id.readonly().meta({examples:[nd.Location.id],description:"Location identifier"}),googlePlaceId:kr().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),createdAt:rd().meta({examples:[nd.Location.createdAt],description:"Timestamp in ISO 8601 format when the location was created"}),updatedAt:rd().meta({examples:[nd.Location.updatedAt],description:"Timestamp in ISO 8601 format when the location was last updated"}),name:kr().meta({examples:[nd.Location.name],description:"Location name"}),...Tp.shape,latitude:Qr().min(-90).max(90).meta({examples:[nd.Location.latitude],description:"Latitude coordinate"}),longitude:Qr().min(-180).max(180).meta({examples:[nd.Location.longitude],description:"Longitude coordinate"}),timeZone:kr().min(1).regex(/^[A-Za-z0-9_+-]+(\/[A-Za-z0-9_+-]+)*$/,{message:"Must be a valid IANA timezone identifier format"}).meta({examples:[nd.Location.timeZone],description:"IANA timezone identifier (e.g., 'America/New_York', 'Europe/London', 'Australia/Sydney', 'UTC'). Must be validated against the IANA timezone database where used."}),types:vo(kr()).optional().meta({examples:[["establishment","point_of_interest","stadium"]],description:"Google Place types indicating the category and nature of this location"}),description:kr().optional().meta({examples:["Historic outdoor amphitheater known for summer concerts"],description:"AI-generated description of the place, when available"}),image:qd.optional().meta({description:"Primary location photo"}),venueId:$d.optional().meta({description:"Venue identifier if this location is a managed venue on the platform"})}).meta({description:"Location with full details including coordinates and timezone"}),xp=Ap.omit({venueId:!0}).extend({venue:wo({id:$d.meta({description:"Venue identifier"}),name:kr().meta({description:"Venue name"}),slug:kr().meta({description:"URL-friendly venue slug"}),teamId:kr().meta({description:"Team that owns this venue"}),approval:sd.meta({description:"Venue approval status"}),image:qd.optional().meta({description:"Venue image"}),description:kr().optional().meta({description:"Venue description"})}).optional().meta({description:"Denormalized venue details if this location is a managed venue. Only included when venue is approved."})}),Sp=kr().regex(/^G-[A-Z0-9]+$/,"Google Analytics Measurement ID must start with G-"),Dp=wo({id:xd.readonly().meta({examples:[nd.Promoter.id],description:"Unique identifier for the promoter organization"}),createdAt:rd().readonly().meta({examples:[nd.Promoter.createdAt],description:"Timestamp in ISO 8601 format when the promoter was created"}),updatedAt:rd().readonly().meta({examples:[nd.Promoter.updatedAt],description:"Timestamp in ISO 8601 format when the promoter was last updated"}),name:kr().min(3).max(30).meta({examples:[nd.Promoter.name],description:"Display name of the promoter organization. Must be between 3 and 30 characters"}),slug:kr().min(3).max(30).meta({examples:[nd.Promoter.slug],description:"URL-friendly slug for the promoter organization. Must be unique and between 3 and 30 characters"}),teamId:gd.meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that owns this promoter. Establishes team-based organization and permissions."}),description:kr().meta({examples:[nd.Promoter.description],description:"Detailed description of the promoter organization and their events"}),approval:sd.meta({examples:[nd.Promoter.approval],description:"Approval status of the promoter. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),image:qd.optional().meta({description:"Optional promotional image for the promoter organization with dimensions and alt text"}),location:xp.meta({description:"Primary location details for the promoter including address, coordinates, and timezone"}),geohash:kr().meta({examples:[nd.Promoter.geohash],description:"Geohash encoding of the promoter's location for efficient spatial queries"}),tracking:wo({fbId:kr().optional().meta({examples:[nd.Promoter.tracking.fbId],description:"Facebook pixel ID for tracking conversions and analytics"}),gaId:Sp.optional().meta({examples:[nd.Promoter.tracking.gaId],description:"Google Analytics 4 Measurement ID for web analytics"}),tikTokId:kr().optional().meta({examples:[nd.Promoter.tracking.tikTokId],description:"TikTok pixel ID for advertising and conversion tracking"})}).optional().meta({description:"Optional tracking configuration for analytics and advertising platforms"}),metadata:zd}).meta({description:"Promoter organization with location and approval status"}),Op=wo({id:kr().readonly().meta({examples:[nd.Section.id],description:"Unique identifier for the section"}),createdAt:rd().readonly().meta({examples:[nd.Section.createdAt],description:"Timestamp when the section was created in ISO 8601 format"}),updatedAt:rd().readonly().meta({examples:[nd.Section.updatedAt],description:"Timestamp when the section was last updated in ISO 8601 format"}),name:kr().meta({examples:[nd.Section.name],description:"Display name of the section (e.g., 'VIP Area', 'General Admission')"}),capacity:Gd().prefault(-1).meta({examples:[nd.Section.capacity],description:"Maximum number of attendees for this section. Use -1 for unlimited capacity"}),limit:Bd().prefault(-1).meta({examples:[nd.Section.limit??-1],description:"Maximum number of tickets for this section that can be purchased in a single order. A value of -1 indicates unlimited"}),available:Qr().min(-1).readonly().meta({examples:[nd.Section.available],description:"Number of tickets currently available for purchase in this section. Use -1 when capacity is unlimited"}),sold:Qr().min(0).readonly().meta({examples:[nd.Section.sold],description:"Number of tickets sold for this section"}),reserved:Qr().readonly().meta({examples:[nd.Section.reserved],description:"Number of tickets currently reserved (in pending orders) for this section"}),order:Qr().min(0).meta({examples:[nd.Section.order],description:"Display order of the section. Lower numbers appear first in listings"}),visibility:Oo(["ALWAYS","STACKED","HIDDEN"]).prefault("ALWAYS").meta({examples:["ALWAYS"],description:"Controls how this section is shown: always list all visible admissions, stack to show the cheapest available admission, or hide until a scoped coupon reveals it."}),location:Ap.meta({description:"Physical location details for the section"}),teamId:kr().meta({description:"Team that owns this section. Denormalized for efficient queries."}),promoterId:kr().meta({examples:[nd.Section.promoterId],description:"Unique identifier of the promoter who owns this section"}),eventId:kr().meta({examples:[nd.Section.eventId],description:"Unique identifier of the event this section belongs to"}),eventSlug:kr().meta({examples:[nd.Section.eventSlug],description:"URL-friendly identifier of the event this section belongs to"})}).meta({description:"A section represents a distinct area or tier within an event venue with its own capacity and pricing"}),Cp=Oo(["AUD","NZD","USD"]),Pp=Oo(["FEATURE_DISABLED","UNSUPPORTED_CURRENCY","NOT_ROUTED","NO_CONNECTED_GATEWAY","CHARGES_DISABLED","INCOMPATIBLE_FEE_STRUCTURE"]),_p=wo({available:io().meta({description:"Whether Stripe Connect can be used for the selected team, event, and currency."}),reasons:vo(Pp).meta({description:"Machine-readable reasons Stripe Connect is unavailable. Empty when available is true."}),supportedCurrencies:vo(Cp).meta({description:"Currencies currently supported for Stripe Connect routing in this tenant flow."})});wo({code:Po("STRIPE_CONNECT_UNAVAILABLE").meta({description:"Stable error code returned when Stripe Connect is unavailable."}),availability:_p.meta({description:"Detailed Stripe Connect availability result for UI filtering and recovery."})});const Rp=Oo(["UPCOMING","ENDED"]),Np=Oo(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE","CANCELLED"]),Mp=Oo(["HIDDEN","SCHEDULED","PUBLIC"]),Up=wo({visibility:Mp.optional().meta({description:"Whether public event surfaces show the full location address. Missing values are treated as PUBLIC unless legacy location reveal data says otherwise."}),publishAt:Wd.optional().meta({description:"Wall clock time when the location address becomes public. Required when location visibility is SCHEDULED."}),sendAt:Wd.optional().meta({description:"Wall clock time when customers with successful orders can see the full location address and receive the notification."}),instructions:kr().max(2e3).optional().meta({description:"Arrival instructions shown to customers once the location address has been sent."})}),Lp=xp.extend(Up.shape),jp=wo({id:wd.readonly().meta({examples:[nd.Event.id],description:"A unique identifier for this event"}),createdAt:rd().readonly().meta({examples:[nd.Event.createdAt],description:"Timestamp in ISO 8601 format when this event was created"}),updatedAt:rd().readonly().meta({examples:[nd.Event.updatedAt],description:"Timestamp in ISO 8601 format when this event was last updated"}),name:kr().meta({examples:[nd.Event.name],description:"The title of the event shown to attendees"}),slug:kr().meta({examples:[nd.Event.slug],description:"URL-friendly identifier for the event"}),description:kr().meta({examples:[nd.Event.description],description:"Detailed description of the event"}),approval:sd.meta({examples:["APPROVED"],description:"Approval status of the event"}),status:Rp.meta({examples:["UPCOMING","ENDED"],description:"Current stage of the event lifecycle"}),visibility:Np.meta({examples:["PUBLIC"],description:"Who can see the event"}),currency:ld.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code used for ticket prices"}),url:Nr().optional().meta({examples:["https://example.com"],description:"External URL for the event website or ticket page"}),entryStartsAt:Wd.meta({examples:[nd.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:Wd.meta({examples:[nd.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),publishAt:Wd.meta({examples:[nd.Event.publishAt],description:"Wall clock time when the event becomes publicly visible (no timezone)"}),locationRevealAt:Wd.optional().meta({description:"Deprecated. Use location.sendAt for customer access and location.publishAt for scheduled public address visibility."}),entryInstructions:kr().max(2e3).optional().meta({description:"Deprecated. Use location.instructions for customer-facing arrival instructions."}),images:wo({mobile:qd.meta({description:"Mobile-optimized image for the event"}),desktop:qd.meta({description:"Desktop-optimized image for the event"})}),geohash:kr().meta({examples:[nd.Event.geohash],description:"Geohash representing the event location"}),location:Lp.meta({description:"Structured location details for the event"}),teamId:gd.meta({description:"Team that owns this event. Denormalized for efficient queries."}),promoterId:xd.meta({examples:[nd.Promoter.id],description:"Promoter organizing the event. Must belong to the team."}),taxProfileId:vd.optional().meta({description:"Team tax profile currently used for ticket sales"}),metadata:zd,genres:vo(kr()).optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:vo(kr()).optional().meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),featured:io().optional().meta({description:"Whether this event is an editorial pick",examples:[!0]}),likes:Qr().int().min(0).optional().meta({description:"Number of users who liked this event",examples:[42]}),stripeConnectAvailability:_p.optional().meta({description:"Stripe Connect availability metadata for tenant event UI."})}).meta({description:"event"}),qp=Dp.pick({id:!0,name:!0,slug:!0,description:!0,image:!0}),Gp=wo({event:jp.extend({passcode:kr().optional().meta({description:"Plain-text event passcode. Included only on internal event detail responses for users with event.read access."}),sections:vo(Op),admissions:vo(fc),promoter:qp.optional().meta({description:"Public summary of the promoter organizing this event. Included on event detail responses only."}),liked:io().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]})})}),Bp=Oo(["APPROVED","REJECTED"]);Oo(["CREATED","UPDATED","MANUAL"]);const Fp=wo({key:kr().meta({examples:[nd.Event.id,nd.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),teamId:gd.optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}).meta({description:"Schema for retrieving internal event approval state."}),Vp=wo({eventId:wd,teamId:gd,approval:sd,reason:kr().max(2e3).nullable(),requestedAt:rd().nullable(),changedAt:rd().nullable(),changedByUserId:kr().nullable(),submittedByUserId:kr().nullable()}).meta({description:"Internal approval workflow state for an event."}),zp=wo({approval:Vp}),Wp=Fp.meta({description:"Schema for requesting or resubmitting event approval."}),Yp=wo({key:kr().meta({examples:[nd.Event.id,nd.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),approval:Bp.meta({examples:["APPROVED"],description:"Approval decision for the event"}),reason:kr().max(2e3).optional().meta({description:"Optional reason shown to the event submitter when rejecting the event"}),requestedAt:rd().optional().meta({description:"Approval request timestamp from an email action. When provided, the event must still be pending for that request."})}).meta({description:"Schema for approving or rejecting an event."}),Zp=1e6,Hp=Oo(["INCLUSIVE","EXCLUSIVE"]),Kp=Tp.extend({address:kr().trim().min(1).max(500).meta({description:"Complete formatted registered address"}),city:kr().trim().min(1).max(100).optional().meta({description:"City or locality of the registered address"}),state:kr().trim().min(1).max(100).optional().meta({description:"State, province, or region of the registered address"}),postcode:kr().trim().min(1).max(32).optional().meta({description:"Postal code of the registered address"}),country:kr().trim().min(1).max(100).meta({description:"Country name of the registered address"}),countryCode:cd.meta({description:"Supplier country as an ISO 3166-1 alpha-2 code",examples:["AU"]})}).strict().meta({description:"Registered postal address used on customer receipts"}),Jp=wo({legalName:kr().trim().min(1).max(200).meta({description:"Legal or trading name of the ticket supplier"}),registrationNumber:kr().trim().min(1).max(100).optional().meta({description:"Tax or business registration number shown on customer receipts"}),address:Kp.meta({description:"Registered address of the ticket supplier"})}).strict().meta({description:"Ticket supplier identity shown on customer receipts"}),Qp=wo({taxName:kr().trim().min(1).max(50).meta({description:"Customer-facing tax name, such as GST or VAT",examples:["GST"]}),ratePpm:eo().min(1).max(Zp).meta({description:"Tax rate in parts per million, where 100000 represents 10%",examples:[1e5]}),priceMode:Hp.meta({description:"Whether organiser-entered ticket prices include or exclude tax",examples:["INCLUSIVE"]})}).strict().meta({description:"Tax collection and ticket price configuration"}),Xp=wo({supplier:Jp.meta({description:"Legal supplier details used on customer receipts"}),collection:Qp.meta({description:"Tax collection configuration for ticket sales"})}).strict();function em(e,t){e.supplier.registrationNumber||t.addIssue({code:"custom",message:"A registration number is required when collecting tax",path:["supplier","registrationNumber"]})}Xp.superRefine(em).meta({description:"Editable tax profile data"});const tm=Xp.extend({profileId:vd.readonly().meta({description:"Tax profile used for this ticket tax snapshot"}),profileUpdatedAt:rd().readonly().meta({description:"Version timestamp of the snapshotted tax profile"})}).superRefine(em).meta({description:"Tax profile snapshot stored on an order"}),im=To("mode",[wo({mode:Po("TEAM_DEFAULT")}).strict().meta({description:"Use the team's current default tax profile"}),wo({mode:Po("PROFILE"),profileId:vd}).strict().meta({description:"Use a specific team tax profile"})]).meta({description:"Tax profile choice for an event"}),nm=Xp.extend({id:vd.readonly().meta({description:"Unique tax profile identifier"}),tenantId:kr().readonly().meta({description:"Tenant that owns this tax profile"}),teamId:gd.readonly().meta({description:"Team that owns this tax profile"}),createdAt:rd().readonly().meta({description:"Timestamp when the tax profile was created"}),updatedAt:rd().readonly().meta({description:"Timestamp when the tax profile was last updated"}),updatedByUserId:kr().readonly().meta({description:"User who most recently updated the tax profile"})}).superRefine(em).meta({description:"Reusable supplier and tax configuration for a team"}),rm=wo({teamId:gd.meta({description:"Team whose tax profiles should be retrieved"})}).strict().meta({description:"List the tax profiles configured for a team"}),om=Xp.extend({teamId:gd.meta({description:"Team that owns the tax profile"})}),am=om.superRefine(em).meta({description:"Create a reusable team tax profile"}),sm=om.extend({profileId:vd.meta({description:"Tax profile to update"})}).superRefine(em).meta({description:"Update a reusable team tax profile"}),dm=wo({teamId:gd,profileId:vd}).strict().meta({description:"Identify a tax profile owned by a team"}),cm=wo({profiles:vo(nm).meta({description:"Reusable tax profiles owned by the team"}),defaultProfileId:vd.nullable().meta({description:"Default profile selected for new events, or null when none exist"})}).strict().superRefine(((e,t)=>{0===e.profiles.length&&null===e.defaultProfileId||e.defaultProfileId&&e.profiles.some((t=>t.id===e.defaultProfileId))||t.addIssue({code:"custom",message:"The default tax profile must be one of the listed profiles",path:["defaultProfileId"]})})).meta({description:"Team tax profiles and the current default"}),lm=jp.omit({id:!0,teamId:!0,createdAt:!0,updatedAt:!0,status:!0,approval:!0,geohash:!0,location:!0,likes:!0,stripeConnectAvailability:!0,taxProfileId:!0}).extend({description:dc.meta({examples:[nd.Event.description],description:"Detailed description of the event"}),slug:kr().min(3).max(100).optional().meta({examples:[nd.Event.slug],description:"URL-friendly slug for the event. If not provided, will be automatically generated from the name. Must be unique and between 3 and 100 characters"}),passcode:kr().optional().meta({description:"Passcode for protected access to the event"}),locationId:Id.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:kr().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."}),location:Up.optional().meta({description:"Event-specific location visibility, customer send time, and arrival instructions."}),taxSettingsSelection:im.optional().meta({description:"Tax profile to associate with the event. Omit to use the team's current default profile."}),genres:fd.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:md.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]})}).refine((e=>e.locationId||e.googlePlaceId),{message:"Either locationId or googlePlaceId must be provided"}),um=wo({key:kr().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[nd.Event.id,nd.Event.slug]})}),pm=wo({key:kr().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[nd.Event.id,nd.Event.slug]}),name:kr().min(1).meta({description:"Name for the duplicated event",examples:[nd.Event.name+" (Copy)"]}),entryStartsAt:Wd.meta({description:"New event entry start time. Other copied event and admission datetimes are shifted by the same offset.",examples:[nd.Event.entryStartsAt]}),url:Nr().nullable().optional().meta({description:"External ticketing URL for the duplicated event. Pass null to create the copy without an external URL; omit to copy the source URL.",examples:["https://example.com/events/summer-festival-2025"]})}),mm=wo({key:kr().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[nd.Event.id,nd.Event.slug]}),featured:io().meta({description:"Whether the event should be featured (editorial pick)",examples:[!0,!1]})}),hm=wo({key:kr().min(1).meta({description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug",examples:[nd.Event.id,nd.Event.slug]}),passcode:kr().optional().meta({description:"Passcode for accessing protected events"}),couponCode:kr().optional().meta({description:"Coupon code used to reveal hidden admissions and sections when eligible."}),teamId:kr().optional().meta({description:"Optional team scope. When provided, event must belong to this team."})}),fm=wo({admissions:Qr().int().min(0).optional().meta({description:"Number of active admissions configured for the event"}),sold:Qr().min(0).meta({description:"Number of tickets sold (net of refunds)"}),reserved:Qr().min(0).meta({description:"Number of tickets reserved"}),available:Qr().min(-1).meta({description:"Number of tickets available (-1 for unlimited)"}),capacity:Qr().min(-1).meta({description:"Total capacity (-1 for unlimited)"})}),ym=Oo(["entryStartsAt","distance","createdAt"]),gm=Oo(["asc","desc"]),vm=$o({status:Oo(["UPCOMING","ENDED"]).optional().meta({examples:["UPCOMING"],description:"Filter events by their current lifecycle status"}),approval:sd.optional().meta({examples:["APPROVED"],description:"Filter events by their approval status"}),visibility:Oo(["PUBLIC","PRIVATE","SCHEDULED","PASSCODE"]).optional().meta({examples:["PUBLIC"],description:"Filter events by their visibility setting"}),promoterId:kr().max(128).optional().meta({examples:[nd.Promoter.id],description:"Filter events to only those belonging to a specific promoter. If not provided, returns events from all promoters the user has access to"}),teamId:kr().max(128).optional().meta({description:"Filter events to only those belonging to a specific team. If not provided, returns events from all teams the user has access to"}),venueId:kr().max(128).optional().meta({description:"Filter events to only those at a specific venue. If not provided, returns events at all venues"}),limit:od().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of events to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:kr().max(768).optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Cursor token for pagination. Provide the cursor from the previous response to continue fetching results"}),query:function(){return new Er(sn({type:"string",coerce:!0,...D(undefined)}))}(0,void 0).max(120).optional().meta({examples:["Test Event"],description:"Search term to filter events by name, description, or location. Triggers full‑text search when provided"}),latitude:od().min(-90).max(90).optional().meta({examples:[nd.Event.location.latitude],description:"Latitude coordinate for geographic search. Provide with longitude (and optional radius)"}),longitude:od().min(-180).max(180).optional().meta({examples:[nd.Event.location.longitude],description:"Longitude coordinate for geographic search. Provide with latitude (and optional radius)"}),radius:od().positive().max(2e4).optional().meta({examples:[20],description:"Search radius in kilometers from the provided coordinates. Defaults to 20km"}),country:kr().max(120).optional().meta({examples:["australia"],description:"Filter by country region slug. Matches events where location.country equals the region name"}),state:kr().max(120).optional().meta({examples:["nsw"],description:"Filter by state/province region slug. Matches events where location.state equals the region name"}),city:kr().max(120).optional().meta({examples:["sydney"],description:"Filter by city region slug. Matches events where location.city equals the region name"}),from:kr().date().optional().meta({examples:["2024-01-01"],description:"Filter events that start on or after this date (YYYY-MM-DD format). Events with entryStartsAt >= from"}),to:kr().date().optional().meta({examples:["2024-12-31"],description:"Filter events that start on or before this date (YYYY-MM-DD format). Events with entryStartsAt <= to"}),sort:ym.optional().meta({examples:["entryStartsAt"],description:"Optional list sort field. Defaults to event start time. Use `distance` with latitude and longitude to return nearest events first, or `createdAt` to return newest or oldest events first."}),direction:gm.optional().meta({examples:["desc"],description:"Sort direction for event start or creation time. Defaults to lifecycle-aware event start order; distance sorting always returns nearest events first."}),genres:Ko((e=>"string"==typeof e?[e]:e),vo(hd).max(20,"Cannot filter by more than 20 genres")).optional().meta({examples:[["Tech House","Melodic Techno"]],description:"Filter events by music genre(s). Returns events matching ANY of the provided genres (OR logic). Maximum 20 genres"}),categories:Ko((e=>"string"==typeof e?[e]:e),vo(pd).max(10,"Cannot filter by more than 10 categories")).optional().meta({examples:[["Day Party","Open Air"]],description:"Filter events by category(s). Returns events matching ANY of the provided categories (OR logic). Maximum 10 categories"}),featured:io().optional().meta({examples:[!0],description:"Filter to only featured (editorial pick) events"})}).meta({description:"List events with filtering, full‑text search, geo queries, date range filtering, genre/category filtering, and cursor-based pagination"}),bm=vm,wm=hc({booking:"Booking fee for the cheapest publicly purchasable admission, in cents",currency:"Three-letter ISO 4217 currency code for the cheapest publicly purchasable admission",price:"Cheapest publicly purchasable admission price for this event, selected by customer-facing total"}),$m=wc(jp.extend({inventory:fm.optional(),liked:io().optional().meta({description:"Whether the current user has liked this event",examples:[!0,!1]}),price:wm.nullable().meta({description:"Cheapest publicly purchasable admission price, or null when no public admission is currently available"})}),"events"),Im=wo({event:jp});Oo(["ONLINE","DOOR","SALE_ENDED","SOLD_OUT"]);const Em=vm.omit({cursor:!0,limit:!0}).extend({limit:od().int().min(1).max(1e3).prefault(1e3).meta({examples:[1e3],description:"Maximum number of event slugs to return. Must be between 1 and 1000, defaults to 1000"}),skip:od().int().min(0).max(1e4).prefault(0).meta({examples:[0],description:"Number of matching event slugs to skip before returning results"})}),km=wo({slugs:vo(kr()).meta({description:"Current event slugs for the matching event list"}),skip:od().int().min(0).meta({examples:[0],description:"Number of matching event slugs skipped"}),limit:od().int().min(1).max(1e3).meta({examples:[1e3],description:"Maximum number of event slugs returned"})}),Tm=wo({visibility:Mp.optional().meta({description:"Whether public event surfaces show the full location address. Omit to leave unchanged."}),publishAt:Up.shape.publishAt.nullable().optional().meta({description:"Public location address publish time. Pass null to clear; omit to leave unchanged."}),sendAt:Up.shape.sendAt.nullable().optional().meta({description:"Customer location address send time. Pass null to clear; omit to leave unchanged."}),instructions:Up.shape.instructions.nullable().optional().meta({description:"Arrival instructions for customers. Pass null to clear; omit to leave unchanged."})}),Am=jp.omit({createdAt:!0,updatedAt:!0,geohash:!0,status:!0,approval:!0,location:!0,likes:!0,stripeConnectAvailability:!0,taxProfileId:!0}).partial().extend({description:dc.optional().meta({examples:[nd.Event.description],description:"Detailed description of the event. Omit to leave unchanged."}),key:kr().meta({examples:[nd.Event.id,nd.Event.slug],description:"Event key - either a unique ID (evt_xxx format) or URL-friendly slug"}),slug:kr().min(3).max(100).optional().meta({examples:[nd.Event.slug],description:"URL-friendly slug for the event. Omit to leave unchanged. Must be unique and between 3 and 100 characters"}),passcode:kr().nullable().optional().meta({description:"Passcode for protected access. Pass null to clear; changing visibility away from PASSCODE also clears it."}),url:Nr().nullable().optional().meta({examples:["https://example.com/events/summer-festival-2025"],description:"External event URL. Pass null to clear; omit to leave unchanged."}),locationRevealAt:jp.shape.locationRevealAt.nullable().optional().meta({description:"Wall clock time when the venue address becomes visible. Pass null to clear before reveal; omit to leave unchanged."}),entryInstructions:jp.shape.entryInstructions.nullable().optional().meta({description:"Entrance instructions sent when the location is revealed. Pass null to clear; omit to leave unchanged."}),locationId:Id.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:kr().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),location:Tm.optional().meta({description:"Event-specific location visibility, public publish time, customer send time, and arrival instructions."}),taxSettingsSelection:im.optional().meta({description:"Associate the event with the current default or a selected team tax profile."}),genres:fd.optional().meta({description:"Music genres for the event (1-5 genres)",examples:[["Tech House","Melodic Techno"]]}),categories:md.meta({description:"Event characteristics like vibe, venue type, and amenities (up to 10)",examples:[["Day Party","Open Air","Free Entry"]]}),notify:io().optional().meta({description:"Whether attendees should be notified about this event update.",examples:[!0]})}).meta({description:"Schema for updating an existing event."}),xm=wo({id:Rd.readonly().meta({description:"Unique identifier for the event collaborator"}),createdAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was added"}),updatedAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the collaborator was last updated"}),eventId:wd.meta({description:"Event this collaboration applies to"}),promoterId:xd.meta({description:"Promoter collaborating on the event"}),acceptedBy:Ed.meta({description:"User ID who accepted the invitation to collaborate"}),promoter:wo({id:xd.meta({description:"Unique identifier of the promoter"}),name:kr().meta({description:"Name of the promoter"}),teamId:gd.meta({description:"Team ID of the promoter"})}).optional().meta({description:"Populated promoter details. Only included when explicitly requested."}),permissions:ac.meta({description:"Permissions granted to this collaborator. User must have permission in BOTH this grant AND their team membership (intersection).",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),tenantId:kr().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active event collaborator. Created when a promoter accepts an invitation or is directly added to an event. Hard deleted when removed."}),Sm=xm.pick({id:!0,eventId:!0}).meta({description:"Schema for accepting an event promoter collaboration invitation. User accepting must be a member of the invited promoter's team."}),Dm=wo({id:Rd.readonly().meta({description:"Unique identifier for the event collaboration invitation"}),createdAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),eventId:wd.meta({description:"Event this invitation applies to"}),promoterId:xd.meta({description:"Promoter being invited to collaborate on the event."}),invitedByPromoterId:xd.meta({description:"Promoter who sent this invitation (event owner or collaborator with permission)."}),permissions:ac.meta({description:"Permissions the promoter will receive upon accepting the invitation.",examples:[[],["event.read","event.write"],["order.read"],["ticket.scan"],["*"]]}),token:kr().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),invitedBy:Ed.meta({description:"User ID who sent the invitation"}),expiresAt:Qr().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),tenantId:kr().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending event collaborator invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates an EventCollaborator record and deletes the invitation."}),Om=Dm.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,token:!0,expiresAt:!0,invitedByPromoterId:!0}).meta({description:"Schema for inviting a promoter to collaborate on an event. Creates a pending invitation that the promoter can accept."}),Cm=wo({eventId:wd.meta({description:"Event ID that the collaboration belongs to"}),id:Rd.meta({description:"Event team access grant ID to retrieve"})}),Pm=wo({invite:Dm}),_m=wo({eventId:kr().meta({description:"Event ID to list collaborators for"}),accessPromoterId:kr().optional().meta({description:"DEPRECATED: Use 'promoterId' instead. Filter by collaborating promoter ID (what events can this promoter access). Maintained for backward compatibility."}),ownerPromoterId:kr().optional().meta({description:"DEPRECATED: No longer used. Maintained for backward compatibility only."}),limit:Yd("event collaborators"),cursor:kr().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active event collaborations with pagination and filtering. Only returns accepted collaborations (not pending invitations). Use invite endpoints for pending invitations."}),Rm=wc(xm,"grants"),Nm=wo({collaborator:xm}),Mm=Po("audience-republic").meta({description:"Integration provider."}),Um=wo({listName:kr().trim().min(1).max(200).meta({description:"Shared Audience Republic mailing list name for email and SMS."})}).strict(),Lm=wo({id:Ld,teamId:gd,provider:Mm,enabled:io().meta({description:"Whether this integration is connected."}),configured:io().meta({description:"Whether an encrypted credential is stored. Credentials are never returned."}),revision:Qr().int().positive().meta({description:"Version required for conditional updates."}),activatedAt:rd().meta({description:"Start of future-only team delivery for this connection."}),settings:Um,canManageTeam:io().meta({description:"Whether the caller may change credentials and the shared mailing list."}),tenantDestination:io().meta({description:"Whether tenant configuration references this integration for tenant-wide delivery."})}).meta({description:"Team-owned integration sharing one provider account and mailing list across all promoters."}),jm=wo({teamId:gd}).strict(),qm=wo({integrations:vo(Lm),canManageTeam:io()}).meta({description:"Integrations visible to the caller in this team."}),Gm=wo({id:Ld}).strict(),Bm=wo({teamId:gd,provider:Mm,apiKey:kr().trim().min(1).max(4096).meta({description:"Write-only shared provider API key."}),settings:Um}).strict(),Fm=wo({id:Ld,revision:Qr().int().positive(),apiKey:kr().trim().min(1).max(4096).optional().meta({description:"Replace the shared key. Omit to retain it; required to reconnect."}),settings:Um}).strict(),Vm=Gm.extend({revision:Qr().int().positive()}).strict(),zm=wo({id:jd,integrationId:Ld,scope:Oo(["team","tenant"]),status:Oo(["QUEUED","RUNNING","PAUSED","COMPLETED","FAILED","CANCELLED"]),createdAt:rd(),updatedAt:rd(),processed:Qr().int().nonnegative(),skipped:Qr().int().nonnegative(),failed:Qr().int().nonnegative(),error:kr().optional()}).meta({description:"Durable historical import progress. Counts refer to orders, not unique buyers."}),Wm=Gm.extend({scope:Oo(["team","tenant"]).default("team")}).strict(),Ym=Gm.extend({jobId:jd}).strict(),Zm=wo({key:kr().min(1).meta({description:"Location key - either a location ID (loc_xxx format) or provider-specific identifier (e.g., Google Place ID)",examples:[nd.Location.id,"ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}),Hm=wo({query:kr().min(1).meta({examples:["sydney opera"],description:"Search query for location search"}),latitude:od().min(-90).max(90).optional().meta({examples:[nd.Location.latitude],description:"User's latitude for proximity-based results (optional for better relevance)"}),longitude:od().min(-180).max(180).optional().meta({examples:[nd.Location.longitude],description:"User's longitude for proximity-based results (optional for better relevance)"}),types:vo(kr()).optional().meta({examples:[["establishment"]],description:"Filter results by Google Place types (e.g., 'establishment', 'night_club', 'bar')"})}).meta({description:"Parameters for searching locations"}),Km=wo({googlePlaceId:kr().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID for this location"}),name:kr().meta({examples:[nd.Location.name],description:"Primary name of the location"}),description:kr().meta({examples:[nd.Location.address],description:"Full formatted address"}),venue:wo({id:$d.meta({examples:[nd.Venue.id],description:"Venue ID if this location is a managed venue"}),name:kr().meta({examples:[nd.Venue.name],description:"Venue name"}),teamId:kr().meta({description:"Team that manages this venue"}),image:qd.optional().meta({description:"Primary venue image"})}).optional().meta({description:"Present if this location is a managed venue on the platform"})}).meta({description:"Single location search result with optional venue overlay"}),Jm=wo({predictions:vo(Km).meta({description:"Array of location predictions"})}).meta({description:"Response containing location search results"}),Qm=wo({location:xp}),Xm=Oo(["DRAFT","ACTIVE","PAUSED","RETIRED"]),eh=Oo(["ACTIVE","SUSPENDED","INACTIVE"]),th=Oo(["PENDING","COMPLETED","DUPLICATE"]),ih=wo({id:kr().meta({description:"Membership program ID"}),teamId:kr().meta({description:"Team that owns the program"}),name:kr().meta({description:"Name shown to members",examples:["S.A.S.H Membership"]}),state:Xm.meta({description:"Only an ACTIVE program can be bought. PAUSED and RETIRED programs keep honouring existing passes."}),price:Qr().int().nonnegative().meta({description:"Tax-inclusive annual price in currency minor units",examples:[14999]}),currency:kr().length(3).meta({description:"ISO 4217 currency code",examples:["AUD"]}),termsUrl:Nr().meta({description:"Current membership terms the buyer must acknowledge"})}).meta({description:"An annual membership offer owned by a team"}),nh=wo({id:kr().meta({description:"Membership pass ID"}),programId:kr(),teamId:kr(),userId:kr(),memberNumber:Qr().int().meta({description:"Sequential number identifying the pass within its program. The first pass receives 200.",examples:[200]}),state:eh,active:io().meta({description:"True while the pass is ACTIVE and its paid term has not ended"}),paidThrough:rd().meta({description:"End of the latest paid annual term"}),cancelAt:rd().optional().meta({description:"Present when renewal is scheduled to stop. Benefits continue until paidThrough."}),complimentary:io().meta({description:"True while the current term was granted by staff for free. It never renews; a paidThrough of MEMBERSHIP_NO_END means it has no end date."}),createdAt:rd()}).meta({description:"A durable membership owned by one user"}),rh=wo({id:kr().meta({description:"Membership purchase ID"}),programId:kr(),teamId:kr(),state:th.meta({description:"PENDING until the provider confirms payment. DUPLICATE means a payment arrived for a user who already held an active pass and needs a manual refund."}),price:Qr().int().nonnegative(),currency:kr().length(3),termsUrl:Nr(),expiresAt:rd().meta({description:"When the provider abandons an unpaid attempt"}),passId:kr().optional()}).meta({description:"A checkout attempt for a membership program"}),oh=wo({provider:Po("STRIPE"),clientSecret:kr().meta({description:"Client secret that confirms the first invoice"}),stripeAccountId:kr().meta({description:"Connected account the payment is taken on"})}).meta({description:"What the browser needs to collect the first payment"}),ah=$o({programId:kr().max(128)}),sh=wo({provider:Po("STRIPE"),stripeAccountId:kr().meta({description:"Connected account the payment form must be loaded for"}),customerSessionClientSecret:kr().optional().meta({description:"Lets the payment form show the buyer's saved cards. Absent when the provider declined to issue one."})}).meta({description:"What the payment form needs before the purchase starts"}),dh=$o({teamSlug:kr().min(1).max(128).meta({description:"Slug of the team whose current program is wanted",examples:["sash"]})}),ch=wo({program:ih,payment:wo({provider:Po("STRIPE"),stripeAccountId:kr().meta({description:"Connected account the payment form must be loaded for"})}).optional().meta({description:"How the membership is paid for. Absent when the team cannot take membership payments right now."}),team:wo({id:kr(),slug:kr(),name:kr(),image:qd.optional().meta({description:"The team's avatar, shown beside the program at checkout"})})}),lh=$o({programId:kr().max(128),termsAccepted:Po(!0).meta({description:"The buyer has acknowledged the program's current terms and the automatic annual renewal"})}),uh=wo({purchase:rh,payment:oh}),ph=$o({id:kr().max(128)}),mh=wo({purchase:rh,pass:nh.optional()}),hh=wo({reason:Oo(["ALREADY_MEMBER","MEMBERSHIP_SUSPENDED","PROGRAM_NOT_ON_SALE","PAYMENT_UNAVAILABLE"])}),fh=$o({teamId:kr().max(128).optional()}),yh=wo({passes:vo(nh)}),gh=nh.extend({member:wo({firstName:kr(),lastName:kr(),email:kr()}).optional().meta({description:"Absent when the user account no longer exists"})}).meta({description:"A membership pass with its owner, for staff"}),vh=$o({teamId:kr().max(128),memberNumber:Qr().int().min(1).max(99999).meta({description:"The serial printed on the keyring being handed over. It becomes the member number.",examples:[42]}),email:Cr().max(254).meta({description:"The member's email. Their existing account is used, or a new one is created that they sign in to with this email."}),firstName:kr().trim().min(1).max(100),lastName:kr().trim().min(1).max(100),endsAt:rd().nullable().meta({description:"When the free membership ends. Null for no end date. See defaultMembershipGrantEnd()."})}),bh=$o({teamId:kr().max(128),memberNumber:Qr().int().min(1).max(99999)}),wh=wo({status:Oo(["AVAILABLE","TAKEN","LAPSED","NO_KEYRING"]).meta({description:"AVAILABLE: free. TAKEN: a current or suspended member holds it. LAPSED: a lapsed member holds it, and only they can be given it again. NO_KEYRING: no imported keyring has this serial."})}),$h=$o({eventId:kr().max(128),fobId:kr().regex(/^fob_[0-9a-z]{26}$/).meta({description:"The QR value scanned from the member's keyring"})}),Ih=wo({memberNumber:Qr().int(),member:wo({firstName:kr(),lastName:kr()}).optional().meta({description:"Absent when the user account no longer exists"})}),Eh=To("status",[Ih.extend({status:Po("REDEEMED"),passId:kr(),discount:wo({kind:Oo(["AMOUNT","PERCENT"]),amount:Qr().int().meta({description:"Minor units for AMOUNT, whole percent for PERCENT"}),currency:kr().optional()}),undoUntil:rd().meta({description:"The scanning staff member may undo until this moment"})}),Ih.extend({status:Po("ALREADY_USED"),source:Oo(["ONLINE","DOOR"]),pending:io(),usedAt:rd().optional(),orderId:kr().optional(),usedBy:wo({firstName:kr()}).optional().meta({description:"The staff member who scanned it, for a door use"})}),Ih.extend({status:Po("INACTIVE"),reason:Oo(["EXPIRED","SUSPENDED","ENDED"])}),Ih.extend({status:Po("NO_DISCOUNT")}),wo({status:Po("NOT_A_MEMBER"),reason:Oo(["UNKNOWN_KEYRING","OTHER_TEAM","UNASSIGNED"])})]).meta({description:"What door staff are told about a scanned keyring"}),kh=$o({eventId:kr().max(128),passId:kr().max(128)}),Th=$o({teamId:kr().max(128),passId:kr().max(128)}),Ah=wo({reason:Oo(["ALREADY_MEMBER","MEMBERSHIP_SUSPENDED","NUMBER_TAKEN","MEMBER_NUMBER_MISMATCH","NO_KEYRING","NOT_COMPLIMENTARY"]),memberNumber:Qr().int().optional().meta({description:"The member number the account already holds, for ALREADY_MEMBER and MEMBER_NUMBER_MISMATCH"})}),xh=$o({teamId:kr().max(128),limit:Yd("members"),cursor:kr().max(768).optional().meta({description:"Pagination cursor from the previous response"})}),Sh=wc(gh,"members").extend({program:ih.optional()}),Dh=Oo(["PROCESSING","TICKETS_CANCELLED","CANCELLED"]),Oh=kr().trim().min(1,"Enter a reason").max(500,"Reason must be 500 characters or fewer"),Ch=wo({id:kd,request:wo({cancelOrder:io().optional().meta({description:"Whether this request closes the order to further ticket issuance."}),idempotencyKey:kr().meta({description:"Client key identifying the accepted cancellation request."}),ticketIds:vo(Ad).optional().meta({description:"Original ticket selection for replaying the request. Omitted to select all tickets."})}).meta({description:"Original request identity and selection."}),ticketIds:vo(Ad).meta({description:"Tickets selected for this cancellation operation."}),fullCancellation:io().meta({description:"Whether the request selected all tickets. Closing the order is controlled separately by request.cancelOrder."}),reason:Oh.meta({description:"Reason shared with the buyer."}),actor:wo({type:Oo(["USER","SYSTEM"]).meta({description:"Actor responsible for the cancellation."}),userId:Ed.optional(),name:kr().optional().meta({description:"Actor name captured when the cancellation was requested."})}),createdAt:rd().meta({description:"Time the cancellation request was accepted."}),completedAt:rd().optional().meta({description:"Time ticket cancellation completed."}),status:Oo(["PROCESSING","SUCCEEDED"]).meta({description:"Ticket cancellation progress, independent of email delivery."}),retryAction:Oo(["RESUME_CANCELLATION"]).optional().meta({description:"Replay the original request to complete unfinished cancellation work."}),notification:wo({requested:io().meta({description:"Whether staff requested a buyer email. Delivery is tracked by the shared notification service."})})}).meta({description:"Staff-only cancellation history, including notification preference."}),Ph=wo({cancellation:Ch}),_h=wo({cancellations:vo(Ch)}),Rh=wo({id:kd,reason:Oh.meta({description:"Reason shared with the buyer."}),ticketIds:vo(Ad).meta({description:"Tickets affected by this cancellation."})}).meta({description:"Buyer-visible cancellation details."}),Nh=wo({name:kr().meta({examples:["tenant-web","team-web","api","partner"],description:"Free-form channel identifier describing where the order originated."}),referrer:kr().optional().meta({examples:["https://sash.teams.mixmag.au/events/example-event"],description:"Optional referrer URL captured at order creation for redirect routing and attribution."}),utmSource:kr().optional().meta({examples:["instagram"],description:"Optional UTM source captured from the originating URL."}),utmMedium:kr().optional().meta({examples:["social"],description:"Optional UTM medium captured from the originating URL."}),utmCampaign:kr().optional().meta({examples:["summer-launch"],description:"Optional UTM campaign captured from the originating URL."}),deviceType:Oo(["MOBILE","TABLET","DESKTOP"]).optional().meta({examples:["MOBILE"],description:"Optional analytics device classification captured at order creation."}),browser:kr().optional().meta({examples:["Chrome"],description:"Optional analytics browser classification captured at order creation."}),country:kr().optional().meta({examples:["Australia"],description:"Optional viewer country captured at order creation for analytics attribution."}),region:kr().optional().meta({examples:["Australia - New South Wales"],description:"Optional viewer region captured at order creation for analytics attribution."}),sessionId:kr().optional().meta({examples:["ses_01HX..."],description:"Session ID captured at order creation for client/server analytics linking."}),anonymousId:kr().optional().meta({examples:["aid_01HX..."],description:"Browser anonymous ID captured at order creation for attribution linking."})}),Mh=wo({id:kr().meta({examples:[nd.CouponCode.id],description:"Unique identifier of the coupon code used in the order"}),name:kr().meta({examples:[nd.CouponCode.name],description:"The coupon code string that was entered by the customer"}),couponId:kr().meta({examples:[nd.CouponCode.couponId],description:"Unique identifier of the parent coupon configuration"})}),Uh=wo({id:kr().meta({examples:[nd.Customer.id],description:"Unique identifier of the customer who placed the order"}),firstName:kr().meta({examples:[nd.Customer.firstName],description:"First name of the customer"}),lastName:kr().meta({examples:[nd.Customer.lastName],description:"Last name of the customer"}),email:Cr().meta({examples:[nd.Customer.email],description:"Email address of the customer"}),phone:kr().meta({examples:[nd.Customer.phone],description:"Customer phone number in E.164 format for SMS delivery"}).optional()}),Lh=wo({id:kr().meta({examples:[nd.Event.id],description:"Unique identifier of the event associated with the order"}),name:kr().meta({examples:[nd.Event.name],description:"Display name of the event"}),slug:kr().meta({examples:[nd.Event.slug],description:"URL-friendly slug of the event"}),location:kr().meta({examples:[nd.Event.location.name],description:"Name of the venue or location where the event takes place"}).optional(),locationAddress:kr().optional().meta({examples:[nd.Event.location.address],description:"Full venue address, available once the event location is revealed."}),locationLatitude:Qr().optional().meta({examples:[nd.Event.location.latitude],description:"Venue latitude, available once the event location is revealed."}),locationLongitude:Qr().optional().meta({examples:[nd.Event.location.longitude],description:"Venue longitude, available once the event location is revealed."}),entryInstructions:kr().max(2e3).optional().meta({description:"Latest entry instructions for customers once the event location is revealed."})}),jh=Oo(["GATEWAY","SHIPPING","SMS_DELIVERY"]).meta({description:"Type of fee applied to an order"}),qh=wo({id:kr().meta({examples:[nd.OrderFee.id],description:"Unique identifier for this order fee"}),createdAt:rd().readonly().meta({examples:[nd.OrderFee.createdAt],description:"Timestamp in ISO 8601 format when this fee was created"}),reason:kr().meta({examples:[nd.OrderFee.reason],description:"Description explaining why this fee was applied to the order"}),amount:Qr().finite("Amount must be a valid number").meta({examples:[nd.OrderFee.amount],description:"Fee amount in cents (positive value indicates charge to customer, negative value indicates credit or discount)"}),currency:ld.meta({examples:[nd.OrderFee.currency],description:"Currency code in ISO 4217 format"}),requestId:kr().meta({examples:[nd.OrderFee.requestId],description:"External payment processor request identifier for tracking this fee"}),kind:jh.optional().meta({examples:["GATEWAY"],description:"Type of fee for categorization and reporting"})}),Gh=wo({net:eo().min(0).meta({examples:[nd.OrderItem.price.net],description:"Total amount to pay to promoter in cents.\nCalculated as: total - booking - refunded"}),total:eo().min(0).meta({examples:[nd.OrderItem.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross - discount"}),gross:eo().min(0).meta({examples:[nd.OrderItem.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + tax added to the entered price + booking"}),base:eo().min(0).meta({examples:[nd.OrderItem.price.base],description:"Total ticket price in cents"}),booking:eo().min(0).meta({examples:[nd.OrderItem.price.booking],description:"Total booking fees in cents (non-refundable)"}),tax:eo().min(0).optional().meta({description:"Ticket tax component in cents. Informational when already included in the entered price and included in total when added to it."}),refunded:eo().max(0).meta({examples:[nd.OrderItem.price.refunded],description:"Total amount refunded in cents"}),discount:eo().max(0).meta({examples:[nd.OrderItem.price.discount],description:"Total amount discounted in cents"}),currency:ld.meta({examples:[nd.OrderItem.price.currency],description:"Currency code in ISO 4217 format."})}),Bh={taxableAmount:eo().min(0).meta({description:"Amount excluding collected tax, in minor currency units"}),amount:eo().min(0).meta({description:"Collected tax amount in minor currency units"}),grossAmount:eo().min(0).meta({description:"Amount including collected tax, in minor currency units"})};function Fh(e){return e.grossAmount===e.taxableAmount+e.amount}wo(Bh).refine(Fh,{message:"Gross amount must equal taxable amount plus tax amount",path:["grossAmount"]});const Vh=wo({...Bh,settings:tm.meta({description:"Event tax settings snapshot used for this order item"})}).refine(Fh,{message:"Gross amount must equal taxable amount plus tax amount",path:["grossAmount"]}).meta({description:"Immutable ticket tax snapshot and calculated amount"}),zh=wo({supplierLegalName:kr().trim().min(1).meta({description:"Legal entity supplying the platform booking service"}),registrationLabel:kr().trim().min(1).max(50).optional().meta({description:"Label for the platform supplier registration number"}),registrationNumber:kr().trim().min(1).max(100).meta({description:"Platform supplier tax or business registration number"}),taxName:kr().trim().min(1).max(50).meta({description:"Customer-facing tax name for the platform booking fee"}),ratePpm:eo().min(1).max(Zp).meta({description:"Platform fee tax rate in parts per million"}),priceMode:Po("INCLUSIVE").meta({description:"Platform booking fees are displayed inclusive of tax"})}).strict().meta({description:"Platform booking fee tax settings snapshot"}),Wh=wo({ticket:tm.optional().meta({description:"Ticket supplier tax settings used for this order"}),platformFee:zh.optional().meta({description:"Platform booking fee tax settings used for this order"})}).strict().refine((e=>void 0!==e.ticket||void 0!==e.platformFee),{message:"Include at least one tax settings snapshot"}).meta({description:"Immutable supplier tax settings used by the order"}),Yh=Oo(["ADMISSION","ADDON"]),Zh=wo({id:kr().meta({examples:[nd.OrderItem.id],description:"Unique identifier for this order item"}),kind:Yh.meta({examples:[nd.OrderItem.kind],description:"Type of item: ADMISSION for tickets, ADDON for additional products or services"}),quantity:eo().min(1).meta({examples:[nd.OrderItem.quantity],description:"Number of items purchased (minimum 1)"}),admissionId:kr().optional().meta({examples:[nd.OrderItem.admissionId],description:"Unique identifier of the admission ticket type, required for ADMISSION items"}),sectionId:kr().optional().meta({examples:[nd.OrderItem.sectionId],description:"Unique identifier of the venue section for this admission"}),admission:fc.optional().meta({examples:[nd.Admission],description:"Complete admission details captured at time of purchase. This is a snapshot that preserves the exact ticket type information as it was when the order was placed"}),section:Op.optional().meta({examples:[nd.Section],description:"Complete section details captured at time of purchase. This is a snapshot that preserves the exact venue area or category information as it was when the order was placed"}),price:Gh.meta({description:"Pricing breakdown for this order item including all fees and discounts"}),tax:Vh.optional().meta({description:"Tax settings and amount fixed when this item was priced"})}),Hh=Zh.superRefine(((e,t)=>{void 0!==e.price.tax==(void 0!==e.tax)?e.tax&&e.price.tax!==e.tax.amount&&t.addIssue({code:"custom",message:"Price tax must equal the item tax amount",path:["price","tax"]}):t.addIssue({code:"custom",message:"Price tax and item tax snapshot must be provided together",path:["price","tax"]})})),Kh=wo({promoter:io(),tenant:io()}),Jh=Oo(["SMS_DELIVERY"]).meta({description:"Type of pre-computed offer available for this order"}),Qh=wo({amount:eo().min(0).meta({examples:[200],description:"Offer price in the smallest currency unit (e.g. cents)"}),currency:ld.meta({examples:["AUD"],description:"Three-letter ISO 4217 currency code"})}),Xh=wo({kind:Jh.meta({examples:["SMS_DELIVERY"],description:"Discriminator identifying the type of offer"}),label:kr().meta({examples:["SMS ticket delivery"],description:"Human-readable label for the offer"}),price:Qh.meta({description:"Pre-computed price for this offer"})}),ef=Oo(["FREE","AIRWALLEX","STRIPE"]),tf=Oo(["AMERICAN_EXPRESS","CARTES_BANCAIRES","CHINA_UNION_PAY","DINERS_CLUB_INTERNATIONAL","DISCOVER","EFTPOS_AUSTRALIA","INTERAC","JCB","LINK","MAESTRO","MASTERCARD","OTHER","UNKNOWN","UNION_PAY","VISA"]),nf=Oo("ACH_DIRECT_DEBIT.ACSS_DEBIT.AFFIRM.AFTERPAY.ALFAMART.ALIPAY.ALIPAYCN.ALIPAYHK.ALMA.AMEX_EXPRESS_CHECKOUT.AMAZON_PAY.APPLEPAY.ATOME.BACS_DIRECT_DEBIT.BANCONTACT.BANK_TRANSFER.BECS_DIRECT_DEBIT.BILLIE.BITPAY.BLIK.BOLETO.BOOST.CARD.CARD_PRESENT.CASHAPP.CRYPTO.CUSTOM.CUSTOMER_BALANCE.DANA.DOKU_EWALLET.DRAGONPAY.DUIT_NOW.EFT_DIRECT_DEBIT.EPS.ESUN.FAMILY_MART.FPX.FPS.GCASH.GIROPAY.GOOGLEPAY.GO_PAY.GRABPAY.HI_LIFE.IDEAL.INDOMARET.INTERAC_PRESENT.JENIUS_PAY.KAKAOPAY.KLARNA.KONBINI.KOREAN_LOCAL_CARD.LINK.LINKAJA.MASTERPASS.MAXIMA.MB_WAY.MOBILEPAY.MULTIBANCO.MYBANK.NARVESEN.NAVER_PAY.NZ_BANK_ACCOUNT.ONLINE_BANKING.OVO.OXXO.P24.PAYBYBANKAPP.PAYCO.PAYEASY.PAYPAL.PAYPAY.PAYSAFECASH.PAYSAFECARD.PAYSERA.PAY_NOW.PERLAS_TERMINALS.PIX.PROMPTPAY.RABBIT_LINE_PAY.REVOLUT_PAY.SAMSUNG_PAY.SATISPAY.SEPA_DIRECT_DEBIT.SEVEN_ELEVEN.SHOPEE_PAY.SKRILL.SOFORT.SWISH.TNG.TOSS_PAY.TRUEMONEY.TRUSTLY.TWINT.VERKKOPANKKI.VISA_CHECKOUT.WECHATPAY.ZIP".split(".")),rf=wo({method:ef.meta({examples:["FREE"],description:"Payment gateway used to process this order: FREE for no-cost orders, AIRWALLEX or STRIPE for paid orders"}),source:nf.optional().meta({examples:["APPLEPAY","GOOGLEPAY","CARD"],description:"Payment method used by the customer such as ApplePay, GooglePay, or card-based payments"}),brand:tf.optional().meta({examples:["VISA","MASTERCARD","AMERICAN_EXPRESS"],description:"Card brand when source is CARD (Visa, Mastercard, American Express, etc.)"}),last4:kr().optional().meta({examples:["4242"],description:"Last 4 digits of the card number when source is CARD"}),stripeId:kr().optional().meta({examples:["pi_1234567890abcdef"],description:"Stripe payment intent identifier when using Stripe gateway"}),stripeClientSecret:kr().optional().meta({examples:["pi_1234567890abcdef_secret_xyz"],description:"Stripe PaymentIntent client secret associated with the order, used to complete the payment flow"}),stripeCustomerSessionClientSecret:kr().optional().meta({examples:["cuss_1234567890abcdef_secret_xyz"],description:"Stripe CustomerSession client secret used by the Payment Element to offer and redisplay saved payment methods"}),stripeAccountId:kr().optional().meta({examples:["acct_1234567890abcdef"],description:"Connected Stripe account ID for direct charges. When present, payment is processed directly on the connected account rather than the platform account."}),airwallexId:kr().optional().meta({examples:["int_hkdmr7v9rg1j8donpkmv96"],description:"Airwallex payment intent identifier when using Airwallex gateway"}),airwallexClientSecret:kr().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiaW50ZW50X2lkIjoiaW50X2hrZG1yN3Y5cmcxajhkb25wa212OTYifQ.K8vLx2nPzQHdR5mT1wYcBfJkLmNpS3xG7aE9dH4qZvM"],description:"Airwallex client secret used to authenticate requests for payment initialization"}),airwallexCustomerId:kr().optional().meta({examples:["cus_hkdmrhkh8he4j3kvela"],description:"Airwallex customer ID attached to the PaymentIntent for saved cards functionality"}),airwallexCustomerClientSecret:kr().optional().meta({examples:["eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MTcwMDAwMzYwMCwiY3VzdG9tZXJfaWQiOiJjdXNfaGtkbXJoa2g4aGU0ajNrdmVsYSJ9.abc123"],description:"Airwallex customer client secret for accessing saved payment methods in the Drop-in Element"})}),of=wo({total:eo().meta({description:"Customer refunds in settlement minor units, negative for refunds."}),items:eo().meta({description:"Refunded ticket and product principal, negative for refunds."}),shipping:eo().meta({description:"Refunded shipping, negative for refunds."}),fees:eo().meta({description:"Refunded customer fees, reported separately from organiser principal."}),count:eo().nonnegative().meta({description:"Successful refunds included at the accounting cutoff."}),tickets:eo().nonnegative().meta({description:"Tickets cancelled by the included successful refunds."})}),af=wo({refundBreakdown:of.optional().meta({description:"Refund components at the settlement cutoff. Absent on legacy prices."}),net:eo().meta({examples:[nd.Order.price.net],description:"Total amount to pay to promoter in cents.\nTicket and shipping revenue after organiser-funded refunds and disputes, excluding booking and SMS fees."}),total:eo().meta({examples:[nd.Order.price.total],description:"Total amount the customer should pay in cents.\nCalculated as: gross + discount + sms"}),gross:eo().min(0).meta({examples:[nd.Order.price.gross],description:"Total amount before refunds and discounts in cents.\nCalculated as: base + tax added to entered prices + booking + shipping"}),base:eo().min(0).meta({examples:[nd.Order.price.base],description:"Total ticket price in cents"}),booking:eo().min(0).meta({examples:[nd.Order.price.booking],description:"Total booking fees in cents (non-refundable)"}),tax:eo().min(0).optional().meta({description:"Total ticket tax component in cents. This excludes tax contained in platform booking fees."}),shipping:eo().min(0).meta({examples:[nd.Order.price.shipping],description:"Total shipping amount in cents"}),sms:eo().min(0).default(0).meta({examples:[nd.Order.price.sms],description:"SMS delivery fee in cents (customer-facing price in event currency)"}),refunded:eo().max(0).meta({examples:[nd.Order.price.refunded],description:"Total amount refunded in cents (negative value)"}),discount:eo().max(0).meta({examples:[nd.Order.price.discount],description:"Total amount discounted in cents (negative value)"}),gateway:eo().max(0).meta({examples:[nd.Order.price.gateway],description:"Total absorbed payment gateway fees in cents (negative value)"}),dispute:eo().max(0).meta({examples:[nd.Order.price.dispute],description:"Total non-absorbed payment gateway fees in cents (negative value)"}),currency:ld.meta({examples:[nd.Order.price.currency],description:"Currency code in ISO 4217 format"})}),sf=Oo(["PENDING","PROCESSING","SUCCEEDED","FAILED"]),df=Oo(["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED","OTHER"]),cf=Oo(["USER","GATEWAY","SYSTEM"]),lf=wo({orderItemId:kr().meta({examples:[nd.OrderRefundItem.orderItemId],description:"Identifier of the order item being refunded"}),quantity:eo().min(1).meta({examples:[nd.OrderRefundItem.quantity],description:"Number of units refunded for this item"}),amount:eo().min(0).meta({examples:[nd.OrderRefundItem.amount],description:"Refund amount for this item in cents, after discounts, including any exclusive ticket tax and excluding booking fees"}),taxAmount:eo().min(0).optional().meta({description:"Ticket tax component reversed by this refund item"}),ticketIds:vo(kr()).meta({examples:[nd.OrderRefundItem.ticketIds],description:"Specific ticket identifiers that were refunded (selected via FIFO)"})}),uf=wo({idempotencyKey:kr().optional().meta({examples:[nd.OrderRefund.request.idempotencyKey],description:"Client-provided key to prevent duplicate refund processing"})}),pf=wo({currency:kr().meta({examples:["AUD"],description:"Currency used for all refund amounts"}),total:eo().min(1).meta({examples:[nd.OrderRefund.price.total],description:"Total refund amount in cents, including ticket, shipping, and fee portions."}),items:eo().min(0).meta({examples:[nd.OrderRefund.price.items],description:"Ticket item portion of the refund in cents"}),shipping:eo().min(0).meta({examples:[nd.OrderRefund.price.shipping],description:"Shipping portion of the refund in cents"}),fees:eo().min(0).meta({examples:[nd.OrderRefund.price.fees],description:"Fee portion of the refund in cents"}),tax:eo().min(0).optional().meta({description:"Ticket tax component reversed by this refund"})}),mf=wo({cancelRequested:io().meta({examples:[nd.OrderRefund.tickets.cancelRequested],description:"Whether ticket cancellation was requested for the refund"}),cancelled:io().meta({examples:[nd.OrderRefund.tickets.cancelled],description:"Whether tickets were cancelled as part of this refund"}),cancelledCount:eo().min(0).meta({examples:[nd.OrderRefund.tickets.cancelledCount],description:"Number of tickets that were cancelled"})}),hf=wo({provider:ef.meta({examples:["STRIPE","AIRWALLEX"],description:"Payment gateway used to process the refund"}),refundId:kr().optional().meta({examples:[nd.OrderRefund.gateway.refundId],description:"Refund identifier from the payment gateway"}),idempotencyKey:kr().optional().meta({examples:[nd.OrderRefund.gateway.idempotencyKey],description:"Idempotency key sent to the payment gateway"})}),ff=wo({type:cf.meta({examples:["USER","GATEWAY"],description:"Who initiated the refund"}),userId:kr().optional().meta({examples:[nd.OrderRefund.actor.userId],description:"Identifier of the user who initiated the refund"})}),yf=wo({requested:io().meta({examples:[nd.OrderRefund.notification.requested],description:"Whether a customer refund confirmation email was requested."}),sentAt:rd().optional().meta({examples:[nd.OrderRefund.notification.sentAt],description:"Timestamp when the refund confirmation email was sent."})}),gf=wo({reason:kr().meta({examples:["Insufficient funds for refund"],description:"Gateway or system failure reason"}),message:kr().optional().meta({examples:["The refund could not be processed."],description:"User-facing failure message when available"})}),vf=wo({id:kr().meta({examples:[nd.OrderRefund.id],description:"Unique identifier for this refund"}),request:uf.optional().meta({description:"Request metadata supplied by Sessions or API callers"}),status:sf.meta({examples:["PENDING","SUCCEEDED"],description:"Current processing status. PENDING: awaiting gateway confirmation or async processing (e.g., bank transfers). PROCESSING: gateway confirmed, ticket cancellation in progress. SUCCEEDED/FAILED: terminal states."}),acceptedAt:rd().optional().meta({examples:[nd.OrderRefund.acceptedAt],description:"Timestamp when the payment gateway accepted the refund"}),failedAt:rd().optional().meta({examples:[nd.OrderRefund.failedAt],description:"Timestamp when the refund failed"}),failure:gf.optional().meta({description:"Failure details when the refund failed"}),price:pf.meta({description:"Refund amount breakdown"}),reason:df.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund used for analytics"}),note:kr().optional().meta({examples:[nd.OrderRefund.note],description:"Free-form notes explaining the refund"}),items:vo(lf).meta({description:"Line items included in this refund with quantities and amounts"}),tickets:mf.meta({description:"Ticket cancellation state for the refund"}),gateway:hf.meta({description:"Gateway refund identifiers"}),actor:ff.meta({description:"Refund initiator"}),metadata:So(kr(),kr()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"}),notification:yf.meta({description:"Refund confirmation notification state"}),createdAt:rd().meta({examples:[nd.OrderRefund.createdAt],description:"Timestamp when the refund was created"})}),bf=af.extend({exchangeRate:Qr().meta({examples:[1.4],description:"Conversion rate applied from the original payment currency to the settlement currency. 1.0 when both currencies are the same"})}).meta({description:"Settled price breakdown in the payout currency. All amounts from the original order price are converted using the exchange rate. For same-currency orders the values match the order price with an exchange rate of 1.0",examples:[{base:14e3,booking:700,shipping:0,sms:0,discount:0,refunded:0,gateway:0,dispute:0,gross:14700,total:14700,net:14e3,currency:"AUD",exchangeRate:1.4}]});function wf(e,t,i={}){return wo({id:kr().meta({examples:t.idExamples,description:t.idDescription}),createdAt:rd().readonly().meta({examples:t.createdAtExamples,description:"Timestamp in ISO 8601 format when this timeline entry was created"}),...i,kind:e.meta({examples:t.kindExamples,description:t.kindDescription}),editable:io().meta({examples:[!1],description:"Whether this timeline entry can be edited by users"}),pinned:io().meta({examples:[!1],description:"Whether this timeline entry is pinned to the top of the timeline"}),description:kr().meta({examples:t.descriptionExamples,description:"Human-readable description of what happened in this timeline event"}),author:kr().meta({examples:["System"],description:"Name of the user or system that created this timeline entry"}),userId:kr().optional().meta({examples:[nd.User.id],description:t.userIdDescription??"Identifier of the user who created this timeline entry, when available"}),externalId:kr().optional().meta({examples:t.externalIdExamples,description:t.externalIdDescription})})}const $f=wf(Oo("ORDER_STATUS_UPDATED.ORDER_EXPIRED.ORDER_COMPLETED.PAYMENT_INITIATED.PAYMENT_PROCESSING.PAYMENT_FAILED.PAYMENT_SUCCEEDED.REFUND_INITIATED.REFUND_PROCESSING.REFUND_SUCCEEDED.REFUND_SETTLED.REFUND_FAILED.CHARGEBACK_INITIATED.CHARGEBACK_EVIDENCE_SUBMITTED.CHARGEBACK_WON.CHARGEBACK_LOST.CHARGEBACK_FUNDS_WITHDRAWN.TICKETS_GENERATED.TICKET_ADDED.TICKETS_SCANNED.TICKET_EDITED.TICKET_STATUS_CHANGED.EMAIL_SENT.EMAIL_DELIVERED.EMAIL_OPENED.EMAIL_BOUNCED.EMAIL_COMPLAINED.EMAIL_FAILED.SMS_SENT.SMS_DELIVERED.SMS_FAILED.NOTE".split(".")),{createdAtExamples:[nd.Order.createdAt],descriptionExamples:["Order was created successfully"],externalIdDescription:"External idempotency key for deduplication (e.g., SES messageId + eventType)",externalIdExamples:["ses:01234567-89ab-cdef-0123-456789abcdef:Delivery"],idDescription:"Unique identifier of the timeline entry",idExamples:[nd.Timeline.id],kindDescription:"Type of timeline event (ORDER_COMPLETED, PAYMENT_SUCCEEDED, REFUND_INITIATED, etc.)",kindExamples:["ORDER_COMPLETED"],userIdDescription:"Identifier of the user who created this timeline entry, when available."},{status:kr().optional().meta({examples:["SUCCESSFUL"],description:"Order status associated with this timeline entry, when applicable."})}),If=Oo(["PENDING","PROCESSING","SUCCESSFUL","DISPUTED","ABANDONED"]),Ef=wo({id:Td.readonly().meta({examples:[nd.Order.id],description:"A unique identifier for this order."}),createdAt:rd().readonly().meta({examples:[nd.Order.createdAt],description:"Timestamp in ISO 8601 format when this order was created."}),updatedAt:rd().readonly().meta({examples:[nd.Order.updatedAt],description:"Timestamp in ISO 8601 format when this order was last updated."}),status:If.meta({examples:["PENDING"],description:"Current payment lifecycle status. PENDING: awaiting payment. PROCESSING: payment in progress. SUCCESSFUL: payment confirmed. DISPUTED: chargeback filed. ABANDONED: expired or cancelled."}),cancellationStatus:Dh.optional().meta({description:"Ticket cancellation state, independent of payment status."}),cancellations:vo(Rh).optional().meta({description:"Buyer-visible reasons and affected tickets. Available on order detail responses."}),payment:rf.optional().meta({description:"Payment gateway details including method, card brand, and transaction identifiers. Absent for free orders."}),items:vo(Hh).meta({description:"Line items in this order, each with a ticket type, quantity, and price breakdown."}),fees:vo(qh).meta({description:"Gateway fees recorded against this order from settlement processing (e.g. payment processing fees, dispute fees)."}),price:af.meta({description:"Price breakdown in the event currency. This reflects what the customer was charged."}),tax:Wh.optional().meta({description:"Immutable ticket and platform fee tax settings used to calculate this order"}),settlement:bf.optional().meta({description:"Price breakdown in the payout currency with the exchange rate applied. When the event currency differs from the settlement currency, all amounts are converted. For same-currency orders the values match the order price with an exchange rate of 1.0."}),couponCode:Mh.optional().meta({description:"Coupon code applied to this order for discount calculation."}),customer:Uh.optional().meta({description:"Customer who placed this order. Absent for guest checkouts before customer details are captured."}),marketingConsent:Kh.optional().meta({description:"Marketing opt-in choices captured during checkout."}),timeline:vo($f).optional().meta({description:"Chronological audit trail of events for this order (payments, refunds, emails, scans)."}),refunds:vo(vf).default([]).meta({description:"Refunds processed for this order including pending, succeeded, and failed attempts."}),offers:vo(Xh).default([]).meta({description:"Pre-computed add-on offers available during checkout (e.g. SMS ticket delivery)."}),customerId:Sd.optional().meta({examples:[nd.Customer.id],description:"Identifier of the customer who placed this order."}),createdBy:Uh.optional().meta({description:"Admin user who created this order on behalf of the customer."}),teamId:gd.meta({description:"Team that owns this order."}),promoterId:xd.meta({examples:[nd.Promoter.id],description:"Promoter managing this order."}),event:Lh.meta({description:"Snapshot of the event at time of purchase (name, slug, location)."}),payoutIds:vo(Cd.meta({examples:["pay_01HQXYZ"],description:"Payout identifier."})).meta({description:"Payout identifiers for settlements that included this order."}),eventId:wd.meta({examples:[nd.Event.id],description:"Identifier of the event this order belongs to."}),checkoutUrl:kr().optional().readonly().meta({examples:["https://example.com/checkout/ord_1234567890"],description:"Derived checkout URL where the customer can complete payment for this order."}),returnUrl:kr().optional().meta({examples:["/orders"],description:"Frozen registered confirmation URL, tenant return, or approved native return. External web selection requires returnDestinationKey."}),returnDestinationKey:kr().optional(),channel:Nh.optional().meta({description:"Channel metadata captured at order creation to identify origin and redirect context."}),reservedAt:rd().optional().meta({examples:[(new Date).toISOString()],description:"Timestamp when inventory was reserved for this order. Used for checkout countdown timer."})}).meta({description:"A customer order for event tickets. Tracks the full lifecycle from checkout through payment, settlement, and payout."}),kf=wo({id:kr().meta({examples:[nd.Admission.id],description:"Admission ID reference"}),name:kr().meta({examples:["VIP Access","General Admission","Early Bird"],description:"Admission type name at time of purchase"}),price:wo({base:Qr().meta({description:"Base price in smallest currency unit (cents)"}),booking:Qr().meta({description:"Booking fee in smallest currency unit (cents)"}),currency:kr().meta({examples:["USD","EUR","GBP"],description:"ISO 4217 currency code"})}).meta({description:"Price snapshot at time of purchase"}),entryStartsAt:Wd.meta({description:"Wall clock time when ticket holder can enter (no timezone, displays same everywhere)"}),entryEndsAt:Wd.meta({description:"Wall clock time when entry period ends (no timezone, displays same everywhere)"})}).meta({description:"Admission details for this ticket"}),Tf=wo({firstName:kr().trim().min(1).meta({examples:[nd.Customer.firstName],description:"First name of the ticket attendee"}),lastName:kr().trim().min(1).meta({examples:[nd.Customer.lastName],description:"Last name of the ticket attendee"}),email:Cr().meta({examples:[nd.Customer.email],description:"Email address of the ticket attendee"}),phone:kr().meta({examples:[nd.Customer.phone],description:"Phone number of the ticket attendee (optional)"}).optional()}).meta({description:"Attendee information for a ticket - can be edited by tenant admins. Defaults to the order customer details when ticket is created."}),Af=wo({id:kr().meta({examples:[nd.Event.id],description:"Event ID reference"}),name:kr().meta({examples:[nd.Event.name],description:"The title of the event shown to attendees"}),slug:kr().meta({examples:[nd.Event.slug],description:"URL-friendly identifier for the event"}),location:Ap.meta({description:"Structured location details for the event"}),entryStartsAt:Wd.meta({examples:[nd.Event.entryStartsAt],description:"Wall clock time when event entry begins (no timezone, displays same everywhere)"}),entryEndsAt:Wd.meta({examples:[nd.Event.entryEndsAt],description:"Wall clock time when event entry ends (no timezone, displays same everywhere)"}),images:wo({mobile:qd.meta({description:"Mobile-optimized image for the event"}),desktop:qd.meta({description:"Desktop-optimized image for the event"})})}).meta({description:"Event details for this ticket"}),xf=wo({id:kr().meta({examples:[nd.User.id],description:"Unique identifier of the user who performed the ticket scan"}),firstName:kr().meta({examples:[nd.User.firstName],description:"First name of the user who performed the scan"}),lastName:kr().meta({examples:[nd.User.lastName],description:"Last name of the user who performed the scan"}),email:Cr().meta({examples:[nd.User.email],description:"Email address of the user who performed the scan"})}).meta({description:"Information about the user who scanned a ticket"}),Sf=Oo(["CHECK_IN","CHECK_OUT"]),Df=wo({id:kr().meta({examples:[nd.TicketScan.id],description:"Unique identifier of the ticket scan record"}),scannedAt:rd().readonly().meta({examples:[nd.TicketScan.scannedAt],description:"Timestamp when the ticket was scanned in ISO 8601 format"}),scannedById:kr().meta({examples:[nd.TicketScan.scannedById],description:"Unique identifier of the user who performed the scan"}),scannedBy:xf.meta({description:"Detailed information about the user who performed the scan"}),deviceId:kr().meta({examples:[nd.TicketScan.deviceId],description:"Unique identifier of the device used for scanning"}),kind:Sf.meta({examples:["CHECK_IN"],description:"Type of scan operation: CHECK_IN for entry, CHECK_OUT for exit"})}).meta({description:"Record of a ticket scan operation including when, who, and what type of scan"}),Of=wo({id:kr().meta({examples:[nd.Section.id],description:"Section ID reference"}),name:kr().meta({examples:["Floor Section A","Balcony Left","VIP Lounge"],description:"Section name at time of purchase"}),location:wo({name:kr().meta({description:"Venue or location name"}),address:kr().optional().meta({description:"Street address"}),city:kr().optional().meta({description:"City name"}),state:kr().optional().meta({description:"State or province"}),postcode:kr().optional().meta({description:"Postal/ZIP code"}),country:kr().optional().meta({description:"ISO country code"}),latitude:Qr().optional().meta({description:"Geographic latitude coordinate"}),longitude:Qr().optional().meta({description:"Geographic longitude coordinate"}),timeZone:kr().optional().meta({examples:["America/New_York","Europe/London"],description:"IANA timezone identifier"})}).meta({description:"Physical location details"})}).meta({description:"Section details for this ticket"}),Cf=Oo(["ACTIVE","REDEEMED","CANCELLED"]),Pf=wo({id:kr().readonly().meta({examples:[nd.Ticket.id],description:"Unique identifier for the ticket"}),qrValue:Nr().optional().meta({description:"Signed QR payload. Private to authorized ticket readers."}),createdAt:rd().readonly().meta({examples:[nd.Ticket.createdAt],description:"Timestamp when the ticket was created in ISO 8601 format"}),updatedAt:rd().readonly().meta({examples:[nd.Ticket.updatedAt],description:"Timestamp when the ticket was last updated in ISO 8601 format"}),scans:vo(Df).meta({description:"Array of all scan records for this ticket (check-ins and check-outs)"}),status:Cf.meta({examples:["ACTIVE"],description:"Current status of the ticket: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),attendee:Tf.meta({description:"Attendee information for this ticket - editable by tenant admins"}),customerId:Sd.meta({examples:[nd.Ticket.customerId],description:"Unique identifier of the customer who purchased this ticket (read-only)"}),eventId:wd.meta({examples:[nd.Ticket.eventId],description:"Unique identifier of the event this ticket grants access to"}),event:Af.meta({description:"Event details for this ticket"}),admissionId:Dd.meta({examples:[nd.Ticket.admissionId],description:"Unique identifier of the admission type/tier this ticket represents"}),admission:kf.meta({description:"Admission details for this ticket"}),section:Of.optional().meta({description:"Section details for this ticket (if assigned to a section)"}),orderId:Td.meta({examples:[nd.Ticket.orderId],description:"Unique identifier of the order this ticket was purchased in"}),orderItemId:kr().meta({examples:[nd.Ticket.orderItemId],description:"Unique identifier of the specific order item this ticket represents"}).optional(),teamId:gd.meta({examples:[nd.Ticket.teamId],description:"Identifier of the team that owns this ticket"}),promoterId:xd.meta({examples:[nd.Ticket.promoterId],description:"Unique identifier of the promoter/organizer who created this event"})}).meta({description:"A ticket represents a customer's admission to an event. It tracks the purchase, scanning history, and current status."}),_f=wo({id:kr().meta({examples:[nd.Order.id],description:"Unique identifier of the order to retrieve"}),signature:cc.optional().meta({description:"HMAC signature for public order access (16 characters, base64url encoded)"})}),Rf=_f.required().extend({cursor:kr().max(4096).optional().meta({description:"Opaque cursor from the previous page of tickets."})}).strict().meta({description:"Signed request for an order's confirmation and its QR tickets."}),Nf=wo({expectedTicketCount:Qr().int().nonnegative().meta({description:"Total tickets this order will have once issuing completes, across all pages."}),order:Ef.pick({id:!0,status:!0,event:!0,createdAt:!0,items:!0,price:!0,returnDestinationKey:!0,returnUrl:!0}).extend({refunds:vo(vf.pick({id:!0,status:!0,price:!0,createdAt:!0}))}),tickets:vo(Pf.pick({id:!0,status:!0,admission:!0}).extend({qrValue:Nr().meta({description:"Signed QR payload. Private to the ticket holder."})})),nextCursor:kr().optional().meta({description:"Cursor for the next page of tickets. Omitted on the last."})}).meta({description:"An order's confirmation with its issued QR tickets and refund history."}),Mf=Ef.pick({id:!0,createdAt:!0,status:!0}).extend({price:Ef.shape.price.pick({total:!0,currency:!0,refunded:!0}),event:Ef.shape.event.pick({id:!0,name:!0,slug:!0})}).meta({description:"One purchase in the current buyer's history for the website's account Team."}),Uf=$o({cursor:kr().max(16384).optional().meta({description:"Opaque cursor from the previous page."}),limit:Qr().int().min(1).max(25).default(20).meta({description:"Maximum purchases to return."})}).meta({description:"Page request for the current buyer's purchases."}),Lf=wo({teamId:gd,orders:vo(Mf),nextCursor:kr().optional().meta({description:"Cursor for the next page. Omitted on the last page."})}).meta({description:"A page of the current buyer's purchases for the website's account Team."}),jf=$o({id:Td,cursor:kr().max(16384).optional().meta({description:"Opaque cursor from the purchase list."})}).meta({description:"Reference to one of the current buyer's purchases."}),qf=Nf.extend({teamId:gd,order:Mf.extend({event:Ef.shape.event,items:Ef.shape.items,refunds:Nf.shape.order.shape.refunds})}).meta({description:"Full detail for one purchase the current buyer owns."}),Gf=jf.omit({cursor:!0}).extend({ticketId:Ad,provider:Oo(["apple","google"]).meta({description:"Wallet provider the pass is requested for."})}).meta({description:"Request for a wallet pass on a purchase the buyer owns."}),Bf=To("provider",[wo({teamId:gd,provider:Po("apple"),data:kr().max(4e6).meta({description:"Base64-encoded Apple Wallet pass. Do not cache or log."})}),wo({teamId:gd,provider:Po("google"),url:Nr().meta({description:"Validated Google Wallet save URL."})})]).meta({description:"An approved wallet pass, returned only to the buyer who owns the ticket."}),Ff=wo({id:kr().meta({examples:[nd.Order.id],description:"Unique identifier of the order to add a note to"}),note:kr().min(1).max(1e3).meta({examples:["Customer requested special seating arrangements"],description:"Note text content (1-1000 characters)"})}),Vf=wo({id:Td,cancelOrder:io().optional().meta({description:"Close the order and cancel all its tickets. Omit or use false to cancel tickets while allowing replacement issuance."}),ticketIds:vo(Ad).min(1).max(500).optional().meta({description:"Tickets to cancel. Omit to cancel every ticket on the order."}),idempotencyKey:kr().min(1).max(128).meta({description:"Stable key for this cancellation. Reuse when retrying."}),reason:Oh.meta({description:"Reason shown to the buyer and included in their email when notification is enabled, 1–500 characters after trimming."}),notify:io().default(!0).meta({description:"Email the order buyer after cancellation."})}),zf=Zh.omit({id:!0,price:!0,kind:!0}).extend({id:kr().optional().meta({examples:["itm_01jps5cgsfwyxj0516571eaf17"],description:"Unique identifier for this order item. When omitted, the server assigns an id during processing"})}),Wf=wo({eventId:kr().meta({description:"Unique identifier of the event for which to create a complimentary order"}),items:vo(zf).min(1).meta({description:"Admission items to include in the complimentary order"}),customer:wo({firstName:kr().min(1),lastName:kr().min(1),email:Cr()}),notifyCustomer:io().default(!0).meta({description:"Whether to send the standard order confirmation email after tickets are generated"}),reason:kr().min(1),idempotencyKey:kr().trim().min(1).max(255).optional()});wo({reason:Oo(["MEMBER_SIGN_IN_REQUIRED","MEMBERSHIP_REQUIRED","MEMBER_BENEFIT_USED"])}).meta({description:"Why a coupon code could not be applied, when the checkout can act on it"});const Yf=wo({postHogDistinctId:kr().min(1).max(256).optional()}),Zf=wo({eventId:kr().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to create the order"}),items:vo(zf).meta({description:"List of items to include in the new order"}),couponCode:kr().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the order"}),returnUrl:kr().optional().meta({examples:["/orders"],description:"Optional tenant-relative, same-tenant-origin, or explicitly approved native return URL. External web returns require returnDestinationKey."}),returnDestinationKey:kr().min(1).max(80).optional().meta({description:"Registered checkout confirmation destination, fixed when the order is created."}),channel:Nh.optional().meta({description:"Optional channel metadata for where the order originated (for attribution and redirect routing)."}),analytics:Yf.optional().meta({description:"Optional browser analytics metadata used for cross-domain checkout attribution."}),idempotencyKey:kr().trim().min(1).max(255).optional().meta({description:"Optional key that makes repeated order creation requests return the same order."})}),Hf=wo({id:kr().meta({examples:[nd.Order.id],description:"Unique identifier of the order"}),noteId:kr().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),Kf=Oo(["EMAIL","SMS"]).meta({examples:["EMAIL"],description:"Method used to deliver tickets to the customer: EMAIL or SMS"});wo({id:kr().meta({examples:[nd.Order.id],description:"Unique identifier of the order to edit"}),signature:cc.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for editing order items."}),items:vo(zf).min(1).meta({description:"Updated list of items for the order (replaces existing items). Prices will be recalculated and payment intent updated."})});const Jf=Oo(["STATUS","CANCELLATION_STATUS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","COUPON_CODE","PAYMENT_SOURCE","PAYMENT_METHOD","CURRENCY","CREATED_AT","UPDATED_AT","RESERVED_AT","TOTAL","TICKETS","ORDER_ID","CUSTOMER_ID","EVENT_ID","PROMOTER_ID","PAYOUT_ID"]),Qf=Oo(["IS","IS_NOT","IS_ANY_OF","CONTAINS","IS_EMPTY","IS_NOT_EMPTY","BETWEEN","GTE","LTE"]),Xf=new Set(["IS_EMPTY","IS_NOT_EMPTY"]),ey=new Set(["IS_ANY_OF"]),ty=new Set(["IS","IS_NOT","CONTAINS","GTE","LTE"]),iy=new Set(["BETWEEN"]),ny={CANCELLATION_STATUS:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),STATUS:new Set(["IS","IS_NOT","IS_ANY_OF"]),DELIVERY_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF"]),CUSTOMER_EMAIL:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),CUSTOMER_PHONE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),COUPON_CODE:new Set(["IS","IS_NOT","CONTAINS","IS_EMPTY","IS_NOT_EMPTY"]),PAYMENT_SOURCE:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),PAYMENT_METHOD:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"]),CURRENCY:new Set(["IS","IS_NOT","IS_ANY_OF"]),CREATED_AT:new Set(["BETWEEN","GTE","LTE"]),UPDATED_AT:new Set(["BETWEEN","GTE","LTE"]),RESERVED_AT:new Set(["BETWEEN","GTE","LTE","IS_EMPTY","IS_NOT_EMPTY"]),TOTAL:new Set(["BETWEEN","GTE","LTE"]),TICKETS:new Set(["BETWEEN","GTE","LTE"]),ORDER_ID:new Set(["IS","IS_NOT","CONTAINS"]),CUSTOMER_ID:new Set(["IS","IS_NOT","IS_EMPTY","IS_NOT_EMPTY"]),EVENT_ID:new Set(["IS","IS_NOT"]),PROMOTER_ID:new Set(["IS","IS_NOT"]),PAYOUT_ID:new Set(["IS","IS_NOT","IS_ANY_OF","IS_EMPTY"])},ry={STATUS:If,CANCELLATION_STATUS:Dh,DELIVERY_METHOD:Kf,PAYMENT_SOURCE:nf,PAYMENT_METHOD:ef},oy=new Set(["CREATED_AT","UPDATED_AT","RESERVED_AT"]),ay=new Set(["TOTAL","TICKETS"]),sy=wo({field:Jf,operator:Qf,values:vo(kr()).max(20)}).superRefine(((e,t)=>{ny[e.field].has(e.operator)||t.addIssue({code:"custom",path:["operator"],message:`${e.operator} is not supported for ${e.field}`}),function(e,t){let i=e.values.length;Xf.has(e.operator)&&0!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" does not accept values"}),ty.has(e.operator)&&1!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly one value"}),ey.has(e.operator)&&i<1&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires at least one value"}),iy.has(e.operator)&&2!==i&&t.addIssue({code:"custom",path:["values"],message:e.operator+" requires exactly two values"})}(e,t),function(e,t){let i=ry[e.field];i&&e.values.forEach(((n,r)=>{i.safeParse(n).success||t.addIssue({code:"custom",path:["values",r],message:`${n} is not valid for ${e.field}`})}))}(e,t),function(e,t){oy.has(e.field)&&e.values.forEach(((e,i)=>{Number.isNaN(Date.parse(e))&&t.addIssue({code:"custom",path:["values",i],message:e+" is not a valid date"})}))}(e,t),function(e,t){ay.has(e.field)&&e.values.forEach(((e,i)=>{/^-?\d+$/.test(e)||t.addIssue({code:"custom",path:["values",i],message:e+" is not a valid integer"})}))}(e,t)})),dy="Either locationId or googlePlaceId must be provided",cy={locationId:Id.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location. Either locationId or googlePlaceId must be provided."}),googlePlaceId:kr().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to create a new location from. Either locationId or googlePlaceId must be provided."})};function ly(e){return!(!e.locationId&&!e.googlePlaceId)}const uy=Op.omit({id:!0,createdAt:!0,updatedAt:!0,order:!0,available:!0,sold:!0,reserved:!0,visibility:!0,promoterId:!0,eventSlug:!0,location:!0}).extend({order:Qr().optional().meta({examples:[nd.Section.order],description:"Display order of the section. Lower numbers appear first in listings. Defaults to 0 if not specified"}),visibility:Op.shape.visibility.optional(),...cy}).refine(ly,{message:dy}).meta({description:"Schema for creating a new section within an event venue. Excludes system-generated fields and fields derived from the event"}),py=Op.pick({id:!0}).extend({eventId:kr().meta({examples:[nd.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for soft-deleting a section by setting its deletedAt timestamp"}),my=Op.pick({id:!0}).extend({eventId:kr().meta({examples:[nd.Section.eventId],description:"Unique identifier of the event to verify section belongs to"})}).meta({description:"Schema for retrieving a specific section by ID"}),hy=$o({eventId:Op.shape.eventId,query:kr().max(120).optional().meta({examples:["VIP"],description:"Optional search query. When provided, automatically uses search-backed pagination for full-text search capabilities"}),limit:od().min(1).max(100).prefault(20).meta({examples:[20],description:"Maximum number of sections to return in each result set. Must be between 1 and 100, defaults to 20"}),cursor:kr().max(768).optional().meta({examples:["eyJpbnRlbnQiOnsicmVzb3VyY2UiOiJzZWN0aW9uLmxpc3QifSwicG9zaXRpb24iOnsiZW5naW5lIjoiZHluYW1vIiwgImN1cnNvciI6InNlY18wMWpwczVjZ3NlMGczcWo1NnZkODZ6N3FqIiwgImhpc3RvcnkiOltdfX0="],description:"Opaque pagination cursor from a previous response. Provide to continue fetching subsequent results"})}).meta({description:"Schema for listing sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided"}),fy=wc(Op,"sections"),yy=wo({section:Op}),gy=Op.omit({promoterId:!0,createdAt:!0,updatedAt:!0,eventSlug:!0,available:!0,sold:!0,reserved:!0,location:!0,teamId:!0,name:!0,capacity:!0,limit:!0,order:!0}).extend({id:kr().meta({examples:[nd.Section.id],description:"Unique identifier of the section to update"}),eventId:kr().meta({examples:[nd.Section.eventId],description:"Unique identifier of the event to verify section belongs to"}),name:Op.shape.name.optional(),capacity:Gd().optional(),limit:Bd().optional(),order:Op.shape.order.optional(),visibility:Oo(["ALWAYS","STACKED","HIDDEN"]).optional(),locationId:Id.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:kr().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."})}).meta({description:"Schema for updating an existing section."}),vy=Hh.safeExtend({admission:fc.optional().meta({description:"Complete admission details for this order item when available"}),section:Op.optional().meta({description:"Complete section details for this order item when applicable"})}),by=Oo(["UPDATED_AT","CREATED_AT","EVENT_NAME","TOTAL","STATUS","CUSTOMER_NAME","PAYMENT_SOURCE","COUPON_CODE","TICKETS","DELIVERY_METHOD","CUSTOMER_EMAIL","CUSTOMER_PHONE","ORDER_ID"]),wy=Oo(["asc","desc"]),$y=wo({mine:io().optional().meta({examples:[!0],description:"When true, returns only the authenticated user's orders. Can be combined with teamId or eventId to further filter results."}),teamId:kr().optional().meta({description:"Filter orders by team unique identifier"}),eventId:kr().optional().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Filter orders by event unique identifier"}),status:If.optional().meta({examples:["SUCCESSFUL"],description:"Filter orders by payment status"}),query:kr().optional().meta({examples:["John Doe"],description:"Optional search query to filter orders by customer details. When provided, search-backed pagination is used."}),includeEventTerms:io().optional().meta({examples:[!0],description:"When true for authenticated user-owned order searches, also matches event name, slug, and location unless eventId is already provided."}),filters:vo(sy).max(10).optional().meta({description:"Optional advanced filters for order lists."}),sort:by.optional().meta({examples:["UPDATED_AT","CREATED_AT","CUSTOMER_NAME"],description:"Field to sort order lists by."}),direction:wy.optional().meta({examples:["asc","desc"],description:"Sort direction for order lists. Defaults to `desc` when omitted."}),from:kr().date().optional().meta({examples:["2025-01-01"],description:"Filter orders created on or after this date (YYYY-MM-DD format). Inclusive of the entire day."}),to:kr().date().optional().meta({examples:["2025-12-31"],description:"Filter orders created on or before this date (YYYY-MM-DD format). Inclusive of the entire day."}),limit:Yd("orders"),cursor:kr().optional().meta({examples:["eyJpZCI6Im9yZF8wMWpwczVjZ3NmZ3ZlNWI1ZzI2NjZreXJ5aCJ9"],description:"Pagination cursor for continuing to fetch subsequent results"})}),Iy=wc(Ef,"orders"),Ey=wo({items:vo(vy).meta({description:"List of order items with complete pricing and admission details"}),price:af.meta({description:"Total pricing breakdown for the entire order quote"}),couponCode:lp.optional().meta({description:"Applied coupon code details if a discount was used in this quote"}),stripeConnectAvailability:_p.optional().meta({description:"Stripe Connect availability metadata for tenant checkout UI."})}),ky=wo({eventId:kr().meta({examples:["evt_01jps5cgsenjrazw6wswmyspa3"],description:"Unique identifier of the event for which to generate a price quote"}),items:vo(zf).meta({description:"List of items to include in the price quote calculation"}),couponCode:kr().optional().meta({examples:["TEST50"],description:"Optional coupon code to apply discount to the quote"})}),Ty=wo({quote:Ey}),Ay=wo({orderItemId:kr().meta({examples:[nd.OrderRefundItem.orderItemId],description:"Identifier of the order item to refund"}),quantity:eo().min(1).meta({examples:[nd.OrderRefundItem.quantity],description:"Number of units to refund for this item"})}),xy=wo({id:Td.meta({examples:[nd.Order.id],description:"Identifier of the order to refund"}),fullRefund:io().default(!1).meta({examples:[!1],description:"When true, refunds all remaining refundable items. Mutually exclusive with items."}),items:vo(Ay).optional().meta({description:"Specific items and quantities to refund. Required if fullRefund is false."}),shippingAmount:eo().min(0).optional().meta({examples:[500],description:"Amount of shipping to refund in cents. Cannot exceed remaining refundable shipping."}),cancelTickets:io().default(!0).meta({examples:[!0],description:"Whether to cancel tickets associated with refunded items. Defaults to true."}),notify:io().default(!0).meta({examples:[!0],description:"Whether to send a refund confirmation email to the customer. Defaults to true."}),reason:df.meta({examples:["CUSTOMER_REQUEST","DUPLICATE","EVENT_CANCELLED"],description:"Categorized reason for the refund"}),note:kr().optional().meta({examples:["Customer requested refund due to schedule conflict"],description:"Free-form notes explaining the refund"}),idempotencyKey:kr().optional().meta({examples:["refund_12345_customer_request"],description:"Client-provided key to prevent duplicate refund processing. Recommended for programmatic refunds."}),metadata:So(kr(),kr()).optional().meta({examples:[{supportTicket:"#12345"}],description:"Custom key-value pairs passed through to the payment gateway"})}),Sy=wo({refund:vf}),Dy=wo({id:kr().meta({examples:[nd.Order.id],description:"Order ID to resend tickets for"}),email:kr().email().optional().meta({examples:["customer@example.com"],description:"Email address to send tickets to. If not provided, uses order.customer.email"})}),Oy=wo({id:kr().meta({examples:[nd.Order.id],description:"Unique identifier of the order to reserve inventory for"}),signature:cc.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded)."})}),Cy=wo({code:Po("ORDER_NOT_RESERVABLE")}),Py=wo({order:Ef}),_y=wo({order:Ef.extend({userId:Ed.meta({description:"The verified buyer who owns this purchase"})})}).meta({description:"An order created for the authenticated buyer"});var Ry={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[0-79]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},Ny={}.constructor;function My(e){return null!=e&&e.constructor===Ny}function Uy(e){return Uy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uy(e)}function Ly(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function jy(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=Uy(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=Uy(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==Uy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function qy(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Gy(e){var t,i,n,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o,a,s=[],d=!0,c=!1;try{if(o=(i=i.call(e)).next,0===t);else for(;!(d=(n=o.call(i)).done)&&(s.push(n.value),s.length!==t);d=!0);}catch(e){c=!0,r=e}finally{try{if(!d&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qy(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qy(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(e),4),o=r[0],a=r[1],s=r[2],d=r[3];if("string"!=typeof o)throw TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!My(a))throw Error("Invalid second argument: "+a);s?(i=a,n=s):n=a}else d?(i=s,n=d):(i=void 0,n=s),a&&(i=function(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?Ly(Object(i),!0).forEach((function(t){jy(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ly(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({defaultCountry:a},i));return{text:t,options:i,metadata:n}}var By="0-90-9٠-٩۰-۹",Fy="-‐-―−ー-//..  ­​⁠ ()()[]\\[\\]~⁓∼~";function Vy(e){return Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vy(e)}function zy(e){var t="function"==typeof Map?new Map:void 0;return zy=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch{return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return function(e,t,i){if(Wy())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var r=new(e.bind.apply(e,n));return i&&Yy(r,i.prototype),r}(e,arguments,Zy(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Yy(i,e)},zy(e)}function Wy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Wy=function(){return!!e})()}function Yy(e,t){return Yy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yy(e,t)}function Zy(e){return Zy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zy(e)}var Hy=function(){function e(t){var i;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),i=function(e,t,i){return t=Zy(t),function(e,t){if(t&&("object"==Vy(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wy()?Reflect.construct(t,i||[],Zy(e).constructor):t.apply(e,i))}(this,e,[t]),Object.setPrototypeOf(i,e.prototype),i.name=i.constructor.name,i}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yy(e,t)}(e,zy(Error)),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(e)}();function Ky(e,t){e=e.split("-"),t=t.split("-");for(var i=e[0].split("."),n=t[0].split("."),r=0;r<3;r++){var o=Number(i[r]),a=Number(n[r]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var Jy=/^\d+$/;function Qy(e){return Qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qy(e)}function Xy(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eg(e,t){return t&&function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tg(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tg(e){var t=function(e){if("object"!=Qy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Qy(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==Qy(t)?t:t+""}var ig=" ext. ",ng=eg((function e(t){Xy(this,e),cg(t),this.metadata=t,pg.call(this,t)}),[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){var i,n;if(e&&(function(e){return Jy.test(e)}(e)?n=e:i=e),t&&(n=t),i&&"001"!==i){var r=this.getCountryMetadata(i);if(!r)throw Error("Unknown country: "+i);this.numberingPlan=new rg(r,this)}else if(n){if(!this.hasCallingCode(n))throw Error("Unknown calling code: "+n);this.numberingPlan=new rg(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t)return 1===t.length&&3===t[0].length?void 0:t}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var i=this.nonGeographic()[e];if(i)return i}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),rg=eg((function e(t,i){Xy(this,e),this.globalMetadataObject=i,this.metadata=t,pg.call(this,i.metadata)}),[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"_getDefaultCountryMetadataForThisCallingCode",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this._getDefaultCountryMetadataForThisCallingCode()}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[]).map((function(t){return new og(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(e){if(this.hasTypes()&&dg(this.types(),e))return new sg(dg(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?ig:this.metadata[13]||ig}}]),og=eg((function e(t,i){Xy(this,e),this._format=t,this.metadata=i}),[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||ag.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),ag=/^\(?\$1\)?$/,sg=eg((function e(t,i){Xy(this,e),this.type=t,this.metadata=i}),[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]);function dg(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function cg(e){if(!e)throw Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!My(e)||!My(e.countries))throw Error(`[libphonenumber-js] \`metadata\` argument was passed but it's not a valid metadata. Must be an object having \`.countries\` child object property. Got ${My(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+lg(e)+": "+e}.`)}var lg=function(e){return Qy(e)};function ug(e,t){var i=new ng(t);if(i.hasCountry(e))return i.selectNumberingPlan(e).countryCallingCode();throw Error("Unknown country: "+e)}function pg(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===Ky(t,"1.2.0")?this.v2=!0:-1===Ky(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var mg=function(e){return`([${By}]{1,${e}})`};function hg(){var e="[  \\t,]*",t="[:\\..]?[  \\t,-]*",i="#?",n="[  \\t]*";return";ext="+mg("20")+"|"+e+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+t+mg("20")+"#?|"+e+"(?:[xx##~~]|int|int)"+t+mg("9")+"#?|[- ]+"+mg("6")+"#|"+n+"(?:,{2}|;)"+t+mg("15")+"#?|"+n+"(?:,)+"+t+mg("9")+i}var fg="["+By+"]{2}",yg="[++]{0,1}(?:["+Fy+"]*["+By+"]){3,}["+Fy+By+"]*",gg=RegExp("^[++]{0,1}(?:["+Fy+"]*["+By+"]){1,2}$","i"),vg=yg+"(?:"+hg()+")?",bg=RegExp("^"+fg+"$|^"+vg+"$","i"),wg=RegExp("(?:"+hg()+")$","i"),$g={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Ig(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Eg(e){for(var t,i="",n=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Ig(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ig(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(""));!(t=n()).done;)i+=kg(t.value,i)||"";return i}function kg(e,t){if("+"===e){if(t)return;return"+"}return function(e){return $g[e]}(e)}function Tg(e,t,i){return function(e,t,i,n){i&&(n=new ng(n.metadata)).selectNumberingPlan(i);var r=n.type(void 0),o=r&&r.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,s=o[0];return s===a?"IS_POSSIBLE":s>a?"TOO_SHORT":o[o.length-1]<a?"TOO_LONG":o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,0,t,i)}function Ag(e,t){return"IS_POSSIBLE"===Tg(e,void 0,t)}function xg(e,t){return e||="",RegExp("^(?:"+t+")$").test(e)}function Sg(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var Dg=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Og(e,t,i){if(t||={},e.country||e.countryCallingCode){var n=new ng(i);n.selectNumberingPlan(e.country||e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(xg(r,n.nationalNumberPattern())){if(Cg(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()||!n.type("MOBILE")||Cg(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var o,a=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Sg(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Sg(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(Dg);!(o=a()).done;){var s=o.value;if(Cg(r,s,n))return s}}}}function Cg(e,t,i){var n=i.type(t);return!(!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0)&&xg(e,n.pattern())}var Pg=/^[A-Z]{2}$/;var _g=RegExp("(["+By+"])");function Rg(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Ng(e,t){var i=t.nationalNumber,n=t.metadata,r=n.getCountryCodesForCallingCode(e);if(r)return 1===r.length?r[0]:function(e,t,i){for(var n,r=new ng(i),o=function(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return Rg(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Rg(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=o()).done;){var a=n.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(Og({phone:e,country:a},void 0,r.metadata))return a}}(i,r,n.metadata)}function Mg(e,t,i){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var i=RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=i.exec(e);if(n){var r,o,a,s=n.length-1,d=s>0&&n[s];if(t.nationalPrefixTransformRule()&&d?(r=e.replace(i,t.nationalPrefixTransformRule()),s>1&&(o=n[1])):(r=e.slice(n[0].length),d&&(o=n[1])),d){var c=e.indexOf(n[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=n[0];return{nationalNumber:r,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,i),r=n.carrierCode,o=n.nationalNumber;return o===e||function(e,t,i){return!(xg(e,i.nationalNumberPattern())&&!xg(t,i.nationalNumberPattern()))}(e,o,i)&&(!i.numberingPlan.possibleLengths()||(t||=Ng(i.numberingPlan.callingCode(),{nationalNumber:o,metadata:i}),function(e,t,i){switch(Tg(e,t,i)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,i)))?{nationalNumber:o,carrierCode:r}:{nationalNumber:e}}function Ug(e,t,i,n,r){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,i,n){if(t){var r=new ng(n);r.selectNumberingPlan(t||i);var o=RegExp(r.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(_g);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,i,n,r);if(!a||a===e){if(i||n){var s=function(e,t,i,n,r){if(!i&&!n)return{number:e};var o=i?ug(i,r):n;if(0===e.indexOf(o)){var a=new ng(r);a.selectNumberingPlan(i||n);var s=e.slice(o.length),d=Mg(s,void 0,a).nationalNumber,c=Mg(e,void 0,a).nationalNumber;if(!xg(c,a.nationalNumberPattern())&&xg(d,a.nationalNumberPattern())||"TOO_LONG"===Tg(c,void 0,a))return{countryCallingCode:o,number:s}}return{number:e}}(e,0,i,n,r),d=s.countryCallingCode;if(d)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:d,number:s.number}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};for(var c=new ng(r),l=2;l-1<=3&&l<=e.length;){var u=e.slice(1,l);if(c.hasCallingCode(u))return c.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(l)};l++}return{}}var Lg=/(\$\d)/;var jg=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/,qg={formatExtension:function(e,t,i){return`${e}${i.ext()}${t}`}};function Gg(e,t,i,n,r){var o=function(e,t){return function(e,t){for(var i=0;i<e.length;){if(t(e[i]))return e[i];i++}}(e,(function(e){if(e.leadingDigitsPatterns().length>0){var i=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==t.search(i))return!1}return xg(t,e.pattern())}))}(n.formats(),e);return o?function(e,t,i){var n=i.useInternationalFormat,r=i.withNationalPrefix,o=e.replace(RegExp(t.pattern()),n?t.internationalFormat():r&&t.nationalPrefixFormattingRule()?t.format().replace(Lg,t.nationalPrefixFormattingRule()):t.format());return n?function(e){return e.replace(RegExp(`[${Fy}]+`,"g")," ").trim()}(o):o}(e,o,{useInternationalFormat:"INTERNATIONAL"===i,withNationalPrefix:!(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&r&&!1===r.nationalPrefix)}):e}function Bg(e,t,i,n){return t?n(e,t,i):e}function Fg(e){return Fg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fg(e)}function Vg(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function zg(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?Vg(Object(i),!0).forEach((function(t){Wg(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Vg(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Wg(e,t,i){return(t=Yg(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Yg(e){var t=function(e){if("object"!=Fg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Fg(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==Fg(t)?t:t+""}var Zg=function(e,t){return t&&function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yg(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,i,n){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),!t)throw TypeError("First argument is required");if("string"!=typeof t)throw TypeError("First argument must be a string");if("+"===t[0]&&!i)throw TypeError("`metadata` argument not passed");if(My(i)&&My(i.countries)){n=i;var r=t;if(!Hg.test(r))throw Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=Ug(r,0,void 0,void 0,n);if(t=o.countryCallingCode,!(i=o.number))throw Error("Invalid `number` argument passed: too short")}if(!i)throw TypeError("`nationalNumber` argument is required");if("string"!=typeof i)throw TypeError("`nationalNumber` argument must be a string");cg(n);var a=function(e,t){var i,n,r=new ng(t);return function(e){return Pg.test(e)}(e)?(r.selectNumberingPlan(i=e),n=r.countryCallingCode()):n=e,{country:i,callingCode:n}}(t,n),s=a.callingCode;this.country=a.country,this.countryCallingCode=s,this.nationalNumber=i,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}}),[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(e,t,i){var n=new ng(i).getCountryCodesForCallingCode(e);return n?n.filter((function(e){return function(e,t,i){var n=new ng(i);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}(t,e,i)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,i){void 0===t&&(t={});var n=new ng(i);if(t.v2){if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.country||e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw Error("Unknown country: "+e.country);n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Ag(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,i){t||={};var n=new ng(i);return n.selectNumberingPlan(e.country||e.countryCallingCode),n.hasTypes()?void 0!==Og(e,t,n.metadata):xg(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new ng(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Og(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return function(e,t,i,n){i=i?function(){for(var e=1,t=[...arguments];e<t.length;){if(t[e])for(var i in t[e])t[0][i]=t[e][i];e++}return t[0]}({},qg,i):qg;var r=new ng(n);if(e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw Error("Unknown country: "+e.country);r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var o=r.countryCallingCode(),a=i.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?Bg(Gg(a,0,"NATIONAL",r,i),e.ext,r,i.formatExtension):"";case"INTERNATIONAL":return a?Bg(`+${o} ${Gg(a,0,"INTERNATIONAL",r,i)}`,e.ext,r,i.formatExtension):"+"+o;case"E.164":return`+${o}${a}`;case"RFC3966":return function(e){var t=e.number,i=e.ext;if(!t)return"";if("+"!==t[0])throw Error('"formatRFC3966()" expects "number" to be in E.164 format.');return`tel:${t}${i?";ext="+i:""}`}({number:`+${o}${a}`,ext:e.ext});case"IDD":if(!i.fromCountry)return;var s=function(e,t,i,n,r){if(ug(n,r.metadata)===i){var o=Gg(e,0,"NATIONAL",r);return"1"===i?i+" "+o:o}var a=function(e,t,i){var n=new ng(i);return n.selectNumberingPlan(e||void 0),n.defaultIDDPrefix()?n.defaultIDDPrefix():jg.test(n.IDDPrefix())?n.IDDPrefix():void 0}(n,0,r.metadata);if(a)return`${a} ${i} ${Gg(e,0,"INTERNATIONAL",r)}`}(a,0,o,i.fromCountry,r);return s?Bg(s,e.ext,r,i.formatExtension):void 0;default:throw Error(`Unknown "format" argument passed to "formatNumber()": "${t}"`)}}(this,e,t?zg(zg({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}]),Hg=/^\+\d+$/,Kg="(["+By+"]|[\\-\\.\\(\\)]?)",Jg=RegExp("^\\+"+Kg+"*["+By+"]"+Kg+"*$","g"),Qg=RegExp("^(["+By+"]+((\\-)*["+By+"])*\\.)*[a-zA-Z]+((\\-)*["+By+"])*\\.?$","g"),Xg=";phone-context=";var ev=RegExp("[++"+By+"]"),tv=RegExp("[^"+By+"#]+$");function iv(e,t,i){t||={};var n=new ng(i);if(t.defaultCountry&&!n.hasCountry(t.defaultCountry))throw t.v2?new Hy("INVALID_COUNTRY"):Error("Unknown country: "+t.defaultCountry);var r=function(e,t,i){var n=function(e,t){var i,n=t.extractFormattedPhoneNumber,r=function(e){var t=e.indexOf(Xg);if(t<0)return null;var i=t+15;if(i>=e.length)return"";var n=e.indexOf(";",i);return n>=0?e.substring(i,n):e.substring(i)}(e);if(!function(e){return null===e||0!==e.length&&(Jg.test(e)||Qg.test(e))}(r))throw new Hy("NOT_A_NUMBER");if(null===r)i=n(e)||"";else{i="","+"===r.charAt(0)&&(i+=r);var o=e.indexOf("tel:"),a=o>=0?o+4:0,s=e.indexOf(Xg);i+=e.substring(a,s)}var d=i.indexOf(";isub=");if(d>0&&(i=i.substring(0,d)),""!==i)return i}(e,{extractFormattedPhoneNumber:function(e){return function(e,t,i){if(e){if(e.length>250){if(i)throw new Hy("TOO_LONG");return}if(!1===t)return e;var n=e.search(ev);if(!(n<0))return e.slice(n).replace(tv,"")}}(e,i,t)}});if(!n)return{};if(!function(e){return e.length>=2&&bg.test(e)}(n))return function(e){return gg.test(e)}(n)?{error:"TOO_SHORT"}:{};var r=function(e){var t=e.search(wg);if(t<0)return{};for(var i=e.slice(0,t),n=e.match(wg),r=1;r<n.length;){if(n[r])return{number:i,ext:n[r]};r++}}(n);return r.ext?r:{number:n}}(e,t.v2,t.extract),o=r.number,a=r.ext;if(!o){if(t.v2)throw new Hy("TOO_SHORT"===r.error?"TOO_SHORT":"NOT_A_NUMBER");return{}}var s=function(e,t,i,n){var r,o=Ug(Eg(e),0,t,i,n.metadata),a=o.countryCallingCodeSource,s=o.countryCallingCode,d=o.number;if(s)n.selectNumberingPlan(s);else{if(!d||!t&&!i)return{};t?(r=t,n.selectNumberingPlan(t),s=n.numberingPlan.callingCode()):(n.selectNumberingPlan(i),s=i)}if(!d)return{countryCallingCodeSource:a,countryCallingCode:s};var c=Mg(Eg(d),void 0,n),l=c.nationalNumber,u=c.carrierCode,p=Ng(s,{nationalNumber:l,metadata:n});return p&&(r=p,"001"===p||n.selectNumberingPlan(r)),{country:r,countryCallingCode:s,countryCallingCodeSource:a,nationalNumber:l,carrierCode:u}}(o,t.defaultCountry,t.defaultCallingCode,n),d=s.country,c=s.nationalNumber,l=s.countryCallingCode,u=s.countryCallingCodeSource,p=s.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new Hy("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new Hy("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new Hy("TOO_LONG");return{}}if(t.v2){var m=new Zg(l,c,n.metadata);return d&&(m.country=d),p&&(m.carrierCode=p),a&&(m.ext=a),m.__countryCallingCodeSource=u,m}var h=!!(t.extended?n.hasSelectedNumberingPlan():d)&&xg(c,n.nationalNumberPattern());return t.extended?{country:d,countryCallingCode:l,carrierCode:p,valid:h,possible:!!h||!(!0!==t.extended||!n.possibleLengths()||!Ag(c,n)),phone:c,ext:a}:h?function(e,t,i){var n={country:e,phone:t};return i&&(n.ext=i),n}(d,c,a):{}}function nv(e){return nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nv(e)}function rv(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ov(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?rv(Object(i),!0).forEach((function(t){av(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):rv(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function av(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=nv(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=nv(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==nv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function sv(e){return sv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sv(e)}function dv(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function cv(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?dv(Object(i),!0).forEach((function(t){lv(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):dv(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function lv(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=sv(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=sv(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==sv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function uv(e){return uv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uv(e)}function pv(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function mv(e){for(var t=1;t<arguments.length;t++){var i=null==arguments[t]?{}:arguments[t];t%2?pv(Object(i),!0).forEach((function(t){hv(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):pv(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function hv(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=uv(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=uv(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e,"string");return"symbol"==uv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function fv(){var e=Gy(arguments),t=e.options,i=e.metadata,n=function(e,t,i){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,i)&&(t=cv(cv({},t),{},{defaultCountry:void 0}));try{return function(e,t,i){return iv(e,ov(ov({},t),{},{v2:!0}),i)}(e,t,i)}catch(e){if(!(e instanceof Hy))throw e}}(e.text,t=mv(mv({},t),{},{extract:!1}),i);return n&&n.isValid()||!1}const yv=Zf.omit({eventId:!0,channel:!0,analytics:!0}).partial().extend({id:kr().meta({examples:[nd.Order.id],description:"Unique identifier of the order to update"}),signature:cc.meta({description:"HMAC signature for customer access during checkout (16 characters, base64url encoded). Required for all order updates."}),items:vo(zf).min(1).optional().meta({description:"Updated list of items for the order. Requires signature. Prices will be recalculated and payment intent updated."}),customer:wo({firstName:kr().meta({examples:[nd.Customer.firstName],description:"Updated first name of the customer"}).optional(),lastName:kr().meta({examples:[nd.Customer.lastName],description:"Updated last name of the customer"}).optional(),email:Cr().meta({examples:[nd.Customer.email],description:"Updated email address of the customer"}).optional(),phone:kr().refine((e=>!e||function(){return function(e,t){var i=Array.prototype.slice.call(t);return i.push(Ry),e.apply(this,i)}(fv,arguments)}(e)),{message:"Phone must be in E.164 format (e.g., +61412345678)"}).meta({examples:[nd.Customer.phone],description:"Updated phone number in E.164 format (e.g., +61412345678)"}).optional(),deliveryMethod:Kf.optional()}).optional().meta({description:"Updated customer information for the order. All fields are optional for partial updates."}),marketingConsent:Kh.optional().meta({description:"Marketing opt-in choices captured during checkout."})}),gv=wo({id:kr().meta({examples:[nd.Order.id],description:"Unique identifier of the order"}),noteId:kr().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:kr().min(1).max(1e3).meta({examples:["Updated: Customer confirmed special seating arrangements"],description:"Updated note text content (1-1000 characters)"})});wo({success:io().meta({description:"Whether the payout approval was successful"}),message:kr().optional().meta({description:"Optional message about the approval result"}),payoutId:kr().meta({description:"ID of the payout that was approved"})});const vv=wo({payoutId:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown of orders and financial calculations."})}),bv=Oo(["DISPUTE_REVERSAL_CREDIT","REFUND_REVERSAL_CREDIT"]),wv=wo({source:Oo(["AIRWALLEX_SETTLEMENT_CREDIT"]),kind:bv,adjustmentId:kr(),adjustmentUniqueKey:kr(),sourceKey:kr(),sourcePayoutId:kr(),settlementId:kr(),transactionId:kr().optional(),paymentIntentId:kr().optional(),paymentAttemptId:kr().optional(),createdActionPublishedAt:rd().optional()}),$v=wo({id:kr().readonly().meta({examples:[nd.PayoutDeduction.id],description:"Unique identifier for this deduction record."}),createdAt:rd().readonly().meta({examples:[nd.PayoutDeduction.createdAt],description:"Timestamp in ISO 8601 format when this deduction was created."}),updatedAt:rd().readonly().meta({examples:[nd.PayoutDeduction.updatedAt],description:"Timestamp in ISO 8601 format when this deduction was last updated."}),amount:eo().max(0).meta({examples:[nd.PayoutDeduction.amount],description:"Deprecated legacy deduction amount in cents. Negative values reduce the payout."}),currency:ld.meta({examples:[nd.PayoutDeduction.currency],description:"Currency code in ISO 4217 format for the deduction amount."}),description:kr().meta({examples:[nd.PayoutDeduction.description],description:"Human-readable description explaining the reason for this legacy deduction."}),gateway:kr().meta({examples:[nd.PayoutDeduction.gateway],description:"Payment gateway identifier where this legacy deduction was processed."}),gatewayId:kr().meta({examples:[nd.PayoutDeduction.gatewayId],description:"Unique identifier assigned by the payment gateway for this legacy deduction transaction."}),beneficiary:kr().meta({examples:[nd.PayoutDeduction.beneficiary],description:"Human-readable name of the beneficiary account from which this legacy deduction was taken."}),beneficiaryId:kr().meta({examples:[nd.PayoutDeduction.beneficiaryId],description:"Unique identifier of the beneficiary account from which this legacy deduction was taken."}),transferId:kr().optional().meta({description:"Optional reference to a transfer record when this legacy deduction resulted in money being moved to a future payout."}),transferPayoutId:kr().optional().meta({description:"Optional reference to a future payout where the legacy deducted amount was applied."})}),Iv=wo({id:kr().meta({examples:[nd.Event.id],description:"Unique identifier for the event associated with this payout."}),name:kr().meta({examples:[nd.Event.name],description:"Human-readable name of the event."}),slug:kr().meta({examples:[nd.Event.slug],description:"URL-friendly slug identifier for the event."}),location:kr().optional().meta({examples:[nd.Event.location.name],description:"Optional human-readable location name where the event takes place."})}),Ev=wo({net:eo().meta({examples:[nd.Payout.price.net],description:"Total amount to pay to promoter.\nTicket and shipping revenue after organiser-funded refunds and disputes, excluding booking and SMS fees."}),total:eo().meta({examples:[nd.Payout.price.total],description:"Customer charges including booking, shipping and SMS fees.\nCalculated as: gross + discount + sms"}),gross:eo().min(0).meta({examples:[nd.Payout.price.gross],description:"Total amount before refunds, disputes and discounts.\nCalculated as: base + booking + shipping"}),base:eo().min(0).meta({examples:[nd.Payout.price.base],description:"Total value of tickets."}),booking:eo().min(0).meta({examples:[nd.Payout.price.booking],description:"Total value of booking fees (non-refundable)."}),shipping:eo().min(0).meta({examples:[nd.Payout.price.shipping],description:"Total value of shipping."}),sms:eo().min(0).default(0).meta({examples:[nd.Payout.price.sms],description:"Total SMS delivery fees collected in cents (owed to Session Services, not the event organiser)."}),refunded:eo().max(0).meta({examples:[nd.Payout.price.refunded],description:"Total value of refunds (negative value)."}),discount:eo().max(0).meta({examples:[nd.Payout.price.discount],description:"Total value of discounts (negative value)."}),gateway:eo().meta({examples:[nd.Payout.price.gateway],description:"Total value of absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),dispute:eo().meta({examples:[nd.Payout.price.dispute],description:"Total value of non-absorbed payment gateway fees. Negative values are charges; positive values are reversals."}),deductions:eo().max(0).optional().meta({examples:[nd.Payout.price.deductions],description:"Deprecated total value of legacy payout-level deductions. New recovery amounts are exposed through payout adjustments."}),currency:ld.meta({examples:[nd.Payout.price.currency],description:"Currency code in ISO 4217 format."})}),kv=wf(Oo(["CREATED","APPROVED","REJECTED","PROCESSING","PAID","FAILED","CANCELLED","NOTE"]),{createdAtExamples:[nd.Payout.createdAt],descriptionExamples:["Payout was created after event settlement"],externalIdDescription:"External idempotency key for deduplication (e.g., Airwallex transfer events)",externalIdExamples:["airwallex:transfer_abc123:completed"],idDescription:"Unique identifier for this timeline entry",idExamples:["tl_01jgxyz123abc"],kindDescription:"Type of timeline event (CREATED, APPROVED, PROCESSING, PAID, NOTE, etc.)",kindExamples:["CREATED","APPROVED","PAID"]}),Tv=wo({id:kr().meta({examples:[nd.PayoutTransfer.id],description:"Unique identifier for this transfer record."}),createdAt:rd().meta({examples:[nd.PayoutTransfer.createdAt],description:"Timestamp in ISO 8601 format when this transfer was created."}),kind:Oo(["TICKETS","TENANT","VENUE","TEAM","SESSIONS","UNKNOWN"]).meta({examples:["TICKETS"],description:"Type of transfer. TICKETS: revenue from ticket sales, TENANT: platform fees, VENUE: venue split, TEAM: team split, SESSIONS: platform commission, UNKNOWN: unclassified transfer."}),amount:eo().min(0).meta({examples:[nd.PayoutTransfer.amount],description:"Transfer amount in cents. Positive values represent money being transferred to the beneficiary."}),currency:ld.meta({examples:[nd.PayoutTransfer.currency],description:"Currency code in ISO 4217 format for the transfer amount."}),fee:eo().min(0).meta({examples:[nd.PayoutTransfer.fee],description:"Gateway processing fee for this transfer in cents. This fee is deducted from the transfer amount."}),feeCurrency:ld.meta({examples:[nd.PayoutTransfer.feeCurrency],description:"Currency code in ISO 4217 format for the gateway fee."}),reference:kr().meta({examples:[nd.PayoutTransfer.reference],description:"External reference identifier for tracking this transfer with the payment gateway."}),gateway:Oo(["AIRWALLEX","STRIPE"]).meta({examples:["AIRWALLEX"],description:"Payment gateway used to process this transfer."}),gatewayId:kr().meta({examples:[nd.PayoutTransfer.gatewayId],description:"Unique identifier assigned by the payment gateway for this transfer."}),beneficiary:kr().meta({examples:[nd.PayoutTransfer.beneficiary],description:"Human-readable name of the beneficiary receiving this transfer."}),beneficiaryId:kr().meta({examples:[nd.PayoutTransfer.beneficiaryId],description:"Unique identifier of the beneficiary account receiving this transfer."}),status:kr().optional().meta({examples:["SCHEDULED"],description:"Transfer status from the payment gateway (e.g. SCHEDULED, IN_PROGRESS, COMPLETED)."}),settlementAmount:eo().min(0).optional().meta({examples:[3550],description:"Amount received by the beneficiary in their local currency, in cents. Present only for cross-currency transfers where the settlement currency differs from the source currency."}),settlementCurrency:ld.optional().meta({examples:["USD"],description:"Currency code in ISO 4217 format for the settlement amount. Present only for cross-currency transfers."}),deductionId:kr().optional().meta({description:"Deprecated optional reference to a legacy deduction record."}),deductionPayoutId:kr().optional().meta({description:"Deprecated optional reference to the payout that originated a legacy deduction transfer."})}),Av=Oo(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]),xv=Oo(["AIRWALLEX","STRIPE","MANUAL"]),Sv=Oo(["DAILY","WEEKLY","AFTER_EVENT","ON_DEMAND"]),Dv=wo({id:kr().readonly().meta({examples:[nd.Payout.id],description:"A unique identifier for this payout."}),createdAt:rd().readonly().meta({examples:[nd.Payout.createdAt],description:"Timestamp in ISO 8601 format when this payout was created."}),updatedAt:rd().readonly().meta({examples:[nd.Payout.updatedAt],description:"Timestamp in ISO 8601 format when this payout was last updated."}),statementPending:io().optional().meta({description:"Whether the completed payout is awaiting its accounting statement snapshot."}),statementVersion:eo().positive().optional().meta({description:"Version of the immutable issued statement, absent on legacy payouts."}),paidAt:rd().optional().meta({examples:[nd.Payout.paidAt],description:"Timestamp in ISO 8601 format when this payout was completed."}),dueAt:rd().optional().meta({examples:[nd.Payout.createdAt],description:"Earliest timestamp in ISO 8601 format when this payout can be picked up for processing. This is not a guaranteed bank arrival time."}),status:Av.meta({examples:["PAID"],description:"Current payment status of this payout."}),method:xv.meta({examples:["MANUAL"],description:"The payout channel used for disbursing funds."}),failedAttempts:eo().nonnegative().optional().meta({description:"Failures since approval. After four failures an administrator must explicitly retry the payout. Absent on legacy payouts."}),approval:sd.meta({examples:["APPROVED"],description:"Approval status for this payout."}),frequency:Sv.default("AFTER_EVENT").meta({examples:["AFTER_EVENT"],description:"Schedule on which this payout is generated."}),structure:kr().meta({examples:[nd.Payout.structure],description:"Data structure defining how funds are allocated in this payout."}),transfers:vo(Tv).meta({description:"List of individual transfer records included in this payout."}),deductions:vo($v).optional().meta({description:"Deprecated legacy deductions applied before calculating the payout total. New recovery amounts are exposed through payout adjustments."}),price:Ev.meta({description:"Summary of event/order-derived amounts for this payout."}),unsettled:Ev.optional().meta({description:"Completed sales assigned to this payout that are still awaiting settlement."}),unsettledCount:Qr().int().nonnegative().optional().meta({description:"Number of orders still awaiting settlement."}),recovery:wv.optional().meta({description:"Optional recovery metadata when this payout exists to return settlement-proven recovered funds."}),event:Iv.meta({description:"Information about the event associated with this payout."}),timeline:vo(kv).optional().meta({description:"Chronological list of status changes and notes for this payout."}),eventId:kr().meta({examples:[nd.Payout.eventId],description:"Identifier of the event for which this payout was generated."}),teamId:kr().meta({description:"Team receiving this payout. BREAKING CHANGE: Replaced promoterId/promoterSlug."})}).meta({description:"payout"});wo({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout to approve for processing."})}),wo({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout to reject."}),reason:kr().optional().meta({examples:["Insufficient funds in account"],description:"Optional reason for rejecting the payout. This will be recorded for audit purposes."})}),wo({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout to process and initiate transfers."})}),wo({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout to retry transfer processing for."})});const Ov=wo({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout to add a note to"}),note:kr().trim().min(1).max(1e3).meta({examples:["Transfer confirmed via bank statement"],description:"Note text content (1-1000 characters)"})}),Cv=Oo(["REFUND","DISPUTE_PRINCIPAL","DISPUTE_FEE","GATEWAY_FEE","NEGATIVE_PAYOUT_CARRY_FORWARD","LEGACY_ADJUSTMENT"]),Pv=Oo(["RESERVED","OPEN","PARTIALLY_APPLIED","APPLIED"]),_v=Oo(["OUTSTANDING","APPLIED","ALL"]),Rv=Oo(["event","payout"]),Nv=wo({id:kr(),name:kr(),slug:kr()}),Mv=wo({id:kr(),status:Av,approval:sd,method:xv,dueAt:rd().optional(),paidAt:rd().optional(),event:Nv,price:Ev,unsettled:Ev.optional()}),Uv=wo({id:kr(),payoutId:kr(),amount:eo().min(0),currency:ld,appliedAt:rd(),transferId:kr().optional(),payout:Mv.optional()}),Lv=wo({id:kr(),createdAt:rd(),updatedAt:rd(),provenAt:rd(),teamId:kr(),eventId:kr().optional(),orderId:kr().optional(),payoutId:kr().optional(),sourcePayoutId:kr().optional(),gateway:xv,kind:Cv,direction:Po("DEBIT"),status:Pv,amount:eo().min(0),appliedAmount:eo().min(0),remainingAmount:eo().min(0),currency:ld,beneficiary:kr(),beneficiaryId:kr(),description:kr(),settlementId:kr().optional(),transactionId:kr().optional(),feeType:kr().optional(),feeSourceId:kr().optional(),disputeId:kr().optional(),refundId:kr().optional(),paymentIntentId:kr().optional(),paymentAttemptId:kr().optional(),customer:Uh.optional(),event:Nv.optional(),sourcePayout:Mv.optional(),applications:vo(Uv)}),jv=wo({id:kr()}),qv=wo({adjustmentId:kr(),amount:eo().min(0),currency:ld}),Gv=wo({amount:eo().min(0),appliedAmount:eo().min(0),remainingAmount:eo().min(0),projectedAmount:eo().min(0),currency:ld}),Bv=wo({id:kr(),event:Nv.optional(),adjustments:vo(Lv),totals:vo(Gv)}),Fv=wo({id:kr(),payout:Mv,adjustments:vo(Lv),projections:vo(qv),totals:vo(Gv),projectedNetAmount:eo()}),Vv=wo({adjustmentCount:eo().min(0),eventCount:eo().min(0),upcomingPayoutCount:eo().min(0),totals:vo(Gv)}),zv=wo({teamId:kr(),query:kr().optional(),status:_v.optional(),groupBy:Rv.optional(),eventId:kr().optional(),currency:ld.optional(),limit:Yd("adjustments").optional(),cursor:Zd.optional()}),Wv=wo({adjustments:vo(Lv),eventGroups:vo(Bv),payoutGroups:vo(Fv),summary:Vv,summaryScope:Po("PAGE"),before:kr().nullish(),after:kr().nullish(),limit:Qr().int().min(1)}),Yv=wo({adjustment:Lv,adjustments:vo(Lv),eventGroups:vo(Bv),payoutGroups:vo(Fv),summary:Vv}),Zv=wo({name:kr(),gateway:Oo(["AIRWALLEX","STRIPE","FREE"]),message:kr(),eventIds:vo(kr()).optional(),venues:vo(kr()).optional(),tenants:vo(kr()).optional(),teams:vo(kr()).optional(),ticketBeneficiaryTeamId:kr().optional(),venueBeneficiaryTeamId:kr().optional(),min:Qr().optional(),max:Qr().optional(),percent:Qr().optional(),split:wo({tenant:Qr(),team:Qr(),venue:Qr(),sessions:Qr()})}).refine((e=>e.split.venue<=0||void 0!==e.venueBeneficiaryTeamId),{message:"Venue fee splits require a beneficiary team",path:["venueBeneficiaryTeamId"]}),Hv="tem_01kach7nnvfvmbtfvgtgkb47kc",Kv="tem_01kqbww0g2fersexg66rbsffmd",Jv="tem_01kach7nntfvmbtfttvvqfgwbz",Qv="tem_01kh7xaxpbebj9538fp9nn019f";Zv.array().parse([{name:"DEFAULT",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",min:200,percent:7.5,split:{tenant:0,team:0,venue:0,sessions:1}},{name:"MIXMAG_ANZ_DEFAULT",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],min:200,percent:7.5,split:{tenant:.7,team:0,venue:0,sessions:.3}},{name:"MIXMAG_ASIA_DEFAULT",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",tenants:["tnt_01hk153x00ee4sgh15mp929k20"],min:200,percent:7.5,split:{tenant:.7,team:0,venue:0,sessions:.3}},{name:"MIXMAG_ANZ_SASH",gateway:"AIRWALLEX",message:"Controlled by S.A.S.H, flat rate of $5 AUD",tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],teams:[Jv],min:500,max:500,split:{team:1,tenant:0,venue:0,sessions:0}},{name:"MIXMAG_ANZ_SASH_FLAT_5",gateway:"AIRWALLEX",message:"Controlled by S.A.S.H, flat rate of $5 AUD",eventIds:["evt_01kztzvgvdecrt5xq7vn67vd5k"],tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],ticketBeneficiaryTeamId:Jv,venueBeneficiaryTeamId:Jv,min:500,max:500,split:{team:0,tenant:0,venue:1,sessions:0}},{name:"MIXMAG_ANZ_CAROUSEL_FLAT_5",gateway:"AIRWALLEX",message:"Controlled by Carousel, flat rate of $5 AUD",eventIds:["evt_01m0pz27j2fk7atvaa51e1sh8j"],tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],ticketBeneficiaryTeamId:Hv,venueBeneficiaryTeamId:Hv,min:500,max:500,split:{team:0,tenant:0,venue:1,sessions:0}},{name:"MIXMAG_ANZ_CAROUSEL",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2 AUD, whichever is higher",tenants:["tnt_01hk153x00en6tvgwwwhn8xj1p"],teams:[Hv,Kv,Qv],venues:["Carousel Bar & Ballroom","Carousel","169 Oxford St"],ticketBeneficiaryTeamId:Hv,venueBeneficiaryTeamId:Hv,min:200,percent:7.5,split:{team:0,tenant:0,venue:1,sessions:0}}]),Zv.array().parse([{name:"MIXMAG_ANZ_YAW_PLACE",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2.50 AUD, whichever is higher",ticketBeneficiaryTeamId:Hv,venueBeneficiaryTeamId:Qv,min:250,percent:7.5,split:{tenant:0,team:0,venue:1,sessions:0}},{name:"MIXMAG_ANZ_KANDY",gateway:"AIRWALLEX",message:"7.5% of the ticket price or $2.50 AUD, whichever is higher",ticketBeneficiaryTeamId:Hv,venueBeneficiaryTeamId:Kv,min:250,percent:7.5,split:{tenant:0,team:0,venue:1,sessions:0}}]);const Xv=wo({tenant:Qr().meta({examples:[5e4],description:"Amount allocated to the tenant (platform) in cents. This represents the platform's share of the revenue."}),venue:Qr().meta({examples:[25e3],description:"Amount allocated to the venue in cents. This represents the venue's share of the revenue from events held at their location."}),team:Qr().meta({examples:[2e4],description:"Amount allocated to the team in cents. This represents the team's share of the revenue after fees and other deductions."}),sessions:Qr().meta({examples:[3e3],description:"Amount allocated to Sessions platform commission in cents. This represents the platform's service fees."}),tickets:Qr().meta({examples:[2e3],description:"Amount allocated to ticketing fees in cents. This represents fees charged for ticket processing and management."})});wo({payout:Dv.meta({description:"Complete payout record containing all financial details and metadata for calculating beneficiary allocations."}),feeStructure:Zv.meta({description:"Fee structure configuration that defines how revenue is split between different parties (promoter, venue, platform, etc.)."}),split:Xv.meta({description:"Calculated split amounts showing how the payout total is divided among the different beneficiaries in cents."})});const eb=wo({tickets:eo().nonnegative().optional().meta({description:"Admission ticket count captured for this statement, retained when source orders are removed."}),orders:Qr().meta({examples:[150],description:"Total number of orders included in this payout breakdown."}),price:af.meta({description:"Aggregated price information for all orders included in this payout, showing total revenue, fees, refunds, and disputes."}),split:Xv.meta({description:"How the total payout amount is split between different beneficiaries (tenant, venue, promoter, etc.) in cents."}),structure:kr().meta({examples:["DEFAULT"],description:"Fee structure identifier that was used to calculate the payout split and allocations."})}),tb=wo({name:kr().meta({description:"Captured fee structure name."}),gateway:Oo(["AIRWALLEX","STRIPE","FREE"]).meta({description:"Payment gateway."}),message:kr().meta({description:"Customer-facing fee description."}),split:wo({tenant:Qr().meta({description:"Tenant booking fee share."}),team:Qr().meta({description:"Organiser booking fee share."}),venue:Qr().meta({description:"Venue booking fee share."}),sessions:Qr().meta({description:"Session Services booking fee share."})}).meta({description:"Captured booking fee allocations."}),ticketBeneficiaryTeamId:kr().optional().meta({description:"Ticket revenue recipient override."}),venueBeneficiaryTeamId:kr().optional().meta({description:"Venue booking fee recipient."})}).refine((e=>e.split.venue<=0||void 0!==e.venueBeneficiaryTeamId),{message:"Venue fee splits require a beneficiary team",path:["venueBeneficiaryTeamId"]}).meta({description:"Statement allocations without internal applicability selectors."}),ib=wo({statement:wo({version:eo().positive().meta({description:"Immutable statement version."}),capturedAt:rd().meta({description:"Statement accounting cutoff."}),feeStructure:tb.meta({description:"Beneficiary allocations captured for this statement."}),adjustments:eo().meta({description:"Applied organiser adjustments in settlement minor units; debits are positive."})}).optional().meta({description:"Frozen accounting basis for an issued payout statement."}),total:eb.meta({description:"Summary totals for all orders included in this payout breakdown, including aggregated financial calculations."}),orders:vo(wo({order:Ef.meta({description:"Complete order information including customer details, items, and payment status."}),price:af.meta({description:"Settled price information for this specific order, showing final amounts after refunds and adjustments."}),split:Xv.meta({description:"How this individual order's revenue is split between different beneficiaries in cents."}),structure:kr().meta({examples:["DEFAULT"],description:"Fee structure identifier used to calculate the split for this order."})})).meta({description:"Detailed breakdown of individual orders included in this payout, showing how each order contributes to the total."})});Dv.pick({id:!0,eventId:!0}).extend({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout for which to retrieve the detailed breakdown."}),eventId:kr().meta({examples:[nd.Event.id],description:"Unique identifier of the event associated with the payout breakdown."})}),Dv.pick({eventId:!0,teamId:!0,method:!0,frequency:!0}).partial({method:!0,frequency:!0}).meta({description:"Schema for creating a new payout record"}).extend({eventId:kr().meta({examples:[nd.Event.id],description:"Unique identifier of the event for which the payout is being created"}),teamId:kr().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"Unique identifier of the team who will receive the payout"}),method:Oo(["AIRWALLEX","STRIPE","MANUAL"]).optional().meta({examples:["AIRWALLEX"],description:"Optional payment method for the payout. Defaults to promoter's preferred method if not specified"}),frequency:Oo(["DAILY","WEEKLY","AFTER_EVENT"]).optional().meta({examples:["AFTER_EVENT"],description:"Optional payout frequency. Defaults to 'AFTER_EVENT' if not specified"})});const nb=wo({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout"}),noteId:kr().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to delete"})}),rb=Dv.pick({id:!0}).extend({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout to retrieve."})}),ob=Oo(["createdAt"]),ab=Oo(["asc","desc"]),sb=wo({mine:io().optional().meta({examples:[!0],description:"When true, returns payouts from teams where the authenticated user has payout access (for example, `payout.read` or `payout.write`)."}),teamId:kr().optional().meta({description:"Filter payouts by specific team unique identifier. BREAKING CHANGE: Replaced promoterId filter."}),eventId:kr().optional().meta({examples:[nd.Event.id],description:"Filter payouts by specific event unique identifier. When provided, only returns payouts for this event."}),status:Oo(["UPCOMING","FAILED","PROCESSING","PAID","CANCELLED"]).optional().meta({examples:["PAID"],description:"Filter payouts by payment status. UPCOMING: scheduled but not yet processed, FAILED: failed processing and will retry, PROCESSING: currently being processed, PAID: successfully completed, CANCELLED: cancelled before completion."}),approval:sd.optional().meta({examples:["APPROVED"],description:"Filter payouts by approval status. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected and will not be processed."}),manualApprovalOnly:io().optional().meta({description:"Only include manual payouts and recovery credits that require an operator approval decision."}),query:kr().optional().meta({examples:["PAID venue:sydney"],description:"Optional search query to filter payouts by text fields. When provided, search-backed pagination is used."}),sort:ob.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest payouts first."}),direction:ab.optional().meta({examples:["desc"],description:"Sort direction for payout lists. Defaults to `desc` when `sort` is provided."}),limit:Yd("payouts").optional(),cursor:kr().optional().meta({examples:["eyJpZCI6InBheV8wMWpwczVjZ3NmdjJ3cmU2aGQwcmM0dzR0OCJ9"],description:"Pagination cursor for continuing to fetch subsequent results. Use the cursor from the previous response to continue."})}).meta({description:"Schema for listing payouts with optional filtering, search, and cursor-based pagination"}),db=wc(Dv,"payouts"),cb=wo({status:Oo(["VALID","FALLBACK","MISSING"]).meta({examples:["VALID"],description:"Resolution status for the beneficiary used by this split. FALLBACK indicates a non-strict match was used, MISSING means no beneficiary is configured."}),warning:kr().optional().meta({examples:["Using fallback beneficiary with matching gateway only."],description:"Optional warning message shown when fallback or missing beneficiary resolution was required."}),beneficiary:wo({id:kr().optional().meta({examples:[nd.Beneficiary.id],description:"Identifier for the beneficiary."}),teamId:kr().optional().meta({examples:[nd.Team.id],description:"Team that owns this beneficiary configuration."}),name:kr().meta({examples:[nd.Beneficiary.name],description:"Display name for the resolved beneficiary."}),gateway:Oo(["AIRWALLEX","STRIPE"]).optional().meta({examples:[nd.Beneficiary.gateway],description:"Payment gateway for this beneficiary when available from configuration."}),gatewayId:kr().meta({examples:[nd.Beneficiary.gatewayId],description:"Gateway-specific beneficiary identifier used for transfer creation."}),currency:ld.meta({examples:[nd.Beneficiary.currency],description:"Currency configured for this beneficiary."})}).optional()}),lb=wo({kind:Oo(["tickets","tenant","venue","team","sessions"]).meta({examples:["tickets"],description:"Split component represented by this row."}),amount:Qr().int().meta({examples:[114500],description:"Amount in cents for this split component."}),currency:ld.meta({examples:[nd.Payout.price.currency],description:"Currency code for this split component."}),beneficiary:cb}),ub=Oo(["TRACKED","N_A","SKIPPED"]),pb=wo({orders:Qr().int().meta({examples:[12],description:"Number of orders in this settlement bucket."}),price:af.meta({description:"Aggregated totals for the orders in this bucket, in the bucket's native currency."})}),mb=wo({state:ub.meta({examples:["TRACKED"],description:"Whether settlement tracking applies to this payout preview. Non-Airwallex payouts return N_A."}),settled:pb.optional().meta({description:"Completed Airwallex orders that already have settlement data available."}),awaitingSettlement:pb.optional().meta({description:"Completed Airwallex orders still waiting on settlement ingestion."})}),hb=wo({payout:Dv.pick({id:!0,status:!0,approval:!0,method:!0,frequency:!0,structure:!0,createdAt:!0,dueAt:!0,teamId:!0,eventId:!0,event:!0,price:!0}).meta({description:"Lightweight payout summary used by approvals and payout queue UIs."}),rows:vo(lb).meta({description:"Non-zero split rows with beneficiary resolution status and warnings."}),settlementSummary:mb.meta({description:"Settlement status summary for the payout event. Airwallex payouts expose settled vs awaiting-settlement buckets."})}),fb=rb.extend({includeSettlementSummary:io().optional().meta({examples:[!0],description:"When true, includes the Airwallex settlement summary for the payout preview."})}),yb=wo({payout:Dv,breakdown:ib,appliedAdjustments:vo(Lv),projectedAdjustmentGroup:Fv.optional(),canExportBookingFees:io()}),gb=So(kr(),So(kr(),wo({net:Qr(),total:Qr(),gross:Qr(),base:Qr(),booking:Qr(),shipping:Qr(),refunded:Qr(),discount:Qr(),gateway:Qr(),dispute:Qr(),deductions:Qr().default(0)}))).meta({description:"Payout statistics grouped by period (current/previous) and currency",examples:[{current:{USD:{net:1e5,total:12e4,gross:115e3,base:11e4,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:3e3,dispute:0}},previous:{USD:{net:8e4,total:95e3,gross:9e4,base:85e3,booking:5e3,shipping:0,refunded:0,discount:5e3,gateway:2500,dispute:0}}}]}),vb=wo({teamId:kr().optional().meta({description:"Filter stats by team ID"}),startDate:kr().optional().meta({description:"Start date for stats period (YYYY-MM-DD)"}),endDate:kr().optional().meta({description:"End date for stats period (YYYY-MM-DD)"})}),bb=Dv.pick({id:!0}).merge(Dv.pick({status:!0,approval:!0}).partial()).extend({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout to update."}),status:Oo(["CANCELLED"]).optional().meta({examples:["CANCELLED"],description:"Optional new payment status for the payout. Only CANCELLED is allowed for manual updates."}),approval:sd.optional().meta({examples:["APPROVED"],description:"Optional new approval status for the payout. PENDING: awaiting approval, APPROVED: approved for processing, REJECTED: rejected."})}),wb=wo({id:kr().meta({examples:[nd.Payout.id],description:"Unique identifier of the payout"}),noteId:kr().meta({examples:["tl_1234567890_abc123"],description:"Unique identifier of the timeline note to update"}),note:kr().trim().min(1).max(1e3).meta({examples:["Updated: Transfer confirmed - reference #12345"],description:"Updated note text content (1-1000 characters)"})}),$b=Oo(["PROMOTER","VENUE"]).meta({description:"Type of permission scope. PROMOTER: applies to all events by a specific promoter. VENUE: applies to all events at a specific venue."}),Ib=wo({id:kr().readonly().meta({description:"Unique identifier for the permission scope"}),createdAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was created"}),updatedAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the scope was last updated"}),teamMemberId:kr().meta({description:"Team member this scope applies to"}),teamId:kr().meta({description:"Team the member belongs to"}),userId:kr().meta({description:"ID of the user this permission scope applies to"}),permissions:vo(oc).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:vo(kr()).optional().meta({description:"Optional role IDs applied at this scope. Role-derived permissions are merged with explicit scoped nodes."}),tenantId:kr().readonly().meta({description:"Tenant identifier"})}),Eb=To("kind",[Ib.extend({kind:Po("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:kr().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),Ib.extend({kind:Po("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:kr().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions using REPLACE semantics."}),kb=wo({permissions:vo(oc).meta({description:"Scoped permissions. Can be empty array to remove all access. Replaces lower-tier permissions based on kind (VENUE overrides PROMOTER overrides BASE)."}),roleIds:vo(kr()).optional().meta({description:"Optional role IDs to apply at this scope."})}),Tb=To("kind",[kb.extend({kind:Po("PROMOTER").meta({description:"Scope type: PROMOTER-specific permissions"}),promoterId:kr().meta({description:"Promoter this scope applies to. Replaces base permissions for all events by this promoter."})}).meta({description:"Create a PROMOTER-specific permission scope. Applies to all events by the specified promoter."}),kb.extend({kind:Po("VENUE").meta({description:"Scope type: VENUE-specific permissions"}),venueId:kr().meta({description:"Venue this scope applies to. Replaces base/promoter permissions for all events at this venue."})}).meta({description:"Create a VENUE-specific permission scope. Applies to all events at the specified venue."})]).meta({description:"Schema for creating a new permission scope. Must specify kind (PROMOTER or VENUE) and corresponding ID."}),Ab=wo({id:Nd.meta({description:"Unique identifier for the permission scope"})}).meta({description:"Schema for retrieving a single permission scope by ID"}),xb=wo({teamMemberId:kr().optional().meta({description:"Filter by team member ID"}),userId:kr().optional().meta({description:"Filter by user ID"}),kind:$b.optional().meta({description:"Filter by scope kind (PROMOTER or VENUE)"}),promoterId:kr().optional().meta({description:"Filter by promoter ID (only for kind=PROMOTER scopes)"}),venueId:kr().optional().meta({description:"Filter by venue ID (only for kind=VENUE scopes)"}),limit:Yd("permission scopes"),cursor:kr().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing permission scopes with pagination and filtering"}),Sb=wc(Eb,"items").meta({description:"Paginated response containing permission scopes with cursor for next page"}),Db=kb.meta({description:"Schema for updating an existing permission scope. Only permissions array can be modified."}),Ob=wo({id:Md.meta({description:"Permission role ID"}),teamId:gd.meta({description:"Team that owns this role"}),name:kr().min(1).meta({description:"Role display name"}),description:kr().optional().meta({description:"Optional role description"}),permissions:sc.meta({description:"Permission nodes granted by this role"}),createdAt:rd().meta({description:"Timestamp in ISO 8601 format when the role was created"}),updatedAt:rd().meta({description:"Timestamp in ISO 8601 format when the role was last updated"})}).meta({description:"Team-scoped permission role"}),Cb=wo({role:Ob}),Pb=wo({roles:vo(Ob)}),_b=wo({key:kr().meta({description:"Team identifier (ID or slug)"})}),Rb=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),roleId:Md}),Nb=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),name:kr().min(1).meta({description:"Role display name"}),description:kr().optional().meta({description:"Optional role description"}),permissions:sc}),Mb=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),roleId:Md,name:kr().min(1).meta({description:"Role display name"}),description:kr().optional().meta({description:"Optional role description"}),permissions:sc}),Ub=wo({memberId:Pd,permissions:vo(oc),updatedAt:rd()}),Lb=wo({member:Ub}),jb=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),memberId:Pd}),qb=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),memberId:Pd,permissions:vo(oc).meta({description:"Direct permission nodes for this member. Full-replace semantics; use an empty array to remove all direct grants."})}),Gb=wo({memberId:Pd,roleIds:vo(Md).meta({description:"Role IDs assigned to this member"}),updatedAt:rd()}),Bb=wo({member:Gb}),Fb=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),memberId:Pd}),Vb=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),memberId:Pd,roleIds:vo(Md)}),zb=wo({direct:vo(kr()),fromRoles:vo(kr()),effective:vo(kr()),denied:vo(kr())});wo({memberId:Pd,permissions:zb}),wo({key:kr().meta({description:"Team identifier (ID or slug)"}),memberId:Pd,domain:kr().optional().meta({description:"Optional domain filter (for example: ticket, event)"}),action:kr().optional().meta({description:"Optional action filter (for example: read, write, scan)"}),resourceId:kr().optional().meta({description:"Optional resource ID filter"})});var Wb={roles:{list:js.route({method:"GET",path:"/teams/{key}/roles",summary:"List team roles",description:"Returns all roles configured for a team.",tags:["Permissions"]}).input(_b.strict()).output(Pb),create:js.route({method:"POST",path:"/teams/{key}/roles",summary:"Create team role",description:"Creates a team-scoped permission role.",tags:["Permissions"]}).input(Nb.strict()).output(Cb),get:js.route({method:"GET",path:"/teams/{key}/roles/{roleId}",summary:"Get team role",description:"Retrieves a team role by ID.",tags:["Permissions"]}).input(Rb.strict()).output(Cb),update:js.route({method:"PUT",path:"/teams/{key}/roles/{roleId}",summary:"Replace team role",description:"Full-replace, idempotent update for role name, description, and permissions.",tags:["Permissions"]}).input(Mb.strict()).output(Cb),remove:js.route({method:"DELETE",path:"/teams/{key}/roles/{roleId}",summary:"Delete team role",description:"Deletes a team role.",tags:["Permissions"]}).input(Rb.strict()).output(Cb)},members:{permissions:{get:js.route({method:"GET",path:"/teams/{key}/members/{memberId}/permissions",summary:"Get member direct permissions",description:"Returns direct permission nodes assigned to a member.",tags:["Permissions"]}).input(jb.strict()).output(Lb),replace:js.route({method:"PUT",path:"/teams/{key}/members/{memberId}/permissions",summary:"Replace member direct permissions",description:"Full-replace, idempotent update for direct permission nodes assigned to a member.",tags:["Permissions"]}).input(qb.strict()).output(Lb)},roles:{get:js.route({method:"GET",path:"/teams/{key}/members/{memberId}/roles",summary:"Get member role assignments",description:"Returns role IDs assigned to a member.",tags:["Permissions"]}).input(Fb.strict()).output(Bb),replace:js.route({method:"PUT",path:"/teams/{key}/members/{memberId}/roles",summary:"Replace member role assignments",description:"Full-replace, idempotent update for role assignments on a member.",tags:["Permissions"]}).input(Vb.strict()).output(Bb)}}};const Yb=wo({key:kr().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[nd.Promoter.id,nd.Promoter.slug]})}).meta({description:"Request schema for retrieving a promoter by either its unique ID or slug"});Dp.pick({slug:!0});const Zb=Dp.omit({id:!0,createdAt:!0,updatedAt:!0,geohash:!0,approval:!0,location:!0}).extend({description:dc.meta({examples:[nd.Promoter.description],description:"Detailed description of the promoter organization and their events"}),teamId:kr().meta({examples:["tem_01jqpjksnsen9vprw95et60t2m"],description:"ID of the team that will own this promoter. User must be a member of this team."}),slug:kr().min(3).max(30).optional().meta({examples:[nd.Promoter.slug],description:"URL-friendly slug for the promoter organization. If not provided, will be automatically generated from the name. Must be unique and between 3 and 30 characters"}),...cy}).refine(ly,{message:dy}).meta({description:"Schema for creating a new promoter organization. The system automatically generates the ID, tenant association, geohash, and timestamps"}),Hb=wo({key:kr().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[nd.Promoter.id,nd.Promoter.slug]})}).meta({description:"Schema for removing (soft deleting) a promoter organization by key (ID or slug)"});Dp.pick({id:!0}).meta({description:"Schema for retrieving a specific promoter by ID"});const Kb=Oo(["createdAt"]),Jb=Oo(["asc","desc"]),Qb=$o({teamId:kr().max(128).optional().meta({description:"Filter promoters to only those belonging to a specific team"}),approval:sd.optional().meta({examples:[nd.Promoter.approval],description:"Filter promoters by approval status. PENDING: awaiting review, APPROVED: can create events, REJECTED: cannot operate"}),query:kr().max(120).optional().meta({examples:["Session Services"],description:"Optional search query. When provided, results are fetched from search with unified cursor pagination."}),latitude:od().min(-90).max(90).optional().meta({examples:[nd.Promoter.location.latitude],description:"Latitude used with longitude and radius to filter promoters by proximity when searching."}),longitude:od().min(-180).max(180).optional().meta({examples:[nd.Promoter.location.longitude],description:"Longitude used with latitude and radius to filter promoters by proximity when searching."}),radius:od().min(1).max(2e4).optional().meta({examples:[50],description:"Search radius in kilometers applied when latitude and longitude are provided."}),mine:ad().optional().meta({examples:[!0],description:"When true, limits results to promoters from teams the current user belongs to. When combined with teamId, returns only that team's promoters (bypassing tenant-wide admin scope)."}),sort:Kb.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest promoters first."}),direction:Jb.optional().meta({examples:["desc"],description:"Sort direction for promoter lists. Defaults to `desc` when omitted."}),limit:Ko((e=>{if(null!=e)return"string"==typeof e?function(e){let t=e.trim();if(0===t.length)return;let i=Number(t);return Number.isNaN(i)?e:i}(e):e}),Qr().min(1).max(100).prefault(20)).meta({examples:[20],description:"Maximum number of promoters to return (1-100, defaults to 20)"}).optional(),cursor:kr().max(768).optional().meta({examples:["eyJpZCI6InByb18wMWpxcGprc25zZW45dnBydzk1ZXQ2MHQybSJ9"],description:"Opaque cursor for pagination. Use the cursor from the previous response to continue fetching results."})}).meta({description:"Schema for listing promoters with optional filtering by team, full-text search, and cursor pagination"}),Xb=wc(Dp,"promoters"),ew=wo({promoter:Dp}),tw=Dp.omit({createdAt:!0,updatedAt:!0,id:!0,location:!0}).partial().extend({description:dc.optional().meta({examples:[nd.Promoter.description],description:"Detailed description of the promoter organization. Omit to leave unchanged."}),key:kr().min(1).meta({description:"Promoter key - either a unique ID (pmt_xxx format) or URL-friendly slug",examples:[nd.Promoter.id,nd.Promoter.slug]}),locationId:Id.optional().meta({examples:["loc_01jqpjksnsen9vprw95et60t2m"],description:"ID of an existing location to update to. Either locationId or googlePlaceId can be provided."}),googlePlaceId:kr().optional().meta({examples:["ChIJN1t_tDeuEmsRUsoyG83frY4"],description:"Google Place ID to update location from. Either locationId or googlePlaceId can be provided."}),image:qd.nullable().optional().meta({description:"Promoter image. Pass null to clear; omit to leave unchanged.",examples:[nd.Promoter.image,null]}),tracking:wo({fbId:kr().optional(),gaId:Sp.optional(),tikTokId:kr().optional()}).nullable().optional().meta({description:"Analytics tracking config. Pass null to clear all tracking; omit to leave unchanged."})}).meta({description:"Schema for updating an existing promoter."}),iw=Oo(["PAYOUT_STATEMENT","PAYOUT_ORDER_BREAKDOWN","PAYOUT_BOOKING_FEE_BREAKDOWN","PAYOUT_ADJUSTMENT_BREAKDOWN","EVENT_ORDERS","MEMBERSHIP_MEMBERS"]),nw=Oo(["QUEUED","PROCESSING","COMPLETED","FAILED"]),rw=wo({payoutId:kr().describe("Payout identifier"),teamId:kr().optional().describe("Requesting team identifier")}),ow=wo({eventId:kr().describe("Event identifier")}),aw=wo({teamId:kr().describe("Team whose current membership program is exported")}),sw=To("type",[wo({type:Po("PAYOUT_STATEMENT"),params:rw}),wo({type:Po("PAYOUT_ORDER_BREAKDOWN"),params:rw}),wo({type:Po("PAYOUT_BOOKING_FEE_BREAKDOWN"),params:rw}),wo({type:Po("PAYOUT_ADJUSTMENT_BREAKDOWN"),params:rw}),wo({type:Po("EVENT_ORDERS"),params:ow}),wo({type:Po("MEMBERSHIP_MEMBERS"),params:aw})]),dw=wo({id:kr().describe("Report job identifier")}),cw=wo({id:kr(),type:iw,status:nw,createdAt:kr(),updatedAt:kr(),expiresAt:kr().optional(),filename:kr().optional(),contentType:kr().optional(),sizeBytes:Qr().optional(),error:kr().optional(),downloadUrl:kr().optional()}),lw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),inviteId:kr().meta({description:"Team invite ID to accept"}),token:kr().meta({description:"Secure token used to accept the team invite. This token must match the one sent in the invitation email."})}),uw=Oo(["TEAM","EVENTS"]),pw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),scope:uw.meta({description:"Stripe Connect event routing scope. TEAM routes every team event through Stripe Connect. EVENTS routes selected events only.",examples:["EVENTS"]}),eventIds:vo(wd).max(100).optional().meta({description:"Event IDs routed through Stripe Connect when scope is EVENTS. Omit or pass an empty array to keep Stripe Connect disabled for all events in EVENTS mode."})}),mw=wo({provider:Oo(["STRIPE","AIRWALLEX"]).meta({description:"Payment gateway provider type"}),connectedAt:rd().meta({description:"Timestamp when the payment gateway was connected to this team"}),connectedBy:kr().meta({description:"User ID of the team member who connected the payment gateway"}),accountId:kr().meta({description:"Connected account ID. For Stripe: acct_xxxxx. For Airwallex: business account open ID."}),scope:uw.optional().meta({description:"Stripe Connect routing scope. TEAM routes all team events through Stripe Connect. EVENTS routes only selected events."}),eventIds:vo(wd).optional().meta({description:"Event IDs routed through Stripe Connect when scope is EVENTS."}),chargesEnabled:io().optional().meta({description:"Whether the connected Stripe account can currently accept charges."}),payoutsEnabled:io().optional().meta({description:"Whether the connected Stripe account can currently receive payouts."}),requirementsDue:vo(kr()).optional().meta({description:"Stripe Connect account requirements currently due before the account can remain fully enabled."}),disabledReason:kr().optional().meta({description:"Stripe disabled reason for the connected account, when Stripe reports one."}),syncedAt:rd().optional().meta({description:"Timestamp when gateway account status was last synced from the provider."})}).meta({description:"Payment gateway configuration for direct payouts to the team's connected account"}),hw=wo({id:gd.readonly().meta({description:"Unique identifier for the team organization"}),createdAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the team was created"}),updatedAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the team was last updated"}),name:kr().min(3).max(30).meta({description:"Display name of the team organization. Must be between 3 and 30 characters"}),slug:kr().min(3).max(30).meta({description:"URL-friendly slug for the team organization. Must be unique within tenant and between 3 and 30 characters"}),supportEmail:kr().email().optional().meta({description:"Support email address for customer inquiries. Used as reply-to address in order confirmation emails"}),publicBaseUrl:Nr().optional().meta({description:"Optional public website base URL for team-owned event and order links. When present, it overrides the tenant public base URL.",examples:["https://sash.net.au"]}),image:qd.optional().meta({description:"Team image with dimensions and alt text for branding across the platform"}),metadata:zd,approval:sd.meta({description:"Approval status of the team. PENDING: awaiting review, APPROVED: can create promoters/venues/events, REJECTED: cannot operate"}),deletedAt:rd().optional().readonly().meta({description:"Timestamp in ISO 8601 format when the team was soft deleted. Only present for deleted teams."}),tenantId:kr().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),isAdmin:io().optional().meta({description:"Whether this team is the admin team for the tenant"}),isDemo:io().readonly().meta({description:"Whether this team is protected seeded demo data"}),gateway:mw.optional().meta({description:"Connected payment gateway for direct payouts. When connected, funds from ticket sales go directly to the team's account with platform fees deducted."})}).meta({description:"Team organization that owns promoters and venues. Multiple brands can exist under one team."});hw.extend({promoter:Dp.meta({description:"The primary promoter brand associated with this team"})}).meta({description:"Team organization with its primary promoter brand included for convenience"});const fw=hw.extend({member:wo({id:Pd.meta({description:"Current user's team member identifier for this team"}),permissions:ac.meta({description:"Permissions the current user has for this team. Controls access to team resources.",examples:[[],["team.read","team.write"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),isOwner:io().meta({description:"Whether the current user is the owner of this team. Owners have full control."})}).optional().meta({description:"Current user's membership details for this team. Present when user is a member."})}).meta({description:"Team organization with the current user's membership details"}),yw=wo({key:kr().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[nd.Team.id,nd.Team.slug]})}).meta({description:"Request schema for retrieving a team by either its unique ID or slug"}),gw=hw.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0,isAdmin:!0,isDemo:!0}).extend({slug:kr().min(3).max(30).optional().meta({description:"URL-friendly slug for the team organization. If not provided, will be automatically generated from the name. Must be unique within tenant and between 3 and 30 characters"}),approval:hw.shape.approval.optional().meta({description:"Approval status of the team. Defaults to PENDING if not specified."})}).meta({description:"Schema for creating a new team organization. The system automatically generates the ID, tenant association, and timestamps"});wo({id:gd.meta({description:"Team ID to delete"})});const vw=wo({team:fw.extend({isAdmin:io().optional().meta({description:"Whether this team is the tenant admin team"}),stripeConnectAvailability:_p.optional().meta({description:"Stripe Connect availability metadata for tenant payment settings UI."})})}),bw=Oo(["QUEUED","PROCESSING","BLOCKED","COMPLETED","FAILED"]).meta({description:"Current state of an asynchronous team deletion operation"}),ww=wo({reason:Oo(["ADMIN_TEAM","DEMO_TEAM","EVENTS","ORDERS","EVENTS_AND_ORDERS","BUSINESS_RECORDS","SETUP_IN_USE"]).meta({description:"Stable business reason preventing team deletion"}),hasEvents:io().meta({description:"Whether active events prevent deletion"}),hasOrders:io().meta({description:"Whether orders prevent deletion"})}).meta({description:"Structured business condition preventing team deletion"}),$w=wo({id:bd.readonly().meta({description:"Unique identifier for the deletion operation"}),teamId:gd.readonly().meta({description:"Team being deleted"}),status:bw,createdAt:rd().readonly().meta({description:"Timestamp when deletion was requested"}),updatedAt:rd().readonly().meta({description:"Timestamp when deletion progress last changed"}),completedAt:rd().optional().readonly().meta({description:"Timestamp when deletion completed"}),blocker:ww.optional(),error:kr().optional().meta({description:"Safe failure description when manual recovery is needed"})}).meta({description:"Asynchronous team deletion operation"}),Iw=wo({id:bd}).meta({description:"Request for the state of a team deletion operation"}),Ew=vw.extend({deletion:$w}).meta({description:"Accepted team deletion request and its operation state"});wo({id:gd.meta({description:"Team ID to retrieve"})});const kw=wo({id:_d.readonly().meta({description:"Unique identifier for the team invitation"}),createdAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was created"}),updatedAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the invitation was last updated"}),teamId:gd.meta({description:"Team this invitation is for"}),email:Cr().meta({description:"Email address of the invited user. Used for sending invitation."}),permissions:vo(oc).meta({description:"Permissions the user will receive upon accepting the invitation. Can be overridden per promoter or venue.",examples:[[],["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:vo(kr()).optional().meta({description:"Role IDs assigned on invite acceptance. Effective permissions are role + explicit nodes."}),access:lc.optional().meta({description:"Promoter access to apply when the invitation is accepted."}),token:kr().readonly().meta({description:"Secure token for invite acceptance. Required to accept the invitation."}),expiresAt:Qr().int().positive().meta({description:"Unix timestamp (seconds) for DynamoDB TTL. Invitation will be automatically deleted after 7 days."}),invitedBy:Ed.meta({description:"User ID who sent the invitation"}),tenantId:kr().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Pending team invitation. Automatically deleted after 7 days via DynamoDB TTL. When accepted, creates a TeamMember record and deletes the invitation."}),Tw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),inviteId:kr().meta({description:"Team invite ID to cancel"})}),Aw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),email:Cr().meta({description:"Email address of the user to invite"}),roleIds:vo(kr()).min(1).meta({description:"Role IDs to grant to the invited user."}),access:uc.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."})}),xw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),inviteId:_d.meta({description:"Team invite ID to retrieve"})}),Sw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),query:kr().optional().meta({description:"Search query to filter invitations by email. Case-insensitive partial match"}),limit:Qr().int().min(1).max(100).default(20).optional().meta({description:"Maximum number of invitations to return per page"}),cursor:kr().optional().meta({description:"Pagination cursor for fetching the next page"})}),Dw=wc(kw,"invites"),Ow=wo({invite:kw}),Cw=Oo(["createdAt"]),Pw=Oo(["asc","desc"]),_w=wo({userId:Ed.optional().meta({description:"Filter teams by user membership. If omitted, returns all teams (tenant admin only). If provided, returns teams where the specified user is a member"}),approval:sd.optional().meta({description:"Filter teams by approval status. PENDING: awaiting review, APPROVED: can operate, REJECTED: cannot operate"}),query:kr().optional().meta({description:"Optional search query for filtering teams by name or slug"}),sort:Cw.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest teams first."}),direction:Pw.optional().meta({examples:["desc"],description:"Sort direction for team lists. Defaults to `desc` when `sort` is provided."}),limit:Yd("teams"),cursor:kr().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing teams with pagination and filtering"}),Rw=wc(fw,"teams"),Nw=Oo(["STRIPE","AIRWALLEX"]),Mw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),provider:Nw.meta({description:"Payment processor to connect",examples:["STRIPE","AIRWALLEX"]})}),Uw=wo({authorizationUrl:kr().url().meta({description:"URL to redirect the user to for OAuth authorization. Open in a new window or redirect the current page.",examples:["https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_xxx&scope=read_write&redirect_uri=..."]})}),Lw=wo({key:kr().meta({description:"Team identifier (ID or slug)"})}),jw=wo({id:kr().meta({description:"Role ID"}),teamId:kr().meta({description:"Team ID this role belongs to"}),key:kr().meta({description:"Role key"}),name:kr().meta({description:"Role display name"}),description:kr().optional().meta({description:"Role description"}),permissions:vo(kr()).meta({description:"Permission nodes granted by this role"}),scope:Po("TEAM").meta({description:"Role scope"}),isPreset:io().meta({description:"Whether this role is a system preset role"}),presetKey:kr().optional().meta({description:"Stable system preset identifier. It remains unchanged when a preset role is renamed."})});wo({key:kr().meta({description:"Team identifier (ID or slug)"})}),wo({roles:vo(jw)});const qw=wo({slug:kr().min(3).max(30).meta({description:"Candidate team URL slug to check after server normalization."}),key:kr().min(1).optional().meta({description:"Current team key to exclude when checking availability during team edits."})}).meta({description:"Request schema for checking team slug availability."}),Gw=wo({slug:kr().min(3).max(30).meta({description:"Normalized team URL slug that was checked."}),available:io().meta({description:"Whether the normalized slug is available in this tenant."})}).meta({description:"Team slug availability result."}),Bw=hw.omit({tenantId:!0,createdAt:!0,updatedAt:!0,id:!0,isAdmin:!0,isDemo:!0}).partial().extend({key:kr().min(1).meta({description:"Team key - either a unique ID (tem_xxx format) or URL-friendly slug",examples:[nd.Team.id,nd.Team.slug]}),supportEmail:kr().email().nullable().optional().meta({description:"Support email for customer inquiries. Pass null to clear, omit to leave unchanged."}),publicBaseUrl:Nr().nullable().optional().meta({description:"Public website base URL for team-owned event and order links. Pass null to clear, omit to leave unchanged."}),image:qd.nullable().optional().meta({description:"Team image. Pass null to clear, omit to leave unchanged."})}).meta({description:"Schema for updating an existing team organization. Pass null to clear optional fields."}),Fw=wo({id:Pd.readonly().meta({description:"Unique identifier for the team member"}),createdAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the member was created"}),updatedAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the member was last updated"}),teamId:gd.meta({description:"Team this member belongs to"}),userId:Ed.meta({description:"User ID of the team member"}),user:wo({id:Ed.meta({description:"Unique identifier of the user"}),email:Cr().meta({description:"Email address of the user"}),firstName:kr().meta({description:"First name of the user"}),lastName:kr().meta({description:"Last name of the user"}),imageUrl:kr().optional().meta({description:"Profile image URL of the user"})}).meta({description:"Denormalized user details for quick access without additional queries."}),permissions:vo(oc).optional().meta({description:"Base permissions across the team. Can be overridden per promoter or venue. Undefined means no base permissions (permissions come from PermissionScope only).",examples:[["event.read","event.write","order.read"],["team.member.read","team.member.write"],["ticket.scan"],["*"]]}),roleIds:vo(kr()).optional().meta({description:"Role IDs assigned to this team member. Effective permissions are derived from role nodes plus explicit permission nodes."}),isOwner:io().meta({description:"Whether this member is the owner of the team. Only one owner per team is allowed. Owner has full control and cannot be deleted."}),access:lc.optional().meta({description:"Promoter access summary. Omitted only for legacy/no-access records."}),tenantId:kr().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Active team member with base permissions. Permissions can be overridden per promoter or venue. Created when a user accepts an invitation or is directly added to a team."}),Vw=wo({member:Fw}),zw=Fw.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,user:!0,teamId:!0,permissions:!0,isOwner:!0}).extend({key:kr().meta({description:"Team identifier (ID or slug)"}),roleIds:vo(kr()).min(1).meta({description:"Role IDs assigned to this team member."}),access:uc.optional().meta({description:"Optional promoter access assignment. Omit to preserve existing team-wide behavior."}),isOwner:Po(!1).optional().meta({description:"Team ownership cannot be assigned when creating a member. External clients sending isOwner: true receive an input validation error; create the non-owner member first, then migrate ownership through POST /teams/{key}/transfer with newOwnerId."})}).meta({description:"Schema for adding an existing user to a team. Requires userId of an existing user account."}),Ww=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),userId:kr().meta({description:"User ID of the team member to retrieve"})}),Yw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),query:kr().optional().meta({description:"Search query to filter members by name or email. Case-insensitive partial match"}),limit:Yd("team members"),cursor:kr().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing active team members with pagination and search"}),Zw=wc(Fw,"members"),Hw=wo({key:kr().meta({description:"Team identifier (ID or slug)"}),newOwnerId:kr().meta({description:"Team member ID of the new owner. This member must already exist with ACTIVE status."})}).meta({description:"Schema for making an active team member the sole owner of their team."}),Kw=wo({previousOwner:Fw.meta({description:"Primary previous owner retained for compatibility. This member keeps their existing access and loses isOwner status. On an idempotent retry after the transfer is already applied, this is the unchanged current owner."}),newOwner:Fw.meta({description:"The new owner (now has isOwner: true)"}),demotedOwners:vo(Fw).meta({description:"All previous owners whose isOwner status was cleared by the transfer."})}).meta({description:"Response payload for team ownership transfer operation"}),Jw=wo({id:kr().meta({description:"Team member ID to update"}),roleIds:vo(kr()).min(1).meta({description:"Replace role assignments for this team member with the provided role IDs."}),isOwner:io().optional().meta({description:"Whether this team member is an owner of the team"}),access:uc.optional().meta({description:"Optional promoter access assignment. Omit to update only role assignments."})}).meta({description:"Schema for updating team member roles. Cannot update teamId, userId, or owner status."});var Qw={get:js.route({method:"GET",path:"/teams/{key}/members/{userId}",summary:"Get team member by user ID",description:"Retrieve a team member using the team key (ID or slug) and user ID",tags:["Team Members"]}).input(Ww.strict()).output(Vw),list:js.route({method:"GET",path:"/teams/{key}/members",summary:"List team members with cursor-based pagination",description:"Returns active team members for a specific team with cursor pagination. Team key can be ID or slug. For pending invitations, use the team invites endpoint instead.",tags:["Team Members"]}).input(Yw.strict()).output(Zw),create:js.route({method:"POST",path:"/teams/{key}/members",summary:"Add an existing user to a team",description:"Directly add an existing user to a team. Team key can be ID or slug. Requires at least one role ID. To invite a new user by email, use the team invites endpoint instead.",tags:["Team Members"]}).input(zw.strict()).output(Vw),update:js.route({method:"PATCH",path:"/teams/{key}/members/{userId}",summary:"Update a team member's roles",description:"Update an existing active team member. Team key can be ID or slug. Replaces role assignments. Cannot modify isOwner (use transfer endpoint instead).",tags:["Team Members"]}).input(Jw.extend({key:kr(),userId:kr()}).strict()).output(Vw),remove:js.route({method:"DELETE",path:"/teams/{key}/members/{userId}",summary:"Remove a team member",description:"Remove an active member from a team. Team key can be ID or slug. Cannot remove the team owner (transfer ownership first). To cancel pending invitations, use the team invites endpoint.",tags:["Team Members"]}).input(Ww.strict()).output(Vw),transfer:js.route({method:"POST",path:"/teams/{key}/transfer",summary:"Transfer team ownership",description:"Make an active team member the sole owner. Team key can be ID or slug. A current team owner or tenant administrator can perform this action. The new owner receives the team Admin role, while previous owners keep their existing access and lose only isOwner status.",tags:["Team Members"]}).input(Hw.strict()).output(Kw)};const Xw=Oo(["ALL","COUNTRY","STATE","CITY","VENUE"]),e$=wo({id:kr(),name:kr(),slug:kr(),kind:Xw,parentId:kr().optional(),latitude:Qr().optional(),longitude:Qr().optional(),radius:Qr().optional(),enabled:io(),order:Qr(),zoom:Qr().optional(),heroImage:kr().optional(),description:kr().optional()}),t$=wo({tenant:wo({id:kr(),name:kr(),slug:kr(),adminTeamId:kr(),legacyTenantsToTeams:So(kr(),kr()).optional(),features:So(kr(),io()).optional(),defaultCurrency:kr(),logo:wo({email:wo({src:kr(),width:Qr(),height:Qr()}),website:wo({src:kr(),width:Qr(),height:Qr()})}),baseUrl:wo({dev:kr().optional(),production:kr().optional()}),publicBaseUrl:wo({dev:kr().optional(),sandbox:kr().optional(),production:kr().optional()}).optional()}),regions:vo(e$)}),i$=wo({regions:vo(e$)}),n$=wo({teamId:kr().optional()}),r$=wo({counts:wo({teams:io(),promoters:io(),venues:io(),events:io(),payouts:io()})}),o$=wo({kind:Oo(["CHECK_IN","CHECK_OUT"]).meta({description:"The most recent attendee scan action."}),scannedAt:rd().meta({description:"Timestamp for the most recent attendee scan."})}),a$=wo({key:Oo("#ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")).meta({description:"Alpha navigation bucket key for attendee roster jumps."}),count:od().int().min(0).meta({description:"Number of roster rows currently available in this bucket."}),anchor:kr().meta({description:"Server-issued bookmark for the first roster row in this bucket under the active filters."})}),s$=kf.pick({id:!0,name:!0,entryEndsAt:!0}),d$=Of.pick({id:!0,name:!0}),c$=wo({id:Ad.meta({examples:[nd.Ticket.id],description:"Ticket identifier for this attendee roster row."}),orderId:Td.meta({examples:[nd.Ticket.orderId],description:"Order identifier used to navigate to order details."}),status:Cf.meta({description:"Current ticket status for the attendee row."}),attendee:Tf.meta({description:"Editable attendee identity fields for this ticket."}),admission:s$.meta({description:"Admission snapshot needed for roster labels and expiry state."}),section:d$.optional().meta({description:"Optional section label shown in the roster row."}),lastScan:o$.optional().meta({description:"Most recent scan event for compact roster activity text."}),lastCheckInAt:rd().optional().meta({description:"Timestamp for the most recent check-in scan, used for checked-in labels."})}),l$=wo({eventId:wd.meta({examples:[nd.Event.id],description:"Event identifier for the attendee roster."}),since:rd().meta({examples:["2026-09-25T10:00:00.000Z"],description:"Return roster rows updated at or after this instant. Pass the previous response's serverTime."}),admissionIds:vo(Dd).optional().meta({examples:[[nd.Admission.id]],description:"Optional admission filters, matching the roster list."}),sectionIds:vo(Od).optional().meta({examples:[[nd.Section.id]],description:"Optional section filters, matching the roster list."})}),u$=wo({tickets:vo(c$).meta({description:"Roster rows changed since the requested instant, oldest change first."}),truncated:io().meta({description:"True when more rows changed than one response carries; reload the roster window instead of applying these rows."}),serverTime:rd().meta({description:"Server time for this response; pass it as `since` on the next poll."})}),p$=wo({buckets:vo(a$).meta({description:"Available attendee alpha buckets for the active filter set."})}),m$=wo({eventId:wd.meta({examples:[nd.Event.id],description:"Event identifier for the attendee alpha index."}),admissionIds:vo(Dd).optional().meta({examples:[[nd.Admission.id]],description:"Optional admission filters used when computing available attendee buckets."}),sectionIds:vo(Od).optional().meta({examples:[[nd.Section.id]],description:"Optional section filters used when computing available attendee buckets."})}),h$=od().int().min(1).max(100).prefault(100).meta({examples:[100],description:"Maximum number of attendee roster rows to return per request (1-100, default: 100)."}),f$=wo({eventId:wd.meta({examples:[nd.Event.id],description:"Event identifier for the attendee roster."}),admissionIds:vo(Dd).optional().meta({examples:[[nd.Admission.id]],description:"Optional admission filters. When provided, only matching ticket admissions are included."}),sectionIds:vo(Od).optional().meta({examples:[[nd.Section.id]],description:"Optional section filters. When provided, only matching ticket sections are included."}),query:kr().optional().meta({examples:["John","john@example.com","+61400000000"],description:"Optional attendee search query. Matches attendee name, email, and phone."}),cursor:Zd.optional(),before:Zd.optional().meta({description:"Cursor for loading roster rows before the current window. Mutually exclusive with cursor and anchor."}),anchor:kr().optional().meta({description:"Server-issued bookmark used to jump to a roster bucket. Mutually exclusive with cursor and before."}),limit:h$.optional()}),y$=wc(c$,"tickets"),g$=Pf.pick({status:!0,admissionId:!0,orderItemId:!0}).extend({orderId:kr().meta({examples:[nd.Order.id],description:"The order this ticket belongs to"}),customerId:kr().meta({examples:[nd.Customer.id],description:"The customer who purchased this ticket"}),attendee:Tf.optional().meta({description:"Optional attendee information - defaults to order customer details if not provided"})}).meta({description:"Schema for creating a new ticket - caller provides minimal input; derived fields are populated by the service"}),v$=Pf.pick({id:!0}).extend({signature:cc.optional().meta({description:"HMAC signature for public ticket access (16 characters, base64url encoded)"})}).meta({description:"Schema for retrieving a specific ticket by ID with optional signature validation"}),b$=wo({promoterId:kr().optional().meta({examples:[nd.Promoter.id],description:"Filter tickets by promoter/organizer unique identifier (optional)"}),eventId:kr().optional().meta({examples:[nd.Event.id],description:"Filter tickets by event unique identifier (optional)"}),customerId:kr().optional().meta({examples:[nd.Customer.id],description:"Filter tickets by customer unique identifier (optional)"}),orderId:kr().optional().meta({examples:[nd.Order.id],description:"Filter tickets by order unique identifier (optional)"}),status:Cf.optional().meta({examples:["ACTIVE"],description:"Filter tickets by status: ACTIVE (can be used), REDEEMED (already used), CANCELLED (invalidated or refunded)"}),orderSignature:cc.optional().meta({description:"Order signature used to access tickets for a specific order without permissions (16 characters, base64url encoded)"}),query:kr().optional().meta({examples:["John Doe"],description:"Optional search query to filter tickets by customer details. When provided, search-backed pagination is used."}),limit:Yd("tickets").optional(),cursor:kr().optional().meta({examples:["eyJpZCI6InRrdF8wMWpwczVjZ3NnMHMzMncycHI3M3ZiY2NkZSJ9"],description:"Pagination cursor for continuing to fetch subsequent results (optional)"})}).meta({description:"Schema for listing tickets with optional filtering, search, and cursor-based pagination"}),w$=wc(Pf,"tickets"),$$=wo({ticket:Pf}),I$=Pf.pick({id:!0,eventId:!0}).extend({key:Pf.shape.id.meta({description:"Transition key. Supports canonical ticket IDs (tkt_*) and order IDs (ord_*)."}),deviceId:Pf.shape.scans.element.shape.deviceId.optional().meta({description:"Unique identifier of the scanning device (optional)."}),eventId:Pf.shape.eventId.optional().meta({description:"Optional event scope guard for check-in transitions. When provided, check-in fails if the ticket/order event does not match."}),allowPartialOrderCheckIn:io().optional().meta({description:"Confirms an order-level check-in when some tickets are already redeemed and some remain active."}),admissionIds:vo(Dd).optional().meta({description:"Optional scanner admission filters. When provided, check-in only applies to matching ticket admissions."}),sectionIds:vo(Od).optional().meta({description:"Optional scanner section filters. When provided, check-in only applies to matching ticket sections."}),idempotencyKey:kr().trim().min(1).max(255).optional().meta({description:"Stable client-generated key used to replay a scan request without turning a timed-out success into a duplicate denial."})}).omit({id:!0}).meta({description:"Schema for check-in/check-out transitions addressed by key, where key may resolve to a ticket or order identifier."}),E$=Oo(["ticket","order"]),k$=Oo(["NOOP_TRANSITION"]),T$=Oo(["PARTIAL_ORDER_CONFIRMATION_REQUIRED"]),A$=Oo(["EVENT_MISMATCH"]),x$=Oo(["FILTERED_OUT"]),S$=wo({id:Pf.shape.orderId,checkedInCount:Qr().int().nonnegative().optional(),items:vo(wo({quantity:Qr().int().positive()}))}),D$=Af.pick({id:!0,name:!0,slug:!0,entryStartsAt:!0}).extend({teamId:Pf.shape.teamId}),O$=Eo([wo({reason:k$,kind:Oo(["CHECK_IN","CHECK_OUT"]),targetType:E$,order:S$.optional(),ticket:Pf.optional()}),wo({reason:A$,kind:Oo(["CHECK_IN","CHECK_OUT"]),targetType:E$,requestedEventId:Pf.shape.eventId.optional(),event:D$,order:S$.optional(),ticket:Pf.optional()}),wo({reason:T$,kind:Po("CHECK_IN"),targetType:Po("order"),order:S$,ticket:Pf.optional()}),wo({reason:x$,kind:Po("CHECK_IN"),targetType:E$,order:S$.optional(),ticket:Pf.optional()})]),C$=wo({tickets:vo(Pf).meta({description:"Transition result tickets. Single-item array for ticket targets and full order tickets for order targets."}),targetType:E$.meta({description:"Resolved target scope from the provided key."}),order:S$.optional()}),P$=Oo(["ACTIVE","CANCELLED"]).describe("Status updates allowed via PATCH: ACTIVE (reactivate), CANCELLED (void). REDEEMED is set via scan endpoint."),_$=wo({id:kr().meta({examples:[nd.Ticket.id],description:"Unique identifier of the ticket to update"}),status:P$.optional().meta({description:"Update ticket status: CANCELLED to void, ACTIVE to reactivate"}),attendee:Tf.partial().nullable().optional().meta({description:"Attendee info. Pass object to set/update, null to clear, or omit to leave unchanged."}),admissionId:kr().optional().meta({examples:[nd.Admission.id],description:"Change ticket type/admission (admission and section objects will be fetched from event and stored)"})}).meta({description:"Schema for updating a ticket."}),R$={id:nd.User.id,createdAt:nd.User.createdAt,updatedAt:nd.User.updatedAt,email:nd.User.email,firstName:nd.User.firstName,lastName:nd.User.lastName,imageUrl:"https://assets.session.services/examples/avatar.jpg",tenantId:nd.User.tenantId},N$=wo({id:kr().readonly().meta({description:"Unique identifier for the user",examples:[nd.User.id]}),createdAt:rd().readonly().meta({description:"ISO 8601 timestamp when the user account was created",examples:[nd.User.createdAt]}),updatedAt:rd().readonly().meta({description:"ISO 8601 timestamp when the user account was last updated",examples:[nd.User.updatedAt]}),email:Cr().meta({description:"User's email address, used for authentication and communication",examples:[nd.User.email]}),firstName:kr().min(1).meta({description:"User's first name",examples:[nd.User.firstName]}),lastName:kr().min(1).meta({description:"User's last name",examples:[nd.User.lastName]}),imageUrl:Nr().optional().meta({description:"Optional URL to the user's profile image or avatar",examples:["https://assets.session.services/examples/avatar.jpg"]}),metadata:So(kr(),Vd).optional().meta({description:"Arbitrary key-value metadata for storing user preferences and settings",examples:[{"widgets:team_abc123":{visibleWidgets:["revenue"]}}]})}).meta({ref:"User",description:"User entity containing profile and audit information scoped to a specific tenant",examples:[R$]}),M$=wo({kind:Oo(["PROMOTER","VENUE"]).meta({description:"Resource type that the permission scope applies to."}),resourceId:kr().meta({description:"Promoter or venue identifier for this permission scope."}),permissions:vo(oc).meta({description:"Effective permissions for this resource, including role permissions assigned at the scope."})}).meta({ref:"MePermissionScope",description:"Effective resource-specific permissions for the current user."}),U$=Fw.extend({scopes:vo(M$).optional().meta({description:"Resource-specific permissions. Omitted when the membership has no promoter or venue scopes."})}).meta({ref:"MeTeamMember",description:"Team membership for the current user with role-expanded team permissions and separate resource scopes."}),L$=wo({access:kr().meta({description:"JWT access token with updated user data"}),refresh:kr().meta({description:"Refresh token for obtaining new access tokens"})}).meta({ref:"Tokens",description:"Authentication tokens for client session management"}),j$=wo({user:N$.meta({description:"The updated user profile"}),tokens:L$.optional().meta({description:"New JWT tokens with updated user data. Present when refresh token was provided in request."})}).meta({ref:"UserUpdateResponse",description:"Response payload for PATCH /users/me containing the updated user profile."}),q$=wo({deleted:Po(!0).meta({description:"Whether the current user account was deleted."})}).meta({ref:"UserDeleteResponse",description:"Response payload for DELETE /users/me after deleting the current account."}),G$=wo({user:N$.nullable().meta({description:"Current authenticated user profile, null if not authenticated"}),isAdmin:io().meta({description:"Whether the current user has admin privileges for the tenant"}),members:vo(U$).meta({description:"All team memberships for the current user within this tenant."})}).meta({ref:"MeResponse",description:"Response payload for GET /users/me providing the current user, tenant admin status, and team memberships.",examples:[{user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",createdAt:"2025-09-19T16:07:46.418Z",updatedAt:"2025-09-19T16:07:46.418Z",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},isAdmin:!0,members:[{id:"mbr_01jps5cgsec5ge0b1bxa6gzkkk",createdAt:"2025-09-25T03:25:46.080Z",updatedAt:"2025-09-25T03:25:46.080Z",teamId:"tem_01jqpjksnsen9vprw95et60t2m",userId:"usr_01k5hbpkfje048zccqmqfhjpep",user:{id:"usr_01k5hbpkfje048zccqmqfhjpep",email:"j@1f.io",firstName:"Jay",lastName:"McMullen",imageUrl:"https://assets.session.services/examples/avatar.jpg"},permissions:["*"],isOwner:!0,tenantId:"tnt_01abc123"}]}]}),B$=wo({id:kr().readonly().meta({description:"Unique identifier for the venue"}),createdAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was created"}),updatedAt:rd().readonly().meta({description:"Timestamp in ISO 8601 format when the venue was last updated"}),teamId:kr().meta({description:"Team that manages this venue"}),locationId:Id.meta({examples:["loc_01h2xk3j9k8m2n5p7q9r1s3t4v"],description:"Location identifier for this venue"}),googlePlaceId:kr().optional().meta({examples:["ChIJP3Sa8ziYEmsRUKgyFmh9AQM"],description:"Google Place ID when this venue is linked to a Google Places location"}),approval:sd.meta({examples:["APPROVED"],description:"Approval status of the venue"}),name:kr().min(3).max(100).meta({description:"Display name of the venue. Must be between 3 and 100 characters"}),slug:kr().min(3).meta({description:"URL-friendly slug for the venue. Must be unique within tenant"}),description:kr().optional().meta({description:"Short description of the venue for listings and discovery"}),image:qd.optional().meta({description:"Venue image"}),contact:wo({email:Cr().optional().meta({description:"Public contact email for venue inquiries"}),phone:kr().optional().meta({description:"Public contact phone number"}),website:Nr().optional().meta({description:"Venue website URL"}),instagram:kr().optional().meta({description:"Instagram profile URL"}),facebook:kr().optional().meta({description:"Facebook page URL"}),twitter:kr().optional().meta({description:"Twitter/X profile URL"}),tiktok:kr().optional().meta({description:"TikTok profile URL"}),youtube:kr().optional().meta({description:"YouTube channel URL"})}).optional().meta({description:"Public contact information and social media links"}),location:Ap.omit({venueId:!0}).meta({description:"Physical location details including address, coordinates, and timezone"}),geohash:kr().meta({description:"Geohash encoding of the venue's location for efficient spatial queries"}),capacity:Qr().int().min(1).optional().meta({description:"Maximum capacity of the venue (number of attendees)"}),metadata:zd,deletedAt:rd().readonly().optional().meta({description:"Timestamp in ISO 8601 format when the venue was soft-deleted. Null if not deleted"}),tenantId:kr().readonly().meta({description:"Tenant ID for multi-tenant isolation"})}).meta({description:"Managed venue with custom branding and details. Teams can claim venues which then appear in location search results."}),F$=B$.omit({id:!0,tenantId:!0,createdAt:!0,updatedAt:!0,geohash:!0,deletedAt:!0,location:!0,googlePlaceId:!0,approval:!0}).extend({description:dc.optional().meta({description:"Short description of the venue for listings and discovery"}),slug:kr().min(3).optional().meta({description:"URL-friendly slug for the venue. If not provided, will be automatically generated from the name. Must be unique within tenant"})}).meta({description:"Schema for creating a new venue. The system automatically derives location details and Google Place ID from the locationId"}),V$=wo({key:kr().min(1).meta({description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug",examples:[nd.Venue.id,nd.Venue.slug]})}),z$=wo({key:kr().meta({examples:[nd.Venue.id,nd.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"})}),W$=Oo(["createdAt"]),Y$=Oo(["asc","desc"]),Z$=$o({teamId:kr().max(128).optional().meta({description:"Filter venues by owner team ID"}),approval:sd.optional().meta({description:"Filter venues by approval status. PENDING: awaiting review, APPROVED: can be used for events, REJECTED: cannot be used"}),query:kr().max(120).optional().meta({description:"Optional search query for filtering venues by name or slug"}),latitude:od().min(-90).max(90).optional().meta({description:"Latitude for location-based search. Must be used with longitude"}),longitude:od().min(-180).max(180).optional().meta({description:"Longitude for location-based search. Must be used with latitude"}),radius:od().min(1).max(2e4).optional().meta({description:"Search radius in kilometers (1-20000). Requires latitude and longitude"}),sort:W$.optional().meta({examples:["createdAt"],description:"Optional list sort field. Use `createdAt` to return newest or oldest venues first."}),direction:Y$.optional().meta({examples:["desc"],description:"Sort direction for venue lists. Defaults to `desc` when `sort` is provided."}),limit:Yd("venues"),cursor:kr().max(768).optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing venues with pagination, filtering, and location-based search"}),H$=wc(B$,"venues").meta({description:"Paginated response containing venues with cursor for next page"}),K$=wo({venue:B$}),J$=B$.omit({id:!0,tenantId:!0,teamId:!0,createdAt:!0,updatedAt:!0,deletedAt:!0,geohash:!0}).partial().extend({key:kr().meta({examples:[nd.Venue.id,nd.Venue.slug],description:"Venue key - either a unique ID (ven_xxx format) or URL-friendly slug"}),description:dc.nullable().optional().meta({description:"Short description of the venue. Pass null to clear, omit to leave unchanged."}),image:qd.nullable().optional().meta({description:"Venue image. Pass null to clear, omit to leave unchanged."}),capacity:Qr().int().min(1).nullable().optional().meta({description:"Maximum capacity. Pass null to clear, omit to leave unchanged."}),contact:wo({email:Cr().optional(),phone:kr().optional(),website:Nr().optional(),instagram:kr().optional(),facebook:kr().optional(),twitter:kr().optional(),tiktok:kr().optional(),youtube:kr().optional()}).nullable().optional().meta({description:"Contact information. Pass null to clear all contact fields, omit to leave unchanged."}),googlePlaceId:kr().nullable().optional().meta({description:"Google Place ID. Pass null to unlink from Google Places, omit to leave unchanged."})}).meta({description:"Schema for updating an existing venue. Cannot change teamId (owner). Pass null to clear optional fields."});$o({id:kr(),email:Cr(),firstName:kr(),lastName:kr(),imageUrl:kr().url().optional(),tenantId:kr(),createdAt:kr().datetime(),updatedAt:kr().datetime()});const Q$=Oo(["ORDER","EVENT","TEAM","TEAM_INVITE"]).meta({description:"Aggregate type this notification belongs to"}),X$=Oo(["ORDER_CONFIRMATION","REFUND_CONFIRMATION","TICKET_CANCELLATION","ORDER_REMINDER","ORDER_CANCELLATION","ORDER_TIME_CHANGE","ORDER_VENUE_CHANGE","ORDER_TIME_AND_VENUE_CHANGE","ORDER_LOCATION_REVEAL","EVENT_APPROVAL_REQUEST","EVENT_APPROVAL_DECISION","TEAM_INVITE","ORDER_TICKETS_RESEND","INTERNAL_FEEDBACK"]).meta({description:"Notification kind"}),eI=Oo(["SMS","EMAIL"]).meta({description:"Delivery channel"}),tI=Oo(["PENDING","PROCESSING","SENT","DELIVERED","FAILED","CANCELLED"]).meta({description:"Current notification status"});function iI(e,t={}){return Ua({name:"parse_standard_body",signal:t.signal},(async()=>{let i=e.headers.get("content-disposition");if("string"==typeof i){let t=function(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&"string"==typeof t[2])return function(e){try{return decodeURIComponent(e)}catch{return e}}(t[2]);let i=e.match(/filename="((?:\\"|[^"])*)"/i);return i&&"string"==typeof i[1]?i[1].replace(/\\"/g,'"'):void 0}(i)??"blob",n=await e.blob();return new File([n],t,{type:n.type})}let n=e.headers.get("content-type");if(!n||n.startsWith("application/json"))return Va(await e.text());if(n.startsWith("multipart/form-data"))return await e.formData();if(n.startsWith("application/x-www-form-urlencoded")){let t=await e.text();return new URLSearchParams(t)}if(n.startsWith("text/event-stream"))return function(e,t={}){let i,n=(e?.pipeThrough(new TextDecoderStream).pipeThrough(new ys))?.getReader(),r=!1;return new Ga((async()=>{i??=Na("consume_event_iterator_stream");try{for(;;){if(void 0===n)return{done:!0,value:void 0};let{done:e,value:t}=await La(i,(()=>n.read()));if(e){if(r)throw new Pa("Stream was cancelled");return{done:!0,value:void 0}}switch(t.event??(void 0===t.data?void 0:"message")){case"message":{let e=Va(t.data);return Ya(e)&&(e=Ts(e,t)),i?.addEvent("message"),{done:!1,value:e}}case"error":{let e=new ls({data:Va(t.data)});throw e=Ts(e,t),i?.addEvent("error"),e}case"done":case"close":{let e=Va(t.data);return Ya(e)&&(e=Ts(e,t)),i?.addEvent("done"),{done:!0,value:e}}default:i?.addEvent("maybe_keepalive")}}}catch(e){throw e instanceof ls||Ma(i,e,t),e}}),(async e=>{try{"next"!==e&&(r=!0,i?.addEvent("cancelled")),await La(i,(()=>n?.cancel()))}catch(e){throw Ma(i,e,t),e}finally{i?.end()}}))}(e.body,t);if(n.startsWith("text/plain"))return await e.text();let r=await e.blob();return new File([r],"blob",{type:r.type})}))}function nI(e,t={}){return e.forEach(((e,i)=>{Array.isArray(t[i])?t[i].push(e):t[i]=void 0===t[i]?e:[t[i],e]})),t}function rI(e,t={}){let i=function(e,t=new Headers){for(let[i,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(i,e);else void 0!==n&&t.append(i,n);return t}(e.headers),n=function(e,t,i={}){if(e instanceof ReadableStream)return e;let n=t.get("content-disposition");return t.delete("content-type"),t.delete("content-disposition"),void 0!==e?e instanceof Blob?(t.set("content-type",e.type),t.set("content-length",""+e.size),t.set("content-disposition",n??function(e,t="inline"){return`${t}; filename="${e.replace(/[^\x20-\x7E]/g,"_").replace(/"/g,'\\"')}"; filename*=utf-8''${encodeURIComponent(e).replace(/['()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())).replace(/%(7C|60|5E)/g,((e,t)=>String.fromCharCode(Number.parseInt(t,16))))}`}(e instanceof File?e.name:"blob")),e):e instanceof FormData||e instanceof URLSearchParams?e:ja(e)?(t.set("content-type","text/event-stream"),function(e,t={}){let i,n,r=t.eventIteratorKeepAliveEnabled??!0,o=t.eventIteratorKeepAliveInterval??5e3,a=t.eventIteratorKeepAliveComment??"",s=t.eventIteratorInitialCommentEnabled??!0,d=t.eventIteratorInitialComment??"",c=!1;return new ReadableStream({start(e){n=Na("stream_event_iterator"),s&&e.enqueue(Es({comments:[d]}))},async pull(t){try{r&&(i=setInterval((()=>{t.enqueue(Es({comments:[a]})),n?.addEvent("keepalive")}),o));let s=await La(n,(()=>e.next()));if(clearInterval(i),c)return;let d=As(s.value);if(!s.done||void 0!==s.value||void 0!==d){let e=s.done?"done":"message";t.enqueue(Es({...d,event:e,data:za(s.value)})),n?.addEvent(e)}s.done&&(t.close(),n?.end())}catch(e){if(clearInterval(i),c)return;e instanceof ls?(t.enqueue(Es({...As(e),event:"error",data:za(e.data)})),n?.addEvent("error"),t.close()):(Ma(n,e),t.error(e)),n?.end()}},async cancel(){try{c=!0,clearInterval(i),n?.addEvent("cancelled"),await La(n,(()=>e.return?.()))}catch(e){throw Ma(n,e),e}finally{n?.end()}}}).pipeThrough(new TextEncoderStream)}(e,i)):(t.set("content-type","application/json"),za(e)):void 0}(e.body,i,t);return new Request(e.url,{signal:e.signal,method:e.method,headers:i,body:n})}wo({id:Ud.meta({examples:[nd.Notification.id],description:"Unique notification identifier"}),createdAt:rd().readonly().meta({examples:[nd.Notification.createdAt],description:"Timestamp when notification was created"}),updatedAt:rd().readonly().meta({examples:[nd.Notification.updatedAt],description:"Timestamp when notification was last updated"}),aggregateType:Q$.meta({examples:[nd.Notification.aggregateType]}),aggregateId:Eo([Td,wd,gd,_d]).meta({examples:[nd.Notification.aggregateId],description:"Aggregate identifier for the notification owner"}),eventId:wd.optional().meta({examples:[nd.Notification.eventId],description:"Associated event identifier when applicable"}),kind:X$.meta({examples:[nd.Notification.kind]}),channel:eI.meta({examples:[nd.Notification.channel]}),status:tI.meta({examples:[nd.Notification.status]}),providerMessageId:kr().optional().meta({examples:[nd.Notification.providerMessageId],description:"Provider message identifier"}),sentAt:rd().optional().meta({examples:[nd.Notification.sentAt],description:"Timestamp when provider accepted send request"}),deliveredAt:rd().optional().meta({examples:[nd.Notification.deliveredAt],description:"Timestamp when provider confirmed delivery"}),failedAt:rd().optional().meta({examples:[nd.Notification.failedAt],description:"Timestamp when notification failed"}),failureCode:kr().optional().meta({examples:[nd.Notification.failureCode],description:"Failure code when notification is FAILED"}),failureReason:kr().optional().meta({examples:[nd.Notification.failureReason],description:"Failure reason when notification is FAILED"})}).meta({description:"Notification delivery record"}),wo({id:Pd.meta({description:"Team member ID to delete"})});var oI=class{plugins;constructor(e=[]){this.plugins=[...e].sort(((e,t)=>(e.order??0)-(t.order??0)))}init(e){for(let t of this.plugins)t.init?.(e)}},aI=class{constructor(e,t,i={}){this.codec=e,this.sender=t,new oI(i.plugins).init(i),this.interceptors=Oa(i.interceptors),this.clientInterceptors=Oa(i.clientInterceptors)}interceptors;clientInterceptors;call(e,t,i){return Ua({name:`${Ca}.${e.join("/")}`,signal:i.signal},(n=>(n?.setAttribute("rpc.system",Ca),n?.setAttribute("rpc.method",e.join(".")),ja(t)&&(t=Ba({name:"consume_event_iterator_input",signal:i.signal},t)),Fa(this.interceptors,{...i,path:e,input:t},(async({path:e,input:t,...i})=>{let r,o=Ra(),a=o?.trace.getActiveSpan()??n;a&&o&&(r=o?.trace.setSpan(o.context.active(),a));let s=await Ua({name:"encode_request",context:r},(()=>this.codec.encode(e,t,i))),d=await Fa(this.clientInterceptors,{...i,input:t,path:e,request:s},(({input:e,path:t,request:i,...n})=>Ua({name:"send_request",signal:n.signal,context:r},(()=>this.sender.call(i,n,t,e))))),c=await Ua({name:"decode_response",context:r},(()=>this.codec.decode(d,i,e,t)));return ja(c)?Ba({name:"consume_event_iterator_output",signal:i.signal},c):c})))))}};function sI(e){return"/"+e.map(encodeURIComponent).join("/")}new Set(Object.values({BIGINT:0,DATE:1,NAN:2,UNDEFINED:3,URL:4,REGEXP:5,SET:6,MAP:7}));var dI=class extends oI{initRuntimeAdapter(e){for(let t of this.plugins)t.initRuntimeAdapter?.(e)}},cI=class{fetch;toFetchRequestOptions;adapterInterceptors;constructor(e){new dI(e.plugins).initRuntimeAdapter(e),this.fetch=e.fetch??globalThis.fetch.bind(globalThis),this.toFetchRequestOptions=e,this.adapterInterceptors=Oa(e.adapterInterceptors)}async call(e,t,i,n){let r=rI(e,this.toFetchRequestOptions);return function(e,t={}){return{body:_a((()=>iI(e,t))),status:e.status,get headers(){let t=nI(e.headers);return Object.defineProperty(this,"headers",{value:t,writable:!0}),t},set headers(e){Object.defineProperty(this,"headers",{value:e,writable:!0})}}}(await Fa(this.adapterInterceptors,{...t,request:r,path:i,input:n,init:{redirect:"manual"}},(({request:e,path:t,input:i,init:n,...r})=>this.fetch(e,n,r,t,i))),{signal:r.signal})}},lI=class{maxArrayIndex;constructor(e={}){this.maxArrayIndex=e.maxBracketNotationArrayIndex??9999}serialize(e,t=[],i=[]){if(Array.isArray(e))e.forEach(((e,n)=>{this.serialize(e,[...t,n],i)}));else if(Wa(e))for(let n in e)this.serialize(e[n],[...t,n],i);else i.push([this.stringifyPath(t),e]);return i}deserialize(e){if(0===e.length)return{};let t=new WeakSet,i={value:[]};for(let[n,r]of e){let e=this.parsePath(n),o=i,a="value";e.forEach(((i,n)=>{!Array.isArray(o[a])&&!Wa(o[a])&&(o[a]=[]),n===e.length-1?Array.isArray(o[a])&&(""===i?o[a].length&&!t.has(o[a])&&(o[a]=pI(o[a])):t.has(o[a])?(t.delete(o[a]),o[a]=mI(o[a])):uI(i,this.maxArrayIndex)||(o[a]=pI(o[a]))):Array.isArray(o[a])&&!uI(i,this.maxArrayIndex)&&(t.has(o[a])?(t.delete(o[a]),o[a]=mI(o[a])):o[a]=pI(o[a])),o=o[a],a=i})),Array.isArray(o)&&""===a?(t.add(o),o.push(r)):a in o?Array.isArray(o[a])?o[a].push(r):o[a]=[o[a],r]:o[a]=r}return i.value}stringifyPath(e){return e.map((e=>(""+e).replace(/[\\[\]]/g,(e=>{switch(e){case"\\":return"\\\\";case"[":return"\\[";case"]":return"\\]";default:return e}})))).reduce(((e,t,i)=>0===i?t:`${e}[${t}]`),"")}parsePath(e){let t=[],i=!1,n="",r=0;for(let o=0;o<e.length;o++){let a=e[o],s=e[o+1];!i||"]"!==a||void 0!==s&&"["!==s||r%2!=0?0===t.length&&"["===a&&r%2==0?(i=!0,t.push(n),n=""):"\\"===a?r++:(n+="\\".repeat(r/2)+a,r=0):(void 0===s&&(i=!1),t.push(n),n="",o++)}return i||0===t.length?[e]:t}};function uI(e,t){return/^0$|^[1-9]\d*$/.test(e)&&Number(e)<=t}function pI(e){let t=new Ha;return e.forEach(((e,i)=>{t[i]=e})),t}function mI(e){let t=new Ha;return t[""]=1===e.length?e[0]:e,t}var hI=class{customSerializers;constructor(e={}){this.customSerializers=e.customJsonSerializers??[]}serialize(e,t={value:!1}){for(let i of this.customSerializers)if(i.condition(e))return this.serialize(i.serialize(e),t);if(e instanceof Blob)return t.value=!0,[e,t.value];if(e instanceof Set)return this.serialize(Array.from(e),t);if(e instanceof Map)return this.serialize(Array.from(e.entries()),t);if(Array.isArray(e))return[e.map((e=>void 0===e?null:this.serialize(e,t)[0])),t.value];if(Wa(e)){let i={};for(let n in e)"toJSON"===n&&"function"==typeof e[n]||(i[n]=this.serialize(e[n],t)[0]);return[i,t.value]}return"bigint"==typeof e||e instanceof RegExp||e instanceof URL?[""+e,t.value]:e instanceof Date?[Number.isNaN(e.getTime())?null:e.toISOString(),t.value]:Number.isNaN(e)?[null,t.value]:[e,t.value]}};function fI(e,t){return Wa(e)&&void 0===e.status&&"string"==typeof e.code?{...e,status:ts(e.code,t)}:e}function yI(e){return"/"+e.replace(/\/{2,}/g,"/").replace(/^\/|\/$/g,"")}function gI(e){return e?yI(e).match(/\/\{[^}]+\}/g)?.map((e=>({raw:e,name:e.match(/\{\+?([^}]+)\}/)[1]}))):void 0}var vI=class{constructor(e,t,i){this.contract=e,this.serializer=t,this.baseUrl=i.url,this.headers=i.headers??{},this.customErrorResponseBodyDecoder=i.customErrorResponseBodyDecoder}baseUrl;headers;customErrorResponseBodyDecoder;async encode(e,t,i){let n=function(e){return"function"==typeof e.forEach?nI(e):e}(await Ka(this.headers,i,e,t));void 0!==i.lastEventId&&(n=xs(n,{"last-event-id":i.lastEventId}));let r=await Ka(this.baseUrl,i,e,t),o=Za(this.contract,e);if(!Ps(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+e.join("."));return"compact"===Gs("defaultInputStructure",o["~orpc"].route.inputStructure)?this.#e(o,e,t,i,r,n):this.#t(o,e,t,i,r,n)}#e(e,t,i,n,r,o){let a=yI(e["~orpc"].route.path??sI(t)),s=i,d=gI(a);if(d?.length){if(!Wa(i))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "compact" structure when has dynamic params at ${t.join(".")}.`);let e={...i};for(let t of d)a=a.replace(t.raw,"/"+encodeURIComponent(""+this.serializer.serialize(i[t.name]))),delete e[t.name];s=Object.keys(e).length?e:void 0}let c=Gs("defaultMethod",e["~orpc"].route.method),l=new URL(r);if(l.pathname=`${l.pathname.replace(/\/$/,"")}${a}`,"GET"===c){let e=this.serializer.serialize(s,{outputFormat:"URLSearchParams"});for(let[t,i]of e)l.searchParams.append(t,i);return{url:l,method:c,headers:o,body:void 0,signal:n.signal}}return{url:l,method:c,headers:o,body:this.serializer.serialize(s),signal:n.signal}}#t(e,t,i,n,r,o){let a=yI(e["~orpc"].route.path??sI(t)),s=gI(a);if(!Wa(i)&&void 0!==i)throw TypeError(`[StandardOpenapiLinkCodec] Invalid input shape for "detailed" structure at ${t.join(".")}.`);if(s?.length){if(!Wa(i?.params))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.params shape for "detailed" structure when has dynamic params at ${t.join(".")}.`);for(let e of s)a=a.replace(e.raw,"/"+encodeURIComponent(""+this.serializer.serialize(i.params[e.name])))}let d=o;if(void 0!==i?.headers){if(!Wa(i.headers))throw TypeError(`[StandardOpenapiLinkCodec] Invalid input.headers shape for "detailed" structure at ${t.join(".")}.`);d=xs(i.headers,o)}let c=Gs("defaultMethod",e["~orpc"].route.method),l=new URL(r);if(l.pathname=`${l.pathname.replace(/\/$/,"")}${a}`,void 0!==i?.query){let e=this.serializer.serialize(i.query,{outputFormat:"URLSearchParams"});for(let[t,i]of e)l.searchParams.append(t,i)}return"GET"===c?{url:l,method:c,headers:d,body:void 0,signal:n.signal}:{url:l,method:c,headers:d,body:this.serializer.serialize(i?.body),signal:n.signal}}async decode(e,t,i){let n=!os(e.status),r=await(async()=>{let t=!1;try{let i=await e.body();return t=!0,this.serializer.deserialize(i)}catch(e){throw Error(t?"Invalid OpenAPI response format.":"Cannot parse response body, please check the response body and content-type.",{cause:e})}})();if(!n){let t=this.customErrorResponseBodyDecoder?.(r,e);if(null!=t)throw t;let i=fI(r,e.status);throw as(i)?ss(i):new ns(function(e){return Object.entries(es).find((([,t])=>t.status===e))?.[0]??"MALFORMED_ORPC_ERROR_RESPONSE"}(e.status),{status:e.status,data:{...e,body:r}})}let o=Za(this.contract,i);if(!Ps(o))throw Error("[StandardOpenapiLinkCodec] expect a contract procedure at "+i.join("."));return"compact"===Gs("defaultOutputStructure",o["~orpc"].route.outputStructure)?r:{status:e.status,headers:e.headers,body:r}}},bI=class{constructor(e,t){this.jsonSerializer=e,this.bracketNotation=t}serialize(e,t={}){return ja(e)&&!t.outputFormat?Ss(e,{value:async e=>this.#e(e,{outputFormat:"plain"}),error:async e=>new ls({data:this.#e(rs(e).toJSON(),{outputFormat:"plain"}),cause:e})}):this.#e(e,t)}#e(e,t){let[i,n]=this.jsonSerializer.serialize(e);if("plain"===t.outputFormat)return i;if("URLSearchParams"===t.outputFormat){let e=new URLSearchParams;for(let[t,n]of this.bracketNotation.serialize(i))("string"==typeof n||"number"==typeof n||"boolean"==typeof n)&&e.append(t,""+n);return e}if(i instanceof Blob||void 0===i||!n)return i;let r=new FormData;for(let[e,t]of this.bracketNotation.serialize(i))"string"==typeof t||"number"==typeof t||"boolean"==typeof t?r.append(e,""+t):t instanceof Blob&&r.append(e,t);return r}deserialize(e){return e instanceof URLSearchParams||e instanceof FormData?this.bracketNotation.deserialize(Array.from(e.entries())):ja(e)?Ss(e,{value:async e=>e,error:async e=>{if(e instanceof ls){let t=fI(e.data);if(as(t))return ss(t,{cause:e})}return e}}):e}},wI=class extends aI{constructor(e,t,i){super(new vI(e,new bI(new hI(i),new lI({maxBracketNotationArrayIndex:4294967294})),i),t,i)}},$I=class extends wI{constructor(e,t){super(e,new cI(t),t)}};const II=js.route({method:"GET",path:"/events/{eventId}/admissions/{id}",summary:"Get admission by ID",tags:["Admissions"]}).input(vc.strict()).output(Ac),EI=js.route({method:"POST",path:"/events/{eventId}/admissions",summary:"Create a new admission",tags:["Admissions"]}).input(yc.strict()).output(Ac),kI=js.route({method:"PUT",path:"/events/{eventId}/admissions/{id}",summary:"Update an admission",tags:["Admissions"]}).input(xc.strict()).output(Ac);var TI={get:II,list:js.route({method:"GET",path:"/events/{eventId}/admissions",summary:"List admissions",description:"Returns admissions with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Admissions"]}).input(bc.strict()).output($c),create:EI,update:kI,remove:js.route({method:"DELETE",path:"/events/{eventId}/admissions/{id}",summary:"Delete an admission",tags:["Admissions"]}).input(gc.strict()).output(Ac),quote:js.route({method:"POST",path:"/events/{eventId}/admissions/quote",summary:"Create an admission quote",tags:["Admissions"]}).input(kc.strict()).output(Tc)};const AI={BAD_REQUEST:{status:400,data:wo({unresolvedRequired:vo(kr()),unresolvedOptional:vo(kr()).optional(),issues:vo(kr()).optional()}).optional()}};var xI={track:js.route({method:"POST",path:"/analytics/track",summary:"Track event",tags:["Analytics"]}).input(Nu).errors(AI).output(Pu),page:js.route({method:"POST",path:"/analytics/page",summary:"Page event",tags:["Analytics"]}).input(Nu).errors(AI).output(Pu),identify:js.route({method:"POST",path:"/analytics/identify",summary:"Identify event",tags:["Analytics"]}).input(Nu).errors(AI).output(Pu),alias:js.route({method:"POST",path:"/analytics/alias",summary:"Alias event",tags:["Analytics"]}).input(Nu).errors(AI).output(Pu),group:js.route({method:"POST",path:"/analytics/group",summary:"Group event",tags:["Analytics"]}).input(Nu).errors(AI).output(Pu),screen:js.route({method:"POST",path:"/analytics/screen",summary:"Screen event",tags:["Analytics"]}).input(Nu).errors(AI).output(Pu)};const SI=wo({expected:kr(),actual:kr()}),DI=wo({currency:ld.meta({description:"Currency already assigned to another payout account"})}).meta({description:"Details about a conflicting beneficiary payout account"}),OI=js.route({method:"GET",path:"/beneficiaries/{id}",summary:"Get beneficiary by ID",tags:["Beneficiaries"]}).input(Fu.strict()).output(Yu),CI=js.route({method:"POST",path:"/beneficiaries",summary:"Create a new beneficiary",tags:["Beneficiaries"]}).input(Bu.strict()).errors({BAD_REQUEST:{status:400,data:SI.optional()},CONFLICT:{status:409,data:DI}}).output(Yu);var PI={get:OI,list:js.route({method:"GET",path:"/beneficiaries",summary:"List beneficiaries with cursor-based pagination",description:"Returns beneficiary data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Beneficiaries"]}).input(zu.strict()).output(Wu),create:CI,remove:js.route({method:"DELETE",path:"/beneficiaries/{id}",summary:"Delete a beneficiary",tags:["Beneficiaries"]}).input(Vu.strict()).output(Yu),schema:ip,validate:ap};const _I=Eo([wo({field:Po("code"),reason:Po("taken"),value:kr()}),wo({code:kr()})]),RI=js.route({method:"GET",path:"/coupon-codes/{id}",summary:"Get coupon code by ID",tags:["Coupon Codes"]}).input(up.strict()).output(gp),NI=js.route({method:"POST",path:"/coupon-codes",summary:"Create a new coupon code",tags:["Coupon Codes"]}).input(pp.strict()).errors({CONFLICT:{status:409,data:_I.optional()}}).output(gp),MI=js.route({method:"PUT",path:"/coupon-codes/{id}",summary:"Update a coupon code",tags:["Coupon Codes"]}).input(mp.strict()).output(gp);var UI={get:RI,list:js.route({method:"GET",path:"/coupon-codes",summary:"List coupon codes with cursor-based pagination",description:"Returns coupon code data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupon Codes"]}).input(fp.strict()).output(yp),create:NI,update:MI,remove:js.route({method:"DELETE",path:"/coupon-codes/{id}",summary:"Delete a coupon code",tags:["Coupon Codes"]}).input(hp.strict()).output(gp)};const LI=wo({committedAndHeldUses:Qr(),requestedLimit:Qr()}),jI=js.route({method:"GET",path:"/coupons/{id}",summary:"Get coupon by ID",tags:["Coupons"]}).input(bp.strict()).output(Ep),qI=js.route({method:"POST",path:"/coupons",summary:"Create a new coupon",tags:["Coupons"]}).input(vp).output(Ep),GI=js.route({method:"PUT",path:"/coupons/{id}",summary:"Update a coupon",tags:["Coupons"]}).input(kp).errors({BAD_REQUEST:{status:400,data:LI.optional()}}).output(Ep);var BI={get:jI,list:js.route({method:"GET",path:"/coupons",summary:"List coupons with cursor-based pagination",description:"Returns coupon data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Coupons"]}).input($p.strict()).output(Ip),create:qI,update:GI,remove:js.route({method:"DELETE",path:"/coupons/{id}",summary:"Delete a coupon",tags:["Coupons"]}).input(wp.strict()).output(Ep),code:UI};const FI=wo({eventId:wd.optional().meta({description:"Event ID for rate limiting and change detection. If provided, suggestions are limited to once per day per event and only if the description changed significantly.",examples:[nd.Event.id]}),description:kr().min(100).max(1e4).meta({description:"Event description to analyze for genre and category suggestions. Minimum 100 characters required for meaningful AI analysis.",examples:["Join us for an all-night warehouse party featuring the best in tech house and melodic techno. BYO drinks, intimate vibes, and a killer sound system."]}),eventName:kr().optional().meta({description:"Optional event name for additional context",examples:["Warehouse Sessions Vol. 5"]}),imageUrl:Nr().optional().meta({description:"Optional event artwork URL for visual analysis (multimodal)",examples:["https://assets.session.services/events/poster.jpg"]})}).meta({description:"Input for AI-powered event tag suggestions"}),VI=wo({genres:vo(hd).max(5).meta({description:"Suggested music genres based on event description and artwork",examples:[["Tech House","Melodic Techno"]]}),categories:vo(pd).max(10).meta({description:"Suggested event categories based on description and artwork",examples:[["Warehouse","Underground","BYO"]]}),confidence:Qr().min(0).max(1).meta({description:"AI confidence score for the suggestions (0-1)",examples:[.85]}),startDate:kr().optional().meta({description:"Event start date/time. Either ISO 8601 format (if specific date found) or natural language hint for relative dates (e.g., 'next Saturday 9pm').",examples:["2025-02-15T21:00:00","next Saturday 9pm"]}),endDate:kr().optional().meta({description:"Event end date/time. Either ISO 8601 format (if specific date found) or natural language hint.",examples:["2025-02-16T04:00:00","6am Sunday"]}),venueName:kr().optional().meta({description:"Venue or location name extracted from the description or artwork. Used to search for and prefill the event location.",examples:["Warehouse 21","The Metro Theatre"]}),ticketUrl:Nr().optional().meta({description:"External ticket purchase URL if found in the description. Only extracted if different from the host platform.",examples:["https://www.eventbrite.com/e/warehouse-sessions-tickets-123"]})}).meta({description:"AI-generated genre and category suggestions for an event"});wo({estimatedInputTokens:Qr().int().meta({description:"Estimated input tokens for the request",examples:[500]}),estimatedOutputTokens:Qr().int().meta({description:"Estimated output tokens for the response",examples:[100]}),estimatedCostUsd:Qr().meta({description:"Estimated cost in USD",examples:[.002]}),includesImage:io().meta({description:"Whether the estimate includes image analysis",examples:[!0]})}).meta({description:"Cost estimate for an AI tag suggestion request"});var zI={suggestTags:js.route({method:"POST",path:"/events/tags",summary:"Suggest event genres and categories",description:"Uses AI to analyze event description and optional artwork to suggest relevant music genres and event categories. Returns up to 5 genres and 10 categories with a confidence score.",tags:["Events"]}).input(FI.strict()).output(VI)};const WI=wo({eventId:wd.meta({description:"Event to like"})}).meta({description:"Request to like an event"}),YI=wo({limit:Yd("likes"),cursor:kr().optional().meta({description:"Pagination cursor from previous response. Used to fetch next page of results"})}).meta({description:"Query parameters for listing the current user's liked events with pagination. Returns events sorted by most recently liked first."}),ZI=wo({tenantId:kr().readonly().meta({description:"Tenant ID for multi-tenant isolation"}),userId:Ed.readonly().meta({description:"User who liked the event"}),eventId:wd.meta({description:"Event the user liked"}),createdAt:rd().readonly().meta({description:"Timestamp when the user liked the event"})}).meta({description:"Represents a user's like on an event. Used for tracking popular events and building personalized recommendations."}),HI=wc(ZI,"likes").meta({description:"Paginated list of event likes. Use cursor-based pagination to navigate through results."}),KI=wo({eventId:wd.meta({description:"Event to remove like from"})}).meta({description:"Request to remove the current user's like from an event"}),JI=wo({like:ZI});var QI={add:js.route({method:"POST",path:"/events/{eventId}/like",summary:"Like an event",description:"Like an event as the current user. Atomically increments the event's likes counter.",tags:["Events"]}).input(WI).output(JI),remove:js.route({method:"DELETE",path:"/events/{eventId}/like",summary:"Remove like from an event",description:"Remove the current user's like from an event. Atomically decrements the event's likes counter.",tags:["Events"]}).input(KI).output(ho()),list:js.route({method:"GET",path:"/events/likes",summary:"List liked events",description:"List all events the current user has liked, with cursor-based pagination.",tags:["Events"]}).input(YI).output(HI)};const XI=yl.extend({limit:od().min(1).max(100).optional().default(10)}),eE=hl.extend({limit:od().min(1).max(100).optional().default(10)}),tE=Il.extend({limit:od().min(1).max(100).optional().default(10)}),iE=vl.extend({limit:od().min(1).max(100).optional().default(10)}),nE=wl.extend({limit:od().min(1).max(100).optional().default(10)}),rE=kl.extend({limit:od().min(1).max(100).optional().default(10)}),oE=Al.extend({limit:od().min(1).max(100).optional().default(10)}),aE=_l.extend({limit:od().min(1).max(50).optional().default(10)}),sE=Nl.extend({includeAdmission:ad().optional().default(!0),includeSection:ad().optional().default(!0)}),dE=ql.extend({}),cE=js.route({method:"GET",path:"/events/{eventId}/performance/summary",summary:"Get event performance summary",description:"Top-level KPI metrics with period comparison based on tracking events",tags:["Event Performance"]}).input(el).output(tl),lE=js.route({method:"GET",path:"/events/{eventId}/performance/tickets",summary:"Get ticket sales performance",description:"Time series of sold tickets and successful-order revenue by period, with admission and section breakdowns",tags:["Event Performance"]}).input(il).output(nl),uE=js.route({method:"GET",path:"/events/{eventId}/performance/timeseries",summary:"Get event metric time series",description:"Per-bucket series of revenue, tickets, orders, page views, visitors, and conversion rate for the selected range",tags:["Event Performance"]}).input(ol).output(al),pE=js.route({method:"GET",path:"/events/{eventId}/performance/funnel",summary:"Get sales funnel performance",description:"Conversion funnel showing drop-off at each stage from tracking events",tags:["Event Performance"]}).input(sl).output(dl),mE=js.route({method:"GET",path:"/events/{eventId}/performance/campaigns",summary:"Get campaign performance",description:"Marketing campaign metrics from tracking events (UTM campaign parameter)",tags:["Event Performance"]}).input(XI).output(gl),hE=js.route({method:"GET",path:"/events/{eventId}/performance/coupons",summary:"Get coupon performance",description:"Coupon usage and revenue from actual order data",tags:["Event Performance"]}).input(eE).output(fl),fE=js.route({method:"GET",path:"/events/{eventId}/performance/mediums",summary:"Get traffic medium performance",description:"Performance by traffic medium (social, email, cpc) from tracking events",tags:["Event Performance"]}).input(iE).output(bl),yE=js.route({method:"GET",path:"/events/{eventId}/performance/devices",summary:"Get device performance",description:"Performance breakdown by device type from tracking events",tags:["Event Performance"]}).input(nE).output($l),gE=js.route({method:"GET",path:"/events/{eventId}/performance/browsers",summary:"Get browser performance",description:"Traffic breakdown by browser from tracking events",tags:["Event Performance"]}).input(tE).output(El),vE=js.route({method:"GET",path:"/events/{eventId}/performance/locations",summary:"Get geographic performance",description:"Performance by geographic location from tracking events",tags:["Event Performance"]}).input(rE).output(Tl),bE=js.route({method:"GET",path:"/events/{eventId}/performance/traffic",summary:"Get traffic source performance",description:"Top referral sources and channels from tracking events",tags:["Event Performance"]}).input(oE).output(xl),wE=js.route({method:"GET",path:"/events/{eventId}/performance/attendance",summary:"Get event attendance statistics",description:"Check-in statistics and attendance breakdown by admission and section",tags:["Event Performance"]}).input(Sl).output(Pl),$E=js.route({method:"GET",path:"/events/{eventId}/performance/scanners",summary:"Get door staff scanner activity",description:"Ranked check-in activity by scanner for post-event door staff analytics",tags:["Event Performance"]}).input(aE).output(Rl),IE=js.route({method:"GET",path:"/events/{eventId}/performance/turnout",summary:"Get event turnout analysis",description:"Post-event sold versus checked-in tickets by admission and section",tags:["Event Performance"]}).input(sE).output(jl),EE=js.route({method:"GET",path:"/events/{eventId}/performance/pace",summary:"Get event check-in pace",description:"Post-event check-in flow over the admission entry window with peak door volume",tags:["Event Performance"]}).input(dE).output(Gl);var kE={couponAttendance:js.route({method:"GET",path:"/events/{eventId}/performance/coupon-attendance",summary:"Get check-in attendance by coupon code",tags:["Event Performance"]}).input(Sc).output(Oc),summary:cE,tickets:lE,timeseries:uE,funnel:pE,campaigns:mE,coupons:hE,mediums:fE,devices:yE,browsers:gE,locations:vE,traffic:bE,attendance:wE,scanners:$E,turnout:IE,pace:EE};const TE=js.route({method:"GET",path:"/events/slugs",summary:"List event slugs",description:"List current event slugs with the same filters and access rules as event lists. Supports skip/limit pagination for sitemap generation.",tags:["Events"]}).input(Em).output(km),AE=js.route({method:"GET",path:"/events/{key}",summary:"Get event by ID or slug",description:"Retrieve an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(hm).output(Gp),xE=js.route({method:"POST",path:"/events",summary:"Create a new event",tags:["Events"]}).input(lm.strict()).output(Im),SE=js.route({method:"POST",path:"/events/{key}/duplicate",summary:"Duplicate an event",description:"Create a new event by copying event details, sections, and admissions from an existing event.",tags:["Events"]}).input(pm.strict()).output(Im),DE=js.route({method:"PUT",path:"/events/{key}",summary:"Update an event",description:"Update an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(Am.strict()).output(Im),OE={get:js.route({method:"GET",path:"/events/{key}/approval",summary:"Get event approval status",description:"Get internal event approval status and reviewer feedback. Requires event.read permission on the event owner team.",tags:["Events"]}).input(Fp.strict()).output(zp),request:js.route({method:"POST",path:"/events/{key}/approval/request",summary:"Request event approval",description:"Request or resubmit event approval. Requires event.write permission on the event owner team.",tags:["Events"]}).input(Wp.strict()).output(Im),update:js.route({method:"PUT",path:"/events/{key}/approval",summary:"Approve or reject an event",description:"Approve or reject an event. Requires event.write permission on the tenant admin team.",tags:["Events"]}).input(Yp.strict()).output(Im)};var CE={slugs:TE,get:AE,list:js.route({method:"GET",path:"/events",summary:"List events",description:"List events with filters for status, approval, visibility, and promoter. Supports full‑text search (query), geo search (latitude/longitude/radius), and cursor-based pagination.",tags:["Events"]}).input(bm).output($m),create:xE,duplicate:SE,update:DE,approval:OE,remove:js.route({method:"DELETE",path:"/events/{key}",summary:"Delete an event",description:"Delete an event using either its unique ID or URL-friendly slug",tags:["Events"]}).input(um.strict()).output(Im),feature:js.route({method:"POST",path:"/events/{key}/feature",summary:"Toggle event featured status",description:"Set or remove featured status on an event. Tenant admin only.",tags:["Events"]}).input(mm.strict()).output(Im),like:QI,performance:kE,tags:zI.suggestTags},PE={get:js.route({method:"GET",path:"/events/{eventId}/collaborators/{id}",summary:"Get event collaborator by ID",description:"Retrieve an active event collaboration by its unique ID. Returns the collaborator record with promoter and permission details.",tags:["Event Collaborators"]}).input(Cm.strict()).output(Nm),list:js.route({method:"GET",path:"/events/{eventId}/collaborators",summary:"List active event collaborators with cursor-based pagination",description:"Returns active event collaborations for a specific event with cursor pagination. Only shows accepted collaborators. For pending invitations, use the invite endpoints.",tags:["Event Collaborators"]}).input(_m.strict()).output(Rm),create:js.route({method:"POST",path:"/events/{eventId}/collaborators",summary:"Invite a promoter to collaborate on an event",description:"Send a collaboration invitation to a promoter (can be from a different team). Enables cross-team promoter-to-promoter collaboration. Creates a pending invitation with a secure token that expires in 7 days. The invited promoter must accept to create an active collaboration.",tags:["Event Collaborators"]}).input(Om.strict()).output(Pm),accept:js.route({method:"POST",path:"/events/{eventId}/collaborators/{id}/accept",summary:"Accept an event collaboration invitation",description:"Accept a pending event collaboration invitation. User must be a member of the invited promoter's team. Deletes the invitation and creates an active collaboration record.",tags:["Event Collaborators"]}).input(Sm.strict()).output(Nm),remove:js.route({method:"DELETE",path:"/events/{eventId}/collaborators/{id}",summary:"Remove active event collaboration",description:"Remove an active collaboration (hard delete). Can be done by event team members or the collaborating team members. This completely removes access.",tags:["Event Collaborators"]}).input(Cm.strict()).output(ho())},_E={list:js.route({method:"GET",path:"/integrations",tags:["Integrations"],summary:"List team integrations"}).input(jm).output(qm),get:js.route({method:"GET",path:"/integrations/{id}",tags:["Integrations"],summary:"Get an integration"}).input(Gm).output(Lm),create:js.route({method:"POST",path:"/integrations",tags:["Integrations"],summary:"Connect a team integration"}).input(Bm).output(Lm).errors({BAD_GATEWAY:{status:502}}),update:js.route({method:"PATCH",path:"/integrations/{id}",tags:["Integrations"],summary:"Update the shared integration settings"}).input(Fm).output(Lm).errors({BAD_GATEWAY:{status:502}}),remove:js.route({method:"DELETE",path:"/integrations/{id}",tags:["Integrations"],summary:"Disconnect an integration"}).input(Vm).output(Lm),backfills:js.route({method:"GET",path:"/integrations/{id}/backfills",tags:["Integrations"],summary:"Get recent import progress"}).input(Gm).output(vo(zm)),requestBackfill:js.route({method:"POST",path:"/integrations/{id}/backfills",tags:["Integrations"],summary:"Request a historical import"}).input(Wm).output(zm),retryBackfill:js.route({method:"POST",path:"/integrations/{id}/backfills/{jobId}/retry",tags:["Integrations"],summary:"Retry an interrupted import"}).input(Ym).output(zm)};const RE=wo({language:kr().trim().max(80).optional(),platform:kr().trim().max(120).optional(),timezone:kr().trim().max(120).optional(),userAgent:kr().trim().max(800).optional(),viewport:wo({width:Qr().int().positive().max(1e4),height:Qr().int().positive().max(1e4),devicePixelRatio:Qr().positive().max(10).optional()}).optional()}),NE=wo({key:kr().trim().min(1),message:kr().trim().min(10).max(4e3),pageUrl:Nr().max(2e3),pageTitle:kr().trim().max(300).optional(),browser:RE.optional()}),ME=wo({ok:Po(!0)}),UE=wo({file:new so({type:"any"}).describe("Image file to upload (max 10MB)"),folder:Oo(["avatars","events","teams","promoters","venues"]).describe("Folder to upload to"),width:od().int().positive().optional().describe("Target width in pixels"),height:od().int().positive().optional().describe("Target height in pixels")}),LE=qd,jE=js.route({method:"POST",path:"/internal/upload/image",summary:"Upload and compress image",description:"Upload an image file (PNG, JPEG, or SVG), optionally resize it, and compress it for web. SVG files are rasterized before publication. Returns the uploaded image URL and metadata.",tags:["Internal"]}).input(UE.strict()).output(LE);var qE={shareFeedback:js.route({method:"POST",path:"/internal/feedback",summary:"Share product feedback",description:"Send authenticated tenant dashboard feedback to the Sessions team.",tags:["Internal"]}).input(NE.strict()).output(ME),uploadImage:jE},GE={list:js.route({method:"GET",path:"/locations",summary:"Search for locations",description:"Search for locations by query. Returns predictions with venue badges for locations that are managed venues on the platform. The query parameter is required.",tags:["Locations"]}).input(Hm.strict()).output(Jm).errors({BAD_GATEWAY:{status:502}}),get:js.route({method:"GET",path:"/locations/{key}",summary:"Get location details",description:"Fetch full location details including coordinates, timezone, and photo. Accepts location ID or provider identifier (e.g., Google Place ID). Uses cache-first strategy.",tags:["Locations"]}).input(Zm.strict()).output(Qm).errors({BAD_GATEWAY:{status:502}})};const BE=js.route({method:"POST",path:"/membership/programs/current",summary:"Get a team's current membership program",description:"Returns the one non-retired membership program for a team. Responds NOT_FOUND when the team sells no membership.",tags:["Membership"]}).input(dh).output(ch),FE=js.route({method:"POST",path:"/account/membership/payment-session",summary:"Prepare the payment form for the current buyer",description:"Ensures the signed-in buyer exists as a customer on the team's connected account and returns a customer session so the payment form can show their saved cards.",tags:["Membership"]}).input(ah).errors({CONFLICT:{status:409,data:hh.optional()}}).output(sh),VE=js.route({method:"POST",path:"/account/membership/purchases",summary:"Start a membership purchase for the current buyer",description:"Creates the provider subscription for the signed-in buyer and returns what the browser needs to collect the first annual payment. A pending attempt for the same program is reused.",tags:["Membership"]}).input(lh).errors({CONFLICT:{status:409,data:hh.optional()}}).output(uh),zE=js.route({method:"POST",path:"/account/membership/purchases/{id}/detail",summary:"Get one of the current buyer's membership purchases",description:"Returns the purchase and, once payment is confirmed, the membership pass with its member number.",tags:["Membership"]}).input(ph).output(mh),WE=js.route({method:"POST",path:"/account/membership/passes/query",summary:"List the current buyer's membership passes",tags:["Membership"]}).input(fh).output(yh),YE=js.route({method:"POST",path:"/membership/members/query",summary:"List a team's members in member number order",description:"Staff view of the passes in the team's current membership program. Requires membership.read.",tags:["Membership"]}).input(xh).output(Sh),ZE=js.route({method:"POST",path:"/membership/members",summary:"Grant a free membership",description:"Staff give a member a complimentary membership on the keyring they hand over. The keyring's serial becomes the member number. Requires membership.write.",tags:["Membership"]}).input(vh).errors({CONFLICT:{status:409,data:Ah},NOT_FOUND:{status:404,data:Ah.optional()}}).output(gh),HE=js.route({method:"POST",path:"/membership/members/number",summary:"Check a keyring number",description:"Whether a keyring's number can be given to someone, before their details are entered. Requires membership.write.",tags:["Membership"]}).input(bh).output(wh),KE=js.route({method:"POST",path:"/membership/door/redeem",summary:"Use a member's discount at the door",description:"Door staff scan a member's keyring when they pay cash. The member's one discount for the event is used, shared with online use, and nothing is sold. Requires ticket.scan for the event.",tags:["Membership"]}).input($h).output(Eh),JE=js.route({method:"POST",path:"/membership/door/undo",summary:"Undo a door discount just given",description:"Gives back a door use the same staff member made in the last few minutes, such as a keyring scanned by mistake. Requires ticket.scan for the event.",tags:["Membership"]}).input(kh).errors({CONFLICT:{status:409}}).output(wo({undone:Po(!0)}));var QE={program:BE,paymentSession:FE,startPurchase:VE,getPurchase:zE,myPasses:WE,members:YE,grant:ZE,checkNumber:HE,end:js.route({method:"POST",path:"/membership/members/{passId}/end",summary:"End a free membership",description:"Ends a complimentary membership now. The member keeps their number. Paid memberships end through a refund or cancellation instead. Requires membership.write.",tags:["Membership"]}).input(Th).errors({CONFLICT:{status:409,data:Ah}}).output(gh),redeemAtDoor:KE,undoDoorRedemption:JE};const XE=$o({clientId:kr().min(1).meta({description:"Immutable OAuth client identifier."}),teamId:gd,tenantId:kr().min(1).meta({description:"Tenant this application belongs to."}),name:kr().trim().min(1).max(100).meta({description:"Operator-facing name for this website."}),redirectUris:vo(Nr().max(2048)).min(1).max(10).meta({description:"Exact HTTPS callback URLs. HTTP is allowed only for non-production loopback."}),enabled:io().meta({description:"Disabled applications stop authenticating immediately."}),revision:Qr().int().positive().meta({description:"Optimistic concurrency token. Send the value you read."}),credentials:vo($o({id:kr().meta({description:"Opaque credential identifier. It reveals nothing about the secret."}),expiresAt:Qr().int().nonnegative().optional().meta({description:"Credential expiry as Unix milliseconds. Omitted for credentials that do not expire."})}))}).meta({description:"A Team-owned website login application. Credential secrets are never included."}),ek=$o({teamId:gd}).meta({description:"Lists the website applications a Team owns."}),tk=XE.pick({teamId:!0,name:!0,redirectUris:!0}).extend({requestId:cn(_r,void 0).meta({description:"Caller-generated idempotency key. Reusing it returns a conflict rather than a second application."})}).meta({description:"Registration request for a new Team website."}),ik=XE.pick({teamId:!0,clientId:!0,revision:!0}).meta({description:"Reference to one Team website application at a known revision. A stale revision is rejected."}),nk=ik.extend({name:XE.shape.name,redirectUris:XE.shape.redirectUris,enabled:io()}).meta({description:"Full replacement of a Team website's settings."}),rk=ik.extend({credentialId:kr().min(1).meta({description:"Credential to revoke. Revoking a credential that is already gone succeeds unchanged."})}).meta({description:"Revocation request for one website credential."}),ok=$o({application:XE,clientSecret:kr().meta({description:"New credential. Display once and store only on the website server."})}).meta({description:"One-time credential issuance response. Must not be logged or cached."}),ak=js.errors({CONFLICT:{status:409},SERVICE_UNAVAILABLE:{status:503}}),sk={create:ak.route({method:"POST",path:"/oauth-applications/{clientId}/credentials",tags:["OAuth applications"],summary:"Issue a replacement credential",description:"Issues a second credential so the website can roll over without downtime. Revoke the old one once it is out of use."}).input(ik).output(ok),delete:ak.route({method:"DELETE",path:"/oauth-applications/{clientId}/credentials/{credentialId}",tags:["OAuth applications"],summary:"Revoke a website credential",description:"Revokes one credential. Revoking a credential that is already gone succeeds without changing the application, and the last credential of an enabled application cannot be revoked."}).input(rk).output(XE)};var dk={list:ak.route({method:"GET",path:"/oauth-applications",tags:["OAuth applications"],summary:"List Team website clients",description:"Lists the website applications a Team owns. Credential secrets are never returned."}).input(ek).output(vo(XE)),create:ak.route({method:"POST",path:"/oauth-applications",tags:["OAuth applications"],summary:"Register a Team website",description:"Registers a website login client for a Team and returns its first credential once."}).input(tk).output(ok),update:ak.route({method:"PATCH",path:"/oauth-applications/{clientId}",tags:["OAuth applications"],summary:"Update a Team website",description:"Replaces a website's name, callbacks and enabled state at a known revision."}).input(nk).output(XE),credentials:sk},ck={create:js.route({method:"POST",path:"/account/orders",summary:"Create an order for the current buyer",description:"Creates an order owned by the signed-in buyer. The order is attributed to the verified website client's account Team.",tags:["Account"]}).input(Zf.strict()).output(_y),list:js.route({method:"POST",path:"/account/orders/query",summary:"List the current buyer's website-Team purchase history",description:"Returns the signed-in buyer's purchases for the verified website client's account Team, newest first.",tags:["Account"]}).input(Uf).output(Lf),get:js.route({method:"POST",path:"/account/orders/{id}/detail",summary:"Get one of the current buyer's purchases",description:"Returns full detail for a purchase the signed-in buyer owns within the website client's account Team.",tags:["Account"]}).input(jf).output(qf),wallet:js.route({method:"POST",path:"/account/orders/{id}/wallet",summary:"Get a wallet pass for one of the current buyer's tickets",description:"Returns an Apple Wallet pass or a validated Google Wallet URL for a ticket on a purchase the signed-in buyer owns.",tags:["Account"]}).input(Gf).output(Bf)},lk={create:js.route({method:"POST",path:"/orders/{id}/notes",summary:"Add note to order timeline (promoter only)",description:"Add a user note to the order timeline. Note will be marked as editable by the author.",tags:["Orders"]}).input(Ff.strict()).output(Py),update:js.route({method:"PATCH",path:"/orders/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Orders"]}).input(gv.strict()).output(Py),remove:js.route({method:"DELETE",path:"/orders/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Orders"]}).input(Hf.strict()).output(ho())};const uk=js.route({method:"POST",path:"/orders/{id}/confirmation",summary:"Read signed order confirmation and QR tickets",tags:["Orders"]}).input(Rf).output(Nf),pk=js.route({method:"GET",path:"/orders/{id}",summary:"Get order by ID",tags:["Orders"]}).input(_f.strict()).output(Py),mk=js.route({method:"GET",path:"/orders",summary:"List orders with cursor-based pagination",description:"Returns order data with cursor-based pagination, optional full-text search via `query`, advanced filters, and deterministic sorting.",tags:["Orders"]}).input($y.strict()).output(Iy),hk=js.route({method:"POST",path:"/orders/quote",summary:"Create order quote",tags:["Orders"]}).input(ky.strict()).output(Ty),fk=js.route({method:"POST",path:"/orders",summary:"Create a new order",tags:["Orders"]}).input(Zf.strict()).output(Py),yk=js.route({method:"POST",path:"/orders/complimentary",summary:"Create a complimentary order",tags:["Orders"]}).input(Wf.strict()).output(Py),gk=js.route({method:"PUT",path:"/orders/{id}",summary:"Update an order",tags:["Orders"]}).input(yv.strict()).output(Py),vk=js.route({method:"POST",path:"/orders/{id}/reserve",summary:"Re-reserve inventory for an abandoned order",description:"Attempts to re-reserve inventory for an abandoned order. If inventory is available, the order status is set back to PENDING with a new reservation timer. Returns the updated order with a new reservedAt timestamp if successful.",tags:["Orders"]}).input(Oy.strict()).errors({BAD_REQUEST:{status:400,data:Cy.optional()}}).output(Py),bk=js.route({method:"POST",path:"/orders/{id}/resend",summary:"Resend tickets to customer",description:"Resend order tickets to the customer's email. Optionally provide a different email address.",tags:["Orders"]}).input(Dy.strict()).output(Py),wk=js.route({method:"POST",path:"/orders/{id}/refund",summary:"Refund order items",description:"Process a refund for order items. Supports full or partial refunds with optional ticket cancellation.",tags:["Orders"]}).input(xy.strict()).output(Sy);var $k={account:ck,cancel:js.route({method:"POST",path:"/orders/{id}/cancel",summary:"Cancel tickets or close an order without a refund",tags:["Orders"]}).input(Vf.strict()).output(Ph),cancellations:js.route({method:"GET",path:"/orders/{id}/cancellations",summary:"Get staff cancellation history",tags:["Orders"]}).input(_f.pick({id:!0}).strict()).output(_h),confirmation:uk,get:pk,list:mk,create:fk,createComplimentary:yk,update:gk,reserve:vk,quote:hk,resend:bk,refund:wk,note:lk};const Ik=wo({payout:Dv});var Ek={create:js.route({method:"POST",path:"/payouts/{id}/notes",summary:"Add note to payout timeline (`payout.write` required)",description:"Add a user note to the payout timeline. Note will be marked as editable by the author.",tags:["Payouts"]}).input(Ov.strict()).output(Ik),update:js.route({method:"PATCH",path:"/payouts/{id}/notes/{noteId}",summary:"Update timeline note (author only)",description:"Update a timeline note. Only the author can edit their own notes. System-generated entries cannot be edited.",tags:["Payouts"]}).input(wb.strict()).output(Ik),remove:js.route({method:"DELETE",path:"/payouts/{id}/notes/{noteId}",summary:"Delete timeline note (author only)",description:"Delete a timeline note. Only the author can delete their own notes. System-generated entries cannot be deleted.",tags:["Payouts"]}).input(nb.strict()).output(Ik)},kk={get:js.route({method:"GET",path:"/payouts/{id}",summary:"Get payout by ID with breakdown",tags:["Payouts"]}).input(rb.strict()).output(yb),list:js.route({method:"GET",path:"/payouts",summary:"List payouts with cursor-based pagination",description:"Returns payout data with cursor-based pagination and optional full-text search via the `query` parameter.",tags:["Payouts"]}).input(sb.strict()).output(db),preview:js.route({method:"GET",path:"/payouts/{id}/preview",summary:"Get payout preview for approvals",description:"Returns lightweight payout split rows and beneficiary resolution status used by approvals dropdowns.",tags:["Payouts"]}).input(fb.strict()).output(hb),adjustments:js.route({method:"GET",path:"/payouts/adjustments",summary:"List Airwallex payout adjustments",description:"Returns settlement-proven Airwallex refund and dispute adjustments grouped for tenant payout review.",tags:["Payouts"]}).input(zv.strict()).output(Wv),adjustment:js.route({method:"GET",path:"/payouts/adjustments/{id}",summary:"Get payout adjustment by ID",description:"Returns a payout adjustment detail payload with related adjustment rows, applications, and upcoming payout projections.",tags:["Payouts"]}).input(jv.strict()).output(Yv),stats:js.route({method:"POST",path:"/payouts/stats",summary:"Get payout statistics",tags:["Payouts"]}).input(vb.strict()).output(gb),breakdown:js.route({method:"GET",path:"/payouts/{payoutId}/breakdown",summary:"Get payout breakdown",tags:["Payouts"]}).input(vv.strict()).output(ib),update:js.route({method:"PATCH",path:"/payouts/{id}",summary:"Update a payout",description:"Update payout status or approval. Use approval field to approve or reject payouts.",tags:["Payouts"]}).input(bb.strict()).output(Dv),note:Ek};const Tk=wo({key:kr(),memberId:kr()}),Ak=Tk.merge(Ab).strict();var xk={get:js.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Get permission scope by ID",description:"Retrieve a permission scope using its unique ID",tags:["Permission Scopes"]}).input(Ak).output(Eb),list:js.route({method:"GET",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"List permission scopes with cursor-based pagination",description:"Returns permission scopes for a specific team member with cursor pagination. Can filter by kind (PROMOTER or VENUE).",tags:["Permission Scopes"]}).input(Tk.merge(xb).strict()).output(Sb),create:js.route({method:"POST",path:"/teams/{key}/members/{memberId}/permission-scopes",summary:"Create a new permission scope",description:"Create a permission scope for a team member. Can be PROMOTER-specific (applies to all events by that promoter) or VENUE-specific (applies to all events at that venue). Replaces lower-tier permissions.",tags:["Permission Scopes"]}).input(Tk.and(Tb)).output(Eb),update:js.route({method:"PATCH",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Update a permission scope",description:"Update an existing permission scope. Only the permissions array can be modified.",tags:["Permission Scopes"]}).input(Tk.extend({id:kr()}).merge(Db).strict()).output(Eb),remove:js.route({method:"DELETE",path:"/teams/{key}/members/{memberId}/permission-scopes/{id}",summary:"Delete a permission scope",description:"Remove a permission scope. Team member will revert to lower-tier permissions for the affected resource.",tags:["Permission Scopes"]}).input(Ak).output(Eb)},Sk={summary:js.route({method:"GET",path:"/promoters/{promoterId}/performance/summary",summary:"Get promoter performance summary",description:"Overview KPIs for a single promoter based on tracking data (excludes entity-based data like payouts)",tags:["Promoter Performance"]}).input(Bl).output(Fl),revenue:js.route({method:"GET",path:"/promoters/{promoterId}/performance/revenue",summary:"Get promoter revenue over time",description:"Time-series data for revenue and tickets sold for a single promoter",tags:["Promoter Performance"]}).input(Vl).output(zl),events:js.route({method:"GET",path:"/promoters/{promoterId}/performance/events",summary:"Get promoter top events by tickets",description:"Top events by ticket count for a single promoter",tags:["Promoter Performance"]}).input(Wl).output(Yl)};const Dk=wo({eventCount:Qr().optional()}),Ok=js.route({method:"GET",path:"/promoters/{key}",summary:"Get promoter by ID or slug",description:"Retrieve a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(Yb.strict()).output(ew),Ck=js.route({method:"POST",path:"/promoters",summary:"Create a new promoter",description:"Create a new promoter brand within a team",tags:["Promoters"]}).input(Zb.strict()).output(ew),Pk=js.route({method:"PUT",path:"/promoters/{key}",summary:"Update a promoter",description:"Update a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(tw.strict()).output(ew);var _k={get:Ok,list:js.route({method:"GET",path:"/promoters",summary:"List promoters with cursor-based pagination",description:"Returns promoters with cursor pagination. Filter by teamId to see promoters for a specific team.",tags:["Promoters"]}).input(Qb.strict()).output(Xb),create:Ck,update:Pk,remove:js.route({method:"DELETE",path:"/promoters/{key}",summary:"Delete a promoter",description:"Delete a promoter using either its unique ID or URL-friendly slug",tags:["Promoters"]}).input(Hb.strict()).errors({CONFLICT:{status:409,data:Dk.optional()}}).output(ew),performance:Sk},Rk={create:js.route({method:"POST",path:"/reports",summary:"Create report generation job",description:"Creates an asynchronous report job. Download the report once the job status is COMPLETED.",tags:["Reports"]}).input(sw).output(cw),get:js.route({method:"GET",path:"/reports/{id}",summary:"Get report generation job",tags:["Reports"]}).input(dw.strict()).output(cw)};const Nk=js.route({method:"GET",path:"/events/{eventId}/sections/{id}",summary:"Get section by ID",tags:["Sections"]}).input(my.strict()).output(yy),Mk=js.route({method:"POST",path:"/events/{eventId}/sections",summary:"Create a new section",tags:["Sections"]}).input(uy.strict()).output(yy),Uk=js.route({method:"PUT",path:"/events/{eventId}/sections/{id}",summary:"Update a section",tags:["Sections"]}).input(gy.strict()).output(yy);var Lk={get:Nk,list:js.route({method:"GET",path:"/events/{eventId}/sections",summary:"List sections",description:"Returns sections with cursor-based pagination. Automatically uses search-backed pagination when query parameter is provided for full-text search capabilities.",tags:["Sections"]}).input(hy.strict()).output(fy),create:Mk,update:Uk,remove:js.route({method:"DELETE",path:"/events/{eventId}/sections/{id}",summary:"Delete a section",tags:["Sections"]}).input(py.strict()).output(yy)};const jk=js.route({method:"GET",path:"/teams/{teamId}/tax-profiles",summary:"List team tax profiles",description:"Retrieve reusable organiser tax profiles and the default.",tags:["Team Tax"]}).input(rm).output(cm),qk=js.route({method:"POST",path:"/teams/{teamId}/tax-profiles",summary:"Create a team tax profile",description:"Create a reusable organiser tax profile.",tags:["Team Tax"]}).input(am).output(cm),Gk=js.route({method:"PUT",path:"/teams/{teamId}/tax-profiles/{profileId}",summary:"Update a team tax profile",description:"Update a reusable organiser tax profile.",tags:["Team Tax"]}).input(sm).output(cm);var Bk={create:qk,list:jk,remove:js.route({method:"DELETE",path:"/teams/{teamId}/tax-profiles/{profileId}",summary:"Delete a team tax profile",description:"Delete a tax profile that is not the required default and is not used by an event.",tags:["Team Tax"]}).input(dm).output(cm),setDefault:js.route({method:"PUT",path:"/teams/{teamId}/tax-profiles/{profileId}/default",summary:"Set the default team tax profile",description:"Use this profile by default for future events.",tags:["Team Tax"]}).input(dm).output(cm),update:Gk},Fk={summary:js.route({method:"GET",path:"/teams/{teamId}/performance/summary",summary:"Get team performance summary",description:"Overview KPIs aggregated across all promoters in the team, based on tracking data (excludes entity-based data like payouts)",tags:["Team Performance"]}).input(Zl).output(Hl),revenue:js.route({method:"GET",path:"/teams/{teamId}/performance/revenue",summary:"Get team revenue over time",description:"Time-series data for revenue and tickets sold aggregated across all promoters in the team",tags:["Team Performance"]}).input(Kl).output(Jl),funnel:js.route({method:"GET",path:"/teams/{teamId}/performance/funnel",summary:"Get team conversion funnel",description:"Conversion funnel showing drop-off rates from product view to purchase, aggregated across all events in the team",tags:["Team Performance"]}).input(eu).output(tu),traffic:js.route({method:"GET",path:"/teams/{teamId}/performance/traffic",summary:"Get team traffic sources",description:"Traffic source breakdown by campaign, medium, or source, aggregated across all events in the team",tags:["Team Performance"]}).input(au).output(su),insights:js.route({method:"GET",path:"/teams/{teamId}/performance/insights",summary:"Get team performance insights",description:"Order-backed revenue, tickets, refund, and dispute totals for an exact time window",tags:["Team Performance"]}).input(du).output(uu),payouts:js.route({method:"GET",path:"/teams/{teamId}/performance/payouts",summary:"Get team payout performance",description:"Upcoming and recently paid payout totals aggregated across the team",tags:["Team Performance"]}).input(mu).output(gu),finance:js.route({method:"GET",path:"/teams/{teamId}/performance/finance",summary:"Get team finance overview",description:"Finance overview combining gross order value with payout and adjustment data",tags:["Team Performance"]}).input(vu).output(ku),events:js.route({method:"GET",path:"/teams/{teamId}/performance/events",summary:"Get team top events by tickets",description:"Top events by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(Ql).output(Xl),admissions:js.route({method:"GET",path:"/teams/{teamId}/performance/admissions",summary:"Get team top admissions by tickets",description:"Top admission types by ticket count, aggregated across all events in the team",tags:["Team Performance"]}).input(ru).output(ou),orders:js.route({method:"GET",path:"/teams/{teamId}/performance/orders",summary:"Get team orders distribution",description:"Order counts grouped by time breakdown (hour, day of week, day, week, month)",tags:["Team Performance"]}).input(iu).output(nu),tracking:js.route({method:"GET",path:"/teams/{teamId}/performance/tracking",summary:"Get team tracking time series",description:"Time-series tracking data (page views, add to cart, checkout, orders) aggregated at team or tenant level",tags:["Team Performance"]}).input(Tu).output(Au)};const Vk=ww.meta({description:"Business records that prevent a team from being deleted"});var zk={get:js.route({method:"GET",path:"/teams/{key}",summary:"Get team by ID or slug",description:"Retrieve a team with membership details. User must be a member of the team.",tags:["Teams"]}).input(yw.strict()).output(vw),list:js.route({method:"GET",path:"/teams",summary:"List teams with cursor-based pagination",description:"Returns teams the current user has access to with cursor pagination",tags:["Teams"]}).input(_w.strict()).output(Rw),create:js.route({method:"POST",path:"/teams",summary:"Create a new team",description:"Create a new team organization",tags:["Teams"]}).input(gw.strict()).output(vw),slugAvailability:js.route({method:"GET",path:"/teams/slugs/{slug}/availability",summary:"Check team slug availability",description:"Check whether a team URL slug is available within the current tenant.",tags:["Teams"]}).input(qw.strict()).output(Gw),update:js.route({method:"PATCH",path:"/teams/{key}",summary:"Update a team",description:"Update an existing team by ID or slug",tags:["Teams"]}).input(Bw.strict()).output(vw),remove:js.route({method:"DELETE",path:"/teams/{key}",summary:"Start team deletion",description:"Soft-delete a team immediately and queue its asynchronous cleanup by ID or slug",tags:["Teams"]}).input(yw.strict()).errors({CONFLICT:{status:409,data:Vk.optional()},FORBIDDEN:{status:403}}).output(Ew),deletion:{get:js.route({method:"GET",path:"/team-deletions/{id}",summary:"Get team deletion status",description:"Retrieve progress for an asynchronous team deletion request",tags:["Teams"]}).input(Iw.strict()).errors({FORBIDDEN:{status:403},NOT_FOUND:{status:404}}).output($w)},performance:Fk},Wk={list:js.route({method:"GET",path:"/teams/{key}/invites",summary:"List pending team invitations with cursor-based pagination",description:"Returns pending team invitations for a specific team. Team key can be ID or slug. These are email-based invitations that have not yet been accepted.",tags:["Team Invites"]}).input(Sw.strict()).output(Dw),get:js.route({method:"GET",path:"/teams/{key}/invites/{inviteId}",summary:"Get pending invitation by ID",description:"Retrieve a pending team invitation by its ID. Team key can be ID or slug.",tags:["Team Invites"]}).input(xw.strict()).output(Ow),create:js.route({method:"POST",path:"/teams/{key}/invites",summary:"Create a team invitation",description:"Invite a user to join a team by email. Team key can be ID or slug. Creates a pending invitation with a secure token that expires in 7 days. The invited user will receive an email with an acceptance link.",tags:["Team Invites"]}).input(Aw.strict()).output(Ow),accept:js.route({method:"PATCH",path:"/teams/{key}/invites/{inviteId}",summary:"Accept a team invitation",description:"Accept a pending team invitation using the secure token. Team key can be ID or slug. This deletes the invitation and creates an active TeamMember record. Returns the newly created team member.",tags:["Team Invites"]}).input(lw.strict()).output(Vw),resend:js.route({method:"POST",path:"/teams/{key}/invites/{inviteId}/resend",summary:"Resend invitation email",description:"Resend the invitation email with a new token and extended expiry. Team key can be ID or slug. Useful when the original invitation has expired or was not received.",tags:["Team Invites"]}).input(xw.strict()).output(Ow),cancel:js.route({method:"DELETE",path:"/teams/{key}/invites/{inviteId}",summary:"Cancel a pending invitation",description:"Cancel a pending team invitation before it is accepted. Team key can be ID or slug. Deletes the invitation record.",tags:["Team Invites"]}).input(Tw.strict()).output(Ow)},Yk={connect:js.route({method:"POST",path:"/teams/{key}/payment/connect",summary:"Initiate payment processor connection",description:"Start the OAuth flow to connect a team's payment processor account. Returns an authorization URL to redirect the user to the payment provider's OAuth page. The OAuth callback is handled directly by the payment gateway.",tags:["Team Payments"]}).input(Mw.strict()).output(Uw),disconnect:js.route({method:"POST",path:"/teams/{key}/payment/disconnect",summary:"Disconnect payment processor",description:"Remove the payment processor connection from a team. Future ticket sales will use the platform account. Only the team owner can disconnect the payment processor.",tags:["Team Payments"]}).input(Lw.strict()).output(hw),gateway:{update:js.route({method:"PATCH",path:"/teams/{key}/payment/gateway",summary:"Update Stripe Connect event routing",description:"Configure whether Stripe Connect applies to every team event or only selected events.",tags:["Team Payments"]}).input(pw.strict()).output(hw)}};const Zk=js.route({method:"GET",path:"/tenant/config",summary:"Get tenant configuration",tags:["Tenant"],description:"Returns tenant configuration including features and regions. Requires x-tenant-id header."}).output(t$),Hk=js.route({method:"GET",path:"/tenant/regions",summary:"Get tenant regions",tags:["Tenant"],description:"Returns available regions for the tenant. Requires x-tenant-id header."}).output(i$);var Kk={approvals:js.route({method:"GET",path:"/tenant/approvals",summary:"Get tenant approval badges",tags:["Tenant"],description:"Returns lightweight booleans for pending approvals. Requires tenant admin access."}).input(n$).output(r$),config:Zk,regions:Hk};const Jk=js.route({method:"GET",path:"/tickets/{id}",summary:"Get ticket by ID",tags:["Tickets"]}).input(v$.strict()).output($$),Qk=js.route({method:"POST",path:"/tickets",summary:"Create a new ticket",tags:["Tickets"]}).input(g$.strict()).output($$),Xk=js.route({method:"PUT",path:"/tickets/{id}",summary:"Update a ticket",tags:["Tickets"]}).input(_$.strict()).output($$);var eT={get:Jk,list:js.route({method:"GET",path:"/tickets",summary:"List tickets with cursor-based pagination",description:"Returns ticket data with cursor-based pagination, optional full-text search via `query`, and a fixed attendee-name ascending order for non-search list paths.",tags:["Tickets"]}).input(b$.strict()).output(w$),attendees:{list:js.route({method:"GET",path:"/tickets/attendees",summary:"List event attendees with alpha-navigation support",description:"Returns ticket-backed attendee roster rows for an event. Supports bounded browsing, alpha jump bookmarks, and attendee search.",tags:["Tickets"]}).input(f$.strict()).output(y$),index:js.route({method:"GET",path:"/tickets/attendees/index",summary:"Get attendee alpha-navigation buckets",description:"Returns available alpha buckets and server-issued bookmarks for the ticket attendee roster.",tags:["Tickets"]}).input(m$.strict()).output(p$),changes:js.route({method:"GET",path:"/tickets/attendees/changes",summary:"List attendee roster rows changed since an instant",description:"Returns roster rows updated since `since`, so clients can keep a loaded roster window current without reloading it.",tags:["Tickets"]}).input(l$.strict()).output(u$)},create:Qk,update:Xk,checkInByKey:js.route({method:"PUT",path:"/tickets/{key}/check-in",summary:"Check in tickets by key",tags:["Tickets"]}).input(I$.strict()).errors({BAD_REQUEST:{status:400,data:O$.optional()}}).output(C$),checkOutByKey:js.route({method:"PUT",path:"/tickets/{key}/check-out",summary:"Check out tickets by key",tags:["Tickets"]}).input(I$.strict()).errors({BAD_REQUEST:{status:400,data:O$.optional()}}).output(C$)};const tT=js.route({method:"GET",path:"/users/me",summary:"Get the current user and their team memberships",tags:["Users"]}).output(G$),iT=wo({firstName:kr().min(1).optional(),lastName:kr().min(1).optional(),imageUrl:Nr().nullable().optional(),metadata:So(kr(),Vd).optional(),refreshToken:kr().optional().meta({description:"Current refresh token. When provided, new tokens with updated user data will be returned."})}).meta({ref:"UpdateUserInput",description:"Input for updating the current user's profile"}),nT=js.route({method:"PATCH",path:"/users/me",summary:"Update the current user's profile",tags:["Users"]}).input(iT).output(j$);var rT={me:tT,remove:js.route({method:"DELETE",path:"/users/me",summary:"Delete the current user's account",tags:["Users"]}).output(q$),update:nT};const oT={oauthApplication:dk,integration:_E,analytics:xI,beneficiary:PI,section:Lk,event:CE,eventCollaborator:PE,admission:TI,order:$k,ticket:eT,location:GE,coupon:BI,payout:kk,teams:Wb,permissionScope:xk,promoter:_k,report:Rk,team:zk,teamInvite:Wk,teamPayment:Yk,teamMember:Qw,teamTax:Bk,tenant:Kk,venue:{get:js.route({method:"GET",path:"/venues/{key}",summary:"Get venue by ID or slug",description:"Retrieve a venue using its unique ID or slug",tags:["Venues"]}).input(z$.strict()).output(K$),list:js.route({method:"GET",path:"/venues",summary:"List venues with cursor-based pagination",description:"Returns venues with cursor pagination. Supports filtering by team, location-based search, and text query",tags:["Venues"]}).input(Z$.strict()).output(H$),create:js.route({method:"POST",path:"/venues",summary:"Create a new venue",description:"Create a new venue. Venue will be owned by the specified team but can be used by all teams for their events",tags:["Venues"]}).input(F$.strict()).output(K$),update:js.route({method:"PATCH",path:"/venues/{key}",summary:"Update a venue",description:"Update an existing venue. Cannot change venue ownership (teamId)",tags:["Venues"]}).input(J$.strict()).output(K$),remove:js.route({method:"DELETE",path:"/venues/{key}",summary:"Delete a venue",description:"Soft delete a venue",tags:["Venues"]}).input(V$.strict()).output(K$),linkLocation:js.route({method:"POST",path:"/venues/{key}/locations",summary:"Link location to venue",description:"Link a location to this venue. Allows the venue to be discovered when users search for this location. A venue can have multiple linked locations (e.g., different addresses, branded names). Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(z$.extend({locationKey:kr().meta({description:"Location ID (loc_xxx) or Google Place ID to link to this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(K$),unlinkLocation:js.route({method:"DELETE",path:"/venues/{key}/locations/{locationKey}",summary:"Unlink location from venue",description:"Remove a location link from this venue. The location will no longer show this venue's branding. Requires venue access on the owning team (for example, `venue.write`).",tags:["Venues"]}).input(z$.extend({locationKey:kr().meta({description:"Location ID (loc_xxx) or Google Place ID to unlink from this venue",examples:["loc_01jps5cgsm7qxvh6watsons0eq","ChIJP3Sa8ziYEmsRUKgyFmh9AQM"]})}).strict()).output(K$)},user:rT},aT={...oT,internal:qE,membership:QE};function sT(e){return js.errors(ud).router(e)}const dT=sT(oT);sT(aT);const cT=dT,lT={sandbox:"https://api.sandbox.session.services",prod:"https://api.session.services"};function uT(e){return e in lT?lT[e]:e}function pT(e){let t=e.toLowerCase();return t?function(e){return!!/ipad|tablet|playbook|silk|kindle|sm-t|tab/.test(e)||/android/.test(e)&&!/mobile/.test(e)}(t)?"TABLET":function(e){return/iphone|ipod|android|windows phone|blackberry|bb10|mobile/.test(e)}(t)?"MOBILE":"DESKTOP":"DESKTOP"}function mT(e){let t=e.toLowerCase();return t?t.includes("instagram")?"Instagram App":/fban|fbav|fb_iab|fbios|facebook/.test(t)?"Facebook App":/tiktok|musical_ly|bytedance|bytelo/.test(t)?"TikTok App":t.includes("snapchat")?"Snapchat App":t.includes("pinterest")?"Pinterest App":t.includes("linkedin")?"LinkedIn App":/twitter|twitterandroid/.test(t)?"X App":t.includes("micromessenger")?"WeChat App":/\bline\//.test(t)?"LINE App":t.includes("gsa/")?"Google App":/edg\/|edge|edgios|edga/.test(t)?"Edge":t.includes("samsungbrowser")?"Samsung Internet":/opr\/|opera|opios/.test(t)?"Opera":/firefox|fxios/.test(t)?"Firefox":t.includes("crios")?"Chrome":/iphone|ipod|ipad/.test(t)&&t.includes("safari")?"Mobile Safari":t.includes("android")&&t.includes("wv")?"Android WebView":/chrome|chromium/.test(t)?"Chrome":t.includes("safari")?"Safari":"Other":"Unknown"}const hT="sessions_attribution";function fT(e,t){return e.get(t)||void 0}function yT(e){return!(!e||!Object.values(e).some(Boolean))}function gT(){try{let e=window.localStorage?.getItem(hT);if(!e)return;let t=JSON.parse(e);if(!t||"object"!=typeof t)return void window.localStorage?.removeItem(hT);let i=t;return!i.expiresAt||i.expiresAt<=Date.now()?void window.localStorage?.removeItem(hT):i}catch{return}}function vT(e){return"string"==typeof e&&e.length>0?e:void 0}function bT(){if(typeof window>"u")return;let e=function(e){return{source:fT(e,"utm_source"),medium:fT(e,"utm_medium"),name:fT(e,"utm_campaign"),term:fT(e,"utm_term"),content:fT(e,"utm_content")}}(new URLSearchParams(window.location.search));return yT(e)?(function(e){if(yT(e))try{window.localStorage?.setItem(hT,JSON.stringify({...gT(),expiresAt:Date.now()+2592e6,utm_campaign:e?.name,utm_content:e?.content,utm_medium:e?.medium,utm_source:e?.source,utm_term:e?.term}))}catch{return}}(e),e):function(){let e=gT();if(!e)return;let t={source:vT(e.utm_source),medium:vT(e.utm_medium),name:vT(e.utm_campaign),term:vT(e.utm_term),content:vT(e.utm_content)};return yT(t)?t:void 0}()}function wT(e){return{anonymous_id:e.anonymousId,browser:mT(e.context.userAgent),browser_session_id:e.sessionId,device_type:pT(e.context.userAgent),page_path:e.context.page.path,page_title:e.context.page.title,page_url:e.context.page.url,referrer:e.context.page.referrer,user_agent:e.context.userAgent||void 0,utm_campaign:e.context.campaign?.name,utm_content:e.context.campaign?.content,utm_medium:e.context.campaign?.medium,utm_source:e.context.campaign?.source,utm_term:e.context.campaign?.term}}function $T(){return typeof window>"u"?{page:{url:"",path:"",title:"",referrer:void 0},userAgent:"",campaign:void 0}:{page:{url:window.location.href,path:window.location.pathname,title:document.title,referrer:document.referrer||void 0},userAgent:navigator.userAgent,campaign:bT()}}function IT(e,t,i){null==i||""===i||(e[t]=i)}function ET(...e){return e.find((e=>null!=e&&""!==e))}const kT={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},TT=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]),AT=new Set,xT=new Map;function ST(e){if(Array.from(document.scripts??[]).some((e=>e.src.includes("connect.facebook.net/en_US/fbevents.js"))))return!0;let t=document.createElement("script");t.async=!0,t.src="https://connect.facebook.net/en_US/fbevents.js",t.addEventListener?.("load",(()=>{PT(e,"[Facebook Pixel] fbevents.js loaded")})),t.addEventListener?.("error",(()=>{PT(e,"[Facebook Pixel] fbevents.js failed to load")}));let i=document.getElementsByTagName("script")[0],n=i?.parentNode??document.head??document.body;return!!n&&(n.insertBefore(t,i??null),PT(e,"[Facebook Pixel] inserted fbevents.js"),!0)}function DT(e,t){!t||!Array.isArray(t)||(e.content_ids=t.flatMap((e=>e.product_id?[e.product_id]:[])),e.num_items=t.length,e.contents=function(e){if(Array.isArray(e))return e.map((e=>({id:e.product_id,quantity:e.quantity||1,item_price:e.price})))}(t))}function OT(e,t){let i=window;typeof window>"u"||!i.fbq||(t?i.fbq("init",e,{external_id:t}):i.fbq("init",e))}function CT(e,t,i){let n=window;typeof window>"u"||!n.fbq||n.fbq(e,t,i)}function PT(e,...t){e&&console.log(...t)}function _T(e,t,i){return!!function(e){if(typeof window>"u")return!1;let t=window;if(t.fbq)return ST(e);let i=(...e)=>{i.callMethod?i.callMethod(...e):i.queue.push(e)};return i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],t.fbq=i,t._fbq||=i,ST(e)}(i)&&(function(e,t,i){let n=xT.get(e);return!(!t||t===n||(OT(e,t),xT.set(e,t),AT.add(e),PT(i,`[Facebook Pixel] Re-initialized pixel ${e} with userId ${t}`),0))}(e,t,i)||AT.has(e)||function(e,t,i){OT(e,t),AT.add(e),t&&xT.set(e,t),PT(i,"[Facebook Pixel] Initialized pixel "+e)}(e,t,i),!0)}const RT=(e,t)=>{(function(e,t){t&&(e.content_ids=[t])})(e,t.product_id),function(e,t){IT(e,"content_name",t.name),IT(e,"value",ET(t.value,t.price)),e.content_type="product"}(e,t)},NT=function(e){return(t,i)=>{e(t,i),IT(t,"content_category",i.category)}}(RT);function MT(e,t){RT(e,t),t.product_id&&(e.contents=[{id:t.product_id,quantity:t.quantity||1,item_price:t.price}])}function UT(e,t){DT(e,t.products),function(e,t){IT(e,"value",ET(t.value,t.total))}(e,t),e.content_type="product",IT(e,"order_id",t.order_id)}function LT(e,t){IT(e,"value",t.value),t.product_id&&(e.content_ids=[t.product_id])}const jT={ViewContent:NT,AddToCart:MT,InitiateCheckout:UT,AddPaymentInfo:UT,Purchase:function(e,t){DT(e,t.products),function(e,t){IT(e,"value",ET(t.value,t.total,t.revenue))}(e,t),e.content_type="product",IT(e,"order_id",t.order_id)},"Product List Viewed":function(e,t){DT(e,t.products),e.content_type="product"},"Product Removed":MT,"Cart Viewed":UT,"Coupon Applied":UT,"Coupon Removed":UT};function qT(e,t){let i={};return IT(i,"currency",t.currency),IT(i,"event_id",t.event_id),(jT[e.name]??jT[e.sourceName]??LT)(i,t),i}function GT(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return GT(decodeURIComponent(i),t-1)}catch{return i}}function BT(e){let t=e.match(/[A-Za-z0-9]+/g);return t?t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(""):"Unknown"}function FT(e){let t=GT(function(e){return e.name||"Unknown"}(e)),i=kT[t]||t;return TT.has(i)?{method:"track",name:i,sourceName:t}:{method:"trackCustom",name:BT(i),sourceName:t}}function VT(e=!1){let t=(t,i)=>{i.fbId&&_T(i.fbId,t.userId,e)&&(CT("track","PageView",{}),PT(e,"[Facebook Pixel] Sent PageView"))};return{name:"Facebook Pixel",preload:(t,i)=>{i.fbId&&_T(i.fbId,t.userId,e)},track:(t,i)=>{if(!i.fbId||!_T(i.fbId,t.userId,e))return;let n=FT(t),r=qT(n,t.properties);CT(n.method,n.name,r),PT(e,`[Facebook Pixel] Sent ${n.name}:`,r)},page:t,screen:t,identify:(t,i)=>{!i.fbId||!t.userId||(_T(i.fbId,t.userId,e),PT(e,"[Facebook Pixel] Identity synced: "+t.userId))}}}const zT={"Product Viewed":"view_item","Product Added":"add_to_cart","Product Removed":"remove_from_cart","Checkout Started":"begin_checkout","Payment Info Entered":"add_payment_info","Order Completed":"purchase","Product List Viewed":"view_item_list","Cart Viewed":"view_cart","Coupon Entered":"coupon_entered","Coupon Applied":"coupon_applied","Coupon Denied":"coupon_denied","Coupon Removed":"coupon_removed"},WT=new Set;function YT(e){return"google-analytics-"+e}function ZT(e,t,i){if(typeof window>"u")return;let n=window;n.gtag&&n.gtag("event",t,{...i,send_to:e})}function HT(e,t,i){if(typeof window>"u")return;let n=window;!n.gtag||!e||(n.gtag("config",e,{user_id:t,send_page_view:!1}),KT(i,"[Google Analytics] User ID updated"))}function KT(e,...t){e&&console.log(...t)}function JT(e){return"string"==typeof e&&e.length>0?e:void 0}function QT(e,t,i){null==i||""===i||(e[t]=i)}function XT(e){return"number"==typeof e.price}function eA(e){let t=e.filter(XT);if(0!==t.length)return t.reduce(((e,t)=>e+t.price*function(e){return"number"==typeof e.quantity?e.quantity:1}(t)),0)}function tA(e){return{item_id:e.product_id||e.sku,item_name:e.name,item_category:e.category,item_variant:JT(e.variant),price:e.price,quantity:e.quantity??1}}function iA(e){return!e.product_id||e.products?[]:[{item_id:e.product_id,item_name:e.name,item_category:e.category,item_variant:JT(e.variant),price:e.price,quantity:e.quantity??1}]}function nA(e){return Array.isArray(e.products)?e.products.map(tA):[]}function rA(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return rA(decodeURIComponent(i),t-1)}catch{return i}}function oA(e){let t=rA(e.name||"Unknown");return zT[t]||function(e){let t=e.match(/[A-Za-z0-9]+/g)?.join("_").toLowerCase()||"custom_event";return/^[a-z]/.test(t)?t:"event_"+t}(t)}function aA(e,t){QT(e,"event_id",t.properties.event_id),QT(e,"team_id",t.properties.team_id),QT(e,"promoter_id",t.properties.promoter_id),QT(e,"order_id",t.properties.order_id)}function sA(e,t){if(function(e){return!(!e||!/^G-[A-Z0-9]+$/.test(e))}(e.gaId))return function(e,t){if(typeof window>"u")return!1;let i=window;return i.dataLayer=i.dataLayer||[],i.gtag||(i.gtag=function(){i.dataLayer?.push(arguments)},i.gtag("js",new Date)),function(e){if(document.getElementById(YT(e)))return;let t=document.createElement("script");t.id=YT(e),t.async=!0,t.src="https://www.googletagmanager.com/gtag/js?id="+e;let i=document.getElementsByTagName("script")[0];i?.parentNode?.insertBefore(t,i)}(e),WT.has(e)||(i.gtag("config",e,{send_page_view:!1}),WT.add(e),KT(t,"[Google Analytics] Initialized "+e)),!0}(e.gaId,t)?e.gaId:void 0}function dA(e=!1){let t;return{name:"Google Analytics",preload:(t,i)=>{sA(i,e)},track:(t,i)=>{let n=sA(i,e);if(!n)return;let r=oA(t),o=function(e,t){let i={},n=function(e){return[...iA(e),...nA(e)]}(t.properties);return aA(i,t),n.length>0&&(i.items=n),QT(i,"currency",t.properties.currency),QT(i,"value",function(e,t){return function(e){return e.find((e=>"number"==typeof e))}([e.value,e.total,e.revenue,eA(t)])}(t.properties,n)),QT(i,"coupon",t.properties.coupon),QT(i,"payment_type",JT(t.properties.payment_type)??JT(t.properties.payment_method)),QT(i,"item_list_id",t.properties.list_id),QT(i,"item_list_name",t.properties.list_name),"purchase"===e&&QT(i,"transaction_id",function(e){return JT(e.transaction_id)??JT(e.order_id)}(t.properties)),i}(r,t);ZT(n,r,o),KT(e,`[Google Analytics] Sent ${r}:`,o)},page:(t,i)=>{let n=sA(i,e);if(!n)return;let r={page_location:t.context.page.url,page_path:t.context.page.path,page_title:t.context.page.title};aA(r,t),QT(r,"page_referrer",t.context.page.referrer),ZT(n,"page_view",r),KT(e,"[Google Analytics] Sent page_view:",r)},screen:(t,i)=>{let n=sA(i,e);if(!n)return;let r={};aA(r,t),QT(r,"screen_name",t.name||"Unknown"),ZT(n,"screen_view",r),KT(e,"[Google Analytics] Sent screen_view:",r)},identify:(i,n)=>{if(!i.userId)return;let r=sA(n,e);r&&(t=r,HT(r,i.userId,e),KT(e,"[Google Analytics] Identity available"))},reset:()=>{HT(t,null,e),t=void 0}}}const cA=new Set(Object.values(Da));function lA(e){return e.messageId??"msg_"+e.timestamp.toString(36)}function uA(e){let t=e.context.campaign??{};return{session_id:e.sessionId,anonymous_id:e.anonymousId,user_id:e.userId,page:{url:e.context.page.url,path:e.context.page.path,title:e.context.page.title},referrer:e.context.page.referrer,user_agent:e.context.userAgent,utm_source:t.source,utm_medium:t.medium,utm_campaign:t.name,utm_term:t.term,utm_content:t.content}}function pA(e,t,i){return i&&t?{...e,name:t}:e}const mA={"Product Viewed":"ViewContent","Product Added":"AddToCart","Checkout Started":"InitiateCheckout","Payment Info Entered":"AddPaymentInfo","Order Completed":"Purchase"},hA=new Set(["AddPaymentInfo","AddToCart","AddToWishlist","ApplicationApproval","CompleteRegistration","Contact","CustomizeProduct","Download","FindLocation","InitiateCheckout","Purchase","Schedule","Search","StartTrial","SubmitApplication","SubmitForm","Subscribe","ViewContent"]),fA=new Set,yA="https://analytics.tiktok.com/i18n/pixel/events.js";function gA(e,t){let i=window;typeof window>"u"||!i.ttq||i.ttq.instance(e).identify?.({external_id:t})}function vA(e){let t={};return IT(t,"event_id",e),Object.keys(t).length>0?t:void 0}function bA(e,...t){e&&console.log(...t)}function wA(e,t){return!!function(){if(typeof window>"u")return!1;let e=window;if(e.ttq)return!0;e.TiktokAnalyticsObject="ttq";let t=[];t.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],t.setAndDefer=(e,t)=>{e[t]=(...i)=>{e.push([t,...i])}};for(let e of t.methods)t.setAndDefer(t,e);return t.instance=e=>{let i=t._i[e]??[];for(let e of t.methods)t.setAndDefer(i,e);return i},t._i={},t._t={},t._o={},t.load=(e,i={})=>{t._i[e]=t._i[e]??[],t._i[e]._u=yA,t._t[e]=Date.now(),t._o[e]=i,function(e){if(function(e){return Array.from(document.scripts??[]).some((t=>t.src.includes(yA)&&t.src.includes("sdkid="+e)))}(e))return;let t=document.createElement("script");t.async=!0,t.src=`${yA}?sdkid=${e}&lib=ttq`;let i=document.getElementsByTagName("script")[0];i?.parentNode?.insertBefore(t,i)}(e)},e.ttq=t,!0}()&&(fA.has(e)||(function(e){let t=window;typeof window>"u"||!t.ttq||t.ttq.load(e)}(e),fA.add(e),bA(t,"[TikTok Pixel] Initialized pixel "+e)),!0)}function $A(e){return"number"==typeof e.quantity?e.quantity:1}function IA(e){if("number"==typeof e.price)return e.price*$A(e)}function EA(e){return Array.isArray(e)?function(e){let t=e.filter((e=>"number"==typeof e.price));if(0!==t.length)return t.reduce(((e,t)=>e+Number(t.price)*$A(t)),0)}(e):void 0}function kA(e){return function(e){return e.find((e=>"number"==typeof e))}([e.value,e.total,e.revenue,EA(e.products),IA(e)])}function TA(e,t){(function(e,t){IT(e,"content_ids",t?[t]:void 0)})(e,t.product_id),IT(e,"content_name",t.name),IT(e,"price",t.price),IT(e,"quantity",t.product_id?$A(t):void 0),IT(e,"value",kA(t)),e.content_type="product"}function AA(e){let t={content_type:"product"};return IT(t,"content_id",e.product_id),IT(t,"content_name",e.name),IT(t,"quantity",$A(e)),IT(t,"price",e.price),t}function xA(e,t){Array.isArray(t)&&(IT(e,"contents",t.map(AA)),IT(e,"content_ids",function(e){return e.flatMap((e=>e.product_id?[e.product_id]:[]))}(t)),IT(e,"quantity",function(e){return e.reduce(((e,t)=>e+$A(t)),0)}(t)),e.content_type="product")}function SA(e,t){xA(e,t.products),IT(e,"value",kA(t))}function DA(e,t){IT(e,"value",t.value)}const OA={ViewContent:function(e,t){TA(e,t),IT(e,"content_category",t.category)},AddToCart:function(e,t){TA(e,t)},InitiateCheckout:SA,AddPaymentInfo:SA,Purchase:function(e,t){xA(e,t.products),IT(e,"value",kA(t)),IT(e,"order_id",t.order_id)}};function CA(e,t){let i={};return IT(i,"currency",t.currency),(OA[e]??DA)(i,t),i}function PA(e,t=2){let i=e.trim();if(!i.includes("%")||0===t)return i;try{return PA(decodeURIComponent(i),t-1)}catch{return i}}function _A(e){let t=PA(function(e){return e.name||"Unknown"}(e)),i=mA[t]||t;return hA.has(i)?i:function(e){let t=e.match(/[A-Za-z0-9]+/g)?.join("")||"CustomEvent";return/^[A-Za-z]/.test(t)?t.slice(0,50):("Event"+t).slice(0,50)}(i)}function RA(e){return e.tikTokId}function NA(e=!1){let t=(t,i)=>{let n=RA(i);n&&wA(n,e)&&(function(e,t){let i=window;if(typeof window>"u"||!i.ttq)return;let n=i.ttq.instance(e).page;if(!n)return;let r=vA(t);r?n(r):n()}(n,t.properties.event_id),bA(e,"[TikTok Pixel] Sent page view"))};return{name:"TikTok Pixel",preload:(t,i)=>{let n=RA(i);n&&wA(n,e)&&t.userId&&gA(n,t.userId)},track:(t,i)=>{let n=RA(i);if(!n||!wA(n,e))return;let r=_A(t),o=CA(r,t.properties);(function(e,t,i,n){let r=window;if(typeof window>"u"||!r.ttq)return;let o=r.ttq.instance(e).track;if(!o)return;let a=vA(n);a?o(t,i,a):o(t,i)})(n,r,o,t.properties.event_id),bA(e,`[TikTok Pixel] Sent ${r}:`,o)},page:t,screen:t,identify:(t,i)=>{let n=RA(i);!n||!t.userId||wA(n,e)&&(gA(n,t.userId),bA(e,"[TikTok Pixel] Identity synced"))}}}const MA={preload:(e,t,i)=>e.preload(t,i),track:(e,t,i)=>e.track(t,i),page:(e,t,i)=>e.page(t,i),screen:(e,t,i)=>e.screen(t,i),identify:(e,t,i)=>e.identify(t,i)},UA=["fbId","gaId","tikTokId"];function LA(e){return e||void 0}function jA(e,t=!1,i={}){let n=new Map,r=new Map,o=!1===i.sessions?null:function(e,t=!1){let i=async(i,n,r)=>{let o=function(e){let{event_id:t,team_id:i,promoter_id:n,...r}=e;return{eventId:t,teamId:i,promoterId:n,rest:r}}(n.properties);if(!function(e){return!!(e.eventId&&e.teamId&&e.promoterId)}(o))return void function(e,t,i){e&&console.warn(`[Sessions API] Missing required fields, skipping ${t}:`,{eventId:i.eventId,teamId:i.teamId,promoterId:i.promoterId})}(t,i,o);let a=r??n.name;if(!function(e){return!(!e||!cA.has(e))}(a))return void function(e,t,i){e&&console.warn(`[Sessions API] Invalid or missing eventType "${i}", skipping ${t}`)}(t,i,a);let s=function(e,t,i,n){return{eventId:t.eventId,teamId:t.teamId,promoterId:t.promoterId,eventType:i,messageId:lA(e),occurredAt:new Date(e.timestamp).toISOString(),properties:pA(t.rest,e.name,n),context:uA(e)}}(n,o,a,r);(function(e,t,i){e&&console.log(`[Sessions API] Sending ${t}:`,i)})(t,i,s),await e.analytics[i](s)};return{name:"Sessions API",preload:()=>{t&&console.log("[Sessions API] Preload received (no-op)")},track:e=>i("track",e).catch((e=>{t&&console.error("[Sessions API] track error:",e)})),page:e=>i("page",e,"Page Viewed").catch((e=>{t&&console.error("[Sessions API] page error:",e)})),screen:e=>i("screen",e,"Screen Viewed").catch((e=>{t&&console.error("[Sessions API] screen error:",e)})),identify:e=>{t&&console.log("[Sessions API] Identify received (logged only):",{userId:e.userId,traits:e.traits})}}}(e,t),a=[!1===i.facebook?null:VT(t),!1===i.googleAnalytics?null:dA(t),!1===i.tikTok?null:NA(t)].filter((e=>!!e)),s=async i=>{try{let n=function(e){let t=e??{};return Object.fromEntries(UA.map((e=>[e,LA(t[e])])))}((await e.promoter.get({key:i})).promoter?.tracking);return function(e,t,i){e&&console.log(`[DestinationManager] Fetched config for promoter ${t}:`,i)}(t,i,n),n}catch(e){return function(e,t,i){e&&console.warn(`[DestinationManager] Failed to fetch promoter ${t} config:`,i)}(t,i,e),{}}},d=async(e,i,n)=>{try{await u(e,i,n)}catch(i){t&&console.error(`[DestinationManager] ${e.name} error:`,i)}},c=e=>{try{e.reset?.()}catch(i){t&&console.error(`[DestinationManager] ${e.name} reset error:`,i)}},l=async e=>{let t=n.get(e);if(t)return t;let i=r.get(e);if(i)return i;i=s(e),r.set(e,i);try{let t=await i;return n.set(e,t),t}finally{r.delete(e)}},u=(e,t,i)=>MA[t.type]?.(e,t,i);return{sendEvent:async(e,t)=>{if(!o&&0===a.length)return;let i=o?d(o,e,{}):Promise.resolve();if(0===a.length)return void await i;let n=await l(t);if(!function(e){return UA.some((t=>!!e[t]))}(n))return void await i;let r=Promise.all(a.map((t=>d(t,e,n))));await Promise.all([i,r])},clearCache:()=>{n.clear(),r.clear();for(let e of a)c(e)}}}var qA,GA={},BA=function(){if(qA)return GA;qA=1,Object.defineProperty(GA,"__esModule",{value:!0}),GA.parseCookie=s,GA.parse=s,GA.stringifyCookie=function(i,n){let r=n?.encode||encodeURIComponent,o=[];for(let n of Object.keys(i)){let a=i[n];if(void 0===a)continue;if(!e.test(n))throw TypeError("cookie name is invalid: "+n);let s=r(a);if(!t.test(s))throw TypeError("cookie val is invalid: "+a);o.push(`${n}=${s}`)}return o.join("; ")},GA.stringifySetCookie=d,GA.serialize=d,GA.parseSetCookie=function(e,t){let i=t?.decode||p,n=e.length,o=c(e,0,n),a=l(e,0,o),s=-1===a?{name:"",value:i(u(e,0,o))}:{name:u(e,0,a),value:i(u(e,a+1,o))},d=o+1;for(;d<n;){let t=c(e,d,n),i=l(e,d,t),o=u(e,d,-1===i?t:i),a=-1===i?void 0:u(e,i+1,t);switch(o.toLowerCase()){case"httponly":s.httpOnly=!0;break;case"secure":s.secure=!0;break;case"partitioned":s.partitioned=!0;break;case"domain":s.domain=a;break;case"path":s.path=a;break;case"max-age":a&&r.test(a)&&(s.maxAge=Number(a));break;case"expires":if(!a)break;let e=new Date(a);Number.isFinite(e.valueOf())&&(s.expires=e);break;case"priority":if(!a)break;let t=a.toLowerCase();("low"===t||"medium"===t||"high"===t)&&(s.priority=t);break;case"samesite":if(!a)break;let i=a.toLowerCase();("lax"===i||"strict"===i||"none"===i)&&(s.sameSite=i)}d=t+1}return s},GA.stringifySetCookie=d,GA.serialize=d;let e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,r=/^-?\d+$/,o=Object.prototype.toString,a=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function s(e,t){let i=new a,n=e.length;if(n<2)return i;let r=t?.decode||p,o=0;do{let t=l(e,o,n);if(-1===t)break;let a=c(e,o,n);if(t>a){o=e.lastIndexOf(";",t-1)+1;continue}let s=u(e,o,t);void 0===i[s]&&(i[s]=r(u(e,t+1,a))),o=a+1}while(o<n);return i}function d(r,o,a){let s="object"==typeof r?r:{...a,name:r,value:o+""},d=("object"==typeof o?o:a)?.encode||encodeURIComponent;if(!e.test(s.name))throw TypeError("argument name is invalid: "+s.name);let c=s.value?d(s.value):"";if(!t.test(c))throw TypeError("argument val is invalid: "+s.value);let l=s.name+"="+c;if(void 0!==s.maxAge){if(!Number.isInteger(s.maxAge))throw TypeError("option maxAge is invalid: "+s.maxAge);l+="; Max-Age="+s.maxAge}if(s.domain){if(!i.test(s.domain))throw TypeError("option domain is invalid: "+s.domain);l+="; Domain="+s.domain}if(s.path){if(!n.test(s.path))throw TypeError("option path is invalid: "+s.path);l+="; Path="+s.path}if(s.expires){if(!m(s.expires)||!Number.isFinite(s.expires.valueOf()))throw TypeError("option expires is invalid: "+s.expires);l+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.partitioned&&(l+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw TypeError("option priority is invalid: "+s.priority)}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid: "+s.sameSite)}return l}function c(e,t,i){let n=e.indexOf(";",t);return-1===n?i:n}function l(e,t,i){let n=e.indexOf("=",t);return n<i?n:-1}function u(e,t,i){let n=t,r=i;do{let t=e.charCodeAt(n);if(32!==t&&9!==t)break}while(++n<r);for(;r>n;){let t=e.charCodeAt(r-1);if(32!==t&&9!==t)break;r--}return e.slice(n,r)}function p(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch{return e}}function m(e){return"[object Date]"===o.call(e)}return GA}();function FA(e,t={}){let i=function(e){return e&&"j"===e[0]&&":"===e[1]?e.substr(2):e}(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}var VA=class{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;let e=this.cookies;this.cookies=BA.parse(document.cookie),this._checkChanges(e)};let i=typeof document>"u"?"":document.cookie;this.cookies=function(e){return"string"==typeof e?BA.parse(e):"object"==typeof e&&e?e:{}}(e||i),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=function(){let e=typeof globalThis>"u"?void 0:globalThis.TEST_HAS_DOCUMENT_COOKIE;return"boolean"==typeof e?e:"object"==typeof document&&"string"==typeof document.cookie}()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach((t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:FA(this.cookies[t])})}))}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),FA(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();let t={};for(let i in this.cookies)t[i]=FA(this.cookies[i],e);return t}set(e,t,i){i=i?Object.assign(Object.assign({},this.defaultSetOptions),i):this.defaultSetOptions;let n="string"==typeof t?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:n}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=BA.serialize(e,n,i)),this._emitChange({name:e,value:t,options:i})}remove(e,t){let i=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=BA.serialize(e,"",i)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&1===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){let t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&0===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}removeAllChangeListeners(){for(;this.changeListeners.length>0;)this.removeChangeListener(this.changeListeners[0])}};function zA(){return typeof document>"u"?null:new VA}const WA={deleteCookie:function(e){let t=zA();t&&t.remove(e,{path:"/"})},getCookie:function(e){return zA()?.get(e)??null},getItem:function(e){if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}},removeItem:function(e){if(!(typeof localStorage>"u"))try{localStorage.removeItem(e)}catch{}},setCookie:function(e,t){let i=zA();i&&i.set(e,t,{path:"/",sameSite:"lax",secure:"https:"===window.location.protocol})},setItem:function(e,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(e,t)}catch{}}};function YA(){return function(e){let t=e.getCookie(ka);if(t)return t;let i=Aa();return e.setCookie(ka,i),i}(WA)}function ZA(){return function(e){let t=e.getItem(Ta);if(t)return t;let i=xa();return e.setItem(Ta,i),i}(WA)}function HA(){return globalThis.crypto?.randomUUID?.()??`msg_${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}`}function KA(e="tenant-web"){let t=$T(),i=wT({anonymousId:ZA(),context:t,sessionId:YA()});return{name:e,referrer:t.page.referrer,utmSource:t.campaign?.source,utmMedium:t.campaign?.medium,utmCampaign:t.campaign?.name,browser:JA(i.browser),deviceType:QA(i.device_type),sessionId:JA(i.browser_session_id),anonymousId:JA(i.anonymous_id)}}function JA(e){return"string"==typeof e&&e.length>0?e:void 0}function QA(e){return"MOBILE"===e||"TABLET"===e||"DESKTOP"===e?e:void 0}const XA={AED:{name:"United Arab Emirates Dirham",symbol:"AED",locale:"ar-AE",decimals:2,airwallex:!0},AUD:{name:"Australian Dollar",symbol:"A$",locale:"en-AU",decimals:2,airwallex:!0},BRL:{name:"Brazilian Real",symbol:"R$",locale:"pt-BR",decimals:2,airwallex:!0},CAD:{name:"Canadian Dollar",symbol:"CA$",locale:"en-CA",decimals:2,airwallex:!0},CHF:{name:"Swiss Franc",symbol:"CHF",locale:"de-CH",decimals:2,airwallex:!0},CNY:{name:"Chinese Yuan",symbol:"CN¥",locale:"zh-CN",decimals:2,airwallex:!0},CZK:{name:"Czech Koruna",symbol:"CZK",locale:"cs-CZ",decimals:2,airwallex:!0},DKK:{name:"Danish Krone",symbol:"DKK",locale:"da-DK",decimals:2,airwallex:!0},EUR:{name:"Euro",symbol:"€",locale:"de-DE",decimals:2,airwallex:!0},GBP:{name:"British Pound Sterling",symbol:"£",locale:"en-GB",decimals:2,airwallex:!0},HKD:{name:"Hong Kong Dollar",symbol:"HK$",locale:"zh-HK",decimals:2,airwallex:!0},HUF:{name:"Hungarian Forint",symbol:"HUF",locale:"hu-HU",decimals:2,airwallex:!0},ILS:{name:"Israeli New Sheqel",symbol:"₪",locale:"he-IL",decimals:2,airwallex:!0},JPY:{name:"Japanese Yen",symbol:"¥",locale:"ja-JP",decimals:0,airwallex:!0},KRW:{name:"South Korean Won",symbol:"₩",locale:"ko-KR",decimals:0,airwallex:!0},MXN:{name:"Mexican Peso",symbol:"MX$",locale:"es-MX",decimals:2,airwallex:!0},NOK:{name:"Norwegian Krone",symbol:"NOK",locale:"nb-NO",decimals:2,airwallex:!0},NZD:{name:"New Zealand Dollar",symbol:"NZ$",locale:"en-NZ",decimals:2,airwallex:!0},PLN:{name:"Polish Zloty",symbol:"PLN",locale:"pl-PL",decimals:2,airwallex:!0},RON:{name:"Romanian Leu",symbol:"RON",locale:"ro-RO",decimals:2,airwallex:!0},SEK:{name:"Swedish Krona",symbol:"SEK",locale:"sv-SE",decimals:2,airwallex:!0},SGD:{name:"Singapore Dollar",symbol:"SGD",locale:"en-SG",decimals:2,airwallex:!0},THB:{name:"Thai Baht",symbol:"THB",locale:"th-TH",decimals:2,airwallex:!0},USD:{name:"US Dollar",symbol:"$",locale:"en-US",decimals:2,airwallex:!0},VND:{name:"Vietnamese Dong",symbol:"₫",locale:"vi-VN",decimals:0,airwallex:!0},ZAR:{name:"South African Rand",symbol:"ZAR",locale:"en-ZA",decimals:2,airwallex:!0},BIF:{name:"Burundi Franc",symbol:"BIF",locale:"fr-BI",decimals:0},CLP:{name:"Chilean Peso",symbol:"CLP",locale:"es-CL",decimals:0},DJF:{name:"Djibouti Franc",symbol:"DJF",locale:"fr-DJ",decimals:0},GNF:{name:"Guinea Franc",symbol:"GNF",locale:"fr-GN",decimals:0},ISK:{name:"Iceland Krona",symbol:"ISK",locale:"is-IS",decimals:0},KMF:{name:"Comoro Franc",symbol:"KMF",locale:"fr-KM",decimals:0},PYG:{name:"Paraguayan Guarani",symbol:"PYG",locale:"es-PY",decimals:0},RWF:{name:"Rwanda Franc",symbol:"RWF",locale:"rw-RW",decimals:0},SLE:{name:"Sierra Leonean Leone",symbol:"Le",locale:"en-SL",decimals:0},UGX:{name:"Uganda Shilling",symbol:"UGX",locale:"en-UG",decimals:0},VUV:{name:"Vanuatu Vatu",symbol:"VUV",locale:"en-VU",decimals:0},XAF:{name:"CFA Franc BEAC",symbol:"FCFA",locale:"fr-CM",decimals:0},XOF:{name:"CFA Franc BCEAO",symbol:"CFA",locale:"fr-SN",decimals:0},XPF:{name:"CFP Franc",symbol:"CFPF",locale:"fr-PF",decimals:0},BHD:{name:"Bahraini Dinar",symbol:"BHD",locale:"ar-BH",decimals:3},JOD:{name:"Jordanian Dinar",symbol:"JOD",locale:"ar-JO",decimals:3},KWD:{name:"Kuwaiti Dinar",symbol:"KWD",locale:"ar-KW",decimals:3},LYD:{name:"Libyan Dinar",symbol:"LYD",locale:"ar-LY",decimals:3},OMR:{name:"Rial Omani",symbol:"OMR",locale:"ar-OM",decimals:3},TND:{name:"Tunisian Dinar",symbol:"TND",locale:"ar-TN",decimals:3},ALL:{name:"Albanian Lek",symbol:"ALL",locale:"sq-AL",decimals:2},AMD:{name:"Armenian Dram",symbol:"֏",locale:"hy-AM",decimals:2},ANG:{name:"Netherlands Antillean Guilder",symbol:"ANG",locale:"nl-CW",decimals:2},AOA:{name:"Angolan Kwanza",symbol:"Kz",locale:"pt-AO",decimals:2},ARS:{name:"Argentine Peso",symbol:"ARS",locale:"es-AR",decimals:2},AWG:{name:"Aruban Florin",symbol:"AWG",locale:"nl-AW",decimals:2},AZN:{name:"Azerbaijani Manat",symbol:"₼",locale:"az-AZ",decimals:2},BAM:{name:"Convertible Mark",symbol:"KM",locale:"bs-BA",decimals:2},BBD:{name:"Barbadian Dollar",symbol:"BBD",locale:"en-BB",decimals:2},BDT:{name:"Bangladeshi Taka",symbol:"BDT",locale:"bn-BD",decimals:2},BGN:{name:"Bulgarian Lev",symbol:"лв",locale:"bg-BG",decimals:2},BMD:{name:"Bermudian Dollar",symbol:"BMD",locale:"en-BM",decimals:2},BND:{name:"Brunei Dollar",symbol:"BND",locale:"en-BN",decimals:2},BOB:{name:"Bolivian Boliviano",symbol:"BOB",locale:"es-BO",decimals:2},BSD:{name:"Bahamian Dollar",symbol:"BSD",locale:"en-BS",decimals:2},BTN:{name:"Bhutanese Ngultrum",symbol:"Nu.",locale:"dz-BT",decimals:2},BWP:{name:"Botswanan Pula",symbol:"BWP",locale:"en-BW",decimals:2},BZD:{name:"Belize Dollar",symbol:"BZD",locale:"en-BZ",decimals:2},COP:{name:"Colombian Peso",symbol:"COP",locale:"es-CO",decimals:2},CRC:{name:"Costa Rican Colon",symbol:"CRC",locale:"es-CR",decimals:2},CVE:{name:"Cabo Verde Escudo",symbol:"CVE",locale:"pt-CV",decimals:2},DOP:{name:"Dominican Peso",symbol:"DOP",locale:"es-DO",decimals:2},DZD:{name:"Algerian Dinar",symbol:"DZD",locale:"ar-DZ",decimals:2},EGP:{name:"Egyptian Pound",symbol:"EGP",locale:"ar-EG",decimals:2},ERN:{name:"Eritrean Nakfa",symbol:"Nfk",locale:"ti-ER",decimals:2},ETB:{name:"Ethiopian Birr",symbol:"ETB",locale:"am-ET",decimals:2},FJD:{name:"Fijian Dollar",symbol:"FJD",locale:"en-FJ",decimals:2},FKP:{name:"Falkland Islands Pound",symbol:"FKP",locale:"en-FK",decimals:2},GEL:{name:"Georgian Lari",symbol:"₾",locale:"ka-GE",decimals:2},GHS:{name:"Ghana Cedi",symbol:"GH₵",locale:"en-GH",decimals:2},GIP:{name:"Gibraltar Pound",symbol:"GIP",locale:"en-GI",decimals:2},GMD:{name:"Gambian Dalasi",symbol:"GMD",locale:"en-GM",decimals:2},GTQ:{name:"Guatemalan Quetzal",symbol:"GTQ",locale:"es-GT",decimals:2},GYD:{name:"Guyanaese Dollar",symbol:"GYD",locale:"en-GY",decimals:2},HNL:{name:"Honduran Lempira",symbol:"HNL",locale:"es-HN",decimals:2},IDR:{name:"Indonesian Rupiah",symbol:"IDR",locale:"id-ID",decimals:2},INR:{name:"Indian Rupee",symbol:"₹",locale:"en-IN",decimals:2},JMD:{name:"Jamaican Dollar",symbol:"JMD",locale:"en-JM",decimals:2},KES:{name:"Kenyan Shilling",symbol:"KES",locale:"en-KE",decimals:2},KGS:{name:"Kyrgyzstani Som",symbol:"сом",locale:"ky-KG",decimals:2},KHR:{name:"Cambodian Riel",symbol:"KHR",locale:"km-KH",decimals:2},KYD:{name:"Cayman Islands Dollar",symbol:"KYD",locale:"en-KY",decimals:2},KZT:{name:"Kazakhstani Tenge",symbol:"KZT",locale:"kk-KZ",decimals:2},LAK:{name:"Laotian Kip",symbol:"LAK",locale:"lo-LA",decimals:2},LBP:{name:"Lebanese Pound",symbol:"LBP",locale:"ar-LB",decimals:2},LKR:{name:"Sri Lankan Rupee",symbol:"LKR",locale:"en-LK",decimals:2},LRD:{name:"Liberian Dollar",symbol:"LRD",locale:"en-LR",decimals:2},LSL:{name:"Lesotho Loti",symbol:"LSL",locale:"en-LS",decimals:2},MAD:{name:"Moroccan Dirham",symbol:"MAD",locale:"ar-MA",decimals:2},MDL:{name:"Moldovan Leu",symbol:"MDL",locale:"ro-MD",decimals:2},MGA:{name:"Malagasy Ariary",symbol:"Ar",locale:"fr-MG",decimals:2},MKD:{name:"Macedonian Denar",symbol:"ден",locale:"mk-MK",decimals:2},MNT:{name:"Mongolian Tugrik",symbol:"MNT",locale:"mn-MN",decimals:2},MOP:{name:"Macanese Pataca",symbol:"MOP",locale:"zh-MO",decimals:2},MUR:{name:"Mauritian Rupee",symbol:"MUR",locale:"en-MU",decimals:2},MVR:{name:"Maldivian Rufiyaa",symbol:"MVR",locale:"dv-MV",decimals:2},MWK:{name:"Malawian Kwacha",symbol:"MWK",locale:"en-MW",decimals:2},MYR:{name:"Malaysian Ringgit",symbol:"MYR",locale:"ms-MY",decimals:2},NAD:{name:"Namibian Dollar",symbol:"NAD",locale:"en-NA",decimals:2},NGN:{name:"Nigerian Naira",symbol:"NGN",locale:"en-NG",decimals:2},NIO:{name:"Nicaraguan Cordoba",symbol:"NIO",locale:"es-NI",decimals:2},NPR:{name:"Nepalese Rupee",symbol:"NPR",locale:"ne-NP",decimals:2},PAB:{name:"Panamanian Balboa",symbol:"PAB",locale:"es-PA",decimals:2},PEN:{name:"Peruvian Nuevo Sol",symbol:"PEN",locale:"es-PE",decimals:2},PGK:{name:"Papua New Guinean Kina",symbol:"PGK",locale:"en-PG",decimals:2},PHP:{name:"Philippine Peso",symbol:"PHP",locale:"en-PH",decimals:2},PKR:{name:"Pakistani Rupee",symbol:"PKR",locale:"en-PK",decimals:2},QAR:{name:"Qatari Rial",symbol:"QAR",locale:"ar-QA",decimals:2},RSD:{name:"Serbian Dinar",symbol:"din.",locale:"sr-RS",decimals:2},SAR:{name:"Saudi Riyal",symbol:"SAR",locale:"ar-SA",decimals:2},SBD:{name:"Solomon Islands Dollar",symbol:"SBD",locale:"en-SB",decimals:2},SCR:{name:"Seychellois Rupee",symbol:"SCR",locale:"en-SC",decimals:2},SHP:{name:"Saint Helena Pound",symbol:"SHP",locale:"en-SH",decimals:2},SRD:{name:"Surinamese Dollar",symbol:"SRD",locale:"nl-SR",decimals:2},STD:{name:"Sao Tome and Principe Dobra",symbol:"STD",locale:"pt-ST",decimals:2},SVC:{name:"Salvadoran Colon",symbol:"SVC",locale:"es-SV",decimals:2},SZL:{name:"Swazi Lilangeni",symbol:"SZL",locale:"en-SZ",decimals:2},TJS:{name:"Tajikistani Somoni",symbol:"SM",locale:"tg-TJ",decimals:2},TMT:{name:"Turkmenistani Manat",symbol:"TMT",locale:"tk-TM",decimals:2},TOP:{name:"Tongan Pa'anga",symbol:"TOP",locale:"to-TO",decimals:2},TRY:{name:"Turkish Lira",symbol:"₺",locale:"tr-TR",decimals:2},TTD:{name:"Trinidad and Tobago Dollar",symbol:"TTD",locale:"en-TT",decimals:2},TWD:{name:"New Taiwan Dollar",symbol:"NT$",locale:"zh-TW",decimals:2},TZS:{name:"Tanzanian Shilling",symbol:"TZS",locale:"sw-TZ",decimals:2},UAH:{name:"Ukrainian Hryvnia",symbol:"UAH",locale:"uk-UA",decimals:2},UYU:{name:"Uruguayan Peso",symbol:"UYU",locale:"es-UY",decimals:2},UZS:{name:"Uzbekistani Som",symbol:"UZS",locale:"uz-UZ",decimals:2},WST:{name:"Samoan Tala",symbol:"WST",locale:"sm-WS",decimals:2},XCD:{name:"East Caribbean Dollar",symbol:"EC$",locale:"en-AG",decimals:2},ZMW:{name:"Zambian Kwacha",symbol:"ZK",locale:"en-ZM",decimals:2},ZWL:{name:"Zimbabwean Dollar",symbol:"ZWL",locale:"en-ZW",decimals:2}};Object.entries(XA).filter((([,e])=>e.airwallex)).map((([e])=>e));var ex,tx,ix={},nx={},rx={},ox={};function ax(){return tx||(tx=1,ox.tzName=function(e,t,i="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:i}).format(t).split(/\s/g).slice(2).join(" ")}),ox}var sx,dx,cx,lx={},ux={};function px(){if(sx)return ux;sx=1,ux.tzOffset=function(r,o){try{const i=(e[r]||=new Intl.DateTimeFormat("en-US",{timeZone:r,timeZoneName:"longOffset"}).format)(o).split("GMT")[1];return i in t?t[i]:n(i,i.split(":"))}catch{if(r in t)return t[r];const e=r?.match(i);return e?n(r,e.slice(1)):NaN}};const e={},t={},i=/([+-]\d\d):?(\d\d)?/;function n(e,i){const n=+(i[0]||0),r=+(i[1]||0),o=+(i[2]||0)/60;return t[e]=60*n+r>0?60*n+r+o:60*n-r-o}return ux}function mx(){if(dx)return lx;dx=1,lx.TZDateMini=void 0;var e=px();class t extends Date{constructor(...t){super(),t.length>1&&"string"==typeof t[t.length-1]&&(this.timeZone=t.pop()),this.internal=new Date,isNaN((0,e.tzOffset)(this.timeZone,this))?this.setTime(NaN):t.length?"number"==typeof t[0]&&(1===t.length||2===t.length&&"number"!=typeof t[1])?this.setTime(t[0]):"string"==typeof t[0]?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),r(this,t)):this.setTime(Date.now())}static tz(e,...i){return i.length?new t(...i,e):new t(Date.now(),e)}withTimeZone(e){return new t(+this,e)}getTimezoneOffset(){const t=-(0,e.tzOffset)(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(e){return Date.prototype.setTime.apply(this,arguments),n(this),+this}[Symbol.for("constructDateFrom")](e){return new t(+new Date(e),this.timeZone)}}lx.TZDateMini=t;const i=/^(get|set)(?!UTC)/;function n(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,t)))}function r(t,i){const r=Array.isArray(i)?function(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}(i):+t.internal,a=(0,e.tzOffset)(t.timeZone,t),s=a>0?Math.floor(a):Math.ceil(a),d=new Date(+t);d.setUTCHours(d.getUTCHours()-1);const c=-new Date(+t).getTimezoneOffset(),l=-new Date(+d).getTimezoneOffset();let u=c;if(c-l&&c!==s&&Date.prototype.getHours.apply(t)!==(Array.isArray(i)?i[3]||0:t.internal.getUTCHours())){const i=new Date(+t),n=c-s;n&&i.setUTCMinutes(i.getUTCMinutes()+n);const r=(0,e.tzOffset)(t.timeZone,i);(r>0?Math.floor(r):Math.ceil(r))===s&&(u=l)}const p=u-s;p&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+p);const m=new Date(+t);m.setUTCSeconds(0);const h=c>0?m.getSeconds():(m.getSeconds()-60)%60,f=Math.round(-60*(0,e.tzOffset)(t.timeZone,t))%60;(f||h)&&Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+f+h);const y=(0,e.tzOffset)(t.timeZone,t),g=y>0?Math.floor(y):Math.ceil(y),v=g!==s,b=-new Date(+t).getTimezoneOffset()-g-p,w=g-s,$=r-60*g*1e3,I=w>0&&o(t)-r==60*w*1e3&&o(t,$)!==r;if(v&&b&&!I){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+b);const i=(0,e.tzOffset)(t.timeZone,t),n=g-(i>0?Math.floor(i):Math.ceil(i));n&&b<0&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+n)}n(t);const E=(i?r:r+1e3*f)-+t.internal;E&&Math.abs(E)<18e5&&(Date.prototype.setTime.call(t,+t+E),n(t))}function o(t,i){const n=new Date(i??+t);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(60*-(0,e.tzOffset)(t.timeZone,n))),+n}return Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!i.test(e))return;const o=e.replace(i,"$1UTC");t.prototype[o]&&(e.startsWith("get")?t.prototype[e]=function(){return this.internal[o]()}:(t.prototype[e]=function(){return Date.prototype[o].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),r(e)}(this),+this},t.prototype[o]=function(){return Date.prototype[o].apply(this,arguments),n(this),+this}))})),lx}function hx(){if(cx)return rx;cx=1,rx.TZDate=void 0;var e=ax(),t=mx();class i extends t.TZDateMini{static tz(e,...t){return t.length?new i(...t,e):new i(Date.now(),e)}toISOString(){const[e,t,i]=this.tzComponents(),n=`${e}${t}:${i}`;return this.internal.toISOString().slice(0,-1)+n}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,i,n]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${i} ${t} ${n}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[i,n,r]=this.tzComponents();return`${t} GMT${i}${n}${r} (${(0,e.tzName)(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",(Math.floor(Math.abs(e)/60)+"").padStart(2,"0"),(Math.abs(e)%60+"").padStart(2,"0")]}withTimeZone(e){return new i(+this,e)}[Symbol.for("constructDateFrom")](e){return new i(+new Date(e),this.timeZone)}}return rx.TZDate=i,rx}var fx,yx,gx,vx={},bx={},wx=(gx||(gx=1,function(e){var t=(ex||(ex=1,nx.constructFromSymbol=void 0,nx.constructFromSymbol=Symbol.for("constructDateFrom")),nx);Object.keys(t).forEach((function(i){"default"!==i&&"__esModule"!==i&&(i in e&&e[i]===t[i]||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}}))}));var i=hx();Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var n=mx();Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===n[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}}))}));var r=function(){if(fx)return vx;fx=1,vx.tz=void 0;var e=hx();return vx.tz=t=>i=>e.TZDate.tz(t,+new Date(i)),vx}();Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))}));var o=px();Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var a=function(){if(yx)return bx;yx=1,bx.tzScan=function(t,i){const n=[],r=new Date(i.start);r.setUTCSeconds(0,0);const o=new Date(i.end);o.setUTCSeconds(0,0);const a=+o;let s=(0,e.tzOffset)(t,r);for(;+r<a;){r.setUTCMonth(r.getUTCMonth()+1);const i=(0,e.tzOffset)(t,r);if(i!=s){const i=new Date(r);i.setUTCMonth(i.getUTCMonth()-1);const o=+r;for(s=(0,e.tzOffset)(t,i);+i<o;){i.setUTCDate(i.getUTCDate()+1);const r=(0,e.tzOffset)(t,i);if(r!=s){const r=new Date(i);r.setUTCDate(r.getUTCDate()-1);const o=+i;for(s=(0,e.tzOffset)(t,r);+r<o;){r.setUTCHours(r.getUTCHours()+1);const i=(0,e.tzOffset)(t,r);i!==s&&n.push({date:new Date(r),change:i-s,offset:i}),s=i}}s=r}}s=i}return n};var e=px();return bx}();Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}));var s=ax();Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}))}(ix)),ix);function $x(e,t){const[i,n,r,o,a,s]=function(e){const[t,i]=e.split("T");if(!t||!i)throw Error("Invalid naive datetime format: "+e);const n=[...t.split("-"),...i.split(":")].map(Number);if(n.length<6)throw Error("Invalid naive datetime format: "+e);return n.slice(0,6)}(e);return new wx.TZDate(i,n-1,r,o,a,s,t)}function Ix(e,t){return $x(e,t)<new wx.TZDate(new Date,t)}function Ex(e,t){return $x(e,t)>new wx.TZDate(new Date,t)}function kx(e){return null==e||-1===e?1/0:Math.max(0,e)}function Tx(e){return Math.min(kx(e.admission.available),kx(e.admission.limit),kx(e.section?.available),kx(e.section?.limit))}function Ax(e){return Tx(e)<=0}function xx(e,t,i,n=new Date){return function(e,t,i,n=new Date){return"AFTER_ADMISSION"===e.visibility&&!function(e,t,i=new Date){return!!e&&(!!(e.saleEndsAt&&$x(e.saleEndsAt,t)<i)||null!=e.capacity&&-1!==e.capacity&&(e.sold??0)>=e.capacity)}(function(e,t){if("AFTER_ADMISSION"===e.visibility&&e.visibleAfterAdmissionId)return t.find((t=>t.id===e.visibleAfterAdmissionId))}(e,t),i,n)}(e,t,i,n)?{text:"Available soon"}:null}function Sx(e){return e?.trim().toUpperCase()??""}function Dx(e){return`${e.admissionId}::${e.sectionId??"none"}`}const Ox=["__puppeteer_evaluation_script__","__puppeteer"],Cx=["__playwright","__playwright__binding__","__pw_manual","__pwInitScripts"],Px=["_selenium","callSelenium","_Selenium_IDE_Recorder","__selenium_evaluate","__webdriver_evaluate","__webdriver_script_function","__fxdriver_evaluate","domAutomation","domAutomationController"],_x=["callPhantom","_phantom","__phantomas","__casper","slimer","__nightmare"],Rx=["$cdc_","$wdc_","$chrome_asyncScriptInfo"];function Nx(e,t){return t.some((t=>t in e))}const Mx="en-US";function Ux(e,t){return`${e}::${t||"none"}`}function Lx(e){return e?"number"==typeof e.total?e.total:(e.base??0)+(e.booking??0):0}function jx(e){return e?Math.max(Lx(e)-(e.booking??0),0):0}function qx(e){return e.location?.timeZone??"UTC"}function Gx(e){return new Map(e.sections.map((e=>[e.id??"",e])))}function Bx(e,t){return!e.sectionId||t.has(e.sectionId)}function Fx(e){const t=Gx(e),i=qx(e);return e.admissions.some((n=>function(e,t,i,n){return!!Bx(e,n)&&!xx(e,t,i)&&!!function(e,t){return!Ex(e.saleStartsAt,t)&&!Ix(e.saleEndsAt,t)}(e,i)&&function(e,t){return Tx({admission:e,section:t})>0}(e,function(e,t){if(e.sectionId)return t.get(e.sectionId)}(e,n))}(n,e.admissions,i,t)))}function Vx(e,t,i){if(!Ex(e.saleStartsAt,t))return null;const n=$x(e.saleStartsAt,"UTC");return{text:`On sale ${zx(i,{day:"numeric",month:"short",timeZone:"UTC",weekday:"short"}).format(n)} · ${zx(i,{hour:"numeric",minute:"2-digit",timeZone:"UTC"}).format(n)}`,tone:"muted"}}function zx(e,t){try{return new Intl.DateTimeFormat(e,t)}catch{return new Intl.DateTimeFormat(Mx,t)}}function Wx(e){const t=Ux(e.admission.id??"",e.section.id??null);return eS({admission:e.admission,initialPrice:e.initialAdmissionPrices?.[t],previewItem:e.previewItems.get(t),quoteItem:e.quoteItems.get(t)}).base}function Yx(e){return null==e||-1===e?1/0:Math.max(0,e)}function Zx(e,t,i){if(!e.id)return[];const n=t.filter((t=>t.sectionId===e.id)).sort(((e,t)=>e.order-t.order));if("STACKED"!==e.visibility||n.length<=1)return n;const r=i.mode??"default",o=n.filter((t=>function(e){return"door"===e.mode||!e.event||!Xx({admission:e.admission,event:e.event,section:e.section}).disabled}({admission:t,event:i.event,mode:r,section:e}))),a=o.length>0?o:n,[s,d]=[...a].sort(function(e,t){const i=tS(e.previewQuote??null),n=tS(e.quote??null);return(r,o)=>{const a=Wx({admission:r,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:i,quoteItems:n,section:t})-Wx({admission:o,initialAdmissionPrices:e.initialAdmissionPrices,previewItems:i,quoteItems:n,section:t});if(0!==a)return a;const s=r.order-o.order;return 0!==s?s:(r.id??"").localeCompare(o.id??"")}}(i,e));return s?d&&function(e){const t=Yx(e.available);if(!Number.isFinite(t))return!1;const i=Yx(e.limit);return Number.isFinite(i)?i>t:t<10}(s)?[s,d]:[s]:[]}function Hx(e,t,i){return e.map((e=>({admissions:Zx(e,t,i),section:e,type:"section"}))).filter((e=>e.admissions.length>0))}function Kx(e){return"section"===e.type?e.section.order:e.admission.order}function Jx(e,t){return function(e,t){return-1===e.available&&-1===e.capacity&&(!t||-1===t.available)}(e,t)?10:Math.min(Tx({admission:e,section:t}),10)}function Qx(e,t,i){const n=e.available??0;return[!t,!i,n>0,n<=5].every(Boolean)}function Xx(e){const t=qx(e.event),i=xx(e.admission,e.event.admissions,t),n=Ex(e.admission.saleStartsAt,t),r=Ix(e.admission.saleEndsAt,t),o=!!e.sectionSoldOut||r&&"SOLD_OUT"===e.admission.saleEndsBehavior||Ax({admission:e.admission,section:e.section}),a=o||n||r,s=function(e){return"DOOR"===e.value&&(e.soldOut||e.saleEnded)?{text:"Available At Door",tone:"success"}:e.soldOut?{text:"Sold Out",tone:"destructive"}:e.saleEnded?{text:"Sale Ended",tone:"destructive"}:null}({saleEnded:r,soldOut:o,value:e.admission.saleEndsBehavior});return{disabled:a||!!i,label:i?{...i,tone:"muted"}:Vx(e.admission,t,e.locale??Mx),maxQuantity:Jx(e.admission,e.section),postSale:r,showScarcity:Qx(e.admission,o,a),soldOut:o,statusLabel:s?.text??null,statusTone:s?.tone??null}}function eS(e){const t=e.quoteItem??e.previewItem;if(t){const e=function(e){return Math.max(e?.quantity??1,1)}(t),i=Math.round(t.price.booking/e),n=Math.max(Math.round((t.price.total??t.price.base+t.price.booking+t.price.discount)/e)-i,0);return t.price.discount>=0?{base:n,discounted:!1,fees:i}:{base:n,discounted:!0,fees:i,gross:Math.max(Math.round((t.price.gross??t.price.base+t.price.booking)/e)-i,0)}}if(e.initialPrice&&e.initialPrice.discount<0){const t=e.admission.price.booking??0;return{base:Math.max(e.initialPrice.total-t,0),discounted:!0,fees:t,gross:Math.max(e.initialPrice.gross-t,0)}}return{base:jx(e.admission.price),discounted:!1,fees:e.admission.price.booking??0}}function tS(e){return function(e){return new Map((e?.items??[]).filter((e=>"ADMISSION"===e.kind&&e.admissionId)).map((e=>[Dx({admissionId:e.admissionId??"",sectionId:e.sectionId}),e])))}(e)}const iS=Ux,nS=Lx,rS=qx,oS=function(e){const t=function(e){return Ix(e.entryEndsAt,qx(e))}(e),i=e.url||void 0,n=function(e){return!Fx(e)&&"DOOR"===function(e){const t=Gx(e),i=e.admissions.filter((e=>Bx(e,t)));if(0!==i.length)return Fx(e)?"ONLINE":function(e,t){const i=e.filter((e=>Ix(e.saleEndsAt,t)));if(0!==i.length)return i.some((e=>"DOOR"===e.saleEndsBehavior))?"DOOR":i.every((e=>"SOLD_OUT"===e.saleEndsBehavior))?"SOLD_OUT":"SALE_ENDED"}(i,qx(e))}(e)}(e),r=!t&&!!i,o=!t&&!r&&function(e){const t=Gx(e);return e.admissions.some((e=>Bx(e,t)))}(e);return{externalTicketUrl:i,isDoorOnly:n,isEnded:t,isUnavailableForSale:!n&&!Fx(e)&&o,showExternalTicketing:r,showTicketing:o,ticketHeading:n?"Tickets at the Door":"Get Tickets"}};function aS(e){return Xx(e)}function sS(e){return tS(e)}const dS=function(e){const t=new Set(e.sections.map((e=>e.id))),i=qx(e);return e.admissions.filter((n=>!(xx(n,e.admissions,i)||n.sectionId&&!t.has(n.sectionId)||Ex(n.saleStartsAt,i)||Ix(n.saleEndsAt,i)))).flatMap((e=>e.id?[{admissionId:e.id,quantity:1,sectionId:e.sectionId??void 0}]:[]))},cS=e=>e.price?.total??0;function lS(e,t){return function(e,t){const i=function(e){return XA[e]?.decimals??2}(t),n=10**i;return Number(e)/n}(e,t??"")}function uS(e,t){return lS(nS(e),e?.currency??t)}function pS(e,t){return lS(cS(e),e.price?.currency??t)}function mS(e,t){return e instanceof Error?e.message:t}function hS(e){const t=function(e){if(e&&"object"==typeof e)return e.code}(e);return"string"==typeof t?t:void 0}async function fS(e,t){let i;const n=new Promise(((t,n)=>{i=setTimeout((()=>{e.abort(),n(Error("The request timed out"))}),15e3)}));try{return await Promise.race([t(e.signal),n])}finally{i&&clearTimeout(i)}}function yS(e){try{return JSON.parse(e)}catch{return null}}function gS(e){return e.teamId?e.promoterId?null:"missing_promoter_id":"missing_team_id"}function vS(e){return[e.location?.venue?.name,e.location?.name].find(Boolean)}function bS(e){return e||void 0}function wS(e){if(!e)return"external site";try{return new URL(e).hostname.replace(/^www\./,"")}catch{return"external site"}}function $S(e){return!!e?.items?.length}function IS(e){return{product_id:e.admissionId,sku:e.admissionId,quantity:e.quantity,admission_id:e.admissionId,section_id:e.sectionId}}function ES({event:e,admission:t,section:i}){return{name:t?.name,category:e?.name,variant:i?.name}}function kS(e){return{price:uS(e.price),price_base:e.price?.base,price_booking_fee:e.price?.booking}}const TS=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M8 2v4"}),r("path",{d:"M16 2v4"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),r("path",{d:"M3 10h18"})),AS=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),r("circle",{cx:"12",cy:"10",r:"3"})),xS=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.checkoutInit=n(this,"checkoutInit"),this.cartUpdate=n(this,"cartUpdate"),this.errorOccurred=n(this,"errorOccurred"),this.analyticsEventSkipped=n(this,"analyticsEventSkipped")}get host(){return this}tenantId;eventId;apiUrl="https://api.session.services";locale="en-US";returnUrl;returnDestinationKey;createOrder;couponCode;initialAdmissionPrices;initialPreviewQuote;passcode;stickyCheckout=!1;theme="system";enableAnalytics=!0;debugAnalytics=!1;event=null;selectedItems=new Map;quote=null;previewQuote=null;initialLoading=!0;eventLoading=!1;retryLoading=!1;passcodeLoading=!1;error=null;errorKind=null;refreshError=null;quoteLoading=!1;previewLoading=!1;quoteError=null;couponError=null;couponInput="";appliedCouponCode="";passcodeInput="";activePasscode="";passcodeDenied=!1;selectionPrompt=!1;checkoutLoading=!1;checkoutError=null;currentTheme="light";openModalAdmissionId=null;verificationRequired=!1;checkoutInit;cartUpdate;errorOccurred;analyticsEventSkipped;client;analytics;mediaQueryList;requestId=0;previewRequestId=0;eventRequestId=0;checkoutRequestId=0;couponRequestId=0;initializeId=0;initialSettled=!1;active=!0;trackedIdentity;quoteRevision;checkoutIdempotencyKeys=new Map;eventController;quoteController;previewController;checkoutController;couponController;quoteTimer;promptTimer;botBypassed=!1;modalTrigger;modalFocusPending=!1;modalRestorePending=!1;connectedCallback(){this.active=!0,"undefined"!=typeof window&&window.addEventListener("popstate",this.handleDiscountQueryChange)}componentWillLoad(){this.startInitialization()}componentDidRender(){if(this.modalFocusPending){const e=this.host.shadowRoot?.querySelector(".modal-content");if(!e)return;return this.modalFocusPending=!1,void e.querySelector("button")?.focus()}this.modalRestorePending&&(this.modalRestorePending=!1,this.modalTrigger?.focus(),this.modalTrigger=void 0)}propsChanged(){this.startInitialization()}couponCodeChanged(){this.setInitialCoupon().catch((e=>{this.setCouponError(mS(e,"Failed to update coupon"))}))}themeChanged(){this.setupTheme()}disconnectedCallback(){this.active=!1,this.initializeId++,this.invalidateRequests(),"undefined"!=typeof window&&window.removeEventListener&&window.removeEventListener("popstate",this.handleDiscountQueryChange),this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),document.removeEventListener("keydown",this.handleModalKeyDown),this.clearQuoteTimer(),this.clearPromptTimer()}handleDiscountQueryChange=()=>{Sx(this.couponCode)||this.setInitialCoupon().catch((()=>{}))};continueAfterVerification=async()=>{this.botBypassed=!0,this.verificationRequired=!1;const e=this.initializeComponent(),t=this.initializeId;try{await e}catch(e){t===this.initializeId&&this.handleInitializationError(e)}};startInitialization(){const e=this.initializeComponent(),t=this.initializeId;e.catch((e=>{t===this.initializeId&&this.handleInitializationError(e)}))}handleInitializationError=e=>{const t=mS(e,"Failed to load event data");this.error=t,this.errorKind="transient",this.finishInitialLoad(!this.initialSettled),this.errorOccurred.emit({error:t})};async initializeComponent(){const e=++this.initializeId,t=!this.initialSettled;if(this.invalidateRequests(),this.error=null,this.errorKind=null,this.refreshError=null,this.event=null,this.selectedItems=new Map,this.quote=null,this.previewQuote=null,this.quoteError=null,this.checkoutError=null,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutLoading=!1,this.couponError=null,this.couponInput=this.initialCouponCode(),this.appliedCouponCode=this.couponInput,this.activePasscode=this.passcode||"",this.passcodeInput=this.activePasscode,this.passcodeDenied=!1,this.verificationRequired=!1,this.initialLoading=t,this.eventLoading=!t,this.retryLoading=!1,this.passcodeLoading=!1,!this.tenantId||!this.eventId)return this.error="Missing required configuration: tenantId and eventId",this.errorKind="configuration",void this.finishInitialLoad(t);if(this.setupTheme(),!this.botBypassed&&function(e){try{return"https://api.session.services"===new URL(e).origin}catch{return!1}}(this.apiUrl)&&function(){try{const e=function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator)return{globals:window,root:document.documentElement,userAgent:navigator.userAgent,webdriver:navigator.webdriver}}();return e?function(e){const t=Object.keys(e.globals),i=[!0===e.webdriver?"webdriver":void 0,/HeadlessChrome|Playwright|PhantomJS/i.test(e.userAgent)?"automation-user-agent":void 0,Nx(e.globals,Ox)?"puppeteer":void 0,Nx(e.globals,Cx)?"playwright":void 0,Nx(e.globals,Px)||e.root.hasAttribute("webdriver")||e.root.hasAttribute("selenium")?"selenium":void 0,t.some((e=>Rx.some((t=>e.startsWith(t)))))?"chromedriver":void 0,Nx(e.globals,_x)?"phantomjs":void 0].filter((e=>void 0!==e));return{bot:i.length>0,signals:i}}(e):{bot:!1,signals:[]}}catch{return{bot:!1,signals:[]}}}().bot)return this.verificationRequired=!0,void this.finishInitialLoad(t);this.client=function(e){return Ds(new $I(cT,{url:uT(e.environment),headers:{"x-tenant-id":e.tenantId??"tnt_01jqpj2t2kfvmstt6f6tzkbaf2",...e.headers??{}}}))}({environment:this.apiUrl,tenantId:this.tenantId}),this.analytics=void 0;const i=await this.loadEventData({mode:t?"initial":"refresh"});e===this.initializeId&&"success"===i.status&&(this.handleLoadedEvent(i.event),await this.updatePreviewQuote())}handleLoadedEvent(e){const t=`${this.apiUrl}::${this.tenantId}::${this.eventId}`;this.setupAnalytics(e),t!==this.trackedIdentity&&(this.trackedIdentity=t,this.trackLoadedEvent(e))}finishInitialLoad(e){e&&(this.initialSettled=!0,this.initialLoading=!1),this.eventLoading=!1}invalidateRequests(){this.eventRequestId++,this.requestId++,this.previewRequestId++,this.checkoutRequestId++,this.couponRequestId++,this.eventController?.abort(),this.quoteController?.abort(),this.previewController?.abort(),this.checkoutController?.abort(),this.couponController?.abort(),this.eventController=void 0,this.quoteController=void 0,this.previewController=void 0,this.checkoutController=void 0,this.couponController=void 0,this.clearQuoteTimer(),this.quoteRevision=void 0,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutLoading=!1}async setInitialCoupon(){const e=this.initialCouponCode();if(this.couponInput=e,this.quoteError=null,this.couponError=null,!this.event)return this.appliedCouponCode=e,void(this.previewQuote=this.activeInitialPreviewQuote(e));this.selectedItems.size>0?await this.applyCartCoupon(e):await this.applyPreviewCoupon(e)}initialCouponCode(){return Sx(this.couponCode)||("undefined"!=typeof window&&window.location?Sx(function(e){return new URLSearchParams(e).get("discount")??""}(window.location.search)):"")}parsedInitialPreviewQuote(){return this.initialPreviewQuote?"string"!=typeof this.initialPreviewQuote?this.initialPreviewQuote:yS(this.initialPreviewQuote):null}parsedInitialAdmissionPrices(){if(this.initialAdmissionPrices)return"string"!=typeof this.initialAdmissionPrices?this.initialAdmissionPrices:yS(this.initialAdmissionPrices)??void 0}activeInitialPreviewQuote(e=this.appliedCouponCode){return e?e!==this.initialCouponCode()?null:this.parsedInitialPreviewQuote():null}activeInitialAdmissionPrices(){if(this.appliedCouponCode&&this.appliedCouponCode===this.initialCouponCode())return this.parsedInitialAdmissionPrices()}setupTheme(){this.mediaQueryList&&this.mediaQueryList.removeEventListener("change",this.handleSystemThemeChange),"system"===this.theme?(this.mediaQueryList=window.matchMedia("(prefers-color-scheme: dark)"),this.currentTheme=this.mediaQueryList.matches?"dark":"light",this.mediaQueryList.addEventListener("change",this.handleSystemThemeChange)):this.currentTheme=this.theme}handleSystemThemeChange=e=>{"system"===this.theme&&(this.currentTheme=e.matches?"dark":"light")};trackEvent(e,t={}){const i=this.analyticsContext(e);i&&i.analytics.track(e,{...this.analyticsProperties(i.event),...t})}analyticsProperties(e,t={}){return{event_id:this.eventId,team_id:e.teamId,promoter_id:e.promoterId,event_name:e.name,event_slug:e.slug,currency:e.currency,...t}}analyticsForEvent(e,t){if(!this.enableAnalytics)return;const i=gS(t);if(i)this.emitAnalyticsEventSkipped(e,i,t);else{if(this.analytics)return this.analytics;this.emitAnalyticsEventSkipped(e,"analytics_not_initialized",t)}}analyticsContext(e){const t=this.event;if(!t)return void this.emitAnalyticsEventSkipped(e,"missing_event");const i=this.analyticsForEvent(e,t);return i?{analytics:i,event:t}:void 0}emitAnalyticsEventSkipped(e,t,i,n){const r={eventType:e,eventId:this.eventId,reason:t,promoterId:i?.promoterId||void 0,teamId:i?.teamId||void 0};this.analyticsEventSkipped.emit(r),this.debugAnalytics&&console.warn("[SessionServicesTicketing] Analytics event skipped:",r,n)}getLowestPrice(){const e=this.event;return e?.admissions.length?Math.min(...e.admissions.map((e=>nS(e.price)))):0}getAdmissionListProducts(e){return e.admissions.map(((t,i)=>({product_id:t.id,sku:t.id,name:t.name,category:e.name,price:uS(t.price,e.currency),quantity:1,position:i+1,admission_id:t.id,section_id:t.sectionId,price_base:t.price?.base,price_booking_fee:t.price?.booking,available:t.available,capacity:t.capacity})))}async loadEventData(e={}){const t=e.mode??"refresh",i=this.client,n=this.eventId;if(!i||!this.tenantId||!n){const e="Missing required configuration: tenantId and eventId";return this.error=e,this.errorKind="configuration",{status:"error",error:e,kind:"configuration"}}const r=++this.eventRequestId,o=new AbortController;this.eventController?.abort(),this.eventController=o,"coupon"===t&&(this.couponController=o),"initial"===t&&(this.initialLoading=!0),"refresh"===t&&(this.eventLoading=!0),"retry"===t&&(this.retryLoading=!0),"passcode"===t&&(this.passcodeLoading=!0);try{"coupon"!==t&&"passcode"!==t&&(this.error=null,this.errorKind=null,this.refreshError=null);const a=await fS(o,(t=>i.event.get({key:n,couponCode:(e.couponCode??this.appliedCouponCode)||void 0,passcode:(e.passcode??this.activePasscode)||void 0},{signal:t})));return this.isEventRequestCurrent(r,n,o)?(!1!==e.commit&&(this.event=a.event,this.pruneSelectedItems(a.event)),this.passcodeDenied=!1,{status:"success",event:a.event}):{status:"stale"}}catch(e){if(!this.isEventRequestCurrent(r,n,o))return{status:"stale"};const i=function(e){return function(e){const t=mS(e,"");return!!/incorrect passcode/i.test(t)||"UNAUTHORIZED"===hS(e)&&/passcode/i.test(t)}(e)?"access":"NOT_FOUND"===hS(e)?"not_found":"transient"}(e),a=mS(e,"Failed to load event data");return this.passcodeDenied="access"===i,"coupon"!==t&&(!this.event||"refresh"!==t&&"retry"!==t?(this.error=a,this.errorKind=i):this.refreshError=a,this.errorOccurred.emit({error:a})),{status:"error",error:a,kind:i}}finally{r===this.eventRequestId&&("initial"===t&&this.finishInitialLoad(!0),"refresh"===t&&(this.eventLoading=!1),"retry"===t&&(this.retryLoading=!1),"passcode"===t&&(this.passcodeLoading=!1),this.eventController===o&&(this.eventController=void 0),this.couponController===o&&(this.couponController=void 0))}}isEventRequestCurrent(e,t,i){return this.active&&e===this.eventRequestId&&t===this.eventId&&this.eventController===i}pruneSelectedItems(e){this.openModalAdmissionId&&!e.admissions.some((e=>e.id===this.openModalAdmissionId))&&this.closeModal();const t=new Set(e.admissions.map((e=>iS(e.id,e.sectionId??null)))),i=Array.from(this.selectedItems).filter((([e])=>t.has(e)));i.length!==this.selectedItems.size&&(this.selectedItems=new Map(i),this.invalidateQuote(),this.selectedItems.size>0&&this.scheduleQuoteUpdate())}trackLoadedEvent(e){this.setupAnalytics(e)&&(this.trackPageViewed(e),this.trackProductViewed(e),this.trackEvent("Product List Viewed",{list_id:this.eventId,category:"Admissions",products:this.getAdmissionListProducts(e)}))}setupAnalytics(e){if(!this.enableAnalytics)return!1;const t=gS(e);if(t)return this.emitAnalyticsEventSkipped("Page Viewed",t,e),!1;if(this.analytics)return!0;try{this.analytics=function(e){let t,i=e.debug??!1,n=jA(e.client,i,e.destinations),r=YA(),o=ZA();i&&console.log("[Analytics] Initialized:",{sessionId:r,anonymousId:o});let a=(e,i,n)=>{let a=$T();return{type:e,name:i,properties:{...wT({anonymousId:o,context:a,sessionId:r}),...n},context:a,timestamp:Date.now(),messageId:HA(),sessionId:r,anonymousId:o,userId:t}},s=async(e,t)=>{try{await n.sendEvent(e,t)}catch(e){i&&console.error("[Analytics] Failed to send event:",e)}},d=(e,t)=>{let n=e.promoter_id;return!n&&i&&console.warn(`[Analytics] ${t}() called without promoter_id, skipping`),n},c=async(e,t={})=>{let i=d(t,"track");i&&await s(a("track",e,t),i)},l=async(e={})=>{let t=d(e,"preload");t&&await s(a("preload","Preload",e),t)},u=async(e,t={})=>{let i=d(t,"page");i&&await s(a("page",e||"Page Viewed",t),i)},p=async(e,t={})=>{let i=d(t,"screen");i&&await s(a("screen",e||"Screen Viewed",t),i)},m=async(e,n={})=>{t=e;let a=n.promoter_id;a&&await s({type:"identify",properties:{},context:$T(),timestamp:Date.now(),messageId:HA(),sessionId:r,anonymousId:o,userId:e,traits:n},a),i&&console.log("[Analytics] User identified:",e)},h=async(e,n={})=>{let a=n.promoter_id;a&&await s({type:"group",properties:{},context:$T(),timestamp:Date.now(),messageId:HA(),sessionId:r,anonymousId:o,userId:t,groupId:e,traits:n},a),i&&console.log("[Analytics] Group called:",{groupId:e,traits:n})};return{preload:(e={})=>{l(e)},preloadAsync:l,track:(e,t={})=>{c(e,t)},trackAsync:c,page:(e,t={})=>{u(e,t)},pageAsync:u,screen:(e,t={})=>{p(e,t)},screenAsync:p,identify:(e,t={})=>{m(e,t)},identifyAsync:m,alias:(e,t)=>{i&&console.log("[Analytics] Alias called:",{userId:e,previousId:t})},group:(e,t={})=>{h(e,t)},groupAsync:h,reset:()=>{let e=function(e){let t=Aa(),i=xa();return e.setCookie(ka,t),e.setItem(Ta,i),{sessionId:t,anonymousId:i}}(WA);r=e.sessionId,o=e.anonymousId,t=void 0,n.clearCache(),i&&console.log("[Analytics] Session reset:",{sessionId:r,anonymousId:o})}}}({client:this.client,debug:this.debugAnalytics})}catch(t){return this.emitAnalyticsEventSkipped("Page Viewed","analytics_initialization_failed",e,t),!1}return!0}trackPageViewed(e){const t=this.analyticsForEvent("Page Viewed",e);t&&t.page("Ticketing Widget",this.analyticsProperties(e))}trackProductViewed(e){const t=this.getLowestPrice();this.trackEvent("Product Viewed",{product_id:this.eventId,sku:this.eventId,name:e.name,category:"Event",value:lS(t,e.currency),price:lS(t,e.currency),event_date:e.entryStartsAt,venue_name:vS(e),venue_city:e.location?.city})}async updateQuantity(e,t,i){const n=iS(e,t);await this.setQuantity(e,t,(this.selectedItems.get(n)||0)+i)}async setQuantity(e,t,i){if(this.checkoutLoading)return;const n=iS(e,t),r=this.event?.admissions.find((t=>t.id===e));if(!r)return;const o=this.selectedItems.get(n)||0,a=Math.max(0,Math.min(i,this.getMaxQuantity(r,t)));if(o===a)return;this.selectionPrompt=!1,this.setSelectedQuantity(n,a),this.invalidateQuote(),this.checkoutError=null;const s=t?this.event?.sections.find((e=>e.id===t)):null;this.trackQuantityChange({admission:r,section:s,sectionId:t,delta:a-o}),this.scheduleQuoteUpdate()}setSelectedQuantity(e,t){0===t?this.selectedItems.delete(e):this.selectedItems.set(e,t),this.selectedItems=new Map(this.selectedItems)}trackQuantityChange(e){e.delta>0?this.trackProductAdded(e):e.delta<0&&this.trackProductRemoved(e)}trackProductAdded(e){this.trackEvent("Product Added",{...this.getQuantityAnalytics(e),price_base:e.admission.price?.base,price_booking_fee:e.admission.price?.booking})}trackProductRemoved(e){this.trackEvent("Product Removed",this.getQuantityAnalytics(e))}getQuantityAnalytics(e){return{product_id:e.admission.id,sku:e.admission.id,name:e.admission.name,category:this.event?.name,variant:e.section?.name,price:uS(e.admission.price,this.event?.currency),quantity:Math.abs(e.delta),admission_id:e.admission.id,section_id:bS(e.sectionId),section_name:e.section?.name}}async updateQuote(){if(this.clearQuoteTimer(),0===this.selectedItems.size)return this.invalidateQuote(),this.quote=null,this.quoteError=null,this.quoteLoading=!1,void await this.updatePreviewQuote();const e=++this.requestId,t=this.eventId,i=this.appliedCouponCode,n=this.getQuoteRequestItems(),r=this.quoteRevisionFor(t,i,n),o=new AbortController;this.quoteController?.abort(),this.quoteController=o;try{this.quoteLoading=!0,this.quoteError=null;const a=await this.fetchCartQuote(t,n,i,o);this.applyQuote(a.quote,e,r)}catch(t){this.handleQuoteError(e)}finally{e===this.requestId&&(this.quoteLoading=!1,this.quoteController===o&&(this.quoteController=void 0))}}scheduleQuoteUpdate(){this.clearQuoteTimer(),0!==this.selectedItems.size?(this.quoteLoading=!0,this.quoteTimer=setTimeout((()=>{this.quoteTimer=void 0,this.updateQuote().catch((()=>{}))}),150)):this.updateQuote().catch((()=>{}))}clearQuoteTimer(){this.quoteTimer&&(clearTimeout(this.quoteTimer),this.quoteTimer=void 0)}invalidateQuote(){this.requestId++,this.couponRequestId++,this.checkoutRequestId++,this.quoteController?.abort(),this.previewController?.abort(),this.checkoutController?.abort(),this.couponController?.abort(),this.quoteController=void 0,this.previewController=void 0,this.checkoutController=void 0,this.couponController=void 0,this.quoteRevision=void 0,this.quote=null,this.quoteError=null,this.quoteLoading=!1,this.previewLoading=!1,this.checkoutError=null,this.checkoutLoading=!1}clearPromptTimer(){this.promptTimer&&(clearTimeout(this.promptTimer),this.promptTimer=void 0)}promptTicketSelection(){this.selectionPrompt=!0,this.clearPromptTimer(),this.promptTimer=setTimeout((()=>{this.selectionPrompt=!1,this.promptTimer=void 0}),800)}getQuoteRequestItems(){return Array.from(this.selectedItems,(([e,t])=>{const i=function(e){const[t="",i="none"]=e.split("::");return{admissionId:t,sectionId:"none"===i?void 0:i}}(e);return{quantity:t,admissionId:i.admissionId,sectionId:i.sectionId}}))}fetchCartQuote(e,t,i,n){return fS(n,(n=>this.client.order.quote({eventId:e,items:t,couponCode:i||void 0},{signal:n})))}applyQuote(e,t,i=this.currentQuoteRevision()){t===this.requestId&&(this.quote=e,this.quoteRevision=i,this.quoteError=null,this.cartUpdate.emit(this.quote),this.trackEvent("Cart Viewed",{products:this.getCartProducts(),value:pS(this.quote,this.event?.currency),currency:this.event?.currency}))}handleQuoteError(e){e===this.requestId&&(this.quote=null,this.quoteRevision=void 0,this.quoteError="Failed to update cart. Please try again.",this.errorOccurred.emit({error:this.quoteError}))}quoteRevisionFor(e,t,i){return JSON.stringify({eventId:e,coupon:t,items:i,returnUrl:this.returnUrl,returnDestinationKey:this.returnDestinationKey})}currentQuoteRevision(){return this.quoteRevisionFor(this.eventId,this.appliedCouponCode,this.getQuoteRequestItems())}async updatePreviewQuote(){const e=this.event;if(!e||!this.appliedCouponCode)return this.previewRequestId++,this.previewController?.abort(),this.previewController=void 0,this.previewLoading=!1,void(this.previewQuote=null);const t=this.activeInitialPreviewQuote();if(t)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=t);if(0===dS(e).length)return this.previewRequestId++,this.previewLoading=!1,void(this.previewQuote=null);this.previewRequestId++;const i=this.previewRequestId,n=this.appliedCouponCode,r=this.eventId,o=new AbortController;this.previewController?.abort(),this.previewController=o;try{this.previewLoading=!0;const t=await this.fetchPreviewQuote(e,n,o);i===this.previewRequestId&&r===this.eventId&&n===this.appliedCouponCode&&(this.previewQuote=t.quote)}catch(e){i===this.previewRequestId&&(this.previewQuote=null,this.setCouponError())}finally{i===this.previewRequestId&&(this.previewLoading=!1,this.previewController===o&&(this.previewController=void 0))}}fetchPreviewQuote(e,t,i){return fS(i,(i=>this.client.order.quote({eventId:e.id,items:dS(e),couponCode:t},{signal:i})))}handleCouponInput=e=>{e.target instanceof HTMLInputElement&&(this.couponInput=e.target.value.toUpperCase())};handleCouponKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.applyCoupon().catch((()=>{})))};async applyCoupon(){const e=Sx(this.couponInput);this.couponInput=e,this.quoteError=null,this.couponError=null,this.trackCouponEntered(e),this.selectedItems.size>0?await this.applyCartCoupon(e):await this.applyPreviewCoupon(e)}async removeCoupon(){this.couponError=null,this.quoteError=null,this.selectedItems.size>0?await this.removeCartCoupon():await this.applyPreviewCoupon("")}async applyCartCoupon(e){const t=++this.couponRequestId,i=++this.requestId,n=this.appliedCouponCode,r=this.getQuoteRequestItems(),o=this.eventId,a=this.quoteRevisionFor(o,e,r),s=new AbortController;this.quoteController?.abort(),this.quoteController=s;try{this.quoteLoading=!0;const d=await this.loadEventData({commit:!1,couponCode:e,mode:"coupon"});if(!this.isCouponOperationCurrent(t,i))return;if("success"!==d.status)throw Error("Coupon load failed");const c=await this.fetchCartQuote(o,r,e,s);if(!this.isCouponOperationCurrent(t,i))return;if(this.event=d.event,this.appliedCouponCode=e,this.couponInput=e,this.previewQuote=null,this.pruneSelectedItems(d.event),a!==this.currentQuoteRevision())return this.invalidateQuote(),void this.scheduleQuoteUpdate();this.applyQuote(c.quote,i,a),e?this.trackCouponApplied(e,c.quote):this.trackCouponRemoved(n,c.quote)}catch(r){if(!this.isCouponOperationCurrent(t,i))return;this.couponInput=n||e,this.setCouponError(e?void 0:"Failed to remove coupon. Your current discount is still applied."),e&&this.trackCouponDenied(e)}finally{i===this.requestId&&(this.quoteLoading=!1,this.quoteController===s&&(this.quoteController=void 0))}}async applyPreviewCoupon(e){const t=this.appliedCouponCode,i=++this.couponRequestId,n=++this.previewRequestId,r=new AbortController;this.previewController?.abort(),this.previewController=r;try{this.previewLoading=!0;const o=await this.loadEventData({commit:!1,couponCode:e,mode:"coupon"});if(!this.isPreviewCouponOperationCurrent(i,n))return;if("success"!==o.status)throw Error("Coupon load failed");const a=this.activeInitialPreviewQuote(e),s=a||!e||0===dS(o.event).length?null:await this.fetchPreviewQuote(o.event,e,r);if(!this.isPreviewCouponOperationCurrent(i,n))return;this.event=o.event,this.pruneSelectedItems(o.event),this.appliedCouponCode=e,this.couponInput=e,this.previewQuote=a??s?.quote??null,e?this.trackCouponApplied(e,this.previewQuote):this.trackCouponRemoved(t,null)}catch(r){if(!this.isPreviewCouponOperationCurrent(i,n))return;this.couponInput=t||e,this.setCouponError(e?void 0:"Failed to remove coupon. Your current discount is still applied."),e&&this.trackCouponDenied(e)}finally{n===this.previewRequestId&&(this.previewLoading=!1,this.previewController===r&&(this.previewController=void 0))}}async removeCartCoupon(){await this.applyCartCoupon("")}isCouponOperationCurrent(e,t){return this.active&&e===this.couponRequestId&&t===this.requestId}isPreviewCouponOperationCurrent(e,t){return this.active&&e===this.couponRequestId&&t===this.previewRequestId}setCouponError(e="Failed to apply coupon. Please check the code."){this.couponError=e,this.errorOccurred.emit({error:this.couponError})}trackCouponEntered(e){e&&this.trackEvent("Coupon Entered",{coupon:e})}trackCouponApplied(e,t){e&&this.trackEvent("Coupon Applied",{coupon:e,products:this.getProductsForQuote(t),total:t?pS(t,this.event?.currency):0,value:t?pS(t,this.event?.currency):0})}trackCouponDenied(e){e&&this.trackEvent("Coupon Denied",{coupon:e,reason:this.couponError})}trackCouponRemoved(e,t){e&&this.trackEvent("Coupon Removed",{coupon:e,products:this.getProductsForQuote(t),total:t?pS(t,this.event?.currency):0,value:t?pS(t,this.event?.currency):0})}handlePasscodeInput=e=>{e.target instanceof HTMLInputElement&&(this.passcodeInput=e.target.value)};async submitPasscode(e){e.preventDefault();const t=this.passcodeInput.trim();this.activePasscode=t;const i=await this.loadEventData({mode:"passcode",passcode:t});"success"===i.status&&(this.error=null,this.errorKind=null,this.handleLoadedEvent(i.event),await this.updatePreviewQuote())}async retryEventLoad(){if(!this.tenantId||!this.eventId)return void await this.initializeComponent();const e=await this.loadEventData({mode:"retry"});"success"===e.status&&(this.handleLoadedEvent(e.event),await this.updatePreviewQuote())}async initiateCheckout(){if(this.isCheckoutDisabled())return;const e=this.quote;if(!e)return;const t=++this.checkoutRequestId,i=this.eventId,n=this.appliedCouponCode,r=this.currentQuoteRevision(),o=new AbortController;this.checkoutController?.abort(),this.checkoutController=o;try{this.checkoutLoading=!0,this.checkoutError=null;const a=await this.getCheckoutIdempotencyKey(r);if(!this.isCheckoutRequestCurrent(t,i,n,r))return;const s=await fS(o,(async t=>(this.createOrder??this.client.order.create)({eventId:i,items:this.getCheckoutItems(e),couponCode:n||void 0,returnUrl:this.returnUrl,returnDestinationKey:this.returnDestinationKey,channel:KA("elements"),idempotencyKey:a},{signal:t})));if(!this.isCheckoutRequestCurrent(t,i,n,r))return;this.trackCheckoutStarted(e,s.order.id),this.handleCheckoutOrder(s.order,t)}catch(e){this.isCheckoutRequestCurrent(t,i,n,r)&&this.handleCheckoutError()}finally{t===this.checkoutRequestId&&this.checkoutController===o&&(this.checkoutController=void 0)}}async getCheckoutIdempotencyKey(e){const t=this.checkoutIdempotencyKeys.get(e);if(t)return t;const i=await async function(e){if(!globalThis.crypto?.subtle)return;const t=await globalThis.crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e));return"session-services:checkout:"+Array.from(new Uint8Array(t),(e=>e.toString(16).padStart(2,"0"))).join("")}(`${this.apiUrl}\0${this.tenantId}\0${e}`),n=function(e){if(e&&"undefined"!=typeof window)try{return window.sessionStorage?.getItem(e)||void 0}catch{return}}(i),r=n??function(){const e=globalThis.crypto.getRandomValues(new Uint8Array(16));return"elements_"+Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("")}();return this.checkoutIdempotencyKeys.set(e,r),n||function(e,t){if(e&&"undefined"!=typeof window)try{window.sessionStorage?.setItem(e,t)}catch{}}(i,r),r}isCheckoutRequestCurrent(e,t,i,n){return this.active&&e===this.checkoutRequestId&&t===this.eventId&&i===this.appliedCouponCode&&n===this.currentQuoteRevision()&&n===this.quoteRevision}trackCheckoutStarted(e,t){const i=pS(e,this.event?.currency);this.trackEvent("Checkout Started",{order_id:t,value:i,revenue:i,currency:this.event?.currency,products:this.getCheckoutProducts()})}trackExternalTicketClick(e,t){this.trackEvent("Checkout Started",{ticketing_mode:"external",external_ticket_url:e,external_ticket_domain:wS(e),cta_surface:t})}getCheckoutItems(e){return e.items.map((e=>({quantity:e.quantity,admissionId:e.admissionId,sectionId:e.sectionId})))}handleCheckoutOrder(e,t){this.active&&t===this.checkoutRequestId&&(this.checkoutInit.emit({orderId:e.id,checkoutUrl:e.checkoutUrl}),e.checkoutUrl?window.location.href=function(e){if(typeof document>"u"||!document.body)return e;let t;try{t=document.createElement("a"),t.href=e,t.style.display="none",document.body.appendChild(t);let i=t.href;t.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0}));let n=t.href;return n!==i&&n.includes("_gl=")?n:e}catch{return e}finally{t?.remove()}}(e.checkoutUrl):this.checkoutLoading=!1)}handleCheckoutError(){this.checkoutError="We couldn’t open checkout. Your tickets are still selected, so you can try again.",this.errorOccurred.emit({error:this.checkoutError}),this.checkoutLoading=!1}handleStickyCheckoutClick(e){if(e.isDoorOnly||!$S(this.quote))return this.promptTicketSelection(),void this.scrollToTicketSelector();this.initiateCheckout().catch((()=>{}))}scrollToTicketSelector(){const e=this.host.shadowRoot?.querySelector(".tickets-wrapper")??this.host;window.scrollTo({behavior:!0===window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",top:Math.max(e.getBoundingClientRect().top+window.scrollY-100,0)})}getCartProducts(){return this.quote?this.getProductsForQuote(this.quote):[]}getCheckoutProducts(){return this.quote?this.quote.items.map((e=>({...this.getQuoteProduct(e),section_name:this.getQuoteSection(e)?.name}))):[]}getProductsForQuote(e){return e?e.items.map((e=>this.getQuoteProduct(e))):[]}getQuoteProduct(e){return{...IS(e),...ES(this.quoteProductContext(e)),...kS(e)}}quoteProductContext(e){return{event:this.event,admission:this.getQuoteAdmission(e),section:this.getQuoteSection(e)}}getQuoteAdmission(e){return this.event?.admissions.find((t=>t.id===e.admissionId))}getQuoteSection(e){return e.sectionId?this.event?.sections.find((t=>t.id===e.sectionId)):null}formatDateTimeRange(e,t){const i=this.event?rS(this.event):"UTC";try{const n=$x(e,i),r=$x(t,i),o=this.dateFormatter({day:"numeric",month:"short",timeZone:i,weekday:"short"}).format(n),a=this.dateFormatter({hour:"numeric",minute:"2-digit",timeZone:i});return`${o} · ${a.format(n)} – ${a.format(r)}`}catch{return`${e} – ${t}`}}dateFormatter(e){try{return new Intl.DateTimeFormat(this.locale,e)}catch{return new Intl.DateTimeFormat("en-US",e)}}formatPriceValue(e){const t=this.event?.currency;if(!t)return new Intl.NumberFormat(this.locale,{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(lS(e));try{return new Intl.NumberFormat(this.locale,{style:"currency",currency:t}).format(lS(e,t))}catch{return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(lS(e,t))}}handleQuantityDecrease=async(e,t)=>{await this.updateQuantity(e,t,-1)};handleQuantityIncrease=async(e,t)=>{await this.updateQuantity(e,t,1)};handleQuantityInput=async(e,t,i)=>{i.target instanceof HTMLInputElement&&await this.setQuantity(e,t,Number(i.target.value)||0)};openModal=(e,t)=>{t.stopPropagation(),this.modalTrigger=t.currentTarget,this.modalFocusPending=!0,this.openModalAdmissionId=e,document.addEventListener("keydown",this.handleModalKeyDown)};closeModal=()=>{this.openModalAdmissionId=null,this.modalFocusPending=!1,this.modalRestorePending=!0,"undefined"!=typeof document&&document.removeEventListener("keydown",this.handleModalKeyDown)};handleModalKeyDown=e=>{if("Escape"===e.key)return e.preventDefault(),void this.closeModal();if("Tab"!==e.key)return;const t=this.host.shadowRoot?.querySelector(".modal-content");if(!t)return;const i=Array.from(t.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===i.length)return e.preventDefault(),void t.focus();const n=i[0],r=i.at(-1),o=this.host.shadowRoot?.activeElement;if(e.shiftKey&&o===n)return e.preventDefault(),void r?.focus();e.shiftKey||o!==r||(e.preventDefault(),n?.focus())};handleBackdropClick=e=>{e.target instanceof i&&e.target.classList.contains("modal-backdrop")&&this.closeModal()};renderQuantityControls(e,t,i,n){const o=iS(e.id,t),a=this.selectedItems.get(o)||0;return r("div",{class:"quantity-controls"},r("button",{type:"button",class:"quantity-btn decrease",onClick:()=>this.handleQuantityDecrease(e.id,t),disabled:i||0===a,"aria-label":"Decrease quantity","data-testid":"event-admission-decrement"},"−"),r("input",{class:"quantity-value",type:"number",min:"0",max:n,inputmode:"numeric",value:a,onInput:i=>this.handleQuantityInput(e.id,t,i),disabled:i,"aria-label":"Quantity for "+e.name,"data-testid":"event-admission-quantity-input"}),r("button",{type:"button",class:"quantity-btn increase",onClick:()=>this.handleQuantityIncrease(e.id,t),disabled:i||a>=n,"aria-label":"Increase quantity","data-testid":"event-admission-increment"},"+"))}getMaxQuantity(e,t){return this.event?aS({admission:e,event:this.event,locale:this.locale,section:this.getSection(t)}).maxQuantity:0}getSection(e){if(e)return this.event?.sections.find((t=>t.id===e))}renderEventTimeAndLocation(e){return r(r.Fragment,null,this.renderEventTime(e,"admission-time"),this.renderEventLocation(e,"admission-venue"))}renderEventTime(e,t){return e.entryStartsAt&&e.entryEndsAt?r("div",{class:t},TS(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderAdmissionTime(e,t){return e?.entryStartsAt&&e.entryEndsAt?r("div",{class:t},TS(),this.formatDateTimeRange(e.entryStartsAt,e.entryEndsAt)):null}renderSectionLocation(e){const t=[e.location?.name,e.location?.city].filter(Boolean).join(", ");return t?r("div",{class:"section-venue"},AS(),t):null}renderEventLocation(e,t){return e.location?r("div",{class:t},AS(),e.location.name):null}renderPriceAndControls(e,t,i,n){const o=iS(e.id,t),a=function(e){return eS(e)}({admission:e,initialPrice:this.activeInitialAdmissionPrices()?.[o],quoteItem:sS(this.quote).get(o),previewItem:sS(this.previewQuote).get(o)}),s=function(e){return e.discounted&&void 0!==e.gross?Math.max(e.gross-e.base,0):0}(a);return r("div",{class:"admission-price-info"},r("div",{class:"admission-price-wrapper"},s>0&&r("span",{class:"admission-savings"},"Save ",this.formatPriceValue(s)),this.renderAdmissionPrice(a),a.fees>0&&r("span",{class:"admission-booking-fee"},this.formatPriceValue(a.fees)," Booking Fee"),i.showScarcity&&r("span",{class:"admission-availability"},e.available," tickets remaining"),i.label&&r("span",{class:"admission-sale-label "+i.label.tone},i.label.text)),this.renderAdmissionControls(e,t,i,n))}renderAdmissionPrice(e){return e.discounted?r("span",{class:"admission-price-row"},r("span",{class:"admission-price discounted"},this.formatPriceValue(e.base)),void 0!==e.gross&&r("span",{class:"admission-price-original"},this.formatPriceValue(e.gross))):r("span",{class:"admission-price"},this.formatPriceValue(e.base))}renderAdmissionControls(e,t,i,n){return i.statusLabel?r("div",{class:"sold-out-controls "+(i.statusTone??"")},r("span",{class:"sold-out-text"},i.statusLabel)):"door"===n?null:this.renderQuantityControls(e,t,i.disabled||this.checkoutLoading,i.maxQuantity)}renderAdmission(e,t,i,n=!1,o="default"){const a=aS({admission:e,event:t,locale:this.locale,section:i,sectionSoldOut:n}),s=i?.id||null;return r("section",{class:this.getAdmissionClassName(a,i),key:iS(e.id,s),"aria-label":this.getAdmissionAriaLabel(e,i,a),"data-testid":"event-admission-card","data-admission-id":e.id,"data-admission-name":e.name,"data-section-id":i?.id??""},r("div",{class:"admission-content"},r("div",{class:"admission-details"},this.renderAdmissionHeader(e),this.renderAdmissionBody(e,t,s,a,o))))}getAdmissionClassName(e,t){return`admission-card ${e.soldOut?"sold-out":""} ${e.disabled&&!e.soldOut?"unavailable":""} ${t?"":"solo-admission"}`}getAdmissionAriaLabel(e,t,i){return function(e,t,i){return t?`${e.name} in ${t.name} - ${i}`:`${e.name} - ${i}`}(e,t,i.statusLabel??this.admissionStatusText(e,i.soldOut))}admissionStatusText(e,t){if(t)return"Sold Out";const i=nS(e.price);return(e.price.booking??0)<=0?this.formatPriceValue(i):`${this.formatPriceValue(i-e.price.booking)} plus ${this.formatPriceValue(e.price.booking)} booking fee`}renderAdmissionHeader(e){return r("div",{class:"admission-header"},r("div",{class:"admission-header-text"},r("h3",{class:"admission-title"},e.name),e.subtitle&&r("p",{class:"admission-subtitle"},e.subtitle)),this.renderMoreInfoButton(e))}renderMoreInfoButton(e){return e.description?r("button",{type:"button",class:"more-info-badge",onClick:t=>this.openModal(e.id,t),"aria-label":"More info about "+e.name},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("circle",{cx:"12",cy:"12",r:"10"}),r("path",{d:"M12 16v-4"}),r("path",{d:"M12 8h.01"})),r("span",null,"More info")):null}renderAdmissionBody(e,t,i,n,o){return i?this.renderPriceAndControls(e,i,n,o):r(r.Fragment,null,this.renderEventTimeAndLocation(t),this.renderPriceAndControls(e,i,n,o))}renderSectionHeader(e,t){return r("div",{class:"section-header"},r("h2",{class:"section-name"},e.name),this.renderAdmissionTime(t[0],"section-time"),this.renderSectionLocation(e))}renderSectionWithAdmissions(e,t,i,n){const o=function(e){return!!e.section&&(!!function(e){return[e.available,e.limit].some((e=>kx(e)<=0))}(e.section)||e.admissions.length>0&&e.admissions.every((t=>Ax({admission:t,section:e.section}))))}({admissions:t,section:e});return r("div",{class:"ticket-section "+(o?"section-sold-out":""),key:e.id},this.renderSectionHeader(e,t),r("div",{class:"admissions-list"},t.map((t=>this.renderAdmission(t,i,e,o,n)))))}renderLoadingState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container",role:"status","aria-live":"polite","aria-label":"Loading ticket options"},r("span",{class:"sr-only"},"Loading ticket options"),r("div",{class:"tickets-wrapper"},r("h2",{class:"tickets-heading"},"Get Tickets"),r("div",{class:"ticket-section loading-ticket-section"},r("div",{class:"admissions-list"},[0,1,2].map((e=>r("div",{"aria-hidden":"true",class:"admission-card loading-admission",key:e}))))))))}renderErrorState(){if("access"===this.errorKind)return this.renderPasscodeState();if("not_found"===this.errorKind)return this.renderNotFoundState();const e="configuration"===this.errorKind;return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("div",{class:"message-state",role:"alert","aria-live":"assertive"},r("strong",null,e?"Ticket widget needs setup":"Tickets didn’t load"),r("span",null,e?"This ticket widget is missing its event or tenant details.":"Something got in the way. Try again to load the ticket options."),!e&&r("button",{type:"button",class:"checkout-btn",onClick:()=>this.retryEventLoad(),disabled:this.retryLoading},this.retryLoading?"Loading tickets…":"Try again"))))}renderUpdatingState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container",role:"status","aria-live":"polite"},r("div",{class:"message-state"},r("strong",null,"Loading ticket options…"),r("span",null,"This should only take a moment."))))}renderVerificationState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("section",{class:"message-state","aria-labelledby":"ticket-verification-title","aria-describedby":"ticket-verification-description"},r("h2",{id:"ticket-verification-title"},"Let’s get your tickets"),r("p",{id:"ticket-verification-description"},"We just need you to confirm before we load the ticket options."),r("button",{type:"button",class:"checkout-btn",onClick:this.continueAfterVerification},"Load tickets"))))}renderPasscodeState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("form",{class:"passcode-form",onSubmit:e=>this.submitPasscode(e)},r("h2",null,"Enter passcode"),r("p",null,"Enter the event passcode to view tickets and event details."),r("input",{type:"text",name:"passcode",value:this.passcodeInput,onInput:this.handlePasscodeInput,autocomplete:"one-time-code",placeholder:"Passcode","aria-label":"Passcode","aria-invalid":this.passcodeDenied,"aria-describedby":this.passcodeDenied?"ticket-passcode-error":void 0,disabled:this.passcodeLoading}),this.passcodeDenied&&this.activePasscode&&r("span",{id:"ticket-passcode-error",class:"error-message",role:"alert","aria-live":"assertive"},"That passcode didn’t work. Check it and try again."),r("button",{type:"submit",class:"checkout-btn",disabled:!this.passcodeInput.trim()||this.passcodeLoading},this.passcodeLoading?"Unlocking…":"Unlock event"))))}renderNotFoundState(){return r(o,{"data-theme":this.currentTheme},r("div",{class:"session-services-ticketing-container"},r("div",{class:"message-state",role:"alert"},r("strong",null,"Event not found"),r("span",null,"We couldn’t find this event. The link may be incorrect or expired."))))}renderCouponPanel(){const e=this.couponInput.trim().length>0,t=this.quoteLoading||this.previewLoading||this.checkoutLoading,i=e&&!t;return r("div",{class:"coupon-panel"},r("div",{class:"coupon-row"},r("input",{id:"coupon-code",name:"coupon-code",placeholder:"Coupon Code",value:this.appliedCouponCode||this.couponInput,onInput:this.handleCouponInput,onKeyDown:this.handleCouponKeyDown,autocomplete:"off",disabled:t||!!this.appliedCouponCode,"aria-label":"Coupon code","aria-invalid":!!this.couponError,"aria-describedby":this.couponError?"coupon-error":void 0}),this.appliedCouponCode?r("button",{type:"button",class:"coupon-remove",onClick:()=>this.removeCoupon(),disabled:t,"aria-label":"Remove coupon"},"Remove"):r("button",{type:"button",class:"coupon-apply",onClick:()=>this.applyCoupon(),disabled:!i},"Apply")),this.couponError&&r("span",{id:"coupon-error",class:"error-message",role:"alert","aria-live":"assertive"},this.couponError))}isCheckoutDisabled(){return this.quoteLoading||this.checkoutLoading||!$S(this.quote)||this.quoteRevision!==this.currentQuoteRevision()}getCheckoutButtonText(){return this.checkoutLoading?"Processing...":this.checkoutError?"Try checkout again":this.quote?this.getQuoteCheckoutText():"Pay"}renderQuoteLoadingContent(){return r("span",{class:"checkout-spinner-wrapper","aria-hidden":"true"},r("svg",{class:"checkout-spinner",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})))}renderCheckoutButtonContent(){return this.quoteLoading?this.renderQuoteLoadingContent():this.getCheckoutButtonText()}isStickyCheckoutDisabled(e){return!e.isDoorOnly&&(e.isEnded||e.isUnavailableForSale||this.checkoutLoading||this.quoteLoading)}getStickyCheckoutText(e){return this.checkoutLoading?"Processing...":this.quote?this.getQuoteCheckoutText():this.selectionPrompt?"Select a ticket":e.isDoorOnly?"Get Tickets at the Door":e.isEnded?"Event Ended":e.isUnavailableForSale?"Tickets Unavailable":"Get Tickets"}renderStickyCheckoutButtonContent(e){return this.quoteLoading?this.renderQuoteLoadingContent():this.getStickyCheckoutText(e)}getQuoteCheckoutText(){return this.quote?0===cS(this.quote)?"Continue":"Pay "+this.getOrderTotalText():"Pay"}getOrderTotalText(){if(!this.quote)return"N/A";const e=cS(this.quote);return 0===e?"Free":this.formatPriceValue(e)}renderCheckoutActions(){return r("div",{class:"checkout-actions"},this.renderCouponPanel(),this.quoteError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},this.quoteError,r("button",{type:"button",class:"coupon-apply",onClick:()=>this.updateQuote(),disabled:this.quoteLoading},"Try again")),this.checkoutError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},this.checkoutError),r("button",{type:"button",class:"checkout-btn",onClick:()=>this.initiateCheckout(),disabled:this.isCheckoutDisabled(),"aria-label":this.quoteLoading?"Updating":void 0,"data-testid":"event-checkout-cta-desktop"},this.renderCheckoutButtonContent()))}renderStickyCheckout(e){return this.stickyCheckout&&e.showTicketing?r("div",{class:"sticky-checkout-bar"},e.isDoorOnly?r("div",{class:"sticky-door-info"},r("strong",null,"Tickets available at the door"),r("span",null,"Buy yours at the venue when you arrive.")):r("button",{type:"button",class:"checkout-btn sticky-checkout-btn "+(this.selectionPrompt?"selection-prompt":""),onClick:()=>this.handleStickyCheckoutClick(e),disabled:this.isStickyCheckoutDisabled(e),"aria-label":this.quoteLoading?"Updating":void 0},this.renderStickyCheckoutButtonContent(e))):null}renderStickyExternalTicketing(e){if(!this.stickyCheckout)return null;const t=e.externalTicketUrl;if(!t)return null;const i=wS(t);return r("div",{class:"sticky-checkout-bar"},r("a",{class:"external-ticket-button sticky-checkout-btn",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"sticky")},r("span",{class:"external-ticket-label"},"Get tickets"),r("span",{class:"external-ticket-domain"},"via ",i)))}renderModal(){if(!this.openModalAdmissionId)return null;const e=this.event?.admissions.find((e=>e.id===this.openModalAdmissionId));return e?r("div",{class:"modal-backdrop",onClick:this.handleBackdropClick},r("div",{class:"modal-content",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-description",tabindex:"-1"},r("button",{type:"button",class:"modal-close-btn",onClick:()=>this.closeModal(),"aria-label":"Close"},r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r("path",{d:"M18 6 6 18"}),r("path",{d:"M6 6l12 12"}))),r("div",{class:"modal-header"},r("h2",{id:"modal-title",class:"modal-title"},e.name),e.subtitle&&r("p",{class:"modal-subtitle"},e.subtitle)),r("p",{id:"modal-description",class:"modal-description"},e.description))):null}renderTicketSections(e){const t=oS(e),i=t.isDoorOnly?"door":"default",n=function(e,t,i={}){return function(e,t,i={}){return[...Hx(e,t,i),...t.filter((e=>!e.sectionId)).map((e=>({admission:e,type:"admission"})))].sort(((e,t)=>Kx(e)-Kx(t)))}(e,t,i)}(e.sections,function(e,t){return function(e,t){if("door"!==t)return e.admissions;const i=qx(e);return e.admissions.filter((t=>!xx(t,e.admissions,i)&&"DOOR"===t.saleEndsBehavior&&Ix(t.saleEndsAt,i)))}(e,t)}(e,i),{event:e,initialAdmissionPrices:this.activeInitialAdmissionPrices(),mode:i,previewQuote:this.previewQuote,quote:this.quote});return r("div",{class:"tickets-wrapper"},this.renderDoorAlert(e,i),r("h2",{class:"tickets-heading"},t.ticketHeading),n.map((t=>this.renderTopLevelItem(t,e,i))))}renderTopLevelItem(e,t,i){return"section"===e.type?this.renderSectionWithAdmissions(e.section,e.admissions,t,i):r("div",{class:"ticket-section",key:e.admission.id},r("div",{class:"admissions-list"},this.renderAdmission(e.admission,t,void 0,!1,i)))}renderDoorAlert(e,t){if("door"!==t)return null;const i=e.location?.name?.trim()||"the venue";return r("div",{class:"door-alert"},r("strong",null,"Tickets are available at ",i),r("span",null,"Online sales are closed. Tickets are available at the venue when you arrive."))}loadingView(){return this.initialLoading?this.renderLoadingState():void 0}errorView(){return this.error&&!this.event?this.renderErrorState():void 0}verificationView(){return this.verificationRequired?this.renderVerificationState():void 0}missingEventView(){if(!this.event)return this.eventLoading||this.retryLoading?this.renderUpdatingState():this.renderNotFoundState()}pendingView(){return this.loadingView()??this.verificationView()??this.errorView()??this.missingEventView()}renderReadyState(){const e=this.event;if(!e)return this.renderNotFoundState();const t=oS(e);return t.showExternalTicketing?r(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},r("div",{class:"session-services-ticketing-container","aria-busy":this.eventLoading?"true":"false"},this.renderExternalTicketing(t)),this.renderStickyExternalTicketing(t)):r(o,{"data-theme":this.currentTheme,"data-sticky-checkout":this.stickyCheckout?"true":void 0},r("div",{class:"session-services-ticketing-container","aria-busy":this.eventLoading||this.retryLoading||this.passcodeLoading?"true":"false","aria-hidden":this.openModalAdmissionId?"true":void 0,inert:!!this.openModalAdmissionId||void 0},this.eventLoading&&r("div",{class:"inline-status",role:"status","aria-live":"polite"},"Updating ticket options…"),this.refreshError&&r("div",{class:"error-message",role:"alert","aria-live":"assertive"},r("span",null,"We couldn’t refresh the latest ticket details."),r("button",{type:"button",class:"inline-retry-btn",onClick:()=>this.retryEventLoad(),disabled:this.retryLoading},this.retryLoading?"Refreshing…":"Try again")),t.showTicketing?this.renderTicketSections(e):this.renderUnavailableState(t),!t.isDoorOnly&&t.showTicketing&&this.renderCheckoutActions()),this.renderStickyCheckout(t),this.renderModal())}renderExternalTicketing(e){const t=e.externalTicketUrl;if(!t)return null;const i=wS(t);return r("div",{class:"tickets-wrapper"},r("h2",{class:"tickets-heading"},e.ticketHeading),r("div",{class:"external-ticket-panel"},r("p",{class:"external-ticket-warning"},"This event sells through an external ticketing site. Checkout, tickets, and support are handled there."),r("a",{class:"external-ticket-button inline-external-ticket-button",href:t,target:"_blank",rel:"noreferrer",onClick:()=>this.trackExternalTicketClick(t,"inline")},r("span",{class:"external-ticket-label"},"Get tickets"),r("span",{class:"external-ticket-domain"},"via ",i))))}renderUnavailableState(e){return r("div",{class:"empty-ticketing-state"},r("strong",null,"Tickets Unavailable"),r("span",null,e.isEnded?"This event has ended, so tickets are no longer available.":"Tickets are not available for this event right now."))}render(){return this.pendingView()??this.renderReadyState()}static get watchers(){return{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}}static get style(){return':host{--background:transparent;--foreground:oklch(0.21 0.006 285.885);--card:oklch(1 0 0);--card-foreground:oklch(0.21 0.006 285.885);--popover:oklch(1 0 0);--popover-foreground:oklch(0.21 0.006 285.885);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(0 0 0 / 4%);--secondary-foreground:oklch(0.21 0.006 285.885);--muted:oklch(0 0 0 / 4%);--muted-foreground:oklch(0.442 0.017 285.786);--accent:oklch(0 0 0 / 4%);--accent-foreground:oklch(0.21 0.006 285.885);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.505 0.213 27.518);--border:oklch(0 0 0 / 12%);--input:oklch(0 0 0 / 12%);--ring:oklch(0.705 0.015 286.067);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.488 0.243 264.376);--backdrop:oklch(0 0 0 / 0.32);--radius:0.625rem;--spacing-xs:0.25rem;--spacing-sm:0.5rem;--spacing-md:1rem;--spacing-lg:1.5rem;--spacing-xl:2rem;--font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--font-size-xs:0.75rem;--font-size-sm:0.875rem;--font-size-base:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--shadow-sm:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-base:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);--shadow-md:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);--shadow-lg:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);--shadow-xl:0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);--shadow-edge-light:0 1px oklch(0 0 0 / 4%);--shadow-edge-dark:0 -1px oklch(1 0 0 / 8%);--transition-fast:150ms cubic-bezier(0.4, 0, 0.2, 1);--transition-base:200ms cubic-bezier(0.4, 0, 0.2, 1);--transition-slow:300ms cubic-bezier(0.4, 0, 0.2, 1);--internal-background:var(--background, transparent);--internal-foreground:var(--foreground, oklch(0.21 0.006 285.885));--internal-card:var(--card, oklch(1 0 0));--internal-popover:var(--popover, oklch(1 0 0));--internal-popover-foreground:var(--popover-foreground, oklch(0.21 0.006 285.885));--internal-primary:var(--primary, oklch(0.537 0.1554 255));--internal-primary-foreground:var(--primary-foreground, oklch(0.985 0 0));--internal-secondary:var(--secondary, oklch(0 0 0 / 4%));--internal-muted:var(--muted, oklch(0 0 0 / 4%));--internal-muted-foreground:var(--muted-foreground, oklch(0.442 0.017 285.786));--internal-accent:var(--accent, oklch(0 0 0 / 4%));--internal-accent-foreground:var(--accent-foreground, oklch(0.21 0.006 285.885));--internal-destructive:var(--destructive, oklch(0.637 0.237 25.331));--internal-border:var(--border, oklch(0 0 0 / 12%));--internal-input:var(--input, oklch(0 0 0 / 12%));--internal-ring:var(--ring, oklch(0.705 0.015 286.067));--internal-success:var(--success, oklch(0.696 0.17 162.48));--internal-warning:var(--warning, oklch(0.769 0.188 70.08));--internal-info:var(--info, oklch(0.623 0.214 259.815));--internal-info-foreground:var(--info-foreground, oklch(0.488 0.243 264.376));--internal-backdrop:var(--backdrop, oklch(0 0 0 / 0.32));--internal-radius:var(--radius, 0.625rem);--internal-spacing-xs:var(--spacing-xs, 0.25rem);--internal-spacing-sm:var(--spacing-sm, 0.5rem);--internal-spacing-md:var(--spacing-md, 1rem);--internal-spacing-lg:var(--spacing-lg, 1.5rem);--internal-spacing-xl:var(--spacing-xl, 2rem);--internal-font-family:var(--font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif);--internal-font-size-xs:var(--font-size-xs, 0.75rem);--internal-font-size-sm:var(--font-size-sm, 0.875rem);--internal-font-size-base:var(--font-size-base, 1rem);--internal-font-size-lg:var(--font-size-lg, 1.125rem);--internal-font-size-xl:var(--font-size-xl, 1.25rem);--internal-font-weight-medium:var(--font-weight-medium, 500);--internal-font-weight-semibold:var(--font-weight-semibold, 600);--internal-font-weight-bold:var(--font-weight-bold, 700);--internal-shadow-lg:var(--shadow-lg, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1));--internal-shadow-xl:var(--shadow-xl, 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1));--internal-shadow-edge-light:var(--shadow-edge-light, 0 1px oklch(0 0 0 / 4%));--internal-transition-fast:var(--transition-fast, 150ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-base:var(--transition-base, 200ms cubic-bezier(0.4, 0, 0.2, 1));--internal-transition-slow:var(--transition-slow, 300ms cubic-bezier(0.4, 0, 0.2, 1));display:block;font-family:var(--internal-font-family);color:var(--internal-foreground);background:var(--internal-background);color-scheme:light}*{box-sizing:border-box;margin:0;padding:0}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}*:focus{outline:none}*:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px;border-radius:calc(var(--internal-radius) - 4px)}.session-services-ticketing-container{width:100%;max-width:100%;margin:0}:host([data-theme="dark"]){color-scheme:dark;--background:transparent;--foreground:oklch(0.967 0.001 286.375);--card:color-mix( in srgb, oklch(0.21 0.006 285.885) 80%, oklch(0.141 0.005 285.823) );--card-foreground:oklch(0.967 0.001 286.375);--popover:oklch(0.21 0.006 285.885);--popover-foreground:oklch(0.967 0.001 286.375);--primary:oklch(0.537 0.1554 255);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(1 0 0 / 6%);--secondary-foreground:oklch(0.967 0.001 286.375);--muted:oklch(1 0 0 / 6%);--muted-foreground:oklch(0.705 0.015 286.067);--accent:oklch(1 0 0 / 6%);--accent-foreground:oklch(0.967 0.001 286.375);--destructive:oklch(0.637 0.237 25.331);--destructive-foreground:oklch(0.704 0.191 22.216);--border:oklch(1 0 0 / 12%);--input:oklch(1 0 0 / 12%);--ring:oklch(0.552 0.016 285.938);--success:oklch(0.696 0.17 162.48);--warning:oklch(0.769 0.188 70.08);--info:oklch(0.623 0.214 259.815);--info-foreground:oklch(0.707 0.165 254.624)}.tickets-wrapper{padding:0;width:100%}.tickets-heading{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin:0 0 var(--internal-spacing-md)}.ticket-section.loading-ticket-section{overflow:visible;background:transparent;border:0;box-shadow:none}.loading-ticket-section .admissions-list{display:flex;flex-direction:column;gap:var(--internal-spacing-sm)}.admission-card.loading-admission{min-height:5.25rem;padding:0;background:oklch(from var(--internal-foreground) l c h / 0.07);border:0;border-radius:var(--internal-radius);box-shadow:none;pointer-events:none;animation:loading-card 1.6s ease-out infinite}@keyframes loading-card{0%,100%{opacity:0.48}50%{opacity:0.74}}.passcode-form,.passcode-form input,.ticket-section,.more-info-badge,.quantity-controls,.sold-out-controls,.coupon-row,.coupon-apply,.coupon-remove{border:1px solid var(--internal-input);box-shadow:var(--internal-shadow-edge-light)}.external-ticket-button,.checkout-btn{display:inline-flex;align-items:center;justify-content:center;background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);border-radius:calc(var(--internal-radius) - 2px);cursor:pointer;box-shadow:var(--internal-shadow-edge-light);transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), box-shadow var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast)}.external-ticket-button:hover,.checkout-btn:hover:not(:disabled){background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.external-ticket-button:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.passcode-form{display:flex;flex-direction:column;gap:var(--internal-spacing-sm);padding:var(--internal-spacing-lg);margin-bottom:var(--internal-spacing-md);background:var(--internal-card);border-radius:var(--internal-radius)}.passcode-form h2{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.passcode-form p{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.5}.door-alert,.empty-ticketing-state,.message-state{display:flex;flex-direction:column;gap:calc(var(--internal-spacing-xs) * 1.5);margin-bottom:var(--internal-spacing-md);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none}.door-alert strong,.empty-ticketing-state strong,.message-state strong,.message-state h2{color:var(--internal-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-semibold);line-height:1.3}.door-alert span,.empty-ticketing-state span,.message-state span,.message-state p{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.4}.message-state .checkout-btn{margin-top:var(--internal-spacing-sm)}.external-ticket-button{flex-direction:column;gap:calc(var(--internal-spacing-xs) * 0.5);width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);text-decoration:none}.external-ticket-panel{display:flex;flex-direction:column;gap:var(--internal-spacing-md)}.external-ticket-warning{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.external-ticket-label{font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.2}.external-ticket-domain{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2;opacity:0.82}.passcode-form input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) + 0.125rem) var(--internal-spacing-sm);background:var(--internal-card);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font:inherit}.passcode-form input:disabled{opacity:0.6;cursor:not-allowed}.ticket-section{background:var(--internal-card);border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-lg) 0;overflow:hidden;width:100%;transition:background-color var(--internal-transition-base), border-color var(--internal-transition-base), box-shadow var(--internal-transition-base)}.tickets-wrapper>.ticket-section:last-child{margin-bottom:0}.ticket-section.section-sold-out{position:relative}.ticket-section.section-sold-out .section-header{padding-bottom:var(--internal-spacing-md)}.ticket-section.section-sold-out .section-name,.ticket-section.section-sold-out .section-time,.ticket-section.section-sold-out .section-venue{opacity:0.8}.ticket-section.section-sold-out .admissions-list{opacity:0.6;filter:grayscale(0.3)}.ticket-section.section-sold-out .admission-card{background:var(--internal-card)}.ticket-section.section-sold-out .quantity-controls,.ticket-section.section-sold-out .sold-out-controls{opacity:0.7}.section-header{padding:var(--internal-spacing-md) var(--internal-spacing-lg);border-bottom:1px solid var(--internal-border);background:var(--internal-card)}.section-name{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);letter-spacing:-0.025em;margin:0 0 var(--internal-spacing-xs) 0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.section-time,.section-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.section-time,.admission-time{margin-bottom:var(--internal-spacing-xs)}.section-time svg,.section-venue svg,.admission-time svg,.admission-venue svg{width:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));height:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs));flex-shrink:0;opacity:0.8}.admissions-list{padding:0}.admission-card{border-bottom:1px solid var(--internal-border);padding:var(--internal-spacing-md) var(--internal-spacing-lg);position:relative;transition:background-color var(--internal-transition-base);cursor:default}.admission-card:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.admission-card.sold-out{background:var(--internal-card)}.admission-card.unavailable{opacity:0.72}.admission-card.sold-out .admission-price{opacity:0.5}.admission-card:last-child{border-bottom:none}.admission-content{display:flex;justify-content:space-between;align-items:center}.admission-details{flex:1}.admission-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--internal-spacing-md);margin-bottom:var(--internal-spacing-sm)}.admission-header-text{flex:1;min-width:0}.admission-title{color:var(--internal-foreground);font-size:var(--internal-font-size-lg);font-weight:var(--internal-font-weight-semibold);margin-bottom:0;display:flex;align-items:center;gap:var(--internal-spacing-sm)}.admission-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.more-info-badge{display:inline-flex;align-items:center;gap:calc(var(--internal-spacing-xs) * 1.5);padding:calc(var(--internal-spacing-xs) * 1.5) var(--internal-spacing-sm);background:oklch(from var(--internal-info) l c h / 0.08);color:var(--internal-info-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast);white-space:nowrap;flex-shrink:0}.more-info-badge:hover{background:oklch(from var(--internal-info) l c h / 0.16)}.more-info-badge:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.more-info-badge svg{flex-shrink:0}.admission-time,.admission-venue{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);display:flex;align-items:center;gap:var(--internal-spacing-xs)}.admission-venue{margin-bottom:var(--internal-spacing-sm)}.solo-admission .admission-content{flex-direction:column;align-items:stretch}.solo-admission .admission-details{width:100%}.solo-admission .admission-price-info{margin-top:var(--internal-spacing-md);display:flex;justify-content:space-between;align-items:center;width:100%}.solo-admission .quantity-controls{margin-left:auto;flex-shrink:0}.admission-price-info{display:flex;align-items:center;justify-content:space-between;gap:var(--internal-spacing-sm);margin-bottom:var(--internal-spacing-sm);width:100%}.admission-price-wrapper{display:flex;flex-direction:column;row-gap:calc(var(--internal-spacing-xs) * 0.5)}.admission-price{color:var(--internal-foreground);font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-bold);letter-spacing:-0.025em;line-height:1.1}.admission-price-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--internal-spacing-sm)}.admission-price-original{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);text-decoration:line-through}.admission-booking-fee{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings,.admission-availability{font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);line-height:1.2}.admission-savings{color:var(--internal-success)}.admission-availability{color:var(--internal-warning)}.admission-sale-label{display:block;margin-top:var(--internal-spacing-xs);color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-medium);line-height:1.35}.admission-sale-label.success{color:var(--internal-success)}.quantity-controls{display:inline-flex;align-items:center;gap:0;background:var(--internal-secondary);border-radius:calc(var(--internal-radius) - 2px);overflow:hidden;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), box-shadow var(--internal-transition-fast)}.quantity-controls:has(.quantity-value:focus-visible){box-shadow:0 0 0 2px var(--internal-ring)}.quantity-btn{width:calc(var(--internal-spacing-lg) * 1.5);height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;color:var(--internal-muted-foreground);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-medium);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast);position:relative}.quantity-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-2px;z-index:1}.quantity-btn:hover:not(:disabled){background:var(--internal-accent);color:var(--internal-accent-foreground)}.quantity-btn:active:not(:disabled){transform:scale(0.95)}.quantity-btn:disabled{opacity:0.6;cursor:not-allowed;background:var(--internal-secondary);color:var(--internal-muted-foreground);border-color:var(--internal-border)}.quantity-btn.decrease{border-right:1px solid var(--internal-input)}.quantity-btn.increase{border-left:1px solid var(--internal-input)}.quantity-value{appearance:textfield;width:2.75rem;height:calc(var(--internal-spacing-lg) * 1.5);border:none;background:transparent;min-width:2.5rem;text-align:center;font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);padding:0 var(--internal-spacing-xs)}.quantity-value:focus-visible{outline:none}.quantity-value::-webkit-inner-spin-button,.quantity-value::-webkit-outer-spin-button{appearance:none;margin:0}.quantity-value:disabled{opacity:0.6;cursor:not-allowed}.sold-out-controls{display:inline-flex;align-items:center;justify-content:center;min-width:calc(var(--internal-spacing-lg) * 1.5 * 2 + 2.5rem);height:calc(var(--internal-spacing-lg) * 1.5);padding:0;background:transparent;border:none;box-shadow:none}.sold-out-controls,.sold-out-text{color:var(--internal-destructive);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);letter-spacing:0.025em;text-transform:uppercase}.sold-out-controls.success,.sold-out-controls.success .sold-out-text{color:var(--internal-success)}.checkout-actions{margin:var(--internal-spacing-lg) 0 0 0;width:100%}.coupon-panel{margin-bottom:var(--internal-spacing-md)}.coupon-row{position:relative;display:flex;align-items:center;width:100%;min-width:0;overflow:hidden;background:var(--internal-background);background-clip:padding-box;border-radius:var(--internal-radius);transition:border-color var(--internal-transition-fast)}.coupon-row:focus-within{border-color:var(--internal-ring)}.coupon-row:has(input[aria-invalid="true"]){border-color:var(--internal-destructive)}.coupon-row:has(input:disabled){opacity:0.64}.coupon-row input{width:100%;min-width:0;padding:calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-xl) * 2.75) calc(var(--internal-spacing-sm) - 1px) calc(var(--internal-spacing-md) - 1px);background:var(--internal-card);color:var(--internal-foreground);border:none;border-radius:inherit;font:inherit;font-size:var(--internal-font-size-sm);line-height:1.25rem;outline:none}.coupon-row input::placeholder{color:oklch(from var(--internal-muted-foreground) l c h / 0.64)}.coupon-row input:disabled{cursor:not-allowed}.coupon-apply,.coupon-remove{position:absolute;right:calc((var(--internal-spacing-xs) * 1.5) - 3px);top:50%;transform:translateY(-50%);padding:calc(var(--internal-spacing-xs) * 1.25) var(--internal-spacing-sm);background:var(--internal-secondary);color:var(--internal-foreground);border-radius:calc(var(--internal-radius) - 2px);font-size:var(--internal-font-size-xs);font-weight:var(--internal-font-weight-medium);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast)}.coupon-apply:hover:not(:disabled),.coupon-remove:hover:not(:disabled){background:oklch(from var(--internal-accent) l c h / 0.8)}.coupon-apply:focus-visible,.coupon-remove:focus-visible{outline:2px solid var(--internal-ring);outline-offset:-1px}.coupon-apply:disabled,.coupon-remove:disabled{opacity:0.6;cursor:not-allowed}.checkout-btn{width:100%;padding:calc(var(--internal-spacing-sm) + var(--internal-spacing-xs)) var(--internal-spacing-lg);font-size:var(--internal-font-size-base);font-weight:var(--internal-font-weight-bold);line-height:1.25;position:relative;overflow:hidden}.checkout-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:2px}.checkout-btn:active:not(:disabled){transform:translateY(0)}.checkout-btn:disabled{opacity:0.5;cursor:not-allowed}.checkout-spinner-wrapper{display:inline-flex;align-items:center;justify-content:center;height:1.25em;vertical-align:middle}.checkout-spinner{width:1.125em;height:1.125em;animation:checkout-spinner 0.8s linear infinite}@keyframes checkout-spinner{to{transform:rotate(360deg)}}.sticky-checkout-bar{position:fixed;right:0;bottom:0;left:0;z-index:40;display:none;padding:var(--internal-spacing-md) var(--internal-spacing-md) calc(var(--internal-spacing-md) + env(safe-area-inset-bottom, 0px));background:var(--internal-card);border-top:1px solid var(--internal-border);box-shadow:var(--internal-shadow-lg)}.sticky-door-info{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--internal-spacing-xs) * 0.5);min-height:2.75rem;padding:var(--internal-spacing-sm) var(--internal-spacing-md);color:var(--internal-foreground);background:var(--internal-secondary);border:1px solid var(--internal-border);border-radius:calc(var(--internal-radius) - 2px);text-align:center}.sticky-door-info strong{font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);line-height:1.25}.sticky-door-info span{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-xs);line-height:1.3}.sticky-checkout-btn.selection-prompt{animation:selection-prompt-shake 400ms ease-in-out}@keyframes selection-prompt-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}.error-message{background:oklch( from var(--internal-destructive) calc(l + 0.4) calc(c * 0.2) h / 0.05 );border:1px solid oklch(from var(--internal-destructive) l c h / 0.2);color:var(--internal-destructive);padding:var(--internal-spacing-sm) var(--internal-spacing-md);border-radius:var(--internal-radius);margin-bottom:var(--internal-spacing-md);font-size:var(--internal-font-size-sm);line-height:1.4}.inline-status{display:flex;align-items:center;gap:var(--internal-spacing-sm);margin-bottom:var(--internal-spacing-md);color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);line-height:1.4}.inline-retry-btn{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;margin-top:var(--internal-spacing-sm);padding:calc(var(--internal-spacing-xs) * 1.5) var(--internal-spacing-md);background:var(--internal-primary);color:var(--internal-primary-foreground);border:1px solid oklch(from var(--internal-primary) calc(l - 0.08) c h);border-radius:calc(var(--internal-radius) - 2px);box-shadow:var(--internal-shadow-edge-light);font-size:var(--internal-font-size-sm);font-weight:var(--internal-font-weight-semibold);cursor:pointer;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), opacity var(--internal-transition-fast), transform var(--internal-transition-fast)}.inline-retry-btn:hover:not(:disabled){background:oklch(from var(--internal-primary) calc(l - 0.08) c h);transform:translateY(-1px)}.inline-retry-btn:disabled{opacity:0.5;cursor:not-allowed}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (min-width: 768px){.ticket-section{border-radius:var(--internal-radius);margin:0 0 var(--internal-spacing-md) 0}}@media (max-width: 767px){:host([data-sticky-checkout="true"]) .checkout-actions>.checkout-btn,:host([data-sticky-checkout="true"]) .inline-external-ticket-button{display:none}.sticky-checkout-bar{display:block}:host([data-sticky-checkout="true"]) .session-services-ticketing-container{padding-bottom:calc(6.5rem + env(safe-area-inset-bottom, 0px))}}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:var(--internal-spacing-md);background:var(--internal-backdrop);backdrop-filter:blur(4px);overscroll-behavior:contain;animation:modal-backdrop-fade-in var(--internal-transition-base) ease-out}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}.modal-content{position:relative;width:100%;max-width:32rem;max-height:calc(100vh - var(--internal-spacing-xl) * 2);overflow-y:auto;overscroll-behavior:contain;background:var(--internal-popover);color:var(--internal-popover-foreground);border:1px solid var(--internal-border);border-radius:var(--internal-radius);padding:var(--internal-spacing-lg);box-shadow:var(--internal-shadow-xl);animation:modal-content-scale-in var(--internal-transition-base) ease-out}@keyframes modal-content-scale-in{from{opacity:0;transform:scale(0.98)}to{opacity:1;transform:scale(1)}}.modal-close-btn{position:absolute;top:var(--internal-spacing-sm);right:var(--internal-spacing-sm);display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:1px solid transparent;border-radius:calc(var(--internal-radius) - 4px);color:var(--internal-muted-foreground);cursor:pointer;opacity:0.72;transition:background-color var(--internal-transition-fast), border-color var(--internal-transition-fast), color var(--internal-transition-fast), opacity var(--internal-transition-fast)}.modal-close-btn:hover{opacity:1;background:var(--internal-accent)}.modal-close-btn:focus-visible{outline:2px solid var(--internal-ring);outline-offset:1px;opacity:1}.modal-header{margin-bottom:var(--internal-spacing-md);padding-right:var(--internal-spacing-xl)}.modal-title{font-size:var(--internal-font-size-xl);font-weight:var(--internal-font-weight-semibold);color:var(--internal-foreground);margin:0;line-height:1.2}.modal-subtitle{color:var(--internal-muted-foreground);font-size:var(--internal-font-size-sm);margin-top:var(--internal-spacing-xs);line-height:1.4}.modal-description{color:var(--internal-foreground);font-size:var(--internal-font-size-base);line-height:1.6;white-space:pre-wrap;margin:0}@media (prefers-reduced-motion: reduce){:host,*{scroll-behavior:auto !important}.admission-card.loading-admission,.checkout-spinner,.sticky-checkout-btn.selection-prompt,.modal-backdrop,.modal-content{animation:none}.external-ticket-button,.checkout-btn,.ticket-section,.more-info-badge,.quantity-controls,.quantity-btn,.coupon-row,.coupon-apply,.coupon-remove,.inline-retry-btn,.modal-close-btn{transition:none}}'}},[513,"session-services-ticketing",{tenantId:[1,"tenant-id"],eventId:[1,"event-id"],apiUrl:[1,"api-url"],locale:[1],returnUrl:[1,"return-url"],returnDestinationKey:[1,"return-destination-key"],createOrder:[16],couponCode:[1,"coupon-code"],initialAdmissionPrices:[1,"initial-admission-prices"],initialPreviewQuote:[1,"initial-preview-quote"],passcode:[1],stickyCheckout:[4,"sticky-checkout"],theme:[1],enableAnalytics:[4,"enable-analytics"],debugAnalytics:[4,"debug-analytics"],event:[32],selectedItems:[32],quote:[32],previewQuote:[32],initialLoading:[32],eventLoading:[32],retryLoading:[32],passcodeLoading:[32],error:[32],errorKind:[32],refreshError:[32],quoteLoading:[32],previewLoading:[32],quoteError:[32],couponError:[32],couponInput:[32],appliedCouponCode:[32],passcodeInput:[32],activePasscode:[32],passcodeDenied:[32],selectionPrompt:[32],checkoutLoading:[32],checkoutError:[32],currentTheme:[32],openModalAdmissionId:[32],verificationRequired:[32]},void 0,{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}]);function SS(){"undefined"!=typeof customElements&&["session-services-ticketing"].forEach((t=>{"session-services-ticketing"===t&&(customElements.get(e(t))||customElements.define(e(t),xS))}))}SS();const DS=xS,OS=SS;export{DS as SessionServicesTicketing,OS as defineCustomElement}