@highstate/designer 0.15.0 → 0.17.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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{xiAiC-VY.js → -oaD50UK.js} +1 -1
- package/.output/public/_nuxt/{CodzMKzx.js → 0ekw3e2V.js} +1 -1
- package/.output/public/_nuxt/{CM0USXxa.js → 1f5tAgHw.js} +1 -1
- package/.output/public/_nuxt/{DTEvwfme.js → 54_UD3a3.js} +1 -1
- package/.output/public/_nuxt/{8hNo2oxe.js → 5ggY4uig.js} +1 -1
- package/.output/public/_nuxt/{htyOXo2B.js → 6EZimURw.js} +1 -1
- package/.output/public/_nuxt/{Be3bUPYU.js → BFNM2w_f.js} +1 -1
- package/.output/public/_nuxt/{BBhg39jC.js → BGLu70Yq.js} +1 -1
- package/.output/public/_nuxt/{8KpM6cBw.js → BIuj43Wh.js} +1 -1
- package/.output/public/_nuxt/BNGfscqk.js +1 -0
- package/.output/public/_nuxt/{C1OzDFAd.js → BUXOnL59.js} +1 -1
- package/.output/public/_nuxt/{BYmHaUHG.js → Bbwybh3N.js} +1 -1
- package/.output/public/_nuxt/{DaZa-Z5n.js → BczD6j-v.js} +1 -1
- package/.output/public/_nuxt/{B13CirDR.js → Bh0qehhp.js} +1 -1
- package/.output/public/_nuxt/{rtii14lI.js → BmDdxTjo.js} +1 -1
- package/.output/public/_nuxt/{DdSZEM1_.js → BqeRdtD4.js} +2 -2
- package/.output/public/_nuxt/{B3_RfxPY.js → BxZD33h1.js} +1 -1
- package/.output/public/_nuxt/{C-Sr9OUA.js → CCd08HS_.js} +1 -1
- package/.output/public/_nuxt/{DIo7DiTh.js → CJ6lOLXp.js} +1 -1
- package/.output/public/_nuxt/CN9dMhDM.js +1 -0
- package/.output/public/_nuxt/{HXyjJC-p.js → CQ4fj8p0.js} +1 -1
- package/.output/public/_nuxt/{CXHtlxuP.js → CXxzV4dz.js} +1 -1
- package/.output/public/_nuxt/{BktRuikR.js → CatV_12G.js} +1 -1
- package/.output/public/_nuxt/{bgIcLC22.js → CeMkeBDb.js} +1 -1
- package/.output/public/_nuxt/{CBZUZSSS.js → CelvVQyk.js} +1 -1
- package/.output/public/_nuxt/{CnrObePb.js → CfV455SO.js} +1 -1
- package/.output/public/_nuxt/{D9ayVCRO.js → CfqrF6sE.js} +1 -1
- package/.output/public/_nuxt/{Bi--9362.js → Cfs9EX91.js} +1 -1
- package/.output/public/_nuxt/{LXHlNQaX.js → ChM1GEGa.js} +1 -1
- package/.output/public/_nuxt/CimE6O20.js +280 -0
- package/.output/public/_nuxt/CtwNW5xN.js +1 -0
- package/.output/public/_nuxt/{D9yrQeKB.js → Cu8OsqJL.js} +1 -1
- package/.output/public/_nuxt/{BCAAo2Xs.js → CusJppg0.js} +1 -1
- package/.output/public/_nuxt/{DZALWWcz.js → CvELRi2k.js} +1 -1
- package/.output/public/_nuxt/{c7cuww2j.js → Cw6nGM9K.js} +1 -1
- package/.output/public/_nuxt/{DfRNGSx_.js → CwUT5n6w.js} +1 -1
- package/.output/public/_nuxt/{DazHGnQt.js → D-AHKB2i.js} +1 -1
- package/.output/public/_nuxt/{BQe-EN0e.js → D-kcn2fr.js} +1 -1
- package/.output/public/_nuxt/{gPpeS_SO.js → D1ibY74j.js} +1 -1
- package/.output/public/_nuxt/D34EmFco.js +1 -0
- package/.output/public/_nuxt/{BQKBEqPh.js → D4OhWExI.js} +1 -1
- package/.output/public/_nuxt/{WyI18QTo.js → DDHikT5j.js} +1 -1
- package/.output/public/_nuxt/{CDPBuKr5.js → DDTT3lYc.js} +1 -1
- package/.output/public/_nuxt/DFsBSlE_.js +1 -0
- package/.output/public/_nuxt/{B7HXz7Pj.js → DHLkt8Yr.js} +1 -1
- package/.output/public/_nuxt/{B0CZVjFF.js → DHuTDtaT.js} +1 -1
- package/.output/public/_nuxt/{CYdh-fCb.js → DRzH1pOL.js} +1 -1
- package/.output/public/_nuxt/DSUF3NDE.js +1 -0
- package/.output/public/_nuxt/{Bu-pZzEo.js → DWmtspXK.js} +1 -1
- package/.output/public/_nuxt/DXh9HyqW.js +1 -0
- package/.output/public/_nuxt/DXtl0MQI.js +1 -0
- package/.output/public/_nuxt/{BxDN7GvZ.js → D_zCY0Xl.js} +1 -1
- package/.output/public/_nuxt/{DwgroK_o.js → DaZJpzOl.js} +1 -1
- package/.output/public/_nuxt/{BC4bzN3h.js → DcmvOc98.js} +1 -1
- package/.output/public/_nuxt/DhQfdAdO.js +1 -0
- package/.output/public/_nuxt/{C492izQx.js → Dm4QKadl.js} +8 -8
- package/.output/public/_nuxt/{BaNZZ_dQ.js → DmCK90gL.js} +1 -1
- package/.output/public/_nuxt/DqRHBxBn.js +1 -0
- package/.output/public/_nuxt/{Clpw7Yi1.js → DtFoCuZo.js} +1 -1
- package/.output/public/_nuxt/{CBhhCAGJ.js → DxuitVdg.js} +1 -1
- package/.output/public/_nuxt/{yQo4vWqK.js → GAB5JH5K.js} +1 -1
- package/.output/public/_nuxt/{Doe3qPsx.js → LUl67wzp.js} +1 -1
- package/.output/public/_nuxt/{CuLjlXlo.js → M2rHlmBj.js} +1 -1
- package/.output/public/_nuxt/{CAWn6QGE.js → U3pqMjXV.js} +1 -1
- package/.output/public/_nuxt/XrMy4kkt.js +1 -0
- package/.output/public/_nuxt/{CiW4qRt5.js → YB_1Ta41.js} +1 -1
- package/.output/public/_nuxt/{Xt7jYYu7.js → YXI84j39.js} +1 -1
- package/.output/public/_nuxt/{DAbczt3Y.js → ZZ6g6dXy.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/5447597b-48ec-41ad-8928-729a28784f20.json +1 -0
- package/.output/public/_nuxt/{edge-router-qFL00oIW.js → edge-router-yEORMNQw.js} +1 -1
- package/.output/public/_nuxt/{entry.CvsoFAPr.css → entry.BAsn-2au.css} +1 -1
- package/.output/public/_nuxt/error-404.h4BWQQPs.css +1 -0
- package/.output/public/_nuxt/error-500.B72O9eXJ.css +1 -0
- package/.output/public/_nuxt/{AlZVL3pR.js → ga9TZ2z5.js} +1 -1
- package/.output/public/_nuxt/graph-resolver-Cs66Hj63.js +166 -0
- package/.output/public/_nuxt/ih8zLb53.js +14 -0
- package/.output/public/_nuxt/{B0MclPaN.js → ov4D99rA.js} +1 -1
- package/.output/public/_nuxt/{BcIhEyqj.js → qYU5Tabh.js} +1 -1
- package/.output/public/_nuxt/{vuetify.DF63EsYl.css → vuetify.BrkCt9t5.css} +1 -1
- package/.output/public/_nuxt/{yaml.worker-B7qHIEmf.js → yaml.worker-CQ6dFw39.js} +10 -10
- package/.output/server/index.mjs +1527 -1527
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +4 -4
- package/.output/public/_nuxt/3xoHIewA.js +0 -283
- package/.output/public/_nuxt/6pS6ZuG3.js +0 -1
- package/.output/public/_nuxt/B8cfqe27.js +0 -16
- package/.output/public/_nuxt/BJeaBD25.js +0 -1
- package/.output/public/_nuxt/CZeOmOJM.js +0 -1
- package/.output/public/_nuxt/CgmzNBdw.js +0 -1
- package/.output/public/_nuxt/CqbFpzKO.js +0 -1
- package/.output/public/_nuxt/DA8LIUWa.js +0 -1
- package/.output/public/_nuxt/DbcOKM93.js +0 -1
- package/.output/public/_nuxt/DeyR_GFX.js +0 -1
- package/.output/public/_nuxt/MBzYIBwY.js +0 -1
- package/.output/public/_nuxt/SucuqcV1.js +0 -1
- package/.output/public/_nuxt/builds/meta/40fca5d2-f9f2-4e82-849f-81a42733e9df.json +0 -1
- package/.output/public/_nuxt/error-404.CtwfpkiA.css +0 -1
- package/.output/public/_nuxt/error-500.OXvA_D27.css +0 -1
- package/.output/public/_nuxt/graph-resolver-CizqVag8.js +0 -169
- package/.output/public/_nuxt/luRfMbTH.js +0 -1
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
const Rc=Object.freeze({status:"aborted"});function P(e,t,r){function i(a,u){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(e),t(a,u);for(const d in s.prototype)d in a||Object.defineProperty(a,d,{value:s.prototype[d].bind(a)});a._zod.constr=s,a._zod.def=u}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function s(a){var u;const l=r?.Parent?new o:this;i(l,a),(u=l._zod).deferred??(u.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const Fc=Symbol("zod_brand");class Wt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Si extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const li={};function Ye(e){return e&&Object.assign(li,e),li}function Ep(e){return e}function Np(e){return e}function Op(e){}function xp(e){throw new Error}function jp(e){}function Bo(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function G(e,t="|"){return e.map(r=>ae(r)).join(t)}function fi(e,t){return typeof t=="bigint"?t.toString():t}function Wn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function en(e){return e==null}function Ii(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Zc(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const u=i.match(/\d?e-(\d?)/);u?.[1]&&(n=Number.parseInt(u[1]))}const o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return s%a/10**o}const Za=Symbol("evaluating");function ye(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Za)return i===void 0&&(i=Za,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ap(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Dt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function xt(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function zp(e){return xt(e._zod.def)}function Tp(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Pp(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function Up(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function ko(e){return JSON.stringify(e)}const Ro="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function pn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Lc=Wn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ht(e){if(pn(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(pn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ei(e){return Ht(e)?{...e}:Array.isArray(e)?[...e]:e}function Dp(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Cp=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},di=new Set(["string","number","symbol"]),Mc=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ut(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ct(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function V(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Bp(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function ae(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function qc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Vc={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]},Kc={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Jc(e,t){const r=e._zod.def,i=xt(e._zod.def,{get shape(){const n={};for(const o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(n[o]=r.shape[o])}return Dt(this,"shape",n),n},checks:[]});return ct(e,i)}function Gc(e,t){const r=e._zod.def,i=xt(e._zod.def,{get shape(){const n={...e._zod.def.shape};for(const o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete n[o]}return Dt(this,"shape",n),n},checks:[]});return ct(e,i)}function Wc(e,t){if(!Ht(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const n=xt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Dt(this,"shape",o),o},checks:[]});return ct(e,n)}function Hc(e,t){if(!Ht(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return Dt(this,"shape",i),i},checks:e._zod.def.checks};return ct(e,r)}function Xc(e,t){const r=xt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Dt(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return ct(e,r)}function Yc(e,t,r){const i=xt(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=e?new e({type:"optional",innerType:n[s]}):n[s])}else for(const s in n)o[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Dt(this,"shape",o),o},checks:[]});return ct(t,i)}function Qc(e,t,r){const i=xt(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)o[s]=new e({type:"nonoptional",innerType:n[s]});return Dt(this,"shape",o),o},checks:[]});return ct(t,i)}function Vt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function mt(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Dn(e){return typeof e=="string"?e:e?.message}function gt(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const n=Dn(e.inst?._zod.def?.error?.(e))??Dn(t?.error?.(e))??Dn(r.customError?.(e))??Dn(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Ni(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Oi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function Rp(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function el(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function tl(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Fp(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return el(t+r)}function Zp(e){return tl(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Lp(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function Mp(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class qp{constructor(...t){}}var nl=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:Kc,Class:qp,NUMBER_FORMAT_RANGES:Vc,aborted:Vt,allowsEval:Lc,assert:jp,assertEqual:Ep,assertIs:Op,assertNever:xp,assertNotEqual:Np,assignProp:Dt,base64ToUint8Array:el,base64urlToUint8Array:Fp,cached:Wn,captureStackTrace:Ro,cleanEnum:Rp,cleanRegex:Ii,clone:ct,cloneDef:zp,createTransparentProxy:Bp,defineLazy:ye,esc:ko,escapeRegex:Ut,extend:Wc,finalizeIssue:gt,floatSafeRemainder:Zc,getElementAtPath:Tp,getEnumValues:Bo,getLengthableOrigin:Oi,getParsedType:Cp,getSizableOrigin:Ni,hexToUint8Array:Lp,isObject:pn,isPlainObject:Ht,issue:gn,joinValues:G,jsonStringifyReplacer:fi,merge:Xc,mergeDefs:xt,normalizeParams:V,nullish:en,numKeys:Dp,objectClone:Ap,omit:Gc,optionalKeys:qc,partial:Yc,pick:Jc,prefixIssues:mt,primitiveTypes:Mc,promiseAllObject:Pp,propertyKeyTypes:di,randomString:Up,required:Qc,safeExtend:Hc,shallowClone:Ei,stringifyPrimitive:ae,uint8ArrayToBase64:tl,uint8ArrayToBase64url:Zp,uint8ArrayToHex:Mp,unwrapMessage:Dn});const rl=(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,fi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fo=P("$ZodError",rl),rt=P("$ZodError",rl,{Parent:Error});function Zo(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Lo(e,t=r=>r.message){const r={_errors:[]},i=n=>{for(const o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let s=r,a=0;for(;a<o.path.length;){const u=o.path[a];a===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(t(o))):s[u]=s[u]||{_errors:[]},s=s[u],a++}}};return i(e),r}function il(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var s,a;for(const u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},u.path));else if(u.code==="invalid_key")i({issues:u.issues},u.path);else if(u.code==="invalid_element")i({issues:u.issues},u.path);else{const l=[...o,...u.path];if(l.length===0){r.errors.push(t(u));continue}let d=r,h=0;for(;h<l.length;){const m=l[h],g=h===l.length-1;typeof m=="string"?(d.properties??(d.properties={}),(s=d.properties)[m]??(s[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(a=d.items)[m]??(a[m]={errors:[]}),d=d.items[m]),g&&d.errors.push(t(u)),h++}}};return i(e),r}function ol(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function sl(e){const t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(const i of r)t.push(`✖ ${i.message}`),i.path?.length&&t.push(` → at ${ol(i.path)}`);return t.join(`
|
|
2
|
-
`)}const Hn=e=>(t,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Wt;if(s.issues.length){const a=new(n?.Err??e)(s.issues.map(u=>gt(u,o,Ye())));throw Ro(a,n?.callee),a}return s.value},So=Hn(rt),Xn=e=>async(t,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(n?.Err??e)(s.issues.map(u=>gt(u,o,Ye())));throw Ro(a,n?.callee),a}return s.value},Io=Xn(rt),Yn=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Wt;return o.issues.length?{success:!1,error:new(e??Fo)(o.issues.map(s=>gt(s,n,Ye())))}:{success:!0,data:o.value}},al=Yn(rt),Qn=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>gt(s,n,Ye())))}:{success:!0,data:o.value}},ul=Qn(rt),Mo=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Hn(e)(t,r,n)},Vp=Mo(rt),qo=e=>(t,r,i)=>Hn(e)(t,r,i),Kp=qo(rt),Vo=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Xn(e)(t,r,n)},Jp=Vo(rt),Ko=e=>async(t,r,i)=>Xn(e)(t,r,i),Gp=Ko(rt),Jo=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Yn(e)(t,r,n)},Wp=Jo(rt),Go=e=>(t,r,i)=>Yn(e)(t,r,i),Hp=Go(rt),Wo=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Qn(e)(t,r,n)},Xp=Wo(rt),Ho=e=>async(t,r,i)=>Qn(e)(t,r,i),Yp=Ho(rt),cl=/^[cC][^\s-]{8,}$/,ll=/^[0-9a-z]+$/,fl=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dl=/^[0-9a-vA-V]{20}$/,hl=/^[A-Za-z0-9]{27}$/,ml=/^[a-zA-Z0-9_-]{21}$/,pl=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gl=/^([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})$/,yn=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)$/,eg=yn(4),tg=yn(6),ng=yn(7),yl=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ig=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,vl=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,og=vl,sg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ag="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bl(){return new RegExp(ag,"u")}const $l=/^(?:(?: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])$/,_l=/^(([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}|:))$/,wl=/^((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])$/,kl=/^(([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])$/,Sl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xo=/^[A-Za-z0-9_-]*$/,Yo=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Il=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,El=/^\+(?:[0-9]){6,14}[0-9]$/,Nl="(?:(?:\\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])))",Ol=new RegExp(`^${Nl}$`);function xl(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function jl(e){return new RegExp(`^${xl(e)}$`)}function Al(e){const t=xl({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Nl}T(?:${i})$`)}const zl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Tl=/^-?\d+n?$/,Pl=/^-?\d+$/,Ul=/^-?\d+(?:\.\d+)?/,Dl=/^(?:true|false)$/i,Cl=/^null$/i,Bl=/^undefined$/i,Rl=/^[^A-Z]*$/,Fl=/^[^a-z]*$/,Zl=/^[0-9a-fA-F]*$/;function er(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function tr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const ug=/^[0-9a-fA-F]{32}$/,cg=er(22,"=="),lg=tr(22),fg=/^[0-9a-fA-F]{40}$/,dg=er(27,"="),hg=tr(27),mg=/^[0-9a-fA-F]{64}$/,pg=er(43,"="),gg=tr(43),yg=/^[0-9a-fA-F]{96}$/,vg=er(64,""),bg=tr(64),$g=/^[0-9a-fA-F]{128}$/,_g=er(86,"=="),wg=tr(86);var Qo=Object.freeze({__proto__:null,base64:Sl,base64url:Xo,bigint:Tl,boolean:Dl,browserEmail:sg,cidrv4:wl,cidrv6:kl,cuid:cl,cuid2:ll,date:Ol,datetime:Al,domain:Il,duration:pl,e164:El,email:yl,emoji:bl,extendedDuration:Qp,guid:gl,hex:Zl,hostname:Yo,html5Email:rg,idnEmail:og,integer:Pl,ipv4:$l,ipv6:_l,ksuid:hl,lowercase:Rl,md5_base64:cg,md5_base64url:lg,md5_hex:ug,nanoid:ml,null:Cl,number:Ul,rfc5322Email:ig,sha1_base64:dg,sha1_base64url:hg,sha1_hex:fg,sha256_base64:pg,sha256_base64url:gg,sha256_hex:mg,sha384_base64:vg,sha384_base64url:bg,sha384_hex:yg,sha512_base64:_g,sha512_base64url:wg,sha512_hex:$g,string:zl,time:jl,ulid:fl,undefined:Bl,unicodeEmail:vl,uppercase:Fl,uuid:yn,uuid4:eg,uuid6:tg,uuid7:ng,xid:dl});const Pe=P("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Ll={number:"number",bigint:"bigint",object:"date"},es=P("$ZodCheckLessThan",(e,t)=>{Pe.init(e,t);const r=Ll[typeof t.value];e._zod.onattach.push(i=>{const n=i._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=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ts=P("$ZodCheckGreaterThan",(e,t)=>{Pe.init(e,t);const r=Ll[typeof t.value];e._zod.onattach.push(i=>{const n=i._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=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ml=P("$ZodCheckMultipleOf",(e,t)=>{Pe.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Zc(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ql=P("$ZodCheckNumberFormat",(e,t)=>{Pe.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Vc[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=o,r&&(a.pattern=Pl)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){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:i,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:i,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),Vl=P("$ZodCheckBigIntFormat",(e,t)=>{Pe.init(e,t);const[r,i]=Kc[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Kl=P("$ZodCheckMaxSize",(e,t)=>{var r;Pe.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!en(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Ni(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Jl=P("$ZodCheckMinSize",(e,t)=>{var r;Pe.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!en(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Ni(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Gl=P("$ZodCheckSizeEquals",(e,t)=>{var r;Pe.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!en(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const s=o>t.size;i.issues.push({origin:Ni(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Wl=P("$ZodCheckMaxLength",(e,t)=>{var r;Pe.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!en(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const s=Oi(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Hl=P("$ZodCheckMinLength",(e,t)=>{var r;Pe.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!en(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const s=Oi(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Xl=P("$ZodCheckLengthEquals",(e,t)=>{var r;Pe.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!en(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const s=Oi(n),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),nr=P("$ZodCheckStringFormat",(e,t)=>{var r,i;Pe.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.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})}):(i=e._zod).check??(i.check=()=>{})}),Yl=P("$ZodCheckRegex",(e,t)=>{nr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ql=P("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Rl),nr.init(e,t)}),ef=P("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Fl),nr.init(e,t)}),tf=P("$ZodCheckIncludes",(e,t)=>{Pe.init(e,t);const r=Ut(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),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})}}),nf=P("$ZodCheckStartsWith",(e,t)=>{Pe.init(e,t);const r=new RegExp(`^${Ut(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),rf=P("$ZodCheckEndsWith",(e,t)=>{Pe.init(e,t);const r=new RegExp(`.*${Ut(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function La(e,t,r){e.issues.length&&t.issues.push(...mt(r,e.issues))}const of=P("$ZodCheckProperty",(e,t)=>{Pe.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>La(n,r,t.property));La(i,r,t.property)}}),sf=P("$ZodCheckMimeType",(e,t)=>{Pe.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),af=P("$ZodCheckOverwrite",(e,t)=>{Pe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class uf{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
3
|
-
`).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(const s of o)this.content.push(s)}compile(){const t=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
|
|
4
|
-
`))}}const cf={major:4,minor:1,patch:12},ue=P("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=cf;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const n of i)for(const o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(s,a,u)=>{let l=Vt(s),d;for(const h of a){if(h._zod.def.when){if(!h._zod.def.when(s))continue}else if(l)continue;const m=s.issues.length,g=h._zod.check(s);if(g instanceof Promise&&u?.async===!1)throw new Wt;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,s.issues.length!==m&&(l||(l=Vt(s,m)))});else{if(s.issues.length===m)continue;l||(l=Vt(s,m))}}return d?d.then(()=>s):s},o=(s,a,u)=>{if(Vt(s))return s.aborted=!0,s;const l=n(a,i,u);if(l instanceof Promise){if(u.async===!1)throw new Wt;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>o(d,s,a)):o(l,s,a)}const u=e._zod.parse(s,a);if(u instanceof Promise){if(a.async===!1)throw new Wt;return u.then(l=>n(l,i,a))}return n(u,i,a)}}e["~standard"]={validate:n=>{try{const o=al(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return ul(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),rr=P("$ZodString",(e,t)=>{ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??zl(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ne=P("$ZodStringFormat",(e,t)=>{nr.init(e,t),rr.init(e,t)}),lf=P("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gl),Ne.init(e,t)}),ff=P("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=yn(i))}else t.pattern??(t.pattern=yn());Ne.init(e,t)}),df=P("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=yl),Ne.init(e,t)}),hf=P("$ZodURL",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Yo.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),mf=P("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=bl()),Ne.init(e,t)}),pf=P("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ml),Ne.init(e,t)}),gf=P("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=cl),Ne.init(e,t)}),yf=P("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ll),Ne.init(e,t)}),vf=P("$ZodULID",(e,t)=>{t.pattern??(t.pattern=fl),Ne.init(e,t)}),bf=P("$ZodXID",(e,t)=>{t.pattern??(t.pattern=dl),Ne.init(e,t)}),$f=P("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hl),Ne.init(e,t)}),_f=P("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Al(t)),Ne.init(e,t)}),wf=P("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ol),Ne.init(e,t)}),kf=P("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=jl(t)),Ne.init(e,t)}),Sf=P("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=pl),Ne.init(e,t)}),If=P("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$l),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),Ef=P("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=_l),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Nf=P("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wl),Ne.init(e,t)}),Of=P("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=kl),Ne.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,o]=i;if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ns(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const xf=P("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Sl),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{ns(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function jf(e){if(!Xo.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ns(r)}const Af=P("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Xo),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{jf(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),zf=P("$ZodE164",(e,t)=>{t.pattern??(t.pattern=El),Ne.init(e,t)});function Tf(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const Pf=P("$ZodJWT",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{Tf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Uf=P("$ZodCustomStringFormat",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),rs=P("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ul,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Df=P("$ZodNumber",(e,t)=>{ql.init(e,t),rs.init(e,t)}),is=P("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=Dl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),os=P("$ZodBigInt",(e,t)=>{ue.init(e,t),e._zod.pattern=Tl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Cf=P("$ZodBigInt",(e,t)=>{Vl.init(e,t),os.init(e,t)}),Bf=P("$ZodSymbol",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Rf=P("$ZodUndefined",(e,t)=>{ue.init(e,t),e._zod.pattern=Bl,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Ff=P("$ZodNull",(e,t)=>{ue.init(e,t),e._zod.pattern=Cl,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Zf=P("$ZodAny",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),Lf=P("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),Mf=P("$ZodNever",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),qf=P("$ZodVoid",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Vf=P("$ZodDate",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Ma(e,t,r){e.issues.length&&t.issues.push(...mt(r,e.issues)),t.value[r]=e.value}const Kf=P("$ZodArray",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let s=0;s<n.length;s++){const a=n[s],u=t.element._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(l=>Ma(l,r,s))):Ma(u,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function hi(e,t,r,i){e.issues.length&&t.issues.push(...mt(r,e.issues)),e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function Jf(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=qc(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Gf(e,t,r,i,n,o){const s=[],a=n.keySet,u=n.catchall._zod,l=u.def.type;for(const d of Object.keys(t)){if(a.has(d))continue;if(l==="never"){s.push(d);continue}const h=u.run({value:t[d],issues:[]},i);h instanceof Promise?e.push(h.then(m=>hi(m,r,d,t))):hi(h,r,d,t)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const Wf=P("$ZodObject",(e,t)=>{if(ue.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...a};return Object.defineProperty(t,"shape",{value:u}),u}})}const i=Wn(()=>Jf(t));ye(e._zod,"propValues",()=>{const a=t.shape,u={};for(const l in a){const d=a[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(const h of d.values)u[l].add(h)}}return u});const n=pn,o=t.catchall;let s;e._zod.parse=(a,u)=>{s??(s=i.value);const l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const d=[],h=s.shape;for(const m of s.keys){const p=h[m]._zod.run({value:l[m],issues:[]},u);p instanceof Promise?d.push(p.then(v=>hi(v,a,m,l))):hi(p,a,m,l)}return o?Gf(d,l,a,u,i.value,e):d.length?Promise.all(d).then(()=>a):a}}),Hf=P("$ZodObjectJIT",(e,t)=>{Wf.init(e,t);const r=e._zod.parse,i=Wn(()=>Jf(t)),n=m=>{const g=new uf(["shape","payload","ctx"]),p=i.value,v=_=>{const I=ko(_);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};g.write("const input = payload.value;");const y=Object.create(null);let w=0;for(const _ of p.keys)y[_]=`key_${w++}`;g.write("const newResult = {};");for(const _ of p.keys){const I=y[_],$=ko(_);g.write(`const ${I} = ${v(_)};`),g.write(`
|
|
5
|
-
if (${I}.issues.length) {
|
|
6
|
-
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
7
|
-
...iss,
|
|
8
|
-
path: iss.path ? [${$}, ...iss.path] : [${$}]
|
|
9
|
-
})));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (${I}.value === undefined) {
|
|
14
|
-
if (${$} in input) {
|
|
15
|
-
newResult[${$}] = undefined;
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
newResult[${$}] = ${I}.value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
`)}g.write("payload.value = newResult;"),g.write("return payload;");const b=g.compile();return(_,I)=>b(m,_,I)};let o;const s=pn,a=!li.jitless,l=a&&Lc.value,d=t.catchall;let h;e._zod.parse=(m,g)=>{h??(h=i.value);const p=m.value;return s(p)?a&&l&&g?.async===!1&&g.jitless!==!0?(o||(o=n(t.shape)),m=o(m,g),d?Gf([],p,m,g,h,e):m):r(m,g):(m.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),m)}});function qa(e,t,r,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const n=e.filter(o=>!Vt(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>gt(s,i,Ye())))}),t)}const ss=P("$ZodUnion",(e,t)=>{ue.init(e,t),ye(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),ye(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),ye(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),ye(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Ii(o.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1;const a=[];for(const u of t.options){const l=u._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(u=>qa(u,n,e,o)):qa(a,n,e,o)}}),Xf=P("$ZodDiscriminatedUnion",(e,t)=>{ss.init(e,t);const r=e._zod.parse;ye(e._zod,"propValues",()=>{const n={};for(const o of t.options){const s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[a,u]of Object.entries(s)){n[a]||(n[a]=new Set);for(const l of u)n[a].add(l)}}return n});const i=Wn(()=>{const n=t.options,o=new Map;for(const s of n){const a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const u of a){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});e._zod.parse=(n,o)=>{const s=n.value;if(!pn(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)}}),Yf=P("$ZodIntersection",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([u,l])=>Va(r,u,l)):Va(r,o,s)}});function Eo(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(Ht(e)&&Ht(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const s=Eo(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],s=Eo(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Va(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Vt(e))return e;const i=Eo(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const as=P("$ZodTuple",(e,t)=>{ue.init(e,t);const r=t.items,i=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];const a=[];if(!t.rest){const l=s.length>r.length,d=s.length<i-1;if(l||d)return n.issues.push({...l?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:e,origin:"array"}),n}let u=-1;for(const l of r){if(u++,u>=s.length&&u>=i)continue;const d=l._zod.run({value:s[u],issues:[]},o);d instanceof Promise?a.push(d.then(h=>lr(h,n,u))):lr(d,n,u)}if(t.rest){const l=s.slice(r.length);for(const d of l){u++;const h=t.rest._zod.run({value:d,issues:[]},o);h instanceof Promise?a.push(h.then(m=>lr(m,n,u))):lr(h,n,u)}}return a.length?Promise.all(a).then(()=>n):n}});function lr(e,t,r){e.issues.length&&t.issues.push(...mt(r,e.issues)),t.value[r]=e.value}const Qf=P("$ZodRecord",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Ht(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;r.value={};for(const u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){const l=t.valueType._zod.run({value:n[u],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...mt(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...mt(u,l.issues)),r.value[u]=l.value)}let a;for(const u in n)s.has(u)||(a=a??[],a.push(u));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a})}else{r.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__")continue;const a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(l=>gt(l,i,Ye())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}const u=t.valueType._zod.run({value:n[s],issues:[]},i);u instanceof Promise?o.push(u.then(l=>{l.issues.length&&r.issues.push(...mt(s,l.issues)),r.value[a.value]=l.value})):(u.issues.length&&r.issues.push(...mt(s,u.issues)),r.value[a.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),ed=P("$ZodMap",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[s,a]of n){const u=t.keyType._zod.run({value:s,issues:[]},i),l=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([d,h])=>{Ka(d,h,r,s,n,e,i)})):Ka(u,l,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Ka(e,t,r,i,n,o,s){e.issues.length&&(di.has(typeof i)?r.issues.push(...mt(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(a=>gt(a,s,Ye()))})),t.issues.length&&(di.has(typeof i)?r.issues.push(...mt(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(a=>gt(a,s,Ye()))})),r.value.set(e.value,t.value)}const td=P("$ZodSet",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const s of n){const a=t.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(u=>Ja(u,r))):Ja(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function Ja(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const nd=P("$ZodEnum",(e,t)=>{ue.init(e,t);const r=Bo(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>di.has(typeof n)).map(n=>typeof n=="string"?Ut(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{const s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),rd=P("$ZodLiteral",(e,t)=>{if(ue.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Ut(r):r?Ut(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r}}),id=P("$ZodFile",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),od=P("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Si(e.constructor.name);const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Wt;return r.value=n,r}});function Ga(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const sd=P("$ZodOptional",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ye(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ii(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ga(o,r.value)):Ga(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),ad=P("$ZodNullable",(e,t)=>{ue.init(e,t),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ii(r.source)}|null)$`):void 0}),ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),ud=P("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Wa(o,t)):Wa(n,t)}});function Wa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const cd=P("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),ld=P("$ZodNonOptional",(e,t)=>{ue.init(e,t),ye(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ha(o,e)):Ha(n,e)}});function Ha(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const fd=P("$ZodSuccess",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Si("ZodSuccess");const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),dd=P("$ZodCatch",(e,t)=>{ue.init(e,t),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>gt(s,i,Ye()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>gt(o,i,Ye()))},input:r.value}),r.issues=[]),r)}}),hd=P("$ZodNaN",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),md=P("$ZodPipe",(e,t)=>{ue.init(e,t),ye(e._zod,"values",()=>t.in._zod.values),ye(e._zod,"optin",()=>t.in._zod.optin),ye(e._zod,"optout",()=>t.out._zod.optout),ye(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>fr(s,t.in,i)):fr(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>fr(o,t.out,i)):fr(n,t.out,i)}});function fr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const us=P("$ZodCodec",(e,t)=>{ue.init(e,t),ye(e._zod,"values",()=>t.in._zod.values),ye(e._zod,"optin",()=>t.in._zod.optin),ye(e._zod,"optout",()=>t.out._zod.optout),ye(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(s=>dr(s,t,i)):dr(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>dr(s,t,i)):dr(o,t,i)}}});function dr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>hr(e,o,t.out,r)):hr(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>hr(e,o,t.in,r)):hr(e,n,t.in,r)}}function hr(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const pd=P("$ZodReadonly",(e,t)=>{ue.init(e,t),ye(e._zod,"propValues",()=>t.innerType._zod.propValues),ye(e._zod,"values",()=>t.innerType._zod.values),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Xa):Xa(n)}});function Xa(e){return e.value=Object.freeze(e.value),e}const gd=P("$ZodTemplateLiteral",(e,t)=>{ue.init(e,t);const r=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||Mc.has(typeof i))r.push(Ut(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),yd=P("$ZodFunction",(e,t)=>(ue.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const n=e._def.input?So(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?So(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=e._def.input?await Io(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await Io(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new as({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),vd=P("$ZodPromise",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),bd=P("$ZodLazy",(e,t)=>{ue.init(e,t),ye(e._zod,"innerType",()=>t.getter()),ye(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),ye(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),ye(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),ye(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),$d=P("$ZodCustom",(e,t)=>{Pe.init(e,t),ue.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>Ya(o,r,i,e));Ya(n,r,i,e)}});function Ya(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(gn(n))}}const kg=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${ae(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${i[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${G(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Sg(){return{localeError:kg()}}const Ig=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${ae(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${G(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Eg(){return{localeError:Ig()}}function Qa(e,t,r,i){const n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}const Ng=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${ae(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),u=Qa(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${o}${n.maximum.toString()} ${u}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);if(s){const a=Number(n.minimum),u=Qa(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${o}${n.minimum.toString()} ${u}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${i[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${G(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Og(){return{localeError:Ng()}}const xg=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},jg=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(i){return e[i]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return i=>{switch(i.code){case"invalid_type":return`Невалиден вход: очакван ${i.expected}, получен ${xg(i.input)}`;case"invalid_value":return i.values.length===1?`Невалиден вход: очакван ${ae(i.values[0])}`:`Невалидна опция: очаквано едно от ${G(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Твърде голямо: очаква се ${i.origin??"стойност"} да съдържа ${n}${i.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${i.origin??"стойност"} да бъде ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Твърде малко: очаква се ${i.origin} да съдържа ${n}${i.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${i.origin} да бъде ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;if(n.format==="starts_with")return`Невалиден низ: трябва да започва с "${n.prefix}"`;if(n.format==="ends_with")return`Невалиден низ: трябва да завършва с "${n.suffix}"`;if(n.format==="includes")return`Невалиден низ: трябва да включва "${n.includes}"`;if(n.format==="regex")return`Невалиден низ: трябва да съвпада с ${n.pattern}`;let o="Невалиден";return n.format==="emoji"&&(o="Невалидно"),n.format==="datetime"&&(o="Невалидно"),n.format==="date"&&(o="Невалидна"),n.format==="time"&&(o="Невалидно"),n.format==="duration"&&(o="Невалидна"),`${o} ${r[n.format]??i.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${i.divisor}`;case"unrecognized_keys":return`Неразпознат${i.keys.length>1?"и":""} ключ${i.keys.length>1?"ове":""}: ${G(i.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${i.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${i.origin}`;default:return"Невалиден вход"}}};function Ag(){return{localeError:jg()}}const zg=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${ae(n.values[0])}`:`Opció invàlida: s'esperava una de ${G(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${i[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function Tg(){return{localeError:zg()}}const Pg=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${ae(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${i[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${G(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function Ug(){return{localeError:Pg()}}const Dg=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(s){return e[s]??null}function i(s){return t[s]??s}const n=s=>{const a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"tal";case"object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case"invalid_type":return`Ugyldigt input: forventede ${i(s.expected)}, fik ${i(n(s.input))}`;case"invalid_value":return s.values.length===1?`Ugyldig værdi: forventede ${ae(s.values[0])}`:`Ugyldigt valg: forventede en af følgende ${G(s.values,"|")}`;case"too_big":{const a=s.inclusive?"<=":"<",u=r(s.origin),l=i(s.origin);return u?`For stor: forventede ${l??"value"} ${u.verb} ${a} ${s.maximum.toString()} ${u.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${a} ${s.maximum.toString()}`}case"too_small":{const a=s.inclusive?">=":">",u=r(s.origin),l=i(s.origin);return u?`For lille: forventede ${l} ${u.verb} ${a} ${s.minimum.toString()} ${u.unit}`:`For lille: forventede ${l} havde ${a} ${s.minimum.toString()}`}case"invalid_format":{const a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche mønsteret ${a.pattern}`:`Ugyldig ${o[a.format]??s.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${s.divisor}`;case"unrecognized_keys":return`${s.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${G(s.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${s.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${s.origin}`;default:return"Ugyldigt input"}}};function Cg(){return{localeError:Dg()}}const Bg=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${ae(n.values[0])}`:`Ungültige Option: erwartet eine von ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${G(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function Rg(){return{localeError:Bg()}}const Fg=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Zg=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${Fg(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${ae(i.values[0])}`:`Invalid option: expected one of ${G(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${G(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function _d(){return{localeError:Zg()}}const Lg=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Mg=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${Lg(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${ae(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${G(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Tro malgranda: atendiĝis ke ${i.origin} havu ${n}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${G(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function qg(){return{localeError:Mg()}}const Vg=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function i(s){return t[s]??s}const n=s=>{const a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"number";case"object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},o={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(s.expected)}, recibido ${i(n(s.input))}`;case"invalid_value":return s.values.length===1?`Entrada inválida: se esperaba ${ae(s.values[0])}`:`Opción inválida: se esperaba una de ${G(s.values,"|")}`;case"too_big":{const a=s.inclusive?"<=":"<",u=r(s.origin),l=i(s.origin);return u?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${a}${s.maximum.toString()} ${u.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${a}${s.maximum.toString()}`}case"too_small":{const a=s.inclusive?">=":">",u=r(s.origin),l=i(s.origin);return u?`Demasiado pequeño: se esperaba que ${l} tuviera ${a}${s.minimum.toString()} ${u.unit}`:`Demasiado pequeño: se esperaba que ${l} fuera ${a}${s.minimum.toString()}`}case"invalid_format":{const a=s;return a.format==="starts_with"?`Cadena inválida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inválida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inválida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${a.pattern}`:`Inválido ${o[a.format]??s.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${s.divisor}`;case"unrecognized_keys":return`Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${G(s.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(s.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(s.origin)}`;default:return"Entrada inválida"}}};function Kg(){return{localeError:Vg()}}const Jg=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${n.expected} میبود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${ae(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${G(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${i[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${G(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function Gg(){return{localeError:Jg()}}const Wg=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${ae(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${i[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${G(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Hg(){return{localeError:Wg()}}const Xg=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${ae(n.values[0])} attendu`:`Option invalide : une valeur parmi ${G(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${G(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Yg(){return{localeError:Xg()}}const Qg=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${ae(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${G(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function ey(){return{localeError:Qg()}}const ty=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return n=>{switch(n.code){case"invalid_type":return`קלט לא תקין: צריך ${n.expected}, התקבל ${r(n.input)}`;case"invalid_value":return n.values.length===1?`קלט לא תקין: צריך ${ae(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()} ${s.unit}`:`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"`:o.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"`:o.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${o.includes}"`:o.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}`:`${i[o.format]??n.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`;case"unrecognized_keys":return`מפתח${n.keys.length>1?"ות":""} לא מזוה${n.keys.length>1?"ים":"ה"}: ${G(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function ny(){return{localeError:ty()}}const ry=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${ae(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function iy(){return{localeError:ry()}}const oy=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${ae(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function sy(){return{localeError:oy()}}const ay=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},uy=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(i){return e[i]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return i=>{switch(i.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${ay(i.input)} þar sem á að vera ${i.expected}`;case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${ae(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${G(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${n}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${n}${i.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Ógildur strengur: verður að byrja á "${n.prefix}"`:n.format==="ends_with"?`Ógildur strengur: verður að enda á "${n.suffix}"`:n.format==="includes"?`Ógildur strengur: verður að innihalda "${n.includes}"`:n.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??i.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`Óþekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${G(i.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${i.origin}`;default:return"Rangt gildi"}}};function cy(){return{localeError:uy()}}const ly=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${ae(n.values[0])}`:`Opzione non valida: atteso uno tra ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${G(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function fy(){return{localeError:ly()}}const dy=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${ae(n.values[0])}が期待されました`:`無効な選択: ${G(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",s=t(n.origin);return s?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${s.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",s=t(n.origin);return s?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${s.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${i[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${G(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function hy(){return{localeError:dy()}}const my=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},py=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(i){return e[i]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return i=>{switch(i.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${i.expected}, მიღებული ${my(i.input)}`;case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${ae(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${G(i.values,"|")}-დან`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${o.verb} ${n}${i.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${o.verb} ${n}${i.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${n.prefix}"-ით`:n.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${n.suffix}"-ით`:n.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${n.includes}"-ს`:n.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${n.pattern}`:`არასწორი ${r[n.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${G(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function gy(){return{localeError:py()}}const yy=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${ae(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${G(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function wd(){return{localeError:yy()}}function vy(){return wd()}const by=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${ae(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${G(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",a=t(n.origin),u=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${u} ${o}${s}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${s}`}case"too_small":{const o=n.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",a=t(n.origin),u=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${u} ${o}${s}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${G(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function $y(){return{localeError:by()}}const _y=e=>Cn(typeof e,e),Cn=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},xn=e=>e.charAt(0).toUpperCase()+e.slice(1);function eu(e){const t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const wy=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(i,n,o,s){const a=e[i]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][o?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return i=>{switch(i.code){case"invalid_type":return`Gautas tipas ${_y(i.input)}, o tikėtasi - ${Cn(i.expected)}`;case"invalid_value":return i.values.length===1?`Privalo būti ${ae(i.values[0])}`:`Privalo būti vienas iš ${G(i.values,"|")} pasirinkimų`;case"too_big":{const n=Cn(i.origin),o=t(i.origin,eu(Number(i.maximum)),i.inclusive??!1,"smaller");if(o?.verb)return`${xn(n??i.origin??"reikšmė")} ${o.verb} ${i.maximum.toString()} ${o.unit??"elementų"}`;const s=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${xn(n??i.origin??"reikšmė")} turi būti ${s} ${i.maximum.toString()} ${o?.unit}`}case"too_small":{const n=Cn(i.origin),o=t(i.origin,eu(Number(i.minimum)),i.inclusive??!1,"bigger");if(o?.verb)return`${xn(n??i.origin??"reikšmė")} ${o.verb} ${i.minimum.toString()} ${o.unit??"elementų"}`;const s=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${xn(n??i.origin??"reikšmė")} turi būti ${s} ${i.minimum.toString()} ${o?.unit}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Eilutė privalo prasidėti "${n.prefix}"`:n.format==="ends_with"?`Eilutė privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilutė privalo įtraukti "${n.includes}"`:n.format==="regex"?`Eilutė privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??i.format}`}case"not_multiple_of":return`Skaičius privalo būti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${G(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const n=Cn(i.origin);return`${xn(n??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function ky(){return{localeError:wy()}}const Sy=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${ae(n.values[0])}`:`Грешана опција: се очекува една ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${G(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function Iy(){return{localeError:Sy()}}const Ey=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${ae(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${G(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Ny(){return{localeError:Ey()}}const Oy=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${ae(n.values[0])}`:`Ongeldige optie: verwacht één van ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function xy(){return{localeError:Oy()}}const jy=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${ae(n.values[0])}`:`Ugyldig valg: forventet en av ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${i[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${G(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Ay(){return{localeError:jy()}}const zy=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${ae(n.values[0])}`:`Fâsit tercih: mûteberler ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${i[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${G(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Ty(){return{localeError:zy()}}const Py=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${ae(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${G(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${i[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${G(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function Uy(){return{localeError:Py()}}const Dy=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${ae(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${i[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Cy(){return{localeError:Dy()}}const By=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${ae(n.values[0])}`:`Opção inválida: esperada uma das ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${i[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function Ry(){return{localeError:By()}}function tu(e,t,r,i){const n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}const Fy=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${ae(n.values[0])}`:`Неверный вариант: ожидалось одно из ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),u=tu(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${u}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);if(s){const a=Number(n.minimum),u=tu(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${u}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${i[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function Zy(){return{localeError:Fy()}}const Ly=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${ae(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${G(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function My(){return{localeError:Ly()}}const qy=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${ae(n.values[0])}`:`Ogiltigt val: förväntade en av ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${i[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${G(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function Vy(){return{localeError:qy()}}const Ky=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${ae(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${G(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${G(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Jy(){return{localeError:Ky()}}const Gy=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${ae(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(n.origin);return s?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",s=t(n.origin);return s?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${G(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Wy(){return{localeError:Gy()}}const Hy=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Xy=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(i){return e[i]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${Hy(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${ae(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${G(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${G(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Yy(){return{localeError:Xy()}}const Qy=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${ae(n.values[0])}`:`Неправильна опція: очікується одне з ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Занадто велике: очікується, що ${n.origin??"значення"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Занадто мале: очікується, що ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${i[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${G(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function kd(){return{localeError:Qy()}}function ev(){return kd()}const tv=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${ae(n.values[0])} متوقع تھا`:`غلط آپشن: ${G(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${i[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${G(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function nv(){return{localeError:tv()}}const rv=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${ae(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Quá nhỏ: mong đợi ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${i[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${G(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function iv(){return{localeError:rv()}}const ov=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${ae(n.values[0])}`:`无效选项:期望以下之一 ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${i[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${G(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function sv(){return{localeError:ov()}}const av=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${ae(n.values[0])}`:`無效的選項:預期為以下其中之一 ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${s.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${i[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${G(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function uv(){return{localeError:av()}}const cv=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(n))return"akopọ";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return n=>{switch(n.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${n.expected}, àmọ̀ a rí ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${ae(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${G(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${i[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${G(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function lv(){return{localeError:cv()}}var Sd=Object.freeze({__proto__:null,ar:Sg,az:Eg,be:Og,bg:Ag,ca:Tg,cs:Ug,da:Cg,de:Rg,en:_d,eo:qg,es:Kg,fa:Gg,fi:Hg,fr:Yg,frCA:ey,he:ny,hu:iy,id:sy,is:cy,it:fy,ja:hy,ka:gy,kh:vy,km:wd,ko:$y,lt:ky,mk:Iy,ms:Ny,nl:xy,no:Ay,ota:Ty,pl:Cy,ps:Uy,pt:Ry,ru:Zy,sl:My,sv:Vy,ta:Jy,th:Wy,tr:Yy,ua:ev,uk:kd,ur:nv,vi:iv,yo:lv,zhCN:sv,zhTW:uv});const Id=Symbol("ZodOutput"),Ed=Symbol("ZodInput");class cs{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function ls(){return new cs}const Kt=ls();function Nd(e,t){return new e({type:"string",...V(t)})}function Od(e,t){return new e({type:"string",coerce:!0,...V(t)})}function fs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...V(t)})}function mi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(t)})}function ds(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...V(t)})}function hs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(t)})}function ms(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(t)})}function ps(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(t)})}function xi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}function gs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...V(t)})}function ys(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(t)})}function vs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...V(t)})}function bs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(t)})}function $s(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...V(t)})}function _s(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...V(t)})}function ws(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(t)})}function ks(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(t)})}function Ss(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(t)})}function Is(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(t)})}function Es(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(t)})}function Ns(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...V(t)})}function Os(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...V(t)})}function xs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...V(t)})}function js(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...V(t)})}const xd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function jd(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(t)})}function Ad(e,t){return new e({type:"string",format:"date",check:"string_format",...V(t)})}function zd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...V(t)})}function Td(e,t){return new e({type:"string",format:"duration",check:"string_format",...V(t)})}function Pd(e,t){return new e({type:"number",checks:[],...V(t)})}function Ud(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}function Dd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}function Cd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...V(t)})}function Bd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...V(t)})}function Rd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...V(t)})}function Fd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...V(t)})}function Zd(e,t){return new e({type:"boolean",...V(t)})}function Ld(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}function Md(e,t){return new e({type:"bigint",...V(t)})}function qd(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}function Vd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...V(t)})}function Kd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...V(t)})}function Jd(e,t){return new e({type:"symbol",...V(t)})}function Gd(e,t){return new e({type:"undefined",...V(t)})}function Wd(e,t){return new e({type:"null",...V(t)})}function Hd(e){return new e({type:"any"})}function Xd(e){return new e({type:"unknown"})}function Yd(e,t){return new e({type:"never",...V(t)})}function Qd(e,t){return new e({type:"void",...V(t)})}function eh(e,t){return new e({type:"date",...V(t)})}function th(e,t){return new e({type:"date",coerce:!0,...V(t)})}function nh(e,t){return new e({type:"nan",...V(t)})}function Xt(e,t){return new es({check:"less_than",...V(t),value:e,inclusive:!1})}function pt(e,t){return new es({check:"less_than",...V(t),value:e,inclusive:!0})}function Yt(e,t){return new ts({check:"greater_than",...V(t),value:e,inclusive:!1})}function nt(e,t){return new ts({check:"greater_than",...V(t),value:e,inclusive:!0})}function rh(e){return Yt(0,e)}function ih(e){return Xt(0,e)}function oh(e){return pt(0,e)}function sh(e){return nt(0,e)}function Mn(e,t){return new Ml({check:"multiple_of",...V(t),value:e})}function ji(e,t){return new Kl({check:"max_size",...V(t),maximum:e})}function qn(e,t){return new Jl({check:"min_size",...V(t),minimum:e})}function As(e,t){return new Gl({check:"size_equals",...V(t),size:e})}function Ai(e,t){return new Wl({check:"max_length",...V(t),maximum:e})}function vn(e,t){return new Hl({check:"min_length",...V(t),minimum:e})}function zi(e,t){return new Xl({check:"length_equals",...V(t),length:e})}function zs(e,t){return new Yl({check:"string_format",format:"regex",...V(t),pattern:e})}function Ts(e){return new Ql({check:"string_format",format:"lowercase",...V(e)})}function Ps(e){return new ef({check:"string_format",format:"uppercase",...V(e)})}function Us(e,t){return new tf({check:"string_format",format:"includes",...V(t),includes:e})}function Ds(e,t){return new nf({check:"string_format",format:"starts_with",...V(t),prefix:e})}function Cs(e,t){return new rf({check:"string_format",format:"ends_with",...V(t),suffix:e})}function ah(e,t,r){return new of({check:"property",property:e,schema:t,...V(r)})}function Bs(e,t){return new sf({check:"mime_type",mime:e,...V(t)})}function tn(e){return new af({check:"overwrite",tx:e})}function Rs(e){return tn(t=>t.normalize(e))}function Fs(){return tn(e=>e.trim())}function Zs(){return tn(e=>e.toLowerCase())}function Ls(){return tn(e=>e.toUpperCase())}function uh(e,t,r){return new e({type:"array",element:t,...V(r)})}function fv(e,t,r){return new e({type:"union",options:t,...V(r)})}function dv(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...V(i)})}function hv(e,t,r){return new e({type:"intersection",left:t,right:r})}function mv(e,t,r,i){const n=r instanceof ue,o=n?i:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...V(o)})}function pv(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...V(i)})}function gv(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...V(i)})}function yv(e,t,r){return new e({type:"set",valueType:t,...V(r)})}function vv(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...V(r)})}function bv(e,t,r){return new e({type:"enum",entries:t,...V(r)})}function $v(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...V(r)})}function ch(e,t){return new e({type:"file",...V(t)})}function _v(e,t){return new e({type:"transform",transform:t})}function wv(e,t){return new e({type:"optional",innerType:t})}function kv(e,t){return new e({type:"nullable",innerType:t})}function Sv(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ei(r)}})}function Iv(e,t,r){return new e({type:"nonoptional",innerType:t,...V(r)})}function Ev(e,t){return new e({type:"success",innerType:t})}function Nv(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Ov(e,t,r){return new e({type:"pipe",in:t,out:r})}function xv(e,t){return new e({type:"readonly",innerType:t})}function jv(e,t,r){return new e({type:"template_literal",parts:t,...V(r)})}function Av(e,t){return new e({type:"lazy",getter:t})}function zv(e,t){return new e({type:"promise",innerType:t})}function lh(e,t,r){const i=V(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function fh(e,t,r){return new e({type:"custom",check:"custom",fn:t,...V(r)})}function dh(e){const t=hh(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(gn(i,r.value,t._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(gn(n))}},e(r.value,r)));return t}function hh(e,t){const r=new Pe({check:"custom",...V(t)});return r._zod.check=e,r}function mh(e,t){const r=V(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(g=>typeof g=="string"?g.toLowerCase():g),n=n.map(g=>typeof g=="string"?g.toLowerCase():g));const o=new Set(i),s=new Set(n),a=e.Codec??us,u=e.Boolean??is,l=e.String??rr,d=new l({type:"string",error:r.error}),h=new u({type:"boolean",error:r.error}),m=new a({type:"pipe",in:d,out:h,transform:((g,p)=>{let v=g;return r.case!=="sensitive"&&(v=v.toLowerCase()),o.has(v)?!0:s.has(v)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:p.value,inst:m,continue:!1}),{})}),reverseTransform:((g,p)=>g===!0?i[0]||"true":n[0]||"false"),error:r.error});return m}function ir(e,t,r,i={}){const n=V(i),o={...V(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}class No{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Kt,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var i;const n=t._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);const u=t._zod.toJSONSchema?.();if(u)a.schema=u;else{const h={...r,schemaPath:[...r.schemaPath,t],path:r.path},m=t._zod.parent;if(m)a.ref=m,this.process(m,h),this.seen.get(m).isParent=!0;else{const g=a.schema;switch(n.type){case"string":{const p=g;p.type="string";const{minimum:v,maximum:y,format:w,patterns:b,contentEncoding:_}=t._zod.bag;if(typeof v=="number"&&(p.minLength=v),typeof y=="number"&&(p.maxLength=y),w&&(p.format=o[w]??w,p.format===""&&delete p.format),_&&(p.contentEncoding=_),b&&b.size>0){const I=[...b];I.length===1?p.pattern=I[0].source:I.length>1&&(a.schema.allOf=[...I.map($=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:$.source}))])}break}case"number":{const p=g,{minimum:v,maximum:y,format:w,multipleOf:b,exclusiveMaximum:_,exclusiveMinimum:I}=t._zod.bag;typeof w=="string"&&w.includes("int")?p.type="integer":p.type="number",typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(p.minimum=I,p.exclusiveMinimum=!0):p.exclusiveMinimum=I),typeof v=="number"&&(p.minimum=v,typeof I=="number"&&this.target!=="draft-4"&&(I>=v?delete p.minimum:delete p.exclusiveMinimum)),typeof _=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(p.maximum=_,p.exclusiveMaximum=!0):p.exclusiveMaximum=_),typeof y=="number"&&(p.maximum=y,typeof _=="number"&&this.target!=="draft-4"&&(_<=y?delete p.maximum:delete p.exclusiveMaximum)),typeof b=="number"&&(p.multipleOf=b);break}case"boolean":{const p=g;p.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(g.type="string",g.nullable=!0,g.enum=[null]):g.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{g.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const p=g,{minimum:v,maximum:y}=t._zod.bag;typeof v=="number"&&(p.minItems=v),typeof y=="number"&&(p.maxItems=y),p.type="array",p.items=this.process(n.element,{...h,path:[...h.path,"items"]});break}case"object":{const p=g;p.type="object",p.properties={};const v=n.shape;for(const b in v)p.properties[b]=this.process(v[b],{...h,path:[...h.path,"properties",b]});const y=new Set(Object.keys(v)),w=new Set([...y].filter(b=>{const _=n.shape[b]._zod;return this.io==="input"?_.optin===void 0:_.optout===void 0}));w.size>0&&(p.required=Array.from(w)),n.catchall?._zod.def.type==="never"?p.additionalProperties=!1:n.catchall?n.catchall&&(p.additionalProperties=this.process(n.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{const p=g,v=n.options.map((y,w)=>this.process(y,{...h,path:[...h.path,"anyOf",w]}));p.anyOf=v;break}case"intersection":{const p=g,v=this.process(n.left,{...h,path:[...h.path,"allOf",0]}),y=this.process(n.right,{...h,path:[...h.path,"allOf",1]}),w=_=>"allOf"in _&&Object.keys(_).length===1,b=[...w(v)?v.allOf:[v],...w(y)?y.allOf:[y]];p.allOf=b;break}case"tuple":{const p=g;p.type="array";const v=this.target==="draft-2020-12"?"prefixItems":"items",y=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",w=n.items.map(($,E)=>this.process($,{...h,path:[...h.path,v,E]})),b=n.rest?this.process(n.rest,{...h,path:[...h.path,y,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(p.prefixItems=w,b&&(p.items=b)):this.target==="openapi-3.0"?(p.items={anyOf:w},b&&p.items.anyOf.push(b),p.minItems=w.length,b||(p.maxItems=w.length)):(p.items=w,b&&(p.additionalItems=b));const{minimum:_,maximum:I}=t._zod.bag;typeof _=="number"&&(p.minItems=_),typeof I=="number"&&(p.maxItems=I);break}case"record":{const p=g;p.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(p.propertyNames=this.process(n.keyType,{...h,path:[...h.path,"propertyNames"]})),p.additionalProperties=this.process(n.valueType,{...h,path:[...h.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const p=g,v=Bo(n.entries);v.every(y=>typeof y=="number")&&(p.type="number"),v.every(y=>typeof y=="string")&&(p.type="string"),p.enum=v;break}case"literal":{const p=g,v=[];for(const y of n.values)if(y===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof y=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");v.push(Number(y))}else v.push(y);if(v.length!==0)if(v.length===1){const y=v[0];p.type=y===null?"null":typeof y,this.target==="draft-4"||this.target==="openapi-3.0"?p.enum=[y]:p.const=y}else v.every(y=>typeof y=="number")&&(p.type="number"),v.every(y=>typeof y=="string")&&(p.type="string"),v.every(y=>typeof y=="boolean")&&(p.type="string"),v.every(y=>y===null)&&(p.type="null"),p.enum=v;break}case"file":{const p=g,v={type:"string",format:"binary",contentEncoding:"binary"},{minimum:y,maximum:w,mime:b}=t._zod.bag;y!==void 0&&(v.minLength=y),w!==void 0&&(v.maxLength=w),b?b.length===1?(v.contentMediaType=b[0],Object.assign(p,v)):p.anyOf=b.map(_=>({...v,contentMediaType:_})):Object.assign(p,v);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const p=this.process(n.innerType,h);this.target==="openapi-3.0"?(a.ref=n.innerType,g.nullable=!0):g.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"success":{const p=g;p.type="boolean";break}case"default":{this.process(n.innerType,h),a.ref=n.innerType,g.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,h),a.ref=n.innerType,this.io==="input"&&(g._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,h),a.ref=n.innerType;let p;try{p=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}g.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const p=g,v=t._zod.pattern;if(!v)throw new Error("Pattern not found in template literal");p.type="string",p.pattern=v.source;break}case"pipe":{const p=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(p,h),a.ref=p;break}case"readonly":{this.process(n.innerType,h),a.ref=n.innerType,g.readOnly=!0;break}case"promise":{this.process(n.innerType,h),a.ref=n.innerType;break}case"optional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"lazy":{const p=t._zod.innerType;this.process(p,h),a.ref=p;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const l=this.metadataRegistry.get(t);return l&&Object.assign(a.schema,l),this.io==="input"&&Re(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){const i={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=d=>{const h=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const v=i.external.registry.get(d[0])?.id,y=i.external.uri??(b=>b);if(v)return{ref:y(v)};const w=d[1].defId??d[1].schema.id??`schema${this.counter++}`;return d[1].defId=w,{defId:w,ref:`${y("__shared")}#/${h}/${w}`}}if(d[1]===n)return{ref:"#"};const g=`#/${h}/`,p=d[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:g+p}},s=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:m,defId:g}=o(d);h.def={...h.schema},g&&(h.defId=g);const p=h.schema;for(const v in p)delete p[v];p.$ref=m};if(i.cycles==="throw")for(const d of this.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
|
|
22
|
-
|
|
23
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of this.seen.entries()){const h=d[1];if(t===d[0]){s(d);continue}if(i.external){const g=i.external.registry.get(d[0])?.id;if(t!==d[0]&&g){s(d);continue}}if(this.metadataRegistry.get(d[0])?.id){s(d);continue}if(h.cycle){s(d);continue}if(h.count>1&&i.reused==="ref"){s(d);continue}}const a=(d,h)=>{const m=this.seen.get(d),g=m.def??m.schema,p={...g};if(m.ref===null)return;const v=m.ref;if(m.ref=null,v){a(v,h);const y=this.seen.get(v).schema;y.$ref&&(h.target==="draft-7"||h.target==="draft-4"||h.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(y)):(Object.assign(g,y),Object.assign(g,p))}m.isParent||this.override({zodSchema:d,jsonSchema:g,path:m.path??[]})};for(const d of[...this.seen.entries()].reverse())a(d[0],{target:this.target});const u={};if(this.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?u.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?u.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),i.external?.uri){const d=i.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");u.$id=i.external.uri(d)}Object.assign(u,n.def);const l=i.external?.defs??{};for(const d of this.seen.entries()){const h=d[1];h.def&&h.defId&&(l[h.defId]=h.def)}i.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?u.$defs=l:u.definitions=l);try{return JSON.parse(JSON.stringify(u))}catch{throw new Error("Error converting schema to JSON.")}}}function ph(e,t){if(e instanceof cs){const i=new No(t),n={};for(const a of e._idmap.entries()){const[u,l]=a;i.process(l)}const o={},s={registry:e,uri:t?.uri,defs:n};for(const a of e._idmap.entries()){const[u,l]=a;o[u]=i.emit(l,{...t,external:s})}if(Object.keys(n).length>0){const a=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[a]:n}}return{schemas:o}}const r=new No(t);return r.process(e),r.emit(e,t)}function Re(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Re(n.element,r);case"object":{for(const o in n.shape)if(Re(n.shape[o],r))return!0;return!1}case"union":{for(const o of n.options)if(Re(o,r))return!0;return!1}case"intersection":return Re(n.left,r)||Re(n.right,r);case"tuple":{for(const o of n.items)if(Re(o,r))return!0;return!!(n.rest&&Re(n.rest,r))}case"record":return Re(n.keyType,r)||Re(n.valueType,r);case"map":return Re(n.keyType,r)||Re(n.valueType,r);case"set":return Re(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Re(n.innerType,r);case"lazy":return Re(n.getter(),r);case"default":return Re(n.innerType,r);case"prefault":return Re(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Re(n.in,r)||Re(n.out,r);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${n.type}`)}var Tv=Object.freeze({__proto__:null}),Pv=Object.freeze({__proto__:null,$ZodAny:Zf,$ZodArray:Kf,$ZodAsyncError:Wt,$ZodBase64:xf,$ZodBase64URL:Af,$ZodBigInt:os,$ZodBigIntFormat:Cf,$ZodBoolean:is,$ZodCIDRv4:Nf,$ZodCIDRv6:Of,$ZodCUID:gf,$ZodCUID2:yf,$ZodCatch:dd,$ZodCheck:Pe,$ZodCheckBigIntFormat:Vl,$ZodCheckEndsWith:rf,$ZodCheckGreaterThan:ts,$ZodCheckIncludes:tf,$ZodCheckLengthEquals:Xl,$ZodCheckLessThan:es,$ZodCheckLowerCase:Ql,$ZodCheckMaxLength:Wl,$ZodCheckMaxSize:Kl,$ZodCheckMimeType:sf,$ZodCheckMinLength:Hl,$ZodCheckMinSize:Jl,$ZodCheckMultipleOf:Ml,$ZodCheckNumberFormat:ql,$ZodCheckOverwrite:af,$ZodCheckProperty:of,$ZodCheckRegex:Yl,$ZodCheckSizeEquals:Gl,$ZodCheckStartsWith:nf,$ZodCheckStringFormat:nr,$ZodCheckUpperCase:ef,$ZodCodec:us,$ZodCustom:$d,$ZodCustomStringFormat:Uf,$ZodDate:Vf,$ZodDefault:ud,$ZodDiscriminatedUnion:Xf,$ZodE164:zf,$ZodEmail:df,$ZodEmoji:mf,$ZodEncodeError:Si,$ZodEnum:nd,$ZodError:Fo,$ZodFile:id,$ZodFunction:yd,$ZodGUID:lf,$ZodIPv4:If,$ZodIPv6:Ef,$ZodISODate:wf,$ZodISODateTime:_f,$ZodISODuration:Sf,$ZodISOTime:kf,$ZodIntersection:Yf,$ZodJWT:Pf,$ZodKSUID:$f,$ZodLazy:bd,$ZodLiteral:rd,$ZodMap:ed,$ZodNaN:hd,$ZodNanoID:pf,$ZodNever:Mf,$ZodNonOptional:ld,$ZodNull:Ff,$ZodNullable:ad,$ZodNumber:rs,$ZodNumberFormat:Df,$ZodObject:Wf,$ZodObjectJIT:Hf,$ZodOptional:sd,$ZodPipe:md,$ZodPrefault:cd,$ZodPromise:vd,$ZodReadonly:pd,$ZodRealError:rt,$ZodRecord:Qf,$ZodRegistry:cs,$ZodSet:td,$ZodString:rr,$ZodStringFormat:Ne,$ZodSuccess:fd,$ZodSymbol:Bf,$ZodTemplateLiteral:gd,$ZodTransform:od,$ZodTuple:as,$ZodType:ue,$ZodULID:vf,$ZodURL:hf,$ZodUUID:ff,$ZodUndefined:Rf,$ZodUnion:ss,$ZodUnknown:Lf,$ZodVoid:qf,$ZodXID:bf,$brand:Fc,$constructor:P,$input:Ed,$output:Id,Doc:uf,JSONSchema:Tv,JSONSchemaGenerator:No,NEVER:Rc,TimePrecision:xd,_any:Hd,_array:uh,_base64:Ns,_base64url:Os,_bigint:Md,_boolean:Zd,_catch:Nv,_check:hh,_cidrv4:Is,_cidrv6:Es,_coercedBigint:qd,_coercedBoolean:Ld,_coercedDate:th,_coercedNumber:Ud,_coercedString:Od,_cuid:vs,_cuid2:bs,_custom:lh,_date:eh,_decode:qo,_decodeAsync:Ko,_default:Sv,_discriminatedUnion:dv,_e164:xs,_email:fs,_emoji:gs,_encode:Mo,_encodeAsync:Vo,_endsWith:Cs,_enum:vv,_file:ch,_float32:Cd,_float64:Bd,_gt:Yt,_gte:nt,_guid:mi,_includes:Us,_int:Dd,_int32:Rd,_int64:Vd,_intersection:hv,_ipv4:ks,_ipv6:Ss,_isoDate:Ad,_isoDateTime:jd,_isoDuration:Td,_isoTime:zd,_jwt:js,_ksuid:ws,_lazy:Av,_length:zi,_literal:$v,_lowercase:Ts,_lt:Xt,_lte:pt,_map:gv,_max:pt,_maxLength:Ai,_maxSize:ji,_mime:Bs,_min:nt,_minLength:vn,_minSize:qn,_multipleOf:Mn,_nan:nh,_nanoid:ys,_nativeEnum:bv,_negative:ih,_never:Yd,_nonnegative:sh,_nonoptional:Iv,_nonpositive:oh,_normalize:Rs,_null:Wd,_nullable:kv,_number:Pd,_optional:wv,_overwrite:tn,_parse:Hn,_parseAsync:Xn,_pipe:Ov,_positive:rh,_promise:zv,_property:ah,_readonly:xv,_record:pv,_refine:fh,_regex:zs,_safeDecode:Go,_safeDecodeAsync:Ho,_safeEncode:Jo,_safeEncodeAsync:Wo,_safeParse:Yn,_safeParseAsync:Qn,_set:yv,_size:As,_startsWith:Ds,_string:Nd,_stringFormat:ir,_stringbool:mh,_success:Ev,_superRefine:dh,_symbol:Jd,_templateLiteral:jv,_toLowerCase:Zs,_toUpperCase:Ls,_transform:_v,_trim:Fs,_tuple:mv,_uint32:Fd,_uint64:Kd,_ulid:$s,_undefined:Gd,_union:fv,_unknown:Xd,_uppercase:Ps,_url:xi,_uuid:ds,_uuidv4:hs,_uuidv6:ms,_uuidv7:ps,_void:Qd,_xid:_s,clone:ct,config:Ye,decode:Kp,decodeAsync:Gp,encode:Vp,encodeAsync:Jp,flattenError:Zo,formatError:Lo,globalConfig:li,globalRegistry:Kt,isValidBase64:ns,isValidBase64URL:jf,isValidJWT:Tf,locales:Sd,parse:So,parseAsync:Io,prettifyError:sl,regexes:Qo,registry:ls,safeDecode:Hp,safeDecodeAsync:Yp,safeEncode:Wp,safeEncodeAsync:Xp,safeParse:al,safeParseAsync:ul,toDotPath:ol,toJSONSchema:ph,treeifyError:il,util:nl,version:cf});const Ms=P("ZodISODateTime",(e,t)=>{_f.init(e,t),Oe.init(e,t)});function gh(e){return jd(Ms,e)}const qs=P("ZodISODate",(e,t)=>{wf.init(e,t),Oe.init(e,t)});function yh(e){return Ad(qs,e)}const Vs=P("ZodISOTime",(e,t)=>{kf.init(e,t),Oe.init(e,t)});function vh(e){return zd(Vs,e)}const Ks=P("ZodISODuration",(e,t)=>{Sf.init(e,t),Oe.init(e,t)});function bh(e){return Td(Ks,e)}var Uv=Object.freeze({__proto__:null,ZodISODate:qs,ZodISODateTime:Ms,ZodISODuration:Ks,ZodISOTime:Vs,date:yh,datetime:gh,duration:bh,time:vh});const $h=(e,t)=>{Fo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Lo(e,r)},flatten:{value:r=>Zo(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,fi,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,fi,2)}},isEmpty:{get(){return e.issues.length===0}}})},Dv=P("ZodError",$h),it=P("ZodError",$h,{Parent:Error}),_h=Hn(it),wh=Xn(it),kh=Yn(it),Sh=Qn(it),Ih=Mo(it),Eh=qo(it),Nh=Vo(it),Oh=Ko(it),xh=Jo(it),jh=Go(it),Ah=Wo(it),zh=Ho(it),de=P("ZodType",(e,t)=>(ue.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(xt(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]})),e.clone=(r,i)=>ct(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>_h(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>kh(e,r,i),e.parseAsync=async(r,i)=>wh(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Sh(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Ih(e,r,i),e.decode=(r,i)=>Eh(e,r,i),e.encodeAsync=async(r,i)=>Nh(e,r,i),e.decodeAsync=async(r,i)=>Oh(e,r,i),e.safeEncode=(r,i)=>xh(e,r,i),e.safeDecode=(r,i)=>jh(e,r,i),e.safeEncodeAsync=async(r,i)=>Ah(e,r,i),e.safeDecodeAsync=async(r,i)=>zh(e,r,i),e.refine=(r,i)=>e.check(gm(r,i)),e.superRefine=r=>e.check(ym(r)),e.overwrite=r=>e.check(tn(r)),e.optional=()=>gi(e),e.nullable=()=>yi(e),e.nullish=()=>gi(yi(e)),e.nonoptional=r=>im(e,r),e.array=()=>Ze(e),e.or=r=>Ct([e,r]),e.and=r=>Vh(e,r),e.transform=r=>vi(e,pa(r)),e.default=r=>tm(e,r),e.prefault=r=>rm(e,r),e.catch=r=>am(e,r),e.pipe=r=>vi(e,r),e.readonly=()=>lm(e),e.describe=r=>{const i=e.clone();return Kt.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return Kt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Kt.get(e);const i=e.clone();return Kt.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Js=P("_ZodString",(e,t)=>{rr.init(e,t),de.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(zs(...i)),e.includes=(...i)=>e.check(Us(...i)),e.startsWith=(...i)=>e.check(Ds(...i)),e.endsWith=(...i)=>e.check(Cs(...i)),e.min=(...i)=>e.check(vn(...i)),e.max=(...i)=>e.check(Ai(...i)),e.length=(...i)=>e.check(zi(...i)),e.nonempty=(...i)=>e.check(vn(1,...i)),e.lowercase=i=>e.check(Ts(i)),e.uppercase=i=>e.check(Ps(i)),e.trim=()=>e.check(Fs()),e.normalize=(...i)=>e.check(Rs(...i)),e.toLowerCase=()=>e.check(Zs()),e.toUpperCase=()=>e.check(Ls())}),Ti=P("ZodString",(e,t)=>{rr.init(e,t),Js.init(e,t),e.email=r=>e.check(fs(Gs,r)),e.url=r=>e.check(xi(Pi,r)),e.jwt=r=>e.check(js(ca,r)),e.emoji=r=>e.check(gs(Ws,r)),e.guid=r=>e.check(mi(pi,r)),e.uuid=r=>e.check(ds(It,r)),e.uuidv4=r=>e.check(hs(It,r)),e.uuidv6=r=>e.check(ms(It,r)),e.uuidv7=r=>e.check(ps(It,r)),e.nanoid=r=>e.check(ys(Hs,r)),e.guid=r=>e.check(mi(pi,r)),e.cuid=r=>e.check(vs(Xs,r)),e.cuid2=r=>e.check(bs(Ys,r)),e.ulid=r=>e.check($s(Qs,r)),e.base64=r=>e.check(Ns(sa,r)),e.base64url=r=>e.check(Os(aa,r)),e.xid=r=>e.check(_s(ea,r)),e.ksuid=r=>e.check(ws(ta,r)),e.ipv4=r=>e.check(ks(na,r)),e.ipv6=r=>e.check(Ss(ra,r)),e.cidrv4=r=>e.check(Is(ia,r)),e.cidrv6=r=>e.check(Es(oa,r)),e.e164=r=>e.check(xs(ua,r)),e.datetime=r=>e.check(gh(r)),e.date=r=>e.check(yh(r)),e.time=r=>e.check(vh(r)),e.duration=r=>e.check(bh(r))});function q(e){return Nd(Ti,e)}const Oe=P("ZodStringFormat",(e,t)=>{Ne.init(e,t),Js.init(e,t)}),Gs=P("ZodEmail",(e,t)=>{df.init(e,t),Oe.init(e,t)});function Cv(e){return fs(Gs,e)}const pi=P("ZodGUID",(e,t)=>{lf.init(e,t),Oe.init(e,t)});function Bv(e){return mi(pi,e)}const It=P("ZodUUID",(e,t)=>{ff.init(e,t),Oe.init(e,t)});function Rv(e){return ds(It,e)}function Fv(e){return hs(It,e)}function Zv(e){return ms(It,e)}function Lv(e){return ps(It,e)}const Pi=P("ZodURL",(e,t)=>{hf.init(e,t),Oe.init(e,t)});function Th(e){return xi(Pi,e)}function Mv(e){return xi(Pi,{protocol:/^https?$/,hostname:Il,...V(e)})}const Ws=P("ZodEmoji",(e,t)=>{mf.init(e,t),Oe.init(e,t)});function qv(e){return gs(Ws,e)}const Hs=P("ZodNanoID",(e,t)=>{pf.init(e,t),Oe.init(e,t)});function Vv(e){return ys(Hs,e)}const Xs=P("ZodCUID",(e,t)=>{gf.init(e,t),Oe.init(e,t)});function Kv(e){return vs(Xs,e)}const Ys=P("ZodCUID2",(e,t)=>{yf.init(e,t),Oe.init(e,t)});function $e(e){return bs(Ys,e)}const Qs=P("ZodULID",(e,t)=>{vf.init(e,t),Oe.init(e,t)});function Jv(e){return $s(Qs,e)}const ea=P("ZodXID",(e,t)=>{bf.init(e,t),Oe.init(e,t)});function Gv(e){return _s(ea,e)}const ta=P("ZodKSUID",(e,t)=>{$f.init(e,t),Oe.init(e,t)});function Wv(e){return ws(ta,e)}const na=P("ZodIPv4",(e,t)=>{If.init(e,t),Oe.init(e,t)});function Hv(e){return ks(na,e)}const ra=P("ZodIPv6",(e,t)=>{Ef.init(e,t),Oe.init(e,t)});function Xv(e){return Ss(ra,e)}const ia=P("ZodCIDRv4",(e,t)=>{Nf.init(e,t),Oe.init(e,t)});function Yv(e){return Is(ia,e)}const oa=P("ZodCIDRv6",(e,t)=>{Of.init(e,t),Oe.init(e,t)});function Qv(e){return Es(oa,e)}const sa=P("ZodBase64",(e,t)=>{xf.init(e,t),Oe.init(e,t)});function e0(e){return Ns(sa,e)}const aa=P("ZodBase64URL",(e,t)=>{Af.init(e,t),Oe.init(e,t)});function t0(e){return Os(aa,e)}const ua=P("ZodE164",(e,t)=>{zf.init(e,t),Oe.init(e,t)});function n0(e){return xs(ua,e)}const ca=P("ZodJWT",(e,t)=>{Pf.init(e,t),Oe.init(e,t)});function r0(e){return js(ca,e)}const or=P("ZodCustomStringFormat",(e,t)=>{Uf.init(e,t),Oe.init(e,t)});function i0(e,t,r={}){return ir(or,e,t,r)}function o0(e){return ir(or,"hostname",Yo,e)}function s0(e){return ir(or,"hex",Zl,e)}function a0(e,t){const r=t?.enc??"hex",i=`${e}_${r}`,n=Qo[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return ir(or,i,n,t)}const Ui=P("ZodNumber",(e,t)=>{rs.init(e,t),de.init(e,t),e.gt=(i,n)=>e.check(Yt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Xt(i,n)),e.lte=(i,n)=>e.check(pt(i,n)),e.max=(i,n)=>e.check(pt(i,n)),e.int=i=>e.check(Oo(i)),e.safe=i=>e.check(Oo(i)),e.positive=i=>e.check(Yt(0,i)),e.nonnegative=i=>e.check(nt(0,i)),e.negative=i=>e.check(Xt(0,i)),e.nonpositive=i=>e.check(pt(0,i)),e.multipleOf=(i,n)=>e.check(Mn(i,n)),e.step=(i,n)=>e.check(Mn(i,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ge(e){return Pd(Ui,e)}const wn=P("ZodNumberFormat",(e,t)=>{Df.init(e,t),Ui.init(e,t)});function Oo(e){return Dd(wn,e)}function u0(e){return Cd(wn,e)}function c0(e){return Bd(wn,e)}function l0(e){return Rd(wn,e)}function f0(e){return Fd(wn,e)}const Di=P("ZodBoolean",(e,t)=>{is.init(e,t),de.init(e,t)});function Be(e){return Zd(Di,e)}const Ci=P("ZodBigInt",(e,t)=>{os.init(e,t),de.init(e,t),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.gt=(i,n)=>e.check(Yt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Xt(i,n)),e.lte=(i,n)=>e.check(pt(i,n)),e.max=(i,n)=>e.check(pt(i,n)),e.positive=i=>e.check(Yt(BigInt(0),i)),e.negative=i=>e.check(Xt(BigInt(0),i)),e.nonpositive=i=>e.check(pt(BigInt(0),i)),e.nonnegative=i=>e.check(nt(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(Mn(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function d0(e){return Md(Ci,e)}const la=P("ZodBigIntFormat",(e,t)=>{Cf.init(e,t),Ci.init(e,t)});function h0(e){return Vd(la,e)}function m0(e){return Kd(la,e)}const Ph=P("ZodSymbol",(e,t)=>{Bf.init(e,t),de.init(e,t)});function p0(e){return Jd(Ph,e)}const Uh=P("ZodUndefined",(e,t)=>{Rf.init(e,t),de.init(e,t)});function g0(e){return Gd(Uh,e)}const Dh=P("ZodNull",(e,t)=>{Ff.init(e,t),de.init(e,t)});function Ch(e){return Wd(Dh,e)}const Bh=P("ZodAny",(e,t)=>{Zf.init(e,t),de.init(e,t)});function y0(){return Hd(Bh)}const Rh=P("ZodUnknown",(e,t)=>{Lf.init(e,t),de.init(e,t)});function $t(){return Xd(Rh)}const Fh=P("ZodNever",(e,t)=>{Mf.init(e,t),de.init(e,t)});function fa(e){return Yd(Fh,e)}const Zh=P("ZodVoid",(e,t)=>{qf.init(e,t),de.init(e,t)});function v0(e){return Qd(Zh,e)}const da=P("ZodDate",(e,t)=>{Vf.init(e,t),de.init(e,t),e.min=(i,n)=>e.check(nt(i,n)),e.max=(i,n)=>e.check(pt(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Ie(e){return eh(da,e)}const Lh=P("ZodArray",(e,t)=>{Kf.init(e,t),de.init(e,t),e.element=t.element,e.min=(r,i)=>e.check(vn(r,i)),e.nonempty=r=>e.check(vn(1,r)),e.max=(r,i)=>e.check(Ai(r,i)),e.length=(r,i)=>e.check(zi(r,i)),e.unwrap=()=>e.element});function Ze(e,t){return uh(Lh,e,t)}function b0(e){const t=e._zod.def.shape;return yt(Object.keys(t))}const Bi=P("ZodObject",(e,t)=>{Hf.init(e,t),de.init(e,t),ye(e,"shape",()=>t.shape),e.keyof=()=>yt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:$t()}),e.loose=()=>e.clone({...e._zod.def,catchall:$t()}),e.strict=()=>e.clone({...e._zod.def,catchall:fa()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Wc(e,r),e.safeExtend=r=>Hc(e,r),e.merge=r=>Xc(e,r),e.pick=r=>Jc(e,r),e.omit=r=>Gc(e,r),e.partial=(...r)=>Yc(ga,e,r[0]),e.required=(...r)=>Qc(ya,e,r[0])});function H(e,t){const r={type:"object",shape:e??{},...V(t)};return new Bi(r)}function $0(e,t){return new Bi({type:"object",shape:e,catchall:fa(),...V(t)})}function _0(e,t){return new Bi({type:"object",shape:e,catchall:$t(),...V(t)})}const ha=P("ZodUnion",(e,t)=>{ss.init(e,t),de.init(e,t),e.options=t.options});function Ct(e,t){return new ha({type:"union",options:e,...V(t)})}const Mh=P("ZodDiscriminatedUnion",(e,t)=>{ha.init(e,t),Xf.init(e,t)});function jt(e,t,r){return new Mh({type:"union",options:t,discriminator:e,...V(r)})}const qh=P("ZodIntersection",(e,t)=>{Yf.init(e,t),de.init(e,t)});function Vh(e,t){return new qh({type:"intersection",left:e,right:t})}const Kh=P("ZodTuple",(e,t)=>{as.init(e,t),de.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Jh(e,t,r){const i=t instanceof ue,n=i?r:t,o=i?t:null;return new Kh({type:"tuple",items:e,rest:o,...V(n)})}const ma=P("ZodRecord",(e,t)=>{Qf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Le(e,t,r){return new ma({type:"record",keyType:e,valueType:t,...V(r)})}function w0(e,t,r){const i=ct(e);return i._zod.values=void 0,new ma({type:"record",keyType:i,valueType:t,...V(r)})}const Gh=P("ZodMap",(e,t)=>{ed.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function k0(e,t,r){return new Gh({type:"map",keyType:e,valueType:t,...V(r)})}const Wh=P("ZodSet",(e,t)=>{td.init(e,t),de.init(e,t),e.min=(...r)=>e.check(qn(...r)),e.nonempty=r=>e.check(qn(1,r)),e.max=(...r)=>e.check(ji(...r)),e.size=(...r)=>e.check(As(...r))});function S0(e,t){return new Wh({type:"set",valueType:e,...V(t)})}const Vn=P("ZodEnum",(e,t)=>{nd.init(e,t),de.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const s of i)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Vn({...t,checks:[],...V(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Vn({...t,checks:[],...V(n),entries:o})}});function yt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Vn({type:"enum",entries:r,...V(t)})}function I0(e,t){return new Vn({type:"enum",entries:e,...V(t)})}const Hh=P("ZodLiteral",(e,t)=>{rd.init(e,t),de.init(e,t),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 be(e,t){return new Hh({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}const Xh=P("ZodFile",(e,t)=>{id.init(e,t),de.init(e,t),e.min=(r,i)=>e.check(qn(r,i)),e.max=(r,i)=>e.check(ji(r,i)),e.mime=(r,i)=>e.check(Bs(Array.isArray(r)?r:[r],i))});function E0(e){return ch(Xh,e)}const Yh=P("ZodTransform",(e,t)=>{od.init(e,t),de.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Si(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(gn(o,r.value,t));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(gn(s))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function pa(e){return new Yh({type:"transform",transform:e})}const ga=P("ZodOptional",(e,t)=>{sd.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gi(e){return new ga({type:"optional",innerType:e})}const Qh=P("ZodNullable",(e,t)=>{ad.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yi(e){return new Qh({type:"nullable",innerType:e})}function N0(e){return gi(yi(e))}const em=P("ZodDefault",(e,t)=>{ud.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tm(e,t){return new em({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ei(t)}})}const nm=P("ZodPrefault",(e,t)=>{cd.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function rm(e,t){return new nm({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ei(t)}})}const ya=P("ZodNonOptional",(e,t)=>{ld.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function im(e,t){return new ya({type:"nonoptional",innerType:e,...V(t)})}const om=P("ZodSuccess",(e,t)=>{fd.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function O0(e){return new om({type:"success",innerType:e})}const sm=P("ZodCatch",(e,t)=>{dd.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function am(e,t){return new sm({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const um=P("ZodNaN",(e,t)=>{hd.init(e,t),de.init(e,t)});function x0(e){return nh(um,e)}const va=P("ZodPipe",(e,t)=>{md.init(e,t),de.init(e,t),e.in=t.in,e.out=t.out});function vi(e,t){return new va({type:"pipe",in:e,out:t})}const ba=P("ZodCodec",(e,t)=>{va.init(e,t),us.init(e,t)});function j0(e,t,r){return new ba({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const cm=P("ZodReadonly",(e,t)=>{pd.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function lm(e){return new cm({type:"readonly",innerType:e})}const fm=P("ZodTemplateLiteral",(e,t)=>{gd.init(e,t),de.init(e,t)});function Fn(e,t){return new fm({type:"template_literal",parts:e,...V(t)})}const dm=P("ZodLazy",(e,t)=>{bd.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.getter()});function hm(e){return new dm({type:"lazy",getter:e})}const mm=P("ZodPromise",(e,t)=>{vd.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function A0(e){return new mm({type:"promise",innerType:e})}const pm=P("ZodFunction",(e,t)=>{yd.init(e,t),de.init(e,t)});function nu(e){return new pm({type:"function",input:Array.isArray(e?.input)?Jh(e?.input):e?.input??Ze($t()),output:e?.output??$t()})}const Ri=P("ZodCustom",(e,t)=>{$d.init(e,t),de.init(e,t)});function z0(e){const t=new Pe({check:"custom"});return t._zod.check=e,t}function bn(e,t){return lh(Ri,e??(()=>!0),t)}function gm(e,t={}){return fh(Ri,e,t)}function ym(e){return dh(e)}function vm(e,t={error:`Input not instance of ${e.name}`}){const r=new Ri({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...V(t)});return r._zod.bag.Class=e,r}const T0=(...e)=>mh({Codec:ba,Boolean:Di,String:Ti},...e);function P0(e){const t=hm(()=>Ct([q(e),Ge(),Be(),Ch(),Ze(t),Le(q(),t)]));return t}function U0(e,t){return vi(pa(e),t)}const D0={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function C0(e){Ye({customError:e})}function B0(){return Ye().customError}var xo;xo||(xo={});function R0(e){return Od(Ti,e)}function F0(e){return Ud(Ui,e)}function bm(e){return Ld(Di,e)}function Z0(e){return qd(Ci,e)}function L0(e){return th(da,e)}var M0=Object.freeze({__proto__:null,bigint:Z0,boolean:bm,date:L0,number:F0,string:R0});Ye(_d());var Tt=Object.freeze({__proto__:null,$brand:Fc,$input:Ed,$output:Id,NEVER:Rc,TimePrecision:xd,ZodAny:Bh,ZodArray:Lh,ZodBase64:sa,ZodBase64URL:aa,ZodBigInt:Ci,ZodBigIntFormat:la,ZodBoolean:Di,ZodCIDRv4:ia,ZodCIDRv6:oa,ZodCUID:Xs,ZodCUID2:Ys,ZodCatch:sm,ZodCodec:ba,ZodCustom:Ri,ZodCustomStringFormat:or,ZodDate:da,ZodDefault:em,ZodDiscriminatedUnion:Mh,ZodE164:ua,ZodEmail:Gs,ZodEmoji:Ws,ZodEnum:Vn,ZodError:Dv,ZodFile:Xh,get ZodFirstPartyTypeKind(){return xo},ZodFunction:pm,ZodGUID:pi,ZodIPv4:na,ZodIPv6:ra,ZodISODate:qs,ZodISODateTime:Ms,ZodISODuration:Ks,ZodISOTime:Vs,ZodIntersection:qh,ZodIssueCode:D0,ZodJWT:ca,ZodKSUID:ta,ZodLazy:dm,ZodLiteral:Hh,ZodMap:Gh,ZodNaN:um,ZodNanoID:Hs,ZodNever:Fh,ZodNonOptional:ya,ZodNull:Dh,ZodNullable:Qh,ZodNumber:Ui,ZodNumberFormat:wn,ZodObject:Bi,ZodOptional:ga,ZodPipe:va,ZodPrefault:nm,ZodPromise:mm,ZodReadonly:cm,ZodRealError:it,ZodRecord:ma,ZodSet:Wh,ZodString:Ti,ZodStringFormat:Oe,ZodSuccess:om,ZodSymbol:Ph,ZodTemplateLiteral:fm,ZodTransform:Yh,ZodTuple:Kh,ZodType:de,ZodULID:Qs,ZodURL:Pi,ZodUUID:It,ZodUndefined:Uh,ZodUnion:ha,ZodUnknown:Rh,ZodVoid:Zh,ZodXID:ea,_ZodString:Js,_default:tm,_function:nu,any:y0,array:Ze,base64:e0,base64url:t0,bigint:d0,boolean:Be,catch:am,check:z0,cidrv4:Yv,cidrv6:Qv,clone:ct,codec:j0,coerce:M0,config:Ye,core:Pv,cuid:Kv,cuid2:$e,custom:bn,date:Ie,decode:Eh,decodeAsync:Oh,discriminatedUnion:jt,e164:n0,email:Cv,emoji:qv,encode:Ih,encodeAsync:Nh,endsWith:Cs,enum:yt,file:E0,flattenError:Zo,float32:u0,float64:c0,formatError:Lo,function:nu,getErrorMap:B0,globalRegistry:Kt,gt:Yt,gte:nt,guid:Bv,hash:a0,hex:s0,hostname:o0,httpUrl:Mv,includes:Us,instanceof:vm,int:Oo,int32:l0,int64:h0,intersection:Vh,ipv4:Hv,ipv6:Xv,iso:Uv,json:P0,jwt:r0,keyof:b0,ksuid:Wv,lazy:hm,length:zi,literal:be,locales:Sd,looseObject:_0,lowercase:Ts,lt:Xt,lte:pt,map:k0,maxLength:Ai,maxSize:ji,mime:Bs,minLength:vn,minSize:qn,multipleOf:Mn,nan:x0,nanoid:Vv,nativeEnum:I0,negative:ih,never:fa,nonnegative:sh,nonoptional:im,nonpositive:oh,normalize:Rs,null:Ch,nullable:yi,nullish:N0,number:Ge,object:H,optional:gi,overwrite:tn,parse:_h,parseAsync:wh,partialRecord:w0,pipe:vi,positive:rh,prefault:rm,preprocess:U0,prettifyError:sl,promise:A0,property:ah,readonly:lm,record:Le,refine:gm,regex:zs,regexes:Qo,registry:ls,safeDecode:jh,safeDecodeAsync:zh,safeEncode:xh,safeEncodeAsync:Ah,safeParse:kh,safeParseAsync:Sh,set:S0,setErrorMap:C0,size:As,startsWith:Ds,strictObject:$0,string:q,stringFormat:i0,stringbool:T0,success:O0,superRefine:ym,symbol:p0,templateLiteral:Fn,toJSONSchema:ph,toLowerCase:Zs,toUpperCase:Ls,transform:pa,treeifyError:il,trim:Fs,tuple:Jh,uint32:f0,uint64:m0,ulid:Jv,undefined:g0,union:Ct,unknown:$t,uppercase:Ps,url:Th,util:nl,uuid:Rv,uuidv4:Fv,uuidv6:Zv,uuidv7:Lv,void:v0,xid:Gv});function q0(e,t,r){let i=n=>e(n,...t);return r===void 0?i:Object.assign(i,{lazy:r,lazyArgs:t})}function $m(e,t,r){let i=e.length-t.length;if(i===0)return e(...t);if(i===1)return q0(e,t,r);throw Error("Wrong number of arguments")}const _m={done:!1,hasNext:!1};function ru(e,...t){let r=e,i=t.map(o=>"lazy"in o?V0(o):void 0),n=0;for(;n<t.length;){if(i[n]===void 0||!K0(r)){let u=t[n];r=u(r),n+=1;continue}let o=[];for(let u=n;u<t.length;u++){let l=i[u];if(l===void 0||(o.push(l),l.isSingle))break}let s=[];for(let u of r)if(wm(u,s,o))break;let{isSingle:a}=o.at(-1);r=a?s[0]:s,n+=o.length}return r}function wm(e,t,r){if(r.length===0)return t.push(e),!1;let i=e,n=_m,o=!1;for(let[s,a]of r.entries()){let{index:u,items:l}=a;if(l.push(i),n=a(i,u,l),a.index+=1,n.hasNext){if(n.hasMany??!1){for(let d of n.next)if(wm(d,t,r.slice(s+1)))return!0;return o}i=n.next}if(!n.hasNext)break;n.done&&(o=!0)}return n.hasNext&&t.push(i),o}function V0(e){let{lazy:t,lazyArgs:r}=e,i=t(...r);return Object.assign(i,{isSingle:t.single??!1,index:0,items:[]})}function K0(e){return typeof e=="string"||typeof e=="object"&&!!e&&Symbol.iterator in e}function J0(e,t){let r=t.length-e.length;if(r===1){let[i,...n]=t;return ru(i,{lazy:e,lazyArgs:n})}if(r===0){let i={lazy:e,lazyArgs:t};return Object.assign(n=>ru(n,i),i)}throw Error("Wrong number of arguments")}function G0(...e){return $m(Object.fromEntries,e)}function W0(...e){return $m(H0,e)}function H0(e,t){let r={};for(let[i,n]of Object.entries(e))r[i]=t(n,i,e);return r}function X0(...e){return J0(Y0,e)}function Y0(){let e=new Set;return t=>e.has(t)?_m:(e.add(t),{done:!1,hasNext:!0,next:t})}const $a=Symbol.for("yaml.alias"),jo=Symbol.for("yaml.document"),Pt=Symbol.for("yaml.map"),km=Symbol.for("yaml.pair"),_t=Symbol.for("yaml.scalar"),kn=Symbol.for("yaml.seq"),ut=Symbol.for("yaml.node.type"),nn=e=>!!e&&typeof e=="object"&&e[ut]===$a,Fi=e=>!!e&&typeof e=="object"&&e[ut]===jo,sr=e=>!!e&&typeof e=="object"&&e[ut]===Pt,Ce=e=>!!e&&typeof e=="object"&&e[ut]===km,Ee=e=>!!e&&typeof e=="object"&&e[ut]===_t,ar=e=>!!e&&typeof e=="object"&&e[ut]===kn;function Ue(e){if(e&&typeof e=="object")switch(e[ut]){case Pt:case kn:return!0}return!1}function De(e){if(e&&typeof e=="object")switch(e[ut]){case $a:case Pt:case _t:case kn:return!0}return!1}const Sm=e=>(Ee(e)||Ue(e))&&!!e.anchor,qt=Symbol("break visit"),Q0=Symbol("skip children"),Zn=Symbol("remove node");function Sn(e,t){const r=eb(t);Fi(e)?cn(null,e.contents,r,Object.freeze([e]))===Zn&&(e.contents=null):cn(null,e,r,Object.freeze([]))}Sn.BREAK=qt;Sn.SKIP=Q0;Sn.REMOVE=Zn;function cn(e,t,r,i){const n=tb(e,t,r,i);if(De(n)||Ce(n))return nb(e,i,n),cn(e,n,r,i);if(typeof n!="symbol"){if(Ue(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){const s=cn(o,t.items[o],r,i);if(typeof s=="number")o=s-1;else{if(s===qt)return qt;s===Zn&&(t.items.splice(o,1),o-=1)}}}else if(Ce(t)){i=Object.freeze(i.concat(t));const o=cn("key",t.key,r,i);if(o===qt)return qt;o===Zn&&(t.key=null);const s=cn("value",t.value,r,i);if(s===qt)return qt;s===Zn&&(t.value=null)}}return n}function eb(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function tb(e,t,r,i){if(typeof r=="function")return r(e,t,i);if(sr(t))return r.Map?.(e,t,i);if(ar(t))return r.Seq?.(e,t,i);if(Ce(t))return r.Pair?.(e,t,i);if(Ee(t))return r.Scalar?.(e,t,i);if(nn(t))return r.Alias?.(e,t,i)}function nb(e,t,r){const i=t[t.length-1];if(Ue(i))i.items[e]=r;else if(Ce(i))e==="key"?i.key=r:i.value=r;else if(Fi(i))i.contents=r;else{const n=nn(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}const rb={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ib=e=>e.replace(/[!,[\]{}]/g,t=>rb[t]);class He{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},He.defaultYaml,t),this.tags=Object.assign({},He.defaultTags,r)}clone(){const t=new He(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new He(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:He.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},He.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:He.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},He.defaultTags),this.atNextDocument=!1);const i=t.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[o,s]=i;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const s=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,s),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const s=t.slice(2,-1);return s==="!"||s==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),s)}const[,i,n]=t.match(/^(.*!)([^!]*)$/s);n||r(`The ${t} tag has no suffix`);const o=this.tags[i];if(o)try{return o+decodeURIComponent(n)}catch(s){return r(String(s)),null}return i==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[r,i]of Object.entries(this.tags))if(t.startsWith(i))return r+ib(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let n;if(t&&i.length>0&&De(t.contents)){const o={};Sn(t.contents,(s,a)=>{De(a)&&a.tag&&(o[a.tag]=!0)}),n=Object.keys(o)}else n=[];for(const[o,s]of i)o==="!!"&&s==="tag:yaml.org,2002:"||(!t||n.some(a=>a.startsWith(s)))&&r.push(`%TAG ${o} ${s}`);return r.join(`
|
|
24
|
-
`)}}He.defaultYaml={explicit:!1,version:"1.2"};He.defaultTags={"!!":"tag:yaml.org,2002:"};function Im(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function Em(e){const t=new Set;return Sn(e,{Value(r,i){i.anchor&&t.add(i.anchor)}}),t}function Nm(e,t){for(let r=1;;++r){const i=`${e}${r}`;if(!t.has(i))return i}}function ob(e,t){const r=[],i=new Map;let n=null;return{onAnchor:o=>{r.push(o),n??(n=Em(e));const s=Nm(t,n);return n.add(s),s},setAnchors:()=>{for(const o of r){const s=i.get(o);if(typeof s=="object"&&s.anchor&&(Ee(s.node)||Ue(s.node)))s.node.anchor=s.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:i}}function ln(e,t,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,o=i.length;n<o;++n){const s=i[n],a=ln(e,i,String(n),s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}else if(i instanceof Map)for(const n of Array.from(i.keys())){const o=i.get(n),s=ln(e,i,n,o);s===void 0?i.delete(n):s!==o&&i.set(n,s)}else if(i instanceof Set)for(const n of Array.from(i)){const o=ln(e,i,n,n);o===void 0?i.delete(n):o!==n&&(i.delete(n),i.add(o))}else for(const[n,o]of Object.entries(i)){const s=ln(e,i,n,o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}return e.call(t,r,i)}function at(e,t,r){if(Array.isArray(e))return e.map((i,n)=>at(i,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!Sm(e))return e.toJSON(t,r);const i={aliasCount:0,count:1,res:void 0};r.anchors.set(e,i),r.onCreate=o=>{i.res=o,delete r.onCreate};const n=e.toJSON(t,r);return r.onCreate&&r.onCreate(n),n}return typeof e=="bigint"&&!r?.keep?Number(e):e}class _a{constructor(t){Object.defineProperty(this,ut,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:o}={}){if(!Fi(t))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=at(this,"",s);if(typeof n=="function")for(const{count:u,res:l}of s.anchors.values())n(l,u);return typeof o=="function"?ln(o,{"":a},"",a):a}}class wa extends _a{constructor(t){super($a),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],Sn(t,{Node:(o,s)=>{(nn(s)||Sm(s))&&i.push(s)}}),r&&(r.aliasResolveCache=i));let n;for(const o of i){if(o===this)break;o.anchor===this.source&&(n=o)}return n}toJSON(t,r){if(!r)return{source:this.source};const{anchors:i,doc:n,maxAliasCount:o}=r,s=this.resolve(n,r);if(!s){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let a=i.get(s);if(a||(at(s,null,r),a=i.get(s)),!a||a.res===void 0){const u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=si(n,s,i)),a.count*a.aliasCount>o)){const u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return a.res}toString(t,r,i){const n=`*${this.source}`;if(t){if(Im(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${n} `}return n}}function si(e,t,r){if(nn(t)){const i=t.resolve(e),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(Ue(t)){let i=0;for(const n of t.items){const o=si(e,n,r);o>i&&(i=o)}return i}else if(Ce(t)){const i=si(e,t.key,r),n=si(e,t.value,r);return Math.max(i,n)}return 1}const Om=e=>!e||typeof e!="function"&&typeof e!="object";class fe extends _a{constructor(t){super(_t),this.value=t}toJSON(t,r){return r?.keep?this.value:at(this.value,t,r)}toString(){return String(this.value)}}fe.BLOCK_FOLDED="BLOCK_FOLDED";fe.BLOCK_LITERAL="BLOCK_LITERAL";fe.PLAIN="PLAIN";fe.QUOTE_DOUBLE="QUOTE_DOUBLE";fe.QUOTE_SINGLE="QUOTE_SINGLE";const sb="tag:yaml.org,2002:";function ab(e,t,r){if(t){const i=r.filter(o=>o.tag===t),n=i.find(o=>!o.format)??i[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(i=>i.identify?.(e)&&!i.format)}function Kn(e,t,r){if(Fi(e)&&(e=e.contents),De(e))return e;if(Ce(e)){const h=r.schema[Pt].createNode?.(r.schema,null,r);return h.items.push(e),h}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:i,onAnchor:n,onTagObj:o,schema:s,sourceObjects:a}=r;let u;if(i&&e&&typeof e=="object"){if(u=a.get(e),u)return u.anchor??(u.anchor=n(e)),new wa(u.anchor);u={anchor:null,node:null},a.set(e,u)}t?.startsWith("!!")&&(t=sb+t.slice(2));let l=ab(e,t,s.tags);if(!l){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const h=new fe(e);return u&&(u.node=h),h}l=e instanceof Map?s[Pt]:Symbol.iterator in Object(e)?s[kn]:s[Pt]}o&&(o(l),delete r.onTagObj);const d=l?.createNode?l.createNode(r.schema,e,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,e,r):new fe(e);return t?d.tag=t:l.default||(d.tag=l.tag),u&&(u.node=d),d}function bi(e,t,r){let i=r;for(let n=t.length-1;n>=0;--n){const o=t[n];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const s=[];s[o]=i,i=s}else i=new Map([[o,i]])}return Kn(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Bn=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class xm extends _a{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(i=>De(i)||Ce(i)?i.clone(t):i),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(Bn(t))this.add(r);else{const[i,...n]=t,o=this.get(i,!0);if(Ue(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,bi(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(t){const[r,...i]=t;if(i.length===0)return this.delete(r);const n=this.get(r,!0);if(Ue(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(t,r){const[i,...n]=t,o=this.get(i,!0);return n.length===0?!r&&Ee(o)?o.value:o:Ue(o)?o.getIn(n,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!Ce(r))return!1;const i=r.value;return i==null||t&&Ee(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){const[r,...i]=t;if(i.length===0)return this.has(r);const n=this.get(r,!0);return Ue(n)?n.hasIn(i):!1}setIn(t,r){const[i,...n]=t;if(n.length===0)this.set(i,r);else{const o=this.get(i,!0);if(Ue(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,bi(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}}const ub=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Et(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Jt=(e,t,r)=>e.endsWith(`
|
|
25
|
-
`)?Et(r,t):r.includes(`
|
|
26
|
-
`)?`
|
|
27
|
-
`+Et(r,t):(e.endsWith(" ")?"":" ")+r,jm="flow",Ao="block",ai="quoted";function Zi(e,t,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!n||n<0)return e;n<o&&(o=0);const u=Math.max(1+o,1+n-t.length);if(e.length<=u)return e;const l=[],d={};let h=n-t.length;typeof i=="number"&&(i>n-Math.max(2,o)?l.push(0):h=n-i);let m,g,p=!1,v=-1,y=-1,w=-1;r===Ao&&(v=iu(e,v,t.length),v!==-1&&(h=v+u));for(let _;_=e[v+=1];){if(r===ai&&_==="\\"){switch(y=v,e[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}w=v}if(_===`
|
|
28
|
-
`)r===Ao&&(v=iu(e,v,t.length)),h=v+t.length+u,m=void 0;else{if(_===" "&&g&&g!==" "&&g!==`
|
|
29
|
-
`&&g!==" "){const I=e[v+1];I&&I!==" "&&I!==`
|
|
30
|
-
`&&I!==" "&&(m=v)}if(v>=h)if(m)l.push(m),h=m+u,m=void 0;else if(r===ai){for(;g===" "||g===" ";)g=_,_=e[v+=1],p=!0;const I=v>w+1?v-2:y-1;if(d[I])return e;l.push(I),d[I]=!0,h=I+u,m=void 0}else p=!0}g=_}if(p&&a&&a(),l.length===0)return e;s&&s();let b=e.slice(0,l[0]);for(let _=0;_<l.length;++_){const I=l[_],$=l[_+1]||e.length;I===0?b=`
|
|
31
|
-
${t}${e.slice(0,$)}`:(r===ai&&d[I]&&(b+=`${e[I]}\\`),b+=`
|
|
32
|
-
${t}${e.slice(I+1,$)}`)}return b}function iu(e,t,r){let i=t,n=t+1,o=e[n];for(;o===" "||o===" ";)if(t<n+r)o=e[++t];else{do o=e[++t];while(o&&o!==`
|
|
33
|
-
`);i=t,n=t+1,o=e[n]}return i}const Li=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Mi=e=>/^(%|---|\.\.\.)/m.test(e);function cb(e,t,r){if(!t||t<0)return!1;const i=t-r,n=e.length;if(n<=i)return!1;for(let o=0,s=0;o<n;++o)if(e[o]===`
|
|
34
|
-
`){if(o-s>i)return!0;if(s=o+1,n-s<=i)return!1}return!0}function Ln(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:i}=t,n=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Mi(e)?" ":"");let s="",a=0;for(let u=0,l=r[u];l;l=r[++u])if(l===" "&&r[u+1]==="\\"&&r[u+2]==="n"&&(s+=r.slice(a,u)+"\\ ",u+=1,a=u,l="\\"),l==="\\")switch(r[u+1]){case"u":{s+=r.slice(a,u);const d=r.substr(u+2,4);switch(d){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:d.substr(0,2)==="00"?s+="\\x"+d.substr(2):s+=r.substr(u,6)}u+=5,a=u+1}break;case"n":if(i||r[u+2]==='"'||r.length<n)u+=1;else{for(s+=r.slice(a,u)+`
|
|
35
|
-
|
|
36
|
-
`;r[u+2]==="\\"&&r[u+3]==="n"&&r[u+4]!=='"';)s+=`
|
|
37
|
-
`,u+=2;s+=o,r[u+2]===" "&&(s+="\\"),u+=1,a=u+1}break;default:u+=1}return s=a?s+r.slice(a):r,i?s:Zi(s,o,ai,Li(t,!1))}function zo(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
38
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return Ln(e,t);const r=t.indent||(Mi(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
39
|
-
${r}`)+"'";return t.implicitKey?i:Zi(i,r,jm,Li(t,!1))}function fn(e,t){const{singleQuote:r}=t.options;let i;if(r===!1)i=Ln;else{const n=e.includes('"'),o=e.includes("'");n&&!o?i=zo:o&&!n?i=Ln:i=r?zo:Ln}return i(e,t)}let To;try{To=new RegExp(`(^|(?<!
|
|
40
|
-
))
|
|
41
|
-
+(?!
|
|
42
|
-
|$)`,"g")}catch{To=/\n+(?!\n|$)/g}function ui({comment:e,type:t,value:r},i,n,o){const{blockQuote:s,commentString:a,lineWidth:u}=i.options;if(!s||/\n[\t ]+$/.test(r))return fn(r,i);const l=i.indent||(i.forceBlockIndent||Mi(r)?" ":""),d=s==="literal"?!0:s==="folded"||t===fe.BLOCK_FOLDED?!1:t===fe.BLOCK_LITERAL?!0:!cb(r,u,l.length);if(!r)return d?`|
|
|
43
|
-
`:`>
|
|
44
|
-
`;let h,m;for(m=r.length;m>0;--m){const $=r[m-1];if($!==`
|
|
45
|
-
`&&$!==" "&&$!==" ")break}let g=r.substring(m);const p=g.indexOf(`
|
|
46
|
-
`);p===-1?h="-":r===g||p!==g.length-1?(h="+",o&&o()):h="",g&&(r=r.slice(0,-g.length),g[g.length-1]===`
|
|
47
|
-
`&&(g=g.slice(0,-1)),g=g.replace(To,`$&${l}`));let v=!1,y,w=-1;for(y=0;y<r.length;++y){const $=r[y];if($===" ")v=!0;else if($===`
|
|
48
|
-
`)w=y;else break}let b=r.substring(0,w<y?w+1:y);b&&(r=r.substring(b.length),b=b.replace(/\n+/g,`$&${l}`));let I=(v?l?"2":"1":"")+h;if(e&&(I+=" "+a(e.replace(/ ?[\r\n]+/g," ")),n&&n()),!d){const $=r.replace(/\n+/g,`
|
|
49
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`);let E=!1;const O=Li(i,!0);s!=="folded"&&t!==fe.BLOCK_FOLDED&&(O.onOverflow=()=>{E=!0});const j=Zi(`${b}${$}${g}`,l,Ao,O);if(!E)return`>${I}
|
|
50
|
-
${l}${j}`}return r=r.replace(/\n+/g,`$&${l}`),`|${I}
|
|
51
|
-
${l}${b}${r}${g}`}function lb(e,t,r,i){const{type:n,value:o}=e,{actualString:s,implicitKey:a,indent:u,indentStep:l,inFlow:d}=t;if(a&&o.includes(`
|
|
52
|
-
`)||d&&/[[\]{},]/.test(o))return fn(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||d||!o.includes(`
|
|
53
|
-
`)?fn(o,t):ui(e,t,r,i);if(!a&&!d&&n!==fe.PLAIN&&o.includes(`
|
|
54
|
-
`))return ui(e,t,r,i);if(Mi(o)){if(u==="")return t.forceBlockIndent=!0,ui(e,t,r,i);if(a&&u===l)return fn(o,t)}const h=o.replace(/\n+/g,`$&
|
|
55
|
-
${u}`);if(s){const m=v=>v.default&&v.tag!=="tag:yaml.org,2002:str"&&v.test?.test(h),{compat:g,tags:p}=t.doc.schema;if(p.some(m)||g?.some(m))return fn(o,t)}return a?h:Zi(h,u,jm,Li(t,!1))}function ka(e,t,r,i){const{implicitKey:n,inFlow:o}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==fe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=fe.QUOTE_DOUBLE);const u=d=>{switch(d){case fe.BLOCK_FOLDED:case fe.BLOCK_LITERAL:return n||o?fn(s.value,t):ui(s,t,r,i);case fe.QUOTE_DOUBLE:return Ln(s.value,t);case fe.QUOTE_SINGLE:return zo(s.value,t);case fe.PLAIN:return lb(s,t,r,i);default:return null}};let l=u(a);if(l===null){const{defaultKeyType:d,defaultStringType:h}=t.options,m=n&&d||h;if(l=u(m),l===null)throw new Error(`Unsupported default string type ${m}`)}return l}function Am(e,t){const r=Object.assign({blockQuote:!0,commentString:ub,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function fb(e,t){if(t.tag){const n=e.filter(o=>o.tag===t.tag);if(n.length>0)return n.find(o=>o.format===t.format)??n[0]}let r,i;if(Ee(t)){i=t.value;let n=e.filter(o=>o.identify?.(i));if(n.length>1){const o=n.filter(s=>s.test);o.length>0&&(n=o)}r=n.find(o=>o.format===t.format)??n.find(o=>!o.format)}else i=t,r=e.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){const n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function db(e,t,{anchors:r,doc:i}){if(!i.directives)return"";const n=[],o=(Ee(e)||Ue(e))&&e.anchor;o&&Im(o)&&(r.add(o),n.push(`&${o}`));const s=e.tag??(t.default?null:t.tag);return s&&n.push(i.directives.tagString(s)),n.join(" ")}function $n(e,t,r,i){if(Ce(e))return e.toString(t,r,i);if(nn(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let n;const o=De(e)?e:t.doc.createNode(e,{onTagObj:u=>n=u});n??(n=fb(t.doc.schema.tags,o));const s=db(o,n,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const a=typeof n.stringify=="function"?n.stringify(o,t,r,i):Ee(o)?ka(o,t,r,i):o.toString(t,r,i);return s?Ee(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
|
|
56
|
-
${t.indent}${a}`:a}function hb({key:e,value:t},r,i,n){const{allNullValues:o,doc:s,indent:a,indentStep:u,options:{commentString:l,indentSeq:d,simpleKeys:h}}=r;let m=De(e)&&e.comment||null;if(h){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(Ue(e)||!De(e)&&typeof e=="object"){const O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let g=!h&&(!e||m&&t==null&&!r.inFlow||Ue(e)||(Ee(e)?e.type===fe.BLOCK_FOLDED||e.type===fe.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!g&&(h||!o),indent:a+u});let p=!1,v=!1,y=$n(e,r,()=>p=!0,()=>v=!0);if(!g&&!r.inFlow&&y.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(r.inFlow){if(o||t==null)return p&&i&&i(),y===""?"?":g?`? ${y}`:y}else if(o&&!h||t==null&&g)return y=`? ${y}`,m&&!p?y+=Jt(y,r.indent,l(m)):v&&n&&n(),y;p&&(m=null),g?(m&&(y+=Jt(y,r.indent,l(m))),y=`? ${y}
|
|
57
|
-
${a}:`):(y=`${y}:`,m&&(y+=Jt(y,r.indent,l(m))));let w,b,_;De(t)?(w=!!t.spaceBefore,b=t.commentBefore,_=t.comment):(w=!1,b=null,_=null,t&&typeof t=="object"&&(t=s.createNode(t))),r.implicitKey=!1,!g&&!m&&Ee(t)&&(r.indentAtStart=y.length+1),v=!1,!d&&u.length>=2&&!r.inFlow&&!g&&ar(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let I=!1;const $=$n(t,r,()=>I=!0,()=>v=!0);let E=" ";if(m||w||b){if(E=w?`
|
|
58
|
-
`:"",b){const O=l(b);E+=`
|
|
59
|
-
${Et(O,r.indent)}`}$===""&&!r.inFlow?E===`
|
|
60
|
-
`&&(E=`
|
|
61
|
-
|
|
62
|
-
`):E+=`
|
|
63
|
-
${r.indent}`}else if(!g&&Ue(t)){const O=$[0],j=$.indexOf(`
|
|
64
|
-
`),Z=j!==-1,W=r.inFlow??t.flow??t.items.length===0;if(Z||!W){let X=!1;if(Z&&(O==="&"||O==="!")){let Q=$.indexOf(" ");O==="&"&&Q!==-1&&Q<j&&$[Q+1]==="!"&&(Q=$.indexOf(" ",Q+1)),(Q===-1||j<Q)&&(X=!0)}X||(E=`
|
|
65
|
-
${r.indent}`)}}else($===""||$[0]===`
|
|
66
|
-
`)&&(E="");return y+=E+$,r.inFlow?I&&i&&i():_&&!I?y+=Jt(y,r.indent,l(_)):v&&n&&n(),y}function zm(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const mr="<<",Nt={identify:e=>e===mr||typeof e=="symbol"&&e.description===mr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new fe(Symbol(mr)),{addToJSMap:Tm}),stringify:()=>mr},mb=(e,t)=>(Nt.identify(t)||Ee(t)&&(!t.type||t.type===fe.PLAIN)&&Nt.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===Nt.tag&&r.default);function Tm(e,t,r){if(r=e&&nn(r)?r.resolve(e.doc):r,ar(r))for(const i of r.items)to(e,t,i);else if(Array.isArray(r))for(const i of r)to(e,t,i);else to(e,t,r)}function to(e,t,r){const i=e&&nn(r)?r.resolve(e.doc):r;if(!sr(i))throw new Error("Merge sources must be maps or map aliases");const n=i.toJSON(null,e,Map);for(const[o,s]of n)t instanceof Map?t.has(o)||t.set(o,s):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function Pm(e,t,{key:r,value:i}){if(De(r)&&r.addToJSMap)r.addToJSMap(e,t,i);else if(mb(e,r))Tm(e,t,i);else{const n=at(r,"",e);if(t instanceof Map)t.set(n,at(i,n,e));else if(t instanceof Set)t.add(n);else{const o=pb(r,n,e),s=at(i,o,e);o in t?Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[o]=s}}return t}function pb(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(De(e)&&r?.doc){const i=Am(r.doc,{});i.anchors=new Set;for(const o of r.anchors.keys())i.anchors.add(o.anchor);i.inFlow=!0,i.inStringifyKey=!0;const n=e.toString(i);if(!r.mapKeyWarned){let o=JSON.stringify(n);o.length>40&&(o=o.substring(0,36)+'..."'),zm(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}function Sa(e,t,r){const i=Kn(e,void 0,r),n=Kn(t,void 0,r);return new Xe(i,n)}class Xe{constructor(t,r=null){Object.defineProperty(this,ut,{value:km}),this.key=t,this.value=r}clone(t){let{key:r,value:i}=this;return De(r)&&(r=r.clone(t)),De(i)&&(i=i.clone(t)),new Xe(r,i)}toJSON(t,r){const i=r?.mapAsMap?new Map:{};return Pm(r,i,this)}toString(t,r,i){return t?.doc?hb(this,t,r,i):JSON.stringify(this)}}function Um(e,t,r){return(t.inFlow??e.flow?yb:gb)(e,t,r)}function gb({comment:e,items:t},r,{blockItemPrefix:i,flowChars:n,itemIndent:o,onChompKeep:s,onComment:a}){const{indent:u,options:{commentString:l}}=r,d=Object.assign({},r,{indent:o,type:null});let h=!1;const m=[];for(let p=0;p<t.length;++p){const v=t[p];let y=null;if(De(v))!h&&v.spaceBefore&&m.push(""),$i(r,m,v.commentBefore,h),v.comment&&(y=v.comment);else if(Ce(v)){const b=De(v.key)?v.key:null;b&&(!h&&b.spaceBefore&&m.push(""),$i(r,m,b.commentBefore,h))}h=!1;let w=$n(v,d,()=>y=null,()=>h=!0);y&&(w+=Jt(w,o,l(y))),h&&y&&(h=!1),m.push(i+w)}let g;if(m.length===0)g=n.start+n.end;else{g=m[0];for(let p=1;p<m.length;++p){const v=m[p];g+=v?`
|
|
67
|
-
${u}${v}`:`
|
|
68
|
-
`}}return e?(g+=`
|
|
69
|
-
`+Et(l(e),u),a&&a()):h&&s&&s(),g}function yb({items:e},t,{flowChars:r,itemIndent:i}){const{indent:n,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t;i+=o;const u=Object.assign({},t,{indent:i,inFlow:!0,type:null});let l=!1,d=0;const h=[];for(let p=0;p<e.length;++p){const v=e[p];let y=null;if(De(v))v.spaceBefore&&h.push(""),$i(t,h,v.commentBefore,!1),v.comment&&(y=v.comment);else if(Ce(v)){const b=De(v.key)?v.key:null;b&&(b.spaceBefore&&h.push(""),$i(t,h,b.commentBefore,!1),b.comment&&(l=!0));const _=De(v.value)?v.value:null;_?(_.comment&&(y=_.comment),_.commentBefore&&(l=!0)):v.value==null&&b?.comment&&(y=b.comment)}y&&(l=!0);let w=$n(v,u,()=>y=null);p<e.length-1&&(w+=","),y&&(w+=Jt(w,i,a(y))),!l&&(h.length>d||w.includes(`
|
|
70
|
-
`))&&(l=!0),h.push(w),d=h.length}const{start:m,end:g}=r;if(h.length===0)return m+g;if(!l){const p=h.reduce((v,y)=>v+y.length+2,2);l=t.options.lineWidth>0&&p>t.options.lineWidth}if(l){let p=m;for(const v of h)p+=v?`
|
|
71
|
-
${o}${n}${v}`:`
|
|
72
|
-
`;return`${p}
|
|
73
|
-
${n}${g}`}else return`${m}${s}${h.join(" ")}${s}${g}`}function $i({indent:e,options:{commentString:t}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){const o=Et(t(i),e);r.push(o.trimStart())}}function Gt(e,t){const r=Ee(t)?t.value:t;for(const i of e)if(Ce(i)&&(i.key===t||i.key===r||Ee(i.key)&&i.key.value===r))return i}class st extends xm{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Pt,t),this.items=[]}static from(t,r,i){const{keepUndefined:n,replacer:o}=i,s=new this(t),a=(u,l)=>{if(typeof o=="function")l=o.call(r,u,l);else if(Array.isArray(o)&&!o.includes(u))return;(l!==void 0||n)&&s.items.push(Sa(u,l,i))};if(r instanceof Map)for(const[u,l]of r)a(u,l);else if(r&&typeof r=="object")for(const u of Object.keys(r))a(u,r[u]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}add(t,r){let i;Ce(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new Xe(t,t?.value):i=new Xe(t.key,t.value);const n=Gt(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);Ee(n.value)&&Om(i.value)?n.value.value=i.value:n.value=i.value}else if(o){const s=this.items.findIndex(a=>o(i,a)<0);s===-1?this.items.push(i):this.items.splice(s,0,i)}else this.items.push(i)}delete(t){const r=Gt(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){const n=Gt(this.items,t)?.value;return(!r&&Ee(n)?n.value:n)??void 0}has(t){return!!Gt(this.items,t)}set(t,r){this.add(new Xe(t,r),!0)}toJSON(t,r,i){const n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(const o of this.items)Pm(r,n,o);return n}toString(t,r,i){if(!t)return JSON.stringify(this);for(const n of this.items)if(!Ce(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Um(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:r})}}const In={collection:"map",default:!0,nodeClass:st,tag:"tag:yaml.org,2002:map",resolve(e,t){return sr(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>st.from(e,t,r)};class Qt extends xm{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(kn,t),this.items=[]}add(t){this.items.push(t)}delete(t){const r=pr(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){const i=pr(t);if(typeof i!="number")return;const n=this.items[i];return!r&&Ee(n)?n.value:n}has(t){const r=pr(t);return typeof r=="number"&&r<this.items.length}set(t,r){const i=pr(t);if(typeof i!="number")throw new Error(`Expected a valid index, not ${t}.`);const n=this.items[i];Ee(n)&&Om(r)?n.value=r:this.items[i]=r}toJSON(t,r){const i=[];r?.onCreate&&r.onCreate(i);let n=0;for(const o of this.items)i.push(at(o,String(n++),r));return i}toString(t,r,i){return t?Um(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(t,r,i){const{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r)){let s=0;for(let a of r){if(typeof n=="function"){const u=r instanceof Set?a:String(s++);a=n.call(r,u,a)}o.items.push(Kn(a,void 0,i))}}return o}}function pr(e){let t=Ee(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const En={collection:"seq",default:!0,nodeClass:Qt,tag:"tag:yaml.org,2002:seq",resolve(e,t){return ar(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>Qt.from(e,t,r)},qi={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),ka(e,t,r,i)}},Vi={identify:e=>e==null,createNode:()=>new fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new fe(null),stringify:({source:e},t)=>typeof e=="string"&&Vi.test.test(e)?e:t.options.nullStr},Ia={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new fe(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Ia.test.test(e)){const i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?r.options.trueStr:r.options.falseStr}};function vt({format:e,minFractionDigits:t,tag:r,value:i}){if(typeof i=="bigint")return String(i);const n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let o=JSON.stringify(i);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let s=o.indexOf(".");s<0&&(s=o.length,o+=".");let a=t-(o.length-s-1);for(;a-- >0;)o+="0"}return o}const Dm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:vt},Cm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():vt(e)}},Bm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new fe(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:vt},Ki=e=>typeof e=="bigint"||Number.isInteger(e),Ea=(e,t,r,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),r);function Rm(e,t,r){const{value:i}=e;return Ki(i)&&i>=0?r+i.toString(t):vt(e)}const Fm={identify:e=>Ki(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ea(e,2,8,r),stringify:e=>Rm(e,8,"0o")},Zm={identify:Ki,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ea(e,0,10,r),stringify:vt},Lm={identify:e=>Ki(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ea(e,2,16,r),stringify:e=>Rm(e,16,"0x")},vb=[In,En,qi,Vi,Ia,Fm,Zm,Lm,Dm,Cm,Bm];function ou(e){return typeof e=="bigint"||Number.isInteger(e)}const gr=({value:e})=>JSON.stringify(e),bb=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:gr},{identify:e=>e==null,createNode:()=>new fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:gr},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:gr},{identify:ou,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>ou(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:gr}],$b={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},_b=[In,En].concat(bb,$b),Na={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const r=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},i,n,o){if(!r)return"";const s=r;let a;if(typeof btoa=="function"){let u="";for(let l=0;l<s.length;++l)u+=String.fromCharCode(s[l]);a=btoa(u)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=fe.BLOCK_LITERAL),t!==fe.QUOTE_DOUBLE){const u=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(a.length/u),d=new Array(l);for(let h=0,m=0;h<l;++h,m+=u)d[h]=a.substr(m,u);a=d.join(t===fe.BLOCK_LITERAL?`
|
|
74
|
-
`:" ")}return ka({comment:e,type:t,value:a},i,n,o)}};function Mm(e,t){if(ar(e))for(let r=0;r<e.items.length;++r){let i=e.items[r];if(!Ce(i)){if(sr(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");const n=i.items[0]||new Xe(new fe(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
75
|
-
${n.key.commentBefore}`:i.commentBefore),i.comment){const o=n.value??n.key;o.comment=o.comment?`${i.comment}
|
|
76
|
-
${o.comment}`:i.comment}i=n}e.items[r]=Ce(i)?i:new Xe(i)}}else t("Expected a sequence for this tag");return e}function qm(e,t,r){const{replacer:i}=r,n=new Qt(e);n.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof i=="function"&&(s=i.call(t,String(o++),s));let a,u;if(Array.isArray(s))if(s.length===2)a=s[0],u=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const l=Object.keys(s);if(l.length===1)a=l[0],u=s[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=s;n.items.push(Sa(a,u,r))}return n}const Oa={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Mm,createNode:qm};class dn extends Qt{constructor(){super(),this.add=st.prototype.add.bind(this),this.delete=st.prototype.delete.bind(this),this.get=st.prototype.get.bind(this),this.has=st.prototype.has.bind(this),this.set=st.prototype.set.bind(this),this.tag=dn.tag}toJSON(t,r){if(!r)return super.toJSON(t);const i=new Map;r?.onCreate&&r.onCreate(i);for(const n of this.items){let o,s;if(Ce(n)?(o=at(n.key,"",r),s=at(n.value,o,r)):o=at(n,"",r),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(t,r,i){const n=qm(t,r,i),o=new this;return o.items=n.items,o}}dn.tag="tag:yaml.org,2002:omap";const xa={collection:"seq",identify:e=>e instanceof Map,nodeClass:dn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=Mm(e,t),i=[];for(const{key:n}of r.items)Ee(n)&&(i.includes(n.value)?t(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new dn,r)},createNode:(e,t,r)=>dn.from(e,t,r)};function Vm({value:e,source:t},r){return t&&(e?Km:Jm).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const Km={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new fe(!0),stringify:Vm},Jm={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new fe(!1),stringify:Vm},wb={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:vt},kb={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():vt(e)}},Sb={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new fe(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){const i=e.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:vt},ur=e=>typeof e=="bigint"||Number.isInteger(e);function Ji(e,t,r,{intAsBigInt:i}){const n=e[0];if((n==="-"||n==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const s=BigInt(e);return n==="-"?BigInt(-1)*s:s}const o=parseInt(e,r);return n==="-"?-1*o:o}function ja(e,t,r){const{value:i}=e;if(ur(i)){const n=i.toString(t);return i<0?"-"+r+n.substr(1):r+n}return vt(e)}const Ib={identify:ur,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Ji(e,2,2,r),stringify:e=>ja(e,2,"0b")},Eb={identify:ur,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Ji(e,1,8,r),stringify:e=>ja(e,8,"0")},Nb={identify:ur,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Ji(e,0,10,r),stringify:vt},Ob={identify:ur,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Ji(e,2,16,r),stringify:e=>ja(e,16,"0x")};class hn extends st{constructor(t){super(t),this.tag=hn.tag}add(t){let r;Ce(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new Xe(t.key,null):r=new Xe(t,null),Gt(this.items,r.key)||this.items.push(r)}get(t,r){const i=Gt(this.items,t);return!r&&Ce(i)?Ee(i.key)?i.key.value:i.key:i}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const i=Gt(this.items,t);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new Xe(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(t,r,i){const{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r))for(let s of r)typeof n=="function"&&(s=n.call(r,s,s)),o.items.push(Sa(s,null,i));return o}}hn.tag="tag:yaml.org,2002:set";const Aa={collection:"map",identify:e=>e instanceof Set,nodeClass:hn,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>hn.from(e,t,r),resolve(e,t){if(sr(e)){if(e.hasAllNullValues(!0))return Object.assign(new hn,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function za(e,t){const r=e[0],i=r==="-"||r==="+"?e.substring(1):e,n=s=>t?BigInt(s):Number(s),o=i.replace(/_/g,"").split(":").reduce((s,a)=>s*n(60)+n(a),n(0));return r==="-"?n(-1)*o:o}function Gm(e){let{value:t}=e,r=s=>s;if(typeof t=="bigint")r=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return vt(e);let i="";t<0&&(i="-",t*=r(-1));const n=r(60),o=[t%n];return t<60?o.unshift(0):(t=(t-o[0])/n,o.unshift(t%n),t>=60&&(t=(t-o[0])/n,o.unshift(t))),i+o.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Wm={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>za(e,r),stringify:Gm},Hm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>za(e,!1),stringify:Gm},Gi={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Gi.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,i,n,o,s,a]=t.map(Number),u=t[7]?Number((t[7]+"00").substr(1,3)):0;let l=Date.UTC(r,i-1,n,o||0,s||0,a||0,u);const d=t[8];if(d&&d!=="Z"){let h=za(d,!1);Math.abs(h)<30&&(h*=60),l-=6e4*h}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},su=[In,En,qi,Vi,Km,Jm,Ib,Eb,Nb,Ob,wb,kb,Sb,Na,Nt,xa,Oa,Aa,Wm,Hm,Gi],au=new Map([["core",vb],["failsafe",[In,En,qi]],["json",_b],["yaml11",su],["yaml-1.1",su]]),uu={binary:Na,bool:Ia,float:Bm,floatExp:Cm,floatNaN:Dm,floatTime:Hm,int:Zm,intHex:Lm,intOct:Fm,intTime:Wm,map:In,merge:Nt,null:Vi,omap:xa,pairs:Oa,seq:En,set:Aa,timestamp:Gi},xb={"tag:yaml.org,2002:binary":Na,"tag:yaml.org,2002:merge":Nt,"tag:yaml.org,2002:omap":xa,"tag:yaml.org,2002:pairs":Oa,"tag:yaml.org,2002:set":Aa,"tag:yaml.org,2002:timestamp":Gi};function no(e,t,r){const i=au.get(t);if(i&&!e)return r&&!i.includes(Nt)?i.concat(Nt):i.slice();let n=i;if(!n)if(Array.isArray(e))n=[];else{const o=Array.from(au.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)n=n.concat(o);else typeof e=="function"&&(n=e(n.slice()));return r&&(n=n.concat(Nt)),n.reduce((o,s)=>{const a=typeof s=="string"?uu[s]:s;if(!a){const u=JSON.stringify(s),l=Object.keys(uu).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${u}; use one of ${l}`)}return o.includes(a)||o.push(a),o},[])}const jb=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Ta{constructor({compat:t,customTags:r,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(t)?no(t,"compat"):t?no(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=n?xb:{},this.tags=no(r,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,Pt,{value:In}),Object.defineProperty(this,_t,{value:qi}),Object.defineProperty(this,kn,{value:En}),this.sortMapEntries=typeof s=="function"?s:s===!0?jb:null}clone(){const t=Object.create(Ta.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function Ab(e,t){const r=[];let i=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(r.push(u),i=!0):e.directives.docStart&&(i=!0)}i&&r.push("---");const n=Am(e,t),{commentString:o}=n.options;if(e.commentBefore){r.length!==1&&r.unshift("");const u=o(e.commentBefore);r.unshift(Et(u,""))}let s=!1,a=null;if(e.contents){if(De(e.contents)){if(e.contents.spaceBefore&&i&&r.push(""),e.contents.commentBefore){const d=o(e.contents.commentBefore);r.push(Et(d,""))}n.forceBlockIndent=!!e.comment,a=e.contents.comment}const u=a?void 0:()=>s=!0;let l=$n(e.contents,n,()=>a=null,u);a&&(l+=Jt(l,"",o(a))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push($n(e.contents,n));if(e.directives?.docEnd)if(e.comment){const u=o(e.comment);u.includes(`
|
|
77
|
-
`)?(r.push("..."),r.push(Et(u,""))):r.push(`... ${u}`)}else r.push("...");else{let u=e.comment;u&&s&&(u=u.replace(/^\n+/,"")),u&&((!s||a)&&r[r.length-1]!==""&&r.push(""),r.push(Et(o(u),"")))}return r.join(`
|
|
78
|
-
`)+`
|
|
79
|
-
`}class Wi{constructor(t,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ut,{value:jo});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:s}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new He({version:s}),this.setSchema(s,i),this.contents=t===void 0?null:this.createNode(t,n,i)}clone(){const t=Object.create(Wi.prototype,{[ut]:{value:jo}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=De(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){rn(this.contents)&&this.contents.add(t)}addIn(t,r){rn(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){const i=Em(this);t.anchor=!r||i.has(r)?Nm(r||"a",i):r}return new wa(t.anchor)}createNode(t,r,i){let n;if(typeof r=="function")t=r.call({"":t},"",t),n=r;else if(Array.isArray(r)){const y=b=>typeof b=="number"||b instanceof String||b instanceof Number,w=r.filter(y).map(String);w.length>0&&(r=r.concat(w)),n=r}else i===void 0&&r&&(i=r,r=void 0);const{aliasDuplicateObjects:o,anchorPrefix:s,flow:a,keepUndefined:u,onTagObj:l,tag:d}=i??{},{onAnchor:h,setAnchors:m,sourceObjects:g}=ob(this,s||"a"),p={aliasDuplicateObjects:o??!0,keepUndefined:u??!1,onAnchor:h,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:g},v=Kn(t,d,p);return a&&Ue(v)&&(v.flow=!0),m(),v}createPair(t,r,i={}){const n=this.createNode(t,null,i),o=this.createNode(r,null,i);return new Xe(n,o)}delete(t){return rn(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Bn(t)?this.contents==null?!1:(this.contents=null,!0):rn(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Ue(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return Bn(t)?!r&&Ee(this.contents)?this.contents.value:this.contents:Ue(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Ue(this.contents)?this.contents.has(t):!1}hasIn(t){return Bn(t)?this.contents!==void 0:Ue(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=bi(this.schema,[t],r):rn(this.contents)&&this.contents.set(t,r)}setIn(t,r){Bn(t)?this.contents=r:this.contents==null?this.contents=bi(this.schema,Array.from(t),r):rn(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new He({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new He({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const n=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new Ta(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},u=at(this.contents,r??"",a);if(typeof o=="function")for(const{count:l,res:d}of a.anchors.values())o(d,l);return typeof s=="function"?ln(s,{"":u},"",u):u}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Ab(this,t)}}function rn(e){if(Ue(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Xm extends Error{constructor(t,r,i,n){super(),this.name=t,this.code=i,this.message=n,this.pos=r}}class Rn extends Xm{constructor(t,r,i){super("YAMLParseError",t,r,i)}}class zb extends Xm{constructor(t,r,i){super("YAMLWarning",t,r,i)}}const cu=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(a=>t.linePos(a));const{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let o=n-1,s=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){const a=Math.min(o-39,s.length-79);s="…"+s.substring(a),o-=a-1}if(s.length>80&&(s=s.substring(0,79)+"…"),i>1&&/^ *$/.test(s.substring(0,o))){let a=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`…
|
|
80
|
-
`),s=a+s}if(/[^ ]/.test(s)){let a=1;const u=r.linePos[1];u&&u.line===i&&u.col>n&&(a=Math.max(1,Math.min(u.col-n,80-o)));const l=" ".repeat(o)+"^".repeat(a);r.message+=`:
|
|
81
|
-
|
|
82
|
-
${s}
|
|
83
|
-
${l}
|
|
84
|
-
`}};function _n(e,{flow:t,indicator:r,next:i,offset:n,onError:o,parentIndent:s,startOnNewline:a}){let u=!1,l=a,d=a,h="",m="",g=!1,p=!1,v=null,y=null,w=null,b=null,_=null,I=null,$=null;for(const j of e)switch(p&&(j.type!=="space"&&j.type!=="newline"&&j.type!=="comma"&&o(j.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),v&&(l&&j.type!=="comment"&&j.type!=="newline"&&o(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),v=null),j.type){case"space":!t&&(r!=="doc-start"||i?.type!=="flow-collection")&&j.source.includes(" ")&&(v=j),d=!0;break;case"comment":{d||o(j,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const Z=j.source.substring(1)||" ";h?h+=m+Z:h=Z,m="",l=!1;break}case"newline":l?h?h+=j.source:(!I||r!=="seq-item-ind")&&(u=!0):m+=j.source,l=!0,g=!0,(y||w)&&(b=j),d=!0;break;case"anchor":y&&o(j,"MULTIPLE_ANCHORS","A node can have at most one anchor"),j.source.endsWith(":")&&o(j.offset+j.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=j,$??($=j.offset),l=!1,d=!1,p=!0;break;case"tag":{w&&o(j,"MULTIPLE_TAGS","A node can have at most one tag"),w=j,$??($=j.offset),l=!1,d=!1,p=!0;break}case r:(y||w)&&o(j,"BAD_PROP_ORDER",`Anchors and tags must be after the ${j.source} indicator`),I&&o(j,"UNEXPECTED_TOKEN",`Unexpected ${j.source} in ${t??"collection"}`),I=j,l=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(t){_&&o(j,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),_=j,l=!1,d=!1;break}default:o(j,"UNEXPECTED_TOKEN",`Unexpected ${j.type} token`),l=!1,d=!1}const E=e[e.length-1],O=E?E.offset+E.source.length:n;return p&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v&&(l&&v.indent<=s||i?.type==="block-map"||i?.type==="block-seq")&&o(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:I,spaceBefore:u,comment:h,hasNewline:g,anchor:y,tag:w,newlineAfterProp:b,end:O,start:$??O}}function Jn(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
85
|
-
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const r of t.start)if(r.type==="newline")return!0;if(t.sep){for(const r of t.sep)if(r.type==="newline")return!0}if(Jn(t.key)||Jn(t.value))return!0}return!1;default:return!0}}function Po(e,t,r){if(t?.type==="flow-collection"){const i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&Jn(t)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ym(e,t,r){const{uniqueKeys:i}=e.options;if(i===!1)return!1;const n=typeof i=="function"?i:(o,s)=>o===s||Ee(o)&&Ee(s)&&o.value===s.value;return t.some(o=>n(o.key,r))}const lu="All mapping items must start at the same column";function Tb({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=o?.nodeClass??st,a=new s(r.schema);r.atRoot&&(r.atRoot=!1);let u=i.offset,l=null;for(const d of i.items){const{start:h,key:m,sep:g,value:p}=d,v=_n(h,{indicator:"explicit-key-ind",next:m??g?.[0],offset:u,onError:n,parentIndent:i.indent,startOnNewline:!0}),y=!v.found;if(y){if(m&&(m.type==="block-seq"?n(u,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==i.indent&&n(u,"BAD_INDENT",lu)),!v.anchor&&!v.tag&&!g){l=v.end,v.comment&&(a.comment?a.comment+=`
|
|
86
|
-
`+v.comment:a.comment=v.comment);continue}(v.newlineAfterProp||Jn(m))&&n(m??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==i.indent&&n(u,"BAD_INDENT",lu);r.atKey=!0;const w=v.end,b=m?e(r,m,v,n):t(r,w,h,null,v,n);r.schema.compat&&Po(i.indent,m,n),r.atKey=!1,Ym(r,a.items,b)&&n(w,"DUPLICATE_KEY","Map keys must be unique");const _=_n(g??[],{indicator:"map-value-ind",next:p,offset:b.range[2],onError:n,parentIndent:i.indent,startOnNewline:!m||m.type==="block-scalar"});if(u=_.end,_.found){y&&(p?.type==="block-map"&&!_.hasNewline&&n(u,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&v.start<_.found.offset-1024&&n(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const I=p?e(r,p,_,n):t(r,u,g,null,_,n);r.schema.compat&&Po(i.indent,p,n),u=I.range[2];const $=new Xe(b,I);r.options.keepSourceTokens&&($.srcToken=d),a.items.push($)}else{y&&n(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&(b.comment?b.comment+=`
|
|
87
|
-
`+_.comment:b.comment=_.comment);const I=new Xe(b);r.options.keepSourceTokens&&(I.srcToken=d),a.items.push(I)}}return l&&l<u&&n(l,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,u,l??u],a}function Pb({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=o?.nodeClass??Qt,a=new s(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=i.offset,l=null;for(const{start:d,value:h}of i.items){const m=_n(d,{indicator:"seq-item-ind",next:h,offset:u,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||h)h&&h.type==="block-seq"?n(m.end,"BAD_INDENT","All sequence items must start at the same column"):n(u,"MISSING_CHAR","Sequence item without - indicator");else{l=m.end,m.comment&&(a.comment=m.comment);continue}const g=h?e(r,h,m,n):t(r,m.end,d,null,m,n);r.schema.compat&&Po(i.indent,h,n),u=g.range[2],a.items.push(g)}return a.range=[i.offset,u,l??u],a}function cr(e,t,r,i){let n="";if(e){let o=!1,s="";for(const a of e){const{source:u,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{r&&!o&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const d=u.substring(1)||" ";n?n+=s+d:n=d,s="";break}case"newline":n&&(s+=u),o=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=u.length}}return{comment:n,offset:t}}const ro="Block collections are not allowed within flow collections",io=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Ub({composeNode:e,composeEmptyNode:t},r,i,n,o){const s=i.start.source==="{",a=s?"flow map":"flow sequence",u=o?.nodeClass??(s?st:Qt),l=new u(r.schema);l.flow=!0;const d=r.atRoot;d&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let h=i.offset+i.start.source.length;for(let y=0;y<i.items.length;++y){const w=i.items[y],{start:b,key:_,sep:I,value:$}=w,E=_n(b,{flow:a,indicator:"explicit-key-ind",next:_??I?.[0],offset:h,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!I&&!$){y===0&&E.comma?n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):y<i.items.length-1&&n(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(l.comment?l.comment+=`
|
|
88
|
-
`+E.comment:l.comment=E.comment),h=E.end;continue}!s&&r.options.strict&&Jn(_)&&n(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(y===0)E.comma&&n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||n(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let O="";e:for(const j of b)switch(j.type){case"comma":case"space":break;case"comment":O=j.source.substring(1);break e;default:break e}if(O){let j=l.items[l.items.length-1];Ce(j)&&(j=j.value??j.key),j.comment?j.comment+=`
|
|
89
|
-
`+O:j.comment=O,E.comment=E.comment.substring(O.length+1)}}if(!s&&!I&&!E.found){const O=$?e(r,$,E,n):t(r,E.end,I,null,E,n);l.items.push(O),h=O.range[2],io($)&&n(O.range,"BLOCK_IN_FLOW",ro)}else{r.atKey=!0;const O=E.end,j=_?e(r,_,E,n):t(r,O,b,null,E,n);io(_)&&n(j.range,"BLOCK_IN_FLOW",ro),r.atKey=!1;const Z=_n(I??[],{flow:a,indicator:"map-value-ind",next:$,offset:j.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(Z.found){if(!s&&!E.found&&r.options.strict){if(I)for(const Q of I){if(Q===Z.found)break;if(Q.type==="newline"){n(Q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<Z.found.offset-1024&&n(Z.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else $&&("source"in $&&$.source&&$.source[0]===":"?n($,"MISSING_CHAR",`Missing space after : in ${a}`):n(Z.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const W=$?e(r,$,Z,n):Z.found?t(r,Z.end,I,null,Z,n):null;W?io($)&&n(W.range,"BLOCK_IN_FLOW",ro):Z.comment&&(j.comment?j.comment+=`
|
|
90
|
-
`+Z.comment:j.comment=Z.comment);const X=new Xe(j,W);if(r.options.keepSourceTokens&&(X.srcToken=w),s){const Q=l;Ym(r,Q.items,j)&&n(O,"DUPLICATE_KEY","Map keys must be unique"),Q.items.push(X)}else{const Q=new st(r.schema);Q.flow=!0,Q.items.push(X);const oe=(W??j).range;Q.range=[j.range[0],oe[1],oe[2]],l.items.push(Q)}h=W?W.range[2]:Z.end}}const m=s?"}":"]",[g,...p]=i.end;let v=h;if(g&&g.source===m)v=g.offset+g.source.length;else{const y=a[0].toUpperCase()+a.substring(1),w=d?`${y} must end with a ${m}`:`${y} in block collection must be sufficiently indented and end with a ${m}`;n(h,d?"MISSING_CHAR":"BAD_INDENT",w),g&&g.source.length!==1&&p.unshift(g)}if(p.length>0){const y=cr(p,v,r.options.strict,n);y.comment&&(l.comment?l.comment+=`
|
|
91
|
-
`+y.comment:l.comment=y.comment),l.range=[i.offset,v,y.offset]}else l.range=[i.offset,v,v];return l}function oo(e,t,r,i,n,o){const s=r.type==="block-map"?Tb(e,t,r,i,o):r.type==="block-seq"?Pb(e,t,r,i,o):Ub(e,t,r,i,o),a=s.constructor;return n==="!"||n===a.tagName?(s.tag=a.tagName,s):(n&&(s.tag=n),s)}function Db(e,t,r,i,n){const o=i.tag,s=o?t.directives.tagName(o.source,m=>n(o,"TAG_RESOLVE_FAILED",m)):null;if(r.type==="block-seq"){const{anchor:m,newlineAfterProp:g}=i,p=m&&o?m.offset>o.offset?m:o:m??o;p&&(!g||g.offset<p.offset)&&n(p,"MISSING_CHAR","Missing newline after block sequence props")}const a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===st.tagName&&a==="map"||s===Qt.tagName&&a==="seq")return oo(e,t,r,n,s);let u=t.schema.tags.find(m=>m.tag===s&&m.collection===a);if(!u){const m=t.schema.knownTags[s];if(m&&m.collection===a)t.schema.tags.push(Object.assign({},m,{default:!1})),u=m;else return m?n(o,"BAD_COLLECTION_TYPE",`${m.tag} used for ${a} collection, but expects ${m.collection??"scalar"}`,!0):n(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),oo(e,t,r,n,s)}const l=oo(e,t,r,n,s,u),d=u.resolve?.(l,m=>n(o,"TAG_RESOLVE_FAILED",m),t.options)??l,h=De(d)?d:new fe(d);return h.range=l.range,h.tag=s,u?.format&&(h.format=u.format),h}function Cb(e,t,r){const i=t.offset,n=Bb(t,e.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};const o=n.mode===">"?fe.BLOCK_FOLDED:fe.BLOCK_LITERAL,s=t.source?Rb(t.source):[];let a=s.length;for(let v=s.length-1;v>=0;--v){const y=s[v][1];if(y===""||y==="\r")a=v;else break}if(a===0){const v=n.chomp==="+"&&s.length>0?`
|
|
92
|
-
`.repeat(Math.max(1,s.length-1)):"";let y=i+n.length;return t.source&&(y+=t.source.length),{value:v,type:o,comment:n.comment,range:[i,y,y]}}let u=t.indent+n.indent,l=t.offset+n.length,d=0;for(let v=0;v<a;++v){const[y,w]=s[v];if(w===""||w==="\r")n.indent===0&&y.length>u&&(u=y.length);else{y.length<u&&r(l+y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(u=y.length),d=v,u===0&&!e.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=y.length+w.length+1}for(let v=s.length-1;v>=a;--v)s[v][0].length>u&&(a=v+1);let h="",m="",g=!1;for(let v=0;v<d;++v)h+=s[v][0].slice(u)+`
|
|
93
|
-
`;for(let v=d;v<a;++v){let[y,w]=s[v];l+=y.length+w.length+1;const b=w[w.length-1]==="\r";if(b&&(w=w.slice(0,-1)),w&&y.length<u){const I=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-w.length-(b?2:1),"BAD_INDENT",I),y=""}o===fe.BLOCK_LITERAL?(h+=m+y.slice(u)+w,m=`
|
|
94
|
-
`):y.length>u||w[0]===" "?(m===" "?m=`
|
|
95
|
-
`:!g&&m===`
|
|
96
|
-
`&&(m=`
|
|
97
|
-
|
|
98
|
-
`),h+=m+y.slice(u)+w,m=`
|
|
99
|
-
`,g=!0):w===""?m===`
|
|
100
|
-
`?h+=`
|
|
101
|
-
`:m=`
|
|
102
|
-
`:(h+=m+w,m=" ",g=!1)}switch(n.chomp){case"-":break;case"+":for(let v=a;v<s.length;++v)h+=`
|
|
103
|
-
`+s[v][0].slice(u);h[h.length-1]!==`
|
|
104
|
-
`&&(h+=`
|
|
105
|
-
`);break;default:h+=`
|
|
106
|
-
`}const p=i+n.length+t.source.length;return{value:h,type:o,comment:n.comment,range:[i,p,p]}}function Bb({offset:e,props:t},r,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:n}=t[0],o=n[0];let s=0,a="",u=-1;for(let m=1;m<n.length;++m){const g=n[m];if(!a&&(g==="-"||g==="+"))a=g;else{const p=Number(g);!s&&p?s=p:u===-1&&(u=e+m)}}u!==-1&&i(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,d="",h=n.length;for(let m=1;m<t.length;++m){const g=t[m];switch(g.type){case"space":l=!0;case"newline":h+=g.source.length;break;case"comment":r&&!l&&i(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=g.source.length,d=g.source.substring(1);break;case"error":i(g,"UNEXPECTED_TOKEN",g.message),h+=g.source.length;break;default:{const p=`Unexpected token in block scalar header: ${g.type}`;i(g,"UNEXPECTED_TOKEN",p);const v=g.source;v&&typeof v=="string"&&(h+=v.length)}}}return{mode:o,indent:s,chomp:a,comment:d,length:h}}function Rb(e){const t=e.split(/\n( *)/),r=t[0],i=r.match(/^( *)/),o=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let s=1;s<t.length;s+=2)o.push([t[s],t[s+1]]);return o}function Fb(e,t,r){const{offset:i,type:n,source:o,end:s}=e;let a,u;const l=(m,g,p)=>r(i+m,g,p);switch(n){case"scalar":a=fe.PLAIN,u=Zb(o,l);break;case"single-quoted-scalar":a=fe.QUOTE_SINGLE,u=Lb(o,l);break;case"double-quoted-scalar":a=fe.QUOTE_DOUBLE,u=Mb(o,l);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}const d=i+o.length,h=cr(s,d,t,r);return{value:u,type:a,comment:h.comment,range:[i,d,h.offset]}}function Zb(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Qm(e)}function Lb(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Qm(e.slice(1,-1)).replace(/''/g,"'")}function Qm(e){let t,r;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
107
|
-
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
108
|
-
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=t.exec(e);if(!i)return e;let n=i[1],o=" ",s=t.lastIndex;for(r.lastIndex=s;i=r.exec(e);)i[1]===""?o===`
|
|
109
|
-
`?n+=o:o=`
|
|
110
|
-
`:(n+=o+i[1],o=" "),s=r.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=s,i=a.exec(e),n+o+(i?.[1]??"")}function Mb(e,t){let r="";for(let i=1;i<e.length-1;++i){const n=e[i];if(!(n==="\r"&&e[i+1]===`
|
|
111
|
-
`))if(n===`
|
|
112
|
-
`){const{fold:o,offset:s}=qb(e,i);r+=o,i=s}else if(n==="\\"){let o=e[++i];const s=Vb[o];if(s)r+=s;else if(o===`
|
|
113
|
-
`)for(o=e[i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="\r"&&e[i+1]===`
|
|
114
|
-
`)for(o=e[++i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="x"||o==="u"||o==="U"){const a={x:2,u:4,U:8}[o];r+=Kb(e,i+1,a,t),i+=a}else{const a=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(n===" "||n===" "){const o=i;let s=e[i+1];for(;s===" "||s===" ";)s=e[++i+1];s!==`
|
|
115
|
-
`&&!(s==="\r"&&e[i+2]===`
|
|
116
|
-
`)&&(r+=i>o?e.slice(o,i+1):n)}else r+=n}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function qb(e,t){let r="",i=e[t+1];for(;(i===" "||i===" "||i===`
|
|
117
|
-
`||i==="\r")&&!(i==="\r"&&e[t+2]!==`
|
|
118
|
-
`);)i===`
|
|
119
|
-
`&&(r+=`
|
|
120
|
-
`),t+=1,i=e[t+1];return r||(r=" "),{fold:r,offset:t}}const Vb={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
121
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Kb(e,t,r,i){const n=e.substr(t,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(s)){const a=e.substr(t-2,r+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(s)}function ep(e,t,r,i){const{value:n,type:o,comment:s,range:a}=t.type==="block-scalar"?Cb(e,t,i):Fb(t,e.options.strict,i),u=r?e.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null;let l;e.options.stringKeys&&e.atKey?l=e.schema[_t]:u?l=Jb(e.schema,n,u,r,i):t.type==="scalar"?l=Gb(e,n,t,i):l=e.schema[_t];let d;try{const h=l.resolve(n,m=>i(r??t,"TAG_RESOLVE_FAILED",m),e.options);d=Ee(h)?h:new fe(h)}catch(h){const m=h instanceof Error?h.message:String(h);i(r??t,"TAG_RESOLVE_FAILED",m),d=new fe(n)}return d.range=a,d.source=n,o&&(d.type=o),u&&(d.tag=u),l.format&&(d.format=l.format),s&&(d.comment=s),d}function Jb(e,t,r,i,n){if(r==="!")return e[_t];const o=[];for(const a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(const a of o)if(a.test?.test(t))return a;const s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[_t])}function Gb({atKey:e,directives:t,schema:r},i,n,o){const s=r.tags.find(a=>(a.default===!0||e&&a.default==="key")&&a.test?.test(i))||r[_t];if(r.compat){const a=r.compat.find(u=>u.default&&u.test?.test(i))??r[_t];if(s.tag!==a.tag){const u=t.tagString(s.tag),l=t.tagString(a.tag),d=`Value may be parsed as either ${u} or ${l}`;o(n,"TAG_RESOLVE_FAILED",d,!0)}}return s}function Wb(e,t,r){if(t){r??(r=t.length);for(let i=r-1;i>=0;--i){let n=t[i];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++i];n?.type==="space";)e+=n.source.length,n=t[++i];break}}return e}const Hb={composeNode:tp,composeEmptyNode:Pa};function tp(e,t,r,i){const n=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:u}=r;let l,d=!0;switch(t.type){case"alias":l=Xb(e,t,i),(a||u)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=ep(e,t,u,i),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=Db(Hb,e,t,r,i),a&&(l.anchor=a.source.substring(1));break;default:{const h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",h),l=Pa(e,t.offset,void 0,null,r,i),d=!1}}return a&&l.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!Ee(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(u??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(l.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?l.comment=s:l.commentBefore=s),e.options.keepSourceTokens&&d&&(l.srcToken=t),l}function Pa(e,t,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:u},l){const d={type:"scalar",offset:Wb(t,r,i),indent:-1,source:""},h=ep(e,d,a,l);return s&&(h.anchor=s.source.substring(1),h.anchor===""&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(h.spaceBefore=!0),o&&(h.comment=o,h.range[2]=u),h}function Xb({options:e},{offset:t,source:r,end:i},n){const o=new wa(r.substring(1));o.source===""&&n(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,a=cr(i,s,e.strict,n);return o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment),o}function Yb(e,t,{offset:r,start:i,value:n,end:o},s){const a=Object.assign({_directives:t},e),u=new Wi(void 0,a),l={atKey:!1,atRoot:!0,directives:u.directives,options:u.options,schema:u.schema},d=_n(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});d.found&&(u.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!d.hasNewline&&s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),u.contents=n?tp(l,n,d,s):Pa(l,d.end,i,null,d,s);const h=u.contents.range[2],m=cr(o,h,!1,s);return m.comment&&(u.comment=m.comment),u.range=[r,h,m.offset],u}function jn(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function fu(e){let t="",r=!1,i=!1;for(let n=0;n<e.length;++n){const o=e[n];switch(o[0]){case"#":t+=(t===""?"":i?`
|
|
122
|
-
|
|
123
|
-
`:`
|
|
124
|
-
`)+(o.substring(1)||" "),r=!0,i=!1;break;case"%":e[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:t,afterEmptyLine:i}}class Qb{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{const s=jn(r);o?this.warnings.push(new zb(s,i,n)):this.errors.push(new Rn(s,i,n))},this.directives=new He({version:t.version||"1.2"}),this.options=t}decorate(t,r){const{comment:i,afterEmptyLine:n}=fu(this.prelude);if(i){const o=t.contents;if(r)t.comment=t.comment?`${t.comment}
|
|
125
|
-
${i}`:i;else if(n||t.directives.docStart||!o)t.commentBefore=i;else if(Ue(o)&&!o.flow&&o.items.length>0){let s=o.items[0];Ce(s)&&(s=s.key);const a=s.commentBefore;s.commentBefore=a?`${i}
|
|
126
|
-
${a}`:i}else{const s=o.commentBefore;o.commentBefore=s?`${i}
|
|
127
|
-
${s}`:i}}r?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:fu(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,r=!1,i=-1){for(const n of t)yield*this.next(n);yield*this.end(r,i)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(r,i,n)=>{const o=jn(t);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const r=Yb(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new Rn(jn(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const i="Unexpected doc-end without preceding document";this.errors.push(new Rn(jn(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const r=cr(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const i=this.doc.comment;this.doc.comment=i?`${i}
|
|
128
|
-
${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Rn(jn(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const i=Object.assign({_directives:this.directives},this.options),n=new Wi(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}}const np="\uFEFF",rp="",ip="",Uo="";function e$(e){switch(e){case np:return"byte-order-mark";case rp:return"doc-mode";case ip:return"flow-error-end";case Uo:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
129
|
-
`:case`\r
|
|
130
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function ft(e){switch(e){case void 0:case" ":case`
|
|
131
|
-
`:case"\r":case" ":return!0;default:return!1}}const du=new Set("0123456789ABCDEFabcdef"),t$=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),yr=new Set(",[]{}"),n$=new Set(` ,[]{}
|
|
132
|
-
\r `),so=e=>!e||n$.has(e);class r${constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===`
|
|
133
|
-
`?!0:r==="\r"?this.buffer[t+1]===`
|
|
134
|
-
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+t];if(r==="\r"){const n=this.buffer[i+t+1];if(n===`
|
|
135
|
-
`||!n&&!this.atEnd)return t+i+1}return r===`
|
|
136
|
-
`||i>=this.indentNext||!r&&!this.atEnd?t+i:-1}if(r==="-"||r==="."){const i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&ft(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
137
|
-
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===np&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let r=t.length,i=t.indexOf("#");for(;i!==-1;){const o=t[i-1];if(o===" "||o===" "){r=i-1;break}else i=t.indexOf("#",i+1)}for(;;){const o=t[r-1];if(o===" "||o===" ")r-=1;else break}const n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-r),yield*this.pushNewline(),"stream"}return yield rp,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const r=this.peek(3);if((r==="---"||r==="...")&&ft(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ft(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&ft(r)){const i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(t[r]){case"#":yield*this.pushCount(t.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(so),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,r,i=-1;do t=yield*this.pushNewline(),t>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(t+r>0);const n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&ft(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield ip,yield*this.parseLineStart();let o=0;for(;n[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),n[o]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(so),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const s=this.charAt(1);if(this.flowKey||ft(s)||s===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let r=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let o=0;for(;this.buffer[r-1-o]==="\\";)o+=1;if(o%2===0)break;r=this.buffer.indexOf('"',r+1)}const i=this.buffer.substring(0,r);let n=i.indexOf(`
|
|
138
|
-
`,this.pos);if(n!==-1){for(;n!==-1;){const o=this.continueScalar(n+1);if(o===-1)break;n=i.indexOf(`
|
|
139
|
-
`,o)}n!==-1&&(r=n-(i[n-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const r=this.buffer[++t];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>ft(r)||r==="#")}*parseBlockScalar(){let t=this.pos-1,r=0,i;e:for(let o=this.pos;i=this.buffer[o];++o)switch(i){case" ":r+=1;break;case`
|
|
140
|
-
`:t=o,r=0;break;case"\r":{const s=this.buffer[o+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
|
|
141
|
-
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
|
|
142
|
-
`,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
143
|
-
`;)i=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)do{let o=t-1,s=this.buffer[o];s==="\r"&&(s=this.buffer[--o]);const a=o;for(;s===" ";)s=this.buffer[--o];if(s===`
|
|
144
|
-
`&&o>=this.pos&&o+1+r>a)t=o;else break}while(!0);return yield Uo,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){const o=this.buffer[i+1];if(ft(o)||t&&yr.has(o))break;r=i}else if(ft(n)){let o=this.buffer[i+1];if(n==="\r"&&(o===`
|
|
145
|
-
`?(i+=1,n=`
|
|
146
|
-
`,o=this.buffer[i+1]):r=i),o==="#"||t&&yr.has(o))break;if(n===`
|
|
147
|
-
`){const s=this.continueScalar(i+1);if(s===-1)break;i=Math.max(i,s-2)}}else{if(t&&yr.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Uo,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){const i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(so))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(ft(r)||t&&yr.has(r))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!ft(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(t$.has(r))r=this.buffer[++t];else if(r==="%"&&du.has(this.buffer[t+1])&&du.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
|
|
148
|
-
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
149
|
-
`?yield*this.pushCount(2):0}*pushSpaces(t){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||t&&i===" ");const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(t){let r=this.pos,i=this.buffer[r];for(;!t(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class i${constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,i=this.lineStarts.length;for(;r<i;){const o=r+i>>1;this.lineStarts[o]<t?r=o+1:i=o}if(this.lineStarts[r]===t)return{line:r+1,col:1};if(r===0)return{line:0,col:t};const n=this.lineStarts[r-1];return{line:r,col:t-n+1}}}}function zt(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function hu(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function op(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function vr(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function on(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function mu(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!zt(t.start,"explicit-key-ind")&&!zt(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,op(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class o${constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new r$,this.onNewLine=t}*parse(t,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const i of this.lexer.lex(t,r))yield*this.next(i);r||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const r=e$(t);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(!t||t.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const r=t??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&mu(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{const n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{const n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{const n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&hu(n.start)===-1&&(r.indent===0||n.start.every(o=>o.type!=="comment"||o.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{hu(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const r=vr(this.peek(2)),i=on(r);let n;t.end?(n=t.end,n.push(this.sourceToken),delete t.end):n=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
|
|
150
|
-
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
151
|
-
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const i=!this.onKeyLine&&this.indent===t.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(n&&r.sep&&!r.value){const s=[];for(let a=0;a<r.sep.length;++a){const u=r.sep[a];switch(u.type){case"newline":s.push(a);break;case"space":break;case"comment":u.indent>t.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(o.push(this.sourceToken),t.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(o.push(this.sourceToken),t.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(zt(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(op(r.key)&&!zt(r.sep,"newline")){const s=on(r.start),a=r.key,u=r.sep;u.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:a,sep:u}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(zt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const s=on(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?t.items.push({start:o,key:null,sep:[this.sourceToken]}):zt(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);n||r.value?(t.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!zt(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&t.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){const i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||zt(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){const i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?t.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const n=vr(i),o=on(n);mu(t);const s=t.end.splice(1,t.end.length);s.push(this.sourceToken);const a={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(`
|
|
152
|
-
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
153
|
-
`,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=vr(t),i=on(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=vr(t),i=on(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function s$(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new i$||null,prettyErrors:t}}function a$(e,t={}){const{lineCounter:r,prettyErrors:i}=s$(t),n=new o$(r?.addNewLine),o=new Qb(t);let s=null;for(const a of o.compose(n.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Rn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(cu(e,r)),s.warnings.forEach(cu(e,r))),s}function u$(e,t,r){let i;const n=a$(e,r);if(!n)return null;if(n.warnings.forEach(o=>zm(n.options.logLevel,o)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}var Qe=H({title:q().optional(),globalTitle:q().optional(),description:q().optional(),color:q().optional(),icon:q().optional(),iconColor:q().optional(),avatarUrl:q().optional(),secondaryIcon:q().optional(),secondaryIconColor:q().optional()}),lt=Qe.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),sp=Qe.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),Nn=Qe.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),c$=H({createdAt:Ie(),updatedAt:Ie()}),ht=q().regex(/^[a-z][a-z0-9-_.]+$/).min(2).max(64),Hi=Ct([Fn([ht,be("."),be("v"),Ge().int().min(1)]),Fn([ht,be("."),ht,be("."),be("v"),Ge().int().min(1)]),Fn([ht,be("."),ht,be("."),ht,be("."),be("v"),Ge().int().min(1)])]),ao=q().regex(/^[a-z][a-zA-Z0-9]+$/).min(2).max(64);H({type:Hi,schema:bn(),meta:Qe.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:Ge()});var l$=Symbol("runtimeSchema"),ap=yt(["composite","unit"]),up=H({schema:bn(),[l$]:vm(de).optional(),required:Be(),meta:Qe.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),pu=H({type:Hi,required:Be(),multiple:Be(),meta:Qe.required({title:!0}).pick({title:!0,description:!0})}),f$=H({type:ht,kind:ap,args:Le(ao,up),inputs:Le(ao,pu),outputs:Le(ao,pu),meta:Qe.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0,secondaryIcon:!0,secondaryIconColor:!0}).extend({category:q().optional(),defaultNamePrefix:q()}),definitionHash:Ge()}),cp=H({x:Ge(),y:Ge()}),Ot=Fn([Hi,":",ht]),mn=H({instanceId:Ot,output:q()}),Do=H({hubId:q()}),d$=H({args:Le(q(),$t()).optional(),inputs:Le(q(),Ze(mn)).optional(),hubInputs:Le(q(),Ze(Do)).optional(),injectionInputs:Ze(Do).optional(),position:cp.optional()}),uo=H({id:Ot,kind:ap,type:Hi,name:ht,...d$.shape,resolvedInputs:Le(q(),Ze(mn)).optional(),parentId:Ot.optional(),outputs:Le(q(),Ze(mn)).optional(),resolvedOutputs:Le(q(),Ze(mn)).optional()}),h$=H({position:cp.optional(),inputs:Ze(mn).optional(),injectionInputs:Ze(Do).optional()}),m$=H({id:$e(),...h$.shape}),p$=H({"c857cac5-caa6-4421-b82c-e561fbce6367":be(!0),value:q()}),g$=H({name:q(),contentType:q().optional(),size:Ge().optional(),mode:Ge().optional()}),y$=Ct([q(),Ge(),Be(),q().array()]);H({name:q(),meta:Qe.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:q().optional(),value:y$.optional()});var v$=up.extend({readonly:Tt.boolean(),computed:Tt.boolean()}),b$=Tt.object({package:Tt.string(),path:Tt.string().optional()});Tt.object({...f$.shape,source:b$,secrets:Tt.record(Tt.string(),v$)});function Ua(e){return"source"in e}var $$=Ct([H({type:be("before-destroy")})]);H({name:q(),meta:Qe.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:$$});var _$=H({name:q()});H({instanceId:q(),args:Le(q(),$t()),inputs:Le(q(),mn.array()),invokedTriggers:_$.array(),secretNames:q().array(),stateIdMap:Le(Ot,q()),importBasePath:q()});var gu=new WeakMap;function w$(e){const t=p$.safeParse(e);if(!t.success)return e;const r=gu.get(e);if(r!==void 0)return r;const i=u$(t.data.value);return gu.set(e,i),i}var k$=Symbol("unitArtifactId"),S$=H({"d55c63ac-3174-4756-808f-f778e99af0d1":be(!0),[k$]:q().optional(),hash:q(),meta:lt.optional()}),I$=Ct([H({type:be("embedded"),isBinary:Be().optional(),value:q()}),H({type:be("artifact"),...S$.shape})]),lp=H({meta:g$,content:I$}),fp=H({image:q(),command:q().array(),cwd:q().optional(),env:Le(q(),q()).optional(),files:Le(q(),lp).optional()});H({name:q(),meta:Qe.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:fp});var dp=Ct([H({type:be("markdown"),content:q()}),H({type:be("qr"),content:q(),showContent:bm(),language:q().optional()}),H({type:be("file"),file:lp})]);H({name:q(),meta:Qe.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:dp.array()});H({name:q(),image:q(),params:Le(q(),$t())});H({projectId:$e(),workerVersionId:$e(),apiUrl:Th(),apiKey:q()});jt("type",[H({type:be("host")})]);const E$={id:"q8xbilhwpsn65zjlv5kz44qh"},N$={id:"n0rfvpl9o77iqf29ff4kk5gf"},O$={id:"pmn9y901jeiz2ydh93045l39"},x$={id:"qppfcerovu3h22o0x8rlpc3g"};jt("type",[H({type:be("codebase")}),H({type:be("database")})]);H({name:ht,spaceId:$e().default(E$.id),modelStorageId:$e().default(x$.id),libraryId:$e().default(N$.id),pulumiBackendId:$e().default(O$.id),meta:lt});H({id:q(),name:ht,meta:lt,spaceId:$e(),modelStorageId:$e(),libraryId:$e(),pulumiBackendId:$e(),...c$.shape});const j$=H({encryptedIdentities:Ze(q()),hasPasskey:Be()});jt("type",[H({type:be("locked"),unlockSuite:j$.optional()}),H({type:be("unlocked")})]);jt("type",[H({type:be("host")})]);const A$=Qe.pick({title:!0,description:!0}).required({title:!0});H({meta:A$,recipient:q()});const z$=H({key:q(),order:yt(["asc","desc"])}),Bt=H({search:q().optional(),sortBy:Ze(z$).optional(),skip:Ge().int().nonnegative().default(0).optional(),count:Ge().int().positive().max(100).default(20).optional()}),T$=Qe.pick({title:!0,description:!0}).required({title:!0});H({id:$e(),meta:lt,serviceAccountId:$e(),serviceAccountMeta:Nn.nullable(),createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});H({id:$e(),hash:q(),size:Ge(),meta:lt,createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional(),serviceAccountId:q().optional(),terminalId:q().optional(),pageId:q().optional()});H({name:q(),meta:lt,value:q(),message:q().optional(),order:Ge().min(0).max(100).optional()});const P$=H({stateId:$e(),meta:lt,acquiredAt:Ie()});jt("type",[H({type:be("locked"),locks:P$.array()}),H({type:be("unlocked"),stateIds:Ze(q())})]);H({updatedInstances:uo.array().optional(),updatedHubs:m$.array().optional(),updatedVirtualInstances:uo.array().optional(),updatedGhostInstances:uo.array().optional(),deletedInstanceIds:Ot.array().optional(),deletedHubIds:q().array().optional(),deletedVirtualInstanceIds:Ot.array().optional(),deletedGhostInstanceIds:Ot.array().optional()});const U$=yt(["destroy","preview","update","refresh"]),D$=H({id:Ot,parentId:q().optional(),message:q()}),C$=H({type:U$,instances:Ze(D$)}),B$=H({forceUpdateDependencies:Be().default(!1),ignoreDependencies:Be().default(!1),forceUpdateChildren:Be().default(!1),destroyDependentInstances:Be().default(!0),invokeDestroyTriggers:Be().default(!0),deleteUnreachableResources:Be().default(!1),forceDeleteState:Be().default(!1),allowPartialCompositeInstanceUpdate:Be().default(!1),allowPartialCompositeInstanceDestruction:Be().default(!1),refresh:Be().default(!1),debug:Be().default(!1)}).partial(),hp=yt(["update","preview","destroy","recreate","refresh"]),R$=yt(["pending","running","failing","completed","failed","cancelled","cancelling"]),mp=Qe.pick({title:!0,description:!0}).required({title:!0}),F$=H({projectId:q(),type:hp,instanceIds:Ze(Ot).min(1),options:B$.partial().optional()});F$.extend({meta:mp,plan:C$.array().optional()});jt("type",[H({type:be("updated"),operation:bn()}),H({type:be("deleted"),operationId:q()})]);H({id:$e(),type:hp,status:R$,meta:mp,startedAt:Ie(),updatedAt:Ie(),finishedAt:Ie().nullable()});const Z$=H({id:$e(),meta:lt,name:q().nullable(),stateId:$e().nullable(),serviceAccountId:$e().nullable(),serviceAccountMeta:Nn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...Z$.shape,content:Ze(dp)});H({id:$e(),meta:sp,name:q().nullable(),systemName:q().nullable(),stateId:$e().nullable(),serviceAccountId:$e().nullable(),serviceAccountMeta:Nn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional()});H({id:$e(),meta:Nn,createdAt:Ie(),updatedAt:Ie()});Bt.extend({artifactId:q().optional()});H({stateId:q(),output:q()});jt("type",[H({type:be("updated"),state:bn()}),H({type:be("patched"),stateId:q(),patch:bn()}),H({type:be("deleted"),stateId:q()})]);jt("type",[H({type:be("registered"),instanceId:q(),params:Le(q(),$t())}),H({type:be("deregistered"),instanceId:q()})]);const L$=yt(["active","unavailable"]);H({id:$e(),terminalId:$e(),meta:sp,startedAt:Ie(),finishedAt:Ie().nullable()});const M$=H({id:$e(),name:q().nullable(),meta:lt,status:L$,stateId:q().nullable(),serviceAccountId:q().nullable(),serviceAccountMeta:Nn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...M$.shape,spec:fp});H({id:$e(),meta:lt,name:q(),stateId:$e(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional()});const pp=yt(["password","passkey"]),gp=Qe.pick({title:!0,description:!0}).required({title:!0});H({meta:gp,type:pp,encryptedIdentity:q(),recipient:q()});H({id:$e(),type:pp,meta:gp,recipient:q(),createdAt:Ie(),updatedAt:Ie()});const q$=yt(["unknown","starting","running","stopping","stopped","error"]);H({id:$e(),digest:q(),meta:lt,status:q$,enabled:Be(),apiKeyId:q(),apiKeyMeta:T$,createdAt:Ie(),updatedAt:Ie()});H({id:$e(),identity:q(),meta:lt,serviceAccountId:q(),serviceAccountMeta:Nn,createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});class Da{constructor(t,r,i,n){this.nodes=t,this.logger=r,this.outputHandler=i,this.dependentSetHandler=n}workset=new Set;dependencyMap=new Map;dependentMap=new Map;outputMap=new Map;addToWorkset(t){this.workset.add(t)}addAllNodesToWorkset(){for(const t of this.nodes.keys())this.workset.add(t)}get outputs(){return this.outputMap}get dependents(){return this.dependentMap}requireOutput(t){const r=this.outputMap.get(t);if(!r)throw new Error(`Output for node ${t} is not available`);return r}getDependents(t){const r=this.dependentMap.get(t);return r?Array.from(r):[]}invalidate(t){const r=[t];for(;r.length>0;){const i=r.pop();if(!this.nodes.has(i))continue;this.outputMap.delete(i),this.workset.add(i);const n=this.dependentMap.get(i);if(n)for(const o of n)this.outputMap.has(o)&&r.push(o)}}invalidateSingle(t){this.nodes.has(t)&&(this.outputMap.delete(t),this.workset.add(t))}async process(t){for(;this.workset.size>0;){const r=this.workset.values().next().value,i=[{nodeId:r,resolved:!1,dependencies:[]}];for(;i.length>0;){const n=i[i.length-1],{nodeId:o,resolved:s}=n,a=this.nodes.get(o);if(!a){this.logger.warn({nodeId:o},"node not found in the graph, skipping"),i.pop();continue}if(this.outputMap.has(o)){i.pop();continue}if(!s){n.dependencies=X0(this.getNodeDependencies(a));let h=!1;for(const m of n.dependencies){if(!this.nodes.has(m)){this.logger.warn({depId:m,nodeId:o},"dependency not found in the graph, skipping");continue}this.outputMap.has(m)||(i.push({nodeId:m,resolved:!1,dependencies:[]}),h=!0)}if(h){n.resolved=!0;continue}}const u=await this.processNode(a,this.logger);if(t?.aborted){this.logger.warn({nodeId:o},"processing aborted, skipping output");return}const l=new Set,d=this.dependencyMap.get(o)??[];for(const h of d){const m=this.dependentMap.get(h);m&&(m.delete(o),l.add(h),m.size===0&&this.dependentMap.delete(h))}for(const h of n.dependencies){let m=this.dependentMap.get(h);m||(m=new Set,this.dependentMap.set(h,m)),m.add(o),l.add(h)}if(this.dependentSetHandler)for(const h of l){const m=this.dependentMap.get(h);this.dependentSetHandler(h,m)}this.outputMap.set(o,u),this.outputHandler?.(o,u),this.dependencyMap.set(o,n.dependencies),i.pop()}this.workset.delete(r)}}}class V$ extends Da{getNodeDependencies(t){const r=[];if(t.kind==="hub"){for(const i of t.hub.inputs??[])r.push(`instance:${i.instanceId}`);for(const i of t.hub.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}for(const i of Object.values(t.instance.inputs??{}))for(const n of i)r.push(`instance:${n.instanceId}`);for(const i of Object.values(t.instance.hubInputs??{}))for(const n of i)r.push(`hub:${n.hubId}`);for(const i of t.instance.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}processNode(t){const r=d=>{const h=this.outputs.get(`hub:${d.hubId}`);if(!h)return{resolvedInputs:[]};if(h.kind!=="hub")throw new Error("Expected hub node");return h},i=d=>{const h=this.outputs.get(`instance:${d.instanceId}`);if(!h)return{component:null,resolvedInputs:[],resolvedOutputs:[]};if(h.kind!=="instance")throw new Error("Expected instance node");return{component:h.component,resolvedInputs:h.resolvedInputs[d.output]??[],resolvedOutputs:h.resolvedOutputs?.[d.output]}};if(t.kind==="hub"){const d=new Map,h=m=>{d.set(`${m.input.instanceId}:${m.input.output}`,m)};for(const m of t.hub.inputs??[]){const{component:g}=i(m),p=g?.outputs[m.output];if(!p){this.logger.warn({msg:"output not found in the component",input:m,component:g});continue}h({input:m,type:p.type})}for(const m of t.hub.injectionInputs??[]){const{resolvedInputs:g}=r(m);for(const p of g)h(p)}return{kind:"hub",resolvedInputs:Array.from(d.values())}}if(t.instance.resolvedInputs)return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:W0(t.instance.resolvedInputs,(d,h)=>{const m=t.component.inputs[h];return m?d.map(g=>({input:g,type:m.type})):(this.logger.warn({msg:"input not found in the component",inputName:h,component:t.component}),[])}),resolvedOutputs:t.instance.resolvedOutputs??{},resolvedInjectionInputs:[],matchedInjectionInputs:[]};const n=new Map,o=(d,h)=>{let m=n.get(d);m||(m=new Map,n.set(d,m)),m.set(`${h.input.instanceId}:${h.input.output}`,h)},s=(d,h)=>{const m=t.component.inputs[d];if(!m){this.logger.warn({msg:"input not found in the component",input:h,component:t.component});return}const{component:g,resolvedOutputs:p}=i(h);if(!g){this.logger.warn({instanceId:t.instance.id,input:h},"no output found for the input");return}if(Ua(g)){o(d,{input:h,type:m.type});return}if(p)for(const v of p)o(d,{input:v,type:m.type});else o(d,{input:h,type:m.type})};for(const[d,h]of Object.entries(t.instance.inputs??{}))for(const m of h)s(d,m);const a=new Map,u=new Map;for(const d of t.instance.injectionInputs??[]){const{resolvedInputs:h}=r(d);for(const m of h)a.set(`${m.input.instanceId}:${m.input.output}`,m)}for(const[d,h]of Object.entries(t.component.inputs??{})){const m=new Map(a),g=t.instance.hubInputs?.[d]??[];for(const p of g){const{resolvedInputs:v}=r(p);for(const y of v)m.set(`${y.input.instanceId}:${y.input.output}`,y)}for(const p of m.values())if(p.type===h.type){s(d,p.input);const v=`${p.input.instanceId}:${p.input.output}`;a.has(v)&&u.set(v,p)}}const l=G0(Array.from(n.entries()).map(([d,h])=>[d,Array.from(h.values())]));return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:l,resolvedOutputs:t.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(u.values())}}}function K$(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const J$=e=>new TextEncoder().encode(e);typeof Buffer<"u"&&Buffer.from;function G$(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}function yu(e){return new W$().update(e).digest()}var W$=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,i;try{for(var n=K$(t),o=n.next();!o.done;o=n.next()){var s=o.value;this.checksum=this.checksum>>>8^X$[(this.checksum^s)&255]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),H$=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],X$=G$(H$);function Y$(e){const t=e.length;let r=0,i=0;for(;i<t;){let n=e.charCodeAt(i++);if((n&4294967168)===0){r++;continue}else if((n&4294965248)===0)r+=2;else{if(n>=55296&&n<=56319&&i<t){const o=e.charCodeAt(i);(o&64512)===56320&&(++i,n=((n&1023)<<10)+(o&1023)+65536)}(n&4294901760)===0?r+=3:r+=4}}return r}function Q$(e,t,r){const i=e.length;let n=r,o=0;for(;o<i;){let s=e.charCodeAt(o++);if((s&4294967168)===0){t[n++]=s;continue}else if((s&4294965248)===0)t[n++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&o<i){const a=e.charCodeAt(o);(a&64512)===56320&&(++o,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?(t[n++]=s>>12&15|224,t[n++]=s>>6&63|128):(t[n++]=s>>18&7|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128)}t[n++]=s&63|128}}const e_=new TextEncoder,t_=50;function n_(e,t,r){e_.encodeInto(e,t.subarray(r))}function r_(e,t,r){e.length>t_?n_(e,t,r):Q$(e,t,r)}new TextDecoder;class br{constructor(t,r){this.type=t,this.data=r}}class _i extends Error{constructor(t){super(t);const r=Object.create(_i.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:_i.name})}}function i_(e,t,r){const i=r/4294967296,n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function yp(e,t,r){const i=Math.floor(r/4294967296),n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function o_(e,t){const r=e.getInt32(t),i=e.getUint32(t+4);return r*4294967296+i}const s_=-1,a_=4294967296-1,u_=17179869184-1;function c_({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=u_)if(t===0&&e<=a_){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e),r}else{const r=e/4294967296,i=e&4294967295,n=new Uint8Array(8),o=new DataView(n.buffer);return o.setUint32(0,t<<2|r&3),o.setUint32(4,i),n}else{const r=new Uint8Array(12),i=new DataView(r.buffer);return i.setUint32(0,t),yp(i,4,e),r}}function l_(e){const t=e.getTime(),r=Math.floor(t/1e3),i=(t-r*1e3)*1e6,n=Math.floor(i/1e9);return{sec:r+n,nsec:i-n*1e9}}function f_(e){if(e instanceof Date){const t=l_(e);return c_(t)}else return null}function d_(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{const r=t.getUint32(0),i=t.getUint32(4),n=(r&3)*4294967296+i,o=r>>>2;return{sec:n,nsec:o}}case 12:{const r=o_(t,4),i=t.getUint32(0);return{sec:r,nsec:i}}default:throw new _i(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}function h_(e){const t=d_(e);return new Date(t.sec*1e3+t.nsec/1e6)}const m_={type:s_,encode:f_,decode:h_};class Co{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(m_)}register({type:t,encode:r,decode:i}){if(t>=0)this.encoders[t]=r,this.decoders[t]=i;else{const n=-1-t;this.builtInEncoders[n]=r,this.builtInDecoders[n]=i}}tryToEncode(t,r){for(let i=0;i<this.builtInEncoders.length;i++){const n=this.builtInEncoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=-1-i;return new br(s,o)}}}for(let i=0;i<this.encoders.length;i++){const n=this.encoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=i;return new br(s,o)}}}return t instanceof br?t:null}decode(t,r,i){const n=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return n?n(t,r,i):new br(r,t)}}Co.defaultCodec=new Co;function p_(e){return e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}function g_(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):p_(e)?new Uint8Array(e):Uint8Array.from(e)}const y_=100,v_=2048;class Ca{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??Co.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??y_,this.initialBufferSize=t?.initialBufferSize??v_,this.sortKeys=t?.sortKeys??!1,this.forceFloat32=t?.forceFloat32??!1,this.ignoreUndefined=t?.ignoreUndefined??!1,this.forceIntegerToFloat=t?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new Ca({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(t){if(this.entered)return this.clone().encodeSharedRef(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(t){if(this.entered)return this.clone().encode(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(t,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);t==null?this.encodeNil():typeof t=="boolean"?this.encodeBoolean(t):typeof t=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(t):this.encodeNumber(t):typeof t=="string"?this.encodeString(t):this.useBigInt64&&typeof t=="bigint"?this.encodeBigInt64(t):this.encodeObject(t,r)}ensureBufferSizeToWrite(t){const r=this.pos+t;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(t){const r=new ArrayBuffer(t),i=new Uint8Array(r),n=new DataView(r);i.set(this.bytes),this.view=n,this.bytes=i}encodeNil(){this.writeU8(192)}encodeBoolean(t){t===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(t){!this.forceIntegerToFloat&&Number.isSafeInteger(t)?t>=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(211),this.writeI64(t)):this.encodeNumberAsFloat(t)}encodeNumberAsFloat(t){this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))}encodeBigInt64(t){t>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(t)):(this.writeU8(211),this.writeBigInt64(t))}writeStringHeader(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else if(t<4294967296)this.writeU8(219),this.writeU32(t);else throw new Error(`Too long string: ${t} bytes in UTF-8`)}encodeString(t){const i=Y$(t);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),r_(t,this.bytes,this.pos),this.pos+=i}encodeObject(t,r){const i=this.extensionCodec.tryToEncode(t,this.context);if(i!=null)this.encodeExtension(i);else if(Array.isArray(t))this.encodeArray(t,r);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else if(typeof t=="object")this.encodeMap(t,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(t)}`)}encodeBinary(t){const r=t.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);const i=g_(t);this.writeU8a(i)}encodeArray(t,r){const i=t.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else if(i<4294967296)this.writeU8(221),this.writeU32(i);else throw new Error(`Too large array: ${i}`);for(const n of t)this.doEncode(n,r+1)}countWithoutUndefined(t,r){let i=0;for(const n of r)t[n]!==void 0&&i++;return i}encodeMap(t,r){const i=Object.keys(t);this.sortKeys&&i.sort();const n=this.ignoreUndefined?this.countWithoutUndefined(t,i):i.length;if(n<16)this.writeU8(128+n);else if(n<65536)this.writeU8(222),this.writeU16(n);else if(n<4294967296)this.writeU8(223),this.writeU32(n);else throw new Error(`Too large map object: ${n}`);for(const o of i){const s=t[o];this.ignoreUndefined&&s===void 0||(this.encodeString(o),this.doEncode(s,r+1))}}encodeExtension(t){if(typeof t.data=="function"){const i=t.data(this.pos+6),n=i.length;if(n>=4294967296)throw new Error(`Too large extension object: ${n}`);this.writeU8(201),this.writeU32(n),this.writeI8(t.type),this.writeU8a(i);return}const r=t.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(t.type),this.writeU8a(t.data)}writeU8(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++}writeU8a(t){const r=t.length;this.ensureBufferSizeToWrite(r),this.bytes.set(t,this.pos),this.pos+=r}writeI8(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++}writeU16(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2}writeI16(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2}writeU32(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4}writeI32(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4}writeF32(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4}writeF64(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8}writeU64(t){this.ensureBufferSizeToWrite(8),i_(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),yp(this.view,this.pos,t),this.pos+=8}writeBigUint64(t){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,t),this.pos+=8}writeBigInt64(t){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,t),this.pos+=8}}function b_(e,t){return new Ca(t).encodeSharedRef(e)}var co={},An={},vu;function $_(){if(vu)return An;vu=1,An.byteLength=a,An.toByteArray=l,An.fromByteArray=m;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)e[n]=i[n],t[i.charCodeAt(n)]=n;t[45]=62,t[95]=63;function s(g){var p=g.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=g.indexOf("=");v===-1&&(v=p);var y=v===p?0:4-v%4;return[v,y]}function a(g){var p=s(g),v=p[0],y=p[1];return(v+y)*3/4-y}function u(g,p,v){return(p+v)*3/4-v}function l(g){var p,v=s(g),y=v[0],w=v[1],b=new r(u(g,y,w)),_=0,I=w>0?y-4:y,$;for($=0;$<I;$+=4)p=t[g.charCodeAt($)]<<18|t[g.charCodeAt($+1)]<<12|t[g.charCodeAt($+2)]<<6|t[g.charCodeAt($+3)],b[_++]=p>>16&255,b[_++]=p>>8&255,b[_++]=p&255;return w===2&&(p=t[g.charCodeAt($)]<<2|t[g.charCodeAt($+1)]>>4,b[_++]=p&255),w===1&&(p=t[g.charCodeAt($)]<<10|t[g.charCodeAt($+1)]<<4|t[g.charCodeAt($+2)]>>2,b[_++]=p>>8&255,b[_++]=p&255),b}function d(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function h(g,p,v){for(var y,w=[],b=p;b<v;b+=3)y=(g[b]<<16&16711680)+(g[b+1]<<8&65280)+(g[b+2]&255),w.push(d(y));return w.join("")}function m(g){for(var p,v=g.length,y=v%3,w=[],b=16383,_=0,I=v-y;_<I;_+=b)w.push(h(g,_,_+b>I?I:_+b));return y===1?(p=g[v-1],w.push(e[p>>2]+e[p<<4&63]+"==")):y===2&&(p=(g[v-2]<<8)+g[v-1],w.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),w.join("")}return An}var $r={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var bu;function __(){return bu||(bu=1,$r.read=function(e,t,r,i,n){var o,s,a=n*8-i-1,u=(1<<a)-1,l=u>>1,d=-7,h=r?n-1:0,m=r?-1:1,g=e[t+h];for(h+=m,o=g&(1<<-d)-1,g>>=-d,d+=a;d>0;o=o*256+e[t+h],h+=m,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=i;d>0;s=s*256+e[t+h],h+=m,d-=8);if(o===0)o=1-l;else{if(o===u)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-l}return(g?-1:1)*s*Math.pow(2,o-i)},$r.write=function(e,t,r,i,n,o){var s,a,u,l=o*8-n-1,d=(1<<l)-1,h=d>>1,m=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:o-1,p=i?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?t+=m/u:t+=m*Math.pow(2,1-h),t*u>=2&&(s++,u/=2),s+h>=d?(a=0,s=d):s+h>=1?(a=(t*u-1)*Math.pow(2,n),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[r+g]=a&255,g+=p,a/=256,n-=8);for(s=s<<n|a,l+=n;l>0;e[r+g]=s&255,g+=p,s/=256,l-=8);e[r+g-p]|=v*128}),$r}/*!
|
|
154
|
-
* The buffer module from node.js, for the browser.
|
|
155
|
-
*
|
|
156
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
157
|
-
* @license MIT
|
|
158
|
-
*/var $u;function w_(){return $u||($u=1,(function(e){const t=$_(),r=__(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const k=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(k,c),k.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(k){if(k>n)throw new RangeError('The value "'+k+'" is invalid for option "size"');const c=new Uint8Array(k);return Object.setPrototypeOf(c,a.prototype),c}function a(k,c,f){if(typeof k=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(k)}return u(k,c,f)}a.poolSize=8192;function u(k,c,f){if(typeof k=="string")return m(k,c);if(ArrayBuffer.isView(k))return p(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(qe(k,ArrayBuffer)||k&&qe(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(qe(k,SharedArrayBuffer)||k&&qe(k.buffer,SharedArrayBuffer)))return v(k,c,f);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=k.valueOf&&k.valueOf();if(N!=null&&N!==k)return a.from(N,c,f);const z=y(k);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),c,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,c,f){return u(k,c,f)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function d(k,c,f){return l(k),k<=0?s(k):c!==void 0?typeof f=="string"?s(k).fill(c,f):s(k).fill(c):s(k)}a.alloc=function(k,c,f){return d(k,c,f)};function h(k){return l(k),s(k<0?0:w(k)|0)}a.allocUnsafe=function(k){return h(k)},a.allocUnsafeSlow=function(k){return h(k)};function m(k,c){if((typeof c!="string"||c==="")&&(c="utf8"),!a.isEncoding(c))throw new TypeError("Unknown encoding: "+c);const f=_(k,c)|0;let N=s(f);const z=N.write(k,c);return z!==f&&(N=N.slice(0,z)),N}function g(k){const c=k.length<0?0:w(k.length)|0,f=s(c);for(let N=0;N<c;N+=1)f[N]=k[N]&255;return f}function p(k){if(qe(k,Uint8Array)){const c=new Uint8Array(k);return v(c.buffer,c.byteOffset,c.byteLength)}return g(k)}function v(k,c,f){if(c<0||k.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<c+(f||0))throw new RangeError('"length" is outside of buffer bounds');let N;return c===void 0&&f===void 0?N=new Uint8Array(k):f===void 0?N=new Uint8Array(k,c):N=new Uint8Array(k,c,f),Object.setPrototypeOf(N,a.prototype),N}function y(k){if(a.isBuffer(k)){const c=w(k.length)|0,f=s(c);return f.length===0||k.copy(f,0,0,c),f}if(k.length!==void 0)return typeof k.length!="number"||Je(k.length)?s(0):g(k);if(k.type==="Buffer"&&Array.isArray(k.data))return g(k.data)}function w(k){if(k>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==a.prototype},a.compare=function(c,f){if(qe(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),qe(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(c)||!a.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===f)return 0;let N=c.length,z=f.length;for(let C=0,M=Math.min(N,z);C<M;++C)if(c[C]!==f[C]){N=c[C],z=f[C];break}return N<z?-1:z<N?1:0},a.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(c,f){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return a.alloc(0);let N;if(f===void 0)for(f=0,N=0;N<c.length;++N)f+=c[N].length;const z=a.allocUnsafe(f);let C=0;for(N=0;N<c.length;++N){let M=c[N];if(qe(M,Uint8Array))C+M.length>z.length?(a.isBuffer(M)||(M=a.from(M)),M.copy(z,C)):Uint8Array.prototype.set.call(z,M,C);else if(a.isBuffer(M))M.copy(z,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=M.length}return z};function _(k,c){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||qe(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const f=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&f===0)return 0;let z=!1;for(;;)switch(c){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return ke(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return Me(k).length;default:if(z)return N?-1:ke(k).length;c=(""+c).toLowerCase(),z=!0}}a.byteLength=_;function I(k,c,f){let N=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,c>>>=0,f<=c))return"";for(k||(k="utf8");;)switch(k){case"hex":return ce(this,c,f);case"utf8":case"utf-8":return me(this,c,f);case"ascii":return ie(this,c,f);case"latin1":case"binary":return re(this,c,f);case"base64":return oe(this,c,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,c,f);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}a.prototype._isBuffer=!0;function $(k,c,f){const N=k[c];k[c]=k[f],k[f]=N}a.prototype.swap16=function(){const c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let f=0;f<c;f+=2)$(this,f,f+1);return this},a.prototype.swap32=function(){const c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let f=0;f<c;f+=4)$(this,f,f+3),$(this,f+1,f+2);return this},a.prototype.swap64=function(){const c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let f=0;f<c;f+=8)$(this,f,f+7),$(this,f+1,f+6),$(this,f+2,f+5),$(this,f+3,f+4);return this},a.prototype.toString=function(){const c=this.length;return c===0?"":arguments.length===0?me(this,0,c):I.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(c){if(!a.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:a.compare(this,c)===0},a.prototype.inspect=function(){let c="";const f=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(c+=" ... "),"<Buffer "+c+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(c,f,N,z,C){if(qe(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(f===void 0&&(f=0),N===void 0&&(N=c?c.length:0),z===void 0&&(z=0),C===void 0&&(C=this.length),f<0||N>c.length||z<0||C>this.length)throw new RangeError("out of range index");if(z>=C&&f>=N)return 0;if(z>=C)return-1;if(f>=N)return 1;if(f>>>=0,N>>>=0,z>>>=0,C>>>=0,this===c)return 0;let M=C-z,ge=N-f;const ze=Math.min(M,ge),xe=this.slice(z,C),Te=c.slice(f,N);for(let Se=0;Se<ze;++Se)if(xe[Se]!==Te[Se]){M=xe[Se],ge=Te[Se];break}return M<ge?-1:ge<M?1:0};function E(k,c,f,N,z){if(k.length===0)return-1;if(typeof f=="string"?(N=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,Je(f)&&(f=z?0:k.length-1),f<0&&(f=k.length+f),f>=k.length){if(z)return-1;f=k.length-1}else if(f<0)if(z)f=0;else return-1;if(typeof c=="string"&&(c=a.from(c,N)),a.isBuffer(c))return c.length===0?-1:O(k,c,f,N,z);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?z?Uint8Array.prototype.indexOf.call(k,c,f):Uint8Array.prototype.lastIndexOf.call(k,c,f):O(k,[c],f,N,z);throw new TypeError("val must be string, number or Buffer")}function O(k,c,f,N,z){let C=1,M=k.length,ge=c.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||c.length<2)return-1;C=2,M/=2,ge/=2,f/=2}function ze(Te,Se){return C===1?Te[Se]:Te.readUInt16BE(Se*C)}let xe;if(z){let Te=-1;for(xe=f;xe<M;xe++)if(ze(k,xe)===ze(c,Te===-1?0:xe-Te)){if(Te===-1&&(Te=xe),xe-Te+1===ge)return Te*C}else Te!==-1&&(xe-=xe-Te),Te=-1}else for(f+ge>M&&(f=M-ge),xe=f;xe>=0;xe--){let Te=!0;for(let Se=0;Se<ge;Se++)if(ze(k,xe+Se)!==ze(c,Se)){Te=!1;break}if(Te)return xe}return-1}a.prototype.includes=function(c,f,N){return this.indexOf(c,f,N)!==-1},a.prototype.indexOf=function(c,f,N){return E(this,c,f,N,!0)},a.prototype.lastIndexOf=function(c,f,N){return E(this,c,f,N,!1)};function j(k,c,f,N){f=Number(f)||0;const z=k.length-f;N?(N=Number(N),N>z&&(N=z)):N=z;const C=c.length;N>C/2&&(N=C/2);let M;for(M=0;M<N;++M){const ge=parseInt(c.substr(M*2,2),16);if(Je(ge))return M;k[f+M]=ge}return M}function Z(k,c,f,N){return Ae(ke(c,k.length-f),k,f,N)}function W(k,c,f,N){return Ae(Fe(c),k,f,N)}function X(k,c,f,N){return Ae(Me(c),k,f,N)}function Q(k,c,f,N){return Ae(Ke(c,k.length-f),k,f,N)}a.prototype.write=function(c,f,N,z){if(f===void 0)z="utf8",N=this.length,f=0;else if(N===void 0&&typeof f=="string")z=f,N=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(N)?(N=N>>>0,z===void 0&&(z="utf8")):(z=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-f;if((N===void 0||N>C)&&(N=C),c.length>0&&(N<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let M=!1;for(;;)switch(z){case"hex":return j(this,c,f,N);case"utf8":case"utf-8":return Z(this,c,f,N);case"ascii":case"latin1":case"binary":return W(this,c,f,N);case"base64":return X(this,c,f,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,c,f,N);default:if(M)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),M=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(k,c,f){return c===0&&f===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(c,f))}function me(k,c,f){f=Math.min(k.length,f);const N=[];let z=c;for(;z<f;){const C=k[z];let M=null,ge=C>239?4:C>223?3:C>191?2:1;if(z+ge<=f){let ze,xe,Te,Se;switch(ge){case 1:C<128&&(M=C);break;case 2:ze=k[z+1],(ze&192)===128&&(Se=(C&31)<<6|ze&63,Se>127&&(M=Se));break;case 3:ze=k[z+1],xe=k[z+2],(ze&192)===128&&(xe&192)===128&&(Se=(C&15)<<12|(ze&63)<<6|xe&63,Se>2047&&(Se<55296||Se>57343)&&(M=Se));break;case 4:ze=k[z+1],xe=k[z+2],Te=k[z+3],(ze&192)===128&&(xe&192)===128&&(Te&192)===128&&(Se=(C&15)<<18|(ze&63)<<12|(xe&63)<<6|Te&63,Se>65535&&Se<1114112&&(M=Se))}}M===null?(M=65533,ge=1):M>65535&&(M-=65536,N.push(M>>>10&1023|55296),M=56320|M&1023),N.push(M),z+=ge}return Y(N)}const F=4096;function Y(k){const c=k.length;if(c<=F)return String.fromCharCode.apply(String,k);let f="",N=0;for(;N<c;)f+=String.fromCharCode.apply(String,k.slice(N,N+=F));return f}function ie(k,c,f){let N="";f=Math.min(k.length,f);for(let z=c;z<f;++z)N+=String.fromCharCode(k[z]&127);return N}function re(k,c,f){let N="";f=Math.min(k.length,f);for(let z=c;z<f;++z)N+=String.fromCharCode(k[z]);return N}function ce(k,c,f){const N=k.length;(!c||c<0)&&(c=0),(!f||f<0||f>N)&&(f=N);let z="";for(let C=c;C<f;++C)z+=On[k[C]];return z}function K(k,c,f){const N=k.slice(c,f);let z="";for(let C=0;C<N.length-1;C+=2)z+=String.fromCharCode(N[C]+N[C+1]*256);return z}a.prototype.slice=function(c,f){const N=this.length;c=~~c,f=f===void 0?N:~~f,c<0?(c+=N,c<0&&(c=0)):c>N&&(c=N),f<0?(f+=N,f<0&&(f=0)):f>N&&(f=N),f<c&&(f=c);const z=this.subarray(c,f);return Object.setPrototypeOf(z,a.prototype),z};function A(k,c,f){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+c>f)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(c,f,N){c=c>>>0,f=f>>>0,N||A(c,f,this.length);let z=this[c],C=1,M=0;for(;++M<f&&(C*=256);)z+=this[c+M]*C;return z},a.prototype.readUintBE=a.prototype.readUIntBE=function(c,f,N){c=c>>>0,f=f>>>0,N||A(c,f,this.length);let z=this[c+--f],C=1;for(;f>0&&(C*=256);)z+=this[c+--f]*C;return z},a.prototype.readUint8=a.prototype.readUInt8=function(c,f){return c=c>>>0,f||A(c,1,this.length),this[c]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(c,f){return c=c>>>0,f||A(c,2,this.length),this[c]|this[c+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(c,f){return c=c>>>0,f||A(c,2,this.length),this[c]<<8|this[c+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(c,f){return c=c>>>0,f||A(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(c,f){return c=c>>>0,f||A(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},a.prototype.readBigUInt64LE=ot(function(c){c=c>>>0,L(c,"offset");const f=this[c],N=this[c+7];(f===void 0||N===void 0)&&J(c,this.length-8);const z=f+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,C=this[++c]+this[++c]*2**8+this[++c]*2**16+N*2**24;return BigInt(z)+(BigInt(C)<<BigInt(32))}),a.prototype.readBigUInt64BE=ot(function(c){c=c>>>0,L(c,"offset");const f=this[c],N=this[c+7];(f===void 0||N===void 0)&&J(c,this.length-8);const z=f*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],C=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+N;return(BigInt(z)<<BigInt(32))+BigInt(C)}),a.prototype.readIntLE=function(c,f,N){c=c>>>0,f=f>>>0,N||A(c,f,this.length);let z=this[c],C=1,M=0;for(;++M<f&&(C*=256);)z+=this[c+M]*C;return C*=128,z>=C&&(z-=Math.pow(2,8*f)),z},a.prototype.readIntBE=function(c,f,N){c=c>>>0,f=f>>>0,N||A(c,f,this.length);let z=f,C=1,M=this[c+--z];for(;z>0&&(C*=256);)M+=this[c+--z]*C;return C*=128,M>=C&&(M-=Math.pow(2,8*f)),M},a.prototype.readInt8=function(c,f){return c=c>>>0,f||A(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},a.prototype.readInt16LE=function(c,f){c=c>>>0,f||A(c,2,this.length);const N=this[c]|this[c+1]<<8;return N&32768?N|4294901760:N},a.prototype.readInt16BE=function(c,f){c=c>>>0,f||A(c,2,this.length);const N=this[c+1]|this[c]<<8;return N&32768?N|4294901760:N},a.prototype.readInt32LE=function(c,f){return c=c>>>0,f||A(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},a.prototype.readInt32BE=function(c,f){return c=c>>>0,f||A(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},a.prototype.readBigInt64LE=ot(function(c){c=c>>>0,L(c,"offset");const f=this[c],N=this[c+7];(f===void 0||N===void 0)&&J(c,this.length-8);const z=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(N<<24);return(BigInt(z)<<BigInt(32))+BigInt(f+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),a.prototype.readBigInt64BE=ot(function(c){c=c>>>0,L(c,"offset");const f=this[c],N=this[c+7];(f===void 0||N===void 0)&&J(c,this.length-8);const z=(f<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(z)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+N)}),a.prototype.readFloatLE=function(c,f){return c=c>>>0,f||A(c,4,this.length),r.read(this,c,!0,23,4)},a.prototype.readFloatBE=function(c,f){return c=c>>>0,f||A(c,4,this.length),r.read(this,c,!1,23,4)},a.prototype.readDoubleLE=function(c,f){return c=c>>>0,f||A(c,8,this.length),r.read(this,c,!0,52,8)},a.prototype.readDoubleBE=function(c,f){return c=c>>>0,f||A(c,8,this.length),r.read(this,c,!1,52,8)};function B(k,c,f,N,z,C){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>z||c<C)throw new RangeError('"value" argument is out of bounds');if(f+N>k.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(c,f,N,z){if(c=+c,f=f>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;B(this,c,f,N,ge,0)}let C=1,M=0;for(this[f]=c&255;++M<N&&(C*=256);)this[f+M]=c/C&255;return f+N},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(c,f,N,z){if(c=+c,f=f>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;B(this,c,f,N,ge,0)}let C=N-1,M=1;for(this[f+C]=c&255;--C>=0&&(M*=256);)this[f+C]=c/M&255;return f+N},a.prototype.writeUint8=a.prototype.writeUInt8=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,1,255,0),this[f]=c&255,f+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,2,65535,0),this[f]=c&255,this[f+1]=c>>>8,f+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,2,65535,0),this[f]=c>>>8,this[f+1]=c&255,f+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,4,4294967295,0),this[f+3]=c>>>24,this[f+2]=c>>>16,this[f+1]=c>>>8,this[f]=c&255,f+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,4,4294967295,0),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4};function U(k,c,f,N,z){D(c,N,z,k,f,7);let C=Number(c&BigInt(4294967295));k[f++]=C,C=C>>8,k[f++]=C,C=C>>8,k[f++]=C,C=C>>8,k[f++]=C;let M=Number(c>>BigInt(32)&BigInt(4294967295));return k[f++]=M,M=M>>8,k[f++]=M,M=M>>8,k[f++]=M,M=M>>8,k[f++]=M,f}function S(k,c,f,N,z){D(c,N,z,k,f,7);let C=Number(c&BigInt(4294967295));k[f+7]=C,C=C>>8,k[f+6]=C,C=C>>8,k[f+5]=C,C=C>>8,k[f+4]=C;let M=Number(c>>BigInt(32)&BigInt(4294967295));return k[f+3]=M,M=M>>8,k[f+2]=M,M=M>>8,k[f+1]=M,M=M>>8,k[f]=M,f+8}a.prototype.writeBigUInt64LE=ot(function(c,f=0){return U(this,c,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=ot(function(c,f=0){return S(this,c,f,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(c,f,N,z){if(c=+c,f=f>>>0,!z){const ze=Math.pow(2,8*N-1);B(this,c,f,N,ze-1,-ze)}let C=0,M=1,ge=0;for(this[f]=c&255;++C<N&&(M*=256);)c<0&&ge===0&&this[f+C-1]!==0&&(ge=1),this[f+C]=(c/M>>0)-ge&255;return f+N},a.prototype.writeIntBE=function(c,f,N,z){if(c=+c,f=f>>>0,!z){const ze=Math.pow(2,8*N-1);B(this,c,f,N,ze-1,-ze)}let C=N-1,M=1,ge=0;for(this[f+C]=c&255;--C>=0&&(M*=256);)c<0&&ge===0&&this[f+C+1]!==0&&(ge=1),this[f+C]=(c/M>>0)-ge&255;return f+N},a.prototype.writeInt8=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,1,127,-128),c<0&&(c=255+c+1),this[f]=c&255,f+1},a.prototype.writeInt16LE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,2,32767,-32768),this[f]=c&255,this[f+1]=c>>>8,f+2},a.prototype.writeInt16BE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,2,32767,-32768),this[f]=c>>>8,this[f+1]=c&255,f+2},a.prototype.writeInt32LE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,4,2147483647,-2147483648),this[f]=c&255,this[f+1]=c>>>8,this[f+2]=c>>>16,this[f+3]=c>>>24,f+4},a.prototype.writeInt32BE=function(c,f,N){return c=+c,f=f>>>0,N||B(this,c,f,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[f]=c>>>24,this[f+1]=c>>>16,this[f+2]=c>>>8,this[f+3]=c&255,f+4},a.prototype.writeBigInt64LE=ot(function(c,f=0){return U(this,c,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=ot(function(c,f=0){return S(this,c,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function x(k,c,f,N,z,C){if(f+N>k.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function R(k,c,f,N,z){return c=+c,f=f>>>0,z||x(k,c,f,4),r.write(k,c,f,N,23,4),f+4}a.prototype.writeFloatLE=function(c,f,N){return R(this,c,f,!0,N)},a.prototype.writeFloatBE=function(c,f,N){return R(this,c,f,!1,N)};function te(k,c,f,N,z){return c=+c,f=f>>>0,z||x(k,c,f,8),r.write(k,c,f,N,52,8),f+8}a.prototype.writeDoubleLE=function(c,f,N){return te(this,c,f,!0,N)},a.prototype.writeDoubleBE=function(c,f,N){return te(this,c,f,!1,N)},a.prototype.copy=function(c,f,N,z){if(!a.isBuffer(c))throw new TypeError("argument should be a Buffer");if(N||(N=0),!z&&z!==0&&(z=this.length),f>=c.length&&(f=c.length),f||(f=0),z>0&&z<N&&(z=N),z===N||c.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),c.length-f<z-N&&(z=c.length-f+N);const C=z-N;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(f,N,z):Uint8Array.prototype.set.call(c,this.subarray(N,z),f),C},a.prototype.fill=function(c,f,N,z){if(typeof c=="string"){if(typeof f=="string"?(z=f,f=0,N=this.length):typeof N=="string"&&(z=N,N=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!a.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(c.length===1){const M=c.charCodeAt(0);(z==="utf8"&&M<128||z==="latin1")&&(c=M)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(f<0||this.length<f||this.length<N)throw new RangeError("Out of range index");if(N<=f)return this;f=f>>>0,N=N===void 0?this.length:N>>>0,c||(c=0);let C;if(typeof c=="number")for(C=f;C<N;++C)this[C]=c;else{const M=a.isBuffer(c)?c:a.from(c,z),ge=M.length;if(ge===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(C=0;C<N-f;++C)this[C+f]=M[C%ge]}return this};const ee={};function pe(k,c,f){ee[k]=class extends f{constructor(){super(),Object.defineProperty(this,"message",{value:c.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}pe("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),pe("ERR_INVALID_ARG_TYPE",function(k,c){return`The "${k}" argument must be of type number. Received type ${typeof c}`},TypeError),pe("ERR_OUT_OF_RANGE",function(k,c,f){let N=`The value of "${k}" is out of range.`,z=f;return Number.isInteger(f)&&Math.abs(f)>2**32?z=se(String(f)):typeof f=="bigint"&&(z=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(z=se(z)),z+="n"),N+=` It must be ${c}. Received ${z}`,N},RangeError);function se(k){let c="",f=k.length;const N=k[0]==="-"?1:0;for(;f>=N+4;f-=3)c=`_${k.slice(f-3,f)}${c}`;return`${k.slice(0,f)}${c}`}function T(k,c,f){L(c,"offset"),(k[c]===void 0||k[c+f]===void 0)&&J(c,k.length-(f+1))}function D(k,c,f,N,z,C){if(k>f||k<c){const M=typeof c=="bigint"?"n":"";let ge;throw c===0||c===BigInt(0)?ge=`>= 0${M} and < 2${M} ** ${(C+1)*8}${M}`:ge=`>= -(2${M} ** ${(C+1)*8-1}${M}) and < 2 ** ${(C+1)*8-1}${M}`,new ee.ERR_OUT_OF_RANGE("value",ge,k)}T(N,z,C)}function L(k,c){if(typeof k!="number")throw new ee.ERR_INVALID_ARG_TYPE(c,"number",k)}function J(k,c,f){throw Math.floor(k)!==k?(L(k,f),new ee.ERR_OUT_OF_RANGE("offset","an integer",k)):c<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${c}`,k)}const ne=/[^+/0-9A-Za-z-_]/g;function le(k){if(k=k.split("=")[0],k=k.trim().replace(ne,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function ke(k,c){c=c||1/0;let f;const N=k.length;let z=null;const C=[];for(let M=0;M<N;++M){if(f=k.charCodeAt(M),f>55295&&f<57344){if(!z){if(f>56319){(c-=3)>-1&&C.push(239,191,189);continue}else if(M+1===N){(c-=3)>-1&&C.push(239,191,189);continue}z=f;continue}if(f<56320){(c-=3)>-1&&C.push(239,191,189),z=f;continue}f=(z-55296<<10|f-56320)+65536}else z&&(c-=3)>-1&&C.push(239,191,189);if(z=null,f<128){if((c-=1)<0)break;C.push(f)}else if(f<2048){if((c-=2)<0)break;C.push(f>>6|192,f&63|128)}else if(f<65536){if((c-=3)<0)break;C.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((c-=4)<0)break;C.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return C}function Fe(k){const c=[];for(let f=0;f<k.length;++f)c.push(k.charCodeAt(f)&255);return c}function Ke(k,c){let f,N,z;const C=[];for(let M=0;M<k.length&&!((c-=2)<0);++M)f=k.charCodeAt(M),N=f>>8,z=f%256,C.push(z),C.push(N);return C}function Me(k){return t.toByteArray(le(k))}function Ae(k,c,f,N){let z;for(z=0;z<N&&!(z+f>=c.length||z>=k.length);++z)c[z+f]=k[z];return z}function qe(k,c){return k instanceof c||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===c.name}function Je(k){return k!==k}const On=(function(){const k="0123456789abcdef",c=new Array(256);for(let f=0;f<16;++f){const N=f*16;for(let z=0;z<16;++z)c[N+z]=k[f]+k[z]}return c})();function ot(k){return typeof BigInt>"u"?Ft:k}function Ft(){throw new Error("BigInt not supported")}})(co)),co}var _r=w_();function sn(e){const t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!0),new Uint8Array(t)}class k_ extends Da{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t??{}))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,resolvedInputs:i,sourceHash:n,state:o}){const s=[];s.push(_r.Buffer.from(t.id)),s.push(sn(r.definitionHash)),o?.inputHashNonce&&s.push(sn(o.inputHashNonce)),t.args&&s.push(b_(t.args)),n?s.push(sn(n)):Ua(r)&&this.logger.warn({instanceId:t.id},"missing source hash for unit model, this may lead to incorrect input hash");const a=Object.entries(i).sort(([h],[m])=>h.localeCompare(m)),u=new Set;for(const[h,m]of a){if(Object.keys(m).length===0)continue;s.push(_r.Buffer.from(h));const g=m.map(p=>p.input.instanceId).sort();for(const p of g){const v=this.outputs.get(p);if(!v){this.logger.warn({instanceId:p,dependentInstanceId:t.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}s.push(sn(v.inputHash)),s.push(sn(v.outputHash)),u.add(p)}}const l=[],d=Array.from(u).sort();for(const h of d){const m=this.outputs.get(h);if(!m){this.logger.warn({instanceId:h,dependentInstanceId:t.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}l.push(sn(m.outputHash))}return{inputHash:yu(_r.Buffer.concat(s)),dependencyOutputHash:yu(_r.Buffer.concat(l)),outputHash:o?.outputHash??0}}}var wr={exports:{}},lo={},wt={},Zt={},fo={},ho={},mo={},_u;function wi(){return _u||(_u=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(b){if(super(),!e.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((_,I)=>`${_}${I}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((_,I)=>(I instanceof r&&(_[I.str]=(_[I.str]||0)+1),_),{})}}e._Code=i,e.nil=new i("");function n(w,...b){const _=[w[0]];let I=0;for(;I<b.length;)a(_,b[I]),_.push(w[++I]);return new i(_)}e._=n;const o=new i("+");function s(w,...b){const _=[g(w[0])];let I=0;for(;I<b.length;)_.push(o),a(_,b[I]),_.push(o,g(w[++I]));return u(_),new i(_)}e.str=s;function a(w,b){b instanceof i?w.push(...b._items):b instanceof r?w.push(b):w.push(h(b))}e.addCodeArg=a;function u(w){let b=1;for(;b<w.length-1;){if(w[b]===o){const _=l(w[b-1],w[b+1]);if(_!==void 0){w.splice(b-1,3,_);continue}w[b++]="+"}b++}}function l(w,b){if(b==='""')return w;if(w==='""')return b;if(typeof w=="string")return b instanceof r||w[w.length-1]!=='"'?void 0:typeof b!="string"?`${w.slice(0,-1)}${b}"`:b[0]==='"'?w.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(w instanceof r))return`"${w}${b.slice(1)}`}function d(w,b){return b.emptyStr()?w:w.emptyStr()?b:s`${w}${b}`}e.strConcat=d;function h(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:g(Array.isArray(w)?w.join(","):w)}function m(w){return new i(g(w))}e.stringify=m;function g(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=g;function p(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new i(`.${w}`):n`[${w}]`}e.getProperty=p;function v(w){if(typeof w=="string"&&e.IDENTIFIER.test(w))return new i(`${w}`);throw new Error(`CodeGen: invalid export name: ${w}, use explicit $id name mapping`)}e.getEsmExportName=v;function y(w){return new i(w.toString())}e.regexpCode=y})(mo)),mo}var po={},wu;function ku(){return wu||(wu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=wi();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var i;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:l,parent:d}={}){this._names={},this._prefixes=l,this._parent=d}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const d=this._names[l]||this._nameGroup(l);return`${l}${d.index++}`}_nameGroup(l){var d,h;if(!((h=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||h===void 0)&&h.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=n;class o extends t.Name{constructor(l,d){super(d),this.prefix=l}setValue(l,{property:d,itemIndex:h}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(d)}[${h}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class a extends n{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?s:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,d){var h;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(l),{prefix:g}=m,p=(h=d.key)!==null&&h!==void 0?h:d.ref;let v=this._values[g];if(v){const b=v.get(p);if(b)return b}else v=this._values[g]=new Map;v.set(p,m);const y=this._scope[g]||(this._scope[g]=[]),w=y.length;return y[w]=d.ref,m.setValue(d,{property:g,itemIndex:w}),m}getValue(l,d){const h=this._values[l];if(h)return h.get(d)}scopeRefs(l,d=this._values){return this._reduceValues(d,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${l}${h.scopePath}`})}scopeCode(l=this._values,d,h){return this._reduceValues(l,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},d,h)}_reduceValues(l,d,h={},m){let g=t.nil;for(const p in l){const v=l[p];if(!v)continue;const y=h[p]=h[p]||new Map;v.forEach(w=>{if(y.has(w))return;y.set(w,i.Started);let b=d(w);if(b){const _=this.opts.es5?e.varKinds.var:e.varKinds.const;g=(0,t._)`${g}${_} ${w} = ${b};${this.opts._n}`}else if(b=m?.(w))g=(0,t._)`${g}${b}${this.opts._n}`;else throw new r(w);y.set(w,i.Completed)})}return g}}e.ValueScope=a})(po)),po}var Su;function ve(){return Su||(Su=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=wi(),r=ku();var i=wi();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=ku();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(S,x){return this}}class s extends o{constructor(S,x,R){super(),this.varKind=S,this.name=x,this.rhs=R}render({es5:S,_n:x}){const R=S?r.varKinds.var:this.varKind,te=this.rhs===void 0?"":` = ${this.rhs}`;return`${R} ${this.name}${te};`+x}optimizeNames(S,x){if(S[this.name.str])return this.rhs&&(this.rhs=me(this.rhs,S,x)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(S,x,R){super(),this.lhs=S,this.rhs=x,this.sideEffects=R}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,x){if(!(this.lhs instanceof t.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=me(this.rhs,S,x),this}get names(){const S=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(S,this.rhs)}}class u extends a{constructor(S,x,R,te){super(S,R,te),this.op=x}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class l extends o{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class d extends o{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class h extends o{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class m extends o{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,x){return this.code=me(this.code,S,x),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class g extends o{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((x,R)=>x+R.render(S),"")}optimizeNodes(){const{nodes:S}=this;let x=S.length;for(;x--;){const R=S[x].optimizeNodes();Array.isArray(R)?S.splice(x,1,...R):R?S[x]=R:S.splice(x,1)}return S.length>0?this:void 0}optimizeNames(S,x){const{nodes:R}=this;let te=R.length;for(;te--;){const ee=R[te];ee.optimizeNames(S,x)||(F(S,ee.names),R.splice(te,1))}return R.length>0?this:void 0}get names(){return this.nodes.reduce((S,x)=>Q(S,x.names),{})}}class p extends g{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class v extends g{}class y extends p{}y.kind="else";class w extends p{constructor(S,x){super(x),this.condition=S}render(S){let x=`if(${this.condition})`+super.render(S);return this.else&&(x+="else "+this.else.render(S)),x}optimizeNodes(){super.optimizeNodes();const S=this.condition;if(S===!0)return this.nodes;let x=this.else;if(x){const R=x.optimizeNodes();x=this.else=Array.isArray(R)?new y(R):R}if(x)return S===!1?x instanceof w?x:x.nodes:this.nodes.length?this:new w(Y(S),x instanceof w?[x]:x.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,x){var R;if(this.else=(R=this.else)===null||R===void 0?void 0:R.optimizeNames(S,x),!!(super.optimizeNames(S,x)||this.else))return this.condition=me(this.condition,S,x),this}get names(){const S=super.names;return oe(S,this.condition),this.else&&Q(S,this.else.names),S}}w.kind="if";class b extends p{}b.kind="for";class _ extends b{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,x){if(super.optimizeNames(S,x))return this.iteration=me(this.iteration,S,x),this}get names(){return Q(super.names,this.iteration.names)}}class I extends b{constructor(S,x,R,te){super(),this.varKind=S,this.name=x,this.from=R,this.to=te}render(S){const x=S.es5?r.varKinds.var:this.varKind,{name:R,from:te,to:ee}=this;return`for(${x} ${R}=${te}; ${R}<${ee}; ${R}++)`+super.render(S)}get names(){const S=oe(super.names,this.from);return oe(S,this.to)}}class $ extends b{constructor(S,x,R,te){super(),this.loop=S,this.varKind=x,this.name=R,this.iterable=te}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,x){if(super.optimizeNames(S,x))return this.iterable=me(this.iterable,S,x),this}get names(){return Q(super.names,this.iterable.names)}}class E extends p{constructor(S,x,R){super(),this.name=S,this.args=x,this.async=R}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}E.kind="func";class O extends g{render(S){return"return "+super.render(S)}}O.kind="return";class j extends p{render(S){let x="try"+super.render(S);return this.catch&&(x+=this.catch.render(S)),this.finally&&(x+=this.finally.render(S)),x}optimizeNodes(){var S,x;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(x=this.finally)===null||x===void 0||x.optimizeNodes(),this}optimizeNames(S,x){var R,te;return super.optimizeNames(S,x),(R=this.catch)===null||R===void 0||R.optimizeNames(S,x),(te=this.finally)===null||te===void 0||te.optimizeNames(S,x),this}get names(){const S=super.names;return this.catch&&Q(S,this.catch.names),this.finally&&Q(S,this.finally.names),S}}class Z extends p{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}Z.kind="catch";class W extends p{render(S){return"finally"+super.render(S)}}W.kind="finally";class X{constructor(S,x={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...x,_n:x.lines?`
|
|
159
|
-
`:""},this._extScope=S,this._scope=new r.Scope({parent:S}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,x){const R=this._extScope.value(S,x);return(this._values[R.prefix]||(this._values[R.prefix]=new Set)).add(R),R}getScopeValue(S,x){return this._extScope.getValue(S,x)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,x,R,te){const ee=this._scope.toName(x);return R!==void 0&&te&&(this._constants[ee.str]=R),this._leafNode(new s(S,ee,R)),ee}const(S,x,R){return this._def(r.varKinds.const,S,x,R)}let(S,x,R){return this._def(r.varKinds.let,S,x,R)}var(S,x,R){return this._def(r.varKinds.var,S,x,R)}assign(S,x,R){return this._leafNode(new a(S,x,R))}add(S,x){return this._leafNode(new u(S,e.operators.ADD,x))}code(S){return typeof S=="function"?S():S!==t.nil&&this._leafNode(new m(S)),this}object(...S){const x=["{"];for(const[R,te]of S)x.length>1&&x.push(","),x.push(R),(R!==te||this.opts.es5)&&(x.push(":"),(0,t.addCodeArg)(x,te));return x.push("}"),new t._Code(x)}if(S,x,R){if(this._blockNode(new w(S)),x&&R)this.code(x).else().code(R).endIf();else if(x)this.code(x).endIf();else if(R)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new w(S))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(w,y)}_for(S,x){return this._blockNode(S),x&&this.code(x).endFor(),this}for(S,x){return this._for(new _(S),x)}forRange(S,x,R,te,ee=this.opts.es5?r.varKinds.var:r.varKinds.let){const pe=this._scope.toName(S);return this._for(new I(ee,pe,x,R),()=>te(pe))}forOf(S,x,R,te=r.varKinds.const){const ee=this._scope.toName(S);if(this.opts.es5){const pe=x instanceof t.Name?x:this.var("_arr",x);return this.forRange("_i",0,(0,t._)`${pe}.length`,se=>{this.var(ee,(0,t._)`${pe}[${se}]`),R(ee)})}return this._for(new $("of",te,ee,x),()=>R(ee))}forIn(S,x,R,te=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,(0,t._)`Object.keys(${x})`,R);const ee=this._scope.toName(S);return this._for(new $("in",te,ee,x),()=>R(ee))}endFor(){return this._endBlockNode(b)}label(S){return this._leafNode(new l(S))}break(S){return this._leafNode(new d(S))}return(S){const x=new O;if(this._blockNode(x),this.code(S),x.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(S,x,R){if(!x&&!R)throw new Error('CodeGen: "try" without "catch" and "finally"');const te=new j;if(this._blockNode(te),this.code(S),x){const ee=this.name("e");this._currNode=te.catch=new Z(ee),x(ee)}return R&&(this._currNode=te.finally=new W,this.code(R)),this._endBlockNode(Z,W)}throw(S){return this._leafNode(new h(S))}block(S,x){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(x),this}endBlock(S){const x=this._blockStarts.pop();if(x===void 0)throw new Error("CodeGen: not in self-balancing block");const R=this._nodes.length-x;if(R<0||S!==void 0&&R!==S)throw new Error(`CodeGen: wrong number of nodes: ${R} vs ${S} expected`);return this._nodes.length=x,this}func(S,x=t.nil,R,te){return this._blockNode(new E(S,x,R)),te&&this.code(te).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,x){const R=this._currNode;if(R instanceof S||x&&R instanceof x)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${x?`${S.kind}/${x.kind}`:S.kind}"`)}_elseNode(S){const x=this._currNode;if(!(x instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=x.else=S,this}get _root(){return this._nodes[0]}get _currNode(){const S=this._nodes;return S[S.length-1]}set _currNode(S){const x=this._nodes;x[x.length-1]=S}}e.CodeGen=X;function Q(U,S){for(const x in S)U[x]=(U[x]||0)+(S[x]||0);return U}function oe(U,S){return S instanceof t._CodeOrName?Q(U,S.names):U}function me(U,S,x){if(U instanceof t.Name)return R(U);if(!te(U))return U;return new t._Code(U._items.reduce((ee,pe)=>(pe instanceof t.Name&&(pe=R(pe)),pe instanceof t._Code?ee.push(...pe._items):ee.push(pe),ee),[]));function R(ee){const pe=x[ee.str];return pe===void 0||S[ee.str]!==1?ee:(delete S[ee.str],pe)}function te(ee){return ee instanceof t._Code&&ee._items.some(pe=>pe instanceof t.Name&&S[pe.str]===1&&x[pe.str]!==void 0)}}function F(U,S){for(const x in S)U[x]=(U[x]||0)-(S[x]||0)}function Y(U){return typeof U=="boolean"||typeof U=="number"||U===null?!U:(0,t._)`!${B(U)}`}e.not=Y;const ie=A(e.operators.AND);function re(...U){return U.reduce(ie)}e.and=re;const ce=A(e.operators.OR);function K(...U){return U.reduce(ce)}e.or=K;function A(U){return(S,x)=>S===t.nil?x:x===t.nil?S:(0,t._)`${B(S)} ${U} ${B(x)}`}function B(U){return U instanceof t.Name?U:(0,t._)`(${U})`}})(ho)),ho}var he={},Iu;function _e(){if(Iu)return he;Iu=1,Object.defineProperty(he,"__esModule",{value:!0}),he.checkStrictMode=he.getErrorPath=he.Type=he.useFunc=he.setEvaluated=he.evaluatedPropsToName=he.mergeEvaluated=he.eachItem=he.unescapeJsonPointer=he.escapeJsonPointer=he.escapeFragment=he.unescapeFragment=he.schemaRefOrVal=he.schemaHasRulesButRef=he.schemaHasRules=he.checkUnknownRules=he.alwaysValidSchema=he.toHash=void 0;const e=ve(),t=wi();function r($){const E={};for(const O of $)E[O]=!0;return E}he.toHash=r;function i($,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(n($,E),!o(E,$.self.RULES.all))}he.alwaysValidSchema=i;function n($,E=$.schema){const{opts:O,self:j}=$;if(!O.strictSchema||typeof E=="boolean")return;const Z=j.RULES.keywords;for(const W in E)Z[W]||I($,`unknown keyword: "${W}"`)}he.checkUnknownRules=n;function o($,E){if(typeof $=="boolean")return!$;for(const O in $)if(E[O])return!0;return!1}he.schemaHasRules=o;function s($,E){if(typeof $=="boolean")return!$;for(const O in $)if(O!=="$ref"&&E.all[O])return!0;return!1}he.schemaHasRulesButRef=s;function a({topSchemaRef:$,schemaPath:E},O,j,Z){if(!Z){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${$}${E}${(0,e.getProperty)(j)}`}he.schemaRefOrVal=a;function u($){return h(decodeURIComponent($))}he.unescapeFragment=u;function l($){return encodeURIComponent(d($))}he.escapeFragment=l;function d($){return typeof $=="number"?`${$}`:$.replace(/~/g,"~0").replace(/\//g,"~1")}he.escapeJsonPointer=d;function h($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}he.unescapeJsonPointer=h;function m($,E){if(Array.isArray($))for(const O of $)E(O);else E($)}he.eachItem=m;function g({mergeNames:$,mergeToName:E,mergeValues:O,resultToName:j}){return(Z,W,X,Q)=>{const oe=X===void 0?W:X instanceof e.Name?(W instanceof e.Name?$(Z,W,X):E(Z,W,X),X):W instanceof e.Name?(E(Z,X,W),W):O(W,X);return Q===e.Name&&!(oe instanceof e.Name)?j(Z,oe):oe}}he.mergeEvaluated={props:g({mergeNames:($,E,O)=>$.if((0,e._)`${O} !== true && ${E} !== undefined`,()=>{$.if((0,e._)`${E} === true`,()=>$.assign(O,!0),()=>$.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${E})`))}),mergeToName:($,E,O)=>$.if((0,e._)`${O} !== true`,()=>{E===!0?$.assign(O,!0):($.assign(O,(0,e._)`${O} || {}`),v($,O,E))}),mergeValues:($,E)=>$===!0?!0:{...$,...E},resultToName:p}),items:g({mergeNames:($,E,O)=>$.if((0,e._)`${O} !== true && ${E} !== undefined`,()=>$.assign(O,(0,e._)`${E} === true ? true : ${O} > ${E} ? ${O} : ${E}`)),mergeToName:($,E,O)=>$.if((0,e._)`${O} !== true`,()=>$.assign(O,E===!0?!0:(0,e._)`${O} > ${E} ? ${O} : ${E}`)),mergeValues:($,E)=>$===!0?!0:Math.max($,E),resultToName:($,E)=>$.var("items",E)})};function p($,E){if(E===!0)return $.var("props",!0);const O=$.var("props",(0,e._)`{}`);return E!==void 0&&v($,O,E),O}he.evaluatedPropsToName=p;function v($,E,O){Object.keys(O).forEach(j=>$.assign((0,e._)`${E}${(0,e.getProperty)(j)}`,!0))}he.setEvaluated=v;const y={};function w($,E){return $.scopeValue("func",{ref:E,code:y[E.code]||(y[E.code]=new t._Code(E.code))})}he.useFunc=w;var b;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(b||(he.Type=b={}));function _($,E,O){if($ instanceof e.Name){const j=E===b.Num;return O?j?(0,e._)`"[" + ${$} + "]"`:(0,e._)`"['" + ${$} + "']"`:j?(0,e._)`"/" + ${$}`:(0,e._)`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)($).toString():"/"+d($)}he.getErrorPath=_;function I($,E,O=$.opts.strictSchema){if(O){if(E=`strict mode: ${E}`,O===!0)throw new Error(E);$.self.logger.warn(E)}}return he.checkStrictMode=I,he}var kr={},Eu;function Rt(){if(Eu)return kr;Eu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ve(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return kr.default=t,kr}var Nu;function Xi(){return Nu||(Nu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ve(),r=_e(),i=Rt();e.keywordError={message:({keyword:y})=>(0,t.str)`must pass "${y}" keyword validation`},e.keyword$DataError={message:({keyword:y,schemaType:w})=>w?(0,t.str)`"${y}" keyword must be ${w} ($data)`:(0,t.str)`"${y}" keyword is invalid ($data)`};function n(y,w=e.keywordError,b,_){const{it:I}=y,{gen:$,compositeRule:E,allErrors:O}=I,j=h(y,w,b);_??(E||O)?u($,j):l(I,(0,t._)`[${j}]`)}e.reportError=n;function o(y,w=e.keywordError,b){const{it:_}=y,{gen:I,compositeRule:$,allErrors:E}=_,O=h(y,w,b);u(I,O),$||E||l(_,i.default.vErrors)}e.reportExtraError=o;function s(y,w){y.assign(i.default.errors,w),y.if((0,t._)`${i.default.vErrors} !== null`,()=>y.if(w,()=>y.assign((0,t._)`${i.default.vErrors}.length`,w),()=>y.assign(i.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:y,keyword:w,schemaValue:b,data:_,errsCount:I,it:$}){if(I===void 0)throw new Error("ajv implementation error");const E=y.name("err");y.forRange("i",I,i.default.errors,O=>{y.const(E,(0,t._)`${i.default.vErrors}[${O}]`),y.if((0,t._)`${E}.instancePath === undefined`,()=>y.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(i.default.instancePath,$.errorPath))),y.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${$.errSchemaPath}/${w}`),$.opts.verbose&&(y.assign((0,t._)`${E}.schema`,b),y.assign((0,t._)`${E}.data`,_))})}e.extendErrors=a;function u(y,w){const b=y.const("err",w);y.if((0,t._)`${i.default.vErrors} === null`,()=>y.assign(i.default.vErrors,(0,t._)`[${b}]`),(0,t._)`${i.default.vErrors}.push(${b})`),y.code((0,t._)`${i.default.errors}++`)}function l(y,w){const{gen:b,validateName:_,schemaEnv:I}=y;I.$async?b.throw((0,t._)`new ${y.ValidationError}(${w})`):(b.assign((0,t._)`${_}.errors`,w),b.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(y,w,b){const{createErrors:_}=y.it;return _===!1?(0,t._)`{}`:m(y,w,b)}function m(y,w,b={}){const{gen:_,it:I}=y,$=[g(I,b),p(y,b)];return v(y,w,$),_.object(...$)}function g({errorPath:y},{instancePath:w}){const b=w?(0,t.str)`${y}${(0,r.getErrorPath)(w,r.Type.Str)}`:y;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,b)]}function p({keyword:y,it:{errSchemaPath:w}},{schemaPath:b,parentSchema:_}){let I=_?w:(0,t.str)`${w}/${y}`;return b&&(I=(0,t.str)`${I}${(0,r.getErrorPath)(b,r.Type.Str)}`),[d.schemaPath,I]}function v(y,{params:w,message:b},_){const{keyword:I,data:$,schemaValue:E,it:O}=y,{opts:j,propertyName:Z,topSchemaRef:W,schemaPath:X}=O;_.push([d.keyword,I],[d.params,typeof w=="function"?w(y):w||(0,t._)`{}`]),j.messages&&_.push([d.message,typeof b=="function"?b(y):b]),j.verbose&&_.push([d.schema,E],[d.parentSchema,(0,t._)`${W}${X}`],[i.default.data,$]),Z&&_.push([d.propertyName,Z])}})(fo)),fo}var Ou;function S_(){if(Ou)return Zt;Ou=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.boolOrEmptySchema=Zt.topBoolOrEmptySchema=void 0;const e=Xi(),t=ve(),r=Rt(),i={message:"boolean schema is false"};function n(a){const{gen:u,schema:l,validateName:d}=a;l===!1?s(a,!1):typeof l=="object"&&l.$async===!0?u.return(r.default.data):(u.assign((0,t._)`${d}.errors`,null),u.return(!0))}Zt.topBoolOrEmptySchema=n;function o(a,u){const{gen:l,schema:d}=a;d===!1?(l.var(u,!1),s(a)):l.var(u,!0)}Zt.boolOrEmptySchema=o;function s(a,u){const{gen:l,data:d}=a,h={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(h,i,void 0,u)}return Zt}var Ve={},Lt={},xu;function vp(){if(xu)return Lt;xu=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.getRules=Lt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(n){return typeof n=="string"&&t.has(n)}Lt.isJSONType=r;function i(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}return Lt.getRules=i,Lt}var kt={},ju;function bp(){if(ju)return kt;ju=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.shouldUseRule=kt.shouldUseGroup=kt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const s=n.RULES.types[o];return s&&s!==!0&&t(i,s)}kt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}kt.shouldUseGroup=t;function r(i,n){var o;return i[n.keyword]!==void 0||((o=n.definition.implements)===null||o===void 0?void 0:o.some(s=>i[s]!==void 0))}return kt.shouldUseRule=r,kt}var Au;function ki(){if(Au)return Ve;Au=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.reportTypeError=Ve.checkDataTypes=Ve.checkDataType=Ve.coerceAndCheckDataType=Ve.getJSONTypes=Ve.getSchemaTypes=Ve.DataType=void 0;const e=vp(),t=bp(),r=Xi(),i=ve(),n=_e();var o;(function(b){b[b.Correct=0]="Correct",b[b.Wrong=1]="Wrong"})(o||(Ve.DataType=o={}));function s(b){const _=a(b.type);if(_.includes("null")){if(b.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!_.length&&b.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');b.nullable===!0&&_.push("null")}return _}Ve.getSchemaTypes=s;function a(b){const _=Array.isArray(b)?b:b?[b]:[];if(_.every(e.isJSONType))return _;throw new Error("type must be JSONType or JSONType[]: "+_.join(","))}Ve.getJSONTypes=a;function u(b,_){const{gen:I,data:$,opts:E}=b,O=d(_,E.coerceTypes),j=_.length>0&&!(O.length===0&&_.length===1&&(0,t.schemaHasRulesForType)(b,_[0]));if(j){const Z=p(_,$,E.strictNumbers,o.Wrong);I.if(Z,()=>{O.length?h(b,_,O):y(b)})}return j}Ve.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function d(b,_){return _?b.filter(I=>l.has(I)||_==="array"&&I==="array"):[]}function h(b,_,I){const{gen:$,data:E,opts:O}=b,j=$.let("dataType",(0,i._)`typeof ${E}`),Z=$.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&$.if((0,i._)`${j} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>$.assign(E,(0,i._)`${E}[0]`).assign(j,(0,i._)`typeof ${E}`).if(p(_,E,O.strictNumbers),()=>$.assign(Z,E))),$.if((0,i._)`${Z} !== undefined`);for(const X of I)(l.has(X)||X==="array"&&O.coerceTypes==="array")&&W(X);$.else(),y(b),$.endIf(),$.if((0,i._)`${Z} !== undefined`,()=>{$.assign(E,Z),m(b,Z)});function W(X){switch(X){case"string":$.elseIf((0,i._)`${j} == "number" || ${j} == "boolean"`).assign(Z,(0,i._)`"" + ${E}`).elseIf((0,i._)`${E} === null`).assign(Z,(0,i._)`""`);return;case"number":$.elseIf((0,i._)`${j} == "boolean" || ${E} === null
|
|
160
|
-
|| (${j} == "string" && ${E} && ${E} == +${E})`).assign(Z,(0,i._)`+${E}`);return;case"integer":$.elseIf((0,i._)`${j} === "boolean" || ${E} === null
|
|
161
|
-
|| (${j} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(Z,(0,i._)`+${E}`);return;case"boolean":$.elseIf((0,i._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(Z,!1).elseIf((0,i._)`${E} === "true" || ${E} === 1`).assign(Z,!0);return;case"null":$.elseIf((0,i._)`${E} === "" || ${E} === 0 || ${E} === false`),$.assign(Z,null);return;case"array":$.elseIf((0,i._)`${j} === "string" || ${j} === "number"
|
|
162
|
-
|| ${j} === "boolean" || ${E} === null`).assign(Z,(0,i._)`[${E}]`)}}}function m({gen:b,parentData:_,parentDataProperty:I},$){b.if((0,i._)`${_} !== undefined`,()=>b.assign((0,i._)`${_}[${I}]`,$))}function g(b,_,I,$=o.Correct){const E=$===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(b){case"null":return(0,i._)`${_} ${E} null`;case"array":O=(0,i._)`Array.isArray(${_})`;break;case"object":O=(0,i._)`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":O=j((0,i._)`!(${_} % 1) && !isNaN(${_})`);break;case"number":O=j();break;default:return(0,i._)`typeof ${_} ${E} ${b}`}return $===o.Correct?O:(0,i.not)(O);function j(Z=i.nil){return(0,i.and)((0,i._)`typeof ${_} == "number"`,Z,I?(0,i._)`isFinite(${_})`:i.nil)}}Ve.checkDataType=g;function p(b,_,I,$){if(b.length===1)return g(b[0],_,I,$);let E;const O=(0,n.toHash)(b);if(O.array&&O.object){const j=(0,i._)`typeof ${_} != "object"`;E=O.null?j:(0,i._)`!${_} || ${j}`,delete O.null,delete O.array,delete O.object}else E=i.nil;O.number&&delete O.integer;for(const j in O)E=(0,i.and)(E,g(j,_,I,$));return E}Ve.checkDataTypes=p;const v={message:({schema:b})=>`must be ${b}`,params:({schema:b,schemaValue:_})=>typeof b=="string"?(0,i._)`{type: ${b}}`:(0,i._)`{type: ${_}}`};function y(b){const _=w(b);(0,r.reportError)(_,v)}Ve.reportTypeError=y;function w(b){const{gen:_,data:I,schema:$}=b,E=(0,n.schemaRefOrVal)(b,$,"type");return{gen:_,keyword:"type",data:I,schema:$.type,schemaCode:E,schemaValue:E,parentSchema:$,params:{},it:b}}return Ve}var zn={},zu;function I_(){if(zu)return zn;zu=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.assignDefaults=void 0;const e=ve(),t=_e();function r(n,o){const{properties:s,items:a}=n.schema;if(o==="object"&&s)for(const u in s)i(n,u,s[u].default);else o==="array"&&Array.isArray(a)&&a.forEach((u,l)=>i(n,l,u.default))}zn.assignDefaults=r;function i(n,o,s){const{gen:a,compositeRule:u,data:l,opts:d}=n;if(s===void 0)return;const h=(0,e._)`${l}${(0,e.getProperty)(o)}`;if(u){(0,t.checkStrictMode)(n,`default is ignored for: ${h}`);return}let m=(0,e._)`${h} === undefined`;d.useDefaults==="empty"&&(m=(0,e._)`${m} || ${h} === null || ${h} === ""`),a.if(m,(0,e._)`${h} = ${(0,e.stringify)(s)}`)}return zn}var dt={},we={},Tu;function bt(){if(Tu)return we;Tu=1,Object.defineProperty(we,"__esModule",{value:!0}),we.validateUnion=we.validateArray=we.usePattern=we.callValidateCode=we.schemaProperties=we.allSchemaProperties=we.noPropertyInData=we.propertyInData=we.isOwnProperty=we.hasPropFunc=we.reportMissingProp=we.checkMissingProp=we.checkReportMissingProp=void 0;const e=ve(),t=_e(),r=Rt(),i=_e();function n(b,_){const{gen:I,data:$,it:E}=b;I.if(d(I,$,_,E.opts.ownProperties),()=>{b.setParams({missingProperty:(0,e._)`${_}`},!0),b.error()})}we.checkReportMissingProp=n;function o({gen:b,data:_,it:{opts:I}},$,E){return(0,e.or)(...$.map(O=>(0,e.and)(d(b,_,O,I.ownProperties),(0,e._)`${E} = ${O}`)))}we.checkMissingProp=o;function s(b,_){b.setParams({missingProperty:_},!0),b.error()}we.reportMissingProp=s;function a(b){return b.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}we.hasPropFunc=a;function u(b,_,I){return(0,e._)`${a(b)}.call(${_}, ${I})`}we.isOwnProperty=u;function l(b,_,I,$){const E=(0,e._)`${_}${(0,e.getProperty)(I)} !== undefined`;return $?(0,e._)`${E} && ${u(b,_,I)}`:E}we.propertyInData=l;function d(b,_,I,$){const E=(0,e._)`${_}${(0,e.getProperty)(I)} === undefined`;return $?(0,e.or)(E,(0,e.not)(u(b,_,I))):E}we.noPropertyInData=d;function h(b){return b?Object.keys(b).filter(_=>_!=="__proto__"):[]}we.allSchemaProperties=h;function m(b,_){return h(_).filter(I=>!(0,t.alwaysValidSchema)(b,_[I]))}we.schemaProperties=m;function g({schemaCode:b,data:_,it:{gen:I,topSchemaRef:$,schemaPath:E,errorPath:O},it:j},Z,W,X){const Q=X?(0,e._)`${b}, ${_}, ${$}${E}`:_,oe=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&oe.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const me=(0,e._)`${Q}, ${I.object(...oe)}`;return W!==e.nil?(0,e._)`${Z}.call(${W}, ${me})`:(0,e._)`${Z}(${me})`}we.callValidateCode=g;const p=(0,e._)`new RegExp`;function v({gen:b,it:{opts:_}},I){const $=_.unicodeRegExp?"u":"",{regExp:E}=_.code,O=E(I,$);return b.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${E.code==="new RegExp"?p:(0,i.useFunc)(b,E)}(${I}, ${$})`})}we.usePattern=v;function y(b){const{gen:_,data:I,keyword:$,it:E}=b,O=_.name("valid");if(E.allErrors){const Z=_.let("valid",!0);return j(()=>_.assign(Z,!1)),Z}return _.var(O,!0),j(()=>_.break()),O;function j(Z){const W=_.const("len",(0,e._)`${I}.length`);_.forRange("i",0,W,X=>{b.subschema({keyword:$,dataProp:X,dataPropType:t.Type.Num},O),_.if((0,e.not)(O),Z)})}}we.validateArray=y;function w(b){const{gen:_,schema:I,keyword:$,it:E}=b;if(!Array.isArray(I))throw new Error("ajv implementation error");if(I.some(W=>(0,t.alwaysValidSchema)(E,W))&&!E.opts.unevaluated)return;const j=_.let("valid",!1),Z=_.name("_valid");_.block(()=>I.forEach((W,X)=>{const Q=b.subschema({keyword:$,schemaProp:X,compositeRule:!0},Z);_.assign(j,(0,e._)`${j} || ${Z}`),b.mergeValidEvaluated(Q,Z)||_.if((0,e.not)(j))})),b.result(j,()=>b.reset(),()=>b.error(!0))}return we.validateUnion=w,we}var Pu;function E_(){if(Pu)return dt;Pu=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.validateKeywordUsage=dt.validSchemaType=dt.funcKeywordCode=dt.macroKeywordCode=void 0;const e=ve(),t=Rt(),r=bt(),i=Xi();function n(m,g){const{gen:p,keyword:v,schema:y,parentSchema:w,it:b}=m,_=g.macro.call(b.self,y,w,b),I=l(p,v,_);b.opts.validateSchema!==!1&&b.self.validateSchema(_,!0);const $=p.name("valid");m.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${b.errSchemaPath}/${v}`,topSchemaRef:I,compositeRule:!0},$),m.pass($,()=>m.error(!0))}dt.macroKeywordCode=n;function o(m,g){var p;const{gen:v,keyword:y,schema:w,parentSchema:b,$data:_,it:I}=m;u(I,g);const $=!_&&g.compile?g.compile.call(I.self,w,b,I):g.validate,E=l(v,y,$),O=v.let("valid");m.block$data(O,j),m.ok((p=g.valid)!==null&&p!==void 0?p:O);function j(){if(g.errors===!1)X(),g.modifying&&s(m),Q(()=>m.error());else{const oe=g.async?Z():W();g.modifying&&s(m),Q(()=>a(m,oe))}}function Z(){const oe=v.let("ruleErrs",null);return v.try(()=>X((0,e._)`await `),me=>v.assign(O,!1).if((0,e._)`${me} instanceof ${I.ValidationError}`,()=>v.assign(oe,(0,e._)`${me}.errors`),()=>v.throw(me))),oe}function W(){const oe=(0,e._)`${E}.errors`;return v.assign(oe,null),X(e.nil),oe}function X(oe=g.async?(0,e._)`await `:e.nil){const me=I.opts.passContext?t.default.this:t.default.self,F=!("compile"in g&&!_||g.schema===!1);v.assign(O,(0,e._)`${oe}${(0,r.callValidateCode)(m,E,me,F)}`,g.modifying)}function Q(oe){var me;v.if((0,e.not)((me=g.valid)!==null&&me!==void 0?me:O),oe)}}dt.funcKeywordCode=o;function s(m){const{gen:g,data:p,it:v}=m;g.if(v.parentData,()=>g.assign(p,(0,e._)`${v.parentData}[${v.parentDataProperty}]`))}function a(m,g){const{gen:p}=m;p.if((0,e._)`Array.isArray(${g})`,()=>{p.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${g} : ${t.default.vErrors}.concat(${g})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(m)},()=>m.error())}function u({schemaEnv:m},g){if(g.async&&!m.$async)throw new Error("async keyword in sync schema")}function l(m,g,p){if(p===void 0)throw new Error(`keyword "${g}" failed to compile`);return m.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,e.stringify)(p)})}function d(m,g,p=!1){return!g.length||g.some(v=>v==="array"?Array.isArray(m):v==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==v||p&&typeof m>"u")}dt.validSchemaType=d;function h({schema:m,opts:g,self:p,errSchemaPath:v},y,w){if(Array.isArray(y.keyword)?!y.keyword.includes(w):y.keyword!==w)throw new Error("ajv implementation error");const b=y.dependencies;if(b?.some(_=>!Object.prototype.hasOwnProperty.call(m,_)))throw new Error(`parent schema must have dependencies of ${w}: ${b.join(",")}`);if(y.validateSchema&&!y.validateSchema(m[w])){const I=`keyword "${w}" value is invalid at path "${v}": `+p.errorsText(y.validateSchema.errors);if(g.validateSchema==="log")p.logger.error(I);else throw new Error(I)}}return dt.validateKeywordUsage=h,dt}var St={},Uu;function N_(){if(Uu)return St;Uu=1,Object.defineProperty(St,"__esModule",{value:!0}),St.extendSubschemaMode=St.extendSubschemaData=St.getSubschema=void 0;const e=ve(),t=_e();function r(o,{keyword:s,schemaProp:a,schema:u,schemaPath:l,errSchemaPath:d,topSchemaRef:h}){if(s!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const m=o.schema[s];return a===void 0?{schema:m,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:m[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(u!==void 0){if(l===void 0||d===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:h,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}St.getSubschema=r;function i(o,s,{dataProp:a,dataPropType:u,data:l,dataTypes:d,propertyName:h}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=s;if(a!==void 0){const{errorPath:p,dataPathArr:v,opts:y}=s,w=m.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);g(w),o.errorPath=(0,e.str)`${p}${(0,t.getErrorPath)(a,u,y.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...v,o.parentDataProperty]}if(l!==void 0){const p=l instanceof e.Name?l:m.let("data",l,!0);g(p),h!==void 0&&(o.propertyName=h)}d&&(o.dataTypes=d);function g(p){o.data=p,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,p]}}St.extendSubschemaData=i;function n(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:u,createErrors:l,allErrors:d}){u!==void 0&&(o.compositeRule=u),l!==void 0&&(o.createErrors=l),d!==void 0&&(o.allErrors=d),o.jtdDiscriminator=s,o.jtdMetadata=a}return St.extendSubschemaMode=n,St}var We={},go,Du;function $p(){return Du||(Du=1,go=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),go}var yo={exports:{}},Cu;function O_(){if(Cu)return yo.exports;Cu=1;var e=yo.exports=function(i,n,o){typeof n=="function"&&(o=n,n={}),o=n.cb||o;var s=typeof o=="function"?o:o.pre||function(){},a=o.post||function(){};t(n,s,a,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,n,o,s,a,u,l,d,h,m){if(s&&typeof s=="object"&&!Array.isArray(s)){n(s,a,u,l,d,h,m);for(var g in s){var p=s[g];if(Array.isArray(p)){if(g in e.arrayKeywords)for(var v=0;v<p.length;v++)t(i,n,o,p[v],a+"/"+g+"/"+v,u,a,g,s,v)}else if(g in e.propsKeywords){if(p&&typeof p=="object")for(var y in p)t(i,n,o,p[y],a+"/"+g+"/"+r(y),u,a,g,s,y)}else(g in e.keywords||i.allKeys&&!(g in e.skipKeywords))&&t(i,n,o,p,a+"/"+g,u,a,g,s)}o(s,a,u,l,d,h,m)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return yo.exports}var Bu;function Yi(){if(Bu)return We;Bu=1,Object.defineProperty(We,"__esModule",{value:!0}),We.getSchemaRefs=We.resolveUrl=We.normalizeId=We._getFullPath=We.getFullPath=We.inlineRef=void 0;const e=_e(),t=$p(),r=O_(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(v,y=!0){return typeof v=="boolean"?!0:y===!0?!s(v):y?a(v)<=y:!1}We.inlineRef=n;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(v){for(const y in v){if(o.has(y))return!0;const w=v[y];if(Array.isArray(w)&&w.some(s)||typeof w=="object"&&s(w))return!0}return!1}function a(v){let y=0;for(const w in v){if(w==="$ref")return 1/0;if(y++,!i.has(w)&&(typeof v[w]=="object"&&(0,e.eachItem)(v[w],b=>y+=a(b)),y===1/0))return 1/0}return y}function u(v,y="",w){w!==!1&&(y=h(y));const b=v.parse(y);return l(v,b)}We.getFullPath=u;function l(v,y){return v.serialize(y).split("#")[0]+"#"}We._getFullPath=l;const d=/#\/?$/;function h(v){return v?v.replace(d,""):""}We.normalizeId=h;function m(v,y,w){return w=h(w),v.resolve(y,w)}We.resolveUrl=m;const g=/^[a-z_][-a-z0-9._]*$/i;function p(v,y){if(typeof v=="boolean")return{};const{schemaId:w,uriResolver:b}=this.opts,_=h(v[w]||y),I={"":_},$=u(b,_,!1),E={},O=new Set;return r(v,{allKeys:!0},(W,X,Q,oe)=>{if(oe===void 0)return;const me=$+X;let F=I[oe];typeof W[w]=="string"&&(F=Y.call(this,W[w])),ie.call(this,W.$anchor),ie.call(this,W.$dynamicAnchor),I[X]=F;function Y(re){const ce=this.opts.uriResolver.resolve;if(re=h(F?ce(F,re):re),O.has(re))throw Z(re);O.add(re);let K=this.refs[re];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?j(W,K.schema,re):re!==h(me)&&(re[0]==="#"?(j(W,E[re],re),E[re]=W):this.refs[re]=me),re}function ie(re){if(typeof re=="string"){if(!g.test(re))throw new Error(`invalid anchor "${re}"`);Y.call(this,`#${re}`)}}}),E;function j(W,X,Q){if(X!==void 0&&!t(W,X))throw Z(Q)}function Z(W){return new Error(`reference "${W}" resolves to more than one schema`)}}return We.getSchemaRefs=p,We}var Ru;function Qi(){if(Ru)return wt;Ru=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;const e=S_(),t=ki(),r=bp(),i=ki(),n=I_(),o=E_(),s=N_(),a=ve(),u=Rt(),l=Yi(),d=_e(),h=Xi();function m(T){if($(T)&&(O(T),I(T))){y(T);return}g(T,()=>(0,e.topBoolOrEmptySchema)(T))}wt.validateFunctionCode=m;function g({gen:T,validateName:D,schema:L,schemaEnv:J,opts:ne},le){ne.code.es5?T.func(D,(0,a._)`${u.default.data}, ${u.default.valCxt}`,J.$async,()=>{T.code((0,a._)`"use strict"; ${b(L,ne)}`),v(T,ne),T.code(le)}):T.func(D,(0,a._)`${u.default.data}, ${p(ne)}`,J.$async,()=>T.code(b(L,ne)).code(le))}function p(T){return(0,a._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${T.dynamicRef?(0,a._)`, ${u.default.dynamicAnchors}={}`:a.nil}}={}`}function v(T,D){T.if(u.default.valCxt,()=>{T.var(u.default.instancePath,(0,a._)`${u.default.valCxt}.${u.default.instancePath}`),T.var(u.default.parentData,(0,a._)`${u.default.valCxt}.${u.default.parentData}`),T.var(u.default.parentDataProperty,(0,a._)`${u.default.valCxt}.${u.default.parentDataProperty}`),T.var(u.default.rootData,(0,a._)`${u.default.valCxt}.${u.default.rootData}`),D.dynamicRef&&T.var(u.default.dynamicAnchors,(0,a._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{T.var(u.default.instancePath,(0,a._)`""`),T.var(u.default.parentData,(0,a._)`undefined`),T.var(u.default.parentDataProperty,(0,a._)`undefined`),T.var(u.default.rootData,u.default.data),D.dynamicRef&&T.var(u.default.dynamicAnchors,(0,a._)`{}`)})}function y(T){const{schema:D,opts:L,gen:J}=T;g(T,()=>{L.$comment&&D.$comment&&oe(T),W(T),J.let(u.default.vErrors,null),J.let(u.default.errors,0),L.unevaluated&&w(T),j(T),me(T)})}function w(T){const{gen:D,validateName:L}=T;T.evaluated=D.const("evaluated",(0,a._)`${L}.evaluated`),D.if((0,a._)`${T.evaluated}.dynamicProps`,()=>D.assign((0,a._)`${T.evaluated}.props`,(0,a._)`undefined`)),D.if((0,a._)`${T.evaluated}.dynamicItems`,()=>D.assign((0,a._)`${T.evaluated}.items`,(0,a._)`undefined`))}function b(T,D){const L=typeof T=="object"&&T[D.schemaId];return L&&(D.code.source||D.code.process)?(0,a._)`/*# sourceURL=${L} */`:a.nil}function _(T,D){if($(T)&&(O(T),I(T))){E(T,D);return}(0,e.boolOrEmptySchema)(T,D)}function I({schema:T,self:D}){if(typeof T=="boolean")return!T;for(const L in T)if(D.RULES.all[L])return!0;return!1}function $(T){return typeof T.schema!="boolean"}function E(T,D){const{schema:L,gen:J,opts:ne}=T;ne.$comment&&L.$comment&&oe(T),X(T),Q(T);const le=J.const("_errs",u.default.errors);j(T,le),J.var(D,(0,a._)`${le} === ${u.default.errors}`)}function O(T){(0,d.checkUnknownRules)(T),Z(T)}function j(T,D){if(T.opts.jtd)return Y(T,[],!1,D);const L=(0,t.getSchemaTypes)(T.schema),J=(0,t.coerceAndCheckDataType)(T,L);Y(T,L,!J,D)}function Z(T){const{schema:D,errSchemaPath:L,opts:J,self:ne}=T;D.$ref&&J.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(D,ne.RULES)&&ne.logger.warn(`$ref: keywords ignored in schema at path "${L}"`)}function W(T){const{schema:D,opts:L}=T;D.default!==void 0&&L.useDefaults&&L.strictSchema&&(0,d.checkStrictMode)(T,"default is ignored in the schema root")}function X(T){const D=T.schema[T.opts.schemaId];D&&(T.baseId=(0,l.resolveUrl)(T.opts.uriResolver,T.baseId,D))}function Q(T){if(T.schema.$async&&!T.schemaEnv.$async)throw new Error("async schema in sync schema")}function oe({gen:T,schemaEnv:D,schema:L,errSchemaPath:J,opts:ne}){const le=L.$comment;if(ne.$comment===!0)T.code((0,a._)`${u.default.self}.logger.log(${le})`);else if(typeof ne.$comment=="function"){const ke=(0,a.str)`${J}/$comment`,Fe=T.scopeValue("root",{ref:D.root});T.code((0,a._)`${u.default.self}.opts.$comment(${le}, ${ke}, ${Fe}.schema)`)}}function me(T){const{gen:D,schemaEnv:L,validateName:J,ValidationError:ne,opts:le}=T;L.$async?D.if((0,a._)`${u.default.errors} === 0`,()=>D.return(u.default.data),()=>D.throw((0,a._)`new ${ne}(${u.default.vErrors})`)):(D.assign((0,a._)`${J}.errors`,u.default.vErrors),le.unevaluated&&F(T),D.return((0,a._)`${u.default.errors} === 0`))}function F({gen:T,evaluated:D,props:L,items:J}){L instanceof a.Name&&T.assign((0,a._)`${D}.props`,L),J instanceof a.Name&&T.assign((0,a._)`${D}.items`,J)}function Y(T,D,L,J){const{gen:ne,schema:le,data:ke,allErrors:Fe,opts:Ke,self:Me}=T,{RULES:Ae}=Me;if(le.$ref&&(Ke.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(le,Ae))){ne.block(()=>te(T,"$ref",Ae.all.$ref.definition));return}Ke.jtd||re(T,D),ne.block(()=>{for(const Je of Ae.rules)qe(Je);qe(Ae.post)});function qe(Je){(0,r.shouldUseGroup)(le,Je)&&(Je.type?(ne.if((0,i.checkDataType)(Je.type,ke,Ke.strictNumbers)),ie(T,Je),D.length===1&&D[0]===Je.type&&L&&(ne.else(),(0,i.reportTypeError)(T)),ne.endIf()):ie(T,Je),Fe||ne.if((0,a._)`${u.default.errors} === ${J||0}`))}}function ie(T,D){const{gen:L,schema:J,opts:{useDefaults:ne}}=T;ne&&(0,n.assignDefaults)(T,D.type),L.block(()=>{for(const le of D.rules)(0,r.shouldUseRule)(J,le)&&te(T,le.keyword,le.definition,D.type)})}function re(T,D){T.schemaEnv.meta||!T.opts.strictTypes||(ce(T,D),T.opts.allowUnionTypes||K(T,D),A(T,T.dataTypes))}function ce(T,D){if(D.length){if(!T.dataTypes.length){T.dataTypes=D;return}D.forEach(L=>{U(T.dataTypes,L)||x(T,`type "${L}" not allowed by context "${T.dataTypes.join(",")}"`)}),S(T,D)}}function K(T,D){D.length>1&&!(D.length===2&&D.includes("null"))&&x(T,"use allowUnionTypes to allow union type keyword")}function A(T,D){const L=T.self.RULES.all;for(const J in L){const ne=L[J];if(typeof ne=="object"&&(0,r.shouldUseRule)(T.schema,ne)){const{type:le}=ne.definition;le.length&&!le.some(ke=>B(D,ke))&&x(T,`missing type "${le.join(",")}" for keyword "${J}"`)}}}function B(T,D){return T.includes(D)||D==="number"&&T.includes("integer")}function U(T,D){return T.includes(D)||D==="integer"&&T.includes("number")}function S(T,D){const L=[];for(const J of T.dataTypes)U(D,J)?L.push(J):D.includes("integer")&&J==="number"&&L.push("integer");T.dataTypes=L}function x(T,D){const L=T.schemaEnv.baseId+T.errSchemaPath;D+=` at "${L}" (strictTypes)`,(0,d.checkStrictMode)(T,D,T.opts.strictTypes)}class R{constructor(D,L,J){if((0,o.validateKeywordUsage)(D,L,J),this.gen=D.gen,this.allErrors=D.allErrors,this.keyword=J,this.data=D.data,this.schema=D.schema[J],this.$data=L.$data&&D.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(D,this.schema,J,this.$data),this.schemaType=L.schemaType,this.parentSchema=D.schema,this.params={},this.it=D,this.def=L,this.$data)this.schemaCode=D.gen.const("vSchema",se(this.$data,D));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==!1)&&(this.errsCount=D.gen.const("_errs",u.default.errors))}result(D,L,J){this.failResult((0,a.not)(D),L,J)}failResult(D,L,J){this.gen.if(D),J?J():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(D,L){this.failResult((0,a.not)(D),void 0,L)}fail(D){if(D===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(D),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(D){if(!this.$data)return this.fail(D);const{schemaCode:L}=this;this.fail((0,a._)`${L} !== undefined && (${(0,a.or)(this.invalid$data(),D)})`)}error(D,L,J){if(L){this.setParams(L),this._error(D,J),this.setParams({});return}this._error(D,J)}_error(D,L){(D?h.reportExtraError:h.reportError)(this,this.def.error,L)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(D){this.allErrors||this.gen.if(D)}setParams(D,L){L?Object.assign(this.params,D):this.params=D}block$data(D,L,J=a.nil){this.gen.block(()=>{this.check$data(D,J),L()})}check$data(D=a.nil,L=a.nil){if(!this.$data)return;const{gen:J,schemaCode:ne,schemaType:le,def:ke}=this;J.if((0,a.or)((0,a._)`${ne} === undefined`,L)),D!==a.nil&&J.assign(D,!0),(le.length||ke.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),D!==a.nil&&J.assign(D,!1)),J.else()}invalid$data(){const{gen:D,schemaCode:L,schemaType:J,def:ne,it:le}=this;return(0,a.or)(ke(),Fe());function ke(){if(J.length){if(!(L instanceof a.Name))throw new Error("ajv implementation error");const Ke=Array.isArray(J)?J:[J];return(0,a._)`${(0,i.checkDataTypes)(Ke,L,le.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function Fe(){if(ne.validateSchema){const Ke=D.scopeValue("validate$data",{ref:ne.validateSchema});return(0,a._)`!${Ke}(${L})`}return a.nil}}subschema(D,L){const J=(0,s.getSubschema)(this.it,D);(0,s.extendSubschemaData)(J,this.it,D),(0,s.extendSubschemaMode)(J,D);const ne={...this.it,...J,items:void 0,props:void 0};return _(ne,L),ne}mergeEvaluated(D,L){const{it:J,gen:ne}=this;J.opts.unevaluated&&(J.props!==!0&&D.props!==void 0&&(J.props=d.mergeEvaluated.props(ne,D.props,J.props,L)),J.items!==!0&&D.items!==void 0&&(J.items=d.mergeEvaluated.items(ne,D.items,J.items,L)))}mergeValidEvaluated(D,L){const{it:J,gen:ne}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ne.if(L,()=>this.mergeEvaluated(D,a.Name)),!0}}wt.KeywordCxt=R;function te(T,D,L,J){const ne=new R(T,L,D);"code"in L?L.code(ne,J):ne.$data&&L.validate?(0,o.funcKeywordCode)(ne,L):"macro"in L?(0,o.macroKeywordCode)(ne,L):(L.compile||L.validate)&&(0,o.funcKeywordCode)(ne,L)}const ee=/^\/(?:[^~]|~0|~1)*$/,pe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(T,{dataLevel:D,dataNames:L,dataPathArr:J}){let ne,le;if(T==="")return u.default.rootData;if(T[0]==="/"){if(!ee.test(T))throw new Error(`Invalid JSON-pointer: ${T}`);ne=T,le=u.default.rootData}else{const Me=pe.exec(T);if(!Me)throw new Error(`Invalid JSON-pointer: ${T}`);const Ae=+Me[1];if(ne=Me[2],ne==="#"){if(Ae>=D)throw new Error(Ke("property/index",Ae));return J[D-Ae]}if(Ae>D)throw new Error(Ke("data",Ae));if(le=L[D-Ae],!ne)return le}let ke=le;const Fe=ne.split("/");for(const Me of Fe)Me&&(le=(0,a._)`${le}${(0,a.getProperty)((0,d.unescapeJsonPointer)(Me))}`,ke=(0,a._)`${ke} && ${le}`);return ke;function Ke(Me,Ae){return`Cannot access ${Me} ${Ae} levels up, current level is ${D}`}}return wt.getData=se,wt}var Sr={},Fu;function Ba(){if(Fu)return Sr;Fu=1,Object.defineProperty(Sr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Sr.default=e,Sr}var Ir={},Zu;function eo(){if(Zu)return Ir;Zu=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=Yi();class t extends Error{constructor(i,n,o,s){super(s||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,e.resolveUrl)(i,n,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Ir.default=t,Ir}var tt={},Lu;function Ra(){if(Lu)return tt;Lu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const e=ve(),t=Ba(),r=Rt(),i=Yi(),n=_e(),o=Qi();class s{constructor(w){var b;this.refs={},this.dynamicAnchors={};let _;typeof w.schema=="object"&&(_=w.schema),this.schema=w.schema,this.schemaId=w.schemaId,this.root=w.root||this,this.baseId=(b=w.baseId)!==null&&b!==void 0?b:(0,i.normalizeId)(_?.[w.schemaId||"$id"]),this.schemaPath=w.schemaPath,this.localRefs=w.localRefs,this.meta=w.meta,this.$async=_?.$async,this.refs={}}}tt.SchemaEnv=s;function a(y){const w=d.call(this,y);if(w)return w;const b=(0,i.getFullPath)(this.opts.uriResolver,y.root.baseId),{es5:_,lines:I}=this.opts.code,{ownProperties:$}=this.opts,E=new e.CodeGen(this.scope,{es5:_,lines:I,ownProperties:$});let O;y.$async&&(O=E.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=E.scopeName("validate");y.validateName=j;const Z={gen:E,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:E.scopeValue("schema",this.opts.code.source===!0?{ref:y.schema,code:(0,e.stringify)(y.schema)}:{ref:y.schema}),validateName:j,ValidationError:O,schema:y.schema,schemaEnv:y,rootId:b,baseId:y.baseId||b,schemaPath:e.nil,errSchemaPath:y.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let W;try{this._compilations.add(y),(0,o.validateFunctionCode)(Z),E.optimize(this.opts.code.optimize);const X=E.toString();W=`${E.scopeRefs(r.default.scope)}return ${X}`,this.opts.code.process&&(W=this.opts.code.process(W,y));const oe=new Function(`${r.default.self}`,`${r.default.scope}`,W)(this,this.scope.get());if(this.scope.value(j,{ref:oe}),oe.errors=null,oe.schema=y.schema,oe.schemaEnv=y,y.$async&&(oe.$async=!0),this.opts.code.source===!0&&(oe.source={validateName:j,validateCode:X,scopeValues:E._values}),this.opts.unevaluated){const{props:me,items:F}=Z;oe.evaluated={props:me instanceof e.Name?void 0:me,items:F instanceof e.Name?void 0:F,dynamicProps:me instanceof e.Name,dynamicItems:F instanceof e.Name},oe.source&&(oe.source.evaluated=(0,e.stringify)(oe.evaluated))}return y.validate=oe,y}catch(X){throw delete y.validate,delete y.validateName,W&&this.logger.error("Error compiling schema, function code:",W),X}finally{this._compilations.delete(y)}}tt.compileSchema=a;function u(y,w,b){var _;b=(0,i.resolveUrl)(this.opts.uriResolver,w,b);const I=y.refs[b];if(I)return I;let $=m.call(this,y,b);if($===void 0){const E=(_=y.localRefs)===null||_===void 0?void 0:_[b],{schemaId:O}=this.opts;E&&($=new s({schema:E,schemaId:O,root:y,baseId:w}))}if($!==void 0)return y.refs[b]=l.call(this,$)}tt.resolveRef=u;function l(y){return(0,i.inlineRef)(y.schema,this.opts.inlineRefs)?y.schema:y.validate?y:a.call(this,y)}function d(y){for(const w of this._compilations)if(h(w,y))return w}tt.getCompilingSchema=d;function h(y,w){return y.schema===w.schema&&y.root===w.root&&y.baseId===w.baseId}function m(y,w){let b;for(;typeof(b=this.refs[w])=="string";)w=b;return b||this.schemas[w]||g.call(this,y,w)}function g(y,w){const b=this.opts.uriResolver.parse(w),_=(0,i._getFullPath)(this.opts.uriResolver,b);let I=(0,i.getFullPath)(this.opts.uriResolver,y.baseId,void 0);if(Object.keys(y.schema).length>0&&_===I)return v.call(this,b,y);const $=(0,i.normalizeId)(_),E=this.refs[$]||this.schemas[$];if(typeof E=="string"){const O=g.call(this,y,E);return typeof O?.schema!="object"?void 0:v.call(this,b,O)}if(typeof E?.schema=="object"){if(E.validate||a.call(this,E),$===(0,i.normalizeId)(w)){const{schema:O}=E,{schemaId:j}=this.opts,Z=O[j];return Z&&(I=(0,i.resolveUrl)(this.opts.uriResolver,I,Z)),new s({schema:O,schemaId:j,root:y,baseId:I})}return v.call(this,b,E)}}tt.resolveSchema=g;const p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(y,{baseId:w,schema:b,root:_}){var I;if(((I=y.fragment)===null||I===void 0?void 0:I[0])!=="/")return;for(const O of y.fragment.slice(1).split("/")){if(typeof b=="boolean")return;const j=b[(0,n.unescapeFragment)(O)];if(j===void 0)return;b=j;const Z=typeof b=="object"&&b[this.opts.schemaId];!p.has(O)&&Z&&(w=(0,i.resolveUrl)(this.opts.uriResolver,w,Z))}let $;if(typeof b!="boolean"&&b.$ref&&!(0,n.schemaHasRulesButRef)(b,this.RULES)){const O=(0,i.resolveUrl)(this.opts.uriResolver,w,b.$ref);$=g.call(this,_,O)}const{schemaId:E}=this.opts;if($=$||new s({schema:b,schemaId:E,root:_,baseId:w}),$.schema!==$.root.schema)return $}return tt}const x_="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",j_="Meta-schema for $data reference (JSON AnySchema extension proposal)",A_="object",z_=["$data"],T_={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},P_=!1;var U_={$id:x_,description:j_,type:A_,required:z_,properties:T_,additionalProperties:P_},Er={},Tn={exports:{}},vo,Mu;function _p(){if(Mu)return vo;Mu=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(m){let g="",p=0,v=0;for(v=0;v<m.length;v++)if(p=m[v].charCodeAt(0),p!==48){if(!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";g+=m[v];break}for(v+=1;v<m.length;v++){if(p=m[v].charCodeAt(0),!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";g+=m[v]}return g}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function n(m){return m.length=0,!0}function o(m,g,p){if(m.length){const v=r(m);if(v!=="")g.push(v);else return p.error=!0,!1;m.length=0}return!0}function s(m){let g=0;const p={error:!1,address:"",zone:""},v=[],y=[];let w=!1,b=!1,_=o;for(let I=0;I<m.length;I++){const $=m[I];if(!($==="["||$==="]"))if($===":"){if(w===!0&&(b=!0),!_(y,v,p))break;if(++g>7){p.error=!0;break}I>0&&m[I-1]===":"&&(w=!0),v.push(":");continue}else if($==="%"){if(!_(y,v,p))break;_=n}else{y.push($);continue}}return y.length&&(_===n?p.zone=y.join(""):b?v.push(y.join("")):v.push(r(y))),p.address=v.join(""),p}function a(m){if(u(m,":")<2)return{host:m,isIPV6:!1};const g=s(m);if(g.error)return{host:m,isIPV6:!1};{let p=g.address,v=g.address;return g.zone&&(p+="%"+g.zone,v+="%25"+g.zone),{host:p,isIPV6:!0,escapedHost:v}}}function u(m,g){let p=0;for(let v=0;v<m.length;v++)m[v]===g&&p++;return p}function l(m){let g=m;const p=[];let v=-1,y=0;for(;y=g.length;){if(y===1){if(g===".")break;if(g==="/"){p.push("/");break}else{p.push(g);break}}else if(y===2){if(g[0]==="."){if(g[1]===".")break;if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&(g[1]==="."||g[1]==="/")){p.push("/");break}}else if(y===3&&g==="/.."){p.length!==0&&p.pop(),p.push("/");break}if(g[0]==="."){if(g[1]==="."){if(g[2]==="/"){g=g.slice(3);continue}}else if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&g[1]==="."){if(g[2]==="/"){g=g.slice(2);continue}else if(g[2]==="."&&g[3]==="/"){g=g.slice(3),p.length!==0&&p.pop();continue}}if((v=g.indexOf("/",1))===-1){p.push(g);break}else p.push(g.slice(0,v)),g=g.slice(v)}return p.join("")}function d(m,g){const p=g!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=p(m.scheme)),m.userinfo!==void 0&&(m.userinfo=p(m.userinfo)),m.host!==void 0&&(m.host=p(m.host)),m.path!==void 0&&(m.path=p(m.path)),m.query!==void 0&&(m.query=p(m.query)),m.fragment!==void 0&&(m.fragment=p(m.fragment)),m}function h(m){const g=[];if(m.userinfo!==void 0&&(g.push(m.userinfo),g.push("@")),m.host!==void 0){let p=unescape(m.host);if(!t(p)){const v=a(p);v.isIPV6===!0?p=`[${v.escapedHost}]`:p=m.host}g.push(p)}return(typeof m.port=="number"||typeof m.port=="string")&&(g.push(":"),g.push(String(m.port))),g.length?g.join(""):void 0}return vo={nonSimpleDomain:i,recomposeAuthority:h,normalizeComponentEncoding:d,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:a,stringArrayToHexStripped:r},vo}var bo,qu;function D_(){if(qu)return bo;qu=1;const{isUUID:e}=_p(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i($){return r.indexOf($)!==-1}function n($){return $.secure===!0?!0:$.secure===!1?!1:$.scheme?$.scheme.length===3&&($.scheme[0]==="w"||$.scheme[0]==="W")&&($.scheme[1]==="s"||$.scheme[1]==="S")&&($.scheme[2]==="s"||$.scheme[2]==="S"):!1}function o($){return $.host||($.error=$.error||"HTTP URIs must have a host."),$}function s($){const E=String($.scheme).toLowerCase()==="https";return($.port===(E?443:80)||$.port==="")&&($.port=void 0),$.path||($.path="/"),$}function a($){return $.secure=n($),$.resourceName=($.path||"/")+($.query?"?"+$.query:""),$.path=void 0,$.query=void 0,$}function u($){if(($.port===(n($)?443:80)||$.port==="")&&($.port=void 0),typeof $.secure=="boolean"&&($.scheme=$.secure?"wss":"ws",$.secure=void 0),$.resourceName){const[E,O]=$.resourceName.split("?");$.path=E&&E!=="/"?E:void 0,$.query=O,$.resourceName=void 0}return $.fragment=void 0,$}function l($,E){if(!$.path)return $.error="URN can not be parsed",$;const O=$.path.match(t);if(O){const j=E.scheme||$.scheme||"urn";$.nid=O[1].toLowerCase(),$.nss=O[2];const Z=`${j}:${E.nid||$.nid}`,W=I(Z);$.path=void 0,W&&($=W.parse($,E))}else $.error=$.error||"URN can not be parsed.";return $}function d($,E){if($.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=E.scheme||$.scheme||"urn",j=$.nid.toLowerCase(),Z=`${O}:${E.nid||j}`,W=I(Z);W&&($=W.serialize($,E));const X=$,Q=$.nss;return X.path=`${j||E.nid}:${Q}`,E.skipEscape=!0,X}function h($,E){const O=$;return O.uuid=O.nss,O.nss=void 0,!E.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function m($){const E=$;return E.nss=($.uuid||"").toLowerCase(),E}const g={scheme:"http",domainHost:!0,parse:o,serialize:s},p={scheme:"https",domainHost:g.domainHost,parse:o,serialize:s},v={scheme:"ws",domainHost:!0,parse:a,serialize:u},y={scheme:"wss",domainHost:v.domainHost,parse:v.parse,serialize:v.serialize},_={http:g,https:p,ws:v,wss:y,urn:{scheme:"urn",parse:l,serialize:d,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:h,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(_,null);function I($){return $&&(_[$]||_[$.toLowerCase()])||void 0}return bo={wsIsSecure:n,SCHEMES:_,isValidSchemeName:i,getSchemeHandler:I},bo}var Vu;function C_(){if(Vu)return Tn.exports;Vu=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:n,nonSimpleDomain:o}=_p(),{SCHEMES:s,getSchemeHandler:a}=D_();function u(y,w){return typeof y=="string"?y=m(p(y,w),w):typeof y=="object"&&(y=p(m(y,w),w)),y}function l(y,w,b){const _=b?Object.assign({scheme:"null"},b):{scheme:"null"},I=d(p(y,_),p(w,_),_,!0);return _.skipEscape=!0,m(I,_)}function d(y,w,b,_){const I={};return _||(y=p(m(y,b),b),w=p(m(w,b),b)),b=b||{},!b.tolerant&&w.scheme?(I.scheme=w.scheme,I.userinfo=w.userinfo,I.host=w.host,I.port=w.port,I.path=t(w.path||""),I.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?(I.userinfo=w.userinfo,I.host=w.host,I.port=w.port,I.path=t(w.path||""),I.query=w.query):(w.path?(w.path[0]==="/"?I.path=t(w.path):((y.userinfo!==void 0||y.host!==void 0||y.port!==void 0)&&!y.path?I.path="/"+w.path:y.path?I.path=y.path.slice(0,y.path.lastIndexOf("/")+1)+w.path:I.path=w.path,I.path=t(I.path)),I.query=w.query):(I.path=y.path,w.query!==void 0?I.query=w.query:I.query=y.query),I.userinfo=y.userinfo,I.host=y.host,I.port=y.port),I.scheme=y.scheme),I.fragment=w.fragment,I}function h(y,w,b){return typeof y=="string"?(y=unescape(y),y=m(i(p(y,b),!0),{...b,skipEscape:!0})):typeof y=="object"&&(y=m(i(y,!0),{...b,skipEscape:!0})),typeof w=="string"?(w=unescape(w),w=m(i(p(w,b),!0),{...b,skipEscape:!0})):typeof w=="object"&&(w=m(i(w,!0),{...b,skipEscape:!0})),y.toLowerCase()===w.toLowerCase()}function m(y,w){const b={host:y.host,scheme:y.scheme,userinfo:y.userinfo,port:y.port,path:y.path,query:y.query,nid:y.nid,nss:y.nss,uuid:y.uuid,fragment:y.fragment,reference:y.reference,resourceName:y.resourceName,secure:y.secure,error:""},_=Object.assign({},w),I=[],$=a(_.scheme||b.scheme);$&&$.serialize&&$.serialize(b,_),b.path!==void 0&&(_.skipEscape?b.path=unescape(b.path):(b.path=escape(b.path),b.scheme!==void 0&&(b.path=b.path.split("%3A").join(":")))),_.reference!=="suffix"&&b.scheme&&I.push(b.scheme,":");const E=r(b);if(E!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(E),b.path&&b.path[0]!=="/"&&I.push("/")),b.path!==void 0){let O=b.path;!_.absolutePath&&(!$||!$.absolutePath)&&(O=t(O)),E===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),I.push(O)}return b.query!==void 0&&I.push("?",b.query),b.fragment!==void 0&&I.push("#",b.fragment),I.join("")}const g=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(y,w){const b=Object.assign({},w),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1;b.reference==="suffix"&&(b.scheme?y=b.scheme+":"+y:y="//"+y);const $=y.match(g);if($){if(_.scheme=$[1],_.userinfo=$[3],_.host=$[4],_.port=parseInt($[5],10),_.path=$[6]||"",_.query=$[7],_.fragment=$[8],isNaN(_.port)&&(_.port=$[5]),_.host)if(n(_.host)===!1){const j=e(_.host);_.host=j.host.toLowerCase(),I=j.isIPV6}else I=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",b.reference&&b.reference!=="suffix"&&b.reference!==_.reference&&(_.error=_.error||"URI is not a "+b.reference+" reference.");const E=a(b.scheme||_.scheme);if(!b.unicodeSupport&&(!E||!E.unicodeSupport)&&_.host&&(b.domainHost||E&&E.domainHost)&&I===!1&&o(_.host))try{_.host=URL.domainToASCII(_.host.toLowerCase())}catch(O){_.error=_.error||"Host's domain name can not be converted to ASCII: "+O}(!E||E&&!E.skipNormalize)&&(y.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=unescape(_.host))),_.path&&(_.path=escape(unescape(_.path))),_.fragment&&(_.fragment=encodeURI(decodeURIComponent(_.fragment)))),E&&E.parse&&E.parse(_,b)}else _.error=_.error||"URI can not be parsed.";return _}const v={SCHEMES:s,normalize:u,resolve:l,resolveComponent:d,equal:h,serialize:m,parse:p};return Tn.exports=v,Tn.exports.default=v,Tn.exports.fastUri=v,Tn.exports}var Ku;function B_(){if(Ku)return Er;Ku=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=C_();return e.code='require("ajv/dist/runtime/uri").default',Er.default=e,Er}var Ju;function R_(){return Ju||(Ju=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Qi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ve();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=Ba(),n=eo(),o=vp(),s=Ra(),a=ve(),u=Yi(),l=ki(),d=_e(),h=U_,m=B_(),g=(K,A)=>new RegExp(K,A);g.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function _(K){var A,B,U,S,x,R,te,ee,pe,se,T,D,L,J,ne,le,ke,Fe,Ke,Me,Ae,qe,Je,On,ot;const Ft=K.strict,k=(A=K.code)===null||A===void 0?void 0:A.optimize,c=k===!0||k===void 0?1:k||0,f=(U=(B=K.code)===null||B===void 0?void 0:B.regExp)!==null&&U!==void 0?U:g,N=(S=K.uriResolver)!==null&&S!==void 0?S:m.default;return{strictSchema:(R=(x=K.strictSchema)!==null&&x!==void 0?x:Ft)!==null&&R!==void 0?R:!0,strictNumbers:(ee=(te=K.strictNumbers)!==null&&te!==void 0?te:Ft)!==null&&ee!==void 0?ee:!0,strictTypes:(se=(pe=K.strictTypes)!==null&&pe!==void 0?pe:Ft)!==null&&se!==void 0?se:"log",strictTuples:(D=(T=K.strictTuples)!==null&&T!==void 0?T:Ft)!==null&&D!==void 0?D:"log",strictRequired:(J=(L=K.strictRequired)!==null&&L!==void 0?L:Ft)!==null&&J!==void 0?J:!1,code:K.code?{...K.code,optimize:c,regExp:f}:{optimize:c,regExp:f},loopRequired:(ne=K.loopRequired)!==null&&ne!==void 0?ne:b,loopEnum:(le=K.loopEnum)!==null&&le!==void 0?le:b,meta:(ke=K.meta)!==null&&ke!==void 0?ke:!0,messages:(Fe=K.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ke=K.inlineRefs)!==null&&Ke!==void 0?Ke:!0,schemaId:(Me=K.schemaId)!==null&&Me!==void 0?Me:"$id",addUsedSchema:(Ae=K.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(qe=K.validateSchema)!==null&&qe!==void 0?qe:!0,validateFormats:(Je=K.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(On=K.unicodeRegExp)!==null&&On!==void 0?On:!0,int32range:(ot=K.int32range)!==null&&ot!==void 0?ot:!0,uriResolver:N}}class I{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,..._(A)};const{es5:B,lines:U}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:v,es5:B,lines:U}),this.logger=Q(A.logger);const S=A.validateFormats;A.validateFormats=!1,this.RULES=(0,o.getRules)(),$.call(this,y,A,"NOT SUPPORTED"),$.call(this,w,A,"DEPRECATED","warn"),this._metaOpts=W.call(this),A.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords&&Z.call(this,A.keywords),typeof A.meta=="object"&&this.addMetaSchema(A.meta),O.call(this),A.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:A,meta:B,schemaId:U}=this.opts;let S=h;U==="id"&&(S={...h},S.id=S.$id,delete S.$id),B&&A&&this.addMetaSchema(S,S[U],!1)}defaultMeta(){const{meta:A,schemaId:B}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[B]||A:void 0}validate(A,B){let U;if(typeof A=="string"){if(U=this.getSchema(A),!U)throw new Error(`no schema with key or ref "${A}"`)}else U=this.compile(A);const S=U(B);return"$async"in U||(this.errors=U.errors),S}compile(A,B){const U=this._addSchema(A,B);return U.validate||this._compileSchemaEnv(U)}compileAsync(A,B){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:U}=this.opts;return S.call(this,A,B);async function S(se,T){await x.call(this,se.$schema);const D=this._addSchema(se,T);return D.validate||R.call(this,D)}async function x(se){se&&!this.getSchema(se)&&await S.call(this,{$ref:se},!0)}async function R(se){try{return this._compileSchemaEnv(se)}catch(T){if(!(T instanceof n.default))throw T;return te.call(this,T),await ee.call(this,T.missingSchema),R.call(this,se)}}function te({missingSchema:se,missingRef:T}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${T} cannot be resolved`)}async function ee(se){const T=await pe.call(this,se);this.refs[se]||await x.call(this,T.$schema),this.refs[se]||this.addSchema(T,se,B)}async function pe(se){const T=this._loading[se];if(T)return T;try{return await(this._loading[se]=U(se))}finally{delete this._loading[se]}}}addSchema(A,B,U,S=this.opts.validateSchema){if(Array.isArray(A)){for(const R of A)this.addSchema(R,void 0,U,S);return this}let x;if(typeof A=="object"){const{schemaId:R}=this.opts;if(x=A[R],x!==void 0&&typeof x!="string")throw new Error(`schema ${R} must be string`)}return B=(0,u.normalizeId)(B||x),this._checkUnique(B),this.schemas[B]=this._addSchema(A,U,B,S,!0),this}addMetaSchema(A,B,U=this.opts.validateSchema){return this.addSchema(A,B,!0,U),this}validateSchema(A,B){if(typeof A=="boolean")return!0;let U;if(U=A.$schema,U!==void 0&&typeof U!="string")throw new Error("$schema must be a string");if(U=U||this.opts.defaultMeta||this.defaultMeta(),!U)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const S=this.validate(U,A);if(!S&&B){const x="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(x);else throw new Error(x)}return S}getSchema(A){let B;for(;typeof(B=E.call(this,A))=="string";)A=B;if(B===void 0){const{schemaId:U}=this.opts,S=new s.SchemaEnv({schema:{},schemaId:U});if(B=s.resolveSchema.call(this,S,A),!B)return;this.refs[A]=B}return B.validate||this._compileSchemaEnv(B)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const B=E.call(this,A);return typeof B=="object"&&this._cache.delete(B.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const B=A;this._cache.delete(B);let U=A[this.opts.schemaId];return U&&(U=(0,u.normalizeId)(U),delete this.schemas[U],delete this.refs[U]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(const B of A)this.addKeyword(B);return this}addKeyword(A,B){let U;if(typeof A=="string")U=A,typeof B=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),B.keyword=U);else if(typeof A=="object"&&B===void 0){if(B=A,U=B.keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(me.call(this,U,B),!B)return(0,d.eachItem)(U,x=>F.call(this,x)),this;ie.call(this,B);const S={...B,type:(0,l.getJSONTypes)(B.type),schemaType:(0,l.getJSONTypes)(B.schemaType)};return(0,d.eachItem)(U,S.type.length===0?x=>F.call(this,x,S):x=>S.type.forEach(R=>F.call(this,x,S,R))),this}getKeyword(A){const B=this.RULES.all[A];return typeof B=="object"?B.definition:!!B}removeKeyword(A){const{RULES:B}=this;delete B.keywords[A],delete B.all[A];for(const U of B.rules){const S=U.rules.findIndex(x=>x.keyword===A);S>=0&&U.rules.splice(S,1)}return this}addFormat(A,B){return typeof B=="string"&&(B=new RegExp(B)),this.formats[A]=B,this}errorsText(A=this.errors,{separator:B=", ",dataVar:U="data"}={}){return!A||A.length===0?"No errors":A.map(S=>`${U}${S.instancePath} ${S.message}`).reduce((S,x)=>S+B+x)}$dataMetaSchema(A,B){const U=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const S of B){const x=S.split("/").slice(1);let R=A;for(const te of x)R=R[te];for(const te in U){const ee=U[te];if(typeof ee!="object")continue;const{$data:pe}=ee.definition,se=R[te];pe&&se&&(R[te]=ce(se))}}return A}_removeAllSchemas(A,B){for(const U in A){const S=A[U];(!B||B.test(U))&&(typeof S=="string"?delete A[U]:S&&!S.meta&&(this._cache.delete(S.schema),delete A[U]))}}_addSchema(A,B,U,S=this.opts.validateSchema,x=this.opts.addUsedSchema){let R;const{schemaId:te}=this.opts;if(typeof A=="object")R=A[te];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let ee=this._cache.get(A);if(ee!==void 0)return ee;U=(0,u.normalizeId)(R||U);const pe=u.getSchemaRefs.call(this,A,U);return ee=new s.SchemaEnv({schema:A,schemaId:te,meta:B,baseId:U,localRefs:pe}),this._cache.set(ee.schema,ee),x&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=ee),S&&this.validateSchema(A,!0),ee}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" already exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):s.compileSchema.call(this,A),!A.validate)throw new Error("ajv implementation error");return A.validate}_compileMetaSchema(A){const B=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,A)}finally{this.opts=B}}}I.ValidationError=i.default,I.MissingRefError=n.default,e.default=I;function $(K,A,B,U="error"){for(const S in K){const x=S;x in A&&this.logger[U](`${B}: option ${S}. ${K[x]}`)}}function E(K){return K=(0,u.normalizeId)(K),this.schemas[K]||this.refs[K]}function O(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const A in K)this.addSchema(K[A],A)}function j(){for(const K in this.opts.formats){const A=this.opts.formats[K];A&&this.addFormat(K,A)}}function Z(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in K){const B=K[A];B.keyword||(B.keyword=A),this.addKeyword(B)}}function W(){const K={...this.opts};for(const A of p)delete K[A];return K}const X={log(){},warn(){},error(){}};function Q(K){if(K===!1)return X;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const oe=/^[a-z_$][a-z0-9_$:-]*$/i;function me(K,A){const{RULES:B}=this;if((0,d.eachItem)(K,U=>{if(B.keywords[U])throw new Error(`Keyword ${U} is already defined`);if(!oe.test(U))throw new Error(`Keyword ${U} has invalid name`)}),!!A&&A.$data&&!("code"in A||"validate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function F(K,A,B){var U;const S=A?.post;if(B&&S)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:x}=this;let R=S?x.post:x.rules.find(({type:ee})=>ee===B);if(R||(R={type:B,rules:[]},x.rules.push(R)),x.keywords[K]=!0,!A)return;const te={keyword:K,definition:{...A,type:(0,l.getJSONTypes)(A.type),schemaType:(0,l.getJSONTypes)(A.schemaType)}};A.before?Y.call(this,R,te,A.before):R.rules.push(te),x.all[K]=te,(U=A.implements)===null||U===void 0||U.forEach(ee=>this.addKeyword(ee))}function Y(K,A,B){const U=K.rules.findIndex(S=>S.keyword===B);U>=0?K.rules.splice(U,0,A):(K.rules.push(A),this.logger.warn(`rule ${B} is not defined`))}function ie(K){let{metaSchema:A}=K;A!==void 0&&(K.$data&&this.opts.$data&&(A=ce(A)),K.validateSchema=this.compile(A,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(K){return{anyOf:[K,re]}}})(lo)),lo}var Nr={},Or={},xr={},Gu;function F_(){if(Gu)return xr;Gu=1,Object.defineProperty(xr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return xr.default=e,xr}var At={},Wu;function Z_(){if(Wu)return At;Wu=1,Object.defineProperty(At,"__esModule",{value:!0}),At.callRef=At.getValidate=void 0;const e=eo(),t=bt(),r=ve(),i=Rt(),n=Ra(),o=_e(),s={keyword:"$ref",schemaType:"string",code(l){const{gen:d,schema:h,it:m}=l,{baseId:g,schemaEnv:p,validateName:v,opts:y,self:w}=m,{root:b}=p;if((h==="#"||h==="#/")&&g===b.baseId)return I();const _=n.resolveRef.call(w,b,g,h);if(_===void 0)throw new e.default(m.opts.uriResolver,g,h);if(_ instanceof n.SchemaEnv)return $(_);return E(_);function I(){if(p===b)return u(l,v,p,p.$async);const O=d.scopeValue("root",{ref:b});return u(l,(0,r._)`${O}.validate`,b,b.$async)}function $(O){const j=a(l,O);u(l,j,O,O.$async)}function E(O){const j=d.scopeValue("schema",y.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),Z=d.name("valid"),W=l.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},Z);l.mergeEvaluated(W),l.ok(Z)}}};function a(l,d){const{gen:h}=l;return d.validate?h.scopeValue("validate",{ref:d.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:d})}.validate`}At.getValidate=a;function u(l,d,h,m){const{gen:g,it:p}=l,{allErrors:v,schemaEnv:y,opts:w}=p,b=w.passContext?i.default.this:r.nil;m?_():I();function _(){if(!y.$async)throw new Error("async schema referenced by sync schema");const O=g.let("valid");g.try(()=>{g.code((0,r._)`await ${(0,t.callValidateCode)(l,d,b)}`),E(d),v||g.assign(O,!0)},j=>{g.if((0,r._)`!(${j} instanceof ${p.ValidationError})`,()=>g.throw(j)),$(j),v||g.assign(O,!1)}),l.ok(O)}function I(){l.result((0,t.callValidateCode)(l,d,b),()=>E(d),()=>$(d))}function $(O){const j=(0,r._)`${O}.errors`;g.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${j} : ${i.default.vErrors}.concat(${j})`),g.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function E(O){var j;if(!p.opts.unevaluated)return;const Z=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if(p.props!==!0)if(Z&&!Z.dynamicProps)Z.props!==void 0&&(p.props=o.mergeEvaluated.props(g,Z.props,p.props));else{const W=g.var("props",(0,r._)`${O}.evaluated.props`);p.props=o.mergeEvaluated.props(g,W,p.props,r.Name)}if(p.items!==!0)if(Z&&!Z.dynamicItems)Z.items!==void 0&&(p.items=o.mergeEvaluated.items(g,Z.items,p.items));else{const W=g.var("items",(0,r._)`${O}.evaluated.items`);p.items=o.mergeEvaluated.items(g,W,p.items,r.Name)}}}return At.callRef=u,At.default=s,At}var Hu;function L_(){if(Hu)return Or;Hu=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=F_(),t=Z_(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Or.default=r,Or}var jr={},Ar={},Xu;function M_(){if(Xu)return Ar;Xu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=ve(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:o,schemaCode:s})=>(0,e.str)`must be ${r[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${s}}`},n={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(o){const{keyword:s,data:a,schemaCode:u}=o;o.fail$data((0,e._)`${a} ${r[s].fail} ${u} || isNaN(${a})`)}};return Ar.default=n,Ar}var zr={},Yu;function q_(){if(Yu)return zr;Yu=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=ve(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:n,data:o,schemaCode:s,it:a}=i,u=a.opts.multipleOfPrecision,l=n.let("res"),d=u?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:(0,e._)`${l} !== parseInt(${l})`;i.fail$data((0,e._)`(${s} === 0 || (${l} = ${o}/${s}, ${d}))`)}};return zr.default=r,zr}var Tr={},Pr={},Qu;function V_(){if(Qu)return Pr;Qu=1,Object.defineProperty(Pr,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,n=0,o;for(;n<r;)i++,o=t.charCodeAt(n++),o>=55296&&o<=56319&&n<r&&(o=t.charCodeAt(n),(o&64512)===56320&&n++);return i}return Pr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Pr}var ec;function K_(){if(ec)return Tr;ec=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ve(),t=_e(),r=V_(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:s}){const a=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:s,data:a,schemaCode:u,it:l}=o,d=s==="maxLength"?e.operators.GT:e.operators.LT,h=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${h} ${d} ${u}`)}};return Tr.default=n,Tr}var Ur={},tc;function J_(){if(tc)return Ur;tc=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=bt(),t=ve(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,t._)`{pattern: ${n}}`},code(n){const{data:o,$data:s,schema:a,schemaCode:u,it:l}=n,d=l.opts.unicodeRegExp?"u":"",h=s?(0,t._)`(new RegExp(${u}, ${d}))`:(0,e.usePattern)(n,a);n.fail$data((0,t._)`!${h}.test(${o})`)}};return Ur.default=i,Ur}var Dr={},nc;function G_(){if(nc)return Dr;nc=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=ve(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return Dr.default=r,Dr}var Cr={},rc;function W_(){if(rc)return Cr;rc=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=bt(),t=ve(),r=_e(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:s,schema:a,schemaCode:u,data:l,$data:d,it:h}=o,{opts:m}=h;if(!d&&a.length===0)return;const g=a.length>=m.loopRequired;if(h.allErrors?p():v(),m.strictRequired){const b=o.parentSchema.properties,{definedProperties:_}=o.it;for(const I of a)if(b?.[I]===void 0&&!_.has(I)){const $=h.schemaEnv.baseId+h.errSchemaPath,E=`required property "${I}" is not defined at "${$}" (strictRequired)`;(0,r.checkStrictMode)(h,E,h.opts.strictRequired)}}function p(){if(g||d)o.block$data(t.nil,y);else for(const b of a)(0,e.checkReportMissingProp)(o,b)}function v(){const b=s.let("missing");if(g||d){const _=s.let("valid",!0);o.block$data(_,()=>w(b,_)),o.ok(_)}else s.if((0,e.checkMissingProp)(o,a,b)),(0,e.reportMissingProp)(o,b),s.else()}function y(){s.forOf("prop",u,b=>{o.setParams({missingProperty:b}),s.if((0,e.noPropertyInData)(s,l,b,m.ownProperties),()=>o.error())})}function w(b,_){o.setParams({missingProperty:b}),s.forOf(b,u,()=>{s.assign(_,(0,e.propertyInData)(s,l,b,m.ownProperties)),s.if((0,t.not)(_),()=>{o.error(),s.break()})},t.nil)}}};return Cr.default=n,Cr}var Br={},ic;function H_(){if(ic)return Br;ic=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=ve(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return Br.default=r,Br}var Rr={},Fr={},oc;function Fa(){if(oc)return Fr;oc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=$p();return e.code='require("ajv/dist/runtime/equal").default',Fr.default=e,Fr}var sc;function X_(){if(sc)return Rr;sc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=ki(),t=ve(),r=_e(),i=Fa(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0,t._)`{i: ${s}, j: ${a}}`},code(s){const{gen:a,data:u,$data:l,schema:d,parentSchema:h,schemaCode:m,it:g}=s;if(!l&&!d)return;const p=a.let("valid"),v=h.items?(0,e.getSchemaTypes)(h.items):[];s.block$data(p,y,(0,t._)`${m} === false`),s.ok(p);function y(){const I=a.let("i",(0,t._)`${u}.length`),$=a.let("j");s.setParams({i:I,j:$}),a.assign(p,!0),a.if((0,t._)`${I} > 1`,()=>(w()?b:_)(I,$))}function w(){return v.length>0&&!v.some(I=>I==="object"||I==="array")}function b(I,$){const E=a.name("item"),O=(0,e.checkDataTypes)(v,E,g.opts.strictNumbers,e.DataType.Wrong),j=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${I}--;`,()=>{a.let(E,(0,t._)`${u}[${I}]`),a.if(O,(0,t._)`continue`),v.length>1&&a.if((0,t._)`typeof ${E} == "string"`,(0,t._)`${E} += "_"`),a.if((0,t._)`typeof ${j}[${E}] == "number"`,()=>{a.assign($,(0,t._)`${j}[${E}]`),s.error(),a.assign(p,!1).break()}).code((0,t._)`${j}[${E}] = ${I}`)})}function _(I,$){const E=(0,r.useFunc)(a,i.default),O=a.name("outer");a.label(O).for((0,t._)`;${I}--;`,()=>a.for((0,t._)`${$} = ${I}; ${$}--;`,()=>a.if((0,t._)`${E}(${u}[${I}], ${u}[${$}])`,()=>{s.error(),a.assign(p,!1).break(O)})))}}};return Rr.default=o,Rr}var Zr={},ac;function Y_(){if(ac)return Zr;ac=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=ve(),t=_e(),r=Fa(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:s,data:a,$data:u,schemaCode:l,schema:d}=o;u||d&&typeof d=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${l})`):o.fail((0,e._)`${d} !== ${a}`)}};return Zr.default=n,Zr}var Lr={},uc;function Q_(){if(uc)return Lr;uc=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=ve(),t=_e(),r=Fa(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:s,data:a,$data:u,schema:l,schemaCode:d,it:h}=o;if(!u&&l.length===0)throw new Error("enum must have non-empty array");const m=l.length>=h.opts.loopEnum;let g;const p=()=>g??(g=(0,t.useFunc)(s,r.default));let v;if(m||u)v=s.let("valid"),o.block$data(v,y);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const b=s.const("vSchema",d);v=(0,e.or)(...l.map((_,I)=>w(b,I)))}o.pass(v);function y(){s.assign(v,!1),s.forOf("v",d,b=>s.if((0,e._)`${p()}(${a}, ${b})`,()=>s.assign(v,!0).break()))}function w(b,_){const I=l[_];return typeof I=="object"&&I!==null?(0,e._)`${p()}(${a}, ${b}[${_}])`:(0,e._)`${a} === ${I}`}}};return Lr.default=n,Lr}var cc;function ew(){if(cc)return jr;cc=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=M_(),t=q_(),r=K_(),i=J_(),n=G_(),o=W_(),s=H_(),a=X_(),u=Y_(),l=Q_(),d=[e.default,t.default,r.default,i.default,n.default,o.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];return jr.default=d,jr}var Mr={},an={},lc;function wp(){if(lc)return an;lc=1,Object.defineProperty(an,"__esModule",{value:!0}),an.validateAdditionalItems=void 0;const e=ve(),t=_e(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:s,it:a}=o,{items:u}=s;if(!Array.isArray(u)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,u)}};function n(o,s){const{gen:a,schema:u,data:l,keyword:d,it:h}=o;h.items=!0;const m=a.const("len",(0,e._)`${l}.length`);if(u===!1)o.setParams({len:s.length}),o.pass((0,e._)`${m} <= ${s.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(h,u)){const p=a.var("valid",(0,e._)`${m} <= ${s.length}`);a.if((0,e.not)(p),()=>g(p)),o.ok(p)}function g(p){a.forRange("i",s.length,m,v=>{o.subschema({keyword:d,dataProp:v,dataPropType:t.Type.Num},p),h.allErrors||a.if((0,e.not)(p),()=>a.break())})}}return an.validateAdditionalItems=n,an.default=i,an}var qr={},un={},fc;function kp(){if(fc)return un;fc=1,Object.defineProperty(un,"__esModule",{value:!0}),un.validateTuple=void 0;const e=ve(),t=_e(),r=bt(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:s,it:a}=o;if(Array.isArray(s))return n(o,"additionalItems",s);a.items=!0,!(0,t.alwaysValidSchema)(a,s)&&o.ok((0,r.validateArray)(o))}};function n(o,s,a=o.schema){const{gen:u,parentSchema:l,data:d,keyword:h,it:m}=o;v(l),m.opts.unevaluated&&a.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(u,a.length,m.items));const g=u.name("valid"),p=u.const("len",(0,e._)`${d}.length`);a.forEach((y,w)=>{(0,t.alwaysValidSchema)(m,y)||(u.if((0,e._)`${p} > ${w}`,()=>o.subschema({keyword:h,schemaProp:w,dataProp:w},g)),o.ok(g))});function v(y){const{opts:w,errSchemaPath:b}=m,_=a.length,I=_===y.minItems&&(_===y.maxItems||y[s]===!1);if(w.strictTuples&&!I){const $=`"${h}" is ${_}-tuple, but minItems or maxItems/${s} are not specified or different at path "${b}"`;(0,t.checkStrictMode)(m,$,w.strictTuples)}}}return un.validateTuple=n,un.default=i,un}var dc;function tw(){if(dc)return qr;dc=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=kp(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return qr.default=t,qr}var Vr={},hc;function nw(){if(hc)return Vr;hc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=ve(),t=_e(),r=bt(),i=wp(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:a,parentSchema:u,it:l}=s,{prefixItems:d}=u;l.items=!0,!(0,t.alwaysValidSchema)(l,a)&&(d?(0,i.validateAdditionalItems)(s,d):s.ok((0,r.validateArray)(s)))}};return Vr.default=o,Vr}var Kr={},mc;function rw(){if(mc)return Kr;mc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=ve(),t=_e(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${o}}`},code(n){const{gen:o,schema:s,parentSchema:a,data:u,it:l}=n;let d,h;const{minContains:m,maxContains:g}=a;l.opts.next?(d=m===void 0?1:m,h=g):d=1;const p=o.const("len",(0,e._)`${u}.length`);if(n.setParams({min:d,max:h}),h===void 0&&d===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&d>h){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(l,s)){let _=(0,e._)`${p} >= ${d}`;h!==void 0&&(_=(0,e._)`${_} && ${p} <= ${h}`),n.pass(_);return}l.items=!0;const v=o.name("valid");h===void 0&&d===1?w(v,()=>o.if(v,()=>o.break())):d===0?(o.let(v,!0),h!==void 0&&o.if((0,e._)`${u}.length > 0`,y)):(o.let(v,!1),y()),n.result(v,()=>n.reset());function y(){const _=o.name("_valid"),I=o.let("count",0);w(_,()=>o.if(_,()=>b(I)))}function w(_,I){o.forRange("i",0,p,$=>{n.subschema({keyword:"contains",dataProp:$,dataPropType:t.Type.Num,compositeRule:!0},_),I()})}function b(_){o.code((0,e._)`${_}++`),h===void 0?o.if((0,e._)`${_} >= ${d}`,()=>o.assign(v,!0).break()):(o.if((0,e._)`${_} > ${h}`,()=>o.assign(v,!1).break()),d===1?o.assign(v,!0):o.if((0,e._)`${_} >= ${d}`,()=>o.assign(v,!0)))}}};return Kr.default=i,Kr}var $o={},pc;function iw(){return pc||(pc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ve(),r=_e(),i=bt();e.error={message:({params:{property:u,depsCount:l,deps:d}})=>{const h=l===1?"property":"properties";return(0,t.str)`must have ${h} ${d} when property ${u} is present`},params:({params:{property:u,depsCount:l,deps:d,missingProperty:h}})=>(0,t._)`{property: ${u},
|
|
163
|
-
missingProperty: ${h},
|
|
164
|
-
depsCount: ${l},
|
|
165
|
-
deps: ${d}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[l,d]=o(u);s(u,l),a(u,d)}};function o({schema:u}){const l={},d={};for(const h in u){if(h==="__proto__")continue;const m=Array.isArray(u[h])?l:d;m[h]=u[h]}return[l,d]}function s(u,l=u.schema){const{gen:d,data:h,it:m}=u;if(Object.keys(l).length===0)return;const g=d.let("missing");for(const p in l){const v=l[p];if(v.length===0)continue;const y=(0,i.propertyInData)(d,h,p,m.opts.ownProperties);u.setParams({property:p,depsCount:v.length,deps:v.join(", ")}),m.allErrors?d.if(y,()=>{for(const w of v)(0,i.checkReportMissingProp)(u,w)}):(d.if((0,t._)`${y} && (${(0,i.checkMissingProp)(u,v,g)})`),(0,i.reportMissingProp)(u,g),d.else())}}e.validatePropertyDeps=s;function a(u,l=u.schema){const{gen:d,data:h,keyword:m,it:g}=u,p=d.name("valid");for(const v in l)(0,r.alwaysValidSchema)(g,l[v])||(d.if((0,i.propertyInData)(d,h,v,g.opts.ownProperties),()=>{const y=u.subschema({keyword:m,schemaProp:v},p);u.mergeValidEvaluated(y,p)},()=>d.var(p,!0)),u.ok(p))}e.validateSchemaDeps=a,e.default=n})($o)),$o}var Jr={},gc;function ow(){if(gc)return Jr;gc=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=ve(),t=_e(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:o,schema:s,data:a,it:u}=n;if((0,t.alwaysValidSchema)(u,s))return;const l=o.name("valid");o.forIn("key",a,d=>{n.setParams({propertyName:d}),n.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),o.if((0,e.not)(l),()=>{n.error(!0),u.allErrors||o.break()})}),n.ok(l)}};return Jr.default=i,Jr}var Gr={},yc;function Sp(){if(yc)return Gr;yc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const e=bt(),t=ve(),r=Rt(),i=_e(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:u,parentSchema:l,data:d,errsCount:h,it:m}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:g,opts:p}=m;if(m.props=!0,p.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(m,u))return;const v=(0,e.allSchemaProperties)(l.properties),y=(0,e.allSchemaProperties)(l.patternProperties);w(),s.ok((0,t._)`${h} === ${r.default.errors}`);function w(){a.forIn("key",d,E=>{!v.length&&!y.length?I(E):a.if(b(E),()=>I(E))})}function b(E){let O;if(v.length>8){const j=(0,i.schemaRefOrVal)(m,l.properties,"properties");O=(0,e.isOwnProperty)(a,j,E)}else v.length?O=(0,t.or)(...v.map(j=>(0,t._)`${E} === ${j}`)):O=t.nil;return y.length&&(O=(0,t.or)(O,...y.map(j=>(0,t._)`${(0,e.usePattern)(s,j)}.test(${E})`))),(0,t.not)(O)}function _(E){a.code((0,t._)`delete ${d}[${E}]`)}function I(E){if(p.removeAdditional==="all"||p.removeAdditional&&u===!1){_(E);return}if(u===!1){s.setParams({additionalProperty:E}),s.error(),g||a.break();return}if(typeof u=="object"&&!(0,i.alwaysValidSchema)(m,u)){const O=a.name("valid");p.removeAdditional==="failing"?($(E,O,!1),a.if((0,t.not)(O),()=>{s.reset(),_(E)})):($(E,O),g||a.if((0,t.not)(O),()=>a.break()))}}function $(E,O,j){const Z={keyword:"additionalProperties",dataProp:E,dataPropType:i.Type.Str};j===!1&&Object.assign(Z,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(Z,O)}}};return Gr.default=o,Gr}var Wr={},vc;function sw(){if(vc)return Wr;vc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=Qi(),t=bt(),r=_e(),i=Sp(),n={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:u,data:l,it:d}=o;d.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(d,i.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(a);for(const y of h)d.definedProperties.add(y);d.opts.unevaluated&&h.length&&d.props!==!0&&(d.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),d.props));const m=h.filter(y=>!(0,r.alwaysValidSchema)(d,a[y]));if(m.length===0)return;const g=s.name("valid");for(const y of m)p(y)?v(y):(s.if((0,t.propertyInData)(s,l,y,d.opts.ownProperties)),v(y),d.allErrors||s.else().var(g,!0),s.endIf()),o.it.definedProperties.add(y),o.ok(g);function p(y){return d.opts.useDefaults&&!d.compositeRule&&a[y].default!==void 0}function v(y){o.subschema({keyword:"properties",schemaProp:y,dataProp:y},g)}}};return Wr.default=n,Wr}var Hr={},bc;function aw(){if(bc)return Hr;bc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=bt(),t=ve(),r=_e(),i=_e(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:u,parentSchema:l,it:d}=o,{opts:h}=d,m=(0,e.allSchemaProperties)(a),g=m.filter(I=>(0,r.alwaysValidSchema)(d,a[I]));if(m.length===0||g.length===m.length&&(!d.opts.unevaluated||d.props===!0))return;const p=h.strictSchema&&!h.allowMatchingProperties&&l.properties,v=s.name("valid");d.props!==!0&&!(d.props instanceof t.Name)&&(d.props=(0,i.evaluatedPropsToName)(s,d.props));const{props:y}=d;w();function w(){for(const I of m)p&&b(I),d.allErrors?_(I):(s.var(v,!0),_(I),s.if(v))}function b(I){for(const $ in p)new RegExp(I).test($)&&(0,r.checkStrictMode)(d,`property ${$} matches pattern ${I} (use allowMatchingProperties)`)}function _(I){s.forIn("key",u,$=>{s.if((0,t._)`${(0,e.usePattern)(o,I)}.test(${$})`,()=>{const E=g.includes(I);E||o.subschema({keyword:"patternProperties",schemaProp:I,dataProp:$,dataPropType:i.Type.Str},v),d.opts.unevaluated&&y!==!0?s.assign((0,t._)`${y}[${$}]`,!0):!E&&!d.allErrors&&s.if((0,t.not)(v),()=>s.break())})})}}};return Hr.default=n,Hr}var Xr={},$c;function uw(){if($c)return Xr;$c=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=_e(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:n,it:o}=r;if((0,e.alwaysValidSchema)(o,n)){r.fail();return}const s=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Xr.default=t,Xr}var Yr={},_c;function cw(){if(_c)return Yr;_c=1,Object.defineProperty(Yr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:bt().validateUnion,error:{message:"must match a schema in anyOf"}};return Yr.default=t,Yr}var Qr={},wc;function lw(){if(wc)return Qr;wc=1,Object.defineProperty(Qr,"__esModule",{value:!0});const e=ve(),t=_e(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:o,schema:s,parentSchema:a,it:u}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(u.opts.discriminator&&a.discriminator)return;const l=s,d=o.let("valid",!1),h=o.let("passing",null),m=o.name("_valid");n.setParams({passing:h}),o.block(g),n.result(d,()=>n.reset(),()=>n.error(!0));function g(){l.forEach((p,v)=>{let y;(0,t.alwaysValidSchema)(u,p)?o.var(m,!0):y=n.subschema({keyword:"oneOf",schemaProp:v,compositeRule:!0},m),v>0&&o.if((0,e._)`${m} && ${d}`).assign(d,!1).assign(h,(0,e._)`[${h}, ${v}]`).else(),o.if(m,()=>{o.assign(d,!0),o.assign(h,v),y&&n.mergeEvaluated(y,e.Name)})})}}};return Qr.default=i,Qr}var ei={},kc;function fw(){if(kc)return ei;kc=1,Object.defineProperty(ei,"__esModule",{value:!0});const e=_e(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:n,it:o}=r;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=i.name("valid");n.forEach((a,u)=>{if((0,e.alwaysValidSchema)(o,a))return;const l=r.subschema({keyword:"allOf",schemaProp:u},s);r.ok(s),r.mergeEvaluated(l)})}};return ei.default=t,ei}var ti={},Sc;function dw(){if(Sc)return ti;Sc=1,Object.defineProperty(ti,"__esModule",{value:!0});const e=ve(),t=_e(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:u}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const l=n(u,"then"),d=n(u,"else");if(!l&&!d)return;const h=s.let("valid",!0),m=s.name("_valid");if(g(),o.reset(),l&&d){const v=s.let("ifClause");o.setParams({ifClause:v}),s.if(m,p("then",v),p("else",v))}else l?s.if(m,p("then")):s.if((0,e.not)(m),p("else"));o.pass(h,()=>o.error(!0));function g(){const v=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);o.mergeEvaluated(v)}function p(v,y){return()=>{const w=o.subschema({keyword:v},m);s.assign(h,m),o.mergeValidEvaluated(w,h),y?s.assign(y,(0,e._)`${v}`):o.setParams({ifClause:v})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return ti.default=i,ti}var ni={},Ic;function hw(){if(Ic)return ni;Ic=1,Object.defineProperty(ni,"__esModule",{value:!0});const e=_e(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:n}){i.if===void 0&&(0,e.checkStrictMode)(n,`"${r}" without "if" is ignored`)}};return ni.default=t,ni}var Ec;function mw(){if(Ec)return Mr;Ec=1,Object.defineProperty(Mr,"__esModule",{value:!0});const e=wp(),t=tw(),r=kp(),i=nw(),n=rw(),o=iw(),s=ow(),a=Sp(),u=sw(),l=aw(),d=uw(),h=cw(),m=lw(),g=fw(),p=dw(),v=hw();function y(w=!1){const b=[d.default,h.default,m.default,g.default,p.default,v.default,s.default,a.default,o.default,u.default,l.default];return w?b.push(t.default,i.default):b.push(e.default,r.default),b.push(n.default),b}return Mr.default=y,Mr}var ri={},ii={},Nc;function pw(){if(Nc)return ii;Nc=1,Object.defineProperty(ii,"__esModule",{value:!0});const e=ve(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,n){const{gen:o,data:s,$data:a,schema:u,schemaCode:l,it:d}=i,{opts:h,errSchemaPath:m,schemaEnv:g,self:p}=d;if(!h.validateFormats)return;a?v():y();function v(){const w=o.scopeValue("formats",{ref:p.formats,code:h.code.formats}),b=o.const("fDef",(0,e._)`${w}[${l}]`),_=o.let("fType"),I=o.let("format");o.if((0,e._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>o.assign(_,(0,e._)`${b}.type || "string"`).assign(I,(0,e._)`${b}.validate`),()=>o.assign(_,(0,e._)`"string"`).assign(I,b)),i.fail$data((0,e.or)($(),E()));function $(){return h.strictSchema===!1?e.nil:(0,e._)`${l} && !${I}`}function E(){const O=g.$async?(0,e._)`(${b}.async ? await ${I}(${s}) : ${I}(${s}))`:(0,e._)`${I}(${s})`,j=(0,e._)`(typeof ${I} == "function" ? ${O} : ${I}.test(${s}))`;return(0,e._)`${I} && ${I} !== true && ${_} === ${n} && !${j}`}}function y(){const w=p.formats[u];if(!w){$();return}if(w===!0)return;const[b,_,I]=E(w);b===n&&i.pass(O());function $(){if(h.strictSchema===!1){p.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${u}" ignored in schema at path "${m}"`}}function E(j){const Z=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(u)}`:void 0,W=o.scopeValue("formats",{key:u,ref:j,code:Z});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${W}.validate`]:["string",j,W]}function O(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!g.$async)throw new Error("async format in sync schema");return(0,e._)`await ${I}(${s})`}return typeof _=="function"?(0,e._)`${I}(${s})`:(0,e._)`${I}.test(${s})`}}}};return ii.default=r,ii}var Oc;function gw(){if(Oc)return ri;Oc=1,Object.defineProperty(ri,"__esModule",{value:!0});const t=[pw().default];return ri.default=t,ri}var Mt={},xc;function yw(){return xc||(xc=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.contentVocabulary=Mt.metadataVocabulary=void 0,Mt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Mt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Mt}var jc;function vw(){if(jc)return Nr;jc=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=L_(),t=ew(),r=mw(),i=gw(),n=yw(),o=[e.default,t.default,(0,r.default)(),i.default,n.metadataVocabulary,n.contentVocabulary];return Nr.default=o,Nr}var oi={},Pn={},Ac;function bw(){if(Ac)return Pn;Ac=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Pn.DiscrError=e={})),Pn}var zc;function $w(){if(zc)return oi;zc=1,Object.defineProperty(oi,"__esModule",{value:!0});const e=ve(),t=bw(),r=Ra(),i=eo(),n=_e(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:u}})=>a===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:a,tag:u,tagName:l}})=>(0,e._)`{error: ${a}, tag: ${l}, tagValue: ${u}}`},code(a){const{gen:u,data:l,schema:d,parentSchema:h,it:m}=a,{oneOf:g}=h;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=d.propertyName;if(typeof p!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!g)throw new Error("discriminator: requires oneOf keyword");const v=u.let("valid",!1),y=u.const("tag",(0,e._)`${l}${(0,e.getProperty)(p)}`);u.if((0,e._)`typeof ${y} == "string"`,()=>w(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:y,tagName:p})),a.ok(v);function w(){const I=_();u.if(!1);for(const $ in I)u.elseIf((0,e._)`${y} === ${$}`),u.assign(v,b(I[$]));u.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:y,tagName:p}),u.endIf()}function b(I){const $=u.name("valid"),E=a.subschema({keyword:"oneOf",schemaProp:I},$);return a.mergeEvaluated(E,e.Name),$}function _(){var I;const $={},E=j(h);let O=!0;for(let X=0;X<g.length;X++){let Q=g[X];if(Q?.$ref&&!(0,n.schemaHasRulesButRef)(Q,m.self.RULES)){const me=Q.$ref;if(Q=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,me),Q instanceof r.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new i.default(m.opts.uriResolver,m.baseId,me)}const oe=(I=Q?.properties)===null||I===void 0?void 0:I[p];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);O=O&&(E||j(Q)),Z(oe,X)}if(!O)throw new Error(`discriminator: "${p}" must be required`);return $;function j({required:X}){return Array.isArray(X)&&X.includes(p)}function Z(X,Q){if(X.const)W(X.const,Q);else if(X.enum)for(const oe of X.enum)W(oe,Q);else throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}function W(X,Q){if(typeof X!="string"||X in $)throw new Error(`discriminator: "${p}" values must be unique strings`);$[X]=Q}}}};return oi.default=s,oi}const _w="http://json-schema.org/draft-07/schema#",ww="http://json-schema.org/draft-07/schema#",kw="Core schema meta-schema",Sw={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Iw=["object","boolean"],Ew={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}};var Nw={$schema:_w,$id:ww,title:kw,definitions:Sw,type:Iw,properties:Ew,default:!0},Tc;function Ow(){return Tc||(Tc=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=R_(),i=vw(),n=$w(),o=Nw,s=["/properties"],a="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(p,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var l=Qi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=ve();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var h=Ba();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var m=eo();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(wr,wr.exports)),wr.exports}var xw=Ow();const _o=10,Pc=(e=0)=>t=>`\x1B[${t+e}m`,Uc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Dc=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,je={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(je.modifier);const jw=Object.keys(je.color),Aw=Object.keys(je.bgColor);[...jw,...Aw];function zw(){const e=new Map;for(const[t,r]of Object.entries(je)){for(const[i,n]of Object.entries(r))je[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=je[i],e.set(n[0],n[1]);Object.defineProperty(je,t,{value:r,enumerable:!1})}return Object.defineProperty(je,"codes",{value:e,enumerable:!1}),je.color.close="\x1B[39m",je.bgColor.close="\x1B[49m",je.color.ansi=Pc(),je.color.ansi256=Uc(),je.color.ansi16m=Dc(),je.bgColor.ansi=Pc(_o),je.bgColor.ansi256=Uc(_o),je.bgColor.ansi16m=Dc(_o),Object.defineProperties(je,{rgbToAnsi256:{value(t,r,i){return t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));const n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>je.rgbToAnsi256(...je.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;const a=t%36;r=Math.floor(t/36)/5,i=Math.floor(a/6)/5,n=a%6/5}const o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>je.ansi256ToAnsi(je.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>je.ansi256ToAnsi(je.hexToAnsi256(t)),enumerable:!1}}),je}const et=zw();class Tw extends Da{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,state:i,resolvedInputs:n}){const o=new xw.Ajv({strict:!1});this.logger.debug({instanceId:t.id},"validating instance");const s=[];for(const[l,d]of Object.entries(r.args))try{const h=w$(t.args?.[l]);if(!d.required&&h===void 0)continue;o.validate(d.schema,h)||(this.logger.debug({instanceId:t.id,argumentName:l},"invalid argument"),s.push(`Invalid argument "${et.blueBright.open}${l}${et.reset.close}": `+o.errorsText()))}catch(h){this.logger.debug({instanceId:t.id,argumentName:l,error:h},"failed to validate argument"),s.push(`Failed to validate argument "${et.blueBright.open}${l}${et.reset.close}": `+(h instanceof Error?h.message:String(h)))}if(Ua(r))for(const[l,d]of Object.entries(r.secrets))d.required&&!i?.secretNames?.includes(l)&&s.push(`Missing required secret "${et.blueBright.open}${l}${et.reset.close}"`);for(const[l,d]of Object.entries(n))for(const h of d)this.outputs.get(h.input.instanceId)?.status!=="ok"&&s.push(`Invalid input "${et.blueBright.open}${l}${et.reset.close}":
|
|
166
|
-
"${et.blueBright.open}${h.input.instanceId}${et.reset.close}" has validation errors`);for(const[l,d]of Object.entries(r.inputs))d.required&&(!n[l]||!n[l].length)&&s.push(`Missing required input "${et.blueBright.open}${l}${et.reset.close}" of type "${et.greenBright.open}${d.type}${et.reset.close}"`);if(s.length===0)return{status:"ok"};const a=(s.length+1).toString().length+2;return{status:"error",errorText:s.map((l,d)=>{const h=l.split(`
|
|
167
|
-
`),m=`${d+1}. `;return h.map((g,p)=>`${p===0?m:" ".repeat(a)}${g}`).join(`\r
|
|
168
|
-
`)}).join(`\r
|
|
169
|
-
`)}}}const Pw={InputResolver:V$,InputHashResolver:k_,ValidationResolver:Tw};var Un={exports:{}},wo,Cc;function Uw(){if(Cc)return wo;Cc=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}wo=t;function t(r,i,n){var o=n&&n.stringify||e,s=1;if(typeof r=="object"&&r!==null){var a=i.length+s;if(a===1)return r;var u=new Array(a);u[0]=o(r);for(var l=1;l<a;l++)u[l]=o(i[l]);return u.join(" ")}if(typeof r!="string")return r;var d=i.length;if(d===0)return r;for(var h="",m=1-s,g=-1,p=r&&r.length||0,v=0;v<p;){if(r.charCodeAt(v)===37&&v+1<p){switch(g=g>-1?g:0,r.charCodeAt(v+1)){case 100:case 102:if(m>=d||i[m]==null)break;g<v&&(h+=r.slice(g,v)),h+=Number(i[m]),g=v+2,v++;break;case 105:if(m>=d||i[m]==null)break;g<v&&(h+=r.slice(g,v)),h+=Math.floor(Number(i[m])),g=v+2,v++;break;case 79:case 111:case 106:if(m>=d||i[m]===void 0)break;g<v&&(h+=r.slice(g,v));var y=typeof i[m];if(y==="string"){h+="'"+i[m]+"'",g=v+2,v++;break}if(y==="function"){h+=i[m].name||"<anonymous>",g=v+2,v++;break}h+=o(i[m]),g=v+2,v++;break;case 115:if(m>=d)break;g<v&&(h+=r.slice(g,v)),h+=String(i[m]),g=v+2,v++;break;case 37:g<v&&(h+=r.slice(g,v)),h+="%",g=v+2,v++,m--;break}++m}++v}return g===-1?r:(g<p&&(h+=r.slice(g)),h)}return wo}var Bc;function Dw(){if(Bc)return Un.exports;Bc=1;const e=Uw();Un.exports=d;const t=me().console||{},r={mapHttpRequest:O,mapHttpResponse:O,wrapRequestSerializer:j,wrapResponseSerializer:j,wrapErrorSerializer:j,req:O,res:O,err:$,errWithCause:$};function i(F,Y){return F==="silent"?1/0:Y.levels.values[F]}const n=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),s={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(F,Y){const ie={logger:Y,parent:F[o]};Y[o]=ie}function u(F,Y,ie){const re={};Y.forEach(ce=>{re[ce]=ie[ce]?ie[ce]:t[ce]||t[s[ce]||"log"]||Z}),F[n]=re}function l(F,Y){return Array.isArray(F)?F.filter(function(re){return re!=="!stdSerializers.err"}):F===!0?Object.keys(Y):!1}function d(F){F=F||{},F.browser=F.browser||{};const Y=F.browser.transmit;if(Y&&typeof Y.send!="function")throw Error("pino: transmit option must have a send function");const ie=F.browser.write||t;F.browser.write&&(F.browser.asObject=!0);const re=F.serializers||{},ce=l(F.browser.serialize,re);let K=F.browser.serialize;Array.isArray(F.browser.serialize)&&F.browser.serialize.indexOf("!stdSerializers.err")>-1&&(K=!1);const A=Object.keys(F.customLevels||{}),B=["error","fatal","warn","info","debug","trace"].concat(A);typeof ie=="function"&&B.forEach(function(se){ie[se]=ie}),(F.enabled===!1||F.browser.disabled)&&(F.level="silent");const U=F.level||"info",S=Object.create(ie);S.log||(S.log=Z),u(S,B,ie),a({},S),Object.defineProperty(S,"levelVal",{get:R}),Object.defineProperty(S,"level",{get:te,set:ee});const x={transmit:Y,serialize:ce,asObject:F.browser.asObject,asObjectBindingsOnly:F.browser.asObjectBindingsOnly,formatters:F.browser.formatters,levels:B,timestamp:E(F),messageKey:F.messageKey||"msg",onChild:F.onChild||Z};S.levels=h(F),S.level=U,S.isLevelEnabled=function(se){return this.levels.values[se]?this.levels.values[se]>=this.levels.values[this.level]:!1},S.setMaxListeners=S.getMaxListeners=S.emit=S.addListener=S.on=S.prependListener=S.once=S.prependOnceListener=S.removeListener=S.removeAllListeners=S.listeners=S.listenerCount=S.eventNames=S.write=S.flush=Z,S.serializers=re,S._serialize=ce,S._stdErrSerialize=K,S.child=function(...se){return pe.call(this,x,...se)},Y&&(S._logEvent=I());function R(){return i(this.level,this)}function te(){return this._level}function ee(se){if(se!=="silent"&&!this.levels.values[se])throw Error("unknown level "+se);this._level=se,p(this,x,S,"error"),p(this,x,S,"fatal"),p(this,x,S,"warn"),p(this,x,S,"info"),p(this,x,S,"debug"),p(this,x,S,"trace"),A.forEach(T=>{p(this,x,S,T)})}function pe(se,T,D){if(!T)throw new Error("missing bindings for child Pino");D=D||{},ce&&T.serializers&&(D.serializers=T.serializers);const L=D.serializers;if(ce&&L){var J=Object.assign({},re,L),ne=F.browser.serialize===!0?Object.keys(J):ce;delete T.serializers,b([T],ne,J,this._stdErrSerialize)}function le(Fe){this._childLevel=(Fe._childLevel|0)+1,this.bindings=T,J&&(this.serializers=J,this._serialize=ne),Y&&(this._logEvent=I([].concat(Fe._logEvent.bindings,T)))}le.prototype=this;const ke=new le(this);return a(this,ke),ke.child=function(...Fe){return pe.call(this,se,...Fe)},ke.level=D.level||this.level,se.onChild(ke),ke}return S}function h(F){const Y=F.customLevels||{},ie=Object.assign({},d.levels.values,Y),re=Object.assign({},d.levels.labels,m(Y));return{values:ie,labels:re}}function m(F){const Y={};return Object.keys(F).forEach(function(ie){Y[F[ie]]=ie}),Y}d.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},d.stdSerializers=r,d.stdTimeFunctions=Object.assign({},{nullTime:W,epochTime:X,unixTime:Q,isoTime:oe});function g(F){const Y=[];F.bindings&&Y.push(F.bindings);let ie=F[o];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&Y.push(ie.logger.bindings);return Y.reverse()}function p(F,Y,ie,re){if(Object.defineProperty(F,re,{value:i(F.level,ie)>i(re,ie)?Z:ie[n][re],writable:!0,enumerable:!0,configurable:!0}),F[re]===Z){if(!Y.transmit)return;const K=Y.transmit.level||F.level,A=i(K,ie);if(i(re,ie)<A)return}F[re]=y(F,Y,ie,re);const ce=g(F);ce.length!==0&&(F[re]=v(ce,F[re]))}function v(F,Y){return function(){return Y.apply(this,[...F,...arguments])}}function y(F,Y,ie,re){return(function(ce){return function(){const A=Y.timestamp(),B=new Array(arguments.length),U=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var S=0;S<B.length;S++)B[S]=arguments[S];var x=!1;if(Y.serialize&&(b(B,this._serialize,this.serializers,this._stdErrSerialize),x=!0),Y.asObject||Y.formatters?ce.call(U,...w(this,re,B,A,Y)):ce.apply(U,B),Y.transmit){const R=Y.transmit.level||F._level,te=i(R,ie),ee=i(re,ie);if(ee<te)return;_(this,{ts:A,methodLevel:re,methodValue:ee,transmitValue:ie.levels.values[Y.transmit.level||F._level],send:Y.transmit.send,val:i(F._level,ie)},B,x)}}})(F[n][re])}function w(F,Y,ie,re,ce){const{level:K,log:A=R=>R}=ce.formatters||{},B=ie.slice();let U=B[0];const S={};let x=(F._childLevel|0)+1;if(x<1&&(x=1),re&&(S.time=re),K){const R=K(Y,F.levels.values[Y]);Object.assign(S,R)}else S.level=F.levels.values[Y];if(ce.asObjectBindingsOnly){if(U!==null&&typeof U=="object")for(;x--&&typeof B[0]=="object";)Object.assign(S,B.shift());return[A(S),...B]}else{if(U!==null&&typeof U=="object"){for(;x--&&typeof B[0]=="object";)Object.assign(S,B.shift());U=B.length?e(B.shift(),B):void 0}else typeof U=="string"&&(U=e(B.shift(),B));return U!==void 0&&(S[ce.messageKey]=U),[A(S)]}}function b(F,Y,ie,re){for(const ce in F)if(re&&F[ce]instanceof Error)F[ce]=d.stdSerializers.err(F[ce]);else if(typeof F[ce]=="object"&&!Array.isArray(F[ce])&&Y)for(const K in F[ce])Y.indexOf(K)>-1&&K in ie&&(F[ce][K]=ie[K](F[ce][K]))}function _(F,Y,ie,re=!1){const ce=Y.send,K=Y.ts,A=Y.methodLevel,B=Y.methodValue,U=Y.val,S=F._logEvent.bindings;re||b(ie,F._serialize||Object.keys(F.serializers),F.serializers,F._stdErrSerialize===void 0?!0:F._stdErrSerialize),F._logEvent.ts=K,F._logEvent.messages=ie.filter(function(x){return S.indexOf(x)===-1}),F._logEvent.level.label=A,F._logEvent.level.value=B,ce(A,F._logEvent,U),F._logEvent=I(S)}function I(F){return{ts:0,messages:[],bindings:F||[],level:{label:"",value:0}}}function $(F){const Y={type:F.constructor.name,msg:F.message,stack:F.stack};for(const ie in F)Y[ie]===void 0&&(Y[ie]=F[ie]);return Y}function E(F){return typeof F.timestamp=="function"?F.timestamp:F.timestamp===!1?W:X}function O(){return{}}function j(F){return F}function Z(){}function W(){return!1}function X(){return Date.now()}function Q(){return Math.round(Date.now()/1e3)}function oe(){return new Date(Date.now()).toISOString()}function me(){function F(Y){return typeof Y<"u"&&Y}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return F(self)||F(window)||F(this)||{}}}return Un.exports.default=d,Un.exports.pino=d,Un.exports}var Cw=Dw();const ci=(e,t)=>{e.postMessage(t)},Gn=new Map,Bw=async(e,t,r,i,n=!1)=>{if(Gn.has(r)){console.warn(`state with id "${r}" already exists`);return}const o=Cw.pino({level:"info"}).child({resolverId:r,resolverType:i}),s=(l,d)=>{ci(e,{type:"outputs",resolverId:r,items:[{nodeId:l,output:d}]})};let a;n&&(a=(l,d)=>{ci(e,{type:"dependent-set",resolverId:r,nodeId:l,dependents:d&&Array.from(d)})});const u=new Pw[i](t,o,s,a);Gn.set(r,{nodes:t,resolver:u,logger:o,abortController:new AbortController}),u.addAllNodesToWorkset(),await u.process(),ci(e,{type:"resolver-ready",resolverId:r})},Ip=(e,t,r)=>{e.abortController.abort(),e.abortController=new AbortController,e.nodes.set(t,r),e.resolver.invalidate(t),e.resolver.process(e.abortController.signal)},Rw=(e,t,r)=>{const i=Gn.get(e);if(!i)throw new Error(`Unknown state: ${e}`);i.nodes.set(t,r),Ip(i,t,r)},Fw=(e,t)=>{const r=Gn.get(e);if(!r)throw new Error(`Unknown state: ${e}`);r.nodes.delete(t),Ip(r,t,void 0)},Zw=e=>{Gn.delete(e)};self.onconnect=e=>{const t=e.ports[0];t.onmessage=r=>{const i=r.data;switch(i.type){case"create-resolver":{const n=new Map(Object.entries(i.nodes));Bw(t,n,i.resolverId,i.resolverType,i.syncDependentMap);break}case"update-input":{Rw(i.resolverId,i.nodeId,i.node);break}case"delete-input":{Fw(i.resolverId,i.nodeId);break}case"dispose-resolver":{Zw(i.resolverId);break}}},ci(t,{type:"ready"})};
|