@guardian/support-dotcom-components 10.0.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dotcom/requests.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/types/abTests/banner.d.ts +4 -0
- package/dist/shared/types/abTests/banner.d.ts.map +1 -1
- package/dist/shared/types/abTests/epic.d.ts +4 -31
- package/dist/shared/types/abTests/epic.d.ts.map +1 -1
- package/dist/shared/types/abTests/gutter.d.ts +4 -0
- package/dist/shared/types/abTests/gutter.d.ts.map +1 -1
- package/dist/shared/types/abTests/header.d.ts +4 -0
- package/dist/shared/types/abTests/header.d.ts.map +1 -1
- package/dist/shared/types/abTests/shared.d.ts +9 -0
- package/dist/shared/types/abTests/shared.d.ts.map +1 -1
- package/dist/shared/types/props/banner.d.ts +1 -2
- package/dist/shared/types/props/banner.d.ts.map +1 -1
- package/dist/shared/types/props/epic.d.ts +0 -62
- package/dist/shared/types/props/epic.d.ts.map +1 -1
- package/dist/shared/types/targeting/header.d.ts +1 -0
- package/dist/shared/types/targeting/header.d.ts.map +1 -1
- package/package.json +15 -5
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="gu.history.weeklyArticleCount",t="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},o=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),r=(e,t={})=>(e.forEach(e=>{o.has(e)&&(t[e]=(t[e]??0)+1)}),t);function i(e,t,n){function o(n,o){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:o,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,o);const r=a.prototype,i=Object.keys(r);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class i extends r{}function a(e){var t;const r=n?.Parent?new i:this;o(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Object.freeze({status:"aborted"});class a extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class s extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const u={};function c(e){return e&&Object.assign(u,e),u}function l(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function d(e,t){return"bigint"==typeof t?t.toString():t}function p(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function f(e){return null==e}function h(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const m=Symbol("evaluating");function g(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==m)return void 0===o&&(o=m,o=n()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function y(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function v(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function _(e){return JSON.stringify(e)}const b="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function w(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const z=p(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function S(e){if(!1===w(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==w(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function k(e){return S(e)?{...e}:Array.isArray(e)?[...e]:e}const C=new Set(["string","number","symbol"]);function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function N(e,t,n){const o=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(o._zod.parent=e),o}function I(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new 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 E={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function A(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function O(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function $(e){return"string"==typeof e?e:e?.message}function x(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const r=$(e.inst?._zod.def?.error?.(e))??$(t?.error?.(e))??$(n.customError?.(e))??$(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function P(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Z(...e){const[t,n,o]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:o}:{...t}}const M=(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,d,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},U=i("$ZodError",M),R=i("$ZodError",M,{Parent:Error});const D=e=>(t,n,o,r)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new a;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>x(e,i,c())));throw b(t,r?.callee),t}return s.value},G=e=>async(t,n,o,r)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>x(e,i,c())));throw b(t,r?.callee),t}return a.value},F=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new a;return i.issues.length?{success:!1,error:new(e??U)(i.issues.map(e=>x(e,r,c())))}:{success:!0,data:i.value}},L=F(R),j=e=>async(t,n,o)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>x(e,r,c())))}:{success:!0,data:i.value}},B=j(R),J=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return D(e)(t,n,r)},V=e=>(t,n,o)=>D(e)(t,n,o),K=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return G(e)(t,n,r)},W=e=>async(t,n,o)=>G(e)(t,n,o),Y=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return F(e)(t,n,r)},H=e=>(t,n,o)=>F(e)(t,n,o),Q=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return j(e)(t,n,r)},q=e=>async(t,n,o)=>j(e)(t,n,o),X=/^[cC][^\s-]{8,}$/,ee=/^[0-9a-z]+$/,te=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ne=/^[0-9a-vA-V]{20}$/,oe=/^[A-Za-z0-9]{27}$/,re=/^[a-zA-Z0-9_-]{21}$/,ie=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ae=/^([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})$/,se=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ue=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const ce=/^(?:(?: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])$/,le=/^(([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}|:))$/,de=/^((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])$/,pe=/^(([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])$/,fe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,he=/^[A-Za-z0-9_-]*$/,me=/^\+[1-9]\d{6,14}$/,ge="(?:(?:\\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])))",ye=new RegExp(`^${ge}$`);function ve(e){const 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 _e=/^-?\d+$/,be=/^-?\d+(?:\.\d+)?$/,we=/^(?:true|false)$/i,ze=/^[^A-Z]*$/,Se=/^[^a-z]*$/,ke=i("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ce={number:"number",bigint:"bigint",object:"date"},Te=i("$ZodCheckLessThan",(e,t)=>{ke.init(e,t);const n=Ce[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ne=i("$ZodCheckGreaterThan",(e,t)=>{ke.init(e,t);const n=Ce[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ie=i("$ZodCheckMultipleOf",(e,t)=>{ke.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let r=(o.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(o)){const e=o.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ee=i("$ZodCheckNumberFormat",(e,t)=>{ke.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[r,i]=E[t.format];e._zod.onattach.push(e=>{const o=e._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i,n&&(o.pattern=_e)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,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>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ae=i("$ZodCheckMaxLength",(e,t)=>{var n;ke.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const r=P(o);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Oe=i("$ZodCheckMinLength",(e,t)=>{var n;ke.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const r=P(o);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),$e=i("$ZodCheckLengthEquals",(e,t)=>{var n;ke.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!f(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const o=n.value,r=o.length;if(r===t.length)return;const i=P(o),a=r>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),xe=i("$ZodCheckStringFormat",(e,t)=>{var n,o;ke.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Pe=i("$ZodCheckRegex",(e,t)=>{xe.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ze=i("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ze),xe.init(e,t)}),Me=i("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Se),xe.init(e,t)}),Ue=i("$ZodCheckIncludes",(e,t)=>{ke.init(e,t);const n=T(t.includes),o=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Re=i("$ZodCheckStartsWith",(e,t)=>{ke.init(e,t);const n=new RegExp(`^${T(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),De=i("$ZodCheckEndsWith",(e,t)=>{ke.init(e,t);const n=new RegExp(`.*${T(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ge=i("$ZodCheckOverwrite",(e,t)=>{ke.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Fe{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),o=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of o)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const Le={major:4,minor:3,patch:6},je=i("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Le;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const t of o)for(const n of t._zod.onattach)n(e);if(0===o.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let o,r=A(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=i._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new a;if(o||s instanceof Promise)o=(o??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=A(e,t)))});else{if(e.issues.length===t)continue;r||(r=A(e,t))}}return o?o.then(()=>e):e},n=(n,r,i)=>{if(A(n))return n.aborted=!0,n;const s=t(r,o,i);if(s instanceof Promise){if(!1===i.async)throw new a;return s.then(t=>e._zod.parse(t,i))}return e._zod.parse(s,i)};e._zod.run=(r,i)=>{if(i.skipChecks)return e._zod.parse(r,i);if("backward"===i.direction){const t=e._zod.parse({value:r.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,i)):n(t,r,i)}const s=e._zod.parse(r,i);if(s instanceof Promise){if(!1===i.async)throw new a;return s.then(e=>t(e,o,i))}return t(s,o,i)}}g(e,"~standard",()=>({validate:t=>{try{const n=L(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return B(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),Be=i("$ZodString",(e,t)=>{var n;je.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(o){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Je=i("$ZodStringFormat",(e,t)=>{xe.init(e,t),Be.init(e,t)}),Ve=i("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ae),Je.init(e,t)}),Ke=i("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=se(e))}else t.pattern??(t.pattern=se());Je.init(e,t)}),We=i("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ue),Je.init(e,t)}),Ye=i("$ZodURL",(e,t)=>{Je.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),r=new URL(o);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.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)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=o)}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),He=i("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Je.init(e,t)}),Qe=i("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=re),Je.init(e,t)}),qe=i("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=X),Je.init(e,t)}),Xe=i("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ee),Je.init(e,t)}),et=i("$ZodULID",(e,t)=>{t.pattern??(t.pattern=te),Je.init(e,t)}),tt=i("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ne),Je.init(e,t)}),nt=i("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=oe),Je.init(e,t)}),ot=i("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=ve({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${ge}T(?:${o})$`)}(t)),Je.init(e,t)}),rt=i("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ye),Je.init(e,t)}),it=i("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ve(t)}$`)),Je.init(e,t)}),at=i("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ie),Je.init(e,t)}),st=i("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ce),Je.init(e,t),e._zod.bag.format="ipv4"}),ut=i("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=le),Je.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),ct=i("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=de),Je.init(e,t)}),lt=i("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=pe),Je.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(2!==o.length)throw new Error;const[e,t]=o;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function dt(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const pt=i("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=fe),Je.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{dt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const ft=i("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=he),Je.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!he.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return dt(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ht=i("$ZodE164",(e,t)=>{t.pattern??(t.pattern=me),Je.init(e,t)});const mt=i("$ZodJWT",(e,t)=>{Je.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[o]=n;if(!o)return!1;const r=JSON.parse(atob(o));return!("typ"in r&&"JWT"!==r?.typ||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),gt=i("$ZodNumber",(e,t)=>{je.init(e,t),e._zod.pattern=e._zod.bag.pattern??be,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),yt=i("$ZodNumberFormat",(e,t)=>{Ee.init(e,t),gt.init(e,t)}),vt=i("$ZodBoolean",(e,t)=>{je.init(e,t),e._zod.pattern=we,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),_t=i("$ZodAny",(e,t)=>{je.init(e,t),e._zod.parse=e=>e}),bt=i("$ZodUnknown",(e,t)=>{je.init(e,t),e._zod.parse=e=>e}),wt=i("$ZodNever",(e,t)=>{je.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function zt(e,t,n){e.issues.length&&t.issues.push(...O(n,e.issues)),t.value[n]=e.value}const St=i("$ZodArray",(e,t)=>{je.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const i=[];for(let e=0;e<r.length;e++){const a=r[e],s=t.element._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(t=>zt(t,n,e))):zt(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function kt(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...O(n,e.issues))}void 0===e.value?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Ct(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(o=e.shape,Object.keys(o).filter(e=>"optional"===o[e]._zod.optin&&"optional"===o[e]._zod.optout));var o;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Tt(e,t,n,o,r,i){const a=[],s=r.keySet,u=r.catchall._zod,c=u.def.type,l="optional"===u.optout;for(const r in t){if(s.has(r))continue;if("never"===c){a.push(r);continue}const i=u.run({value:t[r],issues:[]},o);i instanceof Promise?e.push(i.then(e=>kt(e,n,r,t,l))):kt(i,n,r,t,l)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Nt=i("$ZodObject",(e,t)=>{je.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const o=p(()=>Ct(t));g(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const o=e[t]._zod;if(o.values){n[t]??(n[t]=new Set);for(const e of o.values)n[t].add(e)}}return n});const r=w,i=t.catchall;let a;e._zod.parse=(t,n)=>{a??(a=o.value);const s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const u=[],c=a.shape;for(const e of a.keys){const o=c[e],r="optional"===o._zod.optout,i=o._zod.run({value:s[e],issues:[]},n);i instanceof Promise?u.push(i.then(n=>kt(n,t,e,s,r))):kt(i,t,e,s,r)}return i?Tt(u,s,t,n,o.value,e):u.length?Promise.all(u).then(()=>t):t}}),It=i("$ZodObjectJIT",(e,t)=>{Nt.init(e,t);const n=e._zod.parse,o=p(()=>Ct(t));let r;const i=w,a=!u.jitless,s=a&&z.value,c=t.catchall;let l;e._zod.parse=(u,d)=>{l??(l=o.value);const p=u.value;return i(p)?a&&s&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new Fe(["shape","payload","ctx"]),n=o.value,r=e=>{const t=_(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let a=0;for(const e of n.keys)i[e]="key_"+a++;t.write("const newResult = {};");for(const o of n.keys){const n=i[o],a=_(o),s=e[o],u="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(o)};`),u?t.write(`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),u=r(u,d),c?Tt([],p,u,d,l,e):u):n(u,d):(u.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),u)}});function Et(e,t,n,o){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!A(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>x(e,o,c())))}),t)}const At=i("$ZodUnion",(e,t)=>{je.init(e,t),g(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),g(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),g(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),g(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>h(e.source)).join("|")})$`)}});const n=1===t.options.length,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>Et(t,r,e,i)):Et(s,r,e,i)}}),Ot=i("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,At.init(e,t);const n=e._zod.parse;g(e._zod,"propValues",()=>{const e={};for(const n of t.options){const o=n._zod.propValues;if(!o||0===Object.keys(o).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(o)){e[t]||(e[t]=new Set);for(const o of n)e[t].add(o)}}return e});const o=p(()=>{const e=t.options,n=new Map;for(const o of e){const e=o._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,o)}}return n});e._zod.parse=(r,i)=>{const a=r.value;if(!w(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;const s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),$t=i("$ZodIntersection",(e,t)=>{je.init(e,t),e._zod.parse=(e,n)=>{const o=e.value,r=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return r instanceof Promise||i instanceof Promise?Promise.all([r,i]).then(([t,n])=>Pt(e,t,n)):Pt(e,r,i)}});function xt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(S(e)&&S(t)){const n=Object.keys(t),o=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of o){const o=xt(e[n],t[n]);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r[n]=o.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const r=xt(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Pt(e,t,n){const o=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)o.has(e)||o.set(e,{}),o.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);const i=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&r&&e.issues.push({...r,keys:i}),A(e))return e;const a=xt(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Zt=i("$ZodEnum",(e,t)=>{je.init(e,t);const n=l(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(e=>C.has(typeof e)).map(e=>"string"==typeof e?T(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const i=t.value;return o.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),Mt=i("$ZodLiteral",(e,t)=>{if(je.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?T(e):e?T(e.toString()):String(e)).join("|")})$`),e._zod.parse=(o,r)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Ut=i("$ZodTransform",(e,t)=>{je.init(e,t),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new s(e.constructor.name);const r=t.transform(n.value,n);if(o.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new a;return n.value=r,n}});function Rt(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Dt=i("$ZodOptional",(e,t)=>{je.init(e,t),e._zod.optin="optional",e._zod.optout="optional",g(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),g(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${h(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(t=>Rt(t,e.value)):Rt(o,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Gt=i("$ZodExactOptional",(e,t)=>{Dt.init(e,t),g(e._zod,"values",()=>t.innerType._zod.values),g(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ft=i("$ZodNullable",(e,t)=>{je.init(e,t),g(e._zod,"optin",()=>t.innerType._zod.optin),g(e._zod,"optout",()=>t.innerType._zod.optout),g(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${h(e.source)}|null)$`):void 0}),g(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Lt=i("$ZodDefault",(e,t)=>{je.init(e,t),e._zod.optin="optional",g(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(e=>jt(e,t)):jt(o,t)}});function jt(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Bt=i("$ZodPrefault",(e,t)=>{je.init(e,t),e._zod.optin="optional",g(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Jt=i("$ZodNonOptional",(e,t)=>{je.init(e,t),g(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,o)=>{const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(t=>Vt(t,e)):Vt(r,e)}});function Vt(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=i("$ZodCatch",(e,t)=>{je.init(e,t),g(e._zod,"optin",()=>t.innerType._zod.optin),g(e._zod,"optout",()=>t.innerType._zod.optout),g(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(o=>(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>x(e,n,c()))},input:e.value}),e.issues=[]),e)):(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>x(e,n,c()))},input:e.value}),e.issues=[]),e)}}),Wt=i("$ZodPipe",(e,t)=>{je.init(e,t),g(e._zod,"values",()=>t.in._zod.values),g(e._zod,"optin",()=>t.in._zod.optin),g(e._zod,"optout",()=>t.out._zod.optout),g(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const o=t.out._zod.run(e,n);return o instanceof Promise?o.then(e=>Yt(e,t.in,n)):Yt(o,t.in,n)}const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>Yt(e,t.out,n)):Yt(o,t.out,n)}});function Yt(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Ht=i("$ZodReadonly",(e,t)=>{je.init(e,t),g(e._zod,"propValues",()=>t.innerType._zod.propValues),g(e._zod,"values",()=>t.innerType._zod.values),g(e._zod,"optin",()=>t.innerType?._zod?.optin),g(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(Qt):Qt(o)}});function Qt(e){return e.value=Object.freeze(e.value),e}const qt=i("$ZodCustom",(e,t)=>{ke.init(e,t),je.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(t=>Xt(t,n,o,e));Xt(r,n,o,e)}});function Xt(e,t,n,o){if(!e){const e={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(e.params=o._zod.def.params),t.issues.push(Z(e))}}var en;class tn{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const 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){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(en=globalThis).__zod_globalRegistry??(en.__zod_globalRegistry=new tn);const nn=globalThis.__zod_globalRegistry;function on(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...I(t)})}function rn(e,t){return new Te({check:"less_than",...I(t),value:e,inclusive:!1})}function an(e,t){return new Te({check:"less_than",...I(t),value:e,inclusive:!0})}function sn(e,t){return new Ne({check:"greater_than",...I(t),value:e,inclusive:!1})}function un(e,t){return new Ne({check:"greater_than",...I(t),value:e,inclusive:!0})}function cn(e,t){return new Ie({check:"multiple_of",...I(t),value:e})}function ln(e,t){return new Ae({check:"max_length",...I(t),maximum:e})}function dn(e,t){return new Oe({check:"min_length",...I(t),minimum:e})}function pn(e,t){return new $e({check:"length_equals",...I(t),length:e})}function fn(e){return new Ge({check:"overwrite",tx:e})}function hn(e){const t=function(e,t){const n=new ke({check:"custom",...I(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Z(e,n.value,t._zod.def));else{const o=e;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Z(o))}},e(n.value,n)));return t}function mn(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??nn,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 gn(e,t,n={path:[],schemaPath:[]}){var o;const r=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const o={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,o);else{const n=a.schema,i=t.processors[r.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);i(e,t,n,o)}const i=e._zod.parent;i&&(a.ref||(a.ref=i),gn(i,t,o),t.seen.get(i).isParent=!0)}const u=t.metadataRegistry.get(e);u&&Object.assign(a.schema,u),"input"===t.io&&_n(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault;return t.seen.get(e).schema}function yn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=o.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const o=t[1],{ref:r,defId:i}=(t=>{const o="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${r("__shared")}#/${o}/${i}`}}if(t[1]===n)return{ref:"#"};const r=`#/${o}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:r+i}})(t);o.def={...o.schema},i&&(o.defId=i);const a=o.schema;for(const e in a)delete a[e];a.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const o=n[1];if(t===n[0]){r(n);continue}if(e.external){const o=e.external.registry.get(n[0])?.id;if(t!==n[0]&&o){r(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?r(n):(o.cycle||o.count>1&&"ref"===e.reused)&&r(n)}}function vn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,i={...r},a=n.ref;if(n.ref=null,a){o(a);const n=e.seen.get(a),s=n.schema;!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,i);if(t._zod.parent===a)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in i||delete r[e]);if(s.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const s=t._zod.parent;if(s&&s!==a){o(s);const t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const 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:n.path??[]})};for(const t of[...e.seen.entries()].reverse())o(t[0]);const 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.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const i=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?r.$defs=i:r.definitions=i);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:bn(t,"input",e.processors),output:bn(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function _n(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return _n(o.element,n);if("set"===o.type)return _n(o.valueType,n);if("lazy"===o.type)return _n(o.getter(),n);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return _n(o.innerType,n);if("intersection"===o.type)return _n(o.left,n)||_n(o.right,n);if("record"===o.type||"map"===o.type)return _n(o.keyType,n)||_n(o.valueType,n);if("pipe"===o.type)return _n(o.in,n)||_n(o.out,n);if("object"===o.type){for(const e in o.shape)if(_n(o.shape[e],n))return!0;return!1}if("union"===o.type){for(const e of o.options)if(_n(e,n))return!0;return!1}if("tuple"===o.type){for(const e of o.items)if(_n(e,n))return!0;return!(!o.rest||!_n(o.rest,n))}return!1}const bn=(e,t,n={})=>o=>{const{libraryOptions:r,target:i}=o??{},a=mn({...r??{},target:i,io:t,processors:n});return gn(e,a),yn(a,e),vn(a,e)},wn={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},zn=(e,t,n,o)=>{const r=e._zod.def;gn(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Sn=i("ZodISODateTime",(e,t)=>{ot.init(e,t),Yn.init(e,t)});function kn(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(t)})}(Sn,e)}const Cn=i("ZodISODate",(e,t)=>{rt.init(e,t),Yn.init(e,t)});function Tn(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...I(t)})}(Cn,e)}const Nn=i("ZodISOTime",(e,t)=>{it.init(e,t),Yn.init(e,t)});function In(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...I(t)})}(Nn,e)}const En=i("ZodISODuration",(e,t)=>{at.init(e,t),Yn.init(e,t)});function An(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...I(t)})}(En,e)}const On=(e,t)=>{U.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},o=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>o({issues:e}));else if("invalid_key"===r.code)o({issues:r.issues});else if("invalid_element"===r.code)o({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,o=0;for(;o<r.path.length;){const n=r.path[o];o===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],o++}}};return o(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}},isEmpty:{get:()=>0===e.issues.length}})};i("ZodError",On);const $n=i("ZodError",On,{Parent:Error}),xn=D($n),Pn=G($n),Zn=F($n),Mn=j($n),Un=J($n),Rn=V($n),Dn=K($n),Gn=W($n),Fn=Y($n),Ln=H($n),jn=Q($n),Bn=q($n),Jn=i("ZodType",(e,t)=>(je.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:bn(e,"input"),output:bn(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const o=mn({...n,processors:t});return gn(e,o),yn(o,e),vn(o,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(v(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>N(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>xn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Zn(e,t,n),e.parseAsync=async(t,n)=>Pn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Mn(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Un(e,t,n),e.decode=(t,n)=>Rn(e,t,n),e.encodeAsync=async(t,n)=>Dn(e,t,n),e.decodeAsync=async(t,n)=>Gn(e,t,n),e.safeEncode=(t,n)=>Fn(e,t,n),e.safeDecode=(t,n)=>Ln(e,t,n),e.safeEncodeAsync=async(t,n)=>jn(e,t,n),e.safeDecodeAsync=async(t,n)=>Bn(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...I(n)})}(tr,e,t)}(t,n)),e.superRefine=t=>e.check(hn(t)),e.overwrite=t=>e.check(fn(t)),e.optional=()=>Bo(e),e.exactOptional=()=>new Jo({type:"optional",innerType:e}),e.nullable=()=>Ko(e),e.nullish=()=>Bo(Ko(e)),e.nonoptional=t=>function(e,t){return new Ho({type:"nonoptional",innerType:e,...I(t)})}(e,t),e.array=()=>Eo(e),e.or=t=>xo([e,t]),e.and=t=>Uo(e,t),e.transform=t=>Xo(e,new Lo({type:"transform",transform:t})),e.default=t=>{return n=t,new Wo({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():k(n)}});var n},e.prefault=t=>{return n=t,new Yo({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():k(n)}});var n},e.catch=t=>{return new Qo({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Xo(e,t),e.readonly=()=>new er({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return nn.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>nn.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return nn.get(e);const n=e.clone();return nn.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Vn=i("_ZodString",(e,t)=>{Be.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n)=>{const o=n;o.type="string";const{minimum:r,maximum:i,format:a,patterns:s,contentEncoding:u}=e._zod.bag;if("number"==typeof r&&(o.minLength=r),"number"==typeof i&&(o.maxLength=i),a&&(o.format=wn[a]??a,""===o.format&&delete o.format,"time"===a&&delete o.format),u&&(o.contentEncoding=u),s&&s.size>0){const e=[...s];1===e.length?o.pattern=e[0].source:e.length>1&&(o.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new Pe({check:"string_format",format:"regex",...I(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Ue({check:"string_format",format:"includes",...I(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Re({check:"string_format",format:"starts_with",...I(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new De({check:"string_format",format:"ends_with",...I(t),suffix:e})}(...t)),e.min=(...t)=>e.check(dn(...t)),e.max=(...t)=>e.check(ln(...t)),e.length=(...t)=>e.check(pn(...t)),e.nonempty=(...t)=>e.check(dn(1,...t)),e.lowercase=t=>e.check(function(e){return new Ze({check:"string_format",format:"lowercase",...I(e)})}(t)),e.uppercase=t=>e.check(function(e){return new Me({check:"string_format",format:"uppercase",...I(e)})}(t)),e.trim=()=>e.check(fn(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return fn(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(fn(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(fn(e=>e.toUpperCase())),e.slugify=()=>e.check(fn(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}),Kn=i("ZodString",(e,t)=>{Be.init(e,t),Vn.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...I(t)})}(Hn,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...I(t)})}(Xn,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...I(t)})}(mo,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...I(t)})}(eo,t)),e.guid=t=>e.check(on(Qn,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...I(t)})}(qn,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(t)})}(qn,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(t)})}(qn,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(t)})}(qn,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(t)})}(to,t)),e.guid=t=>e.check(on(Qn,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...I(t)})}(no,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(t)})}(oo,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...I(t)})}(ro,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...I(t)})}(po,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...I(t)})}(fo,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...I(t)})}(io,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(t)})}(ao,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(t)})}(so,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(t)})}(uo,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(t)})}(co,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(t)})}(lo,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...I(t)})}(ho,t)),e.datetime=t=>e.check(kn(t)),e.date=t=>e.check(Tn(t)),e.time=t=>e.check(In(t)),e.duration=t=>e.check(An(t))});function Wn(e){return function(e,t){return new e({type:"string",...I(t)})}(Kn,e)}const Yn=i("ZodStringFormat",(e,t)=>{Je.init(e,t),Vn.init(e,t)}),Hn=i("ZodEmail",(e,t)=>{We.init(e,t),Yn.init(e,t)}),Qn=i("ZodGUID",(e,t)=>{Ve.init(e,t),Yn.init(e,t)}),qn=i("ZodUUID",(e,t)=>{Ke.init(e,t),Yn.init(e,t)}),Xn=i("ZodURL",(e,t)=>{Ye.init(e,t),Yn.init(e,t)}),eo=i("ZodEmoji",(e,t)=>{He.init(e,t),Yn.init(e,t)}),to=i("ZodNanoID",(e,t)=>{Qe.init(e,t),Yn.init(e,t)}),no=i("ZodCUID",(e,t)=>{qe.init(e,t),Yn.init(e,t)}),oo=i("ZodCUID2",(e,t)=>{Xe.init(e,t),Yn.init(e,t)}),ro=i("ZodULID",(e,t)=>{et.init(e,t),Yn.init(e,t)}),io=i("ZodXID",(e,t)=>{tt.init(e,t),Yn.init(e,t)}),ao=i("ZodKSUID",(e,t)=>{nt.init(e,t),Yn.init(e,t)}),so=i("ZodIPv4",(e,t)=>{st.init(e,t),Yn.init(e,t)}),uo=i("ZodIPv6",(e,t)=>{ut.init(e,t),Yn.init(e,t)}),co=i("ZodCIDRv4",(e,t)=>{ct.init(e,t),Yn.init(e,t)}),lo=i("ZodCIDRv6",(e,t)=>{lt.init(e,t),Yn.init(e,t)}),po=i("ZodBase64",(e,t)=>{pt.init(e,t),Yn.init(e,t)}),fo=i("ZodBase64URL",(e,t)=>{ft.init(e,t),Yn.init(e,t)}),ho=i("ZodE164",(e,t)=>{ht.init(e,t),Yn.init(e,t)}),mo=i("ZodJWT",(e,t)=>{mt.init(e,t),Yn.init(e,t)}),go=i("ZodNumber",(e,t)=>{gt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n)=>{const o=n,{minimum:r,maximum:i,format:a,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;"string"==typeof a&&a.includes("int")?o.type="integer":o.type="number","number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(o.minimum=c,o.exclusiveMinimum=!0):o.exclusiveMinimum=c),"number"==typeof r&&(o.minimum=r,"number"==typeof c&&"draft-04"!==t.target&&(c>=r?delete o.minimum:delete o.exclusiveMinimum)),"number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u),"number"==typeof i&&(o.maximum=i,"number"==typeof u&&"draft-04"!==t.target&&(u<=i?delete o.maximum:delete o.exclusiveMaximum)),"number"==typeof s&&(o.multipleOf=s)})(e,t,n),e.gt=(t,n)=>e.check(sn(t,n)),e.gte=(t,n)=>e.check(un(t,n)),e.min=(t,n)=>e.check(un(t,n)),e.lt=(t,n)=>e.check(rn(t,n)),e.lte=(t,n)=>e.check(an(t,n)),e.max=(t,n)=>e.check(an(t,n)),e.int=t=>e.check(_o(t)),e.safe=t=>e.check(_o(t)),e.positive=t=>e.check(sn(0,t)),e.nonnegative=t=>e.check(un(0,t)),e.negative=t=>e.check(rn(0,t)),e.nonpositive=t=>e.check(an(0,t)),e.multipleOf=(t,n)=>e.check(cn(t,n)),e.step=(t,n)=>e.check(cn(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function yo(e){return function(e,t){return new e({type:"number",checks:[],...I(t)})}(go,e)}const vo=i("ZodNumberFormat",(e,t)=>{yt.init(e,t),go.init(e,t)});function _o(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...I(t)})}(vo,e)}const bo=i("ZodBoolean",(e,t)=>{vt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)});function wo(e){return function(e,t){return new e({type:"boolean",...I(t)})}(bo,e)}const zo=i("ZodAny",(e,t)=>{_t.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function So(){return new zo({type:"any"})}const ko=i("ZodUnknown",(e,t)=>{bt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Co(){return new ko({type:"unknown"})}const To=i("ZodNever",(e,t)=>{wt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function No(e){return function(e,t){return new e({type:"never",...I(t)})}(To,e)}const Io=i("ZodArray",(e,t)=>{St.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=n,i=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=gn(i.element,t,{...o,path:[...o.path,"items"]})})(e,t,n,o),e.element=t.element,e.min=(t,n)=>e.check(dn(t,n)),e.nonempty=t=>e.check(dn(1,t)),e.max=(t,n)=>e.check(ln(t,n)),e.length=(t,n)=>e.check(pn(t,n)),e.unwrap=()=>e.element});function Eo(e,t){return function(e,t,n){return new e({type:"array",element:t,...I(n)})}(Io,e,t)}const Ao=i("ZodObject",(e,t)=>{It.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object",r.properties={};const a=i.shape;for(const e in a)r.properties[e]=gn(a[e],t,{...o,path:[...o.path,"properties",e]});const s=new Set(Object.keys(a)),u=new Set([...s].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(r.required=Array.from(u)),"never"===i.catchall?._zod.def.type?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=gn(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,n,o),g(e,"shape",()=>t.shape),e.keyof=()=>Do(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Co()}),e.loose=()=>e.clone({...e._zod.def,catchall:Co()}),e.strict=()=>e.clone({...e._zod.def,catchall:No()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!S(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=v(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return y(this,"shape",n),n}});return N(e,o)}(e,t),e.safeExtend=t=>function(e,t){if(!S(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=v(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return y(this,"shape",n),n}});return N(e,n)}(e,t),e.merge=t=>function(e,t){const n=v(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return y(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return N(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return N(e,v(e._zod.def,{get shape(){const e={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(e[o]=n.shape[o])}return y(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=v(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete o[e]}return y(this,"shape",o),o},checks:[]});return N(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=v(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:o[t]}):o[t])}else for(const t in o)r[t]=e?new e({type:"optional",innerType:o[t]}):o[t];return y(this,"shape",r),r},checks:[]});return N(t,r)}(jo,e,t[0]),e.required=(...t)=>function(e,t,n){const o=v(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:o[t]}))}else for(const t in o)r[t]=new e({type:"nonoptional",innerType:o[t]});return y(this,"shape",r),r}});return N(t,o)}(Ho,e,t[0])});function Oo(e,t){const n={type:"object",shape:e??{},...I(t)};return new Ao(n)}const $o=i("ZodUnion",(e,t)=>{At.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def,i=!1===r.inclusive,a=r.options.map((e,n)=>gn(e,t,{...o,path:[...o.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=a:n.anyOf=a})(e,t,n,o),e.options=t.options});function xo(e,t){return new $o({type:"union",options:e,...I(t)})}const Po=i("ZodDiscriminatedUnion",(e,t)=>{$o.init(e,t),Ot.init(e,t)});function Zo(e,t,n){return new Po({type:"union",options:t,discriminator:e,...I(n)})}const Mo=i("ZodIntersection",(e,t)=>{$t.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def,i=gn(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=gn(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,u=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=u})(e,t,n,o)});function Uo(e,t){return new Mo({type:"intersection",left:e,right:t})}const Ro=i("ZodEnum",(e,t)=>{Zt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n)=>{const o=l(e._zod.def.entries);o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=o})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,o)=>{const r={};for(const o of e){if(!n.has(o))throw new Error(`Key ${o} not found in enum`);r[o]=t.entries[o]}return new Ro({...t,checks:[],...I(o),entries:r})},e.exclude=(e,o)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new Ro({...t,checks:[],...I(o),entries:r})}});function Do(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ro({type:"enum",entries:n,...I(t)})}const Go=i("ZodLiteral",(e,t)=>{Mt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n)=>{const o=e._zod.def,r=[];for(const e of o.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(e))}else r.push(e);if(0===r.length);else if(1===r.length){const e=r[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),r.every(e=>"boolean"==typeof e)&&(n.type="boolean"),r.every(e=>null===e)&&(n.type="null"),n.enum=r})(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Fo(e,t){return new Go({type:"literal",values:Array.isArray(e)?e:[e],...I(t)})}const Lo=i("ZodTransform",(e,t)=>{Ut.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new s(e.constructor.name);n.addIssue=o=>{if("string"==typeof o)n.issues.push(Z(o,n.value,t));else{const t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Z(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});const jo=i("ZodOptional",(e,t)=>{Dt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>zn(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function Bo(e){return new jo({type:"optional",innerType:e})}const Jo=i("ZodExactOptional",(e,t)=>{Gt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>zn(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});const Vo=i("ZodNullable",(e,t)=>{Ft.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def,i=gn(r.innerType,t,o),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Ko(e){return new Vo({type:"nullable",innerType:e})}const Wo=i("ZodDefault",(e,t)=>{Lt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def;gn(r.innerType,t,o),t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))})(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Yo=i("ZodPrefault",(e,t)=>{Bt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def;gn(r.innerType,t,o),t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))})(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});const Ho=i("ZodNonOptional",(e,t)=>{Jt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def;gn(r.innerType,t,o),t.seen.get(e).ref=r.innerType})(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});const Qo=i("ZodCatch",(e,t)=>{Kt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def;let i;gn(r.innerType,t,o),t.seen.get(e).ref=r.innerType;try{i=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const qo=i("ZodPipe",(e,t)=>{Wt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def,i="input"===t.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;gn(i,t,o),t.seen.get(e).ref=i})(e,t,0,o),e.in=t.in,e.out=t.out});function Xo(e,t){return new qo({type:"pipe",in:e,out:t})}const er=i("ZodReadonly",(e,t)=>{Ht.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(t,n,o)=>((e,t,n,o)=>{const r=e._zod.def;gn(r.innerType,t,o),t.seen.get(e).ref=r.innerType,n.readOnly=!0})(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});const tr=i("ZodCustom",(e,t)=>{qt.init(e,t),Jn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)});const nr=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],or=Do(nr),rr=Oo({targetedCountryGroups:Eo(or),targetedCountryCodes:Eo(Wn()).optional()}).optional(),ir={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},ar={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},sr={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},ur=e=>Object.keys(ir).find(t=>ir[t].countries.includes(e??""))??"International",cr=e=>{if(e){const t=ur(e);return sr[t]}return"£"},lr=e=>{if(e)return ar[e]},dr=e=>e.includes("subscribe/weekly/checkout"),pr=(e,t,n,o)=>{if(o){const r=o[ur(n)];return`${cr(n)}${r[e][t].price}`}},fr={CURRENCY_SYMBOL:({countryCode:e})=>cr(e),COUNTRY_NAME:({countryCode:e})=>lr(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>pr("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>pr("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>pr("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>pr("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},hr=/%%.*?%%/g,mr="gu.contributions.views",gr=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},yr=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),n=(t.getMonth()+1).toString().padStart(2,"0"),o=t.toLocaleString("default",{month:"long"}),r=t.getFullYear();return{reminderCta:`Remind me in ${o}`,reminderPeriod:`${r}-${n}-01`,reminderLabel:`${o} ${r}`}},vr=new Date("2023-12-31"),_r=e=>e>=(e=>new Date(e.getFullYear(),10,15))(e)&&e<gr(e.getFullYear()),br=Oo({text:Wn(),baseUrl:Wn()});let wr=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});var zr;new Ro({type:"enum",entries:wr,...I(zr)});const Sr=Zo("type",[Oo({type:Fo(wr.Custom),cta:br}),Oo({type:Fo(wr.ContributionsReminder)})]),kr=Oo({countLabel:Wn(),goalCopy:Wn().optional()}),Cr=Oo({total:yo(),goal:yo()}),Tr=Do(["US","AU","global"]),Nr=Oo({currencySymbol:Wn(),copy:kr,name:Tr,tickerData:Cr.optional()}),Ir=Oo({for52Weeks:yo(),forTargetedWeeks:yo()}),Er=Do(["for52Weeks","forTargetedWeeks"]),Ar=Oo({type:Fo("above"),copy:Wn().optional(),countType:Er.optional()}),Or=Do(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),$r=Do(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),xr=Oo({abTestName:Wn(),abTestVariant:Wn(),campaignCode:Wn(),componentType:$r,products:Eo(Or).nullish(),labels:Eo(Wn()).nullish(),ophanPageId:Wn(),platformId:Wn(),referrerUrl:Wn()}),Pr=Oo({mainUrl:Wn(),mobileUrl:Wn().optional(),tabletUrl:Wn().optional(),desktopUrl:Wn().optional(),leftColUrl:Wn().optional(),wideUrl:Wn().optional(),altText:Wn()}),Zr=Oo({name:Wn(),description:Wn().optional(),headshot:Pr.optional()}),Mr=/^[0-9A-F]{2}$/,Ur=Wn().refine(e=>Mr.test(e),{error:e=>`"${JSON.stringify(e.input)}" is not a valid hex value`}),Rr=Oo({r:Ur,g:Ur,b:Ur,kind:Fo("hex")}),Dr=Oo({mobileUrl:Wn(),tabletUrl:Wn(),desktopUrl:Wn(),altText:Wn(),kind:Fo("Image")}),Gr=Oo({buttonColour:Rr.nullish(),buttonTextColour:Rr.nullish(),buttonBorderColour:Rr.nullish(),buttonSelectColour:Rr.nullish(),buttonSelectTextColour:Rr.nullish(),buttonSelectBorderColour:Rr.nullish(),buttonSelectMarkerColour:Rr.nullish(),pillTextColour:Rr.nullish(),pillBackgroundColour:Rr.nullish(),kind:Fo("ChoiceCards")}),Fr=Oo({visual:Zo("kind",[Dr,Gr]).nullish(),colours:Oo({basic:Oo({background:Rr,bodyText:Rr})})}),Lr=Oo({copy:Wn()}),jr=xo([Fo("Monthly"),Fo("Annual")]),Br=Zo("supportTier",[Oo({supportTier:Fo("Contribution"),ratePlan:jr}),Oo({supportTier:Fo("SupporterPlus"),ratePlan:jr}),Oo({supportTier:Fo("DigitalSubscription"),ratePlan:jr}),Oo({supportTier:Fo("OneOff")})]),Jr=Oo({copy:Wn(),textColour:Rr.nullish(),backgroundColour:Rr.nullish()}),Vr=xo([Fo("LandingPage"),Fo("Checkout")]),Kr=Oo({testName:Wn(),variantName:Wn()}),Wr=Oo({product:Br,label:Wn(),isDefault:wo(),defaultExpanded:wo().optional(),benefitsLabel:Wn().nullish(),benefits:Eo(Lr),pill:Jr.nullish(),destination:Vr.nullish(),destinationTest:Kr.nullish()}),Yr=Oo({choiceCards:Eo(Wr),mobileChoiceCards:Eo(Wr).nullish()}),Hr=Oo({maxViewsCount:yo(),maxViewsDays:yo(),minDaysBetweenViews:yo()}),Qr=Oo({reminderCta:Wn(),reminderLabel:Wn(),reminderPeriod:Wn()}),qr=Do(["ONE_OFF","MONTHLY","ANNUAL"]),Xr=Oo({testName:Wn(),variantName:Wn(),defaultContributionType:qr,displayContributionType:qr.array(),amountsCardData:Oo({ONE_OFF:Oo({amounts:Eo(yo()),defaultAmount:yo(),hideChooseYourAmount:wo().optional()}),MONTHLY:Oo({amounts:Eo(yo()),defaultAmount:yo(),hideChooseYourAmount:wo().optional()}),ANNUAL:Oo({amounts:Eo(yo()),defaultAmount:yo(),hideChooseYourAmount:wo().optional()})})}),ei=Oo({newsletterId:Wn(),successDescription:Wn()}),ti=Oo({name:Wn(),heading:Wn().optional(),paragraphs:Eo(Wn()),highlightedText:Wn().optional(),tickerSettings:Nr.optional(),cta:br.optional(),secondaryCta:Sr.optional(),newsletterSignup:ei.optional(),image:Pr.optional(),showReminderFields:Qr.optional(),separateArticleCount:Ar.optional(),promoCodes:Eo(Wn()).nullish(),maxViews:Hr.optional(),showSignInLink:wo().optional(),bylineWithImage:Zr.optional(),showChoiceCards:wo().optional(),choiceCardsSettings:Yr.nullish(),choiceCardAmounts:Xr.optional(),defaultChoiceCardFrequency:qr.optional()}),ni=Oo({variant:ti,tracking:xr,countryCode:Wn().nullish(),articleCounts:Ir,onReminderOpen:So().nullish(),fetchEmail:So().nullish(),submitComponentEvent:So().nullish(),openCmp:So().nullish(),hasConsentForArticleCount:wo().nullish(),stage:Wn().nullish()}),oi=Do(["contributions","subscriptions","signIn","abandonedBasket"]),ri=Oo({heading:Wn().optional(),messageText:Wn().optional(),paragraphs:Eo(Wn()).optional(),mobileMessageText:Wn().optional(),highlightedText:Wn().optional(),cta:br.optional(),secondaryCta:Sr.optional()}),ii=Oo({tracking:xr,bannerChannel:oi,content:ri.nullish(),mobileContent:ri.nullish(),countryCode:Wn().nullish(),isSupporter:wo().nullish(),tickerSettings:Nr.nullish(),submitComponentEvent:So(),articleCounts:Ir,hasOptedOutOfArticleCount:wo().nullish(),fetchEmail:So().nullish(),separateArticleCount:wo().nullish(),design:Fr.nullish(),choiceCardsSettings:Yr.nullish(),promoCodes:Eo(Wn()).nullish(),isCollapsible:wo().nullish(),contributionsServiceUrl:Wn().nullish()}),ai=Oo({heading:Wn(),subheading:Wn(),primaryCta:br.optional(),secondaryCta:br.optional(),benefits:Eo(Wn()).optional()}),si=Oo({content:ai,tracking:xr,mobileContent:ai.optional(),countryCode:Wn().optional(),submitComponentEvent:So(),numArticles:yo().optional(),promoCodes:Eo(Wn()).nullish()}),ui=Oo({image:Pr,bodyCopy:Eo(Wn()),cta:br.optional()});Oo({content:ui,tracking:xr,countryCode:Wn().optional(),submitComponentEvent:So(),promoCodes:Eo(Wn()).nullish()});const ci=Do(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),li=Do(["new","guest","current"]),di=Do(["Epic","EpicAppleNews","EpicLiveblog","Banner1","Banner2","Header","GutterLiveblog"]),pi=Do(["Live","Draft","Archived"]),fi=Do(["Mobile","Desktop","All","iOS","Android"]),hi=Do(["SignedIn","SignedOut","All"]),mi=Do(["HasConsented","HasNotConsented","All"]),gi=Uo(Zo("name",[Oo({name:Fo("ABTest")}),Oo({name:Fo("EpsilonGreedyBandit"),epsilon:yo(),sampleCount:yo().optional()}),Oo({name:Fo("Roulette"),sampleCount:yo().optional()})]),Oo({testName:Wn().optional()})),yi=Oo({channel:di,name:Wn(),status:pi,priority:yo(),controlProportionSettings:Oo({proportion:yo(),offset:yo()}).optional(),deviceType:fi.optional(),signedInStatus:hi.optional(),consentStatus:mi.optional(),methodologies:gi.array().optional(),mParticleAudience:yo().nullish()}),vi=Do(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),_i=Oo({minViews:yo(),maxViews:yo().optional(),periodInWeeks:yo(),tagIds:Eo(Wn()).optional()});Oo({userType:Eo(li),product:Eo(ci)}),Oo({tagIds:Eo(Wn()),sectionIds:Eo(Wn()),excludedTagIds:Eo(Wn()),excludedSectionIds:Eo(Wn())});const bi=Oo({maxViewsCount:yo(),maxViewsDays:yo(),minDaysBetweenViews:yo()});yi.extend({name:Wn(),status:pi,locations:Eo(or).optional(),regionTargeting:rr.optional(),tagIds:Eo(Wn()),sections:Eo(Wn()),excludedTagIds:Eo(Wn()),excludedSections:Eo(Wn()),alwaysAsk:wo(),maxViews:bi.optional(),userCohort:vi,hasCountryName:wo(),highPriority:wo(),useLocalViewLog:wo(),articlesViewedSettings:_i.optional(),priority:yo(),variants:ti.array()});const wi=Oo({amount:xo([yo(),Fo("other")]),billingPeriod:xo([Fo("ONE_OFF"),Fo("MONTHLY"),Fo("ANNUAL")]),product:xo([Fo("Contribution"),Fo("SupporterPlus"),Fo("PremiumTier"),Fo("DailyEdition"),Fo("GuardianWeekly"),Fo("Paper"),Fo("PaperAndDigital")]),region:xo([Fo("uk"),Fo("us"),Fo("au"),Fo("eu"),Fo("int"),Fo("nz"),Fo("ca")])}),zi=(e,t,n,o)=>{const r=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e);return fetch(`${t}/${e}${r?`?force=${r}`:""}`,{method:"post",headers:{"Content-Type":"application/json",...o},body:JSON.stringify(n)}).then(t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t}).then(e=>e.json())};exports.CountryGroupId=nr,exports.SecondaryCtaType=wr,exports.abandonedBasketSchema=wi,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const n=(e=>ir[ur(e)].supportRegionId)(t);if(!dr(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,(e,t,o)=>`${t}/${n.toLowerCase()}/${o}`)}return e},exports.bannerSchema=ii,exports.buildReminderFields=yr,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(hr)?.filter(e=>"%%ARTICLE_COUNT%%"!==e);return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=ur,exports.countryGroupIdSchema=or,exports.countryGroups=ir,exports.epicPropsSchema=ni,exports.getBanner=(e,t)=>zi("banner",e,t),exports.getCountryName=lr,exports.getEpic=(e,t,n)=>zi("epic",e,t,n),exports.getEpicViewLog=e=>e.get(mr)??void 0,exports.getGutterLiveblog=(e,t)=>zi("gutter-liveblog",e,t),exports.getHeader=(e,t)=>zi("header",e,t),exports.getLiveblogEpic=(e,t)=>zi("liveblog-epic",e,t),exports.getLocalCurrencySymbol=cr,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&_r(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${n=t.getFullYear()}-${(gr(n).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${n}`}:"US"===e&&(e=>e>=gr(e.getFullYear())&&e<vr)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):yr(t);var n},exports.getWeeklyArticleHistory=t=>t.get(e)??void 0,exports.headerPropsSchema=si,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inTargetedCountry=(e,t=[],n=[])=>0===t.length&&0===n.length||!!e&&(!!t.includes(ur(e.toUpperCase()))||n.includes(e.toUpperCase())),exports.incrementWeeklyArticleCount=(o,i,a)=>{const s=((e,o)=>{const r=n(new Date),i=e.get(t);if(i?.week===r){const n=i.articles[o]||0;return e.set(t,{week:r,articles:{...i.articles,[o]:n+1}}),n>0}return e.set(t,{week:r,articles:{[o]:1}}),!1})(o,i);if(!s){const t=n(new Date),i=o.get(e)??[],s=i.length>0?i[0]:null;if(s?.week&&s.week===t)s.count+=1,s.tags=r(a,s.tags),o.set(e,i);else{i.unshift({week:t,count:1,tags:r(a,{})});const n=t-365,s=i.filter(e=>e.week>=n);o.set(e,s)}}},exports.isGWCheckoutUrl=dr,exports.isoCurrencyToCurrencySymbol={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},exports.logEpicView=e=>{const t=JSON.parse(localStorage.getItem(mr)??""),n=t?t.value:[];n.push({date:(new Date).getTime(),testId:e});const o={value:n.slice(-50)};localStorage.setItem(mr,JSON.stringify(o))},exports.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(hr,e=>{const o=e.substring(2,e.length-2),r=fr[o];if(r){const e=r({countryCode:t,prices:n});if(e)return e}return e}):"",exports.targetedRegionsSchema=rr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="gu.history.weeklyArticleCount",t="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},r=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),o=(e,t={})=>(e.forEach(e=>{r.has(e)&&(t[e]=(t[e]??0)+1)}),t);var i;function s(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:s,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const o=s.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=o[t].bind(n))}}const o=n?.Parent??Object;class i extends o{}function s(e){var t;const o=n?.Parent?new i:this;r(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const e of o._zod.deferred)e();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class a extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class u extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(i=globalThis).__zod_globalConfig??(i.__zod_globalConfig={});const c=globalThis.__zod_globalConfig;function l(e){return e&&Object.assign(c,e),c}function d(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function p(e,t){return"bigint"==typeof t?t.toString():t}function f(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function h(e){return null==e}function m(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const g=Symbol("evaluating");function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==g)return void 0===r&&(r=g,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function b(e){return JSON.stringify(e)}const w="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function z(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const S=f(()=>{if(c.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function k(e){if(!1===z(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==z(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function C(e){return k(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const T=new Set(["string","number","symbol"]);function N(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function I(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function E(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new 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 $={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function A(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function O(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!1===e.issues[n]?.continue)return!0;return!1}function x(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function P(e){return"string"==typeof e?e:e?.message}function Z(e,t,n){const r=e.message?e.message:P(e.inst?._zod.def?.error?.(e))??P(t?.error?.(e))??P(n.customError?.(e))??P(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:s,...a}=e;return a.path??(a.path=[]),a.message=r,t?.reportInput&&(a.input=s),a}function M(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function R(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const U=(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,p,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},D=s("$ZodError",U),G=s("$ZodError",U,{Parent:Error});const L=e=>(t,n,r,o)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new a;if(s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Z(e,i,l())));throw w(t,o?.callee),t}return s.value},F=e=>async(t,n,r,o)=>{const i=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Z(e,i,l())));throw w(t,o?.callee),t}return s.value},j=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new a;return i.issues.length?{success:!1,error:new(e??D)(i.issues.map(e=>Z(e,o,l())))}:{success:!0,data:i.value}},B=j(G),J=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>Z(e,o,l())))}:{success:!0,data:i.value}},V=J(G),K=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return L(e)(t,n,o)},W=e=>(t,n,r)=>L(e)(t,n,r),Y=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return F(e)(t,n,o)},H=e=>async(t,n,r)=>F(e)(t,n,r),Q=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return j(e)(t,n,o)},q=e=>(t,n,r)=>j(e)(t,n,r),X=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return J(e)(t,n,o)},ee=e=>async(t,n,r)=>J(e)(t,n,r),te=/^[cC][0-9a-z]{6,}$/,ne=/^[0-9a-z]+$/,re=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,oe=/^[0-9a-vA-V]{20}$/,ie=/^[A-Za-z0-9]{27}$/,se=/^[a-zA-Z0-9_-]{21}$/,ae=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ue=/^([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})$/,ce=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,le=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const de=/^(?:(?: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])$/,pe=/^(([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}|:))$/,fe=/^((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])$/,he=/^(([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])$/,me=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ge=/^[A-Za-z0-9_-]*$/,ye=/^https?$/,ve=/^\+[1-9]\d{6,14}$/,_e="(?:(?:\\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])))",be=new RegExp(`^${_e}$`);function we(e){const 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 ze=/^-?\d+$/,Se=/^-?\d+(?:\.\d+)?$/,ke=/^(?:true|false)$/i,Ce=/^[^A-Z]*$/,Te=/^[^a-z]*$/,Ne=s("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ie={number:"number",bigint:"bigint",object:"date"},Ee=s("$ZodCheckLessThan",(e,t)=>{Ne.init(e,t);const n=Ie[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$e=s("$ZodCheckGreaterThan",(e,t)=>{Ne.init(e,t);const n=Ie[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ae=s("$ZodCheckMultipleOf",(e,t)=>{Ne.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Oe=s("$ZodCheckNumberFormat",(e,t)=>{Ne.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=$[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=ze)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),xe=s("$ZodCheckMaxLength",(e,t)=>{var n;Ne.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!h(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const o=M(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Pe=s("$ZodCheckMinLength",(e,t)=>{var n;Ne.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!h(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const o=M(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ze=s("$ZodCheckLengthEquals",(e,t)=>{var n;Ne.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!h(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,o=r.length;if(o===t.length)return;const i=M(r),s=o>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Me=s("$ZodCheckStringFormat",(e,t)=>{var n,r;Ne.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Re=s("$ZodCheckRegex",(e,t)=>{Me.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ue=s("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ce),Me.init(e,t)}),De=s("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Te),Me.init(e,t)}),Ge=s("$ZodCheckIncludes",(e,t)=>{Ne.init(e,t);const n=N(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Le=s("$ZodCheckStartsWith",(e,t)=>{Ne.init(e,t);const n=new RegExp(`^${N(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Fe=s("$ZodCheckEndsWith",(e,t)=>{Ne.init(e,t);const n=new RegExp(`.*${N(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),je=s("$ZodCheckOverwrite",(e,t)=>{Ne.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Be{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const Je={major:4,minor:4,patch:3},Ve=s("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Je;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,o=A(e);for(const i of t){if(i._zod.def.when){if(O(e))continue;if(!i._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,s=i._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new a;if(r||s instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(o||(o=A(e,t)))});else{if(e.issues.length===t)continue;o||(o=A(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(A(n))return n.aborted=!0,n;const s=t(o,r,i);if(s instanceof Promise){if(!1===i.async)throw new a;return s.then(t=>e._zod.parse(t,i))}return e._zod.parse(s,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){const t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,o,i)):n(t,o,i)}const s=e._zod.parse(o,i);if(s instanceof Promise){if(!1===i.async)throw new a;return s.then(e=>t(e,r,i))}return t(s,r,i)}}y(e,"~standard",()=>({validate:t=>{try{const n=B(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return V(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),Ke=s("$ZodString",(e,t)=>{var n;Ve.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),We=s("$ZodStringFormat",(e,t)=>{Me.init(e,t),Ke.init(e,t)}),Ye=s("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ue),We.init(e,t)}),He=s("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ce(e))}else t.pattern??(t.pattern=ce());We.init(e,t)}),Qe=s("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=le),We.init(e,t)}),qe=s("$ZodURL",(e,t)=>{We.init(e,t),e._zod.check=n=>{try{const r=n.value.trim();if(!t.normalize&&t.protocol?.source===ye.source&&!/^https?:\/\//i.test(r))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});const o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Xe=s("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),We.init(e,t)}),et=s("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=se),We.init(e,t)}),tt=s("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=te),We.init(e,t)}),nt=s("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ne),We.init(e,t)}),rt=s("$ZodULID",(e,t)=>{t.pattern??(t.pattern=re),We.init(e,t)}),ot=s("$ZodXID",(e,t)=>{t.pattern??(t.pattern=oe),We.init(e,t)}),it=s("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ie),We.init(e,t)}),st=s("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=we({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${_e}T(?:${r})$`)}(t)),We.init(e,t)}),at=s("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=be),We.init(e,t)}),ut=s("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${we(t)}$`)),We.init(e,t)}),ct=s("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ae),We.init(e,t)}),lt=s("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=de),We.init(e,t),e._zod.bag.format="ipv4"}),dt=s("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=pe),We.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),pt=s("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=fe),We.init(e,t)}),ft=s("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=he),We.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function ht(e){if(""===e)return!0;if(/\s/.test(e))return!1;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const mt=s("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=me),We.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ht(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const gt=s("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ge),We.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!ge.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return ht(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),yt=s("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ve),We.init(e,t)});const vt=s("$ZodJWT",(e,t)=>{We.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),_t=s("$ZodNumber",(e,t)=>{Ve.init(e,t),e._zod.pattern=e._zod.bag.pattern??Se,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),bt=s("$ZodNumberFormat",(e,t)=>{Oe.init(e,t),_t.init(e,t)}),wt=s("$ZodBoolean",(e,t)=>{Ve.init(e,t),e._zod.pattern=ke,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),zt=s("$ZodAny",(e,t)=>{Ve.init(e,t),e._zod.parse=e=>e}),St=s("$ZodUnknown",(e,t)=>{Ve.init(e,t),e._zod.parse=e=>e}),kt=s("$ZodNever",(e,t)=>{Ve.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Ct(e,t,n){e.issues.length&&t.issues.push(...x(n,e.issues)),t.value[n]=e.value}const Tt=s("$ZodArray",(e,t)=>{Ve.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const s=o[e],a=t.element._zod.run({value:s,issues:[]},r);a instanceof Promise?i.push(a.then(t=>Ct(t,n,e))):Ct(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Nt(e,t,n,r,o,i){const s=n in r;if(e.issues.length){if(o&&i&&!s)return;t.issues.push(...x(n,e.issues))}s||o?void 0===e.value?s&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}function It(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Et(e,t,n,r,o,i){const s=[],a=o.keySet,u=o.catchall._zod,c=u.def.type,l="optional"===u.optin,d="optional"===u.optout;for(const o in t){if("__proto__"===o)continue;if(a.has(o))continue;if("never"===c){s.push(o);continue}const i=u.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then(e=>Nt(e,n,o,t,l,d))):Nt(i,n,o,t,l,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const $t=s("$ZodObject",(e,t)=>{Ve.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=f(()=>It(t));y(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const o=z,i=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=r.value);const a=t.value;if(!o(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const r=c[e],o="optional"===r._zod.optin,i="optional"===r._zod.optout,s=r._zod.run({value:a[e],issues:[]},n);s instanceof Promise?u.push(s.then(n=>Nt(n,t,e,a,o,i))):Nt(s,t,e,a,o,i)}return i?Et(u,a,t,n,r.value,e):u.length?Promise.all(u).then(()=>t):t}}),At=s("$ZodObjectJIT",(e,t)=>{$t.init(e,t);const n=e._zod.parse,r=f(()=>It(t));let o;const i=z,s=!c.jitless,a=s&&S.value,u=t.catchall;let l;e._zod.parse=(c,d)=>{l??(l=r.value);const p=c.value;return i(p)?s&&a&&!1===d?.async&&!0!==d.jitless?(o||(o=(e=>{const t=new Be(["shape","payload","ctx"]),n=r.value,o=e=>{const t=b(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let s=0;for(const e of n.keys)i[e]="key_"+s++;t.write("const newResult = {};");for(const r of n.keys){const n=i[r],s=b(r),a=e[r],u="optional"===a?._zod?.optin,c="optional"===a?._zod?.optout;t.write(`const ${n} = ${o(r)};`),u&&c?t.write(`\n if (${n}.issues.length) {\n if (${s} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):u?t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):t.write(`\n const ${n}_present = ${s} in input;\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${s}]\n });\n }\n\n if (${n}_present) {\n if (${n}.value === undefined) {\n newResult[${s}] = undefined;\n } else {\n newResult[${s}] = ${n}.value;\n }\n }\n\n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),c=o(c,d),u?Et([],p,c,d,l,e):c):n(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c)}});function Ot(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const o=e.filter(e=>!A(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Z(e,r,l())))}),t)}const xt=s("$ZodUnion",(e,t)=>{Ve.init(e,t),y(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),y(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),y(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),y(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>m(e.source)).join("|")})$`)}});const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);if(t instanceof Promise)s.push(t),i=!0;else{if(0===t.issues.length)return t;s.push(t)}}return i?Promise.all(s).then(t=>Ot(t,r,e,o)):Ot(s,r,e,o)}}),Pt=s("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,xt.init(e,t);const n=e._zod.parse;y(e._zod,"propValues",()=>{const e={};for(const n of t.options){const r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(const r of n)e[t].add(r)}}return e});const r=f(()=>{const e=t.options,n=new Map;for(const r of e){const e=r._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(o,i)=>{const s=o.value;if(!z(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const a=r.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback||"backward"===i.direction?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),Zt=s("$ZodIntersection",(e,t)=>{Ve.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,n])=>Rt(e,t,n)):Rt(e,o,i)}});function Mt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(k(e)&&k(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),o={...e,...t};for(const n of r){const r=Mt(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};o[n]=r.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=Mt(e[r],t[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Rt(e,t,n){const r=new Map;let o;for(const n of t.issues)if("unrecognized_keys"===n.code){o??(o=n);for(const e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);const i=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&o&&e.issues.push({...o,keys:i}),A(e))return e;const s=Mt(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const Ut=s("$ZodEnum",(e,t)=>{Ve.init(e,t);const n=d(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>T.has(typeof e)).map(e=>"string"==typeof e?N(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),Dt=s("$ZodLiteral",(e,t)=>{if(Ve.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?N(e):e?N(e.toString()):String(e)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),Gt=s("$ZodTransform",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new u(e.constructor.name);const o=t.transform(n.value,n);if(r.async){return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n.fallback=!0,n))}if(o instanceof Promise)throw new a;return n.value=o,n.fallback=!0,n}});function Lt(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ft=s("$ZodOptional",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",e._zod.optout="optional",y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${m(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=e.value,o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(e=>Lt(e,r)):Lt(o,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),jt=s("$ZodExactOptional",(e,t)=>{Ft.init(e,t),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Bt=s("$ZodNullable",(e,t)=>{Ve.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${m(e.source)}|null)$`):void 0}),y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Jt=s("$ZodDefault",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Vt(e,t)):Vt(r,t)}});function Vt(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Kt=s("$ZodPrefault",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Wt=s("$ZodNonOptional",(e,t)=>{Ve.init(e,t),y(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(t=>Yt(t,e)):Yt(o,e)}});function Yt(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 Ht=s("$ZodCatch",(e,t)=>{Ve.init(e,t),e._zod.optin="optional",y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Z(e,n,l()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Z(e,n,l()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Qt=s("$ZodPipe",(e,t)=>{Ve.init(e,t),y(e._zod,"values",()=>t.in._zod.values),y(e._zod,"optin",()=>t.in._zod.optin),y(e._zod,"optout",()=>t.out._zod.optout),y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>qt(e,t.in,n)):qt(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>qt(e,t.out,n)):qt(r,t.out,n)}});function qt(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Xt=s("$ZodReadonly",(e,t)=>{Ve.init(e,t),y(e._zod,"propValues",()=>t.innerType._zod.propValues),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"optin",()=>t.innerType?._zod?.optin),y(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(en):en(r)}});function en(e){return e.value=Object.freeze(e.value),e}const tn=s("$ZodCustom",(e,t)=>{Ne.init(e,t),Ve.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(t=>nn(t,n,r,e));nn(o,n,r,e)}});function nn(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(R(e))}}var rn;class on{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const 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){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(rn=globalThis).__zod_globalRegistry??(rn.__zod_globalRegistry=new on);const sn=globalThis.__zod_globalRegistry;function an(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function un(e,t){return new Ee({check:"less_than",...E(t),value:e,inclusive:!1})}function cn(e,t){return new Ee({check:"less_than",...E(t),value:e,inclusive:!0})}function ln(e,t){return new $e({check:"greater_than",...E(t),value:e,inclusive:!1})}function dn(e,t){return new $e({check:"greater_than",...E(t),value:e,inclusive:!0})}function pn(e,t){return new Ae({check:"multiple_of",...E(t),value:e})}function fn(e,t){return new xe({check:"max_length",...E(t),maximum:e})}function hn(e,t){return new Pe({check:"min_length",...E(t),minimum:e})}function mn(e,t){return new Ze({check:"length_equals",...E(t),length:e})}function gn(e){return new je({check:"overwrite",tx:e})}function yn(e,t){const n=function(e,t){const n=new Ne({check:"custom",...E(t)});return n._zod.check=e,n}(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(R(e,t.value,n._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=t.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),t.issues.push(R(r))}},e(t.value,t)),t);return n}function vn(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??sn,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 _n(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,r);else{const n=s.schema,i=t.processors[o.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}const i=e._zod.parent;i&&(s.ref||(s.ref=i),_n(i,t,r),t.seen.get(i).isParent=!0)}const u=t.metadataRegistry.get(e);u&&Object.assign(s.schema,u),"input"===t.io&&zn(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault;return t.seen.get(e).schema}function bn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=r.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}const o=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:o,defId:i}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(n)return{ref:o(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${o("__shared")}#/${r}/${i}`}}if(t[1]===n)return{ref:"#"};const o=`#/${r}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:o+i}})(t);r.def={...r.schema},i&&(r.defId=i);const s=r.schema;for(const e in s)delete s[e];s.$ref=o};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const r=n[1];if(t===n[0]){o(n);continue}if(e.external){const r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){o(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?o(n):(r.cycle||r.count>1&&"ref"===e.reused)&&o(n)}}function wn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const o=n.def??n.schema,i={...o},s=n.ref;if(n.ref=null,s){r(s);const n=e.seen.get(s),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(o,a):(o.allOf=o.allOf??[],o.allOf.push(a)),Object.assign(o,i);if(t._zod.parent===s)for(const e in o)"$ref"!==e&&"allOf"!==e&&(e in i||delete o[e]);if(a.$ref&&n.def)for(const e in o)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(o[e])===JSON.stringify(n.def[e])&&delete o[e]}const a=t._zod.parent;if(a&&a!==s){r(a);const t=e.seen.get(a);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(const e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())r(t[0]);const o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(n)}Object.assign(o,n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;void 0!==i&&o.id===i&&delete o.id;const s=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,s[e.defId]=e.def)}e.external||Object.keys(s).length>0&&("draft-2020-12"===e.target?o.$defs=s:o.definitions=s);try{const n=JSON.parse(JSON.stringify(o));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Sn(t,"input",e.processors),output:Sn(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function zn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return zn(r.element,n);if("set"===r.type)return zn(r.valueType,n);if("lazy"===r.type)return zn(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return zn(r.innerType,n);if("intersection"===r.type)return zn(r.left,n)||zn(r.right,n);if("record"===r.type||"map"===r.type)return zn(r.keyType,n)||zn(r.valueType,n);if("pipe"===r.type)return!!e._zod.traits.has("$ZodCodec")||(zn(r.in,n)||zn(r.out,n));if("object"===r.type){for(const e in r.shape)if(zn(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(zn(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(zn(e,n))return!0;return!(!r.rest||!zn(r.rest,n))}return!1}const Sn=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=vn({...o??{},target:i,io:t,processors:n});return _n(e,s),bn(s,e),wn(s,e)},kn={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Cn=(e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r);t.seen.get(e).ref=o.innerType},Tn=s("ZodISODateTime",(e,t)=>{st.init(e,t),er.init(e,t)});function Nn(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}(Tn,e)}const In=s("ZodISODate",(e,t)=>{at.init(e,t),er.init(e,t)});function En(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}(In,e)}const $n=s("ZodISOTime",(e,t)=>{ut.init(e,t),er.init(e,t)});function An(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}($n,e)}const On=s("ZodISODuration",(e,t)=>{ct.init(e,t),er.init(e,t)});function xn(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}(On,e)}const Pn=(e,t)=>{D.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=(e,o=[])=>{for(const i of e.issues)if("invalid_union"===i.code&&i.errors.length)i.errors.map(e=>r({issues:e},[...o,...i.path]));else if("invalid_key"===i.code)r({issues:i.issues},[...o,...i.path]);else if("invalid_element"===i.code)r({issues:i.issues},[...o,...i.path]);else{const e=[...o,...i.path];if(0===e.length)n._errors.push(t(i));else{let r=n,o=0;for(;o<e.length;){const n=e[o];o===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(i))):r[n]=r[n]||{_errors:[]},r=r[n],o++}}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,p,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,p,2)}},isEmpty:{get:()=>0===e.issues.length}})},Zn=s("ZodError",Pn,{Parent:Error}),Mn=L(Zn),Rn=F(Zn),Un=j(Zn),Dn=J(Zn),Gn=K(Zn),Ln=W(Zn),Fn=Y(Zn),jn=H(Zn),Bn=Q(Zn),Jn=q(Zn),Vn=X(Zn),Kn=ee(Zn),Wn=new WeakMap;function Yn(e,t,n){const r=Object.getPrototypeOf(e);let o=Wn.get(r);if(o||(o=new Set,Wn.set(r,o)),!o.has(t)){o.add(t);for(const e in n){const t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){const n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const Hn=s("ZodType",(e,t)=>(Ve.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Sn(e,"input"),output:Sn(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=vn({...n,processors:t});return _n(e,r),bn(r,e),wn(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Mn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Un(e,t,n),e.parseAsync=async(t,n)=>Rn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Dn(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Gn(e,t,n),e.decode=(t,n)=>Ln(e,t,n),e.encodeAsync=async(t,n)=>Fn(e,t,n),e.decodeAsync=async(t,n)=>jn(e,t,n),e.safeEncode=(t,n)=>Bn(e,t,n),e.safeDecode=(t,n)=>Jn(e,t,n),e.safeEncodeAsync=async(t,n)=>Vn(e,t,n),e.safeDecodeAsync=async(t,n)=>Kn(e,t,n),Yn(e,"ZodType",{check(...e){const t=this.def;return this.clone(_(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 I(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,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}(io,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return yn(e,t)}(e,t))},overwrite(e){return this.check(gn(e))},optional(){return Wr(this)},exactOptional(){return new Yr({type:"optional",innerType:this})},nullable(){return Qr(this)},nullish(){return Wr(Qr(this))},nonoptional(e){return function(e,t){return new eo({type:"nonoptional",innerType:e,...E(t)})}(this,e)},array(){return xr(this)},or(e){return Rr([this,e])},and(e){return Lr(this,e)},transform(e){return ro(this,new Vr({type:"transform",transform:e}))},default(e){return t=e,new qr({type:"default",innerType:this,get defaultValue(){return"function"==typeof t?t():C(t)}});var t},prefault(e){return t=e,new Xr({type:"prefault",innerType:this,get defaultValue(){return"function"==typeof t?t():C(t)}});var t},catch(e){return new to({type:"catch",innerType:this,catchValue:"function"==typeof(t=e)?t:()=>t});var t},pipe(e){return ro(this,e)},readonly(){return new oo({type:"readonly",innerType:this})},describe(e){const t=this.clone();return sn.add(t,{description:e}),t},meta(...e){if(0===e.length)return sn.get(this);const t=this.clone();return sn.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:()=>sn.get(e)?.description,configurable:!0}),e)),Qn=s("_ZodString",(e,t)=>{Ke.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:o,maximum:i,format:s,patterns:a,contentEncoding:u}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof i&&(r.maxLength=i),s&&(r.format=kn[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),u&&(r.contentEncoding=u),a&&a.size>0){const e=[...a];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Yn(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new Re({check:"string_format",format:"regex",...E(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new Ge({check:"string_format",format:"includes",...E(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new Le({check:"string_format",format:"starts_with",...E(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new Fe({check:"string_format",format:"ends_with",...E(t),suffix:e})}(...e))},min(...e){return this.check(hn(...e))},max(...e){return this.check(fn(...e))},length(...e){return this.check(mn(...e))},nonempty(...e){return this.check(hn(1,...e))},lowercase(e){return this.check(function(e){return new Ue({check:"string_format",format:"lowercase",...E(e)})}(e))},uppercase(e){return this.check(function(e){return new De({check:"string_format",format:"uppercase",...E(e)})}(e))},trim(){return this.check(gn(e=>e.trim()))},normalize(...e){return this.check(function(e){return gn(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(gn(e=>e.toLowerCase()))},toUpperCase(){return this.check(gn(e=>e.toUpperCase()))},slugify(){return this.check(gn(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}})}),qn=s("ZodString",(e,t)=>{Ke.init(e,t),Qn.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}(tr,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}(or,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}(_r,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}(ir,t)),e.guid=t=>e.check(an(nr,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}(rr,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}(rr,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}(rr,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}(rr,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}(sr,t)),e.guid=t=>e.check(an(nr,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}(ar,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}(ur,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}(cr,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}(gr,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}(yr,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}(lr,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}(dr,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}(pr,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}(fr,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}(hr,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}(mr,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}(vr,t)),e.datetime=t=>e.check(Nn(t)),e.date=t=>e.check(En(t)),e.time=t=>e.check(An(t)),e.duration=t=>e.check(xn(t))});function Xn(e){return function(e,t){return new e({type:"string",...E(t)})}(qn,e)}const er=s("ZodStringFormat",(e,t)=>{We.init(e,t),Qn.init(e,t)}),tr=s("ZodEmail",(e,t)=>{Qe.init(e,t),er.init(e,t)}),nr=s("ZodGUID",(e,t)=>{Ye.init(e,t),er.init(e,t)}),rr=s("ZodUUID",(e,t)=>{He.init(e,t),er.init(e,t)}),or=s("ZodURL",(e,t)=>{qe.init(e,t),er.init(e,t)}),ir=s("ZodEmoji",(e,t)=>{Xe.init(e,t),er.init(e,t)}),sr=s("ZodNanoID",(e,t)=>{et.init(e,t),er.init(e,t)}),ar=s("ZodCUID",(e,t)=>{tt.init(e,t),er.init(e,t)}),ur=s("ZodCUID2",(e,t)=>{nt.init(e,t),er.init(e,t)}),cr=s("ZodULID",(e,t)=>{rt.init(e,t),er.init(e,t)}),lr=s("ZodXID",(e,t)=>{ot.init(e,t),er.init(e,t)}),dr=s("ZodKSUID",(e,t)=>{it.init(e,t),er.init(e,t)}),pr=s("ZodIPv4",(e,t)=>{lt.init(e,t),er.init(e,t)}),fr=s("ZodIPv6",(e,t)=>{dt.init(e,t),er.init(e,t)}),hr=s("ZodCIDRv4",(e,t)=>{pt.init(e,t),er.init(e,t)}),mr=s("ZodCIDRv6",(e,t)=>{ft.init(e,t),er.init(e,t)}),gr=s("ZodBase64",(e,t)=>{mt.init(e,t),er.init(e,t)}),yr=s("ZodBase64URL",(e,t)=>{gt.init(e,t),er.init(e,t)}),vr=s("ZodE164",(e,t)=>{yt.init(e,t),er.init(e,t)}),_r=s("ZodJWT",(e,t)=>{vt.init(e,t),er.init(e,t)}),br=s("ZodNumber",(e,t)=>{_t.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n,{minimum:o,maximum:i,format:s,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number";const l="number"==typeof c&&c>=(o??Number.NEGATIVE_INFINITY),d="number"==typeof u&&u<=(i??Number.POSITIVE_INFINITY),p="draft-04"===t.target||"openapi-3.0"===t.target;l?p?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof o&&(r.minimum=o),d?p?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:"number"==typeof i&&(r.maximum=i),"number"==typeof a&&(r.multipleOf=a)})(e,t,n),Yn(e,"ZodNumber",{gt(e,t){return this.check(ln(e,t))},gte(e,t){return this.check(dn(e,t))},min(e,t){return this.check(dn(e,t))},lt(e,t){return this.check(un(e,t))},lte(e,t){return this.check(cn(e,t))},max(e,t){return this.check(cn(e,t))},int(e){return this.check(Sr(e))},safe(e){return this.check(Sr(e))},positive(e){return this.check(ln(0,e))},nonnegative(e){return this.check(dn(0,e))},negative(e){return this.check(un(0,e))},nonpositive(e){return this.check(cn(0,e))},multipleOf(e,t){return this.check(pn(e,t))},step(e,t){return this.check(pn(e,t))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function wr(e){return function(e,t){return new e({type:"number",checks:[],...E(t)})}(br,e)}const zr=s("ZodNumberFormat",(e,t)=>{bt.init(e,t),br.init(e,t)});function Sr(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}(zr,e)}const kr=s("ZodBoolean",(e,t)=>{wt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)});function Cr(e){return function(e,t){return new e({type:"boolean",...E(t)})}(kr,e)}const Tr=s("ZodAny",(e,t)=>{zt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Nr(){return new Tr({type:"any"})}const Ir=s("ZodUnknown",(e,t)=>{St.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Er(){return new Ir({type:"unknown"})}const $r=s("ZodNever",(e,t)=>{kt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function Ar(e){return function(e,t){return new e({type:"never",...E(t)})}($r,e)}const Or=s("ZodArray",(e,t)=>{Tt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(o.minItems=s),"number"==typeof a&&(o.maxItems=a),o.type="array",o.items=_n(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,Yn(e,"ZodArray",{min(e,t){return this.check(hn(e,t))},nonempty(e){return this.check(hn(1,e))},max(e,t){return this.check(fn(e,t))},length(e,t){return this.check(mn(e,t))},unwrap(){return this.element}})});function xr(e,t){return function(e,t,n){return new e({type:"array",element:t,...E(n)})}(Or,e,t)}const Pr=s("ZodObject",(e,t)=>{At.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const e in s)o.properties[e]=_n(s[e],t,{...r,path:[...r.path,"properties",e]});const a=new Set(Object.keys(s)),u=new Set([...a].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(o.required=Array.from(u)),"never"===i.catchall?._zod.def.type?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=_n(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(o.additionalProperties=!1)})(e,t,n,r),y(e,"shape",()=>t.shape),Yn(e,"ZodObject",{keyof(){return jr(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Er()})},loose(){return this.clone({...this._zod.def,catchall:Er()})},strict(){return this.clone({...this._zod.def,catchall:Ar()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!k(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=_(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return v(this,"shape",n),n}});return I(e,r)}(this,e)},safeExtend(e){return function(e,t){if(!k(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=_(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return v(this,"shape",n),n}});return I(e,n)}(this,e)},merge(e){return function(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=_(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return v(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return I(e,n)}(this,e)},pick(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return I(e,_(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return v(this,"shape",e),e},checks:[]}))}(this,e)},omit(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=_(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return v(this,"shape",r),r},checks:[]});return I(e,o)}(this,e)},partial(...e){return function(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=_(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return v(this,"shape",o),o},checks:[]});return I(t,o)}(Kr,this,e[0])},required(...e){return function(e,t,n){const r=_(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return v(this,"shape",o),o}});return I(t,r)}(eo,this,e[0])}})});function Zr(e,t){const n={type:"object",shape:e??{},...E(t)};return new Pr(n)}const Mr=s("ZodUnion",(e,t)=>{xt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=!1===o.inclusive,s=o.options.map((e,n)=>_n(e,t,{...r,path:[...r.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=s:n.anyOf=s})(e,t,n,r),e.options=t.options});function Rr(e,t){return new Mr({type:"union",options:e,...E(t)})}const Ur=s("ZodDiscriminatedUnion",(e,t)=>{Mr.init(e,t),Pt.init(e,t)});function Dr(e,t,n){return new Ur({type:"union",options:t,discriminator:e,...E(n)})}const Gr=s("ZodIntersection",(e,t)=>{Zt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=_n(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=_n(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,u=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=u})(e,t,n,r)});function Lr(e,t){return new Gr({type:"intersection",left:e,right:t})}const Fr=s("ZodEnum",(e,t)=>{Ut.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=d(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new Fr({...t,checks:[],...E(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Fr({...t,checks:[],...E(r),entries:o})}});function jr(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Fr({type:"enum",entries:n,...E(t)})}const Br=s("ZodLiteral",(e,t)=>{Dt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Jr(e,t){return new Br({type:"literal",values:Array.isArray(e)?e:[e],...E(t)})}const Vr=s("ZodTransform",(e,t)=>{Gt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new u(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(R(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(R(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});const Kr=s("ZodOptional",(e,t)=>{Ft.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function Wr(e){return new Kr({type:"optional",innerType:e})}const Yr=s("ZodExactOptional",(e,t)=>{jt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const Hr=s("ZodNullable",(e,t)=>{Bt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=_n(o.innerType,t,r),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qr(e){return new Hr({type:"nullable",innerType:e})}const qr=s("ZodDefault",(e,t)=>{Jt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Xr=s("ZodPrefault",(e,t)=>{Kt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const eo=s("ZodNonOptional",(e,t)=>{Wt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const to=s("ZodCatch",(e,t)=>{Ht.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;let i;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const no=s("ZodPipe",(e,t)=>{Qt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s="input"===t.io?i?o.out:o.in:o.out;_n(s,t,r),t.seen.get(e).ref=s})(e,t,0,r),e.in=t.in,e.out=t.out});function ro(e,t){return new no({type:"pipe",in:e,out:t})}const oo=s("ZodReadonly",(e,t)=>{Xt.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;_n(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const io=s("ZodCustom",(e,t)=>{tn.init(e,t),Hn.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)});const so=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],ao=jr(so),uo=Zr({targetedCountryGroups:xr(ao),targetedCountryCodes:xr(Xn()).optional()}).optional(),co={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},lo={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},po={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},fo=e=>Object.keys(co).find(t=>co[t].countries.includes(e??""))??"International",ho=e=>{if(e){const t=fo(e);return po[t]}return"£"},mo=e=>{if(e)return lo[e]},go=e=>e.includes("subscribe/weekly/checkout"),yo=(e,t,n,r)=>{if(r){const o=r[fo(n)];return`${ho(n)}${o[e][t].price}`}},vo={CURRENCY_SYMBOL:({countryCode:e})=>ho(e),COUNTRY_NAME:({countryCode:e})=>mo(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>yo("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>yo("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>yo("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>yo("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},_o=/%%.*?%%/g,bo="gu.contributions.views",wo=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},zo=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.toLocaleString("default",{month:"long"}),o=t.getFullYear();return{reminderCta:`Remind me in ${r}`,reminderPeriod:`${o}-${n}-01`,reminderLabel:`${r} ${o}`}},So=new Date("2023-12-31"),ko=e=>e>=(e=>new Date(e.getFullYear(),10,15))(e)&&e<wo(e.getFullYear()),Co=Zr({text:Xn(),baseUrl:Xn()});let To=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});var No;new Fr({type:"enum",entries:To,...E(No)});const Io=Dr("type",[Zr({type:Jr(To.Custom),cta:Co}),Zr({type:Jr(To.ContributionsReminder)})]),Eo=Zr({countLabel:Xn(),goalCopy:Xn().optional()}),$o=Zr({total:wr(),goal:wr()}),Ao=jr(["US","AU","global"]),Oo=Zr({currencySymbol:Xn(),copy:Eo,name:Ao,tickerData:$o.optional()}),xo=Zr({for52Weeks:wr(),forTargetedWeeks:wr()}),Po=jr(["for52Weeks","forTargetedWeeks"]),Zo=Zr({type:Jr("above"),copy:Xn().optional(),countType:Po.optional()}),Mo=jr(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),Ro=jr(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),Uo=Zr({abTestName:Xn(),abTestVariant:Xn(),campaignCode:Xn(),componentType:Ro,products:xr(Mo).nullish(),labels:xr(Xn()).nullish(),ophanPageId:Xn(),platformId:Xn(),referrerUrl:Xn()}),Do=Zr({mainUrl:Xn(),mobileUrl:Xn().optional(),tabletUrl:Xn().optional(),desktopUrl:Xn().optional(),leftColUrl:Xn().optional(),wideUrl:Xn().optional(),altText:Xn()}),Go=Zr({name:Xn(),description:Xn().optional(),headshot:Do.optional()}),Lo=/^[0-9A-F]{2}$/,Fo=Xn().refine(e=>Lo.test(e),{error:e=>`"${JSON.stringify(e.input)}" is not a valid hex value`}),jo=Zr({r:Fo,g:Fo,b:Fo,kind:Jr("hex")}),Bo=Zr({mobileUrl:Xn(),tabletUrl:Xn(),desktopUrl:Xn(),altText:Xn(),kind:Jr("Image")}),Jo=Zr({buttonColour:jo.nullish(),buttonTextColour:jo.nullish(),buttonBorderColour:jo.nullish(),buttonSelectColour:jo.nullish(),buttonSelectTextColour:jo.nullish(),buttonSelectBorderColour:jo.nullish(),buttonSelectMarkerColour:jo.nullish(),pillTextColour:jo.nullish(),pillBackgroundColour:jo.nullish(),kind:Jr("ChoiceCards")}),Vo=Zr({visual:Dr("kind",[Bo,Jo]).nullish(),colours:Zr({basic:Zr({background:jo,bodyText:jo})})}),Ko=Zr({copy:Xn()}),Wo=Rr([Jr("Monthly"),Jr("Annual")]),Yo=Dr("supportTier",[Zr({supportTier:Jr("Contribution"),ratePlan:Wo}),Zr({supportTier:Jr("SupporterPlus"),ratePlan:Wo}),Zr({supportTier:Jr("DigitalSubscription"),ratePlan:Wo}),Zr({supportTier:Jr("OneOff")})]),Ho=Zr({copy:Xn(),textColour:jo.nullish(),backgroundColour:jo.nullish()}),Qo=Rr([Jr("LandingPage"),Jr("Checkout")]),qo=Zr({testName:Xn(),variantName:Xn()}),Xo=Zr({product:Yo,label:Xn(),isDefault:Cr(),defaultExpanded:Cr().optional(),benefitsLabel:Xn().nullish(),benefits:xr(Ko),pill:Ho.nullish(),destination:Qo.nullish(),destinationTest:qo.nullish()}),ei=Zr({choiceCards:xr(Xo),mobileChoiceCards:xr(Xo).nullish()}),ti=Zr({maxViewsCount:wr(),maxViewsDays:wr(),minDaysBetweenViews:wr()}),ni=Zr({reminderCta:Xn(),reminderLabel:Xn(),reminderPeriod:Xn()}),ri=jr(["ONE_OFF","MONTHLY","ANNUAL"]),oi=Zr({newsletterId:Xn(),successDescription:Xn()}),ii=Zr({name:Xn(),heading:Xn().optional(),paragraphs:xr(Xn()),highlightedText:Xn().optional(),tickerSettings:Oo.optional(),cta:Co.optional(),secondaryCta:Io.optional(),newsletterSignup:oi.optional(),image:Do.optional(),showReminderFields:ni.optional(),separateArticleCount:Zo.optional(),promoCodes:xr(Xn()).nullish(),maxViews:ti.optional(),showSignInLink:Cr().optional(),bylineWithImage:Go.optional(),showChoiceCards:Cr().optional(),choiceCardsSettings:ei.nullish(),defaultChoiceCardFrequency:ri.optional()}),si=Zr({variant:ii,tracking:Uo,countryCode:Xn().nullish(),articleCounts:xo,onReminderOpen:Nr().nullish(),fetchEmail:Nr().nullish(),submitComponentEvent:Nr().nullish(),openCmp:Nr().nullish(),hasConsentForArticleCount:Cr().nullish(),stage:Xn().nullish()}),ai=jr(["contributions","subscriptions","signIn","abandonedBasket"]),ui=Zr({heading:Xn().optional(),messageText:Xn().optional(),paragraphs:xr(Xn()).optional(),mobileMessageText:Xn().optional(),highlightedText:Xn().optional(),cta:Co.optional(),secondaryCta:Io.optional()}),ci=Zr({tracking:Uo,bannerChannel:ai,content:ui.nullish(),mobileContent:ui.nullish(),countryCode:Xn().nullish(),isSupporter:Cr().nullish(),tickerSettings:Oo.nullish(),submitComponentEvent:Nr(),articleCounts:xo,hasOptedOutOfArticleCount:Cr().nullish(),fetchEmail:Nr().nullish(),separateArticleCount:Cr().nullish(),design:Vo.nullish(),choiceCardsSettings:ei.nullish(),promoCodes:xr(Xn()).nullish(),isCollapsible:Cr().nullish(),contributionsServiceUrl:Xn().nullish()}),li=Zr({heading:Xn(),subheading:Xn(),primaryCta:Co.optional(),secondaryCta:Co.optional(),benefits:xr(Xn()).optional()}),di=Zr({content:li,tracking:Uo,mobileContent:li.optional(),countryCode:Xn().optional(),submitComponentEvent:Nr(),numArticles:wr().optional(),promoCodes:xr(Xn()).nullish()}),pi=Zr({image:Do,bodyCopy:xr(Xn()),cta:Co.optional()});Zr({content:pi,tracking:Uo,countryCode:Xn().optional(),submitComponentEvent:Nr(),promoCodes:xr(Xn()).nullish()});const fi=jr(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),hi=jr(["new","guest","current"]),mi=jr(["Epic","EpicAppleNews","EpicLiveblog","Banner1","Banner2","Header","GutterLiveblog"]),gi=jr(["Live","Draft","Archived"]),yi=jr(["Mobile","Desktop","All","iOS","Android"]),vi=jr(["SignedIn","SignedOut","All"]),_i=jr(["HasConsented","HasNotConsented","All"]),bi=Lr(Dr("name",[Zr({name:Jr("ABTest")}),Zr({name:Jr("EpsilonGreedyBandit"),epsilon:wr(),sampleCount:wr().optional()}),Zr({name:Jr("Roulette"),sampleCount:wr().optional()})]),Zr({testName:Xn().optional()})),wi=Zr({channel:mi,name:Xn(),status:gi,priority:wr(),controlProportionSettings:Zr({proportion:wr(),offset:wr()}).optional(),deviceType:yi.optional(),signedInStatus:vi.optional(),consentStatus:_i.optional(),methodologies:bi.array().optional(),mParticleAudience:wr().nullish(),scheduler:Zr({start:Xn().optional(),end:Xn().optional()}).optional()}),zi=jr(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),Si=Zr({minViews:wr(),maxViews:wr().optional(),periodInWeeks:wr(),tagIds:xr(Xn()).optional()});Zr({userType:xr(hi),product:xr(fi)}),Zr({tagIds:xr(Xn()),sectionIds:xr(Xn()),excludedTagIds:xr(Xn()),excludedSectionIds:xr(Xn())});const ki=Zr({maxViewsCount:wr(),maxViewsDays:wr(),minDaysBetweenViews:wr()});wi.extend({name:Xn(),status:gi,locations:xr(ao).optional(),regionTargeting:uo.optional(),tagIds:xr(Xn()),sections:xr(Xn()),excludedTagIds:xr(Xn()),excludedSections:xr(Xn()),alwaysAsk:Cr(),maxViews:ki.optional(),userCohort:zi,hasCountryName:Cr(),highPriority:Cr(),useLocalViewLog:Cr(),articlesViewedSettings:Si.optional(),priority:wr(),variants:ii.array()});const Ci=Zr({amount:Rr([wr(),Jr("other")]),billingPeriod:Rr([Jr("ONE_OFF"),Jr("MONTHLY"),Jr("ANNUAL")]),product:Rr([Jr("Contribution"),Jr("SupporterPlus"),Jr("PremiumTier"),Jr("DailyEdition"),Jr("GuardianWeekly"),Jr("Paper"),Jr("PaperAndDigital")]),region:Rr([Jr("uk"),Jr("us"),Jr("au"),Jr("eu"),Jr("int"),Jr("nz"),Jr("ca")])}),Ti=(e,t,n,r)=>{const o=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e),i=(e=>new URLSearchParams(window.location.search).get(`preview-${e}`))(e),s=new URLSearchParams;o?s.set("force",o):i&&s.set("preview",i);const a=s.toString();return fetch(a?`${t}/${e}?${a}`:`${t}/${e}`,{method:"post",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(n)}).then(t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t}).then(e=>e.json())};exports.CountryGroupId=so,exports.SecondaryCtaType=To,exports.abandonedBasketSchema=Ci,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const n=(e=>co[fo(e)].supportRegionId)(t);if(!go(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,(e,t,r)=>`${t}/${n.toLowerCase()}/${r}`)}return e},exports.bannerSchema=ci,exports.buildReminderFields=zo,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(_o)?.filter(e=>"%%ARTICLE_COUNT%%"!==e);return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=fo,exports.countryGroupIdSchema=ao,exports.countryGroups=co,exports.epicPropsSchema=si,exports.getBanner=(e,t)=>Ti("banner",e,t),exports.getCountryName=mo,exports.getEpic=(e,t,n)=>Ti("epic",e,t,n),exports.getEpicViewLog=e=>e.get(bo)??void 0,exports.getGutterLiveblog=(e,t)=>Ti("gutter-liveblog",e,t),exports.getHeader=(e,t)=>Ti("header",e,t),exports.getLiveblogEpic=(e,t)=>Ti("liveblog-epic",e,t),exports.getLocalCurrencySymbol=ho,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&ko(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${n=t.getFullYear()}-${(wo(n).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${n}`}:"US"===e&&(e=>e>=wo(e.getFullYear())&&e<So)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):zo(t);var n},exports.getWeeklyArticleHistory=t=>t.get(e)??void 0,exports.headerPropsSchema=di,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inTargetedCountry=(e,t=[],n=[])=>0===t.length&&0===n.length||!!e&&(!!t.includes(fo(e.toUpperCase()))||n.includes(e.toUpperCase())),exports.incrementWeeklyArticleCount=(r,i,s)=>{const a=((e,r)=>{const o=n(new Date),i=e.get(t);if(i?.week===o){const n=i.articles[r]||0;return e.set(t,{week:o,articles:{...i.articles,[r]:n+1}}),n>0}return e.set(t,{week:o,articles:{[r]:1}}),!1})(r,i);if(!a){const t=n(new Date),i=r.get(e)??[],a=i.length>0?i[0]:null;if(a?.week&&a.week===t)a.count+=1,a.tags=o(s,a.tags),r.set(e,i);else{i.unshift({week:t,count:1,tags:o(s,{})});const n=t-365,a=i.filter(e=>e.week>=n);r.set(e,a)}}},exports.isGWCheckoutUrl=go,exports.isoCurrencyToCurrencySymbol={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},exports.logEpicView=e=>{const t=JSON.parse(localStorage.getItem(bo)??""),n=t?t.value:[];n.push({date:(new Date).getTime(),testId:e});const r={value:n.slice(-50)};localStorage.setItem(bo,JSON.stringify(r))},exports.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(_o,e=>{const r=e.substring(2,e.length-2),o=vo[r];if(o){const e=o({countryCode:t,prices:n});if(e)return e}return e}):"",exports.targetedRegionsSchema=uo;
|
|
@@ -250,6 +250,10 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
250
250
|
testName: z.ZodOptional<z.ZodString>;
|
|
251
251
|
}, z.core.$strip>>>>;
|
|
252
252
|
mParticleAudience: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
253
|
+
scheduler: z.ZodOptional<z.ZodObject<{
|
|
254
|
+
start: z.ZodOptional<z.ZodString>;
|
|
255
|
+
end: z.ZodOptional<z.ZodString>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
253
257
|
userCohort: z.ZodEnum<{
|
|
254
258
|
AllExistingSupporters: "AllExistingSupporters";
|
|
255
259
|
AllNonSupporters: "AllNonSupporters";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../shared/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAOpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;;;;;;GASG;AAEH,oBAAY,cAAc;IACtB,kBAAkB,uBAAuB;CAC5C;AAED,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAElD,wBAAgB,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,IAAI,gBAAgB,CAE/D;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IACxD,aAAa,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,eAAe,KAAK,OAAO,CAAC;AAE7D,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAG9D,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../shared/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAOpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;;;;;;GASG;AAEH,oBAAY,cAAc;IACtB,kBAAkB,uBAAuB;CAC5C;AAED,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAElD,wBAAgB,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,IAAI,gBAAgB,CAE/D;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IACxD,aAAa,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,eAAe,KAAK,OAAO,CAAC;AAE7D,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAG9D,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAanC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC"}
|
|
@@ -101,6 +101,10 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
101
101
|
testName: z.ZodOptional<z.ZodString>;
|
|
102
102
|
}, z.core.$strip>>>>;
|
|
103
103
|
mParticleAudience: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
104
|
+
scheduler: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
start: z.ZodOptional<z.ZodString>;
|
|
106
|
+
end: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
104
108
|
name: z.ZodString;
|
|
105
109
|
status: z.ZodEnum<{
|
|
106
110
|
Live: "Live";
|
|
@@ -319,37 +323,6 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
319
323
|
}, z.core.$strip>>>;
|
|
320
324
|
}, z.core.$strip>>>>;
|
|
321
325
|
}, z.core.$strip>>>;
|
|
322
|
-
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
323
|
-
testName: z.ZodString;
|
|
324
|
-
variantName: z.ZodString;
|
|
325
|
-
defaultContributionType: z.ZodEnum<{
|
|
326
|
-
ONE_OFF: "ONE_OFF";
|
|
327
|
-
MONTHLY: "MONTHLY";
|
|
328
|
-
ANNUAL: "ANNUAL";
|
|
329
|
-
}>;
|
|
330
|
-
displayContributionType: z.ZodArray<z.ZodEnum<{
|
|
331
|
-
ONE_OFF: "ONE_OFF";
|
|
332
|
-
MONTHLY: "MONTHLY";
|
|
333
|
-
ANNUAL: "ANNUAL";
|
|
334
|
-
}>>;
|
|
335
|
-
amountsCardData: z.ZodObject<{
|
|
336
|
-
ONE_OFF: z.ZodObject<{
|
|
337
|
-
amounts: z.ZodArray<z.ZodNumber>;
|
|
338
|
-
defaultAmount: z.ZodNumber;
|
|
339
|
-
hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
-
}, z.core.$strip>;
|
|
341
|
-
MONTHLY: z.ZodObject<{
|
|
342
|
-
amounts: z.ZodArray<z.ZodNumber>;
|
|
343
|
-
defaultAmount: z.ZodNumber;
|
|
344
|
-
hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
|
|
345
|
-
}, z.core.$strip>;
|
|
346
|
-
ANNUAL: z.ZodObject<{
|
|
347
|
-
amounts: z.ZodArray<z.ZodNumber>;
|
|
348
|
-
defaultAmount: z.ZodNumber;
|
|
349
|
-
hideChooseYourAmount: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
-
}, z.core.$strip>;
|
|
351
|
-
}, z.core.$strip>;
|
|
352
|
-
}, z.core.$strip>>;
|
|
353
326
|
defaultChoiceCardFrequency: z.ZodOptional<z.ZodEnum<{
|
|
354
327
|
ONE_OFF: "ONE_OFF";
|
|
355
328
|
MONTHLY: "MONTHLY";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../../shared/types/abTests/epic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQlD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9C,eAAO,MAAM,cAAc;;;;iBAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErE,eAAO,MAAM,0BAA0B,EAAE,qBAAqB,EAAqC,CAAC;AAEpG,UAAU,oBAAoB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;AA4BnF,UAAU,kBAAkB;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,qBAAqB,CAAC;IAC/C,uBAAuB,EAAE,qBAAqB,EAAE,CAAC;IACjD,eAAe,EAAE,eAAe,CAAC;CACpC;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC1D,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAC1B;IAAE,aAAa,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GACnD;IAAE,aAAa,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAExD,MAAM,WAAW,WAAW;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,oBAAoB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,EAAE,CAAC;AAGzC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,MAAM,WAAW,QAAS,SAAQ,gBAAgB;IAC9C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,OAAO,CAAC;IAGhD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../../shared/types/abTests/epic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQlD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9C,eAAO,MAAM,cAAc;;;;iBAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErE,eAAO,MAAM,0BAA0B,EAAE,qBAAqB,EAAqC,CAAC;AAEpG,UAAU,oBAAoB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;AA4BnF,UAAU,kBAAkB;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB,EAAE,qBAAqB,CAAC;IAC/C,uBAAuB,EAAE,qBAAqB,EAAE,CAAC;IACjD,eAAe,EAAE,eAAe,CAAC;CACpC;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC1D,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAC1B;IAAE,aAAa,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GACnD;IAAE,aAAa,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAExD,MAAM,WAAW,WAAW;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,oBAAoB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,EAAE,CAAC;AAGzC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,MAAM,WAAW,QAAS,SAAQ,gBAAgB;IAC9C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,OAAO,CAAC;IAGhD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBjC,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -74,6 +74,10 @@ export declare const gutterTestFromToolSchema: z.ZodObject<{
|
|
|
74
74
|
testName: z.ZodOptional<z.ZodString>;
|
|
75
75
|
}, z.core.$strip>>>>;
|
|
76
76
|
mParticleAudience: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
77
|
+
scheduler: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
start: z.ZodOptional<z.ZodString>;
|
|
79
|
+
end: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
77
81
|
locations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
78
82
|
GBPCountries: "GBPCountries";
|
|
79
83
|
UnitedStates: "UnitedStates";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gutter.d.ts","sourceRoot":"","sources":["../../../../../shared/types/abTests/gutter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"gutter.d.ts","sourceRoot":"","sources":["../../../../../shared/types/abTests/gutter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IAClD,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -84,6 +84,10 @@ export declare const headerTestFromToolSchema: z.ZodObject<{
|
|
|
84
84
|
testName: z.ZodOptional<z.ZodString>;
|
|
85
85
|
}, z.core.$strip>>>>;
|
|
86
86
|
mParticleAudience: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
87
|
+
scheduler: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
start: z.ZodOptional<z.ZodString>;
|
|
89
|
+
end: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
87
91
|
locations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
88
92
|
GBPCountries: "GBPCountries";
|
|
89
93
|
UnitedStates: "UnitedStates";
|