@highstate/designer 0.9.32 → 0.9.34

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.
Files changed (93) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/AV0MK5it.js +1 -0
  3. package/.output/public/_nuxt/{By3d8et0.js → B-tzHMOR.js} +1 -1
  4. package/.output/public/_nuxt/{BwKX83xG.js → B9QOj8at.js} +1 -1
  5. package/.output/public/_nuxt/{EKb4dcZD.js → BDCIi1Fb.js} +1 -1
  6. package/.output/public/_nuxt/{BJ21GASr.js → BIoksCZ6.js} +1 -1
  7. package/.output/public/_nuxt/BKe7h20I.js +2 -0
  8. package/.output/public/_nuxt/{DOOqMYtP.js → BL-2dw2H.js} +2 -2
  9. package/.output/public/_nuxt/{y1_fPoH6.js → BM49jZle.js} +1 -1
  10. package/.output/public/_nuxt/{Qwu5ZxYn.js → BNR_JCLq.js} +1 -1
  11. package/.output/public/_nuxt/{DDmfmNNV.js → BOoETPDV.js} +1 -1
  12. package/.output/public/_nuxt/BQy0v27R.js +1 -0
  13. package/.output/public/_nuxt/{TK2XJUoZ.js → BXaX6_oe.js} +1 -1
  14. package/.output/public/_nuxt/{CRDApjgr.js → B_v2zcbf.js} +1 -1
  15. package/.output/public/_nuxt/{BMvztuV8.js → BcG6zz3f.js} +1 -1
  16. package/.output/public/_nuxt/BcoNctsL.js +1 -0
  17. package/.output/public/_nuxt/BkNdYhVU.js +1 -0
  18. package/.output/public/_nuxt/{t4iuue3N.js → BlqvLz7f.js} +1 -1
  19. package/.output/public/_nuxt/{BA1jOVVK.js → BskLrcgq.js} +1 -1
  20. package/.output/public/_nuxt/BuN5GOse.js +1 -0
  21. package/.output/public/_nuxt/{Dp4BYkpR.js → ByQEjDj-.js} +1 -1
  22. package/.output/public/_nuxt/{Bt2qYRi5.js → BzLYComM.js} +1 -1
  23. package/.output/public/_nuxt/{CIEevd3G.js → C5w7DwS9.js} +1 -1
  24. package/.output/public/_nuxt/CDPuLdqk.js +1 -0
  25. package/.output/public/_nuxt/{BeLGiGAM.js → CFtPCidf.js} +1 -1
  26. package/.output/public/_nuxt/{B66e5Lr3.js → CGIsbOqt.js} +1 -1
  27. package/.output/public/_nuxt/{DbWDZVK4.js → CJ9AjueP.js} +1 -1
  28. package/.output/public/_nuxt/{A58q4jyj.js → CPh4u-Ki.js} +1 -1
  29. package/.output/public/_nuxt/{lavOTP7i.js → CUlEAfaO.js} +37 -37
  30. package/.output/public/_nuxt/{BxlUPmmS.js → CXRolcM8.js} +1 -1
  31. package/.output/public/_nuxt/{D8XD7kAx.js → CjxVmS5D.js} +1 -1
  32. package/.output/public/_nuxt/{BOkyi76q.js → CpCar6eJ.js} +1 -1
  33. package/.output/public/_nuxt/Cvl8iHT_.js +1 -0
  34. package/.output/public/_nuxt/{ZHHaViAY.js → D-IcYK3n.js} +1 -1
  35. package/.output/public/_nuxt/{Bv0mfTEl.js → D12QiTSl.js} +1 -1
  36. package/.output/public/_nuxt/{V3QPgH7p.js → D2hOj9XC.js} +1 -1
  37. package/.output/public/_nuxt/{C0pr3b94.js → D4I3CwV0.js} +7 -7
  38. package/.output/public/_nuxt/{BrYBlVvR.js → D5xa2_5u.js} +1 -1
  39. package/.output/public/_nuxt/{DCm1KkXo.js → DA66NkQb.js} +1 -1
  40. package/.output/public/_nuxt/{CynX-fc0.js → DDEihc9R.js} +1 -1
  41. package/.output/public/_nuxt/{4_BvSMSB.js → DQF3Xngg.js} +1 -1
  42. package/.output/public/_nuxt/{nK29AdXm.js → DSVU4Cl7.js} +1 -1
  43. package/.output/public/_nuxt/{BeJLAabH.js → DStOH21o.js} +1 -1
  44. package/.output/public/_nuxt/{qcAYxILn.js → DX2ssmvF.js} +1 -1
  45. package/.output/public/_nuxt/{tC6GUGfV.js → DeCCkKCn.js} +1 -1
  46. package/.output/public/_nuxt/DizFB7BZ.js +1 -0
  47. package/.output/public/_nuxt/{BDGK4R8G.js → Dj-ZGW1B.js} +1 -1
  48. package/.output/public/_nuxt/{iEZeC4im.js → DkPrE8g-.js} +1 -1
  49. package/.output/public/_nuxt/{jwlf7Zb6.js → Dlt67GMf.js} +1 -1
  50. package/.output/public/_nuxt/{2wGc8G-a.js → DmCOOqTD.js} +1 -1
  51. package/.output/public/_nuxt/{BJb7iTD-.js → Dn-R_Odm.js} +1 -1
  52. package/.output/public/_nuxt/{CdT0dBVm.js → DnodTinn.js} +1 -1
  53. package/.output/public/_nuxt/{CfS1NLi3.js → DpCgGkMV.js} +1 -1
  54. package/.output/public/_nuxt/{sNd89Uej.js → DqcsB7RK.js} +1 -1
  55. package/.output/public/_nuxt/Dqe2EjXB.js +16 -0
  56. package/.output/public/_nuxt/{DXjKBs9C.js → DtufO5Sm.js} +1 -1
  57. package/.output/public/_nuxt/{DFehgkCX.js → Du2xhFnN.js} +1 -1
  58. package/.output/public/_nuxt/{DSDS7L84.js → FQpR5TAR.js} +1 -1
  59. package/.output/public/_nuxt/{CINcSeGB.js → G0kTzIhG.js} +1 -1
  60. package/.output/public/_nuxt/{BvDqvtaa.js → LPrTxMoA.js} +1 -1
  61. package/.output/public/_nuxt/{CMK3ZjMt.js → NHPpYOb8.js} +1 -1
  62. package/.output/public/_nuxt/{Clm0APaL.js → Q0n-WHNk.js} +1 -1
  63. package/.output/public/_nuxt/{BljP9iCe.js → RIDdiPVc.js} +1 -1
  64. package/.output/public/_nuxt/{YP1-T6Kp.js → RJCesp1_.js} +1 -1
  65. package/.output/public/_nuxt/{BsWEx-ds.js → TwbepanP.js} +1 -1
  66. package/.output/public/_nuxt/{C-DRE6gp.js → UlOiG1et.js} +1 -1
  67. package/.output/public/_nuxt/builds/latest.json +1 -1
  68. package/.output/public/_nuxt/builds/meta/e078712d-664b-41c7-9aa8-b59330e10324.json +1 -0
  69. package/.output/public/_nuxt/{entry.Di59EEvj.css → entry.BmVIGwdf.css} +1 -1
  70. package/.output/public/_nuxt/{BuyuJpoa.js → gL-G5cIZ.js} +1 -1
  71. package/.output/public/_nuxt/{DoKDKt4v.js → gMNeqWrU.js} +1 -1
  72. package/.output/public/_nuxt/{DLF8e31E.js → gbAWFwGr.js} +1 -1
  73. package/.output/public/_nuxt/{graph-resolver-CBIFuWQv.js → graph-resolver-Do-TGh0Q.js} +23 -23
  74. package/.output/public/_nuxt/{Duqlok3y.js → hR6-a8C4.js} +1 -1
  75. package/.output/public/_nuxt/{CJvwvAqP.js → n5hdtVlR.js} +1 -1
  76. package/.output/public/_nuxt/operations.D9z3Ystv.css +1 -0
  77. package/.output/public/_nuxt/{vuetify.C8i0SvP7.css → vuetify.BqwNhQ76.css} +1 -1
  78. package/.output/public/_nuxt/{DosuBG32.js → yCy9iX43.js} +1 -1
  79. package/.output/public/_nuxt/{Bb6e6SIn.js → zOx78ZE1.js} +1 -1
  80. package/.output/public/_nuxt/{DXiF0BBA.js → zzXvEwMy.js} +1 -1
  81. package/.output/server/index.mjs +1099 -1051
  82. package/.output/server/package.json +1 -1
  83. package/package.json +5 -5
  84. package/.output/public/_nuxt/2eVGFeti.js +0 -1
  85. package/.output/public/_nuxt/5nZ5NYGd.js +0 -16
  86. package/.output/public/_nuxt/BH1RZZWo.js +0 -1
  87. package/.output/public/_nuxt/BS13dqDM.js +0 -1
  88. package/.output/public/_nuxt/CPDn8T45.js +0 -1
  89. package/.output/public/_nuxt/CvyQPAPs.js +0 -2
  90. package/.output/public/_nuxt/builds/meta/35275f64-d6d7-4e7e-baee-c978f4c4400c.json +0 -1
  91. package/.output/public/_nuxt/gt3opOQe.js +0 -1
  92. package/.output/public/_nuxt/operations.B7FA252u.css +0 -1
  93. package/.output/public/_nuxt/tb_Ay_yM.js +0 -1
@@ -1,7 +1,7 @@
1
- const Sc=Object.freeze({status:"aborted"});function D(e,t,r){function i(a,c){var d;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(d=a._zod).traits??(d.traits=new Set),a._zod.traits.add(e),t(a,c);for(const u in s.prototype)u in a||Object.defineProperty(a,u,{value:s.prototype[u].bind(a)});a._zod.constr=s,a._zod.def=c}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function s(a){var c;const d=r?.Parent?new o:this;i(d,a),(c=d._zod).deferred??(c.deferred=[]);for(const u of d._zod.deferred)u();return d}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 Ic=Symbol("zod_brand");class gn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const ti={};function Xe(e){return e&&Object.assign(ti,e),ti}function Mp(e){return e}function qp(e){return e}function Vp(e){}function Kp(e){throw new Error}function Jp(e){}function xo(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 W(e,t="|"){return e.map(r=>fe(r)).join(t)}function Ec(e,t){return typeof t=="bigint"?t.toString():t}function mi(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Xt(e){return e==null}function gi(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Nc(e,t){const r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,o=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return o%s/10**n}function $e(e,t,r){Object.defineProperty(e,t,{get(){{const i=r();return e[t]=i,i}},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function kn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Gp(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Wp(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 Hp(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 un(e){return JSON.stringify(e)}const jo=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Zn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Oc=mi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mn(e){if(Zn(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Zn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Xp(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Yp=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}`)}},ni=new Set(["string","number","symbol"]),xc=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Yt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(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 Qp(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 fe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function jc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const zc={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]},Ac={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Tc(e,t){const r={},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=i.shape[n])}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Pc(e,t){const r={...e._zod.def.shape},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Dc(e,t){if(!Mn(t))throw new Error("Invalid input to extend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return kn(this,"shape",i),i},checks:[]};return $t(e,r)}function Uc(e,t){return $t(e,{...e._zod.def,get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return kn(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function Cc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)n[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return $t(t,{...t._zod.def,shape:n,checks:[]})}function Bc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(const o in i)n[o]=new e({type:"nonoptional",innerType:i[o]});return $t(t,{...t._zod.def,shape:n,checks:[]})}function dn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ot(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Un(e){return typeof e=="string"?e:e?.message}function pt(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const n=Un(e.inst?._zod.def?.error?.(e))??Un(t?.error?.(e))??Un(r.customError?.(e))??Un(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function yi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function vi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function yn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function em(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}class tm{constructor(...t){}}var nm=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:Ac,Class:tm,NUMBER_FORMAT_RANGES:zc,aborted:dn,allowsEval:Oc,assert:Jp,assertEqual:Mp,assertIs:Vp,assertNever:Kp,assertNotEqual:qp,assignProp:kn,cached:mi,captureStackTrace:jo,cleanEnum:em,cleanRegex:gi,clone:$t,createTransparentProxy:Qp,defineLazy:$e,esc:un,escapeRegex:Yt,extend:Dc,finalizeIssue:pt,floatSafeRemainder:Nc,getElementAtPath:Gp,getEnumValues:xo,getLengthableOrigin:vi,getParsedType:Yp,getSizableOrigin:yi,isObject:Zn,isPlainObject:Mn,issue:yn,joinValues:W,jsonStringifyReplacer:Ec,merge:Uc,normalizeParams:V,nullish:Xt,numKeys:Xp,omit:Pc,optionalKeys:jc,partial:Cc,pick:Tc,prefixIssues:ot,primitiveTypes:xc,promiseAllObject:Wp,propertyKeyTypes:ni,randomString:Hp,required:Bc,stringifyPrimitive:fe,unwrapMessage:Un});const Rc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Ec,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},zo=D("$ZodError",Rc),Hn=D("$ZodError",Rc,{Parent:Error});function Ao(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 To(e,t){const r=t||function(o){return o.message},i={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)i._errors.push(r(s));else{let a=i,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(r(s))):a[d]=a[d]||{_errors:[]},a=a[d],c++}}};return n(e),i}function Fc(e,t){const r=t||function(o){return o.message},i={errors:[]},n=(o,s=[])=>{var a,c;for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(u=>n({issues:u},d.path));else if(d.code==="invalid_key")n({issues:d.issues},d.path);else if(d.code==="invalid_element")n({issues:d.issues},d.path);else{const u=[...s,...d.path];if(u.length===0){i.errors.push(r(d));continue}let h=i,y=0;for(;y<u.length;){const _=u[y],b=y===u.length-1;typeof _=="string"?(h.properties??(h.properties={}),(a=h.properties)[_]??(a[_]={errors:[]}),h=h.properties[_]):(h.items??(h.items=[]),(c=h.items)[_]??(c[_]={errors:[]}),h=h.items[_]),b&&h.errors.push(r(d)),y++}}};return n(e),i}function Lc(e){const t=[];for(const r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Zc(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 ${Lc(i.path)}`);return t.join(`
2
- `)}const Po=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 gn;if(s.issues.length){const a=new(n?.Err??e)(s.issues.map(c=>pt(c,o,Xe())));throw jo(a,n?.callee),a}return s.value},mo=Po(Hn),Do=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(c=>pt(c,o,Xe())));throw jo(a,n?.callee),a}return s.value},go=Do(Hn),Uo=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 gn;return o.issues.length?{success:!1,error:new(e??zo)(o.issues.map(s=>pt(s,n,Xe())))}:{success:!0,data:o.value}},Mc=Uo(Hn),Co=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=>pt(s,n,Xe())))}:{success:!0,data:o.value}},qc=Co(Hn),Vc=/^[cC][^\s-]{8,}$/,Kc=/^[0-9a-z]+$/,Jc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gc=/^[0-9a-vA-V]{20}$/,Wc=/^[A-Za-z0-9]{27}$/,Hc=/^[a-zA-Z0-9_-]{21}$/,Xc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rm=/^[-+]?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)?)??$/,Yc=/^([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})$/,vn=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)$/,im=vn(4),om=vn(6),sm=vn(7),Qc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,am=/^[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])?)*$/,um=/^(([^<>()\[\]\\.,;:\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,}))$/,cm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,lm=/^[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])?)*$/,fm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function el(){return new RegExp(fm,"u")}const tl=/^(?:(?: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])$/,nl=/^(([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})$/,rl=/^((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])$/,il=/^(([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])$/,ol=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bo=/^[A-Za-z0-9_-]*$/,sl=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,dm=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,al=/^\+(?:[0-9]){6,14}[0-9]$/,ul="(?:(?:\\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])))",cl=new RegExp(`^${ul}$`);function ll(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 fl(e){return new RegExp(`^${ll(e)}$`)}function dl(e){const t=ll({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${ul}T(?:${i})$`)}const hl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pl=/^\d+n?$/,ml=/^\d+$/,gl=/^-?\d+(?:\.\d+)?/i,yl=/true|false/i,vl=/null/i,$l=/undefined/i,bl=/^[^A-Z]*$/,_l=/^[^a-z]*$/;var wl=Object.freeze({__proto__:null,base64:ol,base64url:Bo,bigint:pl,boolean:yl,browserEmail:lm,cidrv4:rl,cidrv6:il,cuid:Vc,cuid2:Kc,date:cl,datetime:dl,domain:dm,duration:Xc,e164:al,email:Qc,emoji:el,extendedDuration:rm,guid:Yc,hostname:sl,html5Email:am,integer:ml,ipv4:tl,ipv6:nl,ksuid:Wc,lowercase:bl,nanoid:Hc,null:vl,number:gl,rfc5322Email:um,string:hl,time:fl,ulid:Jc,undefined:$l,unicodeEmail:cm,uppercase:_l,uuid:vn,uuid4:im,uuid6:om,uuid7:sm,xid:Gc});const Ue=D("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),kl={number:"number",bigint:"bigint",object:"date"},Ro=D("$ZodCheckLessThan",(e,t)=>{Ue.init(e,t);const r=kl[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})}}),Fo=D("$ZodCheckGreaterThan",(e,t)=>{Ue.init(e,t);const r=kl[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})}}),Sl=D("$ZodCheckMultipleOf",(e,t)=>{Ue.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):Nc(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})}}),Il=D("$ZodCheckNumberFormat",(e,t)=>{Ue.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=zc[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=ml)}),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",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})}}),El=D("$ZodCheckBigIntFormat",(e,t)=>{Ue.init(e,t);const[r,i]=Ac[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})}}),Nl=D("$ZodCheckMaxSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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:yi(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Ol=D("$ZodCheckMinSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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:yi(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),xl=D("$ZodCheckSizeEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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:yi(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})}}),jl=D("$ZodCheckMaxLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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=vi(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),zl=D("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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=vi(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Al=D("$ZodCheckLengthEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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=vi(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})}}),Xn=D("$ZodCheckStringFormat",(e,t)=>{var r,i;Ue.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=()=>{})}),Tl=D("$ZodCheckRegex",(e,t)=>{Xn.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})}}),Pl=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=bl),Xn.init(e,t)}),Dl=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_l),Xn.init(e,t)}),Ul=D("$ZodCheckIncludes",(e,t)=>{Ue.init(e,t);const r=Yt(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})}}),Cl=D("$ZodCheckStartsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`^${Yt(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})}}),Bl=D("$ZodCheckEndsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`.*${Yt(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 ja(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues))}const Rl=D("$ZodCheckProperty",(e,t)=>{Ue.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=>ja(n,r,t.property));ja(i,r,t.property)}}),Fl=D("$ZodCheckMimeType",(e,t)=>{Ue.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})}}),Ll=D("$ZodCheckOverwrite",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Zl{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(`
1
+ const Sc=Object.freeze({status:"aborted"});function D(e,t,r){function i(a,c){var d;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(d=a._zod).traits??(d.traits=new Set),a._zod.traits.add(e),t(a,c);for(const u in s.prototype)u in a||Object.defineProperty(a,u,{value:s.prototype[u].bind(a)});a._zod.constr=s,a._zod.def=c}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function s(a){var c;const d=r?.Parent?new o:this;i(d,a),(c=d._zod).deferred??(c.deferred=[]);for(const u of d._zod.deferred)u();return d}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 Ic=Symbol("zod_brand");class gn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const ti={};function Xe(e){return e&&Object.assign(ti,e),ti}function Mp(e){return e}function qp(e){return e}function Vp(e){}function Kp(e){throw new Error}function Jp(e){}function xo(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 W(e,t="|"){return e.map(r=>fe(r)).join(t)}function Ec(e,t){return typeof t=="bigint"?t.toString():t}function mi(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Xt(e){return e==null}function gi(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Nc(e,t){const r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,o=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return o%s/10**n}function $e(e,t,r){Object.defineProperty(e,t,{get(){{const i=r();return e[t]=i,i}},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function kn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Gp(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Wp(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 Hp(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 un(e){return JSON.stringify(e)}const jo=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Zn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Oc=mi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mn(e){if(Zn(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Zn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Xp(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Yp=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}`)}},ni=new Set(["string","number","symbol"]),xc=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Yt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(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 Qp(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 fe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function jc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Ac={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]},zc={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Tc(e,t){const r={},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=i.shape[n])}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Pc(e,t){const r={...e._zod.def.shape},i=e._zod.def;for(const n in t){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return $t(e,{...e._zod.def,shape:r,checks:[]})}function Dc(e,t){if(!Mn(t))throw new Error("Invalid input to extend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return kn(this,"shape",i),i},checks:[]};return $t(e,r)}function Uc(e,t){return $t(e,{...e._zod.def,get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return kn(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function Cc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)n[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return $t(t,{...t._zod.def,shape:n,checks:[]})}function Bc(e,t,r){const i=t._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(const o in i)n[o]=new e({type:"nonoptional",innerType:i[o]});return $t(t,{...t._zod.def,shape:n,checks:[]})}function dn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ot(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Un(e){return typeof e=="string"?e:e?.message}function pt(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const n=Un(e.inst?._zod.def?.error?.(e))??Un(t?.error?.(e))??Un(r.customError?.(e))??Un(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function yi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function vi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function yn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function em(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}class tm{constructor(...t){}}var nm=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:zc,Class:tm,NUMBER_FORMAT_RANGES:Ac,aborted:dn,allowsEval:Oc,assert:Jp,assertEqual:Mp,assertIs:Vp,assertNever:Kp,assertNotEqual:qp,assignProp:kn,cached:mi,captureStackTrace:jo,cleanEnum:em,cleanRegex:gi,clone:$t,createTransparentProxy:Qp,defineLazy:$e,esc:un,escapeRegex:Yt,extend:Dc,finalizeIssue:pt,floatSafeRemainder:Nc,getElementAtPath:Gp,getEnumValues:xo,getLengthableOrigin:vi,getParsedType:Yp,getSizableOrigin:yi,isObject:Zn,isPlainObject:Mn,issue:yn,joinValues:W,jsonStringifyReplacer:Ec,merge:Uc,normalizeParams:V,nullish:Xt,numKeys:Xp,omit:Pc,optionalKeys:jc,partial:Cc,pick:Tc,prefixIssues:ot,primitiveTypes:xc,promiseAllObject:Wp,propertyKeyTypes:ni,randomString:Hp,required:Bc,stringifyPrimitive:fe,unwrapMessage:Un});const Rc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Ec,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ao=D("$ZodError",Rc),Hn=D("$ZodError",Rc,{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 To(e,t){const r=t||function(o){return o.message},i={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)i._errors.push(r(s));else{let a=i,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(r(s))):a[d]=a[d]||{_errors:[]},a=a[d],c++}}};return n(e),i}function Fc(e,t){const r=t||function(o){return o.message},i={errors:[]},n=(o,s=[])=>{var a,c;for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(u=>n({issues:u},d.path));else if(d.code==="invalid_key")n({issues:d.issues},d.path);else if(d.code==="invalid_element")n({issues:d.issues},d.path);else{const u=[...s,...d.path];if(u.length===0){i.errors.push(r(d));continue}let h=i,y=0;for(;y<u.length;){const _=u[y],b=y===u.length-1;typeof _=="string"?(h.properties??(h.properties={}),(a=h.properties)[_]??(a[_]={errors:[]}),h=h.properties[_]):(h.items??(h.items=[]),(c=h.items)[_]??(c[_]={errors:[]}),h=h.items[_]),b&&h.errors.push(r(d)),y++}}};return n(e),i}function Lc(e){const t=[];for(const r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Zc(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 ${Lc(i.path)}`);return t.join(`
2
+ `)}const Po=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 gn;if(s.issues.length){const a=new(n?.Err??e)(s.issues.map(c=>pt(c,o,Xe())));throw jo(a,n?.callee),a}return s.value},mo=Po(Hn),Do=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(c=>pt(c,o,Xe())));throw jo(a,n?.callee),a}return s.value},go=Do(Hn),Uo=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 gn;return o.issues.length?{success:!1,error:new(e??Ao)(o.issues.map(s=>pt(s,n,Xe())))}:{success:!0,data:o.value}},Mc=Uo(Hn),Co=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=>pt(s,n,Xe())))}:{success:!0,data:o.value}},qc=Co(Hn),Vc=/^[cC][^\s-]{8,}$/,Kc=/^[0-9a-z]+$/,Jc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gc=/^[0-9a-vA-V]{20}$/,Wc=/^[A-Za-z0-9]{27}$/,Hc=/^[a-zA-Z0-9_-]{21}$/,Xc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rm=/^[-+]?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)?)??$/,Yc=/^([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})$/,vn=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)$/,im=vn(4),om=vn(6),sm=vn(7),Qc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,am=/^[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])?)*$/,um=/^(([^<>()\[\]\\.,;:\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,}))$/,cm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,lm=/^[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])?)*$/,fm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function el(){return new RegExp(fm,"u")}const tl=/^(?:(?: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])$/,nl=/^(([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})$/,rl=/^((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])$/,il=/^(([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])$/,ol=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bo=/^[A-Za-z0-9_-]*$/,sl=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,dm=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,al=/^\+(?:[0-9]){6,14}[0-9]$/,ul="(?:(?:\\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])))",cl=new RegExp(`^${ul}$`);function ll(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 fl(e){return new RegExp(`^${ll(e)}$`)}function dl(e){const t=ll({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${ul}T(?:${i})$`)}const hl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pl=/^\d+n?$/,ml=/^\d+$/,gl=/^-?\d+(?:\.\d+)?/i,yl=/true|false/i,vl=/null/i,$l=/undefined/i,bl=/^[^A-Z]*$/,_l=/^[^a-z]*$/;var wl=Object.freeze({__proto__:null,base64:ol,base64url:Bo,bigint:pl,boolean:yl,browserEmail:lm,cidrv4:rl,cidrv6:il,cuid:Vc,cuid2:Kc,date:cl,datetime:dl,domain:dm,duration:Xc,e164:al,email:Qc,emoji:el,extendedDuration:rm,guid:Yc,hostname:sl,html5Email:am,integer:ml,ipv4:tl,ipv6:nl,ksuid:Wc,lowercase:bl,nanoid:Hc,null:vl,number:gl,rfc5322Email:um,string:hl,time:fl,ulid:Jc,undefined:$l,unicodeEmail:cm,uppercase:_l,uuid:vn,uuid4:im,uuid6:om,uuid7:sm,xid:Gc});const Ue=D("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),kl={number:"number",bigint:"bigint",object:"date"},Ro=D("$ZodCheckLessThan",(e,t)=>{Ue.init(e,t);const r=kl[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})}}),Fo=D("$ZodCheckGreaterThan",(e,t)=>{Ue.init(e,t);const r=kl[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})}}),Sl=D("$ZodCheckMultipleOf",(e,t)=>{Ue.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):Nc(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})}}),Il=D("$ZodCheckNumberFormat",(e,t)=>{Ue.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Ac[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=ml)}),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",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})}}),El=D("$ZodCheckBigIntFormat",(e,t)=>{Ue.init(e,t);const[r,i]=zc[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})}}),Nl=D("$ZodCheckMaxSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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:yi(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Ol=D("$ZodCheckMinSize",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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:yi(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),xl=D("$ZodCheckSizeEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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:yi(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})}}),jl=D("$ZodCheckMaxLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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=vi(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Al=D("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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=vi(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),zl=D("$ZodCheckLengthEquals",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Xt(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=vi(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})}}),Xn=D("$ZodCheckStringFormat",(e,t)=>{var r,i;Ue.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=()=>{})}),Tl=D("$ZodCheckRegex",(e,t)=>{Xn.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})}}),Pl=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=bl),Xn.init(e,t)}),Dl=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_l),Xn.init(e,t)}),Ul=D("$ZodCheckIncludes",(e,t)=>{Ue.init(e,t);const r=Yt(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})}}),Cl=D("$ZodCheckStartsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`^${Yt(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})}}),Bl=D("$ZodCheckEndsWith",(e,t)=>{Ue.init(e,t);const r=new RegExp(`.*${Yt(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 ja(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues))}const Rl=D("$ZodCheckProperty",(e,t)=>{Ue.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=>ja(n,r,t.property));ja(i,r,t.property)}}),Fl=D("$ZodCheckMimeType",(e,t)=>{Ue.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})}}),Ll=D("$ZodCheckOverwrite",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Zl{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
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 Ml={major:4,minor:0,patch:5},ue=D("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ml;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=(o,s,a)=>{let c=dn(o),d;for(const u of s){if(u._zod.def.when){if(!u._zod.def.when(o))continue}else if(c)continue;const h=o.issues.length,y=u._zod.check(o);if(y instanceof Promise&&a?.async===!1)throw new gn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,o.issues.length!==h&&(c||(c=dn(o,h)))});else{if(o.issues.length===h)continue;c||(c=dn(o,h))}}return d?d.then(()=>o):o};e._zod.run=(o,s)=>{const a=e._zod.parse(o,s);if(a instanceof Promise){if(s.async===!1)throw new gn;return a.then(c=>n(c,i,s))}return n(a,i,s)}}e["~standard"]={validate:n=>{try{const o=Mc(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return qc(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Yn=D("$ZodString",(e,t)=>{ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hl(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=D("$ZodStringFormat",(e,t)=>{Xn.init(e,t),Yn.init(e,t)}),ql=D("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Yc),Ne.init(e,t)}),Vl=D("$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=vn(i))}else t.pattern??(t.pattern=vn());Ne.init(e,t)}),Kl=D("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qc),Ne.init(e,t)}),Jl=D("$ZodURL",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{try{const i=r.value,n=new URL(i),o=n.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:sl.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})),!i.endsWith("/")&&o.endsWith("/")?r.value=o.slice(0,-1):r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Gl=D("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=el()),Ne.init(e,t)}),Wl=D("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Hc),Ne.init(e,t)}),Hl=D("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vc),Ne.init(e,t)}),Xl=D("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Kc),Ne.init(e,t)}),Yl=D("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Jc),Ne.init(e,t)}),Ql=D("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gc),Ne.init(e,t)}),ef=D("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Wc),Ne.init(e,t)}),tf=D("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dl(t)),Ne.init(e,t)}),nf=D("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cl),Ne.init(e,t)}),rf=D("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=fl(t)),Ne.init(e,t)}),of=D("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xc),Ne.init(e,t)}),sf=D("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tl),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),af=D("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nl),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})}}}),uf=D("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=rl),Ne.init(e,t)}),cf=D("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=il),Ne.init(e,t),e._zod.check=r=>{const[i,n]=r.value.split("/");try{if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Lo(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const lf=D("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ol),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Lo(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ff(e){if(!Bo.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Lo(r)}const df=D("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Bo),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{ff(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),hf=D("$ZodE164",(e,t)=>{t.pattern??(t.pattern=al),Ne.init(e,t)});function pf(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 mf=D("$ZodJWT",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{pf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),gf=D("$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})}}),Zo=D("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??gl,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}}),yf=D("$ZodNumber",(e,t)=>{Il.init(e,t),Zo.init(e,t)}),Mo=D("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=yl,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}}),qo=D("$ZodBigInt",(e,t)=>{ue.init(e,t),e._zod.pattern=pl,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}}),vf=D("$ZodBigInt",(e,t)=>{El.init(e,t),qo.init(e,t)}),$f=D("$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}}),bf=D("$ZodUndefined",(e,t)=>{ue.init(e,t),e._zod.pattern=$l,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}}),_f=D("$ZodNull",(e,t)=>{ue.init(e,t),e._zod.pattern=vl,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}}),wf=D("$ZodAny",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),ri=D("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),kf=D("$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)}),Sf=D("$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}}),If=D("$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 za(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}const Vo=D("$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],c=t.element._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(d=>za(d,r,s))):za(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function or(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}function Aa(e,t,r,i){e.issues.length?i[r]===void 0?r in i?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...ot(r,e.issues)):e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}const Ef=D("$ZodObject",(e,t)=>{ue.init(e,t);const r=mi(()=>{const h=Object.keys(t.shape);for(const _ of h)if(!(t.shape[_]instanceof ue))throw new Error(`Invalid element at key "${_}": expected a Zod schema`);const y=jc(t.shape);return{shape:t.shape,keys:h,keySet:new Set(h),numKeys:h.length,optionalKeys:new Set(y)}});$e(e._zod,"propValues",()=>{const h=t.shape,y={};for(const _ in h){const b=h[_]._zod;if(b.values){y[_]??(y[_]=new Set);for(const g of b.values)y[_].add(g)}}return y});const i=h=>{const y=new Zl(["shape","payload","ctx"]),_=r.value,b=f=>{const v=un(f);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};y.write("const input = payload.value;");const g=Object.create(null);let m=0;for(const f of _.keys)g[f]=`key_${m++}`;y.write("const newResult = {}");for(const f of _.keys)if(_.optionalKeys.has(f)){const v=g[f];y.write(`const ${v} = ${b(f)};`);const S=un(f);y.write(`
4
+ `))}}const Ml={major:4,minor:0,patch:5},ue=D("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ml;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=(o,s,a)=>{let c=dn(o),d;for(const u of s){if(u._zod.def.when){if(!u._zod.def.when(o))continue}else if(c)continue;const h=o.issues.length,y=u._zod.check(o);if(y instanceof Promise&&a?.async===!1)throw new gn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,o.issues.length!==h&&(c||(c=dn(o,h)))});else{if(o.issues.length===h)continue;c||(c=dn(o,h))}}return d?d.then(()=>o):o};e._zod.run=(o,s)=>{const a=e._zod.parse(o,s);if(a instanceof Promise){if(s.async===!1)throw new gn;return a.then(c=>n(c,i,s))}return n(a,i,s)}}e["~standard"]={validate:n=>{try{const o=Mc(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return qc(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Yn=D("$ZodString",(e,t)=>{ue.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hl(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=D("$ZodStringFormat",(e,t)=>{Xn.init(e,t),Yn.init(e,t)}),ql=D("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Yc),Ne.init(e,t)}),Vl=D("$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=vn(i))}else t.pattern??(t.pattern=vn());Ne.init(e,t)}),Kl=D("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qc),Ne.init(e,t)}),Jl=D("$ZodURL",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{try{const i=r.value,n=new URL(i),o=n.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:sl.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})),!i.endsWith("/")&&o.endsWith("/")?r.value=o.slice(0,-1):r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Gl=D("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=el()),Ne.init(e,t)}),Wl=D("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Hc),Ne.init(e,t)}),Hl=D("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vc),Ne.init(e,t)}),Xl=D("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Kc),Ne.init(e,t)}),Yl=D("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Jc),Ne.init(e,t)}),Ql=D("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gc),Ne.init(e,t)}),ef=D("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Wc),Ne.init(e,t)}),tf=D("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dl(t)),Ne.init(e,t)}),nf=D("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cl),Ne.init(e,t)}),rf=D("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=fl(t)),Ne.init(e,t)}),of=D("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xc),Ne.init(e,t)}),sf=D("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tl),Ne.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),af=D("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nl),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})}}}),uf=D("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=rl),Ne.init(e,t)}),cf=D("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=il),Ne.init(e,t),e._zod.check=r=>{const[i,n]=r.value.split("/");try{if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Lo(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const lf=D("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ol),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Lo(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ff(e){if(!Bo.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Lo(r)}const df=D("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Bo),Ne.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{ff(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),hf=D("$ZodE164",(e,t)=>{t.pattern??(t.pattern=al),Ne.init(e,t)});function pf(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 mf=D("$ZodJWT",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{pf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),gf=D("$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})}}),Zo=D("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??gl,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}}),yf=D("$ZodNumber",(e,t)=>{Il.init(e,t),Zo.init(e,t)}),Mo=D("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=yl,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}}),qo=D("$ZodBigInt",(e,t)=>{ue.init(e,t),e._zod.pattern=pl,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}}),vf=D("$ZodBigInt",(e,t)=>{El.init(e,t),qo.init(e,t)}),$f=D("$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}}),bf=D("$ZodUndefined",(e,t)=>{ue.init(e,t),e._zod.pattern=$l,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}}),_f=D("$ZodNull",(e,t)=>{ue.init(e,t),e._zod.pattern=vl,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}}),wf=D("$ZodAny",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),ri=D("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),kf=D("$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)}),Sf=D("$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}}),If=D("$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 Aa(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}const Vo=D("$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],c=t.element._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(d=>Aa(d,r,s))):Aa(c,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function or(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}function za(e,t,r,i){e.issues.length?i[r]===void 0?r in i?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...ot(r,e.issues)):e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}const Ef=D("$ZodObject",(e,t)=>{ue.init(e,t);const r=mi(()=>{const h=Object.keys(t.shape);for(const _ of h)if(!(t.shape[_]instanceof ue))throw new Error(`Invalid element at key "${_}": expected a Zod schema`);const y=jc(t.shape);return{shape:t.shape,keys:h,keySet:new Set(h),numKeys:h.length,optionalKeys:new Set(y)}});$e(e._zod,"propValues",()=>{const h=t.shape,y={};for(const _ in h){const b=h[_]._zod;if(b.values){y[_]??(y[_]=new Set);for(const g of b.values)y[_].add(g)}}return y});const i=h=>{const y=new Zl(["shape","payload","ctx"]),_=r.value,b=f=>{const v=un(f);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};y.write("const input = payload.value;");const g=Object.create(null);let m=0;for(const f of _.keys)g[f]=`key_${m++}`;y.write("const newResult = {}");for(const f of _.keys)if(_.optionalKeys.has(f)){const v=g[f];y.write(`const ${v} = ${b(f)};`);const S=un(f);y.write(`
5
5
  if (${v}.issues.length) {
6
6
  if (input[${S}] === undefined) {
7
7
  if (${S} in input) {
@@ -24,41 +24,41 @@ const Sc=Object.freeze({status:"aborted"});function D(e,t,r){function i(a,c){var
24
24
  if (${v}.issues.length) payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
25
25
  ...iss,
26
26
  path: iss.path ? [${un(f)}, ...iss.path] : [${un(f)}]
27
- })));`),y.write(`newResult[${un(f)}] = ${v}.value`)}y.write("payload.value = newResult;"),y.write("return payload;");const $=y.compile();return(f,v)=>$(h,f,v)};let n;const o=Zn,s=!ti.jitless,c=s&&Oc.value,d=t.catchall;let u;e._zod.parse=(h,y)=>{u??(u=r.value);const _=h.value;if(!o(_))return h.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),h;const b=[];if(s&&c&&y?.async===!1&&y.jitless!==!0)n||(n=i(t.shape)),h=n(h,y);else{h.value={};const v=u.shape;for(const S of u.keys){const E=v[S],I=E._zod.run({value:_[S],issues:[]},y),O=E._zod.optin==="optional"&&E._zod.optout==="optional";I instanceof Promise?b.push(I.then(j=>O?Aa(j,h,S,_):or(j,h,S))):O?Aa(I,h,S,_):or(I,h,S)}}if(!d)return b.length?Promise.all(b).then(()=>h):h;const g=[],m=u.keySet,$=d._zod,f=$.def.type;for(const v of Object.keys(_)){if(m.has(v))continue;if(f==="never"){g.push(v);continue}const S=$.run({value:_[v],issues:[]},y);S instanceof Promise?b.push(S.then(E=>or(E,h,v))):or(S,h,v)}return g.length&&h.issues.push({code:"unrecognized_keys",keys:g,input:_,inst:e}),b.length?Promise.all(b).then(()=>h):h}});function Ta(e,t,r,i){for(const n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(o=>pt(o,i,Xe())))}),t}const Ko=D("$ZodUnion",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),$e(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),$e(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),$e(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>gi(i.source)).join("|")})$`)}}),e._zod.parse=(r,i)=>{let n=!1;const o=[];for(const s of t.options){const a=s._zod.run({value:r.value,issues:[]},i);if(a instanceof Promise)o.push(a),n=!0;else{if(a.issues.length===0)return a;o.push(a)}}return n?Promise.all(o).then(s=>Ta(s,r,e,i)):Ta(o,r,e,i)}}),Nf=D("$ZodDiscriminatedUnion",(e,t)=>{Ko.init(e,t);const r=e._zod.parse;$e(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,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(const d of c)n[a].add(d)}}return n});const i=mi(()=>{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 c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});e._zod.parse=(n,o)=>{const s=n.value;if(!Zn(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",input:s,path:[t.discriminator],inst:e}),n)}}),Of=D("$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(([c,d])=>Pa(r,c,d)):Pa(r,o,s)}});function yo(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(Mn(e)&&Mn(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=yo(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=yo(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 Pa(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),dn(e))return e;const i=yo(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 $i=D("$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 d=s.length>r.length,u=s.length<i-1;if(d||u)return n.issues.push({input:s,inst:e,origin:"array",...d?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let c=-1;for(const d of r){if(c++,c>=s.length&&c>=i)continue;const u=d._zod.run({value:s[c],issues:[]},o);u instanceof Promise?a.push(u.then(h=>sr(h,n,c))):sr(u,n,c)}if(t.rest){const d=s.slice(r.length);for(const u of d){c++;const h=t.rest._zod.run({value:u,issues:[]},o);h instanceof Promise?a.push(h.then(y=>sr(y,n,c))):sr(h,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function sr(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}const xf=D("$ZodRecord",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Mn(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 c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){const d=t.valueType._zod.run({value:n[c],issues:[]},i);d instanceof Promise?o.push(d.then(u=>{u.issues.length&&r.issues.push(...ot(c,u.issues)),r.value[c]=u.value})):(d.issues.length&&r.issues.push(...ot(c,d.issues)),r.value[c]=d.value)}let a;for(const c in n)s.has(c)||(a=a??[],a.push(c));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({origin:"record",code:"invalid_key",issues:a.issues.map(d=>pt(d,i,Xe())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:n[s],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&r.issues.push(...ot(s,d.issues)),r.value[a.value]=d.value})):(c.issues.length&&r.issues.push(...ot(s,c.issues)),r.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>r):r}}),jf=D("$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 c=t.keyType._zod.run({value:s,issues:[]},i),d=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise||d instanceof Promise?o.push(Promise.all([c,d]).then(([u,h])=>{Da(u,h,r,s,n,e,i)})):Da(c,d,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Da(e,t,r,i,n,o,s){e.issues.length&&(ni.has(typeof i)?r.issues.push(...ot(i,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:o,issues:e.issues.map(a=>pt(a,s,Xe()))})),t.issues.length&&(ni.has(typeof i)?r.issues.push(...ot(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(a=>pt(a,s,Xe()))})),r.value.set(e.value,t.value)}const zf=D("$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(c=>Ua(c,r))):Ua(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function Ua(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Af=D("$ZodEnum",(e,t)=>{ue.init(e,t);const r=xo(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(i=>ni.has(typeof i)).map(i=>typeof i=="string"?Yt(i):i.toString()).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),Tf=D("$ZodLiteral",(e,t)=>{ue.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Yt(r):r?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}}),Pf=D("$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}}),Jo=D("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{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 gn;return r.value=n,r}}),Df=D("$ZodOptional",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,i):r.value===void 0?r:t.innerType._zod.run(r,i)}),Uf=D("$ZodNullable",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)}|null)$`):void 0}),$e(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)}),Cf=D("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(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=>Ca(o,t)):Ca(n,t)}});function Ca(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Bf=D("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Rf=D("$ZodNonOptional",(e,t)=>{ue.init(e,t),$e(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=>Ba(o,e)):Ba(n,e)}});function Ba(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 Ff=D("$ZodSuccess",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{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)}}),Lf=D("$ZodCatch",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(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=>pt(s,i,Xe()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>pt(o,i,Xe()))},input:r.value}),r.issues=[]),r)}}),Zf=D("$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)}),Go=D("$ZodPipe",(e,t)=>{ue.init(e,t),$e(e._zod,"values",()=>t.in._zod.values),$e(e._zod,"optin",()=>t.in._zod.optin),$e(e._zod,"optout",()=>t.out._zod.optout),$e(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Ra(o,t,i)):Ra(n,t,i)}});function Ra(e,t,r){return dn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}const Mf=D("$ZodReadonly",(e,t)=>{ue.init(e,t),$e(e._zod,"propValues",()=>t.innerType._zod.propValues),$e(e._zod,"values",()=>t.innerType._zod.values),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Fa):Fa(n)}});function Fa(e){return e.value=Object.freeze(e.value),e}const qf=D("$ZodTemplateLiteral",(e,t)=>{ue.init(e,t);const r=[];for(const i of t.parts)if(i instanceof ue){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||xc.has(typeof i))r.push(Yt(`${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)}),Vf=D("$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))}),Kf=D("$ZodLazy",(e,t)=>{ue.init(e,t),$e(e._zod,"innerType",()=>t.getter()),$e(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),$e(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),$e(e._zod,"optin",()=>e._zod.innerType._zod.optin),$e(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Jf=D("$ZodCustom",(e,t)=>{Ue.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=>La(o,r,i,e));La(n,r,i,e)}});function La(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(yn(n))}}const hm=()=>{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?`مدخلات غير مقبولة: يفترض إدخال ${fe(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(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?"ة":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function pm(){return{localeError:hm()}}const mm=()=>{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 ${fe(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(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":""}: ${W(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 gm(){return{localeError:mm()}}function Za(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 ym=()=>{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?`Няправільны ўвод: чакалася ${fe(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${o}${n.maximum.toString()} ${c}`}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),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${o}${n.minimum.toString()} ${c}`}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?"ключы":"ключ"}: ${W(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function vm(){return{localeError:ym()}}const $m=()=>{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 ${fe(n.values[0])}`:`Opció invàlida: s'esperava una de ${W(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":""}: ${W(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 bm(){return{localeError:$m()}}const _m=()=>{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 ${fe(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${W(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: ${W(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 wm(){return{localeError:_m()}}const km=()=>{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 ${fe(n.values[0])}`:`Ungültige Option: erwartet eine von ${W(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"}: ${W(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 Sm(){return{localeError:km()}}const Im=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},Em=()=>{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 ${Im(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${fe(i.values[0])}`:`Invalid option: expected one of ${W(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":""}: ${W(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 Gf(){return{localeError:Em()}}const Nm=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},Om=()=>{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 ${Nm(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${fe(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${W(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":""}: ${W(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 xm(){return{localeError:Om()}}const jm=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};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"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Entrada inválida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${fe(n.values[0])}`:`Opción inválida: se esperaba una de ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Demasiado pequeño: se esperaba que ${n.origin} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado pequeño: se esperaba que ${n.origin} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${i[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n.origin}`;default:return"Entrada inválida"}}};function zm(){return{localeError:jm()}}const Am=()=>{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?`ورودی نامعتبر: می‌بایست ${fe(n.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${W(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?"های":""} ناشناس: ${W(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function Tm(){return{localeError:Am()}}const Pm=()=>{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 ${fe(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(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"}: ${W(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 Dm(){return{localeError:Pm()}}const Um=()=>{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 : ${fe(n.values[0])} attendu`:`Option invalide : une valeur parmi ${W(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":""} : ${W(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 Cm(){return{localeError:Um()}}const Bm=()=>{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 ${fe(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${W(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":""} : ${W(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 Rm(){return{localeError:Bm()}}const Fm=()=>{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?`קלט לא תקין: צריך ${fe(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${W(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?"ים":"ה"}: ${W(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function Lm(){return{localeError:Fm()}}const Zm=()=>{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 ${fe(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${W(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":""}: ${W(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 Mm(){return{localeError:Zm()}}const qm=()=>{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 ${fe(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${W(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":""}: ${W(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 Vm(){return{localeError:qm()}}const Km=()=>{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 ${fe(n.values[0])}`:`Opzione non valida: atteso uno tra ${W(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"}: ${W(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 Jm(){return{localeError:Km()}}const Gm=()=>{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?`無効な入力: ${fe(n.values[0])}が期待されました`:`無効な選択: ${W(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?"群":""}: ${W(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Wm(){return{localeError:Gm()}}const Hm=()=>{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?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${fe(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(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`រកឃើញសោមិនស្គាល់៖ ${W(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Xm(){return{localeError:Hm()}}const Ym=()=>{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?`잘못된 입력: 값은 ${fe(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${W(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${c} ${o}${s}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${s}`}case"too_small":{const o=n.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${c} ${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`인식할 수 없는 키: ${W(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Qm(){return{localeError:Ym()}}const eg=()=>{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 ${fe(n.values[0])}`:`Грешана опција: се очекува една ${W(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function tg(){return{localeError:eg()}}const ng=()=>{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 ${fe(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${W(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: ${W(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 rg(){return{localeError:ng()}}const ig=()=>{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 ${fe(n.values[0])}`:`Ongeldige optie: verwacht één van ${W(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":""}: ${W(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 og(){return{localeError:ig()}}const sg=()=>{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 ${fe(n.values[0])}`:`Ugyldig valg: forventet en av ${W(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"}: ${W(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 ag(){return{localeError:sg()}}const ug=()=>{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 ${fe(n.values[0])}`:`Fâsit tercih: mûteberler ${W(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":""}: ${W(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 cg(){return{localeError:ug()}}const lg=()=>{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?`ناسم ورودي: باید ${fe(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${W(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?"کلیډونه":"کلیډ"}: ${W(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function fg(){return{localeError:lg()}}const dg=()=>{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 ${fe(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(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":""}: ${W(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 hg(){return{localeError:dg()}}const pg=()=>{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 ${fe(n.values[0])}`:`Opção inválida: esperada uma das ${W(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":""}: ${W(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 mg(){return{localeError:pg()}}function Ma(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 gg=()=>{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?`Неверный ввод: ожидалось ${fe(n.values[0])}`:`Неверный вариант: ожидалось одно из ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${c}`}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),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${c}`}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?"и":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function yg(){return{localeError:gg()}}const vg=()=>{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 ${fe(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${W(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č"}: ${W(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 $g(){return{localeError:vg()}}const bg=()=>{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 ${fe(n.values[0])}`:`Ogiltigt val: förväntade en av ${W(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"}: ${W(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 _g(){return{localeError:bg()}}const wg=()=>{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?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${fe(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(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?"கள்":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function kg(){return{localeError:wg()}}const Sg=()=>{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?`ค่าไม่ถูกต้อง: ควรเป็น ${fe(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(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`พบคีย์ที่ไม่รู้จัก: ${W(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Ig(){return{localeError:Sg()}}const Eg=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},Ng=()=>{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 ${Eg(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${fe(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(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":""}: ${W(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 Og(){return{localeError:Ng()}}const xg=()=>{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?`Неправильні вхідні дані: очікується ${fe(n.values[0])}`:`Неправильна опція: очікується одне з ${W(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?"і":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function jg(){return{localeError:xg()}}const zg=()=>{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?`غلط ان پٹ: ${fe(n.values[0])} متوقع تھا`:`غلط آپشن: ${W(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?"ز":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Ag(){return{localeError:zg()}}const Tg=()=>{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 ${fe(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(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: ${W(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 Pg(){return{localeError:Tg()}}const Dg=()=>{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?`无效输入:期望 ${fe(n.values[0])}`:`无效选项:期望以下之一 ${W(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): ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Ug(){return{localeError:Dg()}}const Cg=()=>{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?`無效的輸入值:預期為 ${fe(n.values[0])}`:`無效的選項:預期為以下其中之一 ${W(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?"們":""}:${W(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Bg(){return{localeError:Cg()}}var Wf=Object.freeze({__proto__:null,ar:pm,az:gm,be:vm,ca:bm,cs:wm,de:Sm,en:Gf,eo:xm,es:zm,fa:Tm,fi:Dm,fr:Cm,frCA:Rm,he:Lm,hu:Mm,id:Vm,it:Jm,ja:Wm,kh:Xm,ko:Qm,mk:tg,ms:rg,nl:og,no:ag,ota:cg,pl:hg,ps:fg,pt:mg,ru:yg,sl:$g,sv:_g,ta:kg,th:Ig,tr:Og,ua:jg,ur:Ag,vi:Pg,zhCN:Ug,zhTW:Bg});const Hf=Symbol("ZodOutput"),Xf=Symbol("ZodInput");class Wo{constructor(){this._map=new Map,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 Map,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)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function Ho(){return new Wo}const qt=Ho();function Yf(e,t){return new e({type:"string",...V(t)})}function Qf(e,t){return new e({type:"string",coerce:!0,...V(t)})}function Xo(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...V(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(t)})}function Yo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...V(t)})}function Qo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(t)})}function es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(t)})}function ts(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(t)})}function ns(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}function rs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...V(t)})}function is(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(t)})}function os(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...V(t)})}function ss(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(t)})}function as(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...V(t)})}function us(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...V(t)})}function cs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(t)})}function ls(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(t)})}function fs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(t)})}function ds(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(t)})}function hs(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(t)})}function ps(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...V(t)})}function ms(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...V(t)})}function gs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...V(t)})}function ys(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...V(t)})}const ed={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function td(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(t)})}function nd(e,t){return new e({type:"string",format:"date",check:"string_format",...V(t)})}function rd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...V(t)})}function id(e,t){return new e({type:"string",format:"duration",check:"string_format",...V(t)})}function od(e,t){return new e({type:"number",checks:[],...V(t)})}function sd(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}function ad(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}function ud(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...V(t)})}function cd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...V(t)})}function ld(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 dd(e,t){return new e({type:"boolean",...V(t)})}function hd(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}function pd(e,t){return new e({type:"bigint",...V(t)})}function md(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}function gd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...V(t)})}function yd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...V(t)})}function vd(e,t){return new e({type:"symbol",...V(t)})}function $d(e,t){return new e({type:"undefined",...V(t)})}function bd(e,t){return new e({type:"null",...V(t)})}function _d(e){return new e({type:"any"})}function oi(e){return new e({type:"unknown"})}function wd(e,t){return new e({type:"never",...V(t)})}function kd(e,t){return new e({type:"void",...V(t)})}function Sd(e,t){return new e({type:"date",...V(t)})}function Id(e,t){return new e({type:"date",coerce:!0,...V(t)})}function Ed(e,t){return new e({type:"nan",...V(t)})}function Gt(e,t){return new Ro({check:"less_than",...V(t),value:e,inclusive:!1})}function ht(e,t){return new Ro({check:"less_than",...V(t),value:e,inclusive:!0})}function Wt(e,t){return new Fo({check:"greater_than",...V(t),value:e,inclusive:!1})}function nt(e,t){return new Fo({check:"greater_than",...V(t),value:e,inclusive:!0})}function Nd(e){return Wt(0,e)}function Od(e){return Gt(0,e)}function xd(e){return ht(0,e)}function jd(e){return nt(0,e)}function qn(e,t){return new Sl({check:"multiple_of",...V(t),value:e})}function bi(e,t){return new Nl({check:"max_size",...V(t),maximum:e})}function Vn(e,t){return new Ol({check:"min_size",...V(t),minimum:e})}function vs(e,t){return new xl({check:"size_equals",...V(t),size:e})}function _i(e,t){return new jl({check:"max_length",...V(t),maximum:e})}function $n(e,t){return new zl({check:"min_length",...V(t),minimum:e})}function wi(e,t){return new Al({check:"length_equals",...V(t),length:e})}function $s(e,t){return new Tl({check:"string_format",format:"regex",...V(t),pattern:e})}function bs(e){return new Pl({check:"string_format",format:"lowercase",...V(e)})}function _s(e){return new Dl({check:"string_format",format:"uppercase",...V(e)})}function ws(e,t){return new Ul({check:"string_format",format:"includes",...V(t),includes:e})}function ks(e,t){return new Cl({check:"string_format",format:"starts_with",...V(t),prefix:e})}function Ss(e,t){return new Bl({check:"string_format",format:"ends_with",...V(t),suffix:e})}function zd(e,t,r){return new Rl({check:"property",property:e,schema:t,...V(r)})}function Is(e,t){return new Fl({check:"mime_type",mime:e,...V(t)})}function Qt(e){return new Ll({check:"overwrite",tx:e})}function Es(e){return Qt(t=>t.normalize(e))}function Ns(){return Qt(e=>e.trim())}function Os(){return Qt(e=>e.toLowerCase())}function xs(){return Qt(e=>e.toUpperCase())}function js(e,t,r){return new e({type:"array",element:t,...V(r)})}function Rg(e,t,r){return new e({type:"union",options:t,...V(r)})}function Fg(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...V(i)})}function Lg(e,t,r){return new e({type:"intersection",left:t,right:r})}function Ad(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 Zg(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...V(i)})}function Mg(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...V(i)})}function qg(e,t,r){return new e({type:"set",valueType:t,...V(r)})}function Vg(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 Kg(e,t,r){return new e({type:"enum",entries:t,...V(r)})}function Jg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...V(r)})}function Td(e,t){return new e({type:"file",...V(t)})}function Gg(e,t){return new e({type:"transform",transform:t})}function Wg(e,t){return new e({type:"optional",innerType:t})}function Hg(e,t){return new e({type:"nullable",innerType:t})}function Xg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function Yg(e,t,r){return new e({type:"nonoptional",innerType:t,...V(r)})}function Qg(e,t){return new e({type:"success",innerType:t})}function ey(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function ty(e,t,r){return new e({type:"pipe",in:t,out:r})}function ny(e,t){return new e({type:"readonly",innerType:t})}function ry(e,t,r){return new e({type:"template_literal",parts:t,...V(r)})}function iy(e,t){return new e({type:"lazy",getter:t})}function oy(e,t){return new e({type:"promise",innerType:t})}function Pd(e,t,r){const i=V(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Dd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...V(r)})}function Ud(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(b=>typeof b=="string"?b.toLowerCase():b),n=n.map(b=>typeof b=="string"?b.toLowerCase():b));const o=new Set(i),s=new Set(n),a=e.Pipe??Go,c=e.Boolean??Mo,d=e.String??Yn,u=e.Transform??Jo,h=new u({type:"transform",transform:(b,g)=>{let m=b;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:s.has(m)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:g.value,inst:h}),{})},error:r.error}),y=new a({type:"pipe",in:new d({type:"string",error:r.error}),out:h,error:r.error});return new a({type:"pipe",in:y,out:new c({type:"boolean",error:r.error}),error:r.error})}function Cd(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 Bd{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=(...i)=>{const n=this._def.input?mo(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=t(...n);return this._def.output?mo(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=async(...i)=>{const n=this._def.input?await go(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=await t(...n);return this._def.output?go(this._def.output,o,void 0,{callee:r}):o};return r}input(...t){const r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new $i({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){const r=this.constructor;return new r({type:"function",input:this._def.input,output:t})}}function Rd(e){return new Bd({type:"function",input:Array.isArray(e?.input)?Ad($i,e?.input):e?.input??js(Vo,oi(ri)),output:e?.output??oi(ri)})}class vo{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??qt,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 c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...r,schemaPath:[...r.schemaPath,t],path:r.path},y=t._zod.parent;if(y)a.ref=y,this.process(y,h),this.seen.get(y).isParent=!0;else{const _=a.schema;switch(n.type){case"string":{const b=_;b.type="string";const{minimum:g,maximum:m,format:$,patterns:f,contentEncoding:v}=t._zod.bag;if(typeof g=="number"&&(b.minLength=g),typeof m=="number"&&(b.maxLength=m),$&&(b.format=o[$]??$,b.format===""&&delete b.format),v&&(b.contentEncoding=v),f&&f.size>0){const S=[...f];S.length===1?b.pattern=S[0].source:S.length>1&&(a.schema.allOf=[...S.map(E=>({...this.target==="draft-7"?{type:"string"}:{},pattern:E.source}))])}break}case"number":{const b=_,{minimum:g,maximum:m,format:$,multipleOf:f,exclusiveMaximum:v,exclusiveMinimum:S}=t._zod.bag;typeof $=="string"&&$.includes("int")?b.type="integer":b.type="number",typeof S=="number"&&(b.exclusiveMinimum=S),typeof g=="number"&&(b.minimum=g,typeof S=="number"&&(S>=g?delete b.minimum:delete b.exclusiveMinimum)),typeof v=="number"&&(b.exclusiveMaximum=v),typeof m=="number"&&(b.maximum=m,typeof v=="number"&&(v<=m?delete b.maximum:delete b.exclusiveMaximum)),typeof f=="number"&&(b.multipleOf=f);break}case"boolean":{const b=_;b.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":{_.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":{_.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const b=_,{minimum:g,maximum:m}=t._zod.bag;typeof g=="number"&&(b.minItems=g),typeof m=="number"&&(b.maxItems=m),b.type="array",b.items=this.process(n.element,{...h,path:[...h.path,"items"]});break}case"object":{const b=_;b.type="object",b.properties={};const g=n.shape;for(const f in g)b.properties[f]=this.process(g[f],{...h,path:[...h.path,"properties",f]});const m=new Set(Object.keys(g)),$=new Set([...m].filter(f=>{const v=n.shape[f]._zod;return this.io==="input"?v.optin===void 0:v.optout===void 0}));$.size>0&&(b.required=Array.from($)),n.catchall?._zod.def.type==="never"?b.additionalProperties=!1:n.catchall?n.catchall&&(b.additionalProperties=this.process(n.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(b.additionalProperties=!1);break}case"union":{const b=_;b.anyOf=n.options.map((g,m)=>this.process(g,{...h,path:[...h.path,"anyOf",m]}));break}case"intersection":{const b=_,g=this.process(n.left,{...h,path:[...h.path,"allOf",0]}),m=this.process(n.right,{...h,path:[...h.path,"allOf",1]}),$=v=>"allOf"in v&&Object.keys(v).length===1,f=[...$(g)?g.allOf:[g],...$(m)?m.allOf:[m]];b.allOf=f;break}case"tuple":{const b=_;b.type="array";const g=n.items.map((f,v)=>this.process(f,{...h,path:[...h.path,"prefixItems",v]}));if(this.target==="draft-2020-12"?b.prefixItems=g:b.items=g,n.rest){const f=this.process(n.rest,{...h,path:[...h.path,"items"]});this.target==="draft-2020-12"?b.items=f:b.additionalItems=f}n.rest&&(b.items=this.process(n.rest,{...h,path:[...h.path,"items"]}));const{minimum:m,maximum:$}=t._zod.bag;typeof m=="number"&&(b.minItems=m),typeof $=="number"&&(b.maxItems=$);break}case"record":{const b=_;b.type="object",b.propertyNames=this.process(n.keyType,{...h,path:[...h.path,"propertyNames"]}),b.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 b=_,g=xo(n.entries);g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),b.enum=g;break}case"literal":{const b=_,g=[];for(const m of n.values)if(m===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof m=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");g.push(Number(m))}else g.push(m);if(g.length!==0)if(g.length===1){const m=g[0];b.type=m===null?"null":typeof m,b.const=m}else g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),g.every(m=>typeof m=="boolean")&&(b.type="string"),g.every(m=>m===null)&&(b.type="null"),b.enum=g;break}case"file":{const b=_,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:m,maximum:$,mime:f}=t._zod.bag;m!==void 0&&(g.minLength=m),$!==void 0&&(g.maxLength=$),f?f.length===1?(g.contentMediaType=f[0],Object.assign(b,g)):b.anyOf=f.map(v=>({...g,contentMediaType:v})):Object.assign(b,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const b=this.process(n.innerType,h);_.anyOf=[b,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"success":{const b=_;b.type="boolean";break}case"default":{this.process(n.innerType,h),a.ref=n.innerType,_.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,h),a.ref=n.innerType,this.io==="input"&&(_._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,h),a.ref=n.innerType;let b;try{b=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}_.default=b;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const b=_,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");b.type="string",b.pattern=g.source;break}case"pipe":{const b=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(b,h),a.ref=b;break}case"readonly":{this.process(n.innerType,h),a.ref=n.innerType,_.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 b=t._zod.innerType;this.process(b,h),a.ref=b;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const d=this.metadataRegistry.get(t);return d&&Object.assign(a.schema,d),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=u=>{const h=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const g=i.external.registry.get(u[0])?.id,m=i.external.uri??(f=>f);if(g)return{ref:m(g)};const $=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=$,{defId:$,ref:`${m("__shared")}#/${h}/${$}`}}if(u[1]===n)return{ref:"#"};const _=`#/${h}/`,b=u[1].schema.id??`__schema${this.counter++}`;return{defId:b,ref:_+b}},s=u=>{if(u[1].schema.$ref)return;const h=u[1],{ref:y,defId:_}=o(u);h.def={...h.schema},_&&(h.defId=_);const b=h.schema;for(const g in b)delete b[g];b.$ref=y};if(i.cycles==="throw")for(const u of this.seen.entries()){const h=u[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
27
+ })));`),y.write(`newResult[${un(f)}] = ${v}.value`)}y.write("payload.value = newResult;"),y.write("return payload;");const $=y.compile();return(f,v)=>$(h,f,v)};let n;const o=Zn,s=!ti.jitless,c=s&&Oc.value,d=t.catchall;let u;e._zod.parse=(h,y)=>{u??(u=r.value);const _=h.value;if(!o(_))return h.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),h;const b=[];if(s&&c&&y?.async===!1&&y.jitless!==!0)n||(n=i(t.shape)),h=n(h,y);else{h.value={};const v=u.shape;for(const S of u.keys){const E=v[S],I=E._zod.run({value:_[S],issues:[]},y),O=E._zod.optin==="optional"&&E._zod.optout==="optional";I instanceof Promise?b.push(I.then(j=>O?za(j,h,S,_):or(j,h,S))):O?za(I,h,S,_):or(I,h,S)}}if(!d)return b.length?Promise.all(b).then(()=>h):h;const g=[],m=u.keySet,$=d._zod,f=$.def.type;for(const v of Object.keys(_)){if(m.has(v))continue;if(f==="never"){g.push(v);continue}const S=$.run({value:_[v],issues:[]},y);S instanceof Promise?b.push(S.then(E=>or(E,h,v))):or(S,h,v)}return g.length&&h.issues.push({code:"unrecognized_keys",keys:g,input:_,inst:e}),b.length?Promise.all(b).then(()=>h):h}});function Ta(e,t,r,i){for(const n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(o=>pt(o,i,Xe())))}),t}const Ko=D("$ZodUnion",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),$e(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),$e(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),$e(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>gi(i.source)).join("|")})$`)}}),e._zod.parse=(r,i)=>{let n=!1;const o=[];for(const s of t.options){const a=s._zod.run({value:r.value,issues:[]},i);if(a instanceof Promise)o.push(a),n=!0;else{if(a.issues.length===0)return a;o.push(a)}}return n?Promise.all(o).then(s=>Ta(s,r,e,i)):Ta(o,r,e,i)}}),Nf=D("$ZodDiscriminatedUnion",(e,t)=>{Ko.init(e,t);const r=e._zod.parse;$e(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,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(const d of c)n[a].add(d)}}return n});const i=mi(()=>{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 c of a){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});e._zod.parse=(n,o)=>{const s=n.value;if(!Zn(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",input:s,path:[t.discriminator],inst:e}),n)}}),Of=D("$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(([c,d])=>Pa(r,c,d)):Pa(r,o,s)}});function yo(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(Mn(e)&&Mn(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=yo(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=yo(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 Pa(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),dn(e))return e;const i=yo(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 $i=D("$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 d=s.length>r.length,u=s.length<i-1;if(d||u)return n.issues.push({input:s,inst:e,origin:"array",...d?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let c=-1;for(const d of r){if(c++,c>=s.length&&c>=i)continue;const u=d._zod.run({value:s[c],issues:[]},o);u instanceof Promise?a.push(u.then(h=>sr(h,n,c))):sr(u,n,c)}if(t.rest){const d=s.slice(r.length);for(const u of d){c++;const h=t.rest._zod.run({value:u,issues:[]},o);h instanceof Promise?a.push(h.then(y=>sr(y,n,c))):sr(h,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function sr(e,t,r){e.issues.length&&t.issues.push(...ot(r,e.issues)),t.value[r]=e.value}const xf=D("$ZodRecord",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Mn(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 c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){const d=t.valueType._zod.run({value:n[c],issues:[]},i);d instanceof Promise?o.push(d.then(u=>{u.issues.length&&r.issues.push(...ot(c,u.issues)),r.value[c]=u.value})):(d.issues.length&&r.issues.push(...ot(c,d.issues)),r.value[c]=d.value)}let a;for(const c in n)s.has(c)||(a=a??[],a.push(c));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({origin:"record",code:"invalid_key",issues:a.issues.map(d=>pt(d,i,Xe())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:n[s],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&r.issues.push(...ot(s,d.issues)),r.value[a.value]=d.value})):(c.issues.length&&r.issues.push(...ot(s,c.issues)),r.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>r):r}}),jf=D("$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 c=t.keyType._zod.run({value:s,issues:[]},i),d=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise||d instanceof Promise?o.push(Promise.all([c,d]).then(([u,h])=>{Da(u,h,r,s,n,e,i)})):Da(c,d,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Da(e,t,r,i,n,o,s){e.issues.length&&(ni.has(typeof i)?r.issues.push(...ot(i,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:o,issues:e.issues.map(a=>pt(a,s,Xe()))})),t.issues.length&&(ni.has(typeof i)?r.issues.push(...ot(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(a=>pt(a,s,Xe()))})),r.value.set(e.value,t.value)}const Af=D("$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(c=>Ua(c,r))):Ua(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function Ua(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const zf=D("$ZodEnum",(e,t)=>{ue.init(e,t);const r=xo(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(i=>ni.has(typeof i)).map(i=>typeof i=="string"?Yt(i):i.toString()).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),Tf=D("$ZodLiteral",(e,t)=>{ue.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Yt(r):r?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}}),Pf=D("$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}}),Jo=D("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{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 gn;return r.value=n,r}}),Df=D("$ZodOptional",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$e(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,i):r.value===void 0?r:t.innerType._zod.run(r,i)}),Uf=D("$ZodNullable",(e,t)=>{ue.init(e,t),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gi(r.source)}|null)$`):void 0}),$e(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)}),Cf=D("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(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=>Ca(o,t)):Ca(n,t)}});function Ca(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Bf=D("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Rf=D("$ZodNonOptional",(e,t)=>{ue.init(e,t),$e(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=>Ba(o,e)):Ba(n,e)}});function Ba(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 Ff=D("$ZodSuccess",(e,t)=>{ue.init(e,t),e._zod.parse=(r,i)=>{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)}}),Lf=D("$ZodCatch",(e,t)=>{ue.init(e,t),e._zod.optin="optional",$e(e._zod,"optout",()=>t.innerType._zod.optout),$e(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(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=>pt(s,i,Xe()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>pt(o,i,Xe()))},input:r.value}),r.issues=[]),r)}}),Zf=D("$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)}),Go=D("$ZodPipe",(e,t)=>{ue.init(e,t),$e(e._zod,"values",()=>t.in._zod.values),$e(e._zod,"optin",()=>t.in._zod.optin),$e(e._zod,"optout",()=>t.out._zod.optout),$e(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Ra(o,t,i)):Ra(n,t,i)}});function Ra(e,t,r){return dn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}const Mf=D("$ZodReadonly",(e,t)=>{ue.init(e,t),$e(e._zod,"propValues",()=>t.innerType._zod.propValues),$e(e._zod,"values",()=>t.innerType._zod.values),$e(e._zod,"optin",()=>t.innerType._zod.optin),$e(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Fa):Fa(n)}});function Fa(e){return e.value=Object.freeze(e.value),e}const qf=D("$ZodTemplateLiteral",(e,t)=>{ue.init(e,t);const r=[];for(const i of t.parts)if(i instanceof ue){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||xc.has(typeof i))r.push(Yt(`${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)}),Vf=D("$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))}),Kf=D("$ZodLazy",(e,t)=>{ue.init(e,t),$e(e._zod,"innerType",()=>t.getter()),$e(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),$e(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),$e(e._zod,"optin",()=>e._zod.innerType._zod.optin),$e(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Jf=D("$ZodCustom",(e,t)=>{Ue.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=>La(o,r,i,e));La(n,r,i,e)}});function La(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(yn(n))}}const hm=()=>{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?`مدخلات غير مقبولة: يفترض إدخال ${fe(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(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?"ة":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function pm(){return{localeError:hm()}}const mm=()=>{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 ${fe(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(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":""}: ${W(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 gm(){return{localeError:mm()}}function Za(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 ym=()=>{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?`Няправільны ўвод: чакалася ${fe(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${o}${n.maximum.toString()} ${c}`}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),c=Za(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${o}${n.minimum.toString()} ${c}`}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?"ключы":"ключ"}: ${W(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function vm(){return{localeError:ym()}}const $m=()=>{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 ${fe(n.values[0])}`:`Opció invàlida: s'esperava una de ${W(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":""}: ${W(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 bm(){return{localeError:$m()}}const _m=()=>{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 ${fe(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${W(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: ${W(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 wm(){return{localeError:_m()}}const km=()=>{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 ${fe(n.values[0])}`:`Ungültige Option: erwartet eine von ${W(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"}: ${W(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 Sm(){return{localeError:km()}}const Im=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},Em=()=>{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 ${Im(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${fe(i.values[0])}`:`Invalid option: expected one of ${W(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":""}: ${W(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 Gf(){return{localeError:Em()}}const Nm=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},Om=()=>{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 ${Nm(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${fe(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${W(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":""}: ${W(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 xm(){return{localeError:Om()}}const jm=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};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"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Entrada inválida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${fe(n.values[0])}`:`Opción inválida: se esperaba una de ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",s=t(n.origin);return s?`Demasiado pequeño: se esperaba que ${n.origin} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado pequeño: se esperaba que ${n.origin} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${i[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n.origin}`;default:return"Entrada inválida"}}};function Am(){return{localeError:jm()}}const zm=()=>{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?`ورودی نامعتبر: می‌بایست ${fe(n.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${W(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?"های":""} ناشناس: ${W(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function Tm(){return{localeError:zm()}}const Pm=()=>{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 ${fe(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(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"}: ${W(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 Dm(){return{localeError:Pm()}}const Um=()=>{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 : ${fe(n.values[0])} attendu`:`Option invalide : une valeur parmi ${W(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":""} : ${W(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 Cm(){return{localeError:Um()}}const Bm=()=>{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 ${fe(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${W(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":""} : ${W(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 Rm(){return{localeError:Bm()}}const Fm=()=>{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?`קלט לא תקין: צריך ${fe(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${W(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?"ים":"ה"}: ${W(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function Lm(){return{localeError:Fm()}}const Zm=()=>{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 ${fe(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${W(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":""}: ${W(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 Mm(){return{localeError:Zm()}}const qm=()=>{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 ${fe(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${W(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":""}: ${W(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 Vm(){return{localeError:qm()}}const Km=()=>{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 ${fe(n.values[0])}`:`Opzione non valida: atteso uno tra ${W(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"}: ${W(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 Jm(){return{localeError:Km()}}const Gm=()=>{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?`無効な入力: ${fe(n.values[0])}が期待されました`:`無効な選択: ${W(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?"群":""}: ${W(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Wm(){return{localeError:Gm()}}const Hm=()=>{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?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${fe(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(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`រកឃើញសោមិនស្គាល់៖ ${W(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Xm(){return{localeError:Hm()}}const Ym=()=>{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?`잘못된 입력: 값은 ${fe(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${W(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${c} ${o}${s}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${s}`}case"too_small":{const o=n.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";return a?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${c} ${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`인식할 수 없는 키: ${W(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Qm(){return{localeError:Ym()}}const eg=()=>{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 ${fe(n.values[0])}`:`Грешана опција: се очекува една ${W(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function tg(){return{localeError:eg()}}const ng=()=>{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 ${fe(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${W(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: ${W(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 rg(){return{localeError:ng()}}const ig=()=>{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 ${fe(n.values[0])}`:`Ongeldige optie: verwacht één van ${W(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":""}: ${W(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 og(){return{localeError:ig()}}const sg=()=>{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 ${fe(n.values[0])}`:`Ugyldig valg: forventet en av ${W(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"}: ${W(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 ag(){return{localeError:sg()}}const ug=()=>{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 ${fe(n.values[0])}`:`Fâsit tercih: mûteberler ${W(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":""}: ${W(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 cg(){return{localeError:ug()}}const lg=()=>{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?`ناسم ورودي: باید ${fe(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${W(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?"کلیډونه":"کلیډ"}: ${W(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function fg(){return{localeError:lg()}}const dg=()=>{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 ${fe(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(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":""}: ${W(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 hg(){return{localeError:dg()}}const pg=()=>{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 ${fe(n.values[0])}`:`Opção inválida: esperada uma das ${W(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":""}: ${W(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 mg(){return{localeError:pg()}}function Ma(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 gg=()=>{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?`Неверный ввод: ожидалось ${fe(n.values[0])}`:`Неверный вариант: ожидалось одно из ${W(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",s=t(n.origin);if(s){const a=Number(n.maximum),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${c}`}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),c=Ma(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${c}`}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?"и":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function yg(){return{localeError:gg()}}const vg=()=>{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 ${fe(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${W(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č"}: ${W(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 $g(){return{localeError:vg()}}const bg=()=>{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 ${fe(n.values[0])}`:`Ogiltigt val: förväntade en av ${W(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"}: ${W(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 _g(){return{localeError:bg()}}const wg=()=>{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?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${fe(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(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?"கள்":""}: ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function kg(){return{localeError:wg()}}const Sg=()=>{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?`ค่าไม่ถูกต้อง: ควรเป็น ${fe(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(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`พบคีย์ที่ไม่รู้จัก: ${W(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Ig(){return{localeError:Sg()}}const Eg=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},Ng=()=>{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 ${Eg(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${fe(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(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":""}: ${W(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 Og(){return{localeError:Ng()}}const xg=()=>{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?`Неправильні вхідні дані: очікується ${fe(n.values[0])}`:`Неправильна опція: очікується одне з ${W(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?"і":""}: ${W(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function jg(){return{localeError:xg()}}const Ag=()=>{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?`غلط ان پٹ: ${fe(n.values[0])} متوقع تھا`:`غلط آپشن: ${W(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?"ز":""}: ${W(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function zg(){return{localeError:Ag()}}const Tg=()=>{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 ${fe(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(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: ${W(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 Pg(){return{localeError:Tg()}}const Dg=()=>{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?`无效输入:期望 ${fe(n.values[0])}`:`无效选项:期望以下之一 ${W(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): ${W(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Ug(){return{localeError:Dg()}}const Cg=()=>{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?`無效的輸入值:預期為 ${fe(n.values[0])}`:`無效的選項:預期為以下其中之一 ${W(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?"們":""}:${W(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Bg(){return{localeError:Cg()}}var Wf=Object.freeze({__proto__:null,ar:pm,az:gm,be:vm,ca:bm,cs:wm,de:Sm,en:Gf,eo:xm,es:Am,fa:Tm,fi:Dm,fr:Cm,frCA:Rm,he:Lm,hu:Mm,id:Vm,it:Jm,ja:Wm,kh:Xm,ko:Qm,mk:tg,ms:rg,nl:og,no:ag,ota:cg,pl:hg,ps:fg,pt:mg,ru:yg,sl:$g,sv:_g,ta:kg,th:Ig,tr:Og,ua:jg,ur:zg,vi:Pg,zhCN:Ug,zhTW:Bg});const Hf=Symbol("ZodOutput"),Xf=Symbol("ZodInput");class Wo{constructor(){this._map=new Map,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 Map,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)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function Ho(){return new Wo}const qt=Ho();function Yf(e,t){return new e({type:"string",...V(t)})}function Qf(e,t){return new e({type:"string",coerce:!0,...V(t)})}function Xo(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...V(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(t)})}function Yo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...V(t)})}function Qo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(t)})}function es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(t)})}function ts(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(t)})}function ns(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}function rs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...V(t)})}function is(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(t)})}function os(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...V(t)})}function ss(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(t)})}function as(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...V(t)})}function us(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...V(t)})}function cs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(t)})}function ls(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(t)})}function fs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(t)})}function ds(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(t)})}function hs(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(t)})}function ps(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...V(t)})}function ms(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...V(t)})}function gs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...V(t)})}function ys(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...V(t)})}const ed={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function td(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(t)})}function nd(e,t){return new e({type:"string",format:"date",check:"string_format",...V(t)})}function rd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...V(t)})}function id(e,t){return new e({type:"string",format:"duration",check:"string_format",...V(t)})}function od(e,t){return new e({type:"number",checks:[],...V(t)})}function sd(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}function ad(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}function ud(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...V(t)})}function cd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...V(t)})}function ld(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 dd(e,t){return new e({type:"boolean",...V(t)})}function hd(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}function pd(e,t){return new e({type:"bigint",...V(t)})}function md(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}function gd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...V(t)})}function yd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...V(t)})}function vd(e,t){return new e({type:"symbol",...V(t)})}function $d(e,t){return new e({type:"undefined",...V(t)})}function bd(e,t){return new e({type:"null",...V(t)})}function _d(e){return new e({type:"any"})}function oi(e){return new e({type:"unknown"})}function wd(e,t){return new e({type:"never",...V(t)})}function kd(e,t){return new e({type:"void",...V(t)})}function Sd(e,t){return new e({type:"date",...V(t)})}function Id(e,t){return new e({type:"date",coerce:!0,...V(t)})}function Ed(e,t){return new e({type:"nan",...V(t)})}function Gt(e,t){return new Ro({check:"less_than",...V(t),value:e,inclusive:!1})}function ht(e,t){return new Ro({check:"less_than",...V(t),value:e,inclusive:!0})}function Wt(e,t){return new Fo({check:"greater_than",...V(t),value:e,inclusive:!1})}function nt(e,t){return new Fo({check:"greater_than",...V(t),value:e,inclusive:!0})}function Nd(e){return Wt(0,e)}function Od(e){return Gt(0,e)}function xd(e){return ht(0,e)}function jd(e){return nt(0,e)}function qn(e,t){return new Sl({check:"multiple_of",...V(t),value:e})}function bi(e,t){return new Nl({check:"max_size",...V(t),maximum:e})}function Vn(e,t){return new Ol({check:"min_size",...V(t),minimum:e})}function vs(e,t){return new xl({check:"size_equals",...V(t),size:e})}function _i(e,t){return new jl({check:"max_length",...V(t),maximum:e})}function $n(e,t){return new Al({check:"min_length",...V(t),minimum:e})}function wi(e,t){return new zl({check:"length_equals",...V(t),length:e})}function $s(e,t){return new Tl({check:"string_format",format:"regex",...V(t),pattern:e})}function bs(e){return new Pl({check:"string_format",format:"lowercase",...V(e)})}function _s(e){return new Dl({check:"string_format",format:"uppercase",...V(e)})}function ws(e,t){return new Ul({check:"string_format",format:"includes",...V(t),includes:e})}function ks(e,t){return new Cl({check:"string_format",format:"starts_with",...V(t),prefix:e})}function Ss(e,t){return new Bl({check:"string_format",format:"ends_with",...V(t),suffix:e})}function Ad(e,t,r){return new Rl({check:"property",property:e,schema:t,...V(r)})}function Is(e,t){return new Fl({check:"mime_type",mime:e,...V(t)})}function Qt(e){return new Ll({check:"overwrite",tx:e})}function Es(e){return Qt(t=>t.normalize(e))}function Ns(){return Qt(e=>e.trim())}function Os(){return Qt(e=>e.toLowerCase())}function xs(){return Qt(e=>e.toUpperCase())}function js(e,t,r){return new e({type:"array",element:t,...V(r)})}function Rg(e,t,r){return new e({type:"union",options:t,...V(r)})}function Fg(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...V(i)})}function Lg(e,t,r){return new e({type:"intersection",left:t,right:r})}function zd(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 Zg(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...V(i)})}function Mg(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...V(i)})}function qg(e,t,r){return new e({type:"set",valueType:t,...V(r)})}function Vg(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 Kg(e,t,r){return new e({type:"enum",entries:t,...V(r)})}function Jg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...V(r)})}function Td(e,t){return new e({type:"file",...V(t)})}function Gg(e,t){return new e({type:"transform",transform:t})}function Wg(e,t){return new e({type:"optional",innerType:t})}function Hg(e,t){return new e({type:"nullable",innerType:t})}function Xg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function Yg(e,t,r){return new e({type:"nonoptional",innerType:t,...V(r)})}function Qg(e,t){return new e({type:"success",innerType:t})}function ey(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function ty(e,t,r){return new e({type:"pipe",in:t,out:r})}function ny(e,t){return new e({type:"readonly",innerType:t})}function ry(e,t,r){return new e({type:"template_literal",parts:t,...V(r)})}function iy(e,t){return new e({type:"lazy",getter:t})}function oy(e,t){return new e({type:"promise",innerType:t})}function Pd(e,t,r){const i=V(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Dd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...V(r)})}function Ud(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(b=>typeof b=="string"?b.toLowerCase():b),n=n.map(b=>typeof b=="string"?b.toLowerCase():b));const o=new Set(i),s=new Set(n),a=e.Pipe??Go,c=e.Boolean??Mo,d=e.String??Yn,u=e.Transform??Jo,h=new u({type:"transform",transform:(b,g)=>{let m=b;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:s.has(m)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:g.value,inst:h}),{})},error:r.error}),y=new a({type:"pipe",in:new d({type:"string",error:r.error}),out:h,error:r.error});return new a({type:"pipe",in:y,out:new c({type:"boolean",error:r.error}),error:r.error})}function Cd(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 Bd{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=(...i)=>{const n=this._def.input?mo(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=t(...n);return this._def.output?mo(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(t){if(typeof t!="function")throw new Error("implement() must be called with a function");const r=async(...i)=>{const n=this._def.input?await go(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=await t(...n);return this._def.output?go(this._def.output,o,void 0,{callee:r}):o};return r}input(...t){const r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new $i({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){const r=this.constructor;return new r({type:"function",input:this._def.input,output:t})}}function Rd(e){return new Bd({type:"function",input:Array.isArray(e?.input)?zd($i,e?.input):e?.input??js(Vo,oi(ri)),output:e?.output??oi(ri)})}class vo{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??qt,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 c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...r,schemaPath:[...r.schemaPath,t],path:r.path},y=t._zod.parent;if(y)a.ref=y,this.process(y,h),this.seen.get(y).isParent=!0;else{const _=a.schema;switch(n.type){case"string":{const b=_;b.type="string";const{minimum:g,maximum:m,format:$,patterns:f,contentEncoding:v}=t._zod.bag;if(typeof g=="number"&&(b.minLength=g),typeof m=="number"&&(b.maxLength=m),$&&(b.format=o[$]??$,b.format===""&&delete b.format),v&&(b.contentEncoding=v),f&&f.size>0){const S=[...f];S.length===1?b.pattern=S[0].source:S.length>1&&(a.schema.allOf=[...S.map(E=>({...this.target==="draft-7"?{type:"string"}:{},pattern:E.source}))])}break}case"number":{const b=_,{minimum:g,maximum:m,format:$,multipleOf:f,exclusiveMaximum:v,exclusiveMinimum:S}=t._zod.bag;typeof $=="string"&&$.includes("int")?b.type="integer":b.type="number",typeof S=="number"&&(b.exclusiveMinimum=S),typeof g=="number"&&(b.minimum=g,typeof S=="number"&&(S>=g?delete b.minimum:delete b.exclusiveMinimum)),typeof v=="number"&&(b.exclusiveMaximum=v),typeof m=="number"&&(b.maximum=m,typeof v=="number"&&(v<=m?delete b.maximum:delete b.exclusiveMaximum)),typeof f=="number"&&(b.multipleOf=f);break}case"boolean":{const b=_;b.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":{_.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":{_.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const b=_,{minimum:g,maximum:m}=t._zod.bag;typeof g=="number"&&(b.minItems=g),typeof m=="number"&&(b.maxItems=m),b.type="array",b.items=this.process(n.element,{...h,path:[...h.path,"items"]});break}case"object":{const b=_;b.type="object",b.properties={};const g=n.shape;for(const f in g)b.properties[f]=this.process(g[f],{...h,path:[...h.path,"properties",f]});const m=new Set(Object.keys(g)),$=new Set([...m].filter(f=>{const v=n.shape[f]._zod;return this.io==="input"?v.optin===void 0:v.optout===void 0}));$.size>0&&(b.required=Array.from($)),n.catchall?._zod.def.type==="never"?b.additionalProperties=!1:n.catchall?n.catchall&&(b.additionalProperties=this.process(n.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(b.additionalProperties=!1);break}case"union":{const b=_;b.anyOf=n.options.map((g,m)=>this.process(g,{...h,path:[...h.path,"anyOf",m]}));break}case"intersection":{const b=_,g=this.process(n.left,{...h,path:[...h.path,"allOf",0]}),m=this.process(n.right,{...h,path:[...h.path,"allOf",1]}),$=v=>"allOf"in v&&Object.keys(v).length===1,f=[...$(g)?g.allOf:[g],...$(m)?m.allOf:[m]];b.allOf=f;break}case"tuple":{const b=_;b.type="array";const g=n.items.map((f,v)=>this.process(f,{...h,path:[...h.path,"prefixItems",v]}));if(this.target==="draft-2020-12"?b.prefixItems=g:b.items=g,n.rest){const f=this.process(n.rest,{...h,path:[...h.path,"items"]});this.target==="draft-2020-12"?b.items=f:b.additionalItems=f}n.rest&&(b.items=this.process(n.rest,{...h,path:[...h.path,"items"]}));const{minimum:m,maximum:$}=t._zod.bag;typeof m=="number"&&(b.minItems=m),typeof $=="number"&&(b.maxItems=$);break}case"record":{const b=_;b.type="object",b.propertyNames=this.process(n.keyType,{...h,path:[...h.path,"propertyNames"]}),b.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 b=_,g=xo(n.entries);g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),b.enum=g;break}case"literal":{const b=_,g=[];for(const m of n.values)if(m===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof m=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");g.push(Number(m))}else g.push(m);if(g.length!==0)if(g.length===1){const m=g[0];b.type=m===null?"null":typeof m,b.const=m}else g.every(m=>typeof m=="number")&&(b.type="number"),g.every(m=>typeof m=="string")&&(b.type="string"),g.every(m=>typeof m=="boolean")&&(b.type="string"),g.every(m=>m===null)&&(b.type="null"),b.enum=g;break}case"file":{const b=_,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:m,maximum:$,mime:f}=t._zod.bag;m!==void 0&&(g.minLength=m),$!==void 0&&(g.maxLength=$),f?f.length===1?(g.contentMediaType=f[0],Object.assign(b,g)):b.anyOf=f.map(v=>({...g,contentMediaType:v})):Object.assign(b,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const b=this.process(n.innerType,h);_.anyOf=[b,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,h),a.ref=n.innerType;break}case"success":{const b=_;b.type="boolean";break}case"default":{this.process(n.innerType,h),a.ref=n.innerType,_.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,h),a.ref=n.innerType,this.io==="input"&&(_._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,h),a.ref=n.innerType;let b;try{b=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}_.default=b;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const b=_,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");b.type="string",b.pattern=g.source;break}case"pipe":{const b=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(b,h),a.ref=b;break}case"readonly":{this.process(n.innerType,h),a.ref=n.innerType,_.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 b=t._zod.innerType;this.process(b,h),a.ref=b;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const d=this.metadataRegistry.get(t);return d&&Object.assign(a.schema,d),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=u=>{const h=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const g=i.external.registry.get(u[0])?.id,m=i.external.uri??(f=>f);if(g)return{ref:m(g)};const $=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=$,{defId:$,ref:`${m("__shared")}#/${h}/${$}`}}if(u[1]===n)return{ref:"#"};const _=`#/${h}/`,b=u[1].schema.id??`__schema${this.counter++}`;return{defId:b,ref:_+b}},s=u=>{if(u[1].schema.$ref)return;const h=u[1],{ref:y,defId:_}=o(u);h.def={...h.schema},_&&(h.defId=_);const b=h.schema;for(const g in b)delete b[g];b.$ref=y};if(i.cycles==="throw")for(const u of this.seen.entries()){const h=u[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
28
28
 
29
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of this.seen.entries()){const h=u[1];if(t===u[0]){s(u);continue}if(i.external){const _=i.external.registry.get(u[0])?.id;if(t!==u[0]&&_){s(u);continue}}if(this.metadataRegistry.get(u[0])?.id){s(u);continue}if(h.cycle){s(u);continue}if(h.count>1&&i.reused==="ref"){s(u);continue}}const a=(u,h)=>{const y=this.seen.get(u),_=y.def??y.schema,b={..._};if(y.ref===null)return;const g=y.ref;if(y.ref=null,g){a(g,h);const m=this.seen.get(g).schema;m.$ref&&h.target==="draft-7"?(_.allOf=_.allOf??[],_.allOf.push(m)):(Object.assign(_,m),Object.assign(_,b))}y.isParent||this.override({zodSchema:u,jsonSchema:_,path:y.path??[]})};for(const u of[...this.seen.entries()].reverse())a(u[0],{target:this.target});const c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),i.external?.uri){const u=i.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri(u)}Object.assign(c,n.def);const d=i.external?.defs??{};for(const u of this.seen.entries()){const h=u[1];h.def&&h.defId&&(d[h.defId]=h.def)}i.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}function Fd(e,t){if(e instanceof Wo){const i=new vo(t),n={};for(const a of e._idmap.entries()){const[c,d]=a;i.process(d)}const o={},s={registry:e,uri:t?.uri,defs:n};for(const a of e._idmap.entries()){const[c,d]=a;o[c]=i.emit(d,{...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 vo(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}throw new Error(`Unknown schema type: ${n.type}`)}var sy=Object.freeze({__proto__:null}),ay=Object.freeze({__proto__:null,$ZodAny:wf,$ZodArray:Vo,$ZodAsyncError:gn,$ZodBase64:lf,$ZodBase64URL:df,$ZodBigInt:qo,$ZodBigIntFormat:vf,$ZodBoolean:Mo,$ZodCIDRv4:uf,$ZodCIDRv6:cf,$ZodCUID:Hl,$ZodCUID2:Xl,$ZodCatch:Lf,$ZodCheck:Ue,$ZodCheckBigIntFormat:El,$ZodCheckEndsWith:Bl,$ZodCheckGreaterThan:Fo,$ZodCheckIncludes:Ul,$ZodCheckLengthEquals:Al,$ZodCheckLessThan:Ro,$ZodCheckLowerCase:Pl,$ZodCheckMaxLength:jl,$ZodCheckMaxSize:Nl,$ZodCheckMimeType:Fl,$ZodCheckMinLength:zl,$ZodCheckMinSize:Ol,$ZodCheckMultipleOf:Sl,$ZodCheckNumberFormat:Il,$ZodCheckOverwrite:Ll,$ZodCheckProperty:Rl,$ZodCheckRegex:Tl,$ZodCheckSizeEquals:xl,$ZodCheckStartsWith:Cl,$ZodCheckStringFormat:Xn,$ZodCheckUpperCase:Dl,$ZodCustom:Jf,$ZodCustomStringFormat:gf,$ZodDate:If,$ZodDefault:Cf,$ZodDiscriminatedUnion:Nf,$ZodE164:hf,$ZodEmail:Kl,$ZodEmoji:Gl,$ZodEnum:Af,$ZodError:zo,$ZodFile:Pf,$ZodFunction:Bd,$ZodGUID:ql,$ZodIPv4:sf,$ZodIPv6:af,$ZodISODate:nf,$ZodISODateTime:tf,$ZodISODuration:of,$ZodISOTime:rf,$ZodIntersection:Of,$ZodJWT:mf,$ZodKSUID:ef,$ZodLazy:Kf,$ZodLiteral:Tf,$ZodMap:jf,$ZodNaN:Zf,$ZodNanoID:Wl,$ZodNever:kf,$ZodNonOptional:Rf,$ZodNull:_f,$ZodNullable:Uf,$ZodNumber:Zo,$ZodNumberFormat:yf,$ZodObject:Ef,$ZodOptional:Df,$ZodPipe:Go,$ZodPrefault:Bf,$ZodPromise:Vf,$ZodReadonly:Mf,$ZodRealError:Hn,$ZodRecord:xf,$ZodRegistry:Wo,$ZodSet:zf,$ZodString:Yn,$ZodStringFormat:Ne,$ZodSuccess:Ff,$ZodSymbol:$f,$ZodTemplateLiteral:qf,$ZodTransform:Jo,$ZodTuple:$i,$ZodType:ue,$ZodULID:Yl,$ZodURL:Jl,$ZodUUID:Vl,$ZodUndefined:bf,$ZodUnion:Ko,$ZodUnknown:ri,$ZodVoid:Sf,$ZodXID:Ql,$brand:Ic,$constructor:D,$input:Xf,$output:Hf,Doc:Zl,JSONSchema:sy,JSONSchemaGenerator:vo,NEVER:Sc,TimePrecision:ed,_any:_d,_array:js,_base64:ps,_base64url:ms,_bigint:pd,_boolean:dd,_catch:ey,_cidrv4:ds,_cidrv6:hs,_coercedBigint:md,_coercedBoolean:hd,_coercedDate:Id,_coercedNumber:sd,_coercedString:Qf,_cuid:os,_cuid2:ss,_custom:Pd,_date:Sd,_default:Xg,_discriminatedUnion:Fg,_e164:gs,_email:Xo,_emoji:rs,_endsWith:Ss,_enum:Vg,_file:Td,_float32:ud,_float64:cd,_gt:Wt,_gte:nt,_guid:ii,_includes:ws,_int:ad,_int32:ld,_int64:gd,_intersection:Lg,_ipv4:ls,_ipv6:fs,_isoDate:nd,_isoDateTime:td,_isoDuration:id,_isoTime:rd,_jwt:ys,_ksuid:cs,_lazy:iy,_length:wi,_literal:Jg,_lowercase:bs,_lt:Gt,_lte:ht,_map:Mg,_max:ht,_maxLength:_i,_maxSize:bi,_mime:Is,_min:nt,_minLength:$n,_minSize:Vn,_multipleOf:qn,_nan:Ed,_nanoid:is,_nativeEnum:Kg,_negative:Od,_never:wd,_nonnegative:jd,_nonoptional:Yg,_nonpositive:xd,_normalize:Es,_null:bd,_nullable:Hg,_number:od,_optional:Wg,_overwrite:Qt,_parse:Po,_parseAsync:Do,_pipe:ty,_positive:Nd,_promise:oy,_property:zd,_readonly:ny,_record:Zg,_refine:Dd,_regex:$s,_safeParse:Uo,_safeParseAsync:Co,_set:qg,_size:vs,_startsWith:ks,_string:Yf,_stringFormat:Cd,_stringbool:Ud,_success:Qg,_symbol:vd,_templateLiteral:ry,_toLowerCase:Os,_toUpperCase:xs,_transform:Gg,_trim:Ns,_tuple:Ad,_uint32:fd,_uint64:yd,_ulid:as,_undefined:$d,_union:Rg,_unknown:oi,_uppercase:_s,_url:ns,_uuid:Yo,_uuidv4:Qo,_uuidv6:es,_uuidv7:ts,_void:kd,_xid:us,clone:$t,config:Xe,flattenError:Ao,formatError:To,function:Rd,globalConfig:ti,globalRegistry:qt,isValidBase64:Lo,isValidBase64URL:ff,isValidJWT:pf,locales:Wf,parse:mo,parseAsync:go,prettifyError:Zc,regexes:wl,registry:Ho,safeParse:Mc,safeParseAsync:qc,toDotPath:Lc,toJSONSchema:Fd,treeifyError:Fc,util:nm,version:Ml});const zs=D("ZodISODateTime",(e,t)=>{tf.init(e,t),Oe.init(e,t)});function Ld(e){return td(zs,e)}const As=D("ZodISODate",(e,t)=>{nf.init(e,t),Oe.init(e,t)});function Zd(e){return nd(As,e)}const Ts=D("ZodISOTime",(e,t)=>{rf.init(e,t),Oe.init(e,t)});function Md(e){return rd(Ts,e)}const Ps=D("ZodISODuration",(e,t)=>{of.init(e,t),Oe.init(e,t)});function qd(e){return id(Ps,e)}var uy=Object.freeze({__proto__:null,ZodISODate:As,ZodISODateTime:zs,ZodISODuration:Ps,ZodISOTime:Ts,date:Zd,datetime:Ld,duration:qd,time:Md});const Vd=(e,t)=>{zo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>To(e,r)},flatten:{value:r=>Ao(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},cy=D("ZodError",Vd),Qn=D("ZodError",Vd,{Parent:Error}),Kd=Po(Qn),Jd=Do(Qn),Gd=Uo(Qn),Wd=Co(Qn),de=D("ZodType",(e,t)=>(ue.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(r,i)=>$t(e,r,i),e.brand=()=>e,e.register=(r,i)=>(r.add(e,i),e),e.parse=(r,i)=>Kd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Gd(e,r,i),e.parseAsync=async(r,i)=>Jd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wd(e,r,i),e.spa=e.safeParseAsync,e.refine=(r,i)=>e.check(Ah(r,i)),e.superRefine=r=>e.check(Th(r)),e.overwrite=r=>e.check(Qt(r)),e.optional=()=>ai(e),e.nullable=()=>ui(e),e.nullish=()=>ai(ui(e)),e.nonoptional=r=>bh(e,r),e.array=()=>qe(e),e.or=r=>xt([e,r]),e.and=r=>ch(e,r),e.transform=r=>ci(e,ia(r)),e.default=r=>yh(e,r),e.prefault=r=>$h(e,r),e.catch=r=>kh(e,r),e.pipe=r=>ci(e,r),e.readonly=()=>Eh(e),e.describe=r=>{const i=e.clone();return qt.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return qt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return qt.get(e);const i=e.clone();return qt.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ds=D("_ZodString",(e,t)=>{Yn.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($s(...i)),e.includes=(...i)=>e.check(ws(...i)),e.startsWith=(...i)=>e.check(ks(...i)),e.endsWith=(...i)=>e.check(Ss(...i)),e.min=(...i)=>e.check($n(...i)),e.max=(...i)=>e.check(_i(...i)),e.length=(...i)=>e.check(wi(...i)),e.nonempty=(...i)=>e.check($n(1,...i)),e.lowercase=i=>e.check(bs(i)),e.uppercase=i=>e.check(_s(i)),e.trim=()=>e.check(Ns()),e.normalize=(...i)=>e.check(Es(...i)),e.toLowerCase=()=>e.check(Os()),e.toUpperCase=()=>e.check(xs())}),ki=D("ZodString",(e,t)=>{Yn.init(e,t),Ds.init(e,t),e.email=r=>e.check(Xo(Us,r)),e.url=r=>e.check(ns(Cs,r)),e.jwt=r=>e.check(ys(Ys,r)),e.emoji=r=>e.check(rs(Bs,r)),e.guid=r=>e.check(ii(si,r)),e.uuid=r=>e.check(Yo(It,r)),e.uuidv4=r=>e.check(Qo(It,r)),e.uuidv6=r=>e.check(es(It,r)),e.uuidv7=r=>e.check(ts(It,r)),e.nanoid=r=>e.check(is(Rs,r)),e.guid=r=>e.check(ii(si,r)),e.cuid=r=>e.check(os(Fs,r)),e.cuid2=r=>e.check(ss(Ls,r)),e.ulid=r=>e.check(as(Zs,r)),e.base64=r=>e.check(ps(Ws,r)),e.base64url=r=>e.check(ms(Hs,r)),e.xid=r=>e.check(us(Ms,r)),e.ksuid=r=>e.check(cs(qs,r)),e.ipv4=r=>e.check(ls(Vs,r)),e.ipv6=r=>e.check(fs(Ks,r)),e.cidrv4=r=>e.check(ds(Js,r)),e.cidrv6=r=>e.check(hs(Gs,r)),e.e164=r=>e.check(gs(Xs,r)),e.datetime=r=>e.check(Ld(r)),e.date=r=>e.check(Zd(r)),e.time=r=>e.check(Md(r)),e.duration=r=>e.check(qd(r))});function q(e){return Yf(ki,e)}const Oe=D("ZodStringFormat",(e,t)=>{Ne.init(e,t),Ds.init(e,t)}),Us=D("ZodEmail",(e,t)=>{Kl.init(e,t),Oe.init(e,t)});function ly(e){return Xo(Us,e)}const si=D("ZodGUID",(e,t)=>{ql.init(e,t),Oe.init(e,t)});function fy(e){return ii(si,e)}const It=D("ZodUUID",(e,t)=>{Vl.init(e,t),Oe.init(e,t)});function dy(e){return Yo(It,e)}function hy(e){return Qo(It,e)}function py(e){return es(It,e)}function my(e){return ts(It,e)}const Cs=D("ZodURL",(e,t)=>{Jl.init(e,t),Oe.init(e,t)});function Hd(e){return ns(Cs,e)}const Bs=D("ZodEmoji",(e,t)=>{Gl.init(e,t),Oe.init(e,t)});function gy(e){return rs(Bs,e)}const Rs=D("ZodNanoID",(e,t)=>{Wl.init(e,t),Oe.init(e,t)});function yy(e){return is(Rs,e)}const Fs=D("ZodCUID",(e,t)=>{Hl.init(e,t),Oe.init(e,t)});function vy(e){return os(Fs,e)}const Ls=D("ZodCUID2",(e,t)=>{Xl.init(e,t),Oe.init(e,t)});function be(e){return ss(Ls,e)}const Zs=D("ZodULID",(e,t)=>{Yl.init(e,t),Oe.init(e,t)});function $y(e){return as(Zs,e)}const Ms=D("ZodXID",(e,t)=>{Ql.init(e,t),Oe.init(e,t)});function by(e){return us(Ms,e)}const qs=D("ZodKSUID",(e,t)=>{ef.init(e,t),Oe.init(e,t)});function _y(e){return cs(qs,e)}const Vs=D("ZodIPv4",(e,t)=>{sf.init(e,t),Oe.init(e,t)});function wy(e){return ls(Vs,e)}const Ks=D("ZodIPv6",(e,t)=>{af.init(e,t),Oe.init(e,t)});function ky(e){return fs(Ks,e)}const Js=D("ZodCIDRv4",(e,t)=>{uf.init(e,t),Oe.init(e,t)});function Sy(e){return ds(Js,e)}const Gs=D("ZodCIDRv6",(e,t)=>{cf.init(e,t),Oe.init(e,t)});function Iy(e){return hs(Gs,e)}const Ws=D("ZodBase64",(e,t)=>{lf.init(e,t),Oe.init(e,t)});function Ey(e){return ps(Ws,e)}const Hs=D("ZodBase64URL",(e,t)=>{df.init(e,t),Oe.init(e,t)});function Ny(e){return ms(Hs,e)}const Xs=D("ZodE164",(e,t)=>{hf.init(e,t),Oe.init(e,t)});function Oy(e){return gs(Xs,e)}const Ys=D("ZodJWT",(e,t)=>{mf.init(e,t),Oe.init(e,t)});function xy(e){return ys(Ys,e)}const Xd=D("ZodCustomStringFormat",(e,t)=>{gf.init(e,t),Oe.init(e,t)});function jy(e,t,r={}){return Cd(Xd,e,t,r)}const Si=D("ZodNumber",(e,t)=>{Zo.init(e,t),de.init(e,t),e.gt=(i,n)=>e.check(Wt(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(Gt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.int=i=>e.check($o(i)),e.safe=i=>e.check($o(i)),e.positive=i=>e.check(Wt(0,i)),e.nonnegative=i=>e.check(nt(0,i)),e.negative=i=>e.check(Gt(0,i)),e.nonpositive=i=>e.check(ht(0,i)),e.multipleOf=(i,n)=>e.check(qn(i,n)),e.step=(i,n)=>e.check(qn(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 Ke(e){return od(Si,e)}const Sn=D("ZodNumberFormat",(e,t)=>{yf.init(e,t),Si.init(e,t)});function $o(e){return ad(Sn,e)}function zy(e){return ud(Sn,e)}function Ay(e){return cd(Sn,e)}function Ty(e){return ld(Sn,e)}function Py(e){return fd(Sn,e)}const Ii=D("ZodBoolean",(e,t)=>{Mo.init(e,t),de.init(e,t)});function Ce(e){return dd(Ii,e)}const Ei=D("ZodBigInt",(e,t)=>{qo.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(Wt(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(Gt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.positive=i=>e.check(Wt(BigInt(0),i)),e.negative=i=>e.check(Gt(BigInt(0),i)),e.nonpositive=i=>e.check(ht(BigInt(0),i)),e.nonnegative=i=>e.check(nt(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(qn(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Dy(e){return pd(Ei,e)}const Qs=D("ZodBigIntFormat",(e,t)=>{vf.init(e,t),Ei.init(e,t)});function Uy(e){return gd(Qs,e)}function Cy(e){return yd(Qs,e)}const Yd=D("ZodSymbol",(e,t)=>{$f.init(e,t),de.init(e,t)});function By(e){return vd(Yd,e)}const Qd=D("ZodUndefined",(e,t)=>{bf.init(e,t),de.init(e,t)});function Ry(e){return $d(Qd,e)}const eh=D("ZodNull",(e,t)=>{_f.init(e,t),de.init(e,t)});function th(e){return bd(eh,e)}const nh=D("ZodAny",(e,t)=>{wf.init(e,t),de.init(e,t)});function Fy(){return _d(nh)}const rh=D("ZodUnknown",(e,t)=>{ri.init(e,t),de.init(e,t)});function Ct(){return oi(rh)}const ih=D("ZodNever",(e,t)=>{kf.init(e,t),de.init(e,t)});function Ni(e){return wd(ih,e)}const oh=D("ZodVoid",(e,t)=>{Sf.init(e,t),de.init(e,t)});function Ly(e){return kd(oh,e)}const ea=D("ZodDate",(e,t)=>{If.init(e,t),de.init(e,t),e.min=(i,n)=>e.check(nt(i,n)),e.max=(i,n)=>e.check(ht(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 Sd(ea,e)}const sh=D("ZodArray",(e,t)=>{Vo.init(e,t),de.init(e,t),e.element=t.element,e.min=(r,i)=>e.check($n(r,i)),e.nonempty=r=>e.check($n(1,r)),e.max=(r,i)=>e.check(_i(r,i)),e.length=(r,i)=>e.check(wi(r,i)),e.unwrap=()=>e.element});function qe(e,t){return js(sh,e,t)}function Zy(e){const t=e._zod.def.shape;return ve(Object.keys(t))}const Oi=D("ZodObject",(e,t)=>{Ef.init(e,t),de.init(e,t),$e(e,"shape",()=>t.shape),e.keyof=()=>bt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ct()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ct()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ni()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Dc(e,r),e.merge=r=>Uc(e,r),e.pick=r=>Tc(e,r),e.omit=r=>Pc(e,r),e.partial=(...r)=>Cc(oa,e,r[0]),e.required=(...r)=>Bc(sa,e,r[0])});function H(e,t){const r={type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},...V(t)};return new Oi(r)}function My(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ni(),...V(t)})}function qy(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ct(),...V(t)})}const ta=D("ZodUnion",(e,t)=>{Ko.init(e,t),de.init(e,t),e.options=t.options});function xt(e,t){return new ta({type:"union",options:e,...V(t)})}const ah=D("ZodDiscriminatedUnion",(e,t)=>{ta.init(e,t),Nf.init(e,t)});function jt(e,t,r){return new ah({type:"union",options:t,discriminator:e,...V(r)})}const uh=D("ZodIntersection",(e,t)=>{Of.init(e,t),de.init(e,t)});function ch(e,t){return new uh({type:"intersection",left:e,right:t})}const lh=D("ZodTuple",(e,t)=>{$i.init(e,t),de.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Vy(e,t,r){const i=t instanceof ue,n=i?r:t,o=i?t:null;return new lh({type:"tuple",items:e,rest:o,...V(n)})}const na=D("ZodRecord",(e,t)=>{xf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ze(e,t,r){return new na({type:"record",keyType:e,valueType:t,...V(r)})}function Ky(e,t,r){return new na({type:"record",keyType:xt([e,Ni()]),valueType:t,...V(r)})}const fh=D("ZodMap",(e,t)=>{jf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Jy(e,t,r){return new fh({type:"map",keyType:e,valueType:t,...V(r)})}const dh=D("ZodSet",(e,t)=>{zf.init(e,t),de.init(e,t),e.min=(...r)=>e.check(Vn(...r)),e.nonempty=r=>e.check(Vn(1,r)),e.max=(...r)=>e.check(bi(...r)),e.size=(...r)=>e.check(vs(...r))});function Gy(e,t){return new dh({type:"set",valueType:e,...V(t)})}const Kn=D("ZodEnum",(e,t)=>{Af.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 Kn({...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 Kn({...t,checks:[],...V(n),entries:o})}});function bt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Kn({type:"enum",entries:r,...V(t)})}function Wy(e,t){return new Kn({type:"enum",entries:e,...V(t)})}const hh=D("ZodLiteral",(e,t)=>{Tf.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 ve(e,t){return new hh({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}const ph=D("ZodFile",(e,t)=>{Pf.init(e,t),de.init(e,t),e.min=(r,i)=>e.check(Vn(r,i)),e.max=(r,i)=>e.check(bi(r,i)),e.mime=(r,i)=>e.check(Is(Array.isArray(r)?r:[r],i))});function Hy(e){return Td(ph,e)}const ra=D("ZodTransform",(e,t)=>{Jo.init(e,t),de.init(e,t),e._zod.parse=(r,i)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(yn(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),s.continue??(s.continue=!0),r.issues.push(yn(s))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function ia(e){return new ra({type:"transform",transform:e})}const oa=D("ZodOptional",(e,t)=>{Df.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ai(e){return new oa({type:"optional",innerType:e})}const mh=D("ZodNullable",(e,t)=>{Uf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ui(e){return new mh({type:"nullable",innerType:e})}function Xy(e){return ai(ui(e))}const gh=D("ZodDefault",(e,t)=>{Cf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function yh(e,t){return new gh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const vh=D("ZodPrefault",(e,t)=>{Bf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function $h(e,t){return new vh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const sa=D("ZodNonOptional",(e,t)=>{Rf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bh(e,t){return new sa({type:"nonoptional",innerType:e,...V(t)})}const _h=D("ZodSuccess",(e,t)=>{Ff.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yy(e){return new _h({type:"success",innerType:e})}const wh=D("ZodCatch",(e,t)=>{Lf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kh(e,t){return new wh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Sh=D("ZodNaN",(e,t)=>{Zf.init(e,t),de.init(e,t)});function Qy(e){return Ed(Sh,e)}const aa=D("ZodPipe",(e,t)=>{Go.init(e,t),de.init(e,t),e.in=t.in,e.out=t.out});function ci(e,t){return new aa({type:"pipe",in:e,out:t})}const Ih=D("ZodReadonly",(e,t)=>{Mf.init(e,t),de.init(e,t)});function Eh(e){return new Ih({type:"readonly",innerType:e})}const Nh=D("ZodTemplateLiteral",(e,t)=>{qf.init(e,t),de.init(e,t)});function Rn(e,t){return new Nh({type:"template_literal",parts:e,...V(t)})}const Oh=D("ZodLazy",(e,t)=>{Kf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.getter()});function xh(e){return new Oh({type:"lazy",getter:e})}const jh=D("ZodPromise",(e,t)=>{Vf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ev(e){return new jh({type:"promise",innerType:e})}const xi=D("ZodCustom",(e,t)=>{Jf.init(e,t),de.init(e,t)});function zh(e){const t=new Ue({check:"custom"});return t._zod.check=e,t}function bn(e,t){return Pd(xi,e??(()=>!0),t)}function Ah(e,t={}){return Dd(xi,e,t)}function Th(e){const t=zh(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(yn(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(yn(n))}},e(r.value,r)));return t}function Ph(e,t={error:`Input not instance of ${e.name}`}){const r=new xi({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...V(t)});return r._zod.bag.Class=e,r}const tv=(...e)=>Ud({Pipe:aa,Boolean:Ii,String:ki,Transform:ra},...e);function nv(e){const t=xh(()=>xt([q(e),Ke(),Ce(),th(),qe(t),Ze(q(),t)]));return t}function rv(e,t){return ci(ia(e),t)}const iv={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 ov(e){Xe({customError:e})}function sv(){return Xe().customError}var bo;bo||(bo={});function av(e){return Qf(ki,e)}function uv(e){return sd(Si,e)}function Dh(e){return hd(Ii,e)}function cv(e){return md(Ei,e)}function lv(e){return Id(ea,e)}var fv=Object.freeze({__proto__:null,bigint:cv,boolean:Dh,date:lv,number:uv,string:av});Xe(Gf());var Dt=Object.freeze({__proto__:null,$brand:Ic,$input:Xf,$output:Hf,NEVER:Sc,TimePrecision:ed,ZodAny:nh,ZodArray:sh,ZodBase64:Ws,ZodBase64URL:Hs,ZodBigInt:Ei,ZodBigIntFormat:Qs,ZodBoolean:Ii,ZodCIDRv4:Js,ZodCIDRv6:Gs,ZodCUID:Fs,ZodCUID2:Ls,ZodCatch:wh,ZodCustom:xi,ZodCustomStringFormat:Xd,ZodDate:ea,ZodDefault:gh,ZodDiscriminatedUnion:ah,ZodE164:Xs,ZodEmail:Us,ZodEmoji:Bs,ZodEnum:Kn,ZodError:cy,ZodFile:ph,get ZodFirstPartyTypeKind(){return bo},ZodGUID:si,ZodIPv4:Vs,ZodIPv6:Ks,ZodISODate:As,ZodISODateTime:zs,ZodISODuration:Ps,ZodISOTime:Ts,ZodIntersection:uh,ZodIssueCode:iv,ZodJWT:Ys,ZodKSUID:qs,ZodLazy:Oh,ZodLiteral:hh,ZodMap:fh,ZodNaN:Sh,ZodNanoID:Rs,ZodNever:ih,ZodNonOptional:sa,ZodNull:eh,ZodNullable:mh,ZodNumber:Si,ZodNumberFormat:Sn,ZodObject:Oi,ZodOptional:oa,ZodPipe:aa,ZodPrefault:vh,ZodPromise:jh,ZodReadonly:Ih,ZodRealError:Qn,ZodRecord:na,ZodSet:dh,ZodString:ki,ZodStringFormat:Oe,ZodSuccess:_h,ZodSymbol:Yd,ZodTemplateLiteral:Nh,ZodTransform:ra,ZodTuple:lh,ZodType:de,ZodULID:Zs,ZodURL:Cs,ZodUUID:It,ZodUndefined:Qd,ZodUnion:ta,ZodUnknown:rh,ZodVoid:oh,ZodXID:Ms,_ZodString:Ds,_default:yh,any:Fy,array:qe,base64:Ey,base64url:Ny,bigint:Dy,boolean:Ce,catch:kh,check:zh,cidrv4:Sy,cidrv6:Iy,clone:$t,coerce:fv,config:Xe,core:ay,cuid:vy,cuid2:be,custom:bn,date:Ie,discriminatedUnion:jt,e164:Oy,email:ly,emoji:gy,endsWith:Ss,enum:bt,file:Hy,flattenError:Ao,float32:zy,float64:Ay,formatError:To,function:Rd,getErrorMap:sv,globalRegistry:qt,gt:Wt,gte:nt,guid:fy,includes:ws,instanceof:Ph,int:$o,int32:Ty,int64:Uy,intersection:ch,ipv4:wy,ipv6:ky,iso:uy,json:nv,jwt:xy,keyof:Zy,ksuid:_y,lazy:xh,length:wi,literal:ve,locales:Wf,looseObject:qy,lowercase:bs,lt:Gt,lte:ht,map:Jy,maxLength:_i,maxSize:bi,mime:Is,minLength:$n,minSize:Vn,multipleOf:qn,nan:Qy,nanoid:yy,nativeEnum:Wy,negative:Od,never:Ni,nonnegative:jd,nonoptional:bh,nonpositive:xd,normalize:Es,null:th,nullable:ui,nullish:Xy,number:Ke,object:H,optional:ai,overwrite:Qt,parse:Kd,parseAsync:Jd,partialRecord:Ky,pipe:ci,positive:Nd,prefault:$h,preprocess:rv,prettifyError:Zc,promise:ev,property:zd,readonly:Eh,record:Ze,refine:Ah,regex:$s,regexes:wl,registry:Ho,safeParse:Gd,safeParseAsync:Wd,set:Gy,setErrorMap:ov,size:vs,startsWith:ks,strictObject:My,string:q,stringFormat:jy,stringbool:tv,success:Yy,superRefine:Th,symbol:By,templateLiteral:Rn,toJSONSchema:Fd,toLowerCase:Os,toUpperCase:xs,transform:ia,treeifyError:Fc,trim:Ns,tuple:Vy,uint32:Py,uint64:Cy,ulid:$y,undefined:Ry,union:xt,unknown:Ct,uppercase:_s,url:Hd,uuid:dy,uuidv4:hy,uuidv6:py,uuidv7:my,void:Ly,xid:by});function dv(e,t,r){let i=n=>e(n,...t);return r===void 0?i:Object.assign(i,{lazy:r,lazyArgs:t})}function Uh(e,t,r){let i=e.length-t.length;if(i===0)return e(...t);if(i===1)return dv(e,t,r);throw new Error("Wrong number of arguments")}var Ch={done:!1,hasNext:!1};function qa(e,...t){let r=e,i=t.map(o=>"lazy"in o?hv(o):void 0),n=0;for(;n<t.length;){if(i[n]===void 0||!pv(r)){let c=t[n];r=c(r),n+=1;continue}let o=[];for(let c=n;c<t.length;c++){let d=i[c];if(d===void 0||(o.push(d),d.isSingle))break}let s=[];for(let c of r)if(Bh(c,s,o))break;let{isSingle:a}=o.at(-1);r=a?s[0]:s,n+=o.length}return r}function Bh(e,t,r){if(r.length===0)return t.push(e),!1;let i=e,n=Ch,o=!1;for(let[s,a]of r.entries()){let{index:c,items:d}=a;if(d.push(i),n=a(i,c,d),a.index+=1,n.hasNext){if(n.hasMany??!1){for(let u of n.next)if(Bh(u,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 hv(e){let{lazy:t,lazyArgs:r}=e,i=t(...r);return Object.assign(i,{isSingle:t.single??!1,index:0,items:[]})}function pv(e){return typeof e=="string"||typeof e=="object"&&e!==null&&Symbol.iterator in e}function mv(e,t){let r=t.length-e.length;if(r===1){let[i,...n]=t;return qa(i,{lazy:e,lazyArgs:n})}if(r===0){let i={lazy:e,lazyArgs:t};return Object.assign(n=>qa(n,i),i)}throw new Error("Wrong number of arguments")}function gv(...e){return mv(yv,e)}function yv(){let e=new Set;return t=>e.has(t)?Ch:(e.add(t),{done:!1,hasNext:!0,next:t})}function vv(...e){return Uh($v,e)}function $v(e,t){let r={};for(let[i,n]of Object.entries(e)){let o=t(n,i,e);r[i]=o}return r}function bv(...e){return Uh(Object.fromEntries,e)}const ua=Symbol.for("yaml.alias"),_o=Symbol.for("yaml.document"),Ut=Symbol.for("yaml.map"),Rh=Symbol.for("yaml.pair"),vt=Symbol.for("yaml.scalar"),In=Symbol.for("yaml.seq"),at=Symbol.for("yaml.node.type"),en=e=>!!e&&typeof e=="object"&&e[at]===ua,ji=e=>!!e&&typeof e=="object"&&e[at]===_o,er=e=>!!e&&typeof e=="object"&&e[at]===Ut,De=e=>!!e&&typeof e=="object"&&e[at]===Rh,Ee=e=>!!e&&typeof e=="object"&&e[at]===vt,tr=e=>!!e&&typeof e=="object"&&e[at]===In;function Te(e){if(e&&typeof e=="object")switch(e[at]){case Ut:case In:return!0}return!1}function Pe(e){if(e&&typeof e=="object")switch(e[at]){case ua:case Ut:case vt:case In:return!0}return!1}const Fh=e=>(Ee(e)||Te(e))&&!!e.anchor,Mt=Symbol("break visit"),_v=Symbol("skip children"),Fn=Symbol("remove node");function En(e,t){const r=wv(t);ji(e)?cn(null,e.contents,r,Object.freeze([e]))===Fn&&(e.contents=null):cn(null,e,r,Object.freeze([]))}En.BREAK=Mt;En.SKIP=_v;En.REMOVE=Fn;function cn(e,t,r,i){const n=kv(e,t,r,i);if(Pe(n)||De(n))return Sv(e,i,n),cn(e,n,r,i);if(typeof n!="symbol"){if(Te(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===Mt)return Mt;s===Fn&&(t.items.splice(o,1),o-=1)}}}else if(De(t)){i=Object.freeze(i.concat(t));const o=cn("key",t.key,r,i);if(o===Mt)return Mt;o===Fn&&(t.key=null);const s=cn("value",t.value,r,i);if(s===Mt)return Mt;s===Fn&&(t.value=null)}}return n}function wv(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 kv(e,t,r,i){if(typeof r=="function")return r(e,t,i);if(er(t))return r.Map?.(e,t,i);if(tr(t))return r.Seq?.(e,t,i);if(De(t))return r.Pair?.(e,t,i);if(Ee(t))return r.Scalar?.(e,t,i);if(en(t))return r.Alias?.(e,t,i)}function Sv(e,t,r){const i=t[t.length-1];if(Te(i))i.items[e]=r;else if(De(i))e==="key"?i.key=r:i.value=r;else if(ji(i))i.contents=r;else{const n=en(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}const Iv={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ev=e=>e.replace(/[!,[\]{}]/g,t=>Iv[t]);class We{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},We.defaultYaml,t),this.tags=Object.assign({},We.defaultTags,r)}clone(){const t=new We(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new We(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:We.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},We.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:We.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},We.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+Ev(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&&Pe(t.contents)){const o={};En(t.contents,(s,a)=>{Pe(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(`
29
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of this.seen.entries()){const h=u[1];if(t===u[0]){s(u);continue}if(i.external){const _=i.external.registry.get(u[0])?.id;if(t!==u[0]&&_){s(u);continue}}if(this.metadataRegistry.get(u[0])?.id){s(u);continue}if(h.cycle){s(u);continue}if(h.count>1&&i.reused==="ref"){s(u);continue}}const a=(u,h)=>{const y=this.seen.get(u),_=y.def??y.schema,b={..._};if(y.ref===null)return;const g=y.ref;if(y.ref=null,g){a(g,h);const m=this.seen.get(g).schema;m.$ref&&h.target==="draft-7"?(_.allOf=_.allOf??[],_.allOf.push(m)):(Object.assign(_,m),Object.assign(_,b))}y.isParent||this.override({zodSchema:u,jsonSchema:_,path:y.path??[]})};for(const u of[...this.seen.entries()].reverse())a(u[0],{target:this.target});const c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),i.external?.uri){const u=i.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri(u)}Object.assign(c,n.def);const d=i.external?.defs??{};for(const u of this.seen.entries()){const h=u[1];h.def&&h.defId&&(d[h.defId]=h.def)}i.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}function Fd(e,t){if(e instanceof Wo){const i=new vo(t),n={};for(const a of e._idmap.entries()){const[c,d]=a;i.process(d)}const o={},s={registry:e,uri:t?.uri,defs:n};for(const a of e._idmap.entries()){const[c,d]=a;o[c]=i.emit(d,{...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 vo(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}throw new Error(`Unknown schema type: ${n.type}`)}var sy=Object.freeze({__proto__:null}),ay=Object.freeze({__proto__:null,$ZodAny:wf,$ZodArray:Vo,$ZodAsyncError:gn,$ZodBase64:lf,$ZodBase64URL:df,$ZodBigInt:qo,$ZodBigIntFormat:vf,$ZodBoolean:Mo,$ZodCIDRv4:uf,$ZodCIDRv6:cf,$ZodCUID:Hl,$ZodCUID2:Xl,$ZodCatch:Lf,$ZodCheck:Ue,$ZodCheckBigIntFormat:El,$ZodCheckEndsWith:Bl,$ZodCheckGreaterThan:Fo,$ZodCheckIncludes:Ul,$ZodCheckLengthEquals:zl,$ZodCheckLessThan:Ro,$ZodCheckLowerCase:Pl,$ZodCheckMaxLength:jl,$ZodCheckMaxSize:Nl,$ZodCheckMimeType:Fl,$ZodCheckMinLength:Al,$ZodCheckMinSize:Ol,$ZodCheckMultipleOf:Sl,$ZodCheckNumberFormat:Il,$ZodCheckOverwrite:Ll,$ZodCheckProperty:Rl,$ZodCheckRegex:Tl,$ZodCheckSizeEquals:xl,$ZodCheckStartsWith:Cl,$ZodCheckStringFormat:Xn,$ZodCheckUpperCase:Dl,$ZodCustom:Jf,$ZodCustomStringFormat:gf,$ZodDate:If,$ZodDefault:Cf,$ZodDiscriminatedUnion:Nf,$ZodE164:hf,$ZodEmail:Kl,$ZodEmoji:Gl,$ZodEnum:zf,$ZodError:Ao,$ZodFile:Pf,$ZodFunction:Bd,$ZodGUID:ql,$ZodIPv4:sf,$ZodIPv6:af,$ZodISODate:nf,$ZodISODateTime:tf,$ZodISODuration:of,$ZodISOTime:rf,$ZodIntersection:Of,$ZodJWT:mf,$ZodKSUID:ef,$ZodLazy:Kf,$ZodLiteral:Tf,$ZodMap:jf,$ZodNaN:Zf,$ZodNanoID:Wl,$ZodNever:kf,$ZodNonOptional:Rf,$ZodNull:_f,$ZodNullable:Uf,$ZodNumber:Zo,$ZodNumberFormat:yf,$ZodObject:Ef,$ZodOptional:Df,$ZodPipe:Go,$ZodPrefault:Bf,$ZodPromise:Vf,$ZodReadonly:Mf,$ZodRealError:Hn,$ZodRecord:xf,$ZodRegistry:Wo,$ZodSet:Af,$ZodString:Yn,$ZodStringFormat:Ne,$ZodSuccess:Ff,$ZodSymbol:$f,$ZodTemplateLiteral:qf,$ZodTransform:Jo,$ZodTuple:$i,$ZodType:ue,$ZodULID:Yl,$ZodURL:Jl,$ZodUUID:Vl,$ZodUndefined:bf,$ZodUnion:Ko,$ZodUnknown:ri,$ZodVoid:Sf,$ZodXID:Ql,$brand:Ic,$constructor:D,$input:Xf,$output:Hf,Doc:Zl,JSONSchema:sy,JSONSchemaGenerator:vo,NEVER:Sc,TimePrecision:ed,_any:_d,_array:js,_base64:ps,_base64url:ms,_bigint:pd,_boolean:dd,_catch:ey,_cidrv4:ds,_cidrv6:hs,_coercedBigint:md,_coercedBoolean:hd,_coercedDate:Id,_coercedNumber:sd,_coercedString:Qf,_cuid:os,_cuid2:ss,_custom:Pd,_date:Sd,_default:Xg,_discriminatedUnion:Fg,_e164:gs,_email:Xo,_emoji:rs,_endsWith:Ss,_enum:Vg,_file:Td,_float32:ud,_float64:cd,_gt:Wt,_gte:nt,_guid:ii,_includes:ws,_int:ad,_int32:ld,_int64:gd,_intersection:Lg,_ipv4:ls,_ipv6:fs,_isoDate:nd,_isoDateTime:td,_isoDuration:id,_isoTime:rd,_jwt:ys,_ksuid:cs,_lazy:iy,_length:wi,_literal:Jg,_lowercase:bs,_lt:Gt,_lte:ht,_map:Mg,_max:ht,_maxLength:_i,_maxSize:bi,_mime:Is,_min:nt,_minLength:$n,_minSize:Vn,_multipleOf:qn,_nan:Ed,_nanoid:is,_nativeEnum:Kg,_negative:Od,_never:wd,_nonnegative:jd,_nonoptional:Yg,_nonpositive:xd,_normalize:Es,_null:bd,_nullable:Hg,_number:od,_optional:Wg,_overwrite:Qt,_parse:Po,_parseAsync:Do,_pipe:ty,_positive:Nd,_promise:oy,_property:Ad,_readonly:ny,_record:Zg,_refine:Dd,_regex:$s,_safeParse:Uo,_safeParseAsync:Co,_set:qg,_size:vs,_startsWith:ks,_string:Yf,_stringFormat:Cd,_stringbool:Ud,_success:Qg,_symbol:vd,_templateLiteral:ry,_toLowerCase:Os,_toUpperCase:xs,_transform:Gg,_trim:Ns,_tuple:zd,_uint32:fd,_uint64:yd,_ulid:as,_undefined:$d,_union:Rg,_unknown:oi,_uppercase:_s,_url:ns,_uuid:Yo,_uuidv4:Qo,_uuidv6:es,_uuidv7:ts,_void:kd,_xid:us,clone:$t,config:Xe,flattenError:zo,formatError:To,function:Rd,globalConfig:ti,globalRegistry:qt,isValidBase64:Lo,isValidBase64URL:ff,isValidJWT:pf,locales:Wf,parse:mo,parseAsync:go,prettifyError:Zc,regexes:wl,registry:Ho,safeParse:Mc,safeParseAsync:qc,toDotPath:Lc,toJSONSchema:Fd,treeifyError:Fc,util:nm,version:Ml});const As=D("ZodISODateTime",(e,t)=>{tf.init(e,t),Oe.init(e,t)});function Ld(e){return td(As,e)}const zs=D("ZodISODate",(e,t)=>{nf.init(e,t),Oe.init(e,t)});function Zd(e){return nd(zs,e)}const Ts=D("ZodISOTime",(e,t)=>{rf.init(e,t),Oe.init(e,t)});function Md(e){return rd(Ts,e)}const Ps=D("ZodISODuration",(e,t)=>{of.init(e,t),Oe.init(e,t)});function qd(e){return id(Ps,e)}var uy=Object.freeze({__proto__:null,ZodISODate:zs,ZodISODateTime:As,ZodISODuration:Ps,ZodISOTime:Ts,date:Zd,datetime:Ld,duration:qd,time:Md});const Vd=(e,t)=>{Ao.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>To(e,r)},flatten:{value:r=>zo(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},cy=D("ZodError",Vd),Qn=D("ZodError",Vd,{Parent:Error}),Kd=Po(Qn),Jd=Do(Qn),Gd=Uo(Qn),Wd=Co(Qn),de=D("ZodType",(e,t)=>(ue.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(r,i)=>$t(e,r,i),e.brand=()=>e,e.register=(r,i)=>(r.add(e,i),e),e.parse=(r,i)=>Kd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Gd(e,r,i),e.parseAsync=async(r,i)=>Jd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wd(e,r,i),e.spa=e.safeParseAsync,e.refine=(r,i)=>e.check(zh(r,i)),e.superRefine=r=>e.check(Th(r)),e.overwrite=r=>e.check(Qt(r)),e.optional=()=>ai(e),e.nullable=()=>ui(e),e.nullish=()=>ai(ui(e)),e.nonoptional=r=>bh(e,r),e.array=()=>qe(e),e.or=r=>xt([e,r]),e.and=r=>ch(e,r),e.transform=r=>ci(e,ia(r)),e.default=r=>yh(e,r),e.prefault=r=>$h(e,r),e.catch=r=>kh(e,r),e.pipe=r=>ci(e,r),e.readonly=()=>Eh(e),e.describe=r=>{const i=e.clone();return qt.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return qt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return qt.get(e);const i=e.clone();return qt.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ds=D("_ZodString",(e,t)=>{Yn.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($s(...i)),e.includes=(...i)=>e.check(ws(...i)),e.startsWith=(...i)=>e.check(ks(...i)),e.endsWith=(...i)=>e.check(Ss(...i)),e.min=(...i)=>e.check($n(...i)),e.max=(...i)=>e.check(_i(...i)),e.length=(...i)=>e.check(wi(...i)),e.nonempty=(...i)=>e.check($n(1,...i)),e.lowercase=i=>e.check(bs(i)),e.uppercase=i=>e.check(_s(i)),e.trim=()=>e.check(Ns()),e.normalize=(...i)=>e.check(Es(...i)),e.toLowerCase=()=>e.check(Os()),e.toUpperCase=()=>e.check(xs())}),ki=D("ZodString",(e,t)=>{Yn.init(e,t),Ds.init(e,t),e.email=r=>e.check(Xo(Us,r)),e.url=r=>e.check(ns(Cs,r)),e.jwt=r=>e.check(ys(Ys,r)),e.emoji=r=>e.check(rs(Bs,r)),e.guid=r=>e.check(ii(si,r)),e.uuid=r=>e.check(Yo(It,r)),e.uuidv4=r=>e.check(Qo(It,r)),e.uuidv6=r=>e.check(es(It,r)),e.uuidv7=r=>e.check(ts(It,r)),e.nanoid=r=>e.check(is(Rs,r)),e.guid=r=>e.check(ii(si,r)),e.cuid=r=>e.check(os(Fs,r)),e.cuid2=r=>e.check(ss(Ls,r)),e.ulid=r=>e.check(as(Zs,r)),e.base64=r=>e.check(ps(Ws,r)),e.base64url=r=>e.check(ms(Hs,r)),e.xid=r=>e.check(us(Ms,r)),e.ksuid=r=>e.check(cs(qs,r)),e.ipv4=r=>e.check(ls(Vs,r)),e.ipv6=r=>e.check(fs(Ks,r)),e.cidrv4=r=>e.check(ds(Js,r)),e.cidrv6=r=>e.check(hs(Gs,r)),e.e164=r=>e.check(gs(Xs,r)),e.datetime=r=>e.check(Ld(r)),e.date=r=>e.check(Zd(r)),e.time=r=>e.check(Md(r)),e.duration=r=>e.check(qd(r))});function q(e){return Yf(ki,e)}const Oe=D("ZodStringFormat",(e,t)=>{Ne.init(e,t),Ds.init(e,t)}),Us=D("ZodEmail",(e,t)=>{Kl.init(e,t),Oe.init(e,t)});function ly(e){return Xo(Us,e)}const si=D("ZodGUID",(e,t)=>{ql.init(e,t),Oe.init(e,t)});function fy(e){return ii(si,e)}const It=D("ZodUUID",(e,t)=>{Vl.init(e,t),Oe.init(e,t)});function dy(e){return Yo(It,e)}function hy(e){return Qo(It,e)}function py(e){return es(It,e)}function my(e){return ts(It,e)}const Cs=D("ZodURL",(e,t)=>{Jl.init(e,t),Oe.init(e,t)});function Hd(e){return ns(Cs,e)}const Bs=D("ZodEmoji",(e,t)=>{Gl.init(e,t),Oe.init(e,t)});function gy(e){return rs(Bs,e)}const Rs=D("ZodNanoID",(e,t)=>{Wl.init(e,t),Oe.init(e,t)});function yy(e){return is(Rs,e)}const Fs=D("ZodCUID",(e,t)=>{Hl.init(e,t),Oe.init(e,t)});function vy(e){return os(Fs,e)}const Ls=D("ZodCUID2",(e,t)=>{Xl.init(e,t),Oe.init(e,t)});function be(e){return ss(Ls,e)}const Zs=D("ZodULID",(e,t)=>{Yl.init(e,t),Oe.init(e,t)});function $y(e){return as(Zs,e)}const Ms=D("ZodXID",(e,t)=>{Ql.init(e,t),Oe.init(e,t)});function by(e){return us(Ms,e)}const qs=D("ZodKSUID",(e,t)=>{ef.init(e,t),Oe.init(e,t)});function _y(e){return cs(qs,e)}const Vs=D("ZodIPv4",(e,t)=>{sf.init(e,t),Oe.init(e,t)});function wy(e){return ls(Vs,e)}const Ks=D("ZodIPv6",(e,t)=>{af.init(e,t),Oe.init(e,t)});function ky(e){return fs(Ks,e)}const Js=D("ZodCIDRv4",(e,t)=>{uf.init(e,t),Oe.init(e,t)});function Sy(e){return ds(Js,e)}const Gs=D("ZodCIDRv6",(e,t)=>{cf.init(e,t),Oe.init(e,t)});function Iy(e){return hs(Gs,e)}const Ws=D("ZodBase64",(e,t)=>{lf.init(e,t),Oe.init(e,t)});function Ey(e){return ps(Ws,e)}const Hs=D("ZodBase64URL",(e,t)=>{df.init(e,t),Oe.init(e,t)});function Ny(e){return ms(Hs,e)}const Xs=D("ZodE164",(e,t)=>{hf.init(e,t),Oe.init(e,t)});function Oy(e){return gs(Xs,e)}const Ys=D("ZodJWT",(e,t)=>{mf.init(e,t),Oe.init(e,t)});function xy(e){return ys(Ys,e)}const Xd=D("ZodCustomStringFormat",(e,t)=>{gf.init(e,t),Oe.init(e,t)});function jy(e,t,r={}){return Cd(Xd,e,t,r)}const Si=D("ZodNumber",(e,t)=>{Zo.init(e,t),de.init(e,t),e.gt=(i,n)=>e.check(Wt(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(Gt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.int=i=>e.check($o(i)),e.safe=i=>e.check($o(i)),e.positive=i=>e.check(Wt(0,i)),e.nonnegative=i=>e.check(nt(0,i)),e.negative=i=>e.check(Gt(0,i)),e.nonpositive=i=>e.check(ht(0,i)),e.multipleOf=(i,n)=>e.check(qn(i,n)),e.step=(i,n)=>e.check(qn(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 Ke(e){return od(Si,e)}const Sn=D("ZodNumberFormat",(e,t)=>{yf.init(e,t),Si.init(e,t)});function $o(e){return ad(Sn,e)}function Ay(e){return ud(Sn,e)}function zy(e){return cd(Sn,e)}function Ty(e){return ld(Sn,e)}function Py(e){return fd(Sn,e)}const Ii=D("ZodBoolean",(e,t)=>{Mo.init(e,t),de.init(e,t)});function Ce(e){return dd(Ii,e)}const Ei=D("ZodBigInt",(e,t)=>{qo.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(Wt(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(Gt(i,n)),e.lte=(i,n)=>e.check(ht(i,n)),e.max=(i,n)=>e.check(ht(i,n)),e.positive=i=>e.check(Wt(BigInt(0),i)),e.negative=i=>e.check(Gt(BigInt(0),i)),e.nonpositive=i=>e.check(ht(BigInt(0),i)),e.nonnegative=i=>e.check(nt(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(qn(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Dy(e){return pd(Ei,e)}const Qs=D("ZodBigIntFormat",(e,t)=>{vf.init(e,t),Ei.init(e,t)});function Uy(e){return gd(Qs,e)}function Cy(e){return yd(Qs,e)}const Yd=D("ZodSymbol",(e,t)=>{$f.init(e,t),de.init(e,t)});function By(e){return vd(Yd,e)}const Qd=D("ZodUndefined",(e,t)=>{bf.init(e,t),de.init(e,t)});function Ry(e){return $d(Qd,e)}const eh=D("ZodNull",(e,t)=>{_f.init(e,t),de.init(e,t)});function th(e){return bd(eh,e)}const nh=D("ZodAny",(e,t)=>{wf.init(e,t),de.init(e,t)});function Fy(){return _d(nh)}const rh=D("ZodUnknown",(e,t)=>{ri.init(e,t),de.init(e,t)});function Ct(){return oi(rh)}const ih=D("ZodNever",(e,t)=>{kf.init(e,t),de.init(e,t)});function Ni(e){return wd(ih,e)}const oh=D("ZodVoid",(e,t)=>{Sf.init(e,t),de.init(e,t)});function Ly(e){return kd(oh,e)}const ea=D("ZodDate",(e,t)=>{If.init(e,t),de.init(e,t),e.min=(i,n)=>e.check(nt(i,n)),e.max=(i,n)=>e.check(ht(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 Sd(ea,e)}const sh=D("ZodArray",(e,t)=>{Vo.init(e,t),de.init(e,t),e.element=t.element,e.min=(r,i)=>e.check($n(r,i)),e.nonempty=r=>e.check($n(1,r)),e.max=(r,i)=>e.check(_i(r,i)),e.length=(r,i)=>e.check(wi(r,i)),e.unwrap=()=>e.element});function qe(e,t){return js(sh,e,t)}function Zy(e){const t=e._zod.def.shape;return ve(Object.keys(t))}const Oi=D("ZodObject",(e,t)=>{Ef.init(e,t),de.init(e,t),$e(e,"shape",()=>t.shape),e.keyof=()=>bt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ct()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ct()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ni()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Dc(e,r),e.merge=r=>Uc(e,r),e.pick=r=>Tc(e,r),e.omit=r=>Pc(e,r),e.partial=(...r)=>Cc(oa,e,r[0]),e.required=(...r)=>Bc(sa,e,r[0])});function H(e,t){const r={type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},...V(t)};return new Oi(r)}function My(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ni(),...V(t)})}function qy(e,t){return new Oi({type:"object",get shape(){return kn(this,"shape",{...e}),this.shape},catchall:Ct(),...V(t)})}const ta=D("ZodUnion",(e,t)=>{Ko.init(e,t),de.init(e,t),e.options=t.options});function xt(e,t){return new ta({type:"union",options:e,...V(t)})}const ah=D("ZodDiscriminatedUnion",(e,t)=>{ta.init(e,t),Nf.init(e,t)});function jt(e,t,r){return new ah({type:"union",options:t,discriminator:e,...V(r)})}const uh=D("ZodIntersection",(e,t)=>{Of.init(e,t),de.init(e,t)});function ch(e,t){return new uh({type:"intersection",left:e,right:t})}const lh=D("ZodTuple",(e,t)=>{$i.init(e,t),de.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Vy(e,t,r){const i=t instanceof ue,n=i?r:t,o=i?t:null;return new lh({type:"tuple",items:e,rest:o,...V(n)})}const na=D("ZodRecord",(e,t)=>{xf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ze(e,t,r){return new na({type:"record",keyType:e,valueType:t,...V(r)})}function Ky(e,t,r){return new na({type:"record",keyType:xt([e,Ni()]),valueType:t,...V(r)})}const fh=D("ZodMap",(e,t)=>{jf.init(e,t),de.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Jy(e,t,r){return new fh({type:"map",keyType:e,valueType:t,...V(r)})}const dh=D("ZodSet",(e,t)=>{Af.init(e,t),de.init(e,t),e.min=(...r)=>e.check(Vn(...r)),e.nonempty=r=>e.check(Vn(1,r)),e.max=(...r)=>e.check(bi(...r)),e.size=(...r)=>e.check(vs(...r))});function Gy(e,t){return new dh({type:"set",valueType:e,...V(t)})}const Kn=D("ZodEnum",(e,t)=>{zf.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 Kn({...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 Kn({...t,checks:[],...V(n),entries:o})}});function bt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Kn({type:"enum",entries:r,...V(t)})}function Wy(e,t){return new Kn({type:"enum",entries:e,...V(t)})}const hh=D("ZodLiteral",(e,t)=>{Tf.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 ve(e,t){return new hh({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}const ph=D("ZodFile",(e,t)=>{Pf.init(e,t),de.init(e,t),e.min=(r,i)=>e.check(Vn(r,i)),e.max=(r,i)=>e.check(bi(r,i)),e.mime=(r,i)=>e.check(Is(Array.isArray(r)?r:[r],i))});function Hy(e){return Td(ph,e)}const ra=D("ZodTransform",(e,t)=>{Jo.init(e,t),de.init(e,t),e._zod.parse=(r,i)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(yn(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),s.continue??(s.continue=!0),r.issues.push(yn(s))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function ia(e){return new ra({type:"transform",transform:e})}const oa=D("ZodOptional",(e,t)=>{Df.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ai(e){return new oa({type:"optional",innerType:e})}const mh=D("ZodNullable",(e,t)=>{Uf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ui(e){return new mh({type:"nullable",innerType:e})}function Xy(e){return ai(ui(e))}const gh=D("ZodDefault",(e,t)=>{Cf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function yh(e,t){return new gh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const vh=D("ZodPrefault",(e,t)=>{Bf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function $h(e,t){return new vh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const sa=D("ZodNonOptional",(e,t)=>{Rf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bh(e,t){return new sa({type:"nonoptional",innerType:e,...V(t)})}const _h=D("ZodSuccess",(e,t)=>{Ff.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yy(e){return new _h({type:"success",innerType:e})}const wh=D("ZodCatch",(e,t)=>{Lf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kh(e,t){return new wh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Sh=D("ZodNaN",(e,t)=>{Zf.init(e,t),de.init(e,t)});function Qy(e){return Ed(Sh,e)}const aa=D("ZodPipe",(e,t)=>{Go.init(e,t),de.init(e,t),e.in=t.in,e.out=t.out});function ci(e,t){return new aa({type:"pipe",in:e,out:t})}const Ih=D("ZodReadonly",(e,t)=>{Mf.init(e,t),de.init(e,t)});function Eh(e){return new Ih({type:"readonly",innerType:e})}const Nh=D("ZodTemplateLiteral",(e,t)=>{qf.init(e,t),de.init(e,t)});function Rn(e,t){return new Nh({type:"template_literal",parts:e,...V(t)})}const Oh=D("ZodLazy",(e,t)=>{Kf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.getter()});function xh(e){return new Oh({type:"lazy",getter:e})}const jh=D("ZodPromise",(e,t)=>{Vf.init(e,t),de.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ev(e){return new jh({type:"promise",innerType:e})}const xi=D("ZodCustom",(e,t)=>{Jf.init(e,t),de.init(e,t)});function Ah(e){const t=new Ue({check:"custom"});return t._zod.check=e,t}function bn(e,t){return Pd(xi,e??(()=>!0),t)}function zh(e,t={}){return Dd(xi,e,t)}function Th(e){const t=Ah(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(yn(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(yn(n))}},e(r.value,r)));return t}function Ph(e,t={error:`Input not instance of ${e.name}`}){const r=new xi({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...V(t)});return r._zod.bag.Class=e,r}const tv=(...e)=>Ud({Pipe:aa,Boolean:Ii,String:ki,Transform:ra},...e);function nv(e){const t=xh(()=>xt([q(e),Ke(),Ce(),th(),qe(t),Ze(q(),t)]));return t}function rv(e,t){return ci(ia(e),t)}const iv={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 ov(e){Xe({customError:e})}function sv(){return Xe().customError}var bo;bo||(bo={});function av(e){return Qf(ki,e)}function uv(e){return sd(Si,e)}function Dh(e){return hd(Ii,e)}function cv(e){return md(Ei,e)}function lv(e){return Id(ea,e)}var fv=Object.freeze({__proto__:null,bigint:cv,boolean:Dh,date:lv,number:uv,string:av});Xe(Gf());var Dt=Object.freeze({__proto__:null,$brand:Ic,$input:Xf,$output:Hf,NEVER:Sc,TimePrecision:ed,ZodAny:nh,ZodArray:sh,ZodBase64:Ws,ZodBase64URL:Hs,ZodBigInt:Ei,ZodBigIntFormat:Qs,ZodBoolean:Ii,ZodCIDRv4:Js,ZodCIDRv6:Gs,ZodCUID:Fs,ZodCUID2:Ls,ZodCatch:wh,ZodCustom:xi,ZodCustomStringFormat:Xd,ZodDate:ea,ZodDefault:gh,ZodDiscriminatedUnion:ah,ZodE164:Xs,ZodEmail:Us,ZodEmoji:Bs,ZodEnum:Kn,ZodError:cy,ZodFile:ph,get ZodFirstPartyTypeKind(){return bo},ZodGUID:si,ZodIPv4:Vs,ZodIPv6:Ks,ZodISODate:zs,ZodISODateTime:As,ZodISODuration:Ps,ZodISOTime:Ts,ZodIntersection:uh,ZodIssueCode:iv,ZodJWT:Ys,ZodKSUID:qs,ZodLazy:Oh,ZodLiteral:hh,ZodMap:fh,ZodNaN:Sh,ZodNanoID:Rs,ZodNever:ih,ZodNonOptional:sa,ZodNull:eh,ZodNullable:mh,ZodNumber:Si,ZodNumberFormat:Sn,ZodObject:Oi,ZodOptional:oa,ZodPipe:aa,ZodPrefault:vh,ZodPromise:jh,ZodReadonly:Ih,ZodRealError:Qn,ZodRecord:na,ZodSet:dh,ZodString:ki,ZodStringFormat:Oe,ZodSuccess:_h,ZodSymbol:Yd,ZodTemplateLiteral:Nh,ZodTransform:ra,ZodTuple:lh,ZodType:de,ZodULID:Zs,ZodURL:Cs,ZodUUID:It,ZodUndefined:Qd,ZodUnion:ta,ZodUnknown:rh,ZodVoid:oh,ZodXID:Ms,_ZodString:Ds,_default:yh,any:Fy,array:qe,base64:Ey,base64url:Ny,bigint:Dy,boolean:Ce,catch:kh,check:Ah,cidrv4:Sy,cidrv6:Iy,clone:$t,coerce:fv,config:Xe,core:ay,cuid:vy,cuid2:be,custom:bn,date:Ie,discriminatedUnion:jt,e164:Oy,email:ly,emoji:gy,endsWith:Ss,enum:bt,file:Hy,flattenError:zo,float32:Ay,float64:zy,formatError:To,function:Rd,getErrorMap:sv,globalRegistry:qt,gt:Wt,gte:nt,guid:fy,includes:ws,instanceof:Ph,int:$o,int32:Ty,int64:Uy,intersection:ch,ipv4:wy,ipv6:ky,iso:uy,json:nv,jwt:xy,keyof:Zy,ksuid:_y,lazy:xh,length:wi,literal:ve,locales:Wf,looseObject:qy,lowercase:bs,lt:Gt,lte:ht,map:Jy,maxLength:_i,maxSize:bi,mime:Is,minLength:$n,minSize:Vn,multipleOf:qn,nan:Qy,nanoid:yy,nativeEnum:Wy,negative:Od,never:Ni,nonnegative:jd,nonoptional:bh,nonpositive:xd,normalize:Es,null:th,nullable:ui,nullish:Xy,number:Ke,object:H,optional:ai,overwrite:Qt,parse:Kd,parseAsync:Jd,partialRecord:Ky,pipe:ci,positive:Nd,prefault:$h,preprocess:rv,prettifyError:Zc,promise:ev,property:Ad,readonly:Eh,record:Ze,refine:zh,regex:$s,regexes:wl,registry:Ho,safeParse:Gd,safeParseAsync:Wd,set:Gy,setErrorMap:ov,size:vs,startsWith:ks,strictObject:My,string:q,stringFormat:jy,stringbool:tv,success:Yy,superRefine:Th,symbol:By,templateLiteral:Rn,toJSONSchema:Fd,toLowerCase:Os,toUpperCase:xs,transform:ia,treeifyError:Fc,trim:Ns,tuple:Vy,uint32:Py,uint64:Cy,ulid:$y,undefined:Ry,union:xt,unknown:Ct,uppercase:_s,url:Hd,uuid:dy,uuidv4:hy,uuidv6:py,uuidv7:my,void:Ly,xid:by});function dv(e,t,r){let i=n=>e(n,...t);return r===void 0?i:Object.assign(i,{lazy:r,lazyArgs:t})}function Uh(e,t,r){let i=e.length-t.length;if(i===0)return e(...t);if(i===1)return dv(e,t,r);throw new Error("Wrong number of arguments")}var Ch={done:!1,hasNext:!1};function qa(e,...t){let r=e,i=t.map(o=>"lazy"in o?hv(o):void 0),n=0;for(;n<t.length;){if(i[n]===void 0||!pv(r)){let c=t[n];r=c(r),n+=1;continue}let o=[];for(let c=n;c<t.length;c++){let d=i[c];if(d===void 0||(o.push(d),d.isSingle))break}let s=[];for(let c of r)if(Bh(c,s,o))break;let{isSingle:a}=o.at(-1);r=a?s[0]:s,n+=o.length}return r}function Bh(e,t,r){if(r.length===0)return t.push(e),!1;let i=e,n=Ch,o=!1;for(let[s,a]of r.entries()){let{index:c,items:d}=a;if(d.push(i),n=a(i,c,d),a.index+=1,n.hasNext){if(n.hasMany??!1){for(let u of n.next)if(Bh(u,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 hv(e){let{lazy:t,lazyArgs:r}=e,i=t(...r);return Object.assign(i,{isSingle:t.single??!1,index:0,items:[]})}function pv(e){return typeof e=="string"||typeof e=="object"&&e!==null&&Symbol.iterator in e}function mv(e,t){let r=t.length-e.length;if(r===1){let[i,...n]=t;return qa(i,{lazy:e,lazyArgs:n})}if(r===0){let i={lazy:e,lazyArgs:t};return Object.assign(n=>qa(n,i),i)}throw new Error("Wrong number of arguments")}function gv(...e){return mv(yv,e)}function yv(){let e=new Set;return t=>e.has(t)?Ch:(e.add(t),{done:!1,hasNext:!0,next:t})}function vv(...e){return Uh($v,e)}function $v(e,t){let r={};for(let[i,n]of Object.entries(e)){let o=t(n,i,e);r[i]=o}return r}function bv(...e){return Uh(Object.fromEntries,e)}const ua=Symbol.for("yaml.alias"),_o=Symbol.for("yaml.document"),Ut=Symbol.for("yaml.map"),Rh=Symbol.for("yaml.pair"),vt=Symbol.for("yaml.scalar"),In=Symbol.for("yaml.seq"),at=Symbol.for("yaml.node.type"),en=e=>!!e&&typeof e=="object"&&e[at]===ua,ji=e=>!!e&&typeof e=="object"&&e[at]===_o,er=e=>!!e&&typeof e=="object"&&e[at]===Ut,De=e=>!!e&&typeof e=="object"&&e[at]===Rh,Ee=e=>!!e&&typeof e=="object"&&e[at]===vt,tr=e=>!!e&&typeof e=="object"&&e[at]===In;function Te(e){if(e&&typeof e=="object")switch(e[at]){case Ut:case In:return!0}return!1}function Pe(e){if(e&&typeof e=="object")switch(e[at]){case ua:case Ut:case vt:case In:return!0}return!1}const Fh=e=>(Ee(e)||Te(e))&&!!e.anchor,Mt=Symbol("break visit"),_v=Symbol("skip children"),Fn=Symbol("remove node");function En(e,t){const r=wv(t);ji(e)?cn(null,e.contents,r,Object.freeze([e]))===Fn&&(e.contents=null):cn(null,e,r,Object.freeze([]))}En.BREAK=Mt;En.SKIP=_v;En.REMOVE=Fn;function cn(e,t,r,i){const n=kv(e,t,r,i);if(Pe(n)||De(n))return Sv(e,i,n),cn(e,n,r,i);if(typeof n!="symbol"){if(Te(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===Mt)return Mt;s===Fn&&(t.items.splice(o,1),o-=1)}}}else if(De(t)){i=Object.freeze(i.concat(t));const o=cn("key",t.key,r,i);if(o===Mt)return Mt;o===Fn&&(t.key=null);const s=cn("value",t.value,r,i);if(s===Mt)return Mt;s===Fn&&(t.value=null)}}return n}function wv(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 kv(e,t,r,i){if(typeof r=="function")return r(e,t,i);if(er(t))return r.Map?.(e,t,i);if(tr(t))return r.Seq?.(e,t,i);if(De(t))return r.Pair?.(e,t,i);if(Ee(t))return r.Scalar?.(e,t,i);if(en(t))return r.Alias?.(e,t,i)}function Sv(e,t,r){const i=t[t.length-1];if(Te(i))i.items[e]=r;else if(De(i))e==="key"?i.key=r:i.value=r;else if(ji(i))i.contents=r;else{const n=en(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}const Iv={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ev=e=>e.replace(/[!,[\]{}]/g,t=>Iv[t]);class We{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},We.defaultYaml,t),this.tags=Object.assign({},We.defaultTags,r)}clone(){const t=new We(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new We(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:We.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},We.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:We.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},We.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+Ev(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&&Pe(t.contents)){const o={};En(t.contents,(s,a)=>{Pe(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(`
30
30
  `)}}We.defaultYaml={explicit:!1,version:"1.2"};We.defaultTags={"!!":"tag:yaml.org,2002:"};function Lh(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 Zh(e){const t=new Set;return En(e,{Value(r,i){i.anchor&&t.add(i.anchor)}}),t}function Mh(e,t){for(let r=1;;++r){const i=`${e}${r}`;if(!t.has(i))return i}}function Nv(e,t){const r=[],i=new Map;let n=null;return{onAnchor:o=>{r.push(o),n??(n=Zh(e));const s=Mh(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)||Te(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 st(e,t,r){if(Array.isArray(e))return e.map((i,n)=>st(i,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!Fh(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 ca{constructor(t){Object.defineProperty(this,at,{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(!ji(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=st(this,"",s);if(typeof n=="function")for(const{count:c,res:d}of s.anchors.values())n(d,c);return typeof o=="function"?ln(o,{"":a},"",a):a}}class la extends ca{constructor(t){super(ua),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=[],En(t,{Node:(o,s)=>{(en(s)||Fh(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 c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=i.get(s);if(a||(st(s,null,r),a=i.get(s)),!a||a.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Xr(n,s,i)),a.count*a.aliasCount>o)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(t,r,i){const n=`*${this.source}`;if(t){if(Lh(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 Xr(e,t,r){if(en(t)){const i=t.resolve(e),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(Te(t)){let i=0;for(const n of t.items){const o=Xr(e,n,r);o>i&&(i=o)}return i}else if(De(t)){const i=Xr(e,t.key,r),n=Xr(e,t.value,r);return Math.max(i,n)}return 1}const qh=e=>!e||typeof e!="function"&&typeof e!="object";class le extends ca{constructor(t){super(vt),this.value=t}toJSON(t,r){return r?.keep?this.value:st(this.value,t,r)}toString(){return String(this.value)}}le.BLOCK_FOLDED="BLOCK_FOLDED";le.BLOCK_LITERAL="BLOCK_LITERAL";le.PLAIN="PLAIN";le.QUOTE_DOUBLE="QUOTE_DOUBLE";le.QUOTE_SINGLE="QUOTE_SINGLE";const Ov="tag:yaml.org,2002:";function xv(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 Jn(e,t,r){if(ji(e)&&(e=e.contents),Pe(e))return e;if(De(e)){const h=r.schema[Ut].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 c;if(i&&e&&typeof e=="object"){if(c=a.get(e),c)return c.anchor??(c.anchor=n(e)),new la(c.anchor);c={anchor:null,node:null},a.set(e,c)}t?.startsWith("!!")&&(t=Ov+t.slice(2));let d=xv(e,t,s.tags);if(!d){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const h=new le(e);return c&&(c.node=h),h}d=e instanceof Map?s[Ut]:Symbol.iterator in Object(e)?s[In]:s[Ut]}o&&(o(d),delete r.onTagObj);const u=d?.createNode?d.createNode(r.schema,e,r):typeof d?.nodeClass?.from=="function"?d.nodeClass.from(r.schema,e,r):new le(e);return t?u.tag=t:d.default||(u.tag=d.tag),c&&(c.node=u),u}function li(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 Jn(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 Cn=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Vh extends ca{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=>Pe(i)||De(i)?i.clone(t):i),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(Cn(t))this.add(r);else{const[i,...n]=t,o=this.get(i,!0);if(Te(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,li(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(Te(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:Te(o)?o.getIn(n,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!De(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 Te(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(Te(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,li(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}}const jv=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Et(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Vt=(e,t,r)=>e.endsWith(`
31
31
  `)?Et(r,t):r.includes(`
32
32
  `)?`
33
- `+Et(r,t):(e.endsWith(" ")?"":" ")+r,Kh="flow",wo="block",Yr="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 c=Math.max(1+o,1+n-t.length);if(e.length<=c)return e;const d=[],u={};let h=n-t.length;typeof i=="number"&&(i>n-Math.max(2,o)?d.push(0):h=n-i);let y,_,b=!1,g=-1,m=-1,$=-1;r===wo&&(g=Va(e,g,t.length),g!==-1&&(h=g+c));for(let v;v=e[g+=1];){if(r===Yr&&v==="\\"){switch(m=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}$=g}if(v===`
33
+ `+Et(r,t):(e.endsWith(" ")?"":" ")+r,Kh="flow",wo="block",Yr="quoted";function Ai(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 c=Math.max(1+o,1+n-t.length);if(e.length<=c)return e;const d=[],u={};let h=n-t.length;typeof i=="number"&&(i>n-Math.max(2,o)?d.push(0):h=n-i);let y,_,b=!1,g=-1,m=-1,$=-1;r===wo&&(g=Va(e,g,t.length),g!==-1&&(h=g+c));for(let v;v=e[g+=1];){if(r===Yr&&v==="\\"){switch(m=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}$=g}if(v===`
34
34
  `)r===wo&&(g=Va(e,g,t.length)),h=g+t.length+c,y=void 0;else{if(v===" "&&_&&_!==" "&&_!==`
35
35
  `&&_!==" "){const S=e[g+1];S&&S!==" "&&S!==`
36
36
  `&&S!==" "&&(y=g)}if(g>=h)if(y)d.push(y),h=y+c,y=void 0;else if(r===Yr){for(;_===" "||_===" ";)_=v,v=e[g+=1],b=!0;const S=g>$+1?g-2:m-1;if(u[S])return e;d.push(S),u[S]=!0,h=S+c,y=void 0}else b=!0}_=v}if(b&&a&&a(),d.length===0)return e;s&&s();let f=e.slice(0,d[0]);for(let v=0;v<d.length;++v){const S=d[v],E=d[v+1]||e.length;S===0?f=`
37
37
  ${t}${e.slice(0,E)}`:(r===Yr&&u[S]&&(f+=`${e[S]}\\`),f+=`
38
38
  ${t}${e.slice(S+1,E)}`)}return f}function Va(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!==`
39
- `);i=t,n=t+1,o=e[n]}return i}const Ai=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ti=e=>/^(%|---|\.\.\.)/m.test(e);function zv(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]===`
39
+ `);i=t,n=t+1,o=e[n]}return i}const zi=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ti=e=>/^(%|---|\.\.\.)/m.test(e);function Av(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]===`
40
40
  `){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||(Ti(e)?" ":"");let s="",a=0;for(let c=0,d=r[c];d;d=r[++c])if(d===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(s+=r.slice(a,c)+"\\ ",c+=1,a=c,d="\\"),d==="\\")switch(r[c+1]){case"u":{s+=r.slice(a,c);const u=r.substr(c+2,4);switch(u){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:u.substr(0,2)==="00"?s+="\\x"+u.substr(2):s+=r.substr(c,6)}c+=5,a=c+1}break;case"n":if(i||r[c+2]==='"'||r.length<n)c+=1;else{for(s+=r.slice(a,c)+`
41
41
 
42
42
  `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)s+=`
43
- `,c+=2;s+=o,r[c+2]===" "&&(s+="\\"),c+=1,a=c+1}break;default:c+=1}return s=a?s+r.slice(a):r,i?s:zi(s,o,Yr,Ai(t,!1))}function ko(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
43
+ `,c+=2;s+=o,r[c+2]===" "&&(s+="\\"),c+=1,a=c+1}break;default:c+=1}return s=a?s+r.slice(a):r,i?s:Ai(s,o,Yr,zi(t,!1))}function ko(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
44
44
  `)||/[ \t]\n|\n[ \t]/.test(e))return Ln(e,t);const r=t.indent||(Ti(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
45
- ${r}`)+"'";return t.implicitKey?i:zi(i,r,Kh,Ai(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=ko:o&&!n?i=Ln:i=r?ko:Ln}return i(e,t)}let So;try{So=new RegExp(`(^|(?<!
45
+ ${r}`)+"'";return t.implicitKey?i:Ai(i,r,Kh,zi(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=ko:o&&!n?i=Ln:i=r?ko:Ln}return i(e,t)}let So;try{So=new RegExp(`(^|(?<!
46
46
  ))
47
47
  +(?!
48
- |$)`,"g")}catch{So=/\n+(?!\n|$)/g}function Qr({comment:e,type:t,value:r},i,n,o){const{blockQuote:s,commentString:a,lineWidth:c}=i.options;if(!s||/\n[\t ]+$/.test(r))return fn(r,i);const d=i.indent||(i.forceBlockIndent||Ti(r)?" ":""),u=s==="literal"?!0:s==="folded"||t===le.BLOCK_FOLDED?!1:t===le.BLOCK_LITERAL?!0:!zv(r,c,d.length);if(!r)return u?`|
48
+ |$)`,"g")}catch{So=/\n+(?!\n|$)/g}function Qr({comment:e,type:t,value:r},i,n,o){const{blockQuote:s,commentString:a,lineWidth:c}=i.options;if(!s||/\n[\t ]+$/.test(r))return fn(r,i);const d=i.indent||(i.forceBlockIndent||Ti(r)?" ":""),u=s==="literal"?!0:s==="folded"||t===le.BLOCK_FOLDED?!1:t===le.BLOCK_LITERAL?!0:!Av(r,c,d.length);if(!r)return u?`|
49
49
  `:`>
50
50
  `;let h,y;for(y=r.length;y>0;--y){const E=r[y-1];if(E!==`
51
51
  `&&E!==" "&&E!==" ")break}let _=r.substring(y);const b=_.indexOf(`
52
52
  `);b===-1?h="-":r===_||b!==_.length-1?(h="+",o&&o()):h="",_&&(r=r.slice(0,-_.length),_[_.length-1]===`
53
53
  `&&(_=_.slice(0,-1)),_=_.replace(So,`$&${d}`));let g=!1,m,$=-1;for(m=0;m<r.length;++m){const E=r[m];if(E===" ")g=!0;else if(E===`
54
54
  `)$=m;else break}let f=r.substring(0,$<m?$+1:m);f&&(r=r.substring(f.length),f=f.replace(/\n+/g,`$&${d}`));let S=(g?d?"2":"1":"")+h;if(e&&(S+=" "+a(e.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){const E=r.replace(/\n+/g,`
55
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let I=!1;const O=Ai(i,!0);s!=="folded"&&t!==le.BLOCK_FOLDED&&(O.onOverflow=()=>{I=!0});const j=zi(`${f}${E}${_}`,d,wo,O);if(!I)return`>${S}
55
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let I=!1;const O=zi(i,!0);s!=="folded"&&t!==le.BLOCK_FOLDED&&(O.onOverflow=()=>{I=!0});const j=Ai(`${f}${E}${_}`,d,wo,O);if(!I)return`>${S}
56
56
  ${d}${j}`}return r=r.replace(/\n+/g,`$&${d}`),`|${S}
57
- ${d}${f}${r}${_}`}function Av(e,t,r,i){const{type:n,value:o}=e,{actualString:s,implicitKey:a,indent:c,indentStep:d,inFlow:u}=t;if(a&&o.includes(`
57
+ ${d}${f}${r}${_}`}function zv(e,t,r,i){const{type:n,value:o}=e,{actualString:s,implicitKey:a,indent:c,indentStep:d,inFlow:u}=t;if(a&&o.includes(`
58
58
  `)||u&&/[[\]{},]/.test(o))return fn(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes(`
59
59
  `)?fn(o,t):Qr(e,t,r,i);if(!a&&!u&&n!==le.PLAIN&&o.includes(`
60
60
  `))return Qr(e,t,r,i);if(Ti(o)){if(c==="")return t.forceBlockIndent=!0,Qr(e,t,r,i);if(a&&c===d)return fn(o,t)}const h=o.replace(/\n+/g,`$&
61
- ${c}`);if(s){const y=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(h),{compat:_,tags:b}=t.doc.schema;if(b.some(y)||_?.some(y))return fn(o,t)}return a?h:zi(h,c,Kh,Ai(t,!1))}function fa(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!==le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=le.QUOTE_DOUBLE);const c=u=>{switch(u){case le.BLOCK_FOLDED:case le.BLOCK_LITERAL:return n||o?fn(s.value,t):Qr(s,t,r,i);case le.QUOTE_DOUBLE:return Ln(s.value,t);case le.QUOTE_SINGLE:return ko(s.value,t);case le.PLAIN:return Av(s,t,r,i);default:return null}};let d=c(a);if(d===null){const{defaultKeyType:u,defaultStringType:h}=t.options,y=n&&u||h;if(d=c(y),d===null)throw new Error(`Unsupported default string type ${y}`)}return d}function Jh(e,t){const r=Object.assign({blockQuote:!0,commentString:jv,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 Tv(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 Pv(e,t,{anchors:r,doc:i}){if(!i.directives)return"";const n=[],o=(Ee(e)||Te(e))&&e.anchor;o&&Lh(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(De(e))return e.toString(t,r,i);if(en(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=Pe(e)?e:t.doc.createNode(e,{onTagObj:c=>n=c});n??(n=Tv(t.doc.schema.tags,o));const s=Pv(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)?fa(o,t,r,i):o.toString(t,r,i);return s?Ee(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
61
+ ${c}`);if(s){const y=g=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(h),{compat:_,tags:b}=t.doc.schema;if(b.some(y)||_?.some(y))return fn(o,t)}return a?h:Ai(h,c,Kh,zi(t,!1))}function fa(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!==le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=le.QUOTE_DOUBLE);const c=u=>{switch(u){case le.BLOCK_FOLDED:case le.BLOCK_LITERAL:return n||o?fn(s.value,t):Qr(s,t,r,i);case le.QUOTE_DOUBLE:return Ln(s.value,t);case le.QUOTE_SINGLE:return ko(s.value,t);case le.PLAIN:return zv(s,t,r,i);default:return null}};let d=c(a);if(d===null){const{defaultKeyType:u,defaultStringType:h}=t.options,y=n&&u||h;if(d=c(y),d===null)throw new Error(`Unsupported default string type ${y}`)}return d}function Jh(e,t){const r=Object.assign({blockQuote:!0,commentString:jv,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 Tv(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 Pv(e,t,{anchors:r,doc:i}){if(!i.directives)return"";const n=[],o=(Ee(e)||Te(e))&&e.anchor;o&&Lh(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(De(e))return e.toString(t,r,i);if(en(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=Pe(e)?e:t.doc.createNode(e,{onTagObj:c=>n=c});n??(n=Tv(t.doc.schema.tags,o));const s=Pv(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)?fa(o,t,r,i):o.toString(t,r,i);return s?Ee(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
62
62
  ${t.indent}${a}`:a}function Dv({key:e,value:t},r,i,n){const{allNullValues:o,doc:s,indent:a,indentStep:c,options:{commentString:d,indentSeq:u,simpleKeys:h}}=r;let y=Pe(e)&&e.comment||null;if(h){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(Te(e)||!Pe(e)&&typeof e=="object"){const O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let _=!h&&(!e||y&&t==null&&!r.inFlow||Te(e)||(Ee(e)?e.type===le.BLOCK_FOLDED||e.type===le.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!_&&(h||!o),indent:a+c});let b=!1,g=!1,m=_n(e,r,()=>b=!0,()=>g=!0);if(!_&&!r.inFlow&&m.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(r.inFlow){if(o||t==null)return b&&i&&i(),m===""?"?":_?`? ${m}`:m}else if(o&&!h||t==null&&_)return m=`? ${m}`,y&&!b?m+=Vt(m,r.indent,d(y)):g&&n&&n(),m;b&&(y=null),_?(y&&(m+=Vt(m,r.indent,d(y))),m=`? ${m}
63
63
  ${a}:`):(m=`${m}:`,y&&(m+=Vt(m,r.indent,d(y))));let $,f,v;Pe(t)?($=!!t.spaceBefore,f=t.commentBefore,v=t.comment):($=!1,f=null,v=null,t&&typeof t=="object"&&(t=s.createNode(t))),r.implicitKey=!1,!_&&!y&&Ee(t)&&(r.indentAtStart=m.length+1),g=!1,!u&&c.length>=2&&!r.inFlow&&!_&&tr(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let S=!1;const E=_n(t,r,()=>S=!0,()=>g=!0);let I=" ";if(y||$||f){if(I=$?`
64
64
  `:"",f){const O=d(f);I+=`
@@ -124,14 +124,14 @@ ${d}
124
124
  `);)i===`
125
125
  `&&(r+=`
126
126
  `),t+=1,i=e[t+1];return r||(r=" "),{fold:r,offset:t}}const h0={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
127
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function p0(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 gp(e,t,r,i){const{value:n,type:o,comment:s,range:a}=t.type==="block-scalar"?o0(e,t,i):u0(t,e.options.strict,i),c=r?e.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null;let d;e.options.stringKeys&&e.atKey?d=e.schema[vt]:c?d=m0(e.schema,n,c,r,i):t.type==="scalar"?d=g0(e,n,t,i):d=e.schema[vt];let u;try{const h=d.resolve(n,y=>i(r??t,"TAG_RESOLVE_FAILED",y),e.options);u=Ee(h)?h:new le(h)}catch(h){const y=h instanceof Error?h.message:String(h);i(r??t,"TAG_RESOLVE_FAILED",y),u=new le(n)}return u.range=a,u.source=n,o&&(u.type=o),c&&(u.tag=c),d.format&&(u.format=d.format),s&&(u.comment=s),u}function m0(e,t,r,i,n){if(r==="!")return e[vt];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[vt])}function g0({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[vt];if(r.compat){const a=r.compat.find(c=>c.default&&c.test?.test(i))??r[vt];if(s.tag!==a.tag){const c=t.tagString(s.tag),d=t.tagString(a.tag),u=`Value may be parsed as either ${c} or ${d}`;o(n,"TAG_RESOLVE_FAILED",u,!0)}}return s}function y0(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 v0={composeNode:yp,composeEmptyNode:wa};function yp(e,t,r,i){const n=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r;let d,u=!0;switch(t.type){case"alias":d=$0(e,t,i),(a||c)&&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":d=gp(e,t,c,i),a&&(d.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":d=i0(v0,e,t,r,i),a&&(d.anchor=a.source.substring(1));break;default:{const h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",h),d=wa(e,t.offset,void 0,null,r,i),u=!1}}return a&&d.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!Ee(d)||typeof d.value!="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str")&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(d.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?d.comment=s:d.commentBefore=s),e.options.keepSourceTokens&&u&&(d.srcToken=t),d}function wa(e,t,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:c},d){const u={type:"scalar",offset:y0(t,r,i),indent:-1,source:""},h=gp(e,u,a,d);return s&&(h.anchor=s.source.substring(1),h.anchor===""&&d(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(h.spaceBefore=!0),o&&(h.comment=o,h.range[2]=c),h}function $0({options:e},{offset:t,source:r,end:i},n){const o=new la(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=rr(i,s,e.strict,n);return o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment),o}function b0(e,t,{offset:r,start:i,value:n,end:o},s){const a=Object.assign({_directives:t},e),c=new Ri(void 0,a),d={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=wn(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?yp(d,n,u,s):wa(d,u.end,i,null,u,s);const h=c.contents.range[2],y=rr(o,h,!1,s);return y.comment&&(c.comment=y.comment),c.range=[r,h,y.offset],c}function zn(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 Ya(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?`
127
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function p0(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 gp(e,t,r,i){const{value:n,type:o,comment:s,range:a}=t.type==="block-scalar"?o0(e,t,i):u0(t,e.options.strict,i),c=r?e.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null;let d;e.options.stringKeys&&e.atKey?d=e.schema[vt]:c?d=m0(e.schema,n,c,r,i):t.type==="scalar"?d=g0(e,n,t,i):d=e.schema[vt];let u;try{const h=d.resolve(n,y=>i(r??t,"TAG_RESOLVE_FAILED",y),e.options);u=Ee(h)?h:new le(h)}catch(h){const y=h instanceof Error?h.message:String(h);i(r??t,"TAG_RESOLVE_FAILED",y),u=new le(n)}return u.range=a,u.source=n,o&&(u.type=o),c&&(u.tag=c),d.format&&(u.format=d.format),s&&(u.comment=s),u}function m0(e,t,r,i,n){if(r==="!")return e[vt];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[vt])}function g0({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[vt];if(r.compat){const a=r.compat.find(c=>c.default&&c.test?.test(i))??r[vt];if(s.tag!==a.tag){const c=t.tagString(s.tag),d=t.tagString(a.tag),u=`Value may be parsed as either ${c} or ${d}`;o(n,"TAG_RESOLVE_FAILED",u,!0)}}return s}function y0(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 v0={composeNode:yp,composeEmptyNode:wa};function yp(e,t,r,i){const n=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:c}=r;let d,u=!0;switch(t.type){case"alias":d=$0(e,t,i),(a||c)&&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":d=gp(e,t,c,i),a&&(d.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":d=i0(v0,e,t,r,i),a&&(d.anchor=a.source.substring(1));break;default:{const h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",h),d=wa(e,t.offset,void 0,null,r,i),u=!1}}return a&&d.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!Ee(d)||typeof d.value!="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str")&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(d.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?d.comment=s:d.commentBefore=s),e.options.keepSourceTokens&&u&&(d.srcToken=t),d}function wa(e,t,r,i,{spaceBefore:n,comment:o,anchor:s,tag:a,end:c},d){const u={type:"scalar",offset:y0(t,r,i),indent:-1,source:""},h=gp(e,u,a,d);return s&&(h.anchor=s.source.substring(1),h.anchor===""&&d(s,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(h.spaceBefore=!0),o&&(h.comment=o,h.range[2]=c),h}function $0({options:e},{offset:t,source:r,end:i},n){const o=new la(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=rr(i,s,e.strict,n);return o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment),o}function b0(e,t,{offset:r,start:i,value:n,end:o},s){const a=Object.assign({_directives:t},e),c=new Ri(void 0,a),d={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=wn(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?yp(d,n,u,s):wa(d,u.end,i,null,u,s);const h=c.contents.range[2],y=rr(o,h,!1,s);return y.comment&&(c.comment=y.comment),c.range=[r,h,y.offset],c}function An(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 Ya(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?`
128
128
 
129
129
  `:`
130
- `)+(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 _0{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{const s=zn(r);o?this.warnings.push(new e0(s,i,n)):this.errors.push(new Bn(s,i,n))},this.directives=new We({version:t.version||"1.2"}),this.options=t}decorate(t,r){const{comment:i,afterEmptyLine:n}=Ya(this.prelude);if(i){const o=t.contents;if(r)t.comment=t.comment?`${t.comment}
130
+ `)+(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 _0{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{const s=An(r);o?this.warnings.push(new e0(s,i,n)):this.errors.push(new Bn(s,i,n))},this.directives=new We({version:t.version||"1.2"}),this.options=t}decorate(t,r){const{comment:i,afterEmptyLine:n}=Ya(this.prelude);if(i){const o=t.contents;if(r)t.comment=t.comment?`${t.comment}
131
131
  ${i}`:i;else if(n||t.directives.docStart||!o)t.commentBefore=i;else if(Te(o)&&!o.flow&&o.items.length>0){let s=o.items[0];De(s)&&(s=s.key);const a=s.commentBefore;s.commentBefore=a?`${i}
132
132
  ${a}`:i}else{const s=o.commentBefore;o.commentBefore=s?`${i}
133
- ${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:Ya(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=zn(t);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const r=b0(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 Bn(zn(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 Bn(zn(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const r=rr(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}
134
- ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Bn(zn(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 Ri(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 vp="\uFEFF",$p="",bp="",Eo="";function w0(e){switch(e){case vp:return"byte-order-mark";case $p:return"doc-mode";case bp:return"flow-error-end";case Eo:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
133
+ ${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:Ya(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=An(t);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const r=b0(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 Bn(An(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 Bn(An(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const r=rr(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}
134
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Bn(An(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 Ri(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 vp="\uFEFF",$p="",bp="",Eo="";function w0(e){switch(e){case vp:return"byte-order-mark";case $p:return"doc-mode";case bp:return"flow-error-end";case Eo:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
135
135
  `:case`\r
136
136
  `: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 lt(e){switch(e){case void 0:case" ":case`
137
137
  `:case"\r":case" ":return!0;default:return!1}}const Qa=new Set("0123456789ABCDEFabcdef"),k0=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),lr=new Set(",[]{}"),S0=new Set(` ,[]{}
@@ -156,20 +156,20 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
156
156
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
157
157
  `,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 c=r.sep[a];switch(c.type){case"newline":s.push(a);break;case"space":break;case"comment":c.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(Pt(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(_p(r.key)&&!Pt(r.sep,"newline")){const s=nn(r.start),a=r.key,c=r.sep;c.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:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(Pt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const s=nn(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]}):Pt(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&&!Pt(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||Pt(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=fr(i),o=nn(n);tu(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(`
158
158
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
159
- `,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=fr(t),i=nn(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=fr(t),i=nn(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 O0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new E0||null,prettyErrors:t}}function x0(e,t={}){const{lineCounter:r,prettyErrors:i}=O0(t),n=new N0(r?.addNewLine),o=new _0(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 Bn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(Ha(e,r)),s.warnings.forEach(Ha(e,r))),s}function j0(e,t,r){let i;const n=x0(e,r);if(!n)return null;if(n.warnings.forEach(o=>Gh(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 Ye=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()}),ut=Ye.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),wp=Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),xn=Ye.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),z0=H({createdAt:Ie(),updatedAt:Ie()}),dt=q().regex(/^[a-z][a-z0-9-_.]+$/).min(2).max(64),Fi=xt([Rn([dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)])]),Yi=q().regex(/^[a-z][a-zA-Z0-9]+$/).min(2).max(64);H({type:Fi,schema:bn(),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:Ke()});var A0=Symbol("runtimeSchema"),kp=bt(["composite","unit"]),Sp=H({schema:bn(),[A0]:Ph(de).optional(),required:Ce(),meta:Ye.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),nu=H({type:Fi,required:Ce(),multiple:Ce(),meta:Ye.required({title:!0}).pick({title:!0,description:!0})}),T0=H({type:dt,kind:kp,args:Ze(Yi,Sp),inputs:Ze(Yi,nu),outputs:Ze(Yi,nu),meta:Ye.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:Ke()}),Ip=H({x:Ke(),y:Ke()}),Ot=Rn([Fi,":",dt]),mn=H({instanceId:Ot,output:q()}),No=H({hubId:q()}),P0=H({args:Ze(q(),Ct()).optional(),inputs:Ze(q(),qe(mn)).optional(),hubInputs:Ze(q(),qe(No)).optional(),injectionInputs:qe(No).optional(),position:Ip.optional()}),Qi=H({id:Ot,kind:kp,type:Fi,name:dt,...P0.shape,resolvedInputs:Ze(q(),qe(mn)).optional(),parentId:Ot.optional(),outputs:Ze(q(),qe(mn)).optional(),resolvedOutputs:Ze(q(),qe(mn)).optional()}),D0=H({position:Ip.optional(),inputs:qe(mn).optional(),injectionInputs:qe(No).optional()}),U0=H({id:be(),...D0.shape}),C0=H({"c857cac5-caa6-4421-b82c-e561fbce6367":ve(!0),value:q()}),B0=H({name:q(),contentType:q().optional(),size:Ke().optional(),mode:Ke().optional()}),R0=H({"d55c63ac-3174-4756-808f-f778e99af0d1":ve(!0),hash:q(),meta:ut.optional()}),F0=xt([H({type:ve("embedded"),isBinary:Ce().optional(),value:q()}),H({type:ve("artifact"),...R0.shape})]),Ep=H({meta:B0,content:F0}),L0=xt([q(),Ke(),Ce(),q().array()]);H({name:q(),meta:Ye.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:q().optional(),value:L0.optional()});var Z0=Sp.extend({readonly:Dt.boolean(),computed:Dt.boolean()}),M0=Dt.object({package:Dt.string(),path:Dt.string().optional()});Dt.object({...T0.shape,source:M0,secrets:Dt.record(Dt.string(),Z0)});function ka(e){return"source"in e}var Np=H({image:q(),command:q().array(),cwd:q().optional(),env:Ze(q(),q()).optional(),files:Ze(q(),Ep).optional()});H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Np});var Op=xt([H({type:ve("markdown"),content:q()}),H({type:ve("qr"),content:q(),showContent:Dh(),language:q().optional()}),H({type:ve("file"),file:Ep})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:Op.array()});var q0=xt([H({type:ve("before-destroy")})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:q0});var V0=H({name:q()});H({name:q(),image:q(),params:Ze(q(),Ct())});H({projectId:be(),workerVersionId:be(),apiUrl:Hd(),apiKey:q()});H({instanceId:q(),args:Ze(q(),Ct()),inputs:Ze(q(),mn.array()),invokedTriggers:V0.array(),secretNames:q().array(),stateIdMap:Ze(Ot,q())});var ru=new WeakMap;function K0(e){const t=C0.safeParse(e);if(!t.success)return e;const r=ru.get(e);if(r!==void 0)return r;const i=j0(t.data.value);return ru.set(e,i),i}jt("type",[H({type:ve("host")})]);const J0={id:"q8xbilhwpsn65zjlv5kz44qh"},G0={id:"n0rfvpl9o77iqf29ff4kk5gf"},W0={id:"pmn9y901jeiz2ydh93045l39"},H0={id:"qppfcerovu3h22o0x8rlpc3g"};jt("type",[H({type:ve("codebase")}),H({type:ve("database")})]);H({name:dt,spaceId:be().default(J0.id),modelStorageId:be().default(H0.id),libraryId:be().default(G0.id),pulumiBackendId:be().default(W0.id),meta:ut});H({id:q(),name:dt,meta:ut,spaceId:be(),modelStorageId:be(),libraryId:be(),pulumiBackendId:be(),...z0.shape});const X0=H({encryptedIdentities:qe(q()),hasPasskey:Ce()});jt("type",[H({type:ve("locked"),unlockSuite:X0.optional()}),H({type:ve("unlocked")})]);jt("type",[H({type:ve("host")})]);const Y0=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:Y0,recipient:q()});const Q0=H({key:q(),order:bt(["asc","desc"])}),Bt=H({search:q().optional(),sortBy:qe(Q0).optional(),skip:Ke().int().nonnegative().default(0).optional(),count:Ke().int().positive().max(100).default(20).optional()}),e$=Ye.pick({title:!0,description:!0}).required({title:!0});H({id:be(),meta:ut,serviceAccountId:be(),serviceAccountMeta:xn.nullable(),createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});H({id:be(),hash:q(),size:Ke(),meta:ut,createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional(),serviceAccountId:q().optional(),terminalId:q().optional(),pageId:q().optional()});H({name:q(),meta:ut,value:q(),message:q().optional(),order:Ke().min(0).max(100).optional()});const t$=H({stateId:be(),meta:ut,acquiredAt:Ie()});jt("type",[H({type:ve("locked"),locks:t$.array()}),H({type:ve("unlocked"),stateIds:qe(q())})]);H({updatedInstances:Qi.array().optional(),updatedHubs:U0.array().optional(),updatedVirtualInstances:Qi.array().optional(),updatedGhostInstances:Qi.array().optional(),deletedInstanceIds:Ot.array().optional(),deletedHubIds:q().array().optional(),deletedVirtualInstanceIds:Ot.array().optional(),deletedGhostInstanceIds:Ot.array().optional()});const n$=bt(["destroy","update","refresh"]),r$=H({id:Ot,parentId:q().optional(),message:q()}),i$=H({type:n$,instances:qe(r$)}),o$=H({forceUpdateDependencies:Ce().default(!1),ignoreDependencies:Ce().default(!1),forceUpdateChildren:Ce().default(!1),destroyDependentInstances:Ce().default(!0),invokeDestroyTriggers:Ce().default(!0),deleteUnreachableResources:Ce().default(!1),forceDeleteState:Ce().default(!1),allowPartialCompositeInstanceUpdate:Ce().default(!1),allowPartialCompositeInstanceDestruction:Ce().default(!1),refresh:Ce().default(!1),debug:Ce().default(!1)}).partial(),xp=bt(["update","preview","destroy","recreate","refresh"]),s$=bt(["pending","running","failing","completed","failed","cancelled"]),jp=Ye.pick({title:!0,description:!0}).required({title:!0}),a$=H({projectId:q(),type:xp,instanceIds:qe(Ot).min(1),options:o$.partial().optional()});a$.extend({meta:jp,plan:i$.array().optional()});jt("type",[H({type:ve("updated"),operation:bn()}),H({type:ve("deleted"),operationId:q()})]);H({id:be(),type:xp,status:s$,meta:jp,startedAt:Ie(),updatedAt:Ie(),finishedAt:Ie().nullable()});const u$=H({id:be(),meta:ut,name:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...u$.shape,content:qe(Op)});H({id:be(),meta:wp,name:q().nullable(),systemName:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional()});H({id:be(),meta:xn,createdAt:Ie(),updatedAt:Ie()});Bt.extend({artifactId:q().optional()});H({stateId:q(),output:q()});jt("type",[H({type:ve("updated"),state:bn()}),H({type:ve("patched"),stateId:q(),patch:bn()}),H({type:ve("deleted"),stateId:q()})]);jt("type",[H({type:ve("registered"),instanceId:q(),params:Ze(q(),Ct())}),H({type:ve("deregistered"),instanceId:q()})]);const c$=bt(["active","unavailable"]);H({id:be(),terminalId:be(),meta:wp,startedAt:Ie(),finishedAt:Ie().nullable()});const l$=H({id:be(),name:q().nullable(),meta:ut,status:c$,stateId:q().nullable(),serviceAccountId:q().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...l$.shape,spec:Np});H({id:be(),meta:ut,name:q(),stateId:be(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional()});const zp=bt(["password","passkey"]),Ap=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:Ap,type:zp,encryptedIdentity:q(),recipient:q()});H({id:be(),type:zp,meta:Ap,recipient:q(),createdAt:Ie(),updatedAt:Ie()});const f$=bt(["unknown","starting","running","stopping","stopped","error"]);H({id:be(),digest:q(),meta:ut,status:f$,enabled:Ce(),apiKeyId:q(),apiKeyMeta:e$,createdAt:Ie(),updatedAt:Ie()});H({id:be(),identity:q(),meta:ut,serviceAccountId:q(),serviceAccountMeta:xn,createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});class Sa{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=gv(this.getNodeDependencies(a));let h=!1;for(const y of n.dependencies){if(!this.nodes.has(y)){this.logger.warn({depId:y,nodeId:o},"dependency not found in the graph, skipping");continue}this.outputMap.has(y)||(i.push({nodeId:y,resolved:!1,dependencies:[]}),h=!0)}if(h){n.resolved=!0;continue}}const c=await this.processNode(a,this.logger);if(t?.aborted){this.logger.warn({nodeId:o},"processing aborted, skipping output");return}const d=new Set,u=this.dependencyMap.get(o)??[];for(const h of u){const y=this.dependentMap.get(h);y&&(y.delete(o),d.add(h),y.size===0&&this.dependentMap.delete(h))}for(const h of n.dependencies){let y=this.dependentMap.get(h);y||(y=new Set,this.dependentMap.set(h,y)),y.add(o),d.add(h)}if(this.dependentSetHandler)for(const h of d){const y=this.dependentMap.get(h);this.dependentSetHandler(h,y)}this.outputMap.set(o,c),this.outputHandler?.(o,c),this.dependencyMap.set(o,n.dependencies),i.pop()}this.workset.delete(r)}}}class d$ extends Sa{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=u=>{const h=this.outputs.get(`hub:${u.hubId}`);if(!h)return{resolvedInputs:[]};if(h.kind!=="hub")throw new Error("Expected hub node");return h},i=u=>{const h=this.outputs.get(`instance:${u.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[u.output]??[],resolvedOutputs:h.resolvedOutputs?.[u.output]}};if(t.kind==="hub"){const u=new Map,h=y=>{u.set(`${y.input.instanceId}:${y.input.output}`,y)};for(const y of t.hub.inputs??[]){const{component:_}=i(y),b=_?.outputs[y.output];if(!b){this.logger.warn({msg:"output not found in the component",input:y,component:_});continue}h({input:y,type:b.type})}for(const y of t.hub.injectionInputs??[]){const{resolvedInputs:_}=r(y);for(const b of _)h(b)}return{kind:"hub",resolvedInputs:Array.from(u.values())}}if(t.instance.resolvedInputs)return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:vv(t.instance.resolvedInputs,(u,h)=>{const y=t.component.inputs[h];return y?u.map(_=>({input:_,type:y.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=(u,h)=>{let y=n.get(u);y||(y=new Map,n.set(u,y)),y.set(`${h.input.instanceId}:${h.input.output}`,h)},s=(u,h)=>{const y=t.component.inputs[u];if(!y){this.logger.warn({msg:"input not found in the component",input:h,component:t.component});return}const{component:_,resolvedOutputs:b}=i(h);if(!_){this.logger.warn({instanceId:t.instance.id,input:h},"no output found for the input");return}if(ka(_)){o(u,{input:h,type:y.type});return}if(b)for(const g of b)o(u,{input:g,type:y.type});else o(u,{input:h,type:y.type})};for(const[u,h]of Object.entries(t.instance.inputs??{}))for(const y of h)s(u,y);const a=new Map,c=new Map;for(const u of t.instance.injectionInputs??[]){const{resolvedInputs:h}=r(u);for(const y of h)a.set(`${y.input.instanceId}:${y.input.output}`,y)}for(const[u,h]of Object.entries(t.component.inputs??{})){const y=new Map(a),_=t.instance.hubInputs?.[u]??[];for(const b of _){const{resolvedInputs:g}=r(b);for(const m of g)y.set(`${m.input.instanceId}:${m.input.output}`,m)}for(const b of y.values())if(b.type===h.type){s(u,b.input);const g=`${b.input.instanceId}:${b.input.output}`;a.has(g)&&c.set(g,b)}}const d=bv(Array.from(n.entries()).map(([u,h])=>[u,Array.from(h.values())]));return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:d,resolvedOutputs:t.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(c.values())}}}var Tp={},Li={};Li.byteLength=m$;Li.toByteArray=y$;Li.fromByteArray=b$;var yt=[],rt=[],h$=typeof Uint8Array<"u"?Uint8Array:Array,eo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var rn=0,p$=eo.length;rn<p$;++rn)yt[rn]=eo[rn],rt[eo.charCodeAt(rn)]=rn;rt[45]=62;rt[95]=63;function Pp(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function m$(e){var t=Pp(e),r=t[0],i=t[1];return(r+i)*3/4-i}function g$(e,t,r){return(t+r)*3/4-r}function y$(e){var t,r=Pp(e),i=r[0],n=r[1],o=new h$(g$(e,i,n)),s=0,a=n>0?i-4:i,c;for(c=0;c<a;c+=4)t=rt[e.charCodeAt(c)]<<18|rt[e.charCodeAt(c+1)]<<12|rt[e.charCodeAt(c+2)]<<6|rt[e.charCodeAt(c+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return n===2&&(t=rt[e.charCodeAt(c)]<<2|rt[e.charCodeAt(c+1)]>>4,o[s++]=t&255),n===1&&(t=rt[e.charCodeAt(c)]<<10|rt[e.charCodeAt(c+1)]<<4|rt[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function v$(e){return yt[e>>18&63]+yt[e>>12&63]+yt[e>>6&63]+yt[e&63]}function $$(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(v$(i));return n.join("")}function b$(e){for(var t,r=e.length,i=r%3,n=[],o=16383,s=0,a=r-i;s<a;s+=o)n.push($$(e,s,s+o>a?a:s+o));return i===1?(t=e[r-1],n.push(yt[t>>2]+yt[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(yt[t>>10]+yt[t>>4&63]+yt[t<<2&63]+"=")),n.join("")}var Ia={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ia.read=function(e,t,r,i,n){var o,s,a=n*8-i-1,c=(1<<a)-1,d=c>>1,u=-7,h=r?n-1:0,y=r?-1:1,_=e[t+h];for(h+=y,o=_&(1<<-u)-1,_>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=y,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=y,u-=8);if(o===0)o=1-d;else{if(o===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-d}return(_?-1:1)*s*Math.pow(2,o-i)};Ia.write=function(e,t,r,i,n,o){var s,a,c,d=o*8-n-1,u=(1<<d)-1,h=u>>1,y=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=i?0:o-1,b=i?1:-1,g=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=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=y/c:t+=y*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-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+_]=a&255,_+=b,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+_]=s&255,_+=b,s/=256,d-=8);e[r+_-b]|=g*128};/*!
159
+ `,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=fr(t),i=nn(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=fr(t),i=nn(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 O0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new E0||null,prettyErrors:t}}function x0(e,t={}){const{lineCounter:r,prettyErrors:i}=O0(t),n=new N0(r?.addNewLine),o=new _0(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 Bn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(Ha(e,r)),s.warnings.forEach(Ha(e,r))),s}function j0(e,t,r){let i;const n=x0(e,r);if(!n)return null;if(n.warnings.forEach(o=>Gh(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 Ye=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()}),ut=Ye.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),wp=Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),xn=Ye.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),A0=H({createdAt:Ie(),updatedAt:Ie()}),dt=q().regex(/^[a-z][a-z0-9-_.]+$/).min(2).max(64),Fi=xt([Rn([dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)])]),Yi=q().regex(/^[a-z][a-zA-Z0-9]+$/).min(2).max(64);H({type:Fi,schema:bn(),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:Ke()});var z0=Symbol("runtimeSchema"),kp=bt(["composite","unit"]),Sp=H({schema:bn(),[z0]:Ph(de).optional(),required:Ce(),meta:Ye.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),nu=H({type:Fi,required:Ce(),multiple:Ce(),meta:Ye.required({title:!0}).pick({title:!0,description:!0})}),T0=H({type:dt,kind:kp,args:Ze(Yi,Sp),inputs:Ze(Yi,nu),outputs:Ze(Yi,nu),meta:Ye.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:Ke()}),Ip=H({x:Ke(),y:Ke()}),Ot=Rn([Fi,":",dt]),mn=H({instanceId:Ot,output:q()}),No=H({hubId:q()}),P0=H({args:Ze(q(),Ct()).optional(),inputs:Ze(q(),qe(mn)).optional(),hubInputs:Ze(q(),qe(No)).optional(),injectionInputs:qe(No).optional(),position:Ip.optional()}),Qi=H({id:Ot,kind:kp,type:Fi,name:dt,...P0.shape,resolvedInputs:Ze(q(),qe(mn)).optional(),parentId:Ot.optional(),outputs:Ze(q(),qe(mn)).optional(),resolvedOutputs:Ze(q(),qe(mn)).optional()}),D0=H({position:Ip.optional(),inputs:qe(mn).optional(),injectionInputs:qe(No).optional()}),U0=H({id:be(),...D0.shape}),C0=H({"c857cac5-caa6-4421-b82c-e561fbce6367":ve(!0),value:q()}),B0=H({name:q(),contentType:q().optional(),size:Ke().optional(),mode:Ke().optional()}),R0=xt([q(),Ke(),Ce(),q().array()]);H({name:q(),meta:Ye.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:q().optional(),value:R0.optional()});var F0=Sp.extend({readonly:Dt.boolean(),computed:Dt.boolean()}),L0=Dt.object({package:Dt.string(),path:Dt.string().optional()});Dt.object({...T0.shape,source:L0,secrets:Dt.record(Dt.string(),F0)});function ka(e){return"source"in e}var Z0=xt([H({type:ve("before-destroy")})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Z0});var M0=H({name:q()});H({instanceId:q(),args:Ze(q(),Ct()),inputs:Ze(q(),mn.array()),invokedTriggers:M0.array(),secretNames:q().array(),stateIdMap:Ze(Ot,q())});var ru=new WeakMap;function q0(e){const t=C0.safeParse(e);if(!t.success)return e;const r=ru.get(e);if(r!==void 0)return r;const i=j0(t.data.value);return ru.set(e,i),i}var V0=Symbol("unitArtifactId"),K0=H({"d55c63ac-3174-4756-808f-f778e99af0d1":ve(!0),[V0]:q().optional(),hash:q(),meta:ut.optional()}),J0=xt([H({type:ve("embedded"),isBinary:Ce().optional(),value:q()}),H({type:ve("artifact"),...K0.shape})]),Ep=H({meta:B0,content:J0}),Np=H({image:q(),command:q().array(),cwd:q().optional(),env:Ze(q(),q()).optional(),files:Ze(q(),Ep).optional()});H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Np});var Op=xt([H({type:ve("markdown"),content:q()}),H({type:ve("qr"),content:q(),showContent:Dh(),language:q().optional()}),H({type:ve("file"),file:Ep})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:Op.array()});H({name:q(),image:q(),params:Ze(q(),Ct())});H({projectId:be(),workerVersionId:be(),apiUrl:Hd(),apiKey:q()});jt("type",[H({type:ve("host")})]);const G0={id:"q8xbilhwpsn65zjlv5kz44qh"},W0={id:"n0rfvpl9o77iqf29ff4kk5gf"},H0={id:"pmn9y901jeiz2ydh93045l39"},X0={id:"qppfcerovu3h22o0x8rlpc3g"};jt("type",[H({type:ve("codebase")}),H({type:ve("database")})]);H({name:dt,spaceId:be().default(G0.id),modelStorageId:be().default(X0.id),libraryId:be().default(W0.id),pulumiBackendId:be().default(H0.id),meta:ut});H({id:q(),name:dt,meta:ut,spaceId:be(),modelStorageId:be(),libraryId:be(),pulumiBackendId:be(),...A0.shape});const Y0=H({encryptedIdentities:qe(q()),hasPasskey:Ce()});jt("type",[H({type:ve("locked"),unlockSuite:Y0.optional()}),H({type:ve("unlocked")})]);jt("type",[H({type:ve("host")})]);const Q0=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:Q0,recipient:q()});const e$=H({key:q(),order:bt(["asc","desc"])}),Bt=H({search:q().optional(),sortBy:qe(e$).optional(),skip:Ke().int().nonnegative().default(0).optional(),count:Ke().int().positive().max(100).default(20).optional()}),t$=Ye.pick({title:!0,description:!0}).required({title:!0});H({id:be(),meta:ut,serviceAccountId:be(),serviceAccountMeta:xn.nullable(),createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});H({id:be(),hash:q(),size:Ke(),meta:ut,createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional(),serviceAccountId:q().optional(),terminalId:q().optional(),pageId:q().optional()});H({name:q(),meta:ut,value:q(),message:q().optional(),order:Ke().min(0).max(100).optional()});const n$=H({stateId:be(),meta:ut,acquiredAt:Ie()});jt("type",[H({type:ve("locked"),locks:n$.array()}),H({type:ve("unlocked"),stateIds:qe(q())})]);H({updatedInstances:Qi.array().optional(),updatedHubs:U0.array().optional(),updatedVirtualInstances:Qi.array().optional(),updatedGhostInstances:Qi.array().optional(),deletedInstanceIds:Ot.array().optional(),deletedHubIds:q().array().optional(),deletedVirtualInstanceIds:Ot.array().optional(),deletedGhostInstanceIds:Ot.array().optional()});const r$=bt(["destroy","preview","update","refresh"]),i$=H({id:Ot,parentId:q().optional(),message:q()}),o$=H({type:r$,instances:qe(i$)}),s$=H({forceUpdateDependencies:Ce().default(!1),ignoreDependencies:Ce().default(!1),forceUpdateChildren:Ce().default(!1),destroyDependentInstances:Ce().default(!0),invokeDestroyTriggers:Ce().default(!0),deleteUnreachableResources:Ce().default(!1),forceDeleteState:Ce().default(!1),allowPartialCompositeInstanceUpdate:Ce().default(!1),allowPartialCompositeInstanceDestruction:Ce().default(!1),refresh:Ce().default(!1),debug:Ce().default(!1)}).partial(),xp=bt(["update","preview","destroy","recreate","refresh"]),a$=bt(["pending","running","failing","completed","failed","cancelled"]),jp=Ye.pick({title:!0,description:!0}).required({title:!0}),u$=H({projectId:q(),type:xp,instanceIds:qe(Ot).min(1),options:s$.partial().optional()});u$.extend({meta:jp,plan:o$.array().optional()});jt("type",[H({type:ve("updated"),operation:bn()}),H({type:ve("deleted"),operationId:q()})]);H({id:be(),type:xp,status:a$,meta:jp,startedAt:Ie(),updatedAt:Ie(),finishedAt:Ie().nullable()});const c$=H({id:be(),meta:ut,name:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...c$.shape,content:qe(Op)});H({id:be(),meta:wp,name:q().nullable(),systemName:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional()});H({id:be(),meta:xn,createdAt:Ie(),updatedAt:Ie()});Bt.extend({artifactId:q().optional()});H({stateId:q(),output:q()});jt("type",[H({type:ve("updated"),state:bn()}),H({type:ve("patched"),stateId:q(),patch:bn()}),H({type:ve("deleted"),stateId:q()})]);jt("type",[H({type:ve("registered"),instanceId:q(),params:Ze(q(),Ct())}),H({type:ve("deregistered"),instanceId:q()})]);const l$=bt(["active","unavailable"]);H({id:be(),terminalId:be(),meta:wp,startedAt:Ie(),finishedAt:Ie().nullable()});const f$=H({id:be(),name:q().nullable(),meta:ut,status:l$,stateId:q().nullable(),serviceAccountId:q().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...f$.shape,spec:Np});H({id:be(),meta:ut,name:q(),stateId:be(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional()});const Ap=bt(["password","passkey"]),zp=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:zp,type:Ap,encryptedIdentity:q(),recipient:q()});H({id:be(),type:Ap,meta:zp,recipient:q(),createdAt:Ie(),updatedAt:Ie()});const d$=bt(["unknown","starting","running","stopping","stopped","error"]);H({id:be(),digest:q(),meta:ut,status:d$,enabled:Ce(),apiKeyId:q(),apiKeyMeta:t$,createdAt:Ie(),updatedAt:Ie()});H({id:be(),identity:q(),meta:ut,serviceAccountId:q(),serviceAccountMeta:xn,createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});class Sa{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=gv(this.getNodeDependencies(a));let h=!1;for(const y of n.dependencies){if(!this.nodes.has(y)){this.logger.warn({depId:y,nodeId:o},"dependency not found in the graph, skipping");continue}this.outputMap.has(y)||(i.push({nodeId:y,resolved:!1,dependencies:[]}),h=!0)}if(h){n.resolved=!0;continue}}const c=await this.processNode(a,this.logger);if(t?.aborted){this.logger.warn({nodeId:o},"processing aborted, skipping output");return}const d=new Set,u=this.dependencyMap.get(o)??[];for(const h of u){const y=this.dependentMap.get(h);y&&(y.delete(o),d.add(h),y.size===0&&this.dependentMap.delete(h))}for(const h of n.dependencies){let y=this.dependentMap.get(h);y||(y=new Set,this.dependentMap.set(h,y)),y.add(o),d.add(h)}if(this.dependentSetHandler)for(const h of d){const y=this.dependentMap.get(h);this.dependentSetHandler(h,y)}this.outputMap.set(o,c),this.outputHandler?.(o,c),this.dependencyMap.set(o,n.dependencies),i.pop()}this.workset.delete(r)}}}class h$ extends Sa{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=u=>{const h=this.outputs.get(`hub:${u.hubId}`);if(!h)return{resolvedInputs:[]};if(h.kind!=="hub")throw new Error("Expected hub node");return h},i=u=>{const h=this.outputs.get(`instance:${u.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[u.output]??[],resolvedOutputs:h.resolvedOutputs?.[u.output]}};if(t.kind==="hub"){const u=new Map,h=y=>{u.set(`${y.input.instanceId}:${y.input.output}`,y)};for(const y of t.hub.inputs??[]){const{component:_}=i(y),b=_?.outputs[y.output];if(!b){this.logger.warn({msg:"output not found in the component",input:y,component:_});continue}h({input:y,type:b.type})}for(const y of t.hub.injectionInputs??[]){const{resolvedInputs:_}=r(y);for(const b of _)h(b)}return{kind:"hub",resolvedInputs:Array.from(u.values())}}if(t.instance.resolvedInputs)return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:vv(t.instance.resolvedInputs,(u,h)=>{const y=t.component.inputs[h];return y?u.map(_=>({input:_,type:y.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=(u,h)=>{let y=n.get(u);y||(y=new Map,n.set(u,y)),y.set(`${h.input.instanceId}:${h.input.output}`,h)},s=(u,h)=>{const y=t.component.inputs[u];if(!y){this.logger.warn({msg:"input not found in the component",input:h,component:t.component});return}const{component:_,resolvedOutputs:b}=i(h);if(!_){this.logger.warn({instanceId:t.instance.id,input:h},"no output found for the input");return}if(ka(_)){o(u,{input:h,type:y.type});return}if(b)for(const g of b)o(u,{input:g,type:y.type});else o(u,{input:h,type:y.type})};for(const[u,h]of Object.entries(t.instance.inputs??{}))for(const y of h)s(u,y);const a=new Map,c=new Map;for(const u of t.instance.injectionInputs??[]){const{resolvedInputs:h}=r(u);for(const y of h)a.set(`${y.input.instanceId}:${y.input.output}`,y)}for(const[u,h]of Object.entries(t.component.inputs??{})){const y=new Map(a),_=t.instance.hubInputs?.[u]??[];for(const b of _){const{resolvedInputs:g}=r(b);for(const m of g)y.set(`${m.input.instanceId}:${m.input.output}`,m)}for(const b of y.values())if(b.type===h.type){s(u,b.input);const g=`${b.input.instanceId}:${b.input.output}`;a.has(g)&&c.set(g,b)}}const d=bv(Array.from(n.entries()).map(([u,h])=>[u,Array.from(h.values())]));return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:d,resolvedOutputs:t.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(c.values())}}}var Tp={},Li={};Li.byteLength=g$;Li.toByteArray=v$;Li.fromByteArray=_$;var yt=[],rt=[],p$=typeof Uint8Array<"u"?Uint8Array:Array,eo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var rn=0,m$=eo.length;rn<m$;++rn)yt[rn]=eo[rn],rt[eo.charCodeAt(rn)]=rn;rt[45]=62;rt[95]=63;function Pp(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function g$(e){var t=Pp(e),r=t[0],i=t[1];return(r+i)*3/4-i}function y$(e,t,r){return(t+r)*3/4-r}function v$(e){var t,r=Pp(e),i=r[0],n=r[1],o=new p$(y$(e,i,n)),s=0,a=n>0?i-4:i,c;for(c=0;c<a;c+=4)t=rt[e.charCodeAt(c)]<<18|rt[e.charCodeAt(c+1)]<<12|rt[e.charCodeAt(c+2)]<<6|rt[e.charCodeAt(c+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return n===2&&(t=rt[e.charCodeAt(c)]<<2|rt[e.charCodeAt(c+1)]>>4,o[s++]=t&255),n===1&&(t=rt[e.charCodeAt(c)]<<10|rt[e.charCodeAt(c+1)]<<4|rt[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function $$(e){return yt[e>>18&63]+yt[e>>12&63]+yt[e>>6&63]+yt[e&63]}function b$(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push($$(i));return n.join("")}function _$(e){for(var t,r=e.length,i=r%3,n=[],o=16383,s=0,a=r-i;s<a;s+=o)n.push(b$(e,s,s+o>a?a:s+o));return i===1?(t=e[r-1],n.push(yt[t>>2]+yt[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(yt[t>>10]+yt[t>>4&63]+yt[t<<2&63]+"=")),n.join("")}var Ia={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ia.read=function(e,t,r,i,n){var o,s,a=n*8-i-1,c=(1<<a)-1,d=c>>1,u=-7,h=r?n-1:0,y=r?-1:1,_=e[t+h];for(h+=y,o=_&(1<<-u)-1,_>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=y,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=y,u-=8);if(o===0)o=1-d;else{if(o===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-d}return(_?-1:1)*s*Math.pow(2,o-i)};Ia.write=function(e,t,r,i,n,o){var s,a,c,d=o*8-n-1,u=(1<<d)-1,h=u>>1,y=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=i?0:o-1,b=i?1:-1,g=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=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=y/c:t+=y*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-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+_]=a&255,_+=b,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+_]=s&255,_+=b,s/=256,d-=8);e[r+_-b]|=g*128};/*!
160
160
  * The buffer module from node.js, for the browser.
161
161
  *
162
162
  * @author Feross Aboukhadijeh <https://feross.org>
163
163
  * @license MIT
164
- */(function(e){const t=Li,r=Ia,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.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 c(){try{const k=new o(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,o.prototype),Object.setPrototypeOf(k,l),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function d(k){if(k>n)throw new RangeError('The value "'+k+'" is invalid for option "size"');const l=new o(k);return Object.setPrototypeOf(l,u.prototype),l}function u(k,l,p){if(typeof k=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(k)}return h(k,l,p)}u.poolSize=8192;function h(k,l,p){if(typeof k=="string")return g(k,l);if(s.isView(k))return $(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,s)||k&&Qe(k.buffer,s)||typeof a<"u"&&(Qe(k,a)||k&&Qe(k.buffer,a)))return f(k,l,p);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 u.from(N,l,p);const A=v(k);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),l,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,l,p){return h(k,l,p)},Object.setPrototypeOf(u.prototype,o.prototype),Object.setPrototypeOf(u,o);function y(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 _(k,l,p){return y(k),k<=0?d(k):l!==void 0?typeof p=="string"?d(k).fill(l,p):d(k).fill(l):d(k)}u.alloc=function(k,l,p){return _(k,l,p)};function b(k){return y(k),d(k<0?0:S(k)|0)}u.allocUnsafe=function(k){return b(k)},u.allocUnsafeSlow=function(k){return b(k)};function g(k,l){if((typeof l!="string"||l==="")&&(l="utf8"),!u.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const p=I(k,l)|0;let N=d(p);const A=N.write(k,l);return A!==p&&(N=N.slice(0,A)),N}function m(k){const l=k.length<0?0:S(k.length)|0,p=d(l);for(let N=0;N<l;N+=1)p[N]=k[N]&255;return p}function $(k){if(Qe(k,o)){const l=new o(k);return f(l.buffer,l.byteOffset,l.byteLength)}return m(k)}function f(k,l,p){if(l<0||k.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<l+(p||0))throw new RangeError('"length" is outside of buffer bounds');let N;return l===void 0&&p===void 0?N=new o(k):p===void 0?N=new o(k,l):N=new o(k,l,p),Object.setPrototypeOf(N,u.prototype),N}function v(k){if(u.isBuffer(k)){const l=S(k.length)|0,p=d(l);return p.length===0||k.copy(p,0,0,l),p}if(k.length!==void 0)return typeof k.length!="number"||_t(k.length)?d(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function S(k){if(k>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return k|0}function E(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==u.prototype},u.compare=function(l,p){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),Qe(p,o)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(l)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===p)return 0;let N=l.length,A=p.length;for(let C=0,Z=Math.min(N,A);C<Z;++C)if(l[C]!==p[C]){N=l[C],A=p[C];break}return N<A?-1:A<N?1:0},u.isEncoding=function(l){switch(String(l).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}},u.concat=function(l,p){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return u.alloc(0);let N;if(p===void 0)for(p=0,N=0;N<l.length;++N)p+=l[N].length;const A=u.allocUnsafe(p);let C=0;for(N=0;N<l.length;++N){let Z=l[N];if(Qe(Z,o))C+Z.length>A.length?(u.isBuffer(Z)||(Z=u.from(Z)),Z.copy(A,C)):o.prototype.set.call(A,Z,C);else if(u.isBuffer(Z))Z.copy(A,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=Z.length}return A};function I(k,l){if(u.isBuffer(k))return k.length;if(s.isView(k)||Qe(k,s))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 p=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&p===0)return 0;let A=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Le(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Je(k).length;default:if(A)return N?-1:Le(k).length;l=(""+l).toLowerCase(),A=!0}}u.byteLength=I;function O(k,l,p){let N=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(k||(k="utf8");;)switch(k){case"hex":return F(this,l,p);case"utf8":case"utf-8":return ie(this,l,p);case"ascii":return K(this,l,p);case"latin1":case"binary":return T(this,l,p);case"base64":return X(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,l,p);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}u.prototype._isBuffer=!0;function j(k,l,p){const N=k[l];k[l]=k[p],k[p]=N}u.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<l;p+=2)j(this,p,p+1);return this},u.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<l;p+=4)j(this,p,p+3),j(this,p+1,p+2);return this},u.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<l;p+=8)j(this,p,p+7),j(this,p+1,p+6),j(this,p+2,p+5),j(this,p+3,p+4);return this},u.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?ie(this,0,l):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(l){if(!u.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:u.compare(this,l)===0},u.prototype.inspect=function(){let l="";const p=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(l+=" ... "),"<Buffer "+l+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(l,p,N,A,C){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),!u.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(p===void 0&&(p=0),N===void 0&&(N=l?l.length:0),A===void 0&&(A=0),C===void 0&&(C=this.length),p<0||N>l.length||A<0||C>this.length)throw new RangeError("out of range index");if(A>=C&&p>=N)return 0;if(A>=C)return-1;if(p>=N)return 1;if(p>>>=0,N>>>=0,A>>>=0,C>>>=0,this===l)return 0;let Z=C-A,ge=N-p;const ze=Math.min(Z,ge),xe=this.slice(A,C),Ae=l.slice(p,N);for(let Se=0;Se<ze;++Se)if(xe[Se]!==Ae[Se]){Z=xe[Se],ge=Ae[Se];break}return Z<ge?-1:ge<Z?1:0};function L(k,l,p,N,A){if(k.length===0)return-1;if(typeof p=="string"?(N=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,_t(p)&&(p=A?0:k.length-1),p<0&&(p=k.length+p),p>=k.length){if(A)return-1;p=k.length-1}else if(p<0)if(A)p=0;else return-1;if(typeof l=="string"&&(l=u.from(l,N)),u.isBuffer(l))return l.length===0?-1:G(k,l,p,N,A);if(typeof l=="number")return l=l&255,typeof o.prototype.indexOf=="function"?A?o.prototype.indexOf.call(k,l,p):o.prototype.lastIndexOf.call(k,l,p):G(k,[l],p,N,A);throw new TypeError("val must be string, number or Buffer")}function G(k,l,p,N,A){let C=1,Z=k.length,ge=l.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||l.length<2)return-1;C=2,Z/=2,ge/=2,p/=2}function ze(Ae,Se){return C===1?Ae[Se]:Ae.readUInt16BE(Se*C)}let xe;if(A){let Ae=-1;for(xe=p;xe<Z;xe++)if(ze(k,xe)===ze(l,Ae===-1?0:xe-Ae)){if(Ae===-1&&(Ae=xe),xe-Ae+1===ge)return Ae*C}else Ae!==-1&&(xe-=xe-Ae),Ae=-1}else for(p+ge>Z&&(p=Z-ge),xe=p;xe>=0;xe--){let Ae=!0;for(let Se=0;Se<ge;Se++)if(ze(k,xe+Se)!==ze(l,Se)){Ae=!1;break}if(Ae)return xe}return-1}u.prototype.includes=function(l,p,N){return this.indexOf(l,p,N)!==-1},u.prototype.indexOf=function(l,p,N){return L(this,l,p,N,!0)},u.prototype.lastIndexOf=function(l,p,N){return L(this,l,p,N,!1)};function Y(k,l,p,N){p=Number(p)||0;const A=k.length-p;N?(N=Number(N),N>A&&(N=A)):N=A;const C=l.length;N>C/2&&(N=C/2);let Z;for(Z=0;Z<N;++Z){const ge=parseInt(l.substr(Z*2,2),16);if(_t(ge))return Z;k[p+Z]=ge}return Z}function Q(k,l,p,N){return At(Le(l,k.length-p),k,p,N)}function oe(k,l,p,N){return At(Be(l),k,p,N)}function pe(k,l,p,N){return At(Je(l),k,p,N)}function R(k,l,p,N){return At(zt(l,k.length-p),k,p,N)}u.prototype.write=function(l,p,N,A){if(p===void 0)A="utf8",N=this.length,p=0;else if(N===void 0&&typeof p=="string")A=p,N=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(N)?(N=N>>>0,A===void 0&&(A="utf8")):(A=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-p;if((N===void 0||N>C)&&(N=C),l.length>0&&(N<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let Z=!1;for(;;)switch(A){case"hex":return Y(this,l,p,N);case"utf8":case"utf-8":return Q(this,l,p,N);case"ascii":case"latin1":case"binary":return oe(this,l,p,N);case"base64":return pe(this,l,p,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,l,p,N);default:if(Z)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),Z=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(k,l,p){return l===0&&p===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(l,p))}function ie(k,l,p){p=Math.min(k.length,p);const N=[];let A=l;for(;A<p;){const C=k[A];let Z=null,ge=C>239?4:C>223?3:C>191?2:1;if(A+ge<=p){let ze,xe,Ae,Se;switch(ge){case 1:C<128&&(Z=C);break;case 2:ze=k[A+1],(ze&192)===128&&(Se=(C&31)<<6|ze&63,Se>127&&(Z=Se));break;case 3:ze=k[A+1],xe=k[A+2],(ze&192)===128&&(xe&192)===128&&(Se=(C&15)<<12|(ze&63)<<6|xe&63,Se>2047&&(Se<55296||Se>57343)&&(Z=Se));break;case 4:ze=k[A+1],xe=k[A+2],Ae=k[A+3],(ze&192)===128&&(xe&192)===128&&(Ae&192)===128&&(Se=(C&15)<<18|(ze&63)<<12|(xe&63)<<6|Ae&63,Se>65535&&Se<1114112&&(Z=Se))}}Z===null?(Z=65533,ge=1):Z>65535&&(Z-=65536,N.push(Z>>>10&1023|55296),Z=56320|Z&1023),N.push(Z),A+=ge}return ce(N)}const re=4096;function ce(k){const l=k.length;if(l<=re)return String.fromCharCode.apply(String,k);let p="",N=0;for(;N<l;)p+=String.fromCharCode.apply(String,k.slice(N,N+=re));return p}function K(k,l,p){let N="";p=Math.min(k.length,p);for(let A=l;A<p;++A)N+=String.fromCharCode(k[A]&127);return N}function T(k,l,p){let N="";p=Math.min(k.length,p);for(let A=l;A<p;++A)N+=String.fromCharCode(k[A]);return N}function F(k,l,p){const N=k.length;(!l||l<0)&&(l=0),(!p||p<0||p>N)&&(p=N);let A="";for(let C=l;C<p;++C)A+=jn[k[C]];return A}function P(k,l,p){const N=k.slice(l,p);let A="";for(let C=0;C<N.length-1;C+=2)A+=String.fromCharCode(N[C]+N[C+1]*256);return A}u.prototype.slice=function(l,p){const N=this.length;l=~~l,p=p===void 0?N:~~p,l<0?(l+=N,l<0&&(l=0)):l>N&&(l=N),p<0?(p+=N,p<0&&(p=0)):p>N&&(p=N),p<l&&(p=l);const A=this.subarray(l,p);return Object.setPrototypeOf(A,u.prototype),A};function w(k,l,p){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+l>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let A=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)A+=this[l+Z]*C;return A},u.prototype.readUintBE=u.prototype.readUIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let A=this[l+--p],C=1;for(;p>0&&(C*=256);)A+=this[l+--p]*C;return A},u.prototype.readUint8=u.prototype.readUInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]|this[l+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]<<8|this[l+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},u.prototype.readBigUInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const A=p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,C=this[++l]+this[++l]*2**8+this[++l]*2**16+N*2**24;return BigInt(A)+(BigInt(C)<<BigInt(32))}),u.prototype.readBigUInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const A=p*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],C=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N;return(BigInt(A)<<BigInt(32))+BigInt(C)}),u.prototype.readIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let A=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)A+=this[l+Z]*C;return C*=128,A>=C&&(A-=Math.pow(2,8*p)),A},u.prototype.readIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let A=p,C=1,Z=this[l+--A];for(;A>0&&(C*=256);)Z+=this[l+--A]*C;return C*=128,Z>=C&&(Z-=Math.pow(2,8*p)),Z},u.prototype.readInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},u.prototype.readInt16LE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l]|this[l+1]<<8;return N&32768?N|4294901760:N},u.prototype.readInt16BE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l+1]|this[l]<<8;return N&32768?N|4294901760:N},u.prototype.readInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},u.prototype.readInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},u.prototype.readBigInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const A=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(N<<24);return(BigInt(A)<<BigInt(32))+BigInt(p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),u.prototype.readBigInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const A=(p<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(A)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N)}),u.prototype.readFloatLE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!0,23,4)},u.prototype.readFloatBE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!1,23,4)},u.prototype.readDoubleLE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!0,52,8)},u.prototype.readDoubleBE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!1,52,8)};function x(k,l,p,N,A,C){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>A||l<C)throw new RangeError('"value" argument is out of bounds');if(p+N>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(l,p,N,A){if(l=+l,p=p>>>0,N=N>>>0,!A){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=1,Z=0;for(this[p]=l&255;++Z<N&&(C*=256);)this[p+Z]=l/C&255;return p+N},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(l,p,N,A){if(l=+l,p=p>>>0,N=N>>>0,!A){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=N-1,Z=1;for(this[p+C]=l&255;--C>=0&&(Z*=256);)this[p+C]=l/Z&255;return p+N},u.prototype.writeUint8=u.prototype.writeUInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,255,0),this[p]=l&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p+3]=l>>>24,this[p+2]=l>>>16,this[p+1]=l>>>8,this[p]=l&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4};function B(k,l,p,N,A){ne(l,N,A,k,p,7);let C=Number(l&BigInt(4294967295));k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,p}function ee(k,l,p,N,A){ne(l,N,A,k,p,7);let C=Number(l&BigInt(4294967295));k[p+7]=C,C=C>>8,k[p+6]=C,C=C>>8,k[p+5]=C,C=C>>8,k[p+4]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p+3]=Z,Z=Z>>8,k[p+2]=Z,Z=Z>>8,k[p+1]=Z,Z=Z>>8,k[p]=Z,p+8}u.prototype.writeBigUInt64LE=ct(function(l,p=0){return B(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ct(function(l,p=0){return ee(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(l,p,N,A){if(l=+l,p=p>>>0,!A){const ze=Math.pow(2,8*N-1);x(this,l,p,N,ze-1,-ze)}let C=0,Z=1,ge=0;for(this[p]=l&255;++C<N&&(Z*=256);)l<0&&ge===0&&this[p+C-1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeIntBE=function(l,p,N,A){if(l=+l,p=p>>>0,!A){const ze=Math.pow(2,8*N-1);x(this,l,p,N,ze-1,-ze)}let C=N-1,Z=1,ge=0;for(this[p+C]=l&255;--C>=0&&(Z*=256);)l<0&&ge===0&&this[p+C+1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,127,-128),l<0&&(l=255+l+1),this[p]=l&255,p+1},u.prototype.writeInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),this[p]=l&255,this[p+1]=l>>>8,this[p+2]=l>>>16,this[p+3]=l>>>24,p+4},u.prototype.writeInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4},u.prototype.writeBigInt64LE=ct(function(l,p=0){return B(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ct(function(l,p=0){return ee(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(k,l,p,N,A,C){if(p+N>k.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function me(k,l,p,N,A){return l=+l,p=p>>>0,A||te(k,l,p,4),r.write(k,l,p,N,23,4),p+4}u.prototype.writeFloatLE=function(l,p,N){return me(this,l,p,!0,N)},u.prototype.writeFloatBE=function(l,p,N){return me(this,l,p,!1,N)};function se(k,l,p,N,A){return l=+l,p=p>>>0,A||te(k,l,p,8),r.write(k,l,p,N,52,8),p+8}u.prototype.writeDoubleLE=function(l,p,N){return se(this,l,p,!0,N)},u.prototype.writeDoubleBE=function(l,p,N){return se(this,l,p,!1,N)},u.prototype.copy=function(l,p,N,A){if(!u.isBuffer(l))throw new TypeError("argument should be a Buffer");if(N||(N=0),!A&&A!==0&&(A=this.length),p>=l.length&&(p=l.length),p||(p=0),A>0&&A<N&&(A=N),A===N||l.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),l.length-p<A-N&&(A=l.length-p+N);const C=A-N;return this===l&&typeof o.prototype.copyWithin=="function"?this.copyWithin(p,N,A):o.prototype.set.call(l,this.subarray(N,A),p),C},u.prototype.fill=function(l,p,N,A){if(typeof l=="string"){if(typeof p=="string"?(A=p,p=0,N=this.length):typeof N=="string"&&(A=N,N=this.length),A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!u.isEncoding(A))throw new TypeError("Unknown encoding: "+A);if(l.length===1){const Z=l.charCodeAt(0);(A==="utf8"&&Z<128||A==="latin1")&&(l=Z)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(p<0||this.length<p||this.length<N)throw new RangeError("Out of range index");if(N<=p)return this;p=p>>>0,N=N===void 0?this.length:N>>>0,l||(l=0);let C;if(typeof l=="number")for(C=p;C<N;++C)this[C]=l;else{const Z=u.isBuffer(l)?l:u.from(l,A),ge=Z.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(C=0;C<N-p;++C)this[C+p]=Z[C%ge]}return this};const z={};function U(k,l,p){z[k]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(A){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:A,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(k,l){return`The "${k}" argument must be of type number. Received type ${typeof l}`},TypeError),U("ERR_OUT_OF_RANGE",function(k,l,p){let N=`The value of "${k}" is out of range.`,A=p;return Number.isInteger(p)&&Math.abs(p)>2**32?A=M(String(p)):typeof p=="bigint"&&(A=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(A=M(A)),A+="n"),N+=` It must be ${l}. Received ${A}`,N},RangeError);function M(k){let l="",p=k.length;const N=k[0]==="-"?1:0;for(;p>=N+4;p-=3)l=`_${k.slice(p-3,p)}${l}`;return`${k.slice(0,p)}${l}`}function J(k,l,p){ae(l,"offset"),(k[l]===void 0||k[l+p]===void 0)&&we(l,k.length-(p+1))}function ne(k,l,p,N,A,C){if(k>p||k<l){const Z=typeof l=="bigint"?"n":"";let ge;throw l===0||l===BigInt(0)?ge=`>= 0${Z} and < 2${Z} ** ${(C+1)*8}${Z}`:ge=`>= -(2${Z} ** ${(C+1)*8-1}${Z}) and < 2 ** ${(C+1)*8-1}${Z}`,new z.ERR_OUT_OF_RANGE("value",ge,k)}J(N,A,C)}function ae(k,l){if(typeof k!="number")throw new z.ERR_INVALID_ARG_TYPE(l,"number",k)}function we(k,l,p){throw Math.floor(k)!==k?(ae(k,p),new z.ERR_OUT_OF_RANGE("offset","an integer",k)):l<0?new z.ERR_BUFFER_OUT_OF_BOUNDS:new z.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,k)}const Fe=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Fe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Le(k,l){l=l||1/0;let p;const N=k.length;let A=null;const C=[];for(let Z=0;Z<N;++Z){if(p=k.charCodeAt(Z),p>55295&&p<57344){if(!A){if(p>56319){(l-=3)>-1&&C.push(239,191,189);continue}else if(Z+1===N){(l-=3)>-1&&C.push(239,191,189);continue}A=p;continue}if(p<56320){(l-=3)>-1&&C.push(239,191,189),A=p;continue}p=(A-55296<<10|p-56320)+65536}else A&&(l-=3)>-1&&C.push(239,191,189);if(A=null,p<128){if((l-=1)<0)break;C.push(p)}else if(p<2048){if((l-=2)<0)break;C.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;C.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;C.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return C}function Be(k){const l=[];for(let p=0;p<k.length;++p)l.push(k.charCodeAt(p)&255);return l}function zt(k,l){let p,N,A;const C=[];for(let Z=0;Z<k.length&&!((l-=2)<0);++Z)p=k.charCodeAt(Z),N=p>>8,A=p%256,C.push(A),C.push(N);return C}function Je(k){return t.toByteArray(Ve(k))}function At(k,l,p,N){let A;for(A=0;A<N&&!(A+p>=l.length||A>=k.length);++A)l[A+p]=k[A];return A}function Qe(k,l){return k instanceof l||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===l.name}function _t(k){return k!==k}const jn=function(){const k="0123456789abcdef",l=new Array(256);for(let p=0;p<16;++p){const N=p*16;for(let A=0;A<16;++A)l[N+A]=k[p]+k[A]}return l}();function ct(k){return typeof BigInt>"u"?ir:k}function ir(){throw new Error("BigInt not supported")}})(Tp);const Jt=Tp.Buffer;function _$(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 w$=e=>new TextEncoder().encode(e);typeof Jt<"u"&&Jt.from;function k$(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 iu(e){return new S$().update(e).digest()}var S$=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,i;try{for(var n=_$(t),o=n.next();!o.done;o=n.next()){var s=o.value;this.checksum=this.checksum>>>8^E$[(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}(),I$=[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],E$=k$(I$);function N$(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 O$(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 x$=new TextEncoder,j$=50;function z$(e,t,r){x$.encodeInto(e,t.subarray(r))}function A$(e,t,r){e.length>j$?z$(e,t,r):O$(e,t,r)}new TextDecoder;class dr{constructor(t,r){this.type=t,this.data=r}}class di extends Error{constructor(t){super(t);const r=Object.create(di.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:di.name})}}function T$(e,t,r){const i=r/4294967296,n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function Dp(e,t,r){const i=Math.floor(r/4294967296),n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function P$(e,t){const r=e.getInt32(t),i=e.getUint32(t+4);return r*4294967296+i}const D$=-1,U$=4294967296-1,C$=17179869184-1;function B$({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=C$)if(t===0&&e<=U$){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),Dp(i,4,e),r}}function R$(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=R$(e);return B$(t)}else return null}function L$(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=P$(t,4),i=t.getUint32(0);return{sec:r,nsec:i}}default:throw new di(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}function Z$(e){const t=L$(e);return new Date(t.sec*1e3+t.nsec/1e6)}const M$={type:D$,encode:F$,decode:Z$};class Oo{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 dr(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 dr(s,o)}}}return t instanceof dr?t:null}decode(t,r,i){const n=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return n?n(t,r,i):new dr(r,t)}}Oo.defaultCodec=new Oo;function q$(e){return e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}function V$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):q$(e)?new Uint8Array(e):Uint8Array.from(e)}const K$=100,J$=2048;class Ea{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??Oo.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??K$,this.initialBufferSize=t?.initialBufferSize??J$,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 Ea({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=N$(t);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),A$(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=V$(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),T$(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),Dp(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 G$(e,t){return new Ea(t).encodeSharedRef(e)}function on(e){const t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!0),new Uint8Array(t)}class W$ extends Sa{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(Jt.from(t.id)),s.push(on(r.definitionHash)),o?.inputHashNonce&&s.push(on(o.inputHashNonce)),t.args&&s.push(G$(t.args)),n?s.push(on(n)):ka(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],[y])=>h.localeCompare(y)),c=new Set;for(const[h,y]of a){if(Object.keys(y).length===0)continue;s.push(Jt.from(h));const _=y.map(b=>b.input.instanceId).sort();for(const b of _){const g=this.outputs.get(b);if(!g){this.logger.warn({instanceId:b,dependentInstanceId:t.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}s.push(on(g.inputHash)),s.push(on(g.outputHash)),c.add(b)}}const d=[],u=Array.from(c).sort();for(const h of u){const y=this.outputs.get(h);if(!y){this.logger.warn({instanceId:h,dependentInstanceId:t.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}d.push(on(y.outputHash))}return{inputHash:iu(Jt.concat(s)),dependencyOutputHash:iu(Jt.concat(d)),outputHash:o?.outputHash??0}}}var hr={exports:{}},to={},wt={},Ft={},no={},ro={},io={},ou;function hi(){return ou||(ou=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(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((v,S)=>`${v}${S}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((v,S)=>(S instanceof r&&(v[S.str]=(v[S.str]||0)+1),v),{})}}e._Code=i,e.nil=new i("");function n($,...f){const v=[$[0]];let S=0;for(;S<f.length;)a(v,f[S]),v.push($[++S]);return new i(v)}e._=n;const o=new i("+");function s($,...f){const v=[_($[0])];let S=0;for(;S<f.length;)v.push(o),a(v,f[S]),v.push(o,_($[++S]));return c(v),new i(v)}e.str=s;function a($,f){f instanceof i?$.push(...f._items):f instanceof r?$.push(f):$.push(h(f))}e.addCodeArg=a;function c($){let f=1;for(;f<$.length-1;){if($[f]===o){const v=d($[f-1],$[f+1]);if(v!==void 0){$.splice(f-1,3,v);continue}$[f++]="+"}f++}}function d($,f){if(f==='""')return $;if($==='""')return f;if(typeof $=="string")return f instanceof r||$[$.length-1]!=='"'?void 0:typeof f!="string"?`${$.slice(0,-1)}${f}"`:f[0]==='"'?$.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!($ instanceof r))return`"${$}${f.slice(1)}`}function u($,f){return f.emptyStr()?$:$.emptyStr()?f:s`${$}${f}`}e.strConcat=u;function h($){return typeof $=="number"||typeof $=="boolean"||$===null?$:_(Array.isArray($)?$.join(","):$)}function y($){return new i(_($))}e.stringify=y;function _($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function b($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=b;function g($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=g;function m($){return new i($.toString())}e.regexpCode=m}(io)),io}var oo={},su;function au(){return su||(su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=hi();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var i;(function(c){c[c.Started=0]="Started",c[c.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:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=n;class o extends t.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class a extends n{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?s:t.nil}}get(){return this._scope}name(d){return new o(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(d),{prefix:_}=y,b=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[_];if(g){const f=g.get(b);if(f)return f}else g=this._values[_]=new Map;g.set(b,y);const m=this._scope[_]||(this._scope[_]=[]),$=m.length;return m[$]=u.ref,y.setValue(u,{property:_,itemIndex:$}),y}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},u,h)}_reduceValues(d,u,h={},y){let _=t.nil;for(const b in d){const g=d[b];if(!g)continue;const m=h[b]=h[b]||new Map;g.forEach($=>{if(m.has($))return;m.set($,i.Started);let f=u($);if(f){const v=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${v} ${$} = ${f};${this.opts._n}`}else if(f=y?.($))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r($);m.set($,i.Completed)})}return _}}e.ValueScope=a}(oo)),oo}var uu;function ye(){return uu||(uu=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=hi(),r=au();var i=hi();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=au();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(w,x){return this}}class s extends o{constructor(w,x,B){super(),this.varKind=w,this.name=x,this.rhs=B}render({es5:w,_n:x}){const B=w?r.varKinds.var:this.varKind,ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ee};`+x}optimizeNames(w,x){if(w[this.name.str])return this.rhs&&(this.rhs=pe(this.rhs,w,x)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(w,x,B){super(),this.lhs=w,this.rhs=x,this.sideEffects=B}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,x){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=pe(this.rhs,w,x),this}get names(){const w=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(w,this.rhs)}}class c extends a{constructor(w,x,B,ee){super(w,B,ee),this.op=x}render({_n:w}){return`${this.lhs} ${this.op}= ${this.rhs};`+w}}class d extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class u extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class h extends o{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class y extends o{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code};`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,x){return this.code=pe(this.code,w,x),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends o{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((x,B)=>x+B.render(w),"")}optimizeNodes(){const{nodes:w}=this;let x=w.length;for(;x--;){const B=w[x].optimizeNodes();Array.isArray(B)?w.splice(x,1,...B):B?w[x]=B:w.splice(x,1)}return w.length>0?this:void 0}optimizeNames(w,x){const{nodes:B}=this;let ee=B.length;for(;ee--;){const te=B[ee];te.optimizeNames(w,x)||(R(w,te.names),B.splice(ee,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((w,x)=>Q(w,x.names),{})}}class b extends _{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class g extends _{}class m extends b{}m.kind="else";class $ extends b{constructor(w,x){super(x),this.condition=w}render(w){let x=`if(${this.condition})`+super.render(w);return this.else&&(x+="else "+this.else.render(w)),x}optimizeNodes(){super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let x=this.else;if(x){const B=x.optimizeNodes();x=this.else=Array.isArray(B)?new m(B):B}if(x)return w===!1?x instanceof $?x:x.nodes:this.nodes.length?this:new $(X(w),x instanceof $?[x]:x.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,x){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(w,x),!!(super.optimizeNames(w,x)||this.else))return this.condition=pe(this.condition,w,x),this}get names(){const w=super.names;return oe(w,this.condition),this.else&&Q(w,this.else.names),w}}$.kind="if";class f extends b{}f.kind="for";class v extends f{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iteration=pe(this.iteration,w,x),this}get names(){return Q(super.names,this.iteration.names)}}class S extends f{constructor(w,x,B,ee){super(),this.varKind=w,this.name=x,this.from=B,this.to=ee}render(w){const x=w.es5?r.varKinds.var:this.varKind,{name:B,from:ee,to:te}=this;return`for(${x} ${B}=${ee}; ${B}<${te}; ${B}++)`+super.render(w)}get names(){const w=oe(super.names,this.from);return oe(w,this.to)}}class E extends f{constructor(w,x,B,ee){super(),this.loop=w,this.varKind=x,this.name=B,this.iterable=ee}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iterable=pe(this.iterable,w,x),this}get names(){return Q(super.names,this.iterable.names)}}class I extends b{constructor(w,x,B){super(),this.name=w,this.args=x,this.async=B}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}I.kind="func";class O extends _{render(w){return"return "+super.render(w)}}O.kind="return";class j extends b{render(w){let x="try"+super.render(w);return this.catch&&(x+=this.catch.render(w)),this.finally&&(x+=this.finally.render(w)),x}optimizeNodes(){var w,x;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(x=this.finally)===null||x===void 0||x.optimizeNodes(),this}optimizeNames(w,x){var B,ee;return super.optimizeNames(w,x),(B=this.catch)===null||B===void 0||B.optimizeNames(w,x),(ee=this.finally)===null||ee===void 0||ee.optimizeNames(w,x),this}get names(){const w=super.names;return this.catch&&Q(w,this.catch.names),this.finally&&Q(w,this.finally.names),w}}class L extends b{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.render(w)}}L.kind="catch";class G extends b{render(w){return"finally"+super.render(w)}}G.kind="finally";class Y{constructor(w,x={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...x,_n:x.lines?`
165
- `:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,x){const B=this._extScope.value(w,x);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(w,x){return this._extScope.getValue(w,x)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,x,B,ee){const te=this._scope.toName(x);return B!==void 0&&ee&&(this._constants[te.str]=B),this._leafNode(new s(w,te,B)),te}const(w,x,B){return this._def(r.varKinds.const,w,x,B)}let(w,x,B){return this._def(r.varKinds.let,w,x,B)}var(w,x,B){return this._def(r.varKinds.var,w,x,B)}assign(w,x,B){return this._leafNode(new a(w,x,B))}add(w,x){return this._leafNode(new c(w,e.operators.ADD,x))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new y(w)),this}object(...w){const x=["{"];for(const[B,ee]of w)x.length>1&&x.push(","),x.push(B),(B!==ee||this.opts.es5)&&(x.push(":"),(0,t.addCodeArg)(x,ee));return x.push("}"),new t._Code(x)}if(w,x,B){if(this._blockNode(new $(w)),x&&B)this.code(x).else().code(B).endIf();else if(x)this.code(x).endIf();else if(B)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new $(w))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(w,x){return this._blockNode(w),x&&this.code(x).endFor(),this}for(w,x){return this._for(new v(w),x)}forRange(w,x,B,ee,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(w);return this._for(new S(te,me,x,B),()=>ee(me))}forOf(w,x,B,ee=r.varKinds.const){const te=this._scope.toName(w);if(this.opts.es5){const me=x instanceof t.Name?x:this.var("_arr",x);return this.forRange("_i",0,(0,t._)`${me}.length`,se=>{this.var(te,(0,t._)`${me}[${se}]`),B(te)})}return this._for(new E("of",ee,te,x),()=>B(te))}forIn(w,x,B,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0,t._)`Object.keys(${x})`,B);const te=this._scope.toName(w);return this._for(new E("in",ee,te,x),()=>B(te))}endFor(){return this._endBlockNode(f)}label(w){return this._leafNode(new d(w))}break(w){return this._leafNode(new u(w))}return(w){const x=new O;if(this._blockNode(x),this.code(w),x.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(w,x,B){if(!x&&!B)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new j;if(this._blockNode(ee),this.code(w),x){const te=this.name("e");this._currNode=ee.catch=new L(te),x(te)}return B&&(this._currNode=ee.finally=new G,this.code(B)),this._endBlockNode(L,G)}throw(w){return this._leafNode(new h(w))}block(w,x){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(x),this}endBlock(w){const x=this._blockStarts.pop();if(x===void 0)throw new Error("CodeGen: not in self-balancing block");const B=this._nodes.length-x;if(B<0||w!==void 0&&B!==w)throw new Error(`CodeGen: wrong number of nodes: ${B} vs ${w} expected`);return this._nodes.length=x,this}func(w,x=t.nil,B,ee){return this._blockNode(new I(w,x,B)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,x){const B=this._currNode;if(B instanceof w||x&&B instanceof x)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${x?`${w.kind}/${x.kind}`:w.kind}"`)}_elseNode(w){const x=this._currNode;if(!(x instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=x.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const x=this._nodes;x[x.length-1]=w}}e.CodeGen=Y;function Q(P,w){for(const x in w)P[x]=(P[x]||0)+(w[x]||0);return P}function oe(P,w){return w instanceof t._CodeOrName?Q(P,w.names):P}function pe(P,w,x){if(P instanceof t.Name)return B(P);if(!ee(P))return P;return new t._Code(P._items.reduce((te,me)=>(me instanceof t.Name&&(me=B(me)),me instanceof t._Code?te.push(...me._items):te.push(me),te),[]));function B(te){const me=x[te.str];return me===void 0||w[te.str]!==1?te:(delete w[te.str],me)}function ee(te){return te instanceof t._Code&&te._items.some(me=>me instanceof t.Name&&w[me.str]===1&&x[me.str]!==void 0)}}function R(P,w){for(const x in w)P[x]=(P[x]||0)-(w[x]||0)}function X(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${F(P)}`}e.not=X;const ie=T(e.operators.AND);function re(...P){return P.reduce(ie)}e.and=re;const ce=T(e.operators.OR);function K(...P){return P.reduce(ce)}e.or=K;function T(P){return(w,x)=>w===t.nil?x:x===t.nil?w:(0,t._)`${F(w)} ${P} ${F(x)}`}function F(P){return P instanceof t.Name?P:(0,t._)`(${P})`}}(ro)),ro}var he={},cu;function _e(){if(cu)return he;cu=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=ye(),t=hi();function r(E){const I={};for(const O of E)I[O]=!0;return I}he.toHash=r;function i(E,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(n(E,I),!o(I,E.self.RULES.all))}he.alwaysValidSchema=i;function n(E,I=E.schema){const{opts:O,self:j}=E;if(!O.strictSchema||typeof I=="boolean")return;const L=j.RULES.keywords;for(const G in I)L[G]||S(E,`unknown keyword: "${G}"`)}he.checkUnknownRules=n;function o(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(I[O])return!0;return!1}he.schemaHasRules=o;function s(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&I.all[O])return!0;return!1}he.schemaHasRulesButRef=s;function a({topSchemaRef:E,schemaPath:I},O,j,L){if(!L){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${I}${(0,e.getProperty)(j)}`}he.schemaRefOrVal=a;function c(E){return h(decodeURIComponent(E))}he.unescapeFragment=c;function d(E){return encodeURIComponent(u(E))}he.escapeFragment=d;function u(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}he.escapeJsonPointer=u;function h(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}he.unescapeJsonPointer=h;function y(E,I){if(Array.isArray(E))for(const O of E)I(O);else I(E)}he.eachItem=y;function _({mergeNames:E,mergeToName:I,mergeValues:O,resultToName:j}){return(L,G,Y,Q)=>{const oe=Y===void 0?G:Y instanceof e.Name?(G instanceof e.Name?E(L,G,Y):I(L,G,Y),Y):G instanceof e.Name?(I(L,Y,G),G):O(G,Y);return Q===e.Name&&!(oe instanceof e.Name)?j(L,oe):oe}}he.mergeEvaluated={props:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>{E.if((0,e._)`${I} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${I})`))}),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>{I===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),g(E,O,I))}),mergeValues:(E,I)=>E===!0?!0:{...E,...I},resultToName:b}),items:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>E.assign(O,(0,e._)`${I} === true ? true : ${O} > ${I} ? ${O} : ${I}`)),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,I===!0?!0:(0,e._)`${O} > ${I} ? ${O} : ${I}`)),mergeValues:(E,I)=>E===!0?!0:Math.max(E,I),resultToName:(E,I)=>E.var("items",I)})};function b(E,I){if(I===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return I!==void 0&&g(E,O,I),O}he.evaluatedPropsToName=b;function g(E,I,O){Object.keys(O).forEach(j=>E.assign((0,e._)`${I}${(0,e.getProperty)(j)}`,!0))}he.setEvaluated=g;const m={};function $(E,I){return E.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new t._Code(I.code))})}he.useFunc=$;var f;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(f||(he.Type=f={}));function v(E,I,O){if(E instanceof e.Name){const j=I===f.Num;return O?j?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:j?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+u(E)}he.getErrorPath=v;function S(E,I,O=E.opts.strictSchema){if(O){if(I=`strict mode: ${I}`,O===!0)throw new Error(I);E.self.logger.warn(I)}}return he.checkStrictMode=S,he}var pr={},lu;function Rt(){if(lu)return pr;lu=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=ye(),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 pr.default=t,pr}var fu;function Zi(){return fu||(fu=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=ye(),r=_e(),i=Rt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,t.str)`"${m}" keyword must be ${$} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function n(m,$=e.keywordError,f,v){const{it:S}=m,{gen:E,compositeRule:I,allErrors:O}=S,j=h(m,$,f);v??(I||O)?c(E,j):d(S,(0,t._)`[${j}]`)}e.reportError=n;function o(m,$=e.keywordError,f){const{it:v}=m,{gen:S,compositeRule:E,allErrors:I}=v,O=h(m,$,f);c(S,O),E||I||d(v,i.default.vErrors)}e.reportExtraError=o;function s(m,$){m.assign(i.default.errors,$),m.if((0,t._)`${i.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,t._)`${i.default.vErrors}.length`,$),()=>m.assign(i.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:m,keyword:$,schemaValue:f,data:v,errsCount:S,it:E}){if(S===void 0)throw new Error("ajv implementation error");const I=m.name("err");m.forRange("i",S,i.default.errors,O=>{m.const(I,(0,t._)`${i.default.vErrors}[${O}]`),m.if((0,t._)`${I}.instancePath === undefined`,()=>m.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(i.default.instancePath,E.errorPath))),m.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${E.errSchemaPath}/${$}`),E.opts.verbose&&(m.assign((0,t._)`${I}.schema`,f),m.assign((0,t._)`${I}.data`,v))})}e.extendErrors=a;function c(m,$){const f=m.const("err",$);m.if((0,t._)`${i.default.vErrors} === null`,()=>m.assign(i.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${i.default.vErrors}.push(${f})`),m.code((0,t._)`${i.default.errors}++`)}function d(m,$){const{gen:f,validateName:v,schemaEnv:S}=m;S.$async?f.throw((0,t._)`new ${m.ValidationError}(${$})`):(f.assign((0,t._)`${v}.errors`,$),f.return(!1))}const u={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(m,$,f){const{createErrors:v}=m.it;return v===!1?(0,t._)`{}`:y(m,$,f)}function y(m,$,f={}){const{gen:v,it:S}=m,E=[_(S,f),b(m,f)];return g(m,$,E),v.object(...E)}function _({errorPath:m},{instancePath:$}){const f=$?(0,t.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,f)]}function b({keyword:m,it:{errSchemaPath:$}},{schemaPath:f,parentSchema:v}){let S=v?$:(0,t.str)`${$}/${m}`;return f&&(S=(0,t.str)`${S}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,S]}function g(m,{params:$,message:f},v){const{keyword:S,data:E,schemaValue:I,it:O}=m,{opts:j,propertyName:L,topSchemaRef:G,schemaPath:Y}=O;v.push([u.keyword,S],[u.params,typeof $=="function"?$(m):$||(0,t._)`{}`]),j.messages&&v.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&v.push([u.schema,I],[u.parentSchema,(0,t._)`${G}${Y}`],[i.default.data,E]),L&&v.push([u.propertyName,L])}}(no)),no}var du;function H$(){if(du)return Ft;du=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.boolOrEmptySchema=Ft.topBoolOrEmptySchema=void 0;const e=Zi(),t=ye(),r=Rt(),i={message:"boolean schema is false"};function n(a){const{gen:c,schema:d,validateName:u}=a;d===!1?s(a,!1):typeof d=="object"&&d.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}Ft.topBoolOrEmptySchema=n;function o(a,c){const{gen:d,schema:u}=a;u===!1?(d.var(c,!1),s(a)):d.var(c,!0)}Ft.boolOrEmptySchema=o;function s(a,c){const{gen:d,data:u}=a,h={gen:d,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(h,i,void 0,c)}return Ft}var Me={},Lt={},hu;function Up(){if(hu)return Lt;hu=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={},pu;function Cp(){if(pu)return kt;pu=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 mu;function pi(){if(mu)return Me;mu=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const e=Up(),t=Cp(),r=Zi(),i=ye(),n=_e();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Me.DataType=o={}));function s(f){const v=a(f.type);if(v.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&v.push("null")}return v}Me.getSchemaTypes=s;function a(f){const v=Array.isArray(f)?f:f?[f]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}Me.getJSONTypes=a;function c(f,v){const{gen:S,data:E,opts:I}=f,O=u(v,I.coerceTypes),j=v.length>0&&!(O.length===0&&v.length===1&&(0,t.schemaHasRulesForType)(f,v[0]));if(j){const L=b(v,E,I.strictNumbers,o.Wrong);S.if(L,()=>{O.length?h(f,v,O):m(f)})}return j}Me.coerceAndCheckDataType=c;const d=new Set(["string","number","integer","boolean","null"]);function u(f,v){return v?f.filter(S=>d.has(S)||v==="array"&&S==="array"):[]}function h(f,v,S){const{gen:E,data:I,opts:O}=f,j=E.let("dataType",(0,i._)`typeof ${I}`),L=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>E.assign(I,(0,i._)`${I}[0]`).assign(j,(0,i._)`typeof ${I}`).if(b(v,I,O.strictNumbers),()=>E.assign(L,I))),E.if((0,i._)`${L} !== undefined`);for(const Y of S)(d.has(Y)||Y==="array"&&O.coerceTypes==="array")&&G(Y);E.else(),m(f),E.endIf(),E.if((0,i._)`${L} !== undefined`,()=>{E.assign(I,L),y(f,L)});function G(Y){switch(Y){case"string":E.elseIf((0,i._)`${j} == "number" || ${j} == "boolean"`).assign(L,(0,i._)`"" + ${I}`).elseIf((0,i._)`${I} === null`).assign(L,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${j} == "boolean" || ${I} === null
164
+ */(function(e){const t=Li,r=Ia,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.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 c(){try{const k=new o(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,o.prototype),Object.setPrototypeOf(k,l),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function d(k){if(k>n)throw new RangeError('The value "'+k+'" is invalid for option "size"');const l=new o(k);return Object.setPrototypeOf(l,u.prototype),l}function u(k,l,p){if(typeof k=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(k)}return h(k,l,p)}u.poolSize=8192;function h(k,l,p){if(typeof k=="string")return g(k,l);if(s.isView(k))return $(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,s)||k&&Qe(k.buffer,s)||typeof a<"u"&&(Qe(k,a)||k&&Qe(k.buffer,a)))return f(k,l,p);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 u.from(N,l,p);const z=v(k);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),l,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,l,p){return h(k,l,p)},Object.setPrototypeOf(u.prototype,o.prototype),Object.setPrototypeOf(u,o);function y(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 _(k,l,p){return y(k),k<=0?d(k):l!==void 0?typeof p=="string"?d(k).fill(l,p):d(k).fill(l):d(k)}u.alloc=function(k,l,p){return _(k,l,p)};function b(k){return y(k),d(k<0?0:S(k)|0)}u.allocUnsafe=function(k){return b(k)},u.allocUnsafeSlow=function(k){return b(k)};function g(k,l){if((typeof l!="string"||l==="")&&(l="utf8"),!u.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const p=I(k,l)|0;let N=d(p);const z=N.write(k,l);return z!==p&&(N=N.slice(0,z)),N}function m(k){const l=k.length<0?0:S(k.length)|0,p=d(l);for(let N=0;N<l;N+=1)p[N]=k[N]&255;return p}function $(k){if(Qe(k,o)){const l=new o(k);return f(l.buffer,l.byteOffset,l.byteLength)}return m(k)}function f(k,l,p){if(l<0||k.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<l+(p||0))throw new RangeError('"length" is outside of buffer bounds');let N;return l===void 0&&p===void 0?N=new o(k):p===void 0?N=new o(k,l):N=new o(k,l,p),Object.setPrototypeOf(N,u.prototype),N}function v(k){if(u.isBuffer(k)){const l=S(k.length)|0,p=d(l);return p.length===0||k.copy(p,0,0,l),p}if(k.length!==void 0)return typeof k.length!="number"||_t(k.length)?d(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function S(k){if(k>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return k|0}function E(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==u.prototype},u.compare=function(l,p){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),Qe(p,o)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(l)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===p)return 0;let N=l.length,z=p.length;for(let C=0,Z=Math.min(N,z);C<Z;++C)if(l[C]!==p[C]){N=l[C],z=p[C];break}return N<z?-1:z<N?1:0},u.isEncoding=function(l){switch(String(l).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}},u.concat=function(l,p){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return u.alloc(0);let N;if(p===void 0)for(p=0,N=0;N<l.length;++N)p+=l[N].length;const z=u.allocUnsafe(p);let C=0;for(N=0;N<l.length;++N){let Z=l[N];if(Qe(Z,o))C+Z.length>z.length?(u.isBuffer(Z)||(Z=u.from(Z)),Z.copy(z,C)):o.prototype.set.call(z,Z,C);else if(u.isBuffer(Z))Z.copy(z,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=Z.length}return z};function I(k,l){if(u.isBuffer(k))return k.length;if(s.isView(k)||Qe(k,s))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 p=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&p===0)return 0;let z=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Le(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Je(k).length;default:if(z)return N?-1:Le(k).length;l=(""+l).toLowerCase(),z=!0}}u.byteLength=I;function O(k,l,p){let N=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(k||(k="utf8");;)switch(k){case"hex":return F(this,l,p);case"utf8":case"utf-8":return ie(this,l,p);case"ascii":return K(this,l,p);case"latin1":case"binary":return T(this,l,p);case"base64":return X(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,l,p);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}u.prototype._isBuffer=!0;function j(k,l,p){const N=k[l];k[l]=k[p],k[p]=N}u.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<l;p+=2)j(this,p,p+1);return this},u.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<l;p+=4)j(this,p,p+3),j(this,p+1,p+2);return this},u.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<l;p+=8)j(this,p,p+7),j(this,p+1,p+6),j(this,p+2,p+5),j(this,p+3,p+4);return this},u.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?ie(this,0,l):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(l){if(!u.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:u.compare(this,l)===0},u.prototype.inspect=function(){let l="";const p=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(l+=" ... "),"<Buffer "+l+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(l,p,N,z,C){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),!u.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(p===void 0&&(p=0),N===void 0&&(N=l?l.length:0),z===void 0&&(z=0),C===void 0&&(C=this.length),p<0||N>l.length||z<0||C>this.length)throw new RangeError("out of range index");if(z>=C&&p>=N)return 0;if(z>=C)return-1;if(p>=N)return 1;if(p>>>=0,N>>>=0,z>>>=0,C>>>=0,this===l)return 0;let Z=C-z,ge=N-p;const Ae=Math.min(Z,ge),xe=this.slice(z,C),ze=l.slice(p,N);for(let Se=0;Se<Ae;++Se)if(xe[Se]!==ze[Se]){Z=xe[Se],ge=ze[Se];break}return Z<ge?-1:ge<Z?1:0};function L(k,l,p,N,z){if(k.length===0)return-1;if(typeof p=="string"?(N=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,_t(p)&&(p=z?0:k.length-1),p<0&&(p=k.length+p),p>=k.length){if(z)return-1;p=k.length-1}else if(p<0)if(z)p=0;else return-1;if(typeof l=="string"&&(l=u.from(l,N)),u.isBuffer(l))return l.length===0?-1:G(k,l,p,N,z);if(typeof l=="number")return l=l&255,typeof o.prototype.indexOf=="function"?z?o.prototype.indexOf.call(k,l,p):o.prototype.lastIndexOf.call(k,l,p):G(k,[l],p,N,z);throw new TypeError("val must be string, number or Buffer")}function G(k,l,p,N,z){let C=1,Z=k.length,ge=l.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||l.length<2)return-1;C=2,Z/=2,ge/=2,p/=2}function Ae(ze,Se){return C===1?ze[Se]:ze.readUInt16BE(Se*C)}let xe;if(z){let ze=-1;for(xe=p;xe<Z;xe++)if(Ae(k,xe)===Ae(l,ze===-1?0:xe-ze)){if(ze===-1&&(ze=xe),xe-ze+1===ge)return ze*C}else ze!==-1&&(xe-=xe-ze),ze=-1}else for(p+ge>Z&&(p=Z-ge),xe=p;xe>=0;xe--){let ze=!0;for(let Se=0;Se<ge;Se++)if(Ae(k,xe+Se)!==Ae(l,Se)){ze=!1;break}if(ze)return xe}return-1}u.prototype.includes=function(l,p,N){return this.indexOf(l,p,N)!==-1},u.prototype.indexOf=function(l,p,N){return L(this,l,p,N,!0)},u.prototype.lastIndexOf=function(l,p,N){return L(this,l,p,N,!1)};function Y(k,l,p,N){p=Number(p)||0;const z=k.length-p;N?(N=Number(N),N>z&&(N=z)):N=z;const C=l.length;N>C/2&&(N=C/2);let Z;for(Z=0;Z<N;++Z){const ge=parseInt(l.substr(Z*2,2),16);if(_t(ge))return Z;k[p+Z]=ge}return Z}function Q(k,l,p,N){return zt(Le(l,k.length-p),k,p,N)}function oe(k,l,p,N){return zt(Be(l),k,p,N)}function pe(k,l,p,N){return zt(Je(l),k,p,N)}function R(k,l,p,N){return zt(At(l,k.length-p),k,p,N)}u.prototype.write=function(l,p,N,z){if(p===void 0)z="utf8",N=this.length,p=0;else if(N===void 0&&typeof p=="string")z=p,N=this.length,p=0;else if(isFinite(p))p=p>>>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-p;if((N===void 0||N>C)&&(N=C),l.length>0&&(N<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let Z=!1;for(;;)switch(z){case"hex":return Y(this,l,p,N);case"utf8":case"utf-8":return Q(this,l,p,N);case"ascii":case"latin1":case"binary":return oe(this,l,p,N);case"base64":return pe(this,l,p,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,l,p,N);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),Z=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(k,l,p){return l===0&&p===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(l,p))}function ie(k,l,p){p=Math.min(k.length,p);const N=[];let z=l;for(;z<p;){const C=k[z];let Z=null,ge=C>239?4:C>223?3:C>191?2:1;if(z+ge<=p){let Ae,xe,ze,Se;switch(ge){case 1:C<128&&(Z=C);break;case 2:Ae=k[z+1],(Ae&192)===128&&(Se=(C&31)<<6|Ae&63,Se>127&&(Z=Se));break;case 3:Ae=k[z+1],xe=k[z+2],(Ae&192)===128&&(xe&192)===128&&(Se=(C&15)<<12|(Ae&63)<<6|xe&63,Se>2047&&(Se<55296||Se>57343)&&(Z=Se));break;case 4:Ae=k[z+1],xe=k[z+2],ze=k[z+3],(Ae&192)===128&&(xe&192)===128&&(ze&192)===128&&(Se=(C&15)<<18|(Ae&63)<<12|(xe&63)<<6|ze&63,Se>65535&&Se<1114112&&(Z=Se))}}Z===null?(Z=65533,ge=1):Z>65535&&(Z-=65536,N.push(Z>>>10&1023|55296),Z=56320|Z&1023),N.push(Z),z+=ge}return ce(N)}const re=4096;function ce(k){const l=k.length;if(l<=re)return String.fromCharCode.apply(String,k);let p="",N=0;for(;N<l;)p+=String.fromCharCode.apply(String,k.slice(N,N+=re));return p}function K(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]&127);return N}function T(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]);return N}function F(k,l,p){const N=k.length;(!l||l<0)&&(l=0),(!p||p<0||p>N)&&(p=N);let z="";for(let C=l;C<p;++C)z+=jn[k[C]];return z}function P(k,l,p){const N=k.slice(l,p);let z="";for(let C=0;C<N.length-1;C+=2)z+=String.fromCharCode(N[C]+N[C+1]*256);return z}u.prototype.slice=function(l,p){const N=this.length;l=~~l,p=p===void 0?N:~~p,l<0?(l+=N,l<0&&(l=0)):l>N&&(l=N),p<0?(p+=N,p<0&&(p=0)):p>N&&(p=N),p<l&&(p=l);const z=this.subarray(l,p);return Object.setPrototypeOf(z,u.prototype),z};function w(k,l,p){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+l>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return z},u.prototype.readUintBE=u.prototype.readUIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l+--p],C=1;for(;p>0&&(C*=256);)z+=this[l+--p]*C;return z},u.prototype.readUint8=u.prototype.readUInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]|this[l+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]<<8|this[l+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},u.prototype.readBigUInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,C=this[++l]+this[++l]*2**8+this[++l]*2**16+N*2**24;return BigInt(z)+(BigInt(C)<<BigInt(32))}),u.prototype.readBigUInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],C=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N;return(BigInt(z)<<BigInt(32))+BigInt(C)}),u.prototype.readIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return C*=128,z>=C&&(z-=Math.pow(2,8*p)),z},u.prototype.readIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=p,C=1,Z=this[l+--z];for(;z>0&&(C*=256);)Z+=this[l+--z]*C;return C*=128,Z>=C&&(Z-=Math.pow(2,8*p)),Z},u.prototype.readInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},u.prototype.readInt16LE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l]|this[l+1]<<8;return N&32768?N|4294901760:N},u.prototype.readInt16BE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l+1]|this[l]<<8;return N&32768?N|4294901760:N},u.prototype.readInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},u.prototype.readInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},u.prototype.readBigInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(N<<24);return(BigInt(z)<<BigInt(32))+BigInt(p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),u.prototype.readBigInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=(p<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(z)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N)}),u.prototype.readFloatLE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!0,23,4)},u.prototype.readFloatBE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!1,23,4)},u.prototype.readDoubleLE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!0,52,8)},u.prototype.readDoubleBE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!1,52,8)};function x(k,l,p,N,z,C){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>z||l<C)throw new RangeError('"value" argument is out of bounds');if(p+N>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=1,Z=0;for(this[p]=l&255;++Z<N&&(C*=256);)this[p+Z]=l/C&255;return p+N},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=N-1,Z=1;for(this[p+C]=l&255;--C>=0&&(Z*=256);)this[p+C]=l/Z&255;return p+N},u.prototype.writeUint8=u.prototype.writeUInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,255,0),this[p]=l&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p+3]=l>>>24,this[p+2]=l>>>16,this[p+1]=l>>>8,this[p]=l&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4};function B(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,p}function ee(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p+7]=C,C=C>>8,k[p+6]=C,C=C>>8,k[p+5]=C,C=C>>8,k[p+4]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p+3]=Z,Z=Z>>8,k[p+2]=Z,Z=Z>>8,k[p+1]=Z,Z=Z>>8,k[p]=Z,p+8}u.prototype.writeBigUInt64LE=ct(function(l,p=0){return B(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ct(function(l,p=0){return ee(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=0,Z=1,ge=0;for(this[p]=l&255;++C<N&&(Z*=256);)l<0&&ge===0&&this[p+C-1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=N-1,Z=1,ge=0;for(this[p+C]=l&255;--C>=0&&(Z*=256);)l<0&&ge===0&&this[p+C+1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,127,-128),l<0&&(l=255+l+1),this[p]=l&255,p+1},u.prototype.writeInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),this[p]=l&255,this[p+1]=l>>>8,this[p+2]=l>>>16,this[p+3]=l>>>24,p+4},u.prototype.writeInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4},u.prototype.writeBigInt64LE=ct(function(l,p=0){return B(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ct(function(l,p=0){return ee(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(k,l,p,N,z,C){if(p+N>k.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function me(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,4),r.write(k,l,p,N,23,4),p+4}u.prototype.writeFloatLE=function(l,p,N){return me(this,l,p,!0,N)},u.prototype.writeFloatBE=function(l,p,N){return me(this,l,p,!1,N)};function se(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,8),r.write(k,l,p,N,52,8),p+8}u.prototype.writeDoubleLE=function(l,p,N){return se(this,l,p,!0,N)},u.prototype.writeDoubleBE=function(l,p,N){return se(this,l,p,!1,N)},u.prototype.copy=function(l,p,N,z){if(!u.isBuffer(l))throw new TypeError("argument should be a Buffer");if(N||(N=0),!z&&z!==0&&(z=this.length),p>=l.length&&(p=l.length),p||(p=0),z>0&&z<N&&(z=N),z===N||l.length===0||this.length===0)return 0;if(p<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),l.length-p<z-N&&(z=l.length-p+N);const C=z-N;return this===l&&typeof o.prototype.copyWithin=="function"?this.copyWithin(p,N,z):o.prototype.set.call(l,this.subarray(N,z),p),C},u.prototype.fill=function(l,p,N,z){if(typeof l=="string"){if(typeof p=="string"?(z=p,p=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"&&!u.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(l.length===1){const Z=l.charCodeAt(0);(z==="utf8"&&Z<128||z==="latin1")&&(l=Z)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(p<0||this.length<p||this.length<N)throw new RangeError("Out of range index");if(N<=p)return this;p=p>>>0,N=N===void 0?this.length:N>>>0,l||(l=0);let C;if(typeof l=="number")for(C=p;C<N;++C)this[C]=l;else{const Z=u.isBuffer(l)?l:u.from(l,z),ge=Z.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(C=0;C<N-p;++C)this[C+p]=Z[C%ge]}return this};const A={};function U(k,l,p){A[k]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:l.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}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(k,l){return`The "${k}" argument must be of type number. Received type ${typeof l}`},TypeError),U("ERR_OUT_OF_RANGE",function(k,l,p){let N=`The value of "${k}" is out of range.`,z=p;return Number.isInteger(p)&&Math.abs(p)>2**32?z=M(String(p)):typeof p=="bigint"&&(z=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(z=M(z)),z+="n"),N+=` It must be ${l}. Received ${z}`,N},RangeError);function M(k){let l="",p=k.length;const N=k[0]==="-"?1:0;for(;p>=N+4;p-=3)l=`_${k.slice(p-3,p)}${l}`;return`${k.slice(0,p)}${l}`}function J(k,l,p){ae(l,"offset"),(k[l]===void 0||k[l+p]===void 0)&&we(l,k.length-(p+1))}function ne(k,l,p,N,z,C){if(k>p||k<l){const Z=typeof l=="bigint"?"n":"";let ge;throw l===0||l===BigInt(0)?ge=`>= 0${Z} and < 2${Z} ** ${(C+1)*8}${Z}`:ge=`>= -(2${Z} ** ${(C+1)*8-1}${Z}) and < 2 ** ${(C+1)*8-1}${Z}`,new A.ERR_OUT_OF_RANGE("value",ge,k)}J(N,z,C)}function ae(k,l){if(typeof k!="number")throw new A.ERR_INVALID_ARG_TYPE(l,"number",k)}function we(k,l,p){throw Math.floor(k)!==k?(ae(k,p),new A.ERR_OUT_OF_RANGE("offset","an integer",k)):l<0?new A.ERR_BUFFER_OUT_OF_BOUNDS:new A.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,k)}const Fe=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Fe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Le(k,l){l=l||1/0;let p;const N=k.length;let z=null;const C=[];for(let Z=0;Z<N;++Z){if(p=k.charCodeAt(Z),p>55295&&p<57344){if(!z){if(p>56319){(l-=3)>-1&&C.push(239,191,189);continue}else if(Z+1===N){(l-=3)>-1&&C.push(239,191,189);continue}z=p;continue}if(p<56320){(l-=3)>-1&&C.push(239,191,189),z=p;continue}p=(z-55296<<10|p-56320)+65536}else z&&(l-=3)>-1&&C.push(239,191,189);if(z=null,p<128){if((l-=1)<0)break;C.push(p)}else if(p<2048){if((l-=2)<0)break;C.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;C.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;C.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return C}function Be(k){const l=[];for(let p=0;p<k.length;++p)l.push(k.charCodeAt(p)&255);return l}function At(k,l){let p,N,z;const C=[];for(let Z=0;Z<k.length&&!((l-=2)<0);++Z)p=k.charCodeAt(Z),N=p>>8,z=p%256,C.push(z),C.push(N);return C}function Je(k){return t.toByteArray(Ve(k))}function zt(k,l,p,N){let z;for(z=0;z<N&&!(z+p>=l.length||z>=k.length);++z)l[z+p]=k[z];return z}function Qe(k,l){return k instanceof l||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===l.name}function _t(k){return k!==k}const jn=function(){const k="0123456789abcdef",l=new Array(256);for(let p=0;p<16;++p){const N=p*16;for(let z=0;z<16;++z)l[N+z]=k[p]+k[z]}return l}();function ct(k){return typeof BigInt>"u"?ir:k}function ir(){throw new Error("BigInt not supported")}})(Tp);const Jt=Tp.Buffer;function w$(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 k$=e=>new TextEncoder().encode(e);typeof Jt<"u"&&Jt.from;function S$(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 iu(e){return new I$().update(e).digest()}var I$=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,i;try{for(var n=w$(t),o=n.next();!o.done;o=n.next()){var s=o.value;this.checksum=this.checksum>>>8^N$[(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}(),E$=[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],N$=S$(E$);function O$(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 x$(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 j$=new TextEncoder,A$=50;function z$(e,t,r){j$.encodeInto(e,t.subarray(r))}function T$(e,t,r){e.length>A$?z$(e,t,r):x$(e,t,r)}new TextDecoder;class dr{constructor(t,r){this.type=t,this.data=r}}class di extends Error{constructor(t){super(t);const r=Object.create(di.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:di.name})}}function P$(e,t,r){const i=r/4294967296,n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function Dp(e,t,r){const i=Math.floor(r/4294967296),n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function D$(e,t){const r=e.getInt32(t),i=e.getUint32(t+4);return r*4294967296+i}const U$=-1,C$=4294967296-1,B$=17179869184-1;function R$({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=B$)if(t===0&&e<=C$){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),Dp(i,4,e),r}}function F$(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 L$(e){if(e instanceof Date){const t=F$(e);return R$(t)}else return null}function Z$(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=D$(t,4),i=t.getUint32(0);return{sec:r,nsec:i}}default:throw new di(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}function M$(e){const t=Z$(e);return new Date(t.sec*1e3+t.nsec/1e6)}const q$={type:U$,encode:L$,decode:M$};class Oo{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(q$)}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 dr(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 dr(s,o)}}}return t instanceof dr?t:null}decode(t,r,i){const n=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return n?n(t,r,i):new dr(r,t)}}Oo.defaultCodec=new Oo;function V$(e){return e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}function K$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):V$(e)?new Uint8Array(e):Uint8Array.from(e)}const J$=100,G$=2048;class Ea{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??Oo.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??J$,this.initialBufferSize=t?.initialBufferSize??G$,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 Ea({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=O$(t);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),T$(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=K$(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),P$(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),Dp(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 W$(e,t){return new Ea(t).encodeSharedRef(e)}function on(e){const t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!0),new Uint8Array(t)}class H$ extends Sa{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(Jt.from(t.id)),s.push(on(r.definitionHash)),o?.inputHashNonce&&s.push(on(o.inputHashNonce)),t.args&&s.push(W$(t.args)),n?s.push(on(n)):ka(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],[y])=>h.localeCompare(y)),c=new Set;for(const[h,y]of a){if(Object.keys(y).length===0)continue;s.push(Jt.from(h));const _=y.map(b=>b.input.instanceId).sort();for(const b of _){const g=this.outputs.get(b);if(!g){this.logger.warn({instanceId:b,dependentInstanceId:t.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}s.push(on(g.inputHash)),s.push(on(g.outputHash)),c.add(b)}}const d=[],u=Array.from(c).sort();for(const h of u){const y=this.outputs.get(h);if(!y){this.logger.warn({instanceId:h,dependentInstanceId:t.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}d.push(on(y.outputHash))}return{inputHash:iu(Jt.concat(s)),dependencyOutputHash:iu(Jt.concat(d)),outputHash:o?.outputHash??0}}}var hr={exports:{}},to={},wt={},Ft={},no={},ro={},io={},ou;function hi(){return ou||(ou=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(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((v,S)=>`${v}${S}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((v,S)=>(S instanceof r&&(v[S.str]=(v[S.str]||0)+1),v),{})}}e._Code=i,e.nil=new i("");function n($,...f){const v=[$[0]];let S=0;for(;S<f.length;)a(v,f[S]),v.push($[++S]);return new i(v)}e._=n;const o=new i("+");function s($,...f){const v=[_($[0])];let S=0;for(;S<f.length;)v.push(o),a(v,f[S]),v.push(o,_($[++S]));return c(v),new i(v)}e.str=s;function a($,f){f instanceof i?$.push(...f._items):f instanceof r?$.push(f):$.push(h(f))}e.addCodeArg=a;function c($){let f=1;for(;f<$.length-1;){if($[f]===o){const v=d($[f-1],$[f+1]);if(v!==void 0){$.splice(f-1,3,v);continue}$[f++]="+"}f++}}function d($,f){if(f==='""')return $;if($==='""')return f;if(typeof $=="string")return f instanceof r||$[$.length-1]!=='"'?void 0:typeof f!="string"?`${$.slice(0,-1)}${f}"`:f[0]==='"'?$.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!($ instanceof r))return`"${$}${f.slice(1)}`}function u($,f){return f.emptyStr()?$:$.emptyStr()?f:s`${$}${f}`}e.strConcat=u;function h($){return typeof $=="number"||typeof $=="boolean"||$===null?$:_(Array.isArray($)?$.join(","):$)}function y($){return new i(_($))}e.stringify=y;function _($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function b($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=b;function g($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=g;function m($){return new i($.toString())}e.regexpCode=m}(io)),io}var oo={},su;function au(){return su||(su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=hi();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var i;(function(c){c[c.Started=0]="Started",c[c.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:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=n;class o extends t.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class a extends n{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?s:t.nil}}get(){return this._scope}name(d){return new o(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(d),{prefix:_}=y,b=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[_];if(g){const f=g.get(b);if(f)return f}else g=this._values[_]=new Map;g.set(b,y);const m=this._scope[_]||(this._scope[_]=[]),$=m.length;return m[$]=u.ref,y.setValue(u,{property:_,itemIndex:$}),y}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},u,h)}_reduceValues(d,u,h={},y){let _=t.nil;for(const b in d){const g=d[b];if(!g)continue;const m=h[b]=h[b]||new Map;g.forEach($=>{if(m.has($))return;m.set($,i.Started);let f=u($);if(f){const v=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${v} ${$} = ${f};${this.opts._n}`}else if(f=y?.($))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r($);m.set($,i.Completed)})}return _}}e.ValueScope=a}(oo)),oo}var uu;function ye(){return uu||(uu=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=hi(),r=au();var i=hi();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=au();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(w,x){return this}}class s extends o{constructor(w,x,B){super(),this.varKind=w,this.name=x,this.rhs=B}render({es5:w,_n:x}){const B=w?r.varKinds.var:this.varKind,ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ee};`+x}optimizeNames(w,x){if(w[this.name.str])return this.rhs&&(this.rhs=pe(this.rhs,w,x)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(w,x,B){super(),this.lhs=w,this.rhs=x,this.sideEffects=B}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,x){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=pe(this.rhs,w,x),this}get names(){const w=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(w,this.rhs)}}class c extends a{constructor(w,x,B,ee){super(w,B,ee),this.op=x}render({_n:w}){return`${this.lhs} ${this.op}= ${this.rhs};`+w}}class d extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class u extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class h extends o{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class y extends o{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code};`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,x){return this.code=pe(this.code,w,x),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends o{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((x,B)=>x+B.render(w),"")}optimizeNodes(){const{nodes:w}=this;let x=w.length;for(;x--;){const B=w[x].optimizeNodes();Array.isArray(B)?w.splice(x,1,...B):B?w[x]=B:w.splice(x,1)}return w.length>0?this:void 0}optimizeNames(w,x){const{nodes:B}=this;let ee=B.length;for(;ee--;){const te=B[ee];te.optimizeNames(w,x)||(R(w,te.names),B.splice(ee,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((w,x)=>Q(w,x.names),{})}}class b extends _{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class g extends _{}class m extends b{}m.kind="else";class $ extends b{constructor(w,x){super(x),this.condition=w}render(w){let x=`if(${this.condition})`+super.render(w);return this.else&&(x+="else "+this.else.render(w)),x}optimizeNodes(){super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let x=this.else;if(x){const B=x.optimizeNodes();x=this.else=Array.isArray(B)?new m(B):B}if(x)return w===!1?x instanceof $?x:x.nodes:this.nodes.length?this:new $(X(w),x instanceof $?[x]:x.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,x){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(w,x),!!(super.optimizeNames(w,x)||this.else))return this.condition=pe(this.condition,w,x),this}get names(){const w=super.names;return oe(w,this.condition),this.else&&Q(w,this.else.names),w}}$.kind="if";class f extends b{}f.kind="for";class v extends f{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iteration=pe(this.iteration,w,x),this}get names(){return Q(super.names,this.iteration.names)}}class S extends f{constructor(w,x,B,ee){super(),this.varKind=w,this.name=x,this.from=B,this.to=ee}render(w){const x=w.es5?r.varKinds.var:this.varKind,{name:B,from:ee,to:te}=this;return`for(${x} ${B}=${ee}; ${B}<${te}; ${B}++)`+super.render(w)}get names(){const w=oe(super.names,this.from);return oe(w,this.to)}}class E extends f{constructor(w,x,B,ee){super(),this.loop=w,this.varKind=x,this.name=B,this.iterable=ee}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iterable=pe(this.iterable,w,x),this}get names(){return Q(super.names,this.iterable.names)}}class I extends b{constructor(w,x,B){super(),this.name=w,this.args=x,this.async=B}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}I.kind="func";class O extends _{render(w){return"return "+super.render(w)}}O.kind="return";class j extends b{render(w){let x="try"+super.render(w);return this.catch&&(x+=this.catch.render(w)),this.finally&&(x+=this.finally.render(w)),x}optimizeNodes(){var w,x;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(x=this.finally)===null||x===void 0||x.optimizeNodes(),this}optimizeNames(w,x){var B,ee;return super.optimizeNames(w,x),(B=this.catch)===null||B===void 0||B.optimizeNames(w,x),(ee=this.finally)===null||ee===void 0||ee.optimizeNames(w,x),this}get names(){const w=super.names;return this.catch&&Q(w,this.catch.names),this.finally&&Q(w,this.finally.names),w}}class L extends b{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.render(w)}}L.kind="catch";class G extends b{render(w){return"finally"+super.render(w)}}G.kind="finally";class Y{constructor(w,x={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...x,_n:x.lines?`
165
+ `:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,x){const B=this._extScope.value(w,x);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(w,x){return this._extScope.getValue(w,x)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,x,B,ee){const te=this._scope.toName(x);return B!==void 0&&ee&&(this._constants[te.str]=B),this._leafNode(new s(w,te,B)),te}const(w,x,B){return this._def(r.varKinds.const,w,x,B)}let(w,x,B){return this._def(r.varKinds.let,w,x,B)}var(w,x,B){return this._def(r.varKinds.var,w,x,B)}assign(w,x,B){return this._leafNode(new a(w,x,B))}add(w,x){return this._leafNode(new c(w,e.operators.ADD,x))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new y(w)),this}object(...w){const x=["{"];for(const[B,ee]of w)x.length>1&&x.push(","),x.push(B),(B!==ee||this.opts.es5)&&(x.push(":"),(0,t.addCodeArg)(x,ee));return x.push("}"),new t._Code(x)}if(w,x,B){if(this._blockNode(new $(w)),x&&B)this.code(x).else().code(B).endIf();else if(x)this.code(x).endIf();else if(B)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new $(w))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(w,x){return this._blockNode(w),x&&this.code(x).endFor(),this}for(w,x){return this._for(new v(w),x)}forRange(w,x,B,ee,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(w);return this._for(new S(te,me,x,B),()=>ee(me))}forOf(w,x,B,ee=r.varKinds.const){const te=this._scope.toName(w);if(this.opts.es5){const me=x instanceof t.Name?x:this.var("_arr",x);return this.forRange("_i",0,(0,t._)`${me}.length`,se=>{this.var(te,(0,t._)`${me}[${se}]`),B(te)})}return this._for(new E("of",ee,te,x),()=>B(te))}forIn(w,x,B,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0,t._)`Object.keys(${x})`,B);const te=this._scope.toName(w);return this._for(new E("in",ee,te,x),()=>B(te))}endFor(){return this._endBlockNode(f)}label(w){return this._leafNode(new d(w))}break(w){return this._leafNode(new u(w))}return(w){const x=new O;if(this._blockNode(x),this.code(w),x.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(w,x,B){if(!x&&!B)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new j;if(this._blockNode(ee),this.code(w),x){const te=this.name("e");this._currNode=ee.catch=new L(te),x(te)}return B&&(this._currNode=ee.finally=new G,this.code(B)),this._endBlockNode(L,G)}throw(w){return this._leafNode(new h(w))}block(w,x){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(x),this}endBlock(w){const x=this._blockStarts.pop();if(x===void 0)throw new Error("CodeGen: not in self-balancing block");const B=this._nodes.length-x;if(B<0||w!==void 0&&B!==w)throw new Error(`CodeGen: wrong number of nodes: ${B} vs ${w} expected`);return this._nodes.length=x,this}func(w,x=t.nil,B,ee){return this._blockNode(new I(w,x,B)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,x){const B=this._currNode;if(B instanceof w||x&&B instanceof x)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${x?`${w.kind}/${x.kind}`:w.kind}"`)}_elseNode(w){const x=this._currNode;if(!(x instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=x.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const x=this._nodes;x[x.length-1]=w}}e.CodeGen=Y;function Q(P,w){for(const x in w)P[x]=(P[x]||0)+(w[x]||0);return P}function oe(P,w){return w instanceof t._CodeOrName?Q(P,w.names):P}function pe(P,w,x){if(P instanceof t.Name)return B(P);if(!ee(P))return P;return new t._Code(P._items.reduce((te,me)=>(me instanceof t.Name&&(me=B(me)),me instanceof t._Code?te.push(...me._items):te.push(me),te),[]));function B(te){const me=x[te.str];return me===void 0||w[te.str]!==1?te:(delete w[te.str],me)}function ee(te){return te instanceof t._Code&&te._items.some(me=>me instanceof t.Name&&w[me.str]===1&&x[me.str]!==void 0)}}function R(P,w){for(const x in w)P[x]=(P[x]||0)-(w[x]||0)}function X(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${F(P)}`}e.not=X;const ie=T(e.operators.AND);function re(...P){return P.reduce(ie)}e.and=re;const ce=T(e.operators.OR);function K(...P){return P.reduce(ce)}e.or=K;function T(P){return(w,x)=>w===t.nil?x:x===t.nil?w:(0,t._)`${F(w)} ${P} ${F(x)}`}function F(P){return P instanceof t.Name?P:(0,t._)`(${P})`}}(ro)),ro}var he={},cu;function _e(){if(cu)return he;cu=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=ye(),t=hi();function r(E){const I={};for(const O of E)I[O]=!0;return I}he.toHash=r;function i(E,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(n(E,I),!o(I,E.self.RULES.all))}he.alwaysValidSchema=i;function n(E,I=E.schema){const{opts:O,self:j}=E;if(!O.strictSchema||typeof I=="boolean")return;const L=j.RULES.keywords;for(const G in I)L[G]||S(E,`unknown keyword: "${G}"`)}he.checkUnknownRules=n;function o(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(I[O])return!0;return!1}he.schemaHasRules=o;function s(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&I.all[O])return!0;return!1}he.schemaHasRulesButRef=s;function a({topSchemaRef:E,schemaPath:I},O,j,L){if(!L){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${I}${(0,e.getProperty)(j)}`}he.schemaRefOrVal=a;function c(E){return h(decodeURIComponent(E))}he.unescapeFragment=c;function d(E){return encodeURIComponent(u(E))}he.escapeFragment=d;function u(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}he.escapeJsonPointer=u;function h(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}he.unescapeJsonPointer=h;function y(E,I){if(Array.isArray(E))for(const O of E)I(O);else I(E)}he.eachItem=y;function _({mergeNames:E,mergeToName:I,mergeValues:O,resultToName:j}){return(L,G,Y,Q)=>{const oe=Y===void 0?G:Y instanceof e.Name?(G instanceof e.Name?E(L,G,Y):I(L,G,Y),Y):G instanceof e.Name?(I(L,Y,G),G):O(G,Y);return Q===e.Name&&!(oe instanceof e.Name)?j(L,oe):oe}}he.mergeEvaluated={props:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>{E.if((0,e._)`${I} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${I})`))}),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>{I===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),g(E,O,I))}),mergeValues:(E,I)=>E===!0?!0:{...E,...I},resultToName:b}),items:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>E.assign(O,(0,e._)`${I} === true ? true : ${O} > ${I} ? ${O} : ${I}`)),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,I===!0?!0:(0,e._)`${O} > ${I} ? ${O} : ${I}`)),mergeValues:(E,I)=>E===!0?!0:Math.max(E,I),resultToName:(E,I)=>E.var("items",I)})};function b(E,I){if(I===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return I!==void 0&&g(E,O,I),O}he.evaluatedPropsToName=b;function g(E,I,O){Object.keys(O).forEach(j=>E.assign((0,e._)`${I}${(0,e.getProperty)(j)}`,!0))}he.setEvaluated=g;const m={};function $(E,I){return E.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new t._Code(I.code))})}he.useFunc=$;var f;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(f||(he.Type=f={}));function v(E,I,O){if(E instanceof e.Name){const j=I===f.Num;return O?j?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:j?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+u(E)}he.getErrorPath=v;function S(E,I,O=E.opts.strictSchema){if(O){if(I=`strict mode: ${I}`,O===!0)throw new Error(I);E.self.logger.warn(I)}}return he.checkStrictMode=S,he}var pr={},lu;function Rt(){if(lu)return pr;lu=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=ye(),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 pr.default=t,pr}var fu;function Zi(){return fu||(fu=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=ye(),r=_e(),i=Rt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,t.str)`"${m}" keyword must be ${$} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function n(m,$=e.keywordError,f,v){const{it:S}=m,{gen:E,compositeRule:I,allErrors:O}=S,j=h(m,$,f);v??(I||O)?c(E,j):d(S,(0,t._)`[${j}]`)}e.reportError=n;function o(m,$=e.keywordError,f){const{it:v}=m,{gen:S,compositeRule:E,allErrors:I}=v,O=h(m,$,f);c(S,O),E||I||d(v,i.default.vErrors)}e.reportExtraError=o;function s(m,$){m.assign(i.default.errors,$),m.if((0,t._)`${i.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,t._)`${i.default.vErrors}.length`,$),()=>m.assign(i.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:m,keyword:$,schemaValue:f,data:v,errsCount:S,it:E}){if(S===void 0)throw new Error("ajv implementation error");const I=m.name("err");m.forRange("i",S,i.default.errors,O=>{m.const(I,(0,t._)`${i.default.vErrors}[${O}]`),m.if((0,t._)`${I}.instancePath === undefined`,()=>m.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(i.default.instancePath,E.errorPath))),m.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${E.errSchemaPath}/${$}`),E.opts.verbose&&(m.assign((0,t._)`${I}.schema`,f),m.assign((0,t._)`${I}.data`,v))})}e.extendErrors=a;function c(m,$){const f=m.const("err",$);m.if((0,t._)`${i.default.vErrors} === null`,()=>m.assign(i.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${i.default.vErrors}.push(${f})`),m.code((0,t._)`${i.default.errors}++`)}function d(m,$){const{gen:f,validateName:v,schemaEnv:S}=m;S.$async?f.throw((0,t._)`new ${m.ValidationError}(${$})`):(f.assign((0,t._)`${v}.errors`,$),f.return(!1))}const u={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(m,$,f){const{createErrors:v}=m.it;return v===!1?(0,t._)`{}`:y(m,$,f)}function y(m,$,f={}){const{gen:v,it:S}=m,E=[_(S,f),b(m,f)];return g(m,$,E),v.object(...E)}function _({errorPath:m},{instancePath:$}){const f=$?(0,t.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,f)]}function b({keyword:m,it:{errSchemaPath:$}},{schemaPath:f,parentSchema:v}){let S=v?$:(0,t.str)`${$}/${m}`;return f&&(S=(0,t.str)`${S}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,S]}function g(m,{params:$,message:f},v){const{keyword:S,data:E,schemaValue:I,it:O}=m,{opts:j,propertyName:L,topSchemaRef:G,schemaPath:Y}=O;v.push([u.keyword,S],[u.params,typeof $=="function"?$(m):$||(0,t._)`{}`]),j.messages&&v.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&v.push([u.schema,I],[u.parentSchema,(0,t._)`${G}${Y}`],[i.default.data,E]),L&&v.push([u.propertyName,L])}}(no)),no}var du;function X$(){if(du)return Ft;du=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.boolOrEmptySchema=Ft.topBoolOrEmptySchema=void 0;const e=Zi(),t=ye(),r=Rt(),i={message:"boolean schema is false"};function n(a){const{gen:c,schema:d,validateName:u}=a;d===!1?s(a,!1):typeof d=="object"&&d.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}Ft.topBoolOrEmptySchema=n;function o(a,c){const{gen:d,schema:u}=a;u===!1?(d.var(c,!1),s(a)):d.var(c,!0)}Ft.boolOrEmptySchema=o;function s(a,c){const{gen:d,data:u}=a,h={gen:d,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(h,i,void 0,c)}return Ft}var Me={},Lt={},hu;function Up(){if(hu)return Lt;hu=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={},pu;function Cp(){if(pu)return kt;pu=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 mu;function pi(){if(mu)return Me;mu=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const e=Up(),t=Cp(),r=Zi(),i=ye(),n=_e();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Me.DataType=o={}));function s(f){const v=a(f.type);if(v.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&v.push("null")}return v}Me.getSchemaTypes=s;function a(f){const v=Array.isArray(f)?f:f?[f]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}Me.getJSONTypes=a;function c(f,v){const{gen:S,data:E,opts:I}=f,O=u(v,I.coerceTypes),j=v.length>0&&!(O.length===0&&v.length===1&&(0,t.schemaHasRulesForType)(f,v[0]));if(j){const L=b(v,E,I.strictNumbers,o.Wrong);S.if(L,()=>{O.length?h(f,v,O):m(f)})}return j}Me.coerceAndCheckDataType=c;const d=new Set(["string","number","integer","boolean","null"]);function u(f,v){return v?f.filter(S=>d.has(S)||v==="array"&&S==="array"):[]}function h(f,v,S){const{gen:E,data:I,opts:O}=f,j=E.let("dataType",(0,i._)`typeof ${I}`),L=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>E.assign(I,(0,i._)`${I}[0]`).assign(j,(0,i._)`typeof ${I}`).if(b(v,I,O.strictNumbers),()=>E.assign(L,I))),E.if((0,i._)`${L} !== undefined`);for(const Y of S)(d.has(Y)||Y==="array"&&O.coerceTypes==="array")&&G(Y);E.else(),m(f),E.endIf(),E.if((0,i._)`${L} !== undefined`,()=>{E.assign(I,L),y(f,L)});function G(Y){switch(Y){case"string":E.elseIf((0,i._)`${j} == "number" || ${j} == "boolean"`).assign(L,(0,i._)`"" + ${I}`).elseIf((0,i._)`${I} === null`).assign(L,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${j} == "boolean" || ${I} === null
166
166
  || (${j} == "string" && ${I} && ${I} == +${I})`).assign(L,(0,i._)`+${I}`);return;case"integer":E.elseIf((0,i._)`${j} === "boolean" || ${I} === null
167
167
  || (${j} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(L,(0,i._)`+${I}`);return;case"boolean":E.elseIf((0,i._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(L,!1).elseIf((0,i._)`${I} === "true" || ${I} === 1`).assign(L,!0);return;case"null":E.elseIf((0,i._)`${I} === "" || ${I} === 0 || ${I} === false`),E.assign(L,null);return;case"array":E.elseIf((0,i._)`${j} === "string" || ${j} === "number"
168
- || ${j} === "boolean" || ${I} === null`).assign(L,(0,i._)`[${I}]`)}}}function y({gen:f,parentData:v,parentDataProperty:S},E){f.if((0,i._)`${v} !== undefined`,()=>f.assign((0,i._)`${v}[${S}]`,E))}function _(f,v,S,E=o.Correct){const I=E===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(f){case"null":return(0,i._)`${v} ${I} null`;case"array":O=(0,i._)`Array.isArray(${v})`;break;case"object":O=(0,i._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":O=j((0,i._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":O=j();break;default:return(0,i._)`typeof ${v} ${I} ${f}`}return E===o.Correct?O:(0,i.not)(O);function j(L=i.nil){return(0,i.and)((0,i._)`typeof ${v} == "number"`,L,S?(0,i._)`isFinite(${v})`:i.nil)}}Me.checkDataType=_;function b(f,v,S,E){if(f.length===1)return _(f[0],v,S,E);let I;const O=(0,n.toHash)(f);if(O.array&&O.object){const j=(0,i._)`typeof ${v} != "object"`;I=O.null?j:(0,i._)`!${v} || ${j}`,delete O.null,delete O.array,delete O.object}else I=i.nil;O.number&&delete O.integer;for(const j in O)I=(0,i.and)(I,_(j,v,S,E));return I}Me.checkDataTypes=b;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0,i._)`{type: ${f}}`:(0,i._)`{type: ${v}}`};function m(f){const v=$(f);(0,r.reportError)(v,g)}Me.reportTypeError=m;function $(f){const{gen:v,data:S,schema:E}=f,I=(0,n.schemaRefOrVal)(f,E,"type");return{gen:v,keyword:"type",data:S,schema:E.type,schemaCode:I,schemaValue:I,parentSchema:E,params:{},it:f}}return Me}var An={},gu;function X$(){if(gu)return An;gu=1,Object.defineProperty(An,"__esModule",{value:!0}),An.assignDefaults=void 0;const e=ye(),t=_e();function r(n,o){const{properties:s,items:a}=n.schema;if(o==="object"&&s)for(const c in s)i(n,c,s[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,d)=>i(n,d,c.default))}An.assignDefaults=r;function i(n,o,s){const{gen:a,compositeRule:c,data:d,opts:u}=n;if(s===void 0)return;const h=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${h}`);return}let y=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(y=(0,e._)`${y} || ${h} === null || ${h} === ""`),a.if(y,(0,e._)`${h} = ${(0,e.stringify)(s)}`)}return An}var ft={},ke={},yu;function gt(){if(yu)return ke;yu=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const e=ye(),t=_e(),r=Rt(),i=_e();function n(f,v){const{gen:S,data:E,it:I}=f;S.if(u(S,E,v,I.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${v}`},!0),f.error()})}ke.checkReportMissingProp=n;function o({gen:f,data:v,it:{opts:S}},E,I){return(0,e.or)(...E.map(O=>(0,e.and)(u(f,v,O,S.ownProperties),(0,e._)`${I} = ${O}`)))}ke.checkMissingProp=o;function s(f,v){f.setParams({missingProperty:v},!0),f.error()}ke.reportMissingProp=s;function a(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=a;function c(f,v,S){return(0,e._)`${a(f)}.call(${v}, ${S})`}ke.isOwnProperty=c;function d(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} !== undefined`;return E?(0,e._)`${I} && ${c(f,v,S)}`:I}ke.propertyInData=d;function u(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} === undefined`;return E?(0,e.or)(I,(0,e.not)(c(f,v,S))):I}ke.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}ke.allSchemaProperties=h;function y(f,v){return h(v).filter(S=>!(0,t.alwaysValidSchema)(f,v[S]))}ke.schemaProperties=y;function _({schemaCode:f,data:v,it:{gen:S,topSchemaRef:E,schemaPath:I,errorPath:O},it:j},L,G,Y){const Q=Y?(0,e._)`${f}, ${v}, ${E}${I}`:v,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 pe=(0,e._)`${Q}, ${S.object(...oe)}`;return G!==e.nil?(0,e._)`${L}.call(${G}, ${pe})`:(0,e._)`${L}(${pe})`}ke.callValidateCode=_;const b=(0,e._)`new RegExp`;function g({gen:f,it:{opts:v}},S){const E=v.unicodeRegExp?"u":"",{regExp:I}=v.code,O=I(S,E);return f.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${I.code==="new RegExp"?b:(0,i.useFunc)(f,I)}(${S}, ${E})`})}ke.usePattern=g;function m(f){const{gen:v,data:S,keyword:E,it:I}=f,O=v.name("valid");if(I.allErrors){const L=v.let("valid",!0);return j(()=>v.assign(L,!1)),L}return v.var(O,!0),j(()=>v.break()),O;function j(L){const G=v.const("len",(0,e._)`${S}.length`);v.forRange("i",0,G,Y=>{f.subschema({keyword:E,dataProp:Y,dataPropType:t.Type.Num},O),v.if((0,e.not)(O),L)})}}ke.validateArray=m;function $(f){const{gen:v,schema:S,keyword:E,it:I}=f;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(G=>(0,t.alwaysValidSchema)(I,G))&&!I.opts.unevaluated)return;const j=v.let("valid",!1),L=v.name("_valid");v.block(()=>S.forEach((G,Y)=>{const Q=f.subschema({keyword:E,schemaProp:Y,compositeRule:!0},L);v.assign(j,(0,e._)`${j} || ${L}`),f.mergeValidEvaluated(Q,L)||v.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return ke.validateUnion=$,ke}var vu;function Y$(){if(vu)return ft;vu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=ye(),t=Rt(),r=gt(),i=Zi();function n(y,_){const{gen:b,keyword:g,schema:m,parentSchema:$,it:f}=y,v=_.macro.call(f.self,m,$,f),S=d(b,g,v);f.opts.validateSchema!==!1&&f.self.validateSchema(v,!0);const E=b.name("valid");y.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:!0},E),y.pass(E,()=>y.error(!0))}ft.macroKeywordCode=n;function o(y,_){var b;const{gen:g,keyword:m,schema:$,parentSchema:f,$data:v,it:S}=y;c(S,_);const E=!v&&_.compile?_.compile.call(S.self,$,f,S):_.validate,I=d(g,m,E),O=g.let("valid");y.block$data(O,j),y.ok((b=_.valid)!==null&&b!==void 0?b:O);function j(){if(_.errors===!1)Y(),_.modifying&&s(y),Q(()=>y.error());else{const oe=_.async?L():G();_.modifying&&s(y),Q(()=>a(y,oe))}}function L(){const oe=g.let("ruleErrs",null);return g.try(()=>Y((0,e._)`await `),pe=>g.assign(O,!1).if((0,e._)`${pe} instanceof ${S.ValidationError}`,()=>g.assign(oe,(0,e._)`${pe}.errors`),()=>g.throw(pe))),oe}function G(){const oe=(0,e._)`${I}.errors`;return g.assign(oe,null),Y(e.nil),oe}function Y(oe=_.async?(0,e._)`await `:e.nil){const pe=S.opts.passContext?t.default.this:t.default.self,R=!("compile"in _&&!v||_.schema===!1);g.assign(O,(0,e._)`${oe}${(0,r.callValidateCode)(y,I,pe,R)}`,_.modifying)}function Q(oe){var pe;g.if((0,e.not)((pe=_.valid)!==null&&pe!==void 0?pe:O),oe)}}ft.funcKeywordCode=o;function s(y){const{gen:_,data:b,it:g}=y;_.if(g.parentData,()=>_.assign(b,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function a(y,_){const{gen:b}=y;b.if((0,e._)`Array.isArray(${_})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(y)},()=>y.error())}function c({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function d(y,_,b){if(b===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function u(y,_,b=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||b&&typeof y>"u")}ft.validSchemaType=u;function h({schema:y,opts:_,self:b,errSchemaPath:g},m,$){if(Array.isArray(m.keyword)?!m.keyword.includes($):m.keyword!==$)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${$}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(y[$])){const S=`keyword "${$}" value is invalid at path "${g}": `+b.errorsText(m.validateSchema.errors);if(_.validateSchema==="log")b.logger.error(S);else throw new Error(S)}}return ft.validateKeywordUsage=h,ft}var St={},$u;function Q$(){if($u)return St;$u=1,Object.defineProperty(St,"__esModule",{value:!0}),St.extendSubschemaMode=St.extendSubschemaData=St.getSubschema=void 0;const e=ye(),t=_e();function r(o,{keyword:s,schemaProp:a,schema:c,schemaPath:d,errSchemaPath:u,topSchemaRef:h}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const y=o.schema[s];return a===void 0?{schema:y,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:y[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(c!==void 0){if(d===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:d,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}St.getSubschema=r;function i(o,s,{dataProp:a,dataPropType:c,data:d,dataTypes:u,propertyName:h}){if(d!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=s;if(a!==void 0){const{errorPath:b,dataPathArr:g,opts:m}=s,$=y.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);_($),o.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(a,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...g,o.parentDataProperty]}if(d!==void 0){const b=d instanceof e.Name?d:y.let("data",d,!0);_(b),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function _(b){o.data=b,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,b]}}St.extendSubschemaData=i;function n(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:c,createErrors:d,allErrors:u}){c!==void 0&&(o.compositeRule=c),d!==void 0&&(o.createErrors=d),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return St.extendSubschemaMode=n,St}var Ge={},so,bu;function Bp(){return bu||(bu=1,so=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}),so}var ao={exports:{}},_u;function eb(){if(_u)return ao.exports;_u=1;var e=ao.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,c,d,u,h,y){if(s&&typeof s=="object"&&!Array.isArray(s)){n(s,a,c,d,u,h,y);for(var _ in s){var b=s[_];if(Array.isArray(b)){if(_ in e.arrayKeywords)for(var g=0;g<b.length;g++)t(i,n,o,b[g],a+"/"+_+"/"+g,c,a,_,s,g)}else if(_ in e.propsKeywords){if(b&&typeof b=="object")for(var m in b)t(i,n,o,b[m],a+"/"+_+"/"+r(m),c,a,_,s,m)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,n,o,b,a+"/"+_,c,a,_,s)}o(s,a,c,d,u,h,y)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return ao.exports}var wu;function Mi(){if(wu)return Ge;wu=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const e=_e(),t=Bp(),r=eb(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(g,m=!0){return typeof g=="boolean"?!0:m===!0?!s(g):m?a(g)<=m:!1}Ge.inlineRef=n;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(const m in g){if(o.has(m))return!0;const $=g[m];if(Array.isArray($)&&$.some(s)||typeof $=="object"&&s($))return!0}return!1}function a(g){let m=0;for(const $ in g){if($==="$ref")return 1/0;if(m++,!i.has($)&&(typeof g[$]=="object"&&(0,e.eachItem)(g[$],f=>m+=a(f)),m===1/0))return 1/0}return m}function c(g,m="",$){$!==!1&&(m=h(m));const f=g.parse(m);return d(g,f)}Ge.getFullPath=c;function d(g,m){return g.serialize(m).split("#")[0]+"#"}Ge._getFullPath=d;const u=/#\/?$/;function h(g){return g?g.replace(u,""):""}Ge.normalizeId=h;function y(g,m,$){return $=h($),g.resolve(m,$)}Ge.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function b(g,m){if(typeof g=="boolean")return{};const{schemaId:$,uriResolver:f}=this.opts,v=h(g[$]||m),S={"":v},E=c(f,v,!1),I={},O=new Set;return r(g,{allKeys:!0},(G,Y,Q,oe)=>{if(oe===void 0)return;const pe=E+Y;let R=S[oe];typeof G[$]=="string"&&(R=X.call(this,G[$])),ie.call(this,G.$anchor),ie.call(this,G.$dynamicAnchor),S[Y]=R;function X(re){const ce=this.opts.uriResolver.resolve;if(re=h(R?ce(R,re):re),O.has(re))throw L(re);O.add(re);let K=this.refs[re];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?j(G,K.schema,re):re!==h(pe)&&(re[0]==="#"?(j(G,I[re],re),I[re]=G):this.refs[re]=pe),re}function ie(re){if(typeof re=="string"){if(!_.test(re))throw new Error(`invalid anchor "${re}"`);X.call(this,`#${re}`)}}}),I;function j(G,Y,Q){if(Y!==void 0&&!t(G,Y))throw L(Q)}function L(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ge.getSchemaRefs=b,Ge}var ku;function qi(){if(ku)return wt;ku=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;const e=H$(),t=pi(),r=Cp(),i=pi(),n=X$(),o=Y$(),s=Q$(),a=ye(),c=Rt(),d=Mi(),u=_e(),h=Zi();function y(z){if(E(z)&&(O(z),S(z))){m(z);return}_(z,()=>(0,e.topBoolOrEmptySchema)(z))}wt.validateFunctionCode=y;function _({gen:z,validateName:U,schema:M,schemaEnv:J,opts:ne},ae){ne.code.es5?z.func(U,(0,a._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{z.code((0,a._)`"use strict"; ${f(M,ne)}`),g(z,ne),z.code(ae)}):z.func(U,(0,a._)`${c.default.data}, ${b(ne)}`,J.$async,()=>z.code(f(M,ne)).code(ae))}function b(z){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${z.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function g(z,U){z.if(c.default.valCxt,()=>{z.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),z.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),z.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),z.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),U.dynamicRef&&z.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{z.var(c.default.instancePath,(0,a._)`""`),z.var(c.default.parentData,(0,a._)`undefined`),z.var(c.default.parentDataProperty,(0,a._)`undefined`),z.var(c.default.rootData,c.default.data),U.dynamicRef&&z.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function m(z){const{schema:U,opts:M,gen:J}=z;_(z,()=>{M.$comment&&U.$comment&&oe(z),G(z),J.let(c.default.vErrors,null),J.let(c.default.errors,0),M.unevaluated&&$(z),j(z),pe(z)})}function $(z){const{gen:U,validateName:M}=z;z.evaluated=U.const("evaluated",(0,a._)`${M}.evaluated`),U.if((0,a._)`${z.evaluated}.dynamicProps`,()=>U.assign((0,a._)`${z.evaluated}.props`,(0,a._)`undefined`)),U.if((0,a._)`${z.evaluated}.dynamicItems`,()=>U.assign((0,a._)`${z.evaluated}.items`,(0,a._)`undefined`))}function f(z,U){const M=typeof z=="object"&&z[U.schemaId];return M&&(U.code.source||U.code.process)?(0,a._)`/*# sourceURL=${M} */`:a.nil}function v(z,U){if(E(z)&&(O(z),S(z))){I(z,U);return}(0,e.boolOrEmptySchema)(z,U)}function S({schema:z,self:U}){if(typeof z=="boolean")return!z;for(const M in z)if(U.RULES.all[M])return!0;return!1}function E(z){return typeof z.schema!="boolean"}function I(z,U){const{schema:M,gen:J,opts:ne}=z;ne.$comment&&M.$comment&&oe(z),Y(z),Q(z);const ae=J.const("_errs",c.default.errors);j(z,ae),J.var(U,(0,a._)`${ae} === ${c.default.errors}`)}function O(z){(0,u.checkUnknownRules)(z),L(z)}function j(z,U){if(z.opts.jtd)return X(z,[],!1,U);const M=(0,t.getSchemaTypes)(z.schema),J=(0,t.coerceAndCheckDataType)(z,M);X(z,M,!J,U)}function L(z){const{schema:U,errSchemaPath:M,opts:J,self:ne}=z;U.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(U,ne.RULES)&&ne.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function G(z){const{schema:U,opts:M}=z;U.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(z,"default is ignored in the schema root")}function Y(z){const U=z.schema[z.opts.schemaId];U&&(z.baseId=(0,d.resolveUrl)(z.opts.uriResolver,z.baseId,U))}function Q(z){if(z.schema.$async&&!z.schemaEnv.$async)throw new Error("async schema in sync schema")}function oe({gen:z,schemaEnv:U,schema:M,errSchemaPath:J,opts:ne}){const ae=M.$comment;if(ne.$comment===!0)z.code((0,a._)`${c.default.self}.logger.log(${ae})`);else if(typeof ne.$comment=="function"){const we=(0,a.str)`${J}/$comment`,Fe=z.scopeValue("root",{ref:U.root});z.code((0,a._)`${c.default.self}.opts.$comment(${ae}, ${we}, ${Fe}.schema)`)}}function pe(z){const{gen:U,schemaEnv:M,validateName:J,ValidationError:ne,opts:ae}=z;M.$async?U.if((0,a._)`${c.default.errors} === 0`,()=>U.return(c.default.data),()=>U.throw((0,a._)`new ${ne}(${c.default.vErrors})`)):(U.assign((0,a._)`${J}.errors`,c.default.vErrors),ae.unevaluated&&R(z),U.return((0,a._)`${c.default.errors} === 0`))}function R({gen:z,evaluated:U,props:M,items:J}){M instanceof a.Name&&z.assign((0,a._)`${U}.props`,M),J instanceof a.Name&&z.assign((0,a._)`${U}.items`,J)}function X(z,U,M,J){const{gen:ne,schema:ae,data:we,allErrors:Fe,opts:Ve,self:Le}=z,{RULES:Be}=Le;if(ae.$ref&&(Ve.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ae,Be))){ne.block(()=>ee(z,"$ref",Be.all.$ref.definition));return}Ve.jtd||re(z,U),ne.block(()=>{for(const Je of Be.rules)zt(Je);zt(Be.post)});function zt(Je){(0,r.shouldUseGroup)(ae,Je)&&(Je.type?(ne.if((0,i.checkDataType)(Je.type,we,Ve.strictNumbers)),ie(z,Je),U.length===1&&U[0]===Je.type&&M&&(ne.else(),(0,i.reportTypeError)(z)),ne.endIf()):ie(z,Je),Fe||ne.if((0,a._)`${c.default.errors} === ${J||0}`))}}function ie(z,U){const{gen:M,schema:J,opts:{useDefaults:ne}}=z;ne&&(0,n.assignDefaults)(z,U.type),M.block(()=>{for(const ae of U.rules)(0,r.shouldUseRule)(J,ae)&&ee(z,ae.keyword,ae.definition,U.type)})}function re(z,U){z.schemaEnv.meta||!z.opts.strictTypes||(ce(z,U),z.opts.allowUnionTypes||K(z,U),T(z,z.dataTypes))}function ce(z,U){if(U.length){if(!z.dataTypes.length){z.dataTypes=U;return}U.forEach(M=>{P(z.dataTypes,M)||x(z,`type "${M}" not allowed by context "${z.dataTypes.join(",")}"`)}),w(z,U)}}function K(z,U){U.length>1&&!(U.length===2&&U.includes("null"))&&x(z,"use allowUnionTypes to allow union type keyword")}function T(z,U){const M=z.self.RULES.all;for(const J in M){const ne=M[J];if(typeof ne=="object"&&(0,r.shouldUseRule)(z.schema,ne)){const{type:ae}=ne.definition;ae.length&&!ae.some(we=>F(U,we))&&x(z,`missing type "${ae.join(",")}" for keyword "${J}"`)}}}function F(z,U){return z.includes(U)||U==="number"&&z.includes("integer")}function P(z,U){return z.includes(U)||U==="integer"&&z.includes("number")}function w(z,U){const M=[];for(const J of z.dataTypes)P(U,J)?M.push(J):U.includes("integer")&&J==="number"&&M.push("integer");z.dataTypes=M}function x(z,U){const M=z.schemaEnv.baseId+z.errSchemaPath;U+=` at "${M}" (strictTypes)`,(0,u.checkStrictMode)(z,U,z.opts.strictTypes)}class B{constructor(U,M,J){if((0,o.validateKeywordUsage)(U,M,J),this.gen=U.gen,this.allErrors=U.allErrors,this.keyword=J,this.data=U.data,this.schema=U.schema[J],this.$data=M.$data&&U.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(U,this.schema,J,this.$data),this.schemaType=M.schemaType,this.parentSchema=U.schema,this.params={},this.it=U,this.def=M,this.$data)this.schemaCode=U.gen.const("vSchema",se(this.$data,U));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=U.gen.const("_errs",c.default.errors))}result(U,M,J){this.failResult((0,a.not)(U),M,J)}failResult(U,M,J){this.gen.if(U),J?J():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(U,M){this.failResult((0,a.not)(U),void 0,M)}fail(U){if(U===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(U),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(U){if(!this.$data)return this.fail(U);const{schemaCode:M}=this;this.fail((0,a._)`${M} !== undefined && (${(0,a.or)(this.invalid$data(),U)})`)}error(U,M,J){if(M){this.setParams(M),this._error(U,J),this.setParams({});return}this._error(U,J)}_error(U,M){(U?h.reportExtraError:h.reportError)(this,this.def.error,M)}$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(U){this.allErrors||this.gen.if(U)}setParams(U,M){M?Object.assign(this.params,U):this.params=U}block$data(U,M,J=a.nil){this.gen.block(()=>{this.check$data(U,J),M()})}check$data(U=a.nil,M=a.nil){if(!this.$data)return;const{gen:J,schemaCode:ne,schemaType:ae,def:we}=this;J.if((0,a.or)((0,a._)`${ne} === undefined`,M)),U!==a.nil&&J.assign(U,!0),(ae.length||we.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),U!==a.nil&&J.assign(U,!1)),J.else()}invalid$data(){const{gen:U,schemaCode:M,schemaType:J,def:ne,it:ae}=this;return(0,a.or)(we(),Fe());function we(){if(J.length){if(!(M instanceof a.Name))throw new Error("ajv implementation error");const Ve=Array.isArray(J)?J:[J];return(0,a._)`${(0,i.checkDataTypes)(Ve,M,ae.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function Fe(){if(ne.validateSchema){const Ve=U.scopeValue("validate$data",{ref:ne.validateSchema});return(0,a._)`!${Ve}(${M})`}return a.nil}}subschema(U,M){const J=(0,s.getSubschema)(this.it,U);(0,s.extendSubschemaData)(J,this.it,U),(0,s.extendSubschemaMode)(J,U);const ne={...this.it,...J,items:void 0,props:void 0};return v(ne,M),ne}mergeEvaluated(U,M){const{it:J,gen:ne}=this;J.opts.unevaluated&&(J.props!==!0&&U.props!==void 0&&(J.props=u.mergeEvaluated.props(ne,U.props,J.props,M)),J.items!==!0&&U.items!==void 0&&(J.items=u.mergeEvaluated.items(ne,U.items,J.items,M)))}mergeValidEvaluated(U,M){const{it:J,gen:ne}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ne.if(M,()=>this.mergeEvaluated(U,a.Name)),!0}}wt.KeywordCxt=B;function ee(z,U,M,J){const ne=new B(z,M,U);"code"in M?M.code(ne,J):ne.$data&&M.validate?(0,o.funcKeywordCode)(ne,M):"macro"in M?(0,o.macroKeywordCode)(ne,M):(M.compile||M.validate)&&(0,o.funcKeywordCode)(ne,M)}const te=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(z,{dataLevel:U,dataNames:M,dataPathArr:J}){let ne,ae;if(z==="")return c.default.rootData;if(z[0]==="/"){if(!te.test(z))throw new Error(`Invalid JSON-pointer: ${z}`);ne=z,ae=c.default.rootData}else{const Le=me.exec(z);if(!Le)throw new Error(`Invalid JSON-pointer: ${z}`);const Be=+Le[1];if(ne=Le[2],ne==="#"){if(Be>=U)throw new Error(Ve("property/index",Be));return J[U-Be]}if(Be>U)throw new Error(Ve("data",Be));if(ae=M[U-Be],!ne)return ae}let we=ae;const Fe=ne.split("/");for(const Le of Fe)Le&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Le))}`,we=(0,a._)`${we} && ${ae}`);return we;function Ve(Le,Be){return`Cannot access ${Le} ${Be} levels up, current level is ${U}`}}return wt.getData=se,wt}var mr={},Su;function Na(){if(Su)return mr;Su=1,Object.defineProperty(mr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return mr.default=e,mr}var gr={},Iu;function Vi(){if(Iu)return gr;Iu=1,Object.defineProperty(gr,"__esModule",{value:!0});const e=Mi();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 gr.default=t,gr}var tt={},Eu;function Oa(){if(Eu)return tt;Eu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const e=ye(),t=Na(),r=Rt(),i=Mi(),n=_e(),o=qi();class s{constructor($){var f;this.refs={},this.dynamicAnchors={};let v;typeof $.schema=="object"&&(v=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(f=$.baseId)!==null&&f!==void 0?f:(0,i.normalizeId)(v?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=v?.$async,this.refs={}}}tt.SchemaEnv=s;function a(m){const $=u.call(this,m);if($)return $;const f=(0,i.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:v,lines:S}=this.opts.code,{ownProperties:E}=this.opts,I=new e.CodeGen(this.scope,{es5:v,lines:S,ownProperties:E});let O;m.$async&&(O=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=I.scopeName("validate");m.validateName=j;const L={gen:I,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:I.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:O,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(m),(0,o.validateFunctionCode)(L),I.optimize(this.opts.code.optimize);const Y=I.toString();G=`${I.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(G=this.opts.code.process(G,m));const oe=new Function(`${r.default.self}`,`${r.default.scope}`,G)(this,this.scope.get());if(this.scope.value(j,{ref:oe}),oe.errors=null,oe.schema=m.schema,oe.schemaEnv=m,m.$async&&(oe.$async=!0),this.opts.code.source===!0&&(oe.source={validateName:j,validateCode:Y,scopeValues:I._values}),this.opts.unevaluated){const{props:pe,items:R}=L;oe.evaluated={props:pe instanceof e.Name?void 0:pe,items:R instanceof e.Name?void 0:R,dynamicProps:pe instanceof e.Name,dynamicItems:R instanceof e.Name},oe.source&&(oe.source.evaluated=(0,e.stringify)(oe.evaluated))}return m.validate=oe,m}catch(Y){throw delete m.validate,delete m.validateName,G&&this.logger.error("Error compiling schema, function code:",G),Y}finally{this._compilations.delete(m)}}tt.compileSchema=a;function c(m,$,f){var v;f=(0,i.resolveUrl)(this.opts.uriResolver,$,f);const S=m.refs[f];if(S)return S;let E=y.call(this,m,f);if(E===void 0){const I=(v=m.localRefs)===null||v===void 0?void 0:v[f],{schemaId:O}=this.opts;I&&(E=new s({schema:I,schemaId:O,root:m,baseId:$}))}if(E!==void 0)return m.refs[f]=d.call(this,E)}tt.resolveRef=c;function d(m){return(0,i.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:a.call(this,m)}function u(m){for(const $ of this._compilations)if(h($,m))return $}tt.getCompilingSchema=u;function h(m,$){return m.schema===$.schema&&m.root===$.root&&m.baseId===$.baseId}function y(m,$){let f;for(;typeof(f=this.refs[$])=="string";)$=f;return f||this.schemas[$]||_.call(this,m,$)}function _(m,$){const f=this.opts.uriResolver.parse($),v=(0,i._getFullPath)(this.opts.uriResolver,f);let S=(0,i.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&v===S)return g.call(this,f,m);const E=(0,i.normalizeId)(v),I=this.refs[E]||this.schemas[E];if(typeof I=="string"){const O=_.call(this,m,I);return typeof O?.schema!="object"?void 0:g.call(this,f,O)}if(typeof I?.schema=="object"){if(I.validate||a.call(this,I),E===(0,i.normalizeId)($)){const{schema:O}=I,{schemaId:j}=this.opts,L=O[j];return L&&(S=(0,i.resolveUrl)(this.opts.uriResolver,S,L)),new s({schema:O,schemaId:j,root:m,baseId:S})}return g.call(this,f,I)}}tt.resolveSchema=_;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(m,{baseId:$,schema:f,root:v}){var S;if(((S=m.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,n.unescapeFragment)(O)];if(j===void 0)return;f=j;const L=typeof f=="object"&&f[this.opts.schemaId];!b.has(O)&&L&&($=(0,i.resolveUrl)(this.opts.uriResolver,$,L))}let E;if(typeof f!="boolean"&&f.$ref&&!(0,n.schemaHasRulesButRef)(f,this.RULES)){const O=(0,i.resolveUrl)(this.opts.uriResolver,$,f.$ref);E=_.call(this,v,O)}const{schemaId:I}=this.opts;if(E=E||new s({schema:f,schemaId:I,root:v,baseId:$}),E.schema!==E.root.schema)return E}return tt}const tb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",nb="Meta-schema for $data reference (JSON AnySchema extension proposal)",rb="object",ib=["$data"],ob={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},sb=!1;var ab={$id:tb,description:nb,type:rb,required:ib,properties:ob,additionalProperties:sb},yr={},Tn={exports:{}},uo,Nu;function ub(){return Nu||(Nu=1,uo={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),uo}var co,Ou;function cb(){if(Ou)return co;Ou=1;const{HEX:e}=ub(),t=/^(?:(?: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(g){if(a(g,".")<3)return{host:g,isIPV4:!1};const m=g.match(t)||[],[$]=m;return $?{host:s($,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function i(g,m=!1){let $="",f=!0;for(const v of g){if(e[v]===void 0)return;v!=="0"&&f===!0&&(f=!1),f||($+=v)}return m&&$.length===0&&($="0"),$}function n(g){let m=0;const $={error:!1,address:"",zone:""},f=[],v=[];let S=!1,E=!1,I=!1;function O(){if(v.length){if(S===!1){const j=i(v);if(j!==void 0)f.push(j);else return $.error=!0,!1}v.length=0}return!0}for(let j=0;j<g.length;j++){const L=g[j];if(!(L==="["||L==="]"))if(L===":"){if(E===!0&&(I=!0),!O())break;if(m++,f.push(":"),m>7){$.error=!0;break}j-1>=0&&g[j-1]===":"&&(E=!0);continue}else if(L==="%"){if(!O())break;S=!0}else{v.push(L);continue}}return v.length&&(S?$.zone=v.join(""):I?f.push(v.join("")):f.push(i(v))),$.address=f.join(""),$}function o(g){if(a(g,":")<2)return{host:g,isIPV6:!1};const m=n(g);if(m.error)return{host:g,isIPV6:!1};{let $=m.address,f=m.address;return m.zone&&($+="%"+m.zone,f+="%25"+m.zone),{host:$,escapedHost:f,isIPV6:!0}}}function s(g,m){let $="",f=!0;const v=g.length;for(let S=0;S<v;S++){const E=g[S];E==="0"&&f?(S+1<=v&&g[S+1]===m||S+1===v)&&($+=E,f=!1):(E===m?f=!0:f=!1,$+=E)}return $}function a(g,m){let $=0;for(let f=0;f<g.length;f++)g[f]===m&&$++;return $}const c=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,h=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const m=[];for(;g.length;)if(g.match(c))g=g.replace(c,"");else if(g.match(d))g=g.replace(d,"/");else if(g.match(u))g=g.replace(u,"/"),m.pop();else if(g==="."||g==="..")g="";else{const $=g.match(h);if($){const f=$[0];g=g.slice(f.length),m.push(f)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function _(g,m){const $=m!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=$(g.scheme)),g.userinfo!==void 0&&(g.userinfo=$(g.userinfo)),g.host!==void 0&&(g.host=$(g.host)),g.path!==void 0&&(g.path=$(g.path)),g.query!==void 0&&(g.query=$(g.query)),g.fragment!==void 0&&(g.fragment=$(g.fragment)),g}function b(g){const m=[];if(g.userinfo!==void 0&&(m.push(g.userinfo),m.push("@")),g.host!==void 0){let $=unescape(g.host);const f=r($);if(f.isIPV4)$=f.host;else{const v=o(f.host);v.isIPV6===!0?$=`[${v.escapedHost}]`:$=g.host}m.push($)}return(typeof g.port=="number"||typeof g.port=="string")&&(m.push(":"),m.push(String(g.port))),m.length?m.join(""):void 0}return co={recomposeAuthority:b,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:i},co}var lo,xu;function lb(){if(xu)return lo;xu=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}function i(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function n(f){const v=String(f.scheme).toLowerCase()==="https";return(f.port===(v?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function o(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function s(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){const[v,S]=f.resourceName.split("?");f.path=v&&v!=="/"?v:void 0,f.query=S,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,v){if(!f.path)return f.error="URN can not be parsed",f;const S=f.path.match(t);if(S){const E=v.scheme||f.scheme||"urn";f.nid=S[1].toLowerCase(),f.nss=S[2];const I=`${E}:${v.nid||f.nid}`,O=$[I];f.path=void 0,O&&(f=O.parse(f,v))}else f.error=f.error||"URN can not be parsed.";return f}function c(f,v){const S=v.scheme||f.scheme||"urn",E=f.nid.toLowerCase(),I=`${S}:${v.nid||E}`,O=$[I];O&&(f=O.serialize(f,v));const j=f,L=f.nss;return j.path=`${E||v.nid}:${L}`,v.skipEscape=!0,j}function d(f,v){const S=f;return S.uuid=S.nss,S.nss=void 0,!v.tolerant&&(!S.uuid||!e.test(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function u(f){const v=f;return v.nss=(f.uuid||"").toLowerCase(),v}const h={scheme:"http",domainHost:!0,parse:i,serialize:n},y={scheme:"https",domainHost:h.domainHost,parse:i,serialize:n},_={scheme:"ws",domainHost:!0,parse:o,serialize:s},b={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},$={http:h,https:y,ws:_,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:u,skipNormalize:!0}};return lo=$,lo}var ju;function fb(){if(ju)return Tn.exports;ju=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:n}=cb(),o=lb();function s(m,$){return typeof m=="string"?m=u(b(m,$),$):typeof m=="object"&&(m=b(u(m,$),$)),m}function a(m,$,f){const v=Object.assign({scheme:"null"},f),S=c(b(m,v),b($,v),v,!0);return u(S,{...v,skipEscape:!0})}function c(m,$,f,v){const S={};return v||(m=b(u(m,f),f),$=b(u($,f),f)),f=f||{},!f.tolerant&&$.scheme?(S.scheme=$.scheme,S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.userinfo!==void 0||$.host!==void 0||$.port!==void 0?(S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.path?($.path.charAt(0)==="/"?S.path=r($.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?S.path="/"+$.path:m.path?S.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+$.path:S.path=$.path,S.path=r(S.path)),S.query=$.query):(S.path=m.path,$.query!==void 0?S.query=$.query:S.query=m.query),S.userinfo=m.userinfo,S.host=m.host,S.port=m.port),S.scheme=m.scheme),S.fragment=$.fragment,S}function d(m,$,f){return typeof m=="string"?(m=unescape(m),m=u(n(b(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=u(n(m,!0),{...f,skipEscape:!0})),typeof $=="string"?($=unescape($),$=u(n(b($,f),!0),{...f,skipEscape:!0})):typeof $=="object"&&($=u(n($,!0),{...f,skipEscape:!0})),m.toLowerCase()===$.toLowerCase()}function u(m,$){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},v=Object.assign({},$),S=[],E=o[(v.scheme||f.scheme||"").toLowerCase()];E&&E.serialize&&E.serialize(f,v),f.path!==void 0&&(v.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),v.reference!=="suffix"&&f.scheme&&S.push(f.scheme,":");const I=i(f);if(I!==void 0&&(v.reference!=="suffix"&&S.push("//"),S.push(I),f.path&&f.path.charAt(0)!=="/"&&S.push("/")),f.path!==void 0){let O=f.path;!v.absolutePath&&(!E||!E.absolutePath)&&(O=r(O)),I===void 0&&(O=O.replace(/^\/\//u,"/%2F")),S.push(O)}return f.query!==void 0&&S.push("?",f.query),f.fragment!==void 0&&S.push("#",f.fragment),S.join("")}const h=Array.from({length:127},(m,$)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode($)));function y(m){let $=0;for(let f=0,v=m.length;f<v;++f)if($=m.charCodeAt(f),$>126||h[$])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(m,$){const f=Object.assign({},$),v={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},S=m.indexOf("%")!==-1;let E=!1;f.reference==="suffix"&&(m=(f.scheme?f.scheme+":":"")+"//"+m);const I=m.match(_);if(I){if(v.scheme=I[1],v.userinfo=I[3],v.host=I[4],v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=I[7],v.fragment=I[8],isNaN(v.port)&&(v.port=I[5]),v.host){const j=t(v.host);if(j.isIPV4===!1){const L=e(j.host);v.host=L.host.toLowerCase(),E=L.isIPV6}else v.host=j.host,E=!0}v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&v.query===void 0&&!v.path?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==v.reference&&(v.error=v.error||"URI is not a "+f.reference+" reference.");const O=o[(f.scheme||v.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!O||!O.unicodeSupport)&&v.host&&(f.domainHost||O&&O.domainHost)&&E===!1&&y(v.host))try{v.host=URL.domainToASCII(v.host.toLowerCase())}catch(j){v.error=v.error||"Host's domain name can not be converted to ASCII: "+j}(!O||O&&!O.skipNormalize)&&(S&&v.scheme!==void 0&&(v.scheme=unescape(v.scheme)),S&&v.host!==void 0&&(v.host=unescape(v.host)),v.path&&(v.path=escape(unescape(v.path))),v.fragment&&(v.fragment=encodeURI(decodeURIComponent(v.fragment)))),O&&O.parse&&O.parse(v,f)}else v.error=v.error||"URI can not be parsed.";return v}const g={SCHEMES:o,normalize:s,resolve:a,resolveComponents:c,equal:d,serialize:u,parse:b};return Tn.exports=g,Tn.exports.default=g,Tn.exports.fastUri=g,Tn.exports}var zu;function db(){if(zu)return yr;zu=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=fb();return e.code='require("ajv/dist/runtime/uri").default',yr.default=e,yr}var Au;function hb(){return Au||(Au=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=ye();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=Na(),n=Vi(),o=Up(),s=Oa(),a=ye(),c=Mi(),d=pi(),u=_e(),h=ab,y=db(),_=(K,T)=>new RegExp(K,T);_.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={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."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function v(K){var T,F,P,w,x,B,ee,te,me,se,z,U,M,J,ne,ae,we,Fe,Ve,Le,Be,zt,Je,At,Qe;const _t=K.strict,jn=(T=K.code)===null||T===void 0?void 0:T.optimize,ct=jn===!0||jn===void 0?1:jn||0,ir=(P=(F=K.code)===null||F===void 0?void 0:F.regExp)!==null&&P!==void 0?P:_,k=(w=K.uriResolver)!==null&&w!==void 0?w:y.default;return{strictSchema:(B=(x=K.strictSchema)!==null&&x!==void 0?x:_t)!==null&&B!==void 0?B:!0,strictNumbers:(te=(ee=K.strictNumbers)!==null&&ee!==void 0?ee:_t)!==null&&te!==void 0?te:!0,strictTypes:(se=(me=K.strictTypes)!==null&&me!==void 0?me:_t)!==null&&se!==void 0?se:"log",strictTuples:(U=(z=K.strictTuples)!==null&&z!==void 0?z:_t)!==null&&U!==void 0?U:"log",strictRequired:(J=(M=K.strictRequired)!==null&&M!==void 0?M:_t)!==null&&J!==void 0?J:!1,code:K.code?{...K.code,optimize:ct,regExp:ir}:{optimize:ct,regExp:ir},loopRequired:(ne=K.loopRequired)!==null&&ne!==void 0?ne:f,loopEnum:(ae=K.loopEnum)!==null&&ae!==void 0?ae:f,meta:(we=K.meta)!==null&&we!==void 0?we:!0,messages:(Fe=K.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ve=K.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Le=K.schemaId)!==null&&Le!==void 0?Le:"$id",addUsedSchema:(Be=K.addUsedSchema)!==null&&Be!==void 0?Be:!0,validateSchema:(zt=K.validateSchema)!==null&&zt!==void 0?zt:!0,validateFormats:(Je=K.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(At=K.unicodeRegExp)!==null&&At!==void 0?At:!0,int32range:(Qe=K.int32range)!==null&&Qe!==void 0?Qe:!0,uriResolver:k}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...v(T)};const{es5:F,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:F,lines:P}),this.logger=Q(T.logger);const w=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),E.call(this,m,T,"NOT SUPPORTED"),E.call(this,$,T,"DEPRECATED","warn"),this._metaOpts=G.call(this),T.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&L.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),O.call(this),T.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:F,schemaId:P}=this.opts;let w=h;P==="id"&&(w={...h},w.id=w.$id,delete w.$id),F&&T&&this.addMetaSchema(w,w[P],!1)}defaultMeta(){const{meta:T,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[F]||T:void 0}validate(T,F){let P;if(typeof T=="string"){if(P=this.getSchema(T),!P)throw new Error(`no schema with key or ref "${T}"`)}else P=this.compile(T);const w=P(F);return"$async"in P||(this.errors=P.errors),w}compile(T,F){const P=this._addSchema(T,F);return P.validate||this._compileSchemaEnv(P)}compileAsync(T,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return w.call(this,T,F);async function w(se,z){await x.call(this,se.$schema);const U=this._addSchema(se,z);return U.validate||B.call(this,U)}async function x(se){se&&!this.getSchema(se)&&await w.call(this,{$ref:se},!0)}async function B(se){try{return this._compileSchemaEnv(se)}catch(z){if(!(z instanceof n.default))throw z;return ee.call(this,z),await te.call(this,z.missingSchema),B.call(this,se)}}function ee({missingSchema:se,missingRef:z}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${z} cannot be resolved`)}async function te(se){const z=await me.call(this,se);this.refs[se]||await x.call(this,z.$schema),this.refs[se]||this.addSchema(z,se,F)}async function me(se){const z=this._loading[se];if(z)return z;try{return await(this._loading[se]=P(se))}finally{delete this._loading[se]}}}addSchema(T,F,P,w=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,P,w);return this}let x;if(typeof T=="object"){const{schemaId:B}=this.opts;if(x=T[B],x!==void 0&&typeof x!="string")throw new Error(`schema ${B} must be string`)}return F=(0,c.normalizeId)(F||x),this._checkUnique(F),this.schemas[F]=this._addSchema(T,P,F,w,!0),this}addMetaSchema(T,F,P=this.opts.validateSchema){return this.addSchema(T,F,!0,P),this}validateSchema(T,F){if(typeof T=="boolean")return!0;let P;if(P=T.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(P,T);if(!w&&F){const x="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(x);else throw new Error(x)}return w}getSchema(T){let F;for(;typeof(F=I.call(this,T))=="string";)T=F;if(F===void 0){const{schemaId:P}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:P});if(F=s.resolveSchema.call(this,w,T),!F)return;this.refs[T]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=I.call(this,T);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const F=T;this._cache.delete(F);let P=T[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const F of T)this.addKeyword(F);return this}addKeyword(T,F){let P;if(typeof T=="string")P=T,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=P);else if(typeof T=="object"&&F===void 0){if(F=T,P=F.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(pe.call(this,P,F),!F)return(0,u.eachItem)(P,x=>R.call(this,x)),this;ie.call(this,F);const w={...F,type:(0,d.getJSONTypes)(F.type),schemaType:(0,d.getJSONTypes)(F.schemaType)};return(0,u.eachItem)(P,w.type.length===0?x=>R.call(this,x,w):x=>w.type.forEach(B=>R.call(this,x,w,B))),this}getKeyword(T){const F=this.RULES.all[T];return typeof F=="object"?F.definition:!!F}removeKeyword(T){const{RULES:F}=this;delete F.keywords[T],delete F.all[T];for(const P of F.rules){const w=P.rules.findIndex(x=>x.keyword===T);w>=0&&P.rules.splice(w,1)}return this}addFormat(T,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[T]=F,this}errorsText(T=this.errors,{separator:F=", ",dataVar:P="data"}={}){return!T||T.length===0?"No errors":T.map(w=>`${P}${w.instancePath} ${w.message}`).reduce((w,x)=>w+F+x)}$dataMetaSchema(T,F){const P=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const w of F){const x=w.split("/").slice(1);let B=T;for(const ee of x)B=B[ee];for(const ee in P){const te=P[ee];if(typeof te!="object")continue;const{$data:me}=te.definition,se=B[ee];me&&se&&(B[ee]=ce(se))}}return T}_removeAllSchemas(T,F){for(const P in T){const w=T[P];(!F||F.test(P))&&(typeof w=="string"?delete T[P]:w&&!w.meta&&(this._cache.delete(w.schema),delete T[P]))}}_addSchema(T,F,P,w=this.opts.validateSchema,x=this.opts.addUsedSchema){let B;const{schemaId:ee}=this.opts;if(typeof T=="object")B=T[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get(T);if(te!==void 0)return te;P=(0,c.normalizeId)(B||P);const me=c.getSchemaRefs.call(this,T,P);return te=new s.SchemaEnv({schema:T,schemaId:ee,meta:F,baseId:P,localRefs:me}),this._cache.set(te.schema,te),x&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=te),w&&this.validateSchema(T,!0),te}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):s.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,T)}finally{this.opts=F}}}S.ValidationError=i.default,S.MissingRefError=n.default,e.default=S;function E(K,T,F,P="error"){for(const w in K){const x=w;x in T&&this.logger[P](`${F}: option ${w}. ${K[x]}`)}}function I(K){return K=(0,c.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 T in K)this.addSchema(K[T],T)}function j(){for(const K in this.opts.formats){const T=this.opts.formats[K];T&&this.addFormat(K,T)}}function L(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in K){const F=K[T];F.keyword||(F.keyword=T),this.addKeyword(F)}}function G(){const K={...this.opts};for(const T of b)delete K[T];return K}const Y={log(){},warn(){},error(){}};function Q(K){if(K===!1)return Y;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 pe(K,T){const{RULES:F}=this;if((0,u.eachItem)(K,P=>{if(F.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!oe.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function R(K,T,F){var P;const w=T?.post;if(F&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:x}=this;let B=w?x.post:x.rules.find(({type:te})=>te===F);if(B||(B={type:F,rules:[]},x.rules.push(B)),x.keywords[K]=!0,!T)return;const ee={keyword:K,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?X.call(this,B,ee,T.before):B.rules.push(ee),x.all[K]=ee,(P=T.implements)===null||P===void 0||P.forEach(te=>this.addKeyword(te))}function X(K,T,F){const P=K.rules.findIndex(w=>w.keyword===F);P>=0?K.rules.splice(P,0,T):(K.rules.push(T),this.logger.warn(`rule ${F} is not defined`))}function ie(K){let{metaSchema:T}=K;T!==void 0&&(K.$data&&this.opts.$data&&(T=ce(T)),K.validateSchema=this.compile(T,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(K){return{anyOf:[K,re]}}}(to)),to}var vr={},$r={},br={},Tu;function pb(){if(Tu)return br;Tu=1,Object.defineProperty(br,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return br.default=e,br}var Tt={},Pu;function mb(){if(Pu)return Tt;Pu=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.callRef=Tt.getValidate=void 0;const e=Vi(),t=gt(),r=ye(),i=Rt(),n=Oa(),o=_e(),s={keyword:"$ref",schemaType:"string",code(d){const{gen:u,schema:h,it:y}=d,{baseId:_,schemaEnv:b,validateName:g,opts:m,self:$}=y,{root:f}=b;if((h==="#"||h==="#/")&&_===f.baseId)return S();const v=n.resolveRef.call($,f,_,h);if(v===void 0)throw new e.default(y.opts.uriResolver,_,h);if(v instanceof n.SchemaEnv)return E(v);return I(v);function S(){if(b===f)return c(d,g,b,b.$async);const O=u.scopeValue("root",{ref:f});return c(d,(0,r._)`${O}.validate`,f,f.$async)}function E(O){const j=a(d,O);c(d,j,O,O.$async)}function I(O){const j=u.scopeValue("schema",m.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),L=u.name("valid"),G=d.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},L);d.mergeEvaluated(G),d.ok(L)}}};function a(d,u){const{gen:h}=d;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}Tt.getValidate=a;function c(d,u,h,y){const{gen:_,it:b}=d,{allErrors:g,schemaEnv:m,opts:$}=b,f=$.passContext?i.default.this:r.nil;y?v():S();function v(){if(!m.$async)throw new Error("async schema referenced by sync schema");const O=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(d,u,f)}`),I(u),g||_.assign(O,!0)},j=>{_.if((0,r._)`!(${j} instanceof ${b.ValidationError})`,()=>_.throw(j)),E(j),g||_.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,u,f),()=>I(u),()=>E(u))}function E(O){const j=(0,r._)`${O}.errors`;_.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${j} : ${i.default.vErrors}.concat(${j})`),_.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function I(O){var j;if(!b.opts.unevaluated)return;const L=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if(b.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(b.props=o.mergeEvaluated.props(_,L.props,b.props));else{const G=_.var("props",(0,r._)`${O}.evaluated.props`);b.props=o.mergeEvaluated.props(_,G,b.props,r.Name)}if(b.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(b.items=o.mergeEvaluated.items(_,L.items,b.items));else{const G=_.var("items",(0,r._)`${O}.evaluated.items`);b.items=o.mergeEvaluated.items(_,G,b.items,r.Name)}}}return Tt.callRef=c,Tt.default=s,Tt}var Du;function gb(){if(Du)return $r;Du=1,Object.defineProperty($r,"__esModule",{value:!0});const e=pb(),t=mb(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $r.default=r,$r}var _r={},wr={},Uu;function yb(){if(Uu)return wr;Uu=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ye(),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:c}=o;o.fail$data((0,e._)`${a} ${r[s].fail} ${c} || isNaN(${a})`)}};return wr.default=n,wr}var kr={},Cu;function vb(){if(Cu)return kr;Cu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ye(),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,c=a.opts.multipleOfPrecision,d=n.let("res"),u=c?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${c}`:(0,e._)`${d} !== parseInt(${d})`;i.fail$data((0,e._)`(${s} === 0 || (${d} = ${o}/${s}, ${u}))`)}};return kr.default=r,kr}var Sr={},Ir={},Bu;function $b(){if(Bu)return Ir;Bu=1,Object.defineProperty(Ir,"__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 Ir.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ir}var Ru;function bb(){if(Ru)return Sr;Ru=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ye(),t=_e(),r=$b(),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:c,it:d}=o,u=s==="maxLength"?e.operators.GT:e.operators.LT,h=d.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return Sr.default=n,Sr}var Er={},Fu;function _b(){if(Fu)return Er;Fu=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=gt(),t=ye(),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:c,it:d}=n,u=d.opts.unicodeRegExp?"u":"",h=s?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(n,a);n.fail$data((0,t._)`!${h}.test(${o})`)}};return Er.default=i,Er}var Nr={},Lu;function wb(){if(Lu)return Nr;Lu=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=ye(),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 Nr.default=r,Nr}var Or={},Zu;function kb(){if(Zu)return Or;Zu=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=gt(),t=ye(),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:c,data:d,$data:u,it:h}=o,{opts:y}=h;if(!u&&a.length===0)return;const _=a.length>=y.loopRequired;if(h.allErrors?b():g(),y.strictRequired){const f=o.parentSchema.properties,{definedProperties:v}=o.it;for(const S of a)if(f?.[S]===void 0&&!v.has(S)){const E=h.schemaEnv.baseId+h.errSchemaPath,I=`required property "${S}" is not defined at "${E}" (strictRequired)`;(0,r.checkStrictMode)(h,I,h.opts.strictRequired)}}function b(){if(_||u)o.block$data(t.nil,m);else for(const f of a)(0,e.checkReportMissingProp)(o,f)}function g(){const f=s.let("missing");if(_||u){const v=s.let("valid",!0);o.block$data(v,()=>$(f,v)),o.ok(v)}else s.if((0,e.checkMissingProp)(o,a,f)),(0,e.reportMissingProp)(o,f),s.else()}function m(){s.forOf("prop",c,f=>{o.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,d,f,y.ownProperties),()=>o.error())})}function $(f,v){o.setParams({missingProperty:f}),s.forOf(f,c,()=>{s.assign(v,(0,e.propertyInData)(s,d,f,y.ownProperties)),s.if((0,t.not)(v),()=>{o.error(),s.break()})},t.nil)}}};return Or.default=n,Or}var xr={},Mu;function Sb(){if(Mu)return xr;Mu=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ye(),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 xr.default=r,xr}var jr={},zr={},qu;function xa(){if(qu)return zr;qu=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Bp();return e.code='require("ajv/dist/runtime/equal").default',zr.default=e,zr}var Vu;function Ib(){if(Vu)return jr;Vu=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=pi(),t=ye(),r=_e(),i=xa(),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:c,$data:d,schema:u,parentSchema:h,schemaCode:y,it:_}=s;if(!d&&!u)return;const b=a.let("valid"),g=h.items?(0,e.getSchemaTypes)(h.items):[];s.block$data(b,m,(0,t._)`${y} === false`),s.ok(b);function m(){const S=a.let("i",(0,t._)`${c}.length`),E=a.let("j");s.setParams({i:S,j:E}),a.assign(b,!0),a.if((0,t._)`${S} > 1`,()=>($()?f:v)(S,E))}function $(){return g.length>0&&!g.some(S=>S==="object"||S==="array")}function f(S,E){const I=a.name("item"),O=(0,e.checkDataTypes)(g,I,_.opts.strictNumbers,e.DataType.Wrong),j=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${S}--;`,()=>{a.let(I,(0,t._)`${c}[${S}]`),a.if(O,(0,t._)`continue`),g.length>1&&a.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),a.if((0,t._)`typeof ${j}[${I}] == "number"`,()=>{a.assign(E,(0,t._)`${j}[${I}]`),s.error(),a.assign(b,!1).break()}).code((0,t._)`${j}[${I}] = ${S}`)})}function v(S,E){const I=(0,r.useFunc)(a,i.default),O=a.name("outer");a.label(O).for((0,t._)`;${S}--;`,()=>a.for((0,t._)`${E} = ${S}; ${E}--;`,()=>a.if((0,t._)`${I}(${c}[${S}], ${c}[${E}])`,()=>{s.error(),a.assign(b,!1).break(O)})))}}};return jr.default=o,jr}var Ar={},Ku;function Eb(){if(Ku)return Ar;Ku=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),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:c,schemaCode:d,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${d})`):o.fail((0,e._)`${u} !== ${a}`)}};return Ar.default=n,Ar}var Tr={},Ju;function Nb(){if(Ju)return Tr;Ju=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),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:c,schema:d,schemaCode:u,it:h}=o;if(!c&&d.length===0)throw new Error("enum must have non-empty array");const y=d.length>=h.opts.loopEnum;let _;const b=()=>_??(_=(0,t.useFunc)(s,r.default));let g;if(y||c)g=s.let("valid"),o.block$data(g,m);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const f=s.const("vSchema",u);g=(0,e.or)(...d.map((v,S)=>$(f,S)))}o.pass(g);function m(){s.assign(g,!1),s.forOf("v",u,f=>s.if((0,e._)`${b()}(${a}, ${f})`,()=>s.assign(g,!0).break()))}function $(f,v){const S=d[v];return typeof S=="object"&&S!==null?(0,e._)`${b()}(${a}, ${f}[${v}])`:(0,e._)`${a} === ${S}`}}};return Tr.default=n,Tr}var Gu;function Ob(){if(Gu)return _r;Gu=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=yb(),t=vb(),r=bb(),i=_b(),n=wb(),o=kb(),s=Sb(),a=Ib(),c=Eb(),d=Nb(),u=[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"},c.default,d.default];return _r.default=u,_r}var Pr={},sn={},Wu;function Rp(){if(Wu)return sn;Wu=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.validateAdditionalItems=void 0;const e=ye(),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:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:d,keyword:u,it:h}=o;h.items=!0;const y=a.const("len",(0,e._)`${d}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${y} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const b=a.var("valid",(0,e._)`${y} <= ${s.length}`);a.if((0,e.not)(b),()=>_(b)),o.ok(b)}function _(b){a.forRange("i",s.length,y,g=>{o.subschema({keyword:u,dataProp:g,dataPropType:t.Type.Num},b),h.allErrors||a.if((0,e.not)(b),()=>a.break())})}}return sn.validateAdditionalItems=n,sn.default=i,sn}var Dr={},an={},Hu;function Fp(){if(Hu)return an;Hu=1,Object.defineProperty(an,"__esModule",{value:!0}),an.validateTuple=void 0;const e=ye(),t=_e(),r=gt(),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:c,parentSchema:d,data:u,keyword:h,it:y}=o;g(d),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(c,a.length,y.items));const _=c.name("valid"),b=c.const("len",(0,e._)`${u}.length`);a.forEach((m,$)=>{(0,t.alwaysValidSchema)(y,m)||(c.if((0,e._)`${b} > ${$}`,()=>o.subschema({keyword:h,schemaProp:$,dataProp:$},_)),o.ok(_))});function g(m){const{opts:$,errSchemaPath:f}=y,v=a.length,S=v===m.minItems&&(v===m.maxItems||m[s]===!1);if($.strictTuples&&!S){const E=`"${h}" is ${v}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,E,$.strictTuples)}}}return an.validateTuple=n,an.default=i,an}var Xu;function xb(){if(Xu)return Dr;Xu=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=Fp(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Dr.default=t,Dr}var Ur={},Yu;function jb(){if(Yu)return Ur;Yu=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=ye(),t=_e(),r=gt(),i=Rp(),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:c,it:d}=s,{prefixItems:u}=c;d.items=!0,!(0,t.alwaysValidSchema)(d,a)&&(u?(0,i.validateAdditionalItems)(s,u):s.ok((0,r.validateArray)(s)))}};return Ur.default=o,Ur}var Cr={},Qu;function zb(){if(Qu)return Cr;Qu=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=ye(),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:c,it:d}=n;let u,h;const{minContains:y,maxContains:_}=a;d.opts.next?(u=y===void 0?1:y,h=_):u=1;const b=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(d,s)){let v=(0,e._)`${b} >= ${u}`;h!==void 0&&(v=(0,e._)`${v} && ${b} <= ${h}`),n.pass(v);return}d.items=!0;const g=o.name("valid");h===void 0&&u===1?$(g,()=>o.if(g,()=>o.break())):u===0?(o.let(g,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(g,!1),m()),n.result(g,()=>n.reset());function m(){const v=o.name("_valid"),S=o.let("count",0);$(v,()=>o.if(v,()=>f(S)))}function $(v,S){o.forRange("i",0,b,E=>{n.subschema({keyword:"contains",dataProp:E,dataPropType:t.Type.Num,compositeRule:!0},v),S()})}function f(v){o.code((0,e._)`${v}++`),h===void 0?o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0).break()):(o.if((0,e._)`${v} > ${h}`,()=>o.assign(g,!1).break()),u===1?o.assign(g,!0):o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0)))}}};return Cr.default=i,Cr}var fo={},ec;function Ab(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=_e(),i=gt();e.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
168
+ || ${j} === "boolean" || ${I} === null`).assign(L,(0,i._)`[${I}]`)}}}function y({gen:f,parentData:v,parentDataProperty:S},E){f.if((0,i._)`${v} !== undefined`,()=>f.assign((0,i._)`${v}[${S}]`,E))}function _(f,v,S,E=o.Correct){const I=E===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(f){case"null":return(0,i._)`${v} ${I} null`;case"array":O=(0,i._)`Array.isArray(${v})`;break;case"object":O=(0,i._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":O=j((0,i._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":O=j();break;default:return(0,i._)`typeof ${v} ${I} ${f}`}return E===o.Correct?O:(0,i.not)(O);function j(L=i.nil){return(0,i.and)((0,i._)`typeof ${v} == "number"`,L,S?(0,i._)`isFinite(${v})`:i.nil)}}Me.checkDataType=_;function b(f,v,S,E){if(f.length===1)return _(f[0],v,S,E);let I;const O=(0,n.toHash)(f);if(O.array&&O.object){const j=(0,i._)`typeof ${v} != "object"`;I=O.null?j:(0,i._)`!${v} || ${j}`,delete O.null,delete O.array,delete O.object}else I=i.nil;O.number&&delete O.integer;for(const j in O)I=(0,i.and)(I,_(j,v,S,E));return I}Me.checkDataTypes=b;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0,i._)`{type: ${f}}`:(0,i._)`{type: ${v}}`};function m(f){const v=$(f);(0,r.reportError)(v,g)}Me.reportTypeError=m;function $(f){const{gen:v,data:S,schema:E}=f,I=(0,n.schemaRefOrVal)(f,E,"type");return{gen:v,keyword:"type",data:S,schema:E.type,schemaCode:I,schemaValue:I,parentSchema:E,params:{},it:f}}return Me}var zn={},gu;function Y$(){if(gu)return zn;gu=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.assignDefaults=void 0;const e=ye(),t=_e();function r(n,o){const{properties:s,items:a}=n.schema;if(o==="object"&&s)for(const c in s)i(n,c,s[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,d)=>i(n,d,c.default))}zn.assignDefaults=r;function i(n,o,s){const{gen:a,compositeRule:c,data:d,opts:u}=n;if(s===void 0)return;const h=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${h}`);return}let y=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(y=(0,e._)`${y} || ${h} === null || ${h} === ""`),a.if(y,(0,e._)`${h} = ${(0,e.stringify)(s)}`)}return zn}var ft={},ke={},yu;function gt(){if(yu)return ke;yu=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const e=ye(),t=_e(),r=Rt(),i=_e();function n(f,v){const{gen:S,data:E,it:I}=f;S.if(u(S,E,v,I.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${v}`},!0),f.error()})}ke.checkReportMissingProp=n;function o({gen:f,data:v,it:{opts:S}},E,I){return(0,e.or)(...E.map(O=>(0,e.and)(u(f,v,O,S.ownProperties),(0,e._)`${I} = ${O}`)))}ke.checkMissingProp=o;function s(f,v){f.setParams({missingProperty:v},!0),f.error()}ke.reportMissingProp=s;function a(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=a;function c(f,v,S){return(0,e._)`${a(f)}.call(${v}, ${S})`}ke.isOwnProperty=c;function d(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} !== undefined`;return E?(0,e._)`${I} && ${c(f,v,S)}`:I}ke.propertyInData=d;function u(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} === undefined`;return E?(0,e.or)(I,(0,e.not)(c(f,v,S))):I}ke.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}ke.allSchemaProperties=h;function y(f,v){return h(v).filter(S=>!(0,t.alwaysValidSchema)(f,v[S]))}ke.schemaProperties=y;function _({schemaCode:f,data:v,it:{gen:S,topSchemaRef:E,schemaPath:I,errorPath:O},it:j},L,G,Y){const Q=Y?(0,e._)`${f}, ${v}, ${E}${I}`:v,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 pe=(0,e._)`${Q}, ${S.object(...oe)}`;return G!==e.nil?(0,e._)`${L}.call(${G}, ${pe})`:(0,e._)`${L}(${pe})`}ke.callValidateCode=_;const b=(0,e._)`new RegExp`;function g({gen:f,it:{opts:v}},S){const E=v.unicodeRegExp?"u":"",{regExp:I}=v.code,O=I(S,E);return f.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${I.code==="new RegExp"?b:(0,i.useFunc)(f,I)}(${S}, ${E})`})}ke.usePattern=g;function m(f){const{gen:v,data:S,keyword:E,it:I}=f,O=v.name("valid");if(I.allErrors){const L=v.let("valid",!0);return j(()=>v.assign(L,!1)),L}return v.var(O,!0),j(()=>v.break()),O;function j(L){const G=v.const("len",(0,e._)`${S}.length`);v.forRange("i",0,G,Y=>{f.subschema({keyword:E,dataProp:Y,dataPropType:t.Type.Num},O),v.if((0,e.not)(O),L)})}}ke.validateArray=m;function $(f){const{gen:v,schema:S,keyword:E,it:I}=f;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(G=>(0,t.alwaysValidSchema)(I,G))&&!I.opts.unevaluated)return;const j=v.let("valid",!1),L=v.name("_valid");v.block(()=>S.forEach((G,Y)=>{const Q=f.subschema({keyword:E,schemaProp:Y,compositeRule:!0},L);v.assign(j,(0,e._)`${j} || ${L}`),f.mergeValidEvaluated(Q,L)||v.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return ke.validateUnion=$,ke}var vu;function Q$(){if(vu)return ft;vu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=ye(),t=Rt(),r=gt(),i=Zi();function n(y,_){const{gen:b,keyword:g,schema:m,parentSchema:$,it:f}=y,v=_.macro.call(f.self,m,$,f),S=d(b,g,v);f.opts.validateSchema!==!1&&f.self.validateSchema(v,!0);const E=b.name("valid");y.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:!0},E),y.pass(E,()=>y.error(!0))}ft.macroKeywordCode=n;function o(y,_){var b;const{gen:g,keyword:m,schema:$,parentSchema:f,$data:v,it:S}=y;c(S,_);const E=!v&&_.compile?_.compile.call(S.self,$,f,S):_.validate,I=d(g,m,E),O=g.let("valid");y.block$data(O,j),y.ok((b=_.valid)!==null&&b!==void 0?b:O);function j(){if(_.errors===!1)Y(),_.modifying&&s(y),Q(()=>y.error());else{const oe=_.async?L():G();_.modifying&&s(y),Q(()=>a(y,oe))}}function L(){const oe=g.let("ruleErrs",null);return g.try(()=>Y((0,e._)`await `),pe=>g.assign(O,!1).if((0,e._)`${pe} instanceof ${S.ValidationError}`,()=>g.assign(oe,(0,e._)`${pe}.errors`),()=>g.throw(pe))),oe}function G(){const oe=(0,e._)`${I}.errors`;return g.assign(oe,null),Y(e.nil),oe}function Y(oe=_.async?(0,e._)`await `:e.nil){const pe=S.opts.passContext?t.default.this:t.default.self,R=!("compile"in _&&!v||_.schema===!1);g.assign(O,(0,e._)`${oe}${(0,r.callValidateCode)(y,I,pe,R)}`,_.modifying)}function Q(oe){var pe;g.if((0,e.not)((pe=_.valid)!==null&&pe!==void 0?pe:O),oe)}}ft.funcKeywordCode=o;function s(y){const{gen:_,data:b,it:g}=y;_.if(g.parentData,()=>_.assign(b,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function a(y,_){const{gen:b}=y;b.if((0,e._)`Array.isArray(${_})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(y)},()=>y.error())}function c({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function d(y,_,b){if(b===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function u(y,_,b=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||b&&typeof y>"u")}ft.validSchemaType=u;function h({schema:y,opts:_,self:b,errSchemaPath:g},m,$){if(Array.isArray(m.keyword)?!m.keyword.includes($):m.keyword!==$)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${$}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(y[$])){const S=`keyword "${$}" value is invalid at path "${g}": `+b.errorsText(m.validateSchema.errors);if(_.validateSchema==="log")b.logger.error(S);else throw new Error(S)}}return ft.validateKeywordUsage=h,ft}var St={},$u;function eb(){if($u)return St;$u=1,Object.defineProperty(St,"__esModule",{value:!0}),St.extendSubschemaMode=St.extendSubschemaData=St.getSubschema=void 0;const e=ye(),t=_e();function r(o,{keyword:s,schemaProp:a,schema:c,schemaPath:d,errSchemaPath:u,topSchemaRef:h}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const y=o.schema[s];return a===void 0?{schema:y,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:y[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(c!==void 0){if(d===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:d,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}St.getSubschema=r;function i(o,s,{dataProp:a,dataPropType:c,data:d,dataTypes:u,propertyName:h}){if(d!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=s;if(a!==void 0){const{errorPath:b,dataPathArr:g,opts:m}=s,$=y.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);_($),o.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(a,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...g,o.parentDataProperty]}if(d!==void 0){const b=d instanceof e.Name?d:y.let("data",d,!0);_(b),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function _(b){o.data=b,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,b]}}St.extendSubschemaData=i;function n(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:c,createErrors:d,allErrors:u}){c!==void 0&&(o.compositeRule=c),d!==void 0&&(o.createErrors=d),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return St.extendSubschemaMode=n,St}var Ge={},so,bu;function Bp(){return bu||(bu=1,so=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}),so}var ao={exports:{}},_u;function tb(){if(_u)return ao.exports;_u=1;var e=ao.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,c,d,u,h,y){if(s&&typeof s=="object"&&!Array.isArray(s)){n(s,a,c,d,u,h,y);for(var _ in s){var b=s[_];if(Array.isArray(b)){if(_ in e.arrayKeywords)for(var g=0;g<b.length;g++)t(i,n,o,b[g],a+"/"+_+"/"+g,c,a,_,s,g)}else if(_ in e.propsKeywords){if(b&&typeof b=="object")for(var m in b)t(i,n,o,b[m],a+"/"+_+"/"+r(m),c,a,_,s,m)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,n,o,b,a+"/"+_,c,a,_,s)}o(s,a,c,d,u,h,y)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return ao.exports}var wu;function Mi(){if(wu)return Ge;wu=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const e=_e(),t=Bp(),r=tb(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(g,m=!0){return typeof g=="boolean"?!0:m===!0?!s(g):m?a(g)<=m:!1}Ge.inlineRef=n;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(const m in g){if(o.has(m))return!0;const $=g[m];if(Array.isArray($)&&$.some(s)||typeof $=="object"&&s($))return!0}return!1}function a(g){let m=0;for(const $ in g){if($==="$ref")return 1/0;if(m++,!i.has($)&&(typeof g[$]=="object"&&(0,e.eachItem)(g[$],f=>m+=a(f)),m===1/0))return 1/0}return m}function c(g,m="",$){$!==!1&&(m=h(m));const f=g.parse(m);return d(g,f)}Ge.getFullPath=c;function d(g,m){return g.serialize(m).split("#")[0]+"#"}Ge._getFullPath=d;const u=/#\/?$/;function h(g){return g?g.replace(u,""):""}Ge.normalizeId=h;function y(g,m,$){return $=h($),g.resolve(m,$)}Ge.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function b(g,m){if(typeof g=="boolean")return{};const{schemaId:$,uriResolver:f}=this.opts,v=h(g[$]||m),S={"":v},E=c(f,v,!1),I={},O=new Set;return r(g,{allKeys:!0},(G,Y,Q,oe)=>{if(oe===void 0)return;const pe=E+Y;let R=S[oe];typeof G[$]=="string"&&(R=X.call(this,G[$])),ie.call(this,G.$anchor),ie.call(this,G.$dynamicAnchor),S[Y]=R;function X(re){const ce=this.opts.uriResolver.resolve;if(re=h(R?ce(R,re):re),O.has(re))throw L(re);O.add(re);let K=this.refs[re];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?j(G,K.schema,re):re!==h(pe)&&(re[0]==="#"?(j(G,I[re],re),I[re]=G):this.refs[re]=pe),re}function ie(re){if(typeof re=="string"){if(!_.test(re))throw new Error(`invalid anchor "${re}"`);X.call(this,`#${re}`)}}}),I;function j(G,Y,Q){if(Y!==void 0&&!t(G,Y))throw L(Q)}function L(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ge.getSchemaRefs=b,Ge}var ku;function qi(){if(ku)return wt;ku=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;const e=X$(),t=pi(),r=Cp(),i=pi(),n=Y$(),o=Q$(),s=eb(),a=ye(),c=Rt(),d=Mi(),u=_e(),h=Zi();function y(A){if(E(A)&&(O(A),S(A))){m(A);return}_(A,()=>(0,e.topBoolOrEmptySchema)(A))}wt.validateFunctionCode=y;function _({gen:A,validateName:U,schema:M,schemaEnv:J,opts:ne},ae){ne.code.es5?A.func(U,(0,a._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,a._)`"use strict"; ${f(M,ne)}`),g(A,ne),A.code(ae)}):A.func(U,(0,a._)`${c.default.data}, ${b(ne)}`,J.$async,()=>A.code(f(M,ne)).code(ae))}function b(A){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function g(A,U){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,a._)`""`),A.var(c.default.parentData,(0,a._)`undefined`),A.var(c.default.parentDataProperty,(0,a._)`undefined`),A.var(c.default.rootData,c.default.data),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function m(A){const{schema:U,opts:M,gen:J}=A;_(A,()=>{M.$comment&&U.$comment&&oe(A),G(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),M.unevaluated&&$(A),j(A),pe(A)})}function $(A){const{gen:U,validateName:M}=A;A.evaluated=U.const("evaluated",(0,a._)`${M}.evaluated`),U.if((0,a._)`${A.evaluated}.dynamicProps`,()=>U.assign((0,a._)`${A.evaluated}.props`,(0,a._)`undefined`)),U.if((0,a._)`${A.evaluated}.dynamicItems`,()=>U.assign((0,a._)`${A.evaluated}.items`,(0,a._)`undefined`))}function f(A,U){const M=typeof A=="object"&&A[U.schemaId];return M&&(U.code.source||U.code.process)?(0,a._)`/*# sourceURL=${M} */`:a.nil}function v(A,U){if(E(A)&&(O(A),S(A))){I(A,U);return}(0,e.boolOrEmptySchema)(A,U)}function S({schema:A,self:U}){if(typeof A=="boolean")return!A;for(const M in A)if(U.RULES.all[M])return!0;return!1}function E(A){return typeof A.schema!="boolean"}function I(A,U){const{schema:M,gen:J,opts:ne}=A;ne.$comment&&M.$comment&&oe(A),Y(A),Q(A);const ae=J.const("_errs",c.default.errors);j(A,ae),J.var(U,(0,a._)`${ae} === ${c.default.errors}`)}function O(A){(0,u.checkUnknownRules)(A),L(A)}function j(A,U){if(A.opts.jtd)return X(A,[],!1,U);const M=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,M);X(A,M,!J,U)}function L(A){const{schema:U,errSchemaPath:M,opts:J,self:ne}=A;U.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(U,ne.RULES)&&ne.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function G(A){const{schema:U,opts:M}=A;U.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function Y(A){const U=A.schema[A.opts.schemaId];U&&(A.baseId=(0,d.resolveUrl)(A.opts.uriResolver,A.baseId,U))}function Q(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function oe({gen:A,schemaEnv:U,schema:M,errSchemaPath:J,opts:ne}){const ae=M.$comment;if(ne.$comment===!0)A.code((0,a._)`${c.default.self}.logger.log(${ae})`);else if(typeof ne.$comment=="function"){const we=(0,a.str)`${J}/$comment`,Fe=A.scopeValue("root",{ref:U.root});A.code((0,a._)`${c.default.self}.opts.$comment(${ae}, ${we}, ${Fe}.schema)`)}}function pe(A){const{gen:U,schemaEnv:M,validateName:J,ValidationError:ne,opts:ae}=A;M.$async?U.if((0,a._)`${c.default.errors} === 0`,()=>U.return(c.default.data),()=>U.throw((0,a._)`new ${ne}(${c.default.vErrors})`)):(U.assign((0,a._)`${J}.errors`,c.default.vErrors),ae.unevaluated&&R(A),U.return((0,a._)`${c.default.errors} === 0`))}function R({gen:A,evaluated:U,props:M,items:J}){M instanceof a.Name&&A.assign((0,a._)`${U}.props`,M),J instanceof a.Name&&A.assign((0,a._)`${U}.items`,J)}function X(A,U,M,J){const{gen:ne,schema:ae,data:we,allErrors:Fe,opts:Ve,self:Le}=A,{RULES:Be}=Le;if(ae.$ref&&(Ve.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ae,Be))){ne.block(()=>ee(A,"$ref",Be.all.$ref.definition));return}Ve.jtd||re(A,U),ne.block(()=>{for(const Je of Be.rules)At(Je);At(Be.post)});function At(Je){(0,r.shouldUseGroup)(ae,Je)&&(Je.type?(ne.if((0,i.checkDataType)(Je.type,we,Ve.strictNumbers)),ie(A,Je),U.length===1&&U[0]===Je.type&&M&&(ne.else(),(0,i.reportTypeError)(A)),ne.endIf()):ie(A,Je),Fe||ne.if((0,a._)`${c.default.errors} === ${J||0}`))}}function ie(A,U){const{gen:M,schema:J,opts:{useDefaults:ne}}=A;ne&&(0,n.assignDefaults)(A,U.type),M.block(()=>{for(const ae of U.rules)(0,r.shouldUseRule)(J,ae)&&ee(A,ae.keyword,ae.definition,U.type)})}function re(A,U){A.schemaEnv.meta||!A.opts.strictTypes||(ce(A,U),A.opts.allowUnionTypes||K(A,U),T(A,A.dataTypes))}function ce(A,U){if(U.length){if(!A.dataTypes.length){A.dataTypes=U;return}U.forEach(M=>{P(A.dataTypes,M)||x(A,`type "${M}" not allowed by context "${A.dataTypes.join(",")}"`)}),w(A,U)}}function K(A,U){U.length>1&&!(U.length===2&&U.includes("null"))&&x(A,"use allowUnionTypes to allow union type keyword")}function T(A,U){const M=A.self.RULES.all;for(const J in M){const ne=M[J];if(typeof ne=="object"&&(0,r.shouldUseRule)(A.schema,ne)){const{type:ae}=ne.definition;ae.length&&!ae.some(we=>F(U,we))&&x(A,`missing type "${ae.join(",")}" for keyword "${J}"`)}}}function F(A,U){return A.includes(U)||U==="number"&&A.includes("integer")}function P(A,U){return A.includes(U)||U==="integer"&&A.includes("number")}function w(A,U){const M=[];for(const J of A.dataTypes)P(U,J)?M.push(J):U.includes("integer")&&J==="number"&&M.push("integer");A.dataTypes=M}function x(A,U){const M=A.schemaEnv.baseId+A.errSchemaPath;U+=` at "${M}" (strictTypes)`,(0,u.checkStrictMode)(A,U,A.opts.strictTypes)}class B{constructor(U,M,J){if((0,o.validateKeywordUsage)(U,M,J),this.gen=U.gen,this.allErrors=U.allErrors,this.keyword=J,this.data=U.data,this.schema=U.schema[J],this.$data=M.$data&&U.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(U,this.schema,J,this.$data),this.schemaType=M.schemaType,this.parentSchema=U.schema,this.params={},this.it=U,this.def=M,this.$data)this.schemaCode=U.gen.const("vSchema",se(this.$data,U));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=U.gen.const("_errs",c.default.errors))}result(U,M,J){this.failResult((0,a.not)(U),M,J)}failResult(U,M,J){this.gen.if(U),J?J():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(U,M){this.failResult((0,a.not)(U),void 0,M)}fail(U){if(U===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(U),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(U){if(!this.$data)return this.fail(U);const{schemaCode:M}=this;this.fail((0,a._)`${M} !== undefined && (${(0,a.or)(this.invalid$data(),U)})`)}error(U,M,J){if(M){this.setParams(M),this._error(U,J),this.setParams({});return}this._error(U,J)}_error(U,M){(U?h.reportExtraError:h.reportError)(this,this.def.error,M)}$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(U){this.allErrors||this.gen.if(U)}setParams(U,M){M?Object.assign(this.params,U):this.params=U}block$data(U,M,J=a.nil){this.gen.block(()=>{this.check$data(U,J),M()})}check$data(U=a.nil,M=a.nil){if(!this.$data)return;const{gen:J,schemaCode:ne,schemaType:ae,def:we}=this;J.if((0,a.or)((0,a._)`${ne} === undefined`,M)),U!==a.nil&&J.assign(U,!0),(ae.length||we.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),U!==a.nil&&J.assign(U,!1)),J.else()}invalid$data(){const{gen:U,schemaCode:M,schemaType:J,def:ne,it:ae}=this;return(0,a.or)(we(),Fe());function we(){if(J.length){if(!(M instanceof a.Name))throw new Error("ajv implementation error");const Ve=Array.isArray(J)?J:[J];return(0,a._)`${(0,i.checkDataTypes)(Ve,M,ae.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function Fe(){if(ne.validateSchema){const Ve=U.scopeValue("validate$data",{ref:ne.validateSchema});return(0,a._)`!${Ve}(${M})`}return a.nil}}subschema(U,M){const J=(0,s.getSubschema)(this.it,U);(0,s.extendSubschemaData)(J,this.it,U),(0,s.extendSubschemaMode)(J,U);const ne={...this.it,...J,items:void 0,props:void 0};return v(ne,M),ne}mergeEvaluated(U,M){const{it:J,gen:ne}=this;J.opts.unevaluated&&(J.props!==!0&&U.props!==void 0&&(J.props=u.mergeEvaluated.props(ne,U.props,J.props,M)),J.items!==!0&&U.items!==void 0&&(J.items=u.mergeEvaluated.items(ne,U.items,J.items,M)))}mergeValidEvaluated(U,M){const{it:J,gen:ne}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ne.if(M,()=>this.mergeEvaluated(U,a.Name)),!0}}wt.KeywordCxt=B;function ee(A,U,M,J){const ne=new B(A,M,U);"code"in M?M.code(ne,J):ne.$data&&M.validate?(0,o.funcKeywordCode)(ne,M):"macro"in M?(0,o.macroKeywordCode)(ne,M):(M.compile||M.validate)&&(0,o.funcKeywordCode)(ne,M)}const te=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(A,{dataLevel:U,dataNames:M,dataPathArr:J}){let ne,ae;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!te.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ne=A,ae=c.default.rootData}else{const Le=me.exec(A);if(!Le)throw new Error(`Invalid JSON-pointer: ${A}`);const Be=+Le[1];if(ne=Le[2],ne==="#"){if(Be>=U)throw new Error(Ve("property/index",Be));return J[U-Be]}if(Be>U)throw new Error(Ve("data",Be));if(ae=M[U-Be],!ne)return ae}let we=ae;const Fe=ne.split("/");for(const Le of Fe)Le&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Le))}`,we=(0,a._)`${we} && ${ae}`);return we;function Ve(Le,Be){return`Cannot access ${Le} ${Be} levels up, current level is ${U}`}}return wt.getData=se,wt}var mr={},Su;function Na(){if(Su)return mr;Su=1,Object.defineProperty(mr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return mr.default=e,mr}var gr={},Iu;function Vi(){if(Iu)return gr;Iu=1,Object.defineProperty(gr,"__esModule",{value:!0});const e=Mi();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 gr.default=t,gr}var tt={},Eu;function Oa(){if(Eu)return tt;Eu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const e=ye(),t=Na(),r=Rt(),i=Mi(),n=_e(),o=qi();class s{constructor($){var f;this.refs={},this.dynamicAnchors={};let v;typeof $.schema=="object"&&(v=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(f=$.baseId)!==null&&f!==void 0?f:(0,i.normalizeId)(v?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=v?.$async,this.refs={}}}tt.SchemaEnv=s;function a(m){const $=u.call(this,m);if($)return $;const f=(0,i.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:v,lines:S}=this.opts.code,{ownProperties:E}=this.opts,I=new e.CodeGen(this.scope,{es5:v,lines:S,ownProperties:E});let O;m.$async&&(O=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=I.scopeName("validate");m.validateName=j;const L={gen:I,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:I.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:O,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(m),(0,o.validateFunctionCode)(L),I.optimize(this.opts.code.optimize);const Y=I.toString();G=`${I.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(G=this.opts.code.process(G,m));const oe=new Function(`${r.default.self}`,`${r.default.scope}`,G)(this,this.scope.get());if(this.scope.value(j,{ref:oe}),oe.errors=null,oe.schema=m.schema,oe.schemaEnv=m,m.$async&&(oe.$async=!0),this.opts.code.source===!0&&(oe.source={validateName:j,validateCode:Y,scopeValues:I._values}),this.opts.unevaluated){const{props:pe,items:R}=L;oe.evaluated={props:pe instanceof e.Name?void 0:pe,items:R instanceof e.Name?void 0:R,dynamicProps:pe instanceof e.Name,dynamicItems:R instanceof e.Name},oe.source&&(oe.source.evaluated=(0,e.stringify)(oe.evaluated))}return m.validate=oe,m}catch(Y){throw delete m.validate,delete m.validateName,G&&this.logger.error("Error compiling schema, function code:",G),Y}finally{this._compilations.delete(m)}}tt.compileSchema=a;function c(m,$,f){var v;f=(0,i.resolveUrl)(this.opts.uriResolver,$,f);const S=m.refs[f];if(S)return S;let E=y.call(this,m,f);if(E===void 0){const I=(v=m.localRefs)===null||v===void 0?void 0:v[f],{schemaId:O}=this.opts;I&&(E=new s({schema:I,schemaId:O,root:m,baseId:$}))}if(E!==void 0)return m.refs[f]=d.call(this,E)}tt.resolveRef=c;function d(m){return(0,i.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:a.call(this,m)}function u(m){for(const $ of this._compilations)if(h($,m))return $}tt.getCompilingSchema=u;function h(m,$){return m.schema===$.schema&&m.root===$.root&&m.baseId===$.baseId}function y(m,$){let f;for(;typeof(f=this.refs[$])=="string";)$=f;return f||this.schemas[$]||_.call(this,m,$)}function _(m,$){const f=this.opts.uriResolver.parse($),v=(0,i._getFullPath)(this.opts.uriResolver,f);let S=(0,i.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&v===S)return g.call(this,f,m);const E=(0,i.normalizeId)(v),I=this.refs[E]||this.schemas[E];if(typeof I=="string"){const O=_.call(this,m,I);return typeof O?.schema!="object"?void 0:g.call(this,f,O)}if(typeof I?.schema=="object"){if(I.validate||a.call(this,I),E===(0,i.normalizeId)($)){const{schema:O}=I,{schemaId:j}=this.opts,L=O[j];return L&&(S=(0,i.resolveUrl)(this.opts.uriResolver,S,L)),new s({schema:O,schemaId:j,root:m,baseId:S})}return g.call(this,f,I)}}tt.resolveSchema=_;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(m,{baseId:$,schema:f,root:v}){var S;if(((S=m.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,n.unescapeFragment)(O)];if(j===void 0)return;f=j;const L=typeof f=="object"&&f[this.opts.schemaId];!b.has(O)&&L&&($=(0,i.resolveUrl)(this.opts.uriResolver,$,L))}let E;if(typeof f!="boolean"&&f.$ref&&!(0,n.schemaHasRulesButRef)(f,this.RULES)){const O=(0,i.resolveUrl)(this.opts.uriResolver,$,f.$ref);E=_.call(this,v,O)}const{schemaId:I}=this.opts;if(E=E||new s({schema:f,schemaId:I,root:v,baseId:$}),E.schema!==E.root.schema)return E}return tt}const nb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",rb="Meta-schema for $data reference (JSON AnySchema extension proposal)",ib="object",ob=["$data"],sb={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ab=!1;var ub={$id:nb,description:rb,type:ib,required:ob,properties:sb,additionalProperties:ab},yr={},Tn={exports:{}},uo,Nu;function cb(){return Nu||(Nu=1,uo={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),uo}var co,Ou;function lb(){if(Ou)return co;Ou=1;const{HEX:e}=cb(),t=/^(?:(?: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(g){if(a(g,".")<3)return{host:g,isIPV4:!1};const m=g.match(t)||[],[$]=m;return $?{host:s($,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function i(g,m=!1){let $="",f=!0;for(const v of g){if(e[v]===void 0)return;v!=="0"&&f===!0&&(f=!1),f||($+=v)}return m&&$.length===0&&($="0"),$}function n(g){let m=0;const $={error:!1,address:"",zone:""},f=[],v=[];let S=!1,E=!1,I=!1;function O(){if(v.length){if(S===!1){const j=i(v);if(j!==void 0)f.push(j);else return $.error=!0,!1}v.length=0}return!0}for(let j=0;j<g.length;j++){const L=g[j];if(!(L==="["||L==="]"))if(L===":"){if(E===!0&&(I=!0),!O())break;if(m++,f.push(":"),m>7){$.error=!0;break}j-1>=0&&g[j-1]===":"&&(E=!0);continue}else if(L==="%"){if(!O())break;S=!0}else{v.push(L);continue}}return v.length&&(S?$.zone=v.join(""):I?f.push(v.join("")):f.push(i(v))),$.address=f.join(""),$}function o(g){if(a(g,":")<2)return{host:g,isIPV6:!1};const m=n(g);if(m.error)return{host:g,isIPV6:!1};{let $=m.address,f=m.address;return m.zone&&($+="%"+m.zone,f+="%25"+m.zone),{host:$,escapedHost:f,isIPV6:!0}}}function s(g,m){let $="",f=!0;const v=g.length;for(let S=0;S<v;S++){const E=g[S];E==="0"&&f?(S+1<=v&&g[S+1]===m||S+1===v)&&($+=E,f=!1):(E===m?f=!0:f=!1,$+=E)}return $}function a(g,m){let $=0;for(let f=0;f<g.length;f++)g[f]===m&&$++;return $}const c=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,h=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const m=[];for(;g.length;)if(g.match(c))g=g.replace(c,"");else if(g.match(d))g=g.replace(d,"/");else if(g.match(u))g=g.replace(u,"/"),m.pop();else if(g==="."||g==="..")g="";else{const $=g.match(h);if($){const f=$[0];g=g.slice(f.length),m.push(f)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function _(g,m){const $=m!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=$(g.scheme)),g.userinfo!==void 0&&(g.userinfo=$(g.userinfo)),g.host!==void 0&&(g.host=$(g.host)),g.path!==void 0&&(g.path=$(g.path)),g.query!==void 0&&(g.query=$(g.query)),g.fragment!==void 0&&(g.fragment=$(g.fragment)),g}function b(g){const m=[];if(g.userinfo!==void 0&&(m.push(g.userinfo),m.push("@")),g.host!==void 0){let $=unescape(g.host);const f=r($);if(f.isIPV4)$=f.host;else{const v=o(f.host);v.isIPV6===!0?$=`[${v.escapedHost}]`:$=g.host}m.push($)}return(typeof g.port=="number"||typeof g.port=="string")&&(m.push(":"),m.push(String(g.port))),m.length?m.join(""):void 0}return co={recomposeAuthority:b,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:i},co}var lo,xu;function fb(){if(xu)return lo;xu=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}function i(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function n(f){const v=String(f.scheme).toLowerCase()==="https";return(f.port===(v?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function o(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function s(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){const[v,S]=f.resourceName.split("?");f.path=v&&v!=="/"?v:void 0,f.query=S,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,v){if(!f.path)return f.error="URN can not be parsed",f;const S=f.path.match(t);if(S){const E=v.scheme||f.scheme||"urn";f.nid=S[1].toLowerCase(),f.nss=S[2];const I=`${E}:${v.nid||f.nid}`,O=$[I];f.path=void 0,O&&(f=O.parse(f,v))}else f.error=f.error||"URN can not be parsed.";return f}function c(f,v){const S=v.scheme||f.scheme||"urn",E=f.nid.toLowerCase(),I=`${S}:${v.nid||E}`,O=$[I];O&&(f=O.serialize(f,v));const j=f,L=f.nss;return j.path=`${E||v.nid}:${L}`,v.skipEscape=!0,j}function d(f,v){const S=f;return S.uuid=S.nss,S.nss=void 0,!v.tolerant&&(!S.uuid||!e.test(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function u(f){const v=f;return v.nss=(f.uuid||"").toLowerCase(),v}const h={scheme:"http",domainHost:!0,parse:i,serialize:n},y={scheme:"https",domainHost:h.domainHost,parse:i,serialize:n},_={scheme:"ws",domainHost:!0,parse:o,serialize:s},b={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},$={http:h,https:y,ws:_,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:u,skipNormalize:!0}};return lo=$,lo}var ju;function db(){if(ju)return Tn.exports;ju=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:n}=lb(),o=fb();function s(m,$){return typeof m=="string"?m=u(b(m,$),$):typeof m=="object"&&(m=b(u(m,$),$)),m}function a(m,$,f){const v=Object.assign({scheme:"null"},f),S=c(b(m,v),b($,v),v,!0);return u(S,{...v,skipEscape:!0})}function c(m,$,f,v){const S={};return v||(m=b(u(m,f),f),$=b(u($,f),f)),f=f||{},!f.tolerant&&$.scheme?(S.scheme=$.scheme,S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.userinfo!==void 0||$.host!==void 0||$.port!==void 0?(S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.path?($.path.charAt(0)==="/"?S.path=r($.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?S.path="/"+$.path:m.path?S.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+$.path:S.path=$.path,S.path=r(S.path)),S.query=$.query):(S.path=m.path,$.query!==void 0?S.query=$.query:S.query=m.query),S.userinfo=m.userinfo,S.host=m.host,S.port=m.port),S.scheme=m.scheme),S.fragment=$.fragment,S}function d(m,$,f){return typeof m=="string"?(m=unescape(m),m=u(n(b(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=u(n(m,!0),{...f,skipEscape:!0})),typeof $=="string"?($=unescape($),$=u(n(b($,f),!0),{...f,skipEscape:!0})):typeof $=="object"&&($=u(n($,!0),{...f,skipEscape:!0})),m.toLowerCase()===$.toLowerCase()}function u(m,$){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},v=Object.assign({},$),S=[],E=o[(v.scheme||f.scheme||"").toLowerCase()];E&&E.serialize&&E.serialize(f,v),f.path!==void 0&&(v.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),v.reference!=="suffix"&&f.scheme&&S.push(f.scheme,":");const I=i(f);if(I!==void 0&&(v.reference!=="suffix"&&S.push("//"),S.push(I),f.path&&f.path.charAt(0)!=="/"&&S.push("/")),f.path!==void 0){let O=f.path;!v.absolutePath&&(!E||!E.absolutePath)&&(O=r(O)),I===void 0&&(O=O.replace(/^\/\//u,"/%2F")),S.push(O)}return f.query!==void 0&&S.push("?",f.query),f.fragment!==void 0&&S.push("#",f.fragment),S.join("")}const h=Array.from({length:127},(m,$)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode($)));function y(m){let $=0;for(let f=0,v=m.length;f<v;++f)if($=m.charCodeAt(f),$>126||h[$])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(m,$){const f=Object.assign({},$),v={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},S=m.indexOf("%")!==-1;let E=!1;f.reference==="suffix"&&(m=(f.scheme?f.scheme+":":"")+"//"+m);const I=m.match(_);if(I){if(v.scheme=I[1],v.userinfo=I[3],v.host=I[4],v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=I[7],v.fragment=I[8],isNaN(v.port)&&(v.port=I[5]),v.host){const j=t(v.host);if(j.isIPV4===!1){const L=e(j.host);v.host=L.host.toLowerCase(),E=L.isIPV6}else v.host=j.host,E=!0}v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&v.query===void 0&&!v.path?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==v.reference&&(v.error=v.error||"URI is not a "+f.reference+" reference.");const O=o[(f.scheme||v.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!O||!O.unicodeSupport)&&v.host&&(f.domainHost||O&&O.domainHost)&&E===!1&&y(v.host))try{v.host=URL.domainToASCII(v.host.toLowerCase())}catch(j){v.error=v.error||"Host's domain name can not be converted to ASCII: "+j}(!O||O&&!O.skipNormalize)&&(S&&v.scheme!==void 0&&(v.scheme=unescape(v.scheme)),S&&v.host!==void 0&&(v.host=unescape(v.host)),v.path&&(v.path=escape(unescape(v.path))),v.fragment&&(v.fragment=encodeURI(decodeURIComponent(v.fragment)))),O&&O.parse&&O.parse(v,f)}else v.error=v.error||"URI can not be parsed.";return v}const g={SCHEMES:o,normalize:s,resolve:a,resolveComponents:c,equal:d,serialize:u,parse:b};return Tn.exports=g,Tn.exports.default=g,Tn.exports.fastUri=g,Tn.exports}var Au;function hb(){if(Au)return yr;Au=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=db();return e.code='require("ajv/dist/runtime/uri").default',yr.default=e,yr}var zu;function pb(){return zu||(zu=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=ye();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=Na(),n=Vi(),o=Up(),s=Oa(),a=ye(),c=Mi(),d=pi(),u=_e(),h=ub,y=hb(),_=(K,T)=>new RegExp(K,T);_.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={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."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function v(K){var T,F,P,w,x,B,ee,te,me,se,A,U,M,J,ne,ae,we,Fe,Ve,Le,Be,At,Je,zt,Qe;const _t=K.strict,jn=(T=K.code)===null||T===void 0?void 0:T.optimize,ct=jn===!0||jn===void 0?1:jn||0,ir=(P=(F=K.code)===null||F===void 0?void 0:F.regExp)!==null&&P!==void 0?P:_,k=(w=K.uriResolver)!==null&&w!==void 0?w:y.default;return{strictSchema:(B=(x=K.strictSchema)!==null&&x!==void 0?x:_t)!==null&&B!==void 0?B:!0,strictNumbers:(te=(ee=K.strictNumbers)!==null&&ee!==void 0?ee:_t)!==null&&te!==void 0?te:!0,strictTypes:(se=(me=K.strictTypes)!==null&&me!==void 0?me:_t)!==null&&se!==void 0?se:"log",strictTuples:(U=(A=K.strictTuples)!==null&&A!==void 0?A:_t)!==null&&U!==void 0?U:"log",strictRequired:(J=(M=K.strictRequired)!==null&&M!==void 0?M:_t)!==null&&J!==void 0?J:!1,code:K.code?{...K.code,optimize:ct,regExp:ir}:{optimize:ct,regExp:ir},loopRequired:(ne=K.loopRequired)!==null&&ne!==void 0?ne:f,loopEnum:(ae=K.loopEnum)!==null&&ae!==void 0?ae:f,meta:(we=K.meta)!==null&&we!==void 0?we:!0,messages:(Fe=K.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ve=K.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Le=K.schemaId)!==null&&Le!==void 0?Le:"$id",addUsedSchema:(Be=K.addUsedSchema)!==null&&Be!==void 0?Be:!0,validateSchema:(At=K.validateSchema)!==null&&At!==void 0?At:!0,validateFormats:(Je=K.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(zt=K.unicodeRegExp)!==null&&zt!==void 0?zt:!0,int32range:(Qe=K.int32range)!==null&&Qe!==void 0?Qe:!0,uriResolver:k}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...v(T)};const{es5:F,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:F,lines:P}),this.logger=Q(T.logger);const w=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),E.call(this,m,T,"NOT SUPPORTED"),E.call(this,$,T,"DEPRECATED","warn"),this._metaOpts=G.call(this),T.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&L.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),O.call(this),T.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:F,schemaId:P}=this.opts;let w=h;P==="id"&&(w={...h},w.id=w.$id,delete w.$id),F&&T&&this.addMetaSchema(w,w[P],!1)}defaultMeta(){const{meta:T,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[F]||T:void 0}validate(T,F){let P;if(typeof T=="string"){if(P=this.getSchema(T),!P)throw new Error(`no schema with key or ref "${T}"`)}else P=this.compile(T);const w=P(F);return"$async"in P||(this.errors=P.errors),w}compile(T,F){const P=this._addSchema(T,F);return P.validate||this._compileSchemaEnv(P)}compileAsync(T,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return w.call(this,T,F);async function w(se,A){await x.call(this,se.$schema);const U=this._addSchema(se,A);return U.validate||B.call(this,U)}async function x(se){se&&!this.getSchema(se)&&await w.call(this,{$ref:se},!0)}async function B(se){try{return this._compileSchemaEnv(se)}catch(A){if(!(A instanceof n.default))throw A;return ee.call(this,A),await te.call(this,A.missingSchema),B.call(this,se)}}function ee({missingSchema:se,missingRef:A}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${A} cannot be resolved`)}async function te(se){const A=await me.call(this,se);this.refs[se]||await x.call(this,A.$schema),this.refs[se]||this.addSchema(A,se,F)}async function me(se){const A=this._loading[se];if(A)return A;try{return await(this._loading[se]=P(se))}finally{delete this._loading[se]}}}addSchema(T,F,P,w=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,P,w);return this}let x;if(typeof T=="object"){const{schemaId:B}=this.opts;if(x=T[B],x!==void 0&&typeof x!="string")throw new Error(`schema ${B} must be string`)}return F=(0,c.normalizeId)(F||x),this._checkUnique(F),this.schemas[F]=this._addSchema(T,P,F,w,!0),this}addMetaSchema(T,F,P=this.opts.validateSchema){return this.addSchema(T,F,!0,P),this}validateSchema(T,F){if(typeof T=="boolean")return!0;let P;if(P=T.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(P,T);if(!w&&F){const x="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(x);else throw new Error(x)}return w}getSchema(T){let F;for(;typeof(F=I.call(this,T))=="string";)T=F;if(F===void 0){const{schemaId:P}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:P});if(F=s.resolveSchema.call(this,w,T),!F)return;this.refs[T]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=I.call(this,T);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const F=T;this._cache.delete(F);let P=T[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const F of T)this.addKeyword(F);return this}addKeyword(T,F){let P;if(typeof T=="string")P=T,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=P);else if(typeof T=="object"&&F===void 0){if(F=T,P=F.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(pe.call(this,P,F),!F)return(0,u.eachItem)(P,x=>R.call(this,x)),this;ie.call(this,F);const w={...F,type:(0,d.getJSONTypes)(F.type),schemaType:(0,d.getJSONTypes)(F.schemaType)};return(0,u.eachItem)(P,w.type.length===0?x=>R.call(this,x,w):x=>w.type.forEach(B=>R.call(this,x,w,B))),this}getKeyword(T){const F=this.RULES.all[T];return typeof F=="object"?F.definition:!!F}removeKeyword(T){const{RULES:F}=this;delete F.keywords[T],delete F.all[T];for(const P of F.rules){const w=P.rules.findIndex(x=>x.keyword===T);w>=0&&P.rules.splice(w,1)}return this}addFormat(T,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[T]=F,this}errorsText(T=this.errors,{separator:F=", ",dataVar:P="data"}={}){return!T||T.length===0?"No errors":T.map(w=>`${P}${w.instancePath} ${w.message}`).reduce((w,x)=>w+F+x)}$dataMetaSchema(T,F){const P=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const w of F){const x=w.split("/").slice(1);let B=T;for(const ee of x)B=B[ee];for(const ee in P){const te=P[ee];if(typeof te!="object")continue;const{$data:me}=te.definition,se=B[ee];me&&se&&(B[ee]=ce(se))}}return T}_removeAllSchemas(T,F){for(const P in T){const w=T[P];(!F||F.test(P))&&(typeof w=="string"?delete T[P]:w&&!w.meta&&(this._cache.delete(w.schema),delete T[P]))}}_addSchema(T,F,P,w=this.opts.validateSchema,x=this.opts.addUsedSchema){let B;const{schemaId:ee}=this.opts;if(typeof T=="object")B=T[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get(T);if(te!==void 0)return te;P=(0,c.normalizeId)(B||P);const me=c.getSchemaRefs.call(this,T,P);return te=new s.SchemaEnv({schema:T,schemaId:ee,meta:F,baseId:P,localRefs:me}),this._cache.set(te.schema,te),x&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=te),w&&this.validateSchema(T,!0),te}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):s.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,T)}finally{this.opts=F}}}S.ValidationError=i.default,S.MissingRefError=n.default,e.default=S;function E(K,T,F,P="error"){for(const w in K){const x=w;x in T&&this.logger[P](`${F}: option ${w}. ${K[x]}`)}}function I(K){return K=(0,c.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 T in K)this.addSchema(K[T],T)}function j(){for(const K in this.opts.formats){const T=this.opts.formats[K];T&&this.addFormat(K,T)}}function L(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in K){const F=K[T];F.keyword||(F.keyword=T),this.addKeyword(F)}}function G(){const K={...this.opts};for(const T of b)delete K[T];return K}const Y={log(){},warn(){},error(){}};function Q(K){if(K===!1)return Y;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 pe(K,T){const{RULES:F}=this;if((0,u.eachItem)(K,P=>{if(F.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!oe.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function R(K,T,F){var P;const w=T?.post;if(F&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:x}=this;let B=w?x.post:x.rules.find(({type:te})=>te===F);if(B||(B={type:F,rules:[]},x.rules.push(B)),x.keywords[K]=!0,!T)return;const ee={keyword:K,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?X.call(this,B,ee,T.before):B.rules.push(ee),x.all[K]=ee,(P=T.implements)===null||P===void 0||P.forEach(te=>this.addKeyword(te))}function X(K,T,F){const P=K.rules.findIndex(w=>w.keyword===F);P>=0?K.rules.splice(P,0,T):(K.rules.push(T),this.logger.warn(`rule ${F} is not defined`))}function ie(K){let{metaSchema:T}=K;T!==void 0&&(K.$data&&this.opts.$data&&(T=ce(T)),K.validateSchema=this.compile(T,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(K){return{anyOf:[K,re]}}}(to)),to}var vr={},$r={},br={},Tu;function mb(){if(Tu)return br;Tu=1,Object.defineProperty(br,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return br.default=e,br}var Tt={},Pu;function gb(){if(Pu)return Tt;Pu=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.callRef=Tt.getValidate=void 0;const e=Vi(),t=gt(),r=ye(),i=Rt(),n=Oa(),o=_e(),s={keyword:"$ref",schemaType:"string",code(d){const{gen:u,schema:h,it:y}=d,{baseId:_,schemaEnv:b,validateName:g,opts:m,self:$}=y,{root:f}=b;if((h==="#"||h==="#/")&&_===f.baseId)return S();const v=n.resolveRef.call($,f,_,h);if(v===void 0)throw new e.default(y.opts.uriResolver,_,h);if(v instanceof n.SchemaEnv)return E(v);return I(v);function S(){if(b===f)return c(d,g,b,b.$async);const O=u.scopeValue("root",{ref:f});return c(d,(0,r._)`${O}.validate`,f,f.$async)}function E(O){const j=a(d,O);c(d,j,O,O.$async)}function I(O){const j=u.scopeValue("schema",m.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),L=u.name("valid"),G=d.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},L);d.mergeEvaluated(G),d.ok(L)}}};function a(d,u){const{gen:h}=d;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}Tt.getValidate=a;function c(d,u,h,y){const{gen:_,it:b}=d,{allErrors:g,schemaEnv:m,opts:$}=b,f=$.passContext?i.default.this:r.nil;y?v():S();function v(){if(!m.$async)throw new Error("async schema referenced by sync schema");const O=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(d,u,f)}`),I(u),g||_.assign(O,!0)},j=>{_.if((0,r._)`!(${j} instanceof ${b.ValidationError})`,()=>_.throw(j)),E(j),g||_.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,u,f),()=>I(u),()=>E(u))}function E(O){const j=(0,r._)`${O}.errors`;_.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${j} : ${i.default.vErrors}.concat(${j})`),_.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function I(O){var j;if(!b.opts.unevaluated)return;const L=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if(b.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(b.props=o.mergeEvaluated.props(_,L.props,b.props));else{const G=_.var("props",(0,r._)`${O}.evaluated.props`);b.props=o.mergeEvaluated.props(_,G,b.props,r.Name)}if(b.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(b.items=o.mergeEvaluated.items(_,L.items,b.items));else{const G=_.var("items",(0,r._)`${O}.evaluated.items`);b.items=o.mergeEvaluated.items(_,G,b.items,r.Name)}}}return Tt.callRef=c,Tt.default=s,Tt}var Du;function yb(){if(Du)return $r;Du=1,Object.defineProperty($r,"__esModule",{value:!0});const e=mb(),t=gb(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $r.default=r,$r}var _r={},wr={},Uu;function vb(){if(Uu)return wr;Uu=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ye(),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:c}=o;o.fail$data((0,e._)`${a} ${r[s].fail} ${c} || isNaN(${a})`)}};return wr.default=n,wr}var kr={},Cu;function $b(){if(Cu)return kr;Cu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ye(),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,c=a.opts.multipleOfPrecision,d=n.let("res"),u=c?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${c}`:(0,e._)`${d} !== parseInt(${d})`;i.fail$data((0,e._)`(${s} === 0 || (${d} = ${o}/${s}, ${u}))`)}};return kr.default=r,kr}var Sr={},Ir={},Bu;function bb(){if(Bu)return Ir;Bu=1,Object.defineProperty(Ir,"__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 Ir.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ir}var Ru;function _b(){if(Ru)return Sr;Ru=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ye(),t=_e(),r=bb(),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:c,it:d}=o,u=s==="maxLength"?e.operators.GT:e.operators.LT,h=d.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return Sr.default=n,Sr}var Er={},Fu;function wb(){if(Fu)return Er;Fu=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=gt(),t=ye(),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:c,it:d}=n,u=d.opts.unicodeRegExp?"u":"",h=s?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(n,a);n.fail$data((0,t._)`!${h}.test(${o})`)}};return Er.default=i,Er}var Nr={},Lu;function kb(){if(Lu)return Nr;Lu=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=ye(),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 Nr.default=r,Nr}var Or={},Zu;function Sb(){if(Zu)return Or;Zu=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=gt(),t=ye(),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:c,data:d,$data:u,it:h}=o,{opts:y}=h;if(!u&&a.length===0)return;const _=a.length>=y.loopRequired;if(h.allErrors?b():g(),y.strictRequired){const f=o.parentSchema.properties,{definedProperties:v}=o.it;for(const S of a)if(f?.[S]===void 0&&!v.has(S)){const E=h.schemaEnv.baseId+h.errSchemaPath,I=`required property "${S}" is not defined at "${E}" (strictRequired)`;(0,r.checkStrictMode)(h,I,h.opts.strictRequired)}}function b(){if(_||u)o.block$data(t.nil,m);else for(const f of a)(0,e.checkReportMissingProp)(o,f)}function g(){const f=s.let("missing");if(_||u){const v=s.let("valid",!0);o.block$data(v,()=>$(f,v)),o.ok(v)}else s.if((0,e.checkMissingProp)(o,a,f)),(0,e.reportMissingProp)(o,f),s.else()}function m(){s.forOf("prop",c,f=>{o.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,d,f,y.ownProperties),()=>o.error())})}function $(f,v){o.setParams({missingProperty:f}),s.forOf(f,c,()=>{s.assign(v,(0,e.propertyInData)(s,d,f,y.ownProperties)),s.if((0,t.not)(v),()=>{o.error(),s.break()})},t.nil)}}};return Or.default=n,Or}var xr={},Mu;function Ib(){if(Mu)return xr;Mu=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ye(),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 xr.default=r,xr}var jr={},Ar={},qu;function xa(){if(qu)return Ar;qu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Bp();return e.code='require("ajv/dist/runtime/equal").default',Ar.default=e,Ar}var Vu;function Eb(){if(Vu)return jr;Vu=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=pi(),t=ye(),r=_e(),i=xa(),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:c,$data:d,schema:u,parentSchema:h,schemaCode:y,it:_}=s;if(!d&&!u)return;const b=a.let("valid"),g=h.items?(0,e.getSchemaTypes)(h.items):[];s.block$data(b,m,(0,t._)`${y} === false`),s.ok(b);function m(){const S=a.let("i",(0,t._)`${c}.length`),E=a.let("j");s.setParams({i:S,j:E}),a.assign(b,!0),a.if((0,t._)`${S} > 1`,()=>($()?f:v)(S,E))}function $(){return g.length>0&&!g.some(S=>S==="object"||S==="array")}function f(S,E){const I=a.name("item"),O=(0,e.checkDataTypes)(g,I,_.opts.strictNumbers,e.DataType.Wrong),j=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${S}--;`,()=>{a.let(I,(0,t._)`${c}[${S}]`),a.if(O,(0,t._)`continue`),g.length>1&&a.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),a.if((0,t._)`typeof ${j}[${I}] == "number"`,()=>{a.assign(E,(0,t._)`${j}[${I}]`),s.error(),a.assign(b,!1).break()}).code((0,t._)`${j}[${I}] = ${S}`)})}function v(S,E){const I=(0,r.useFunc)(a,i.default),O=a.name("outer");a.label(O).for((0,t._)`;${S}--;`,()=>a.for((0,t._)`${E} = ${S}; ${E}--;`,()=>a.if((0,t._)`${I}(${c}[${S}], ${c}[${E}])`,()=>{s.error(),a.assign(b,!1).break(O)})))}}};return jr.default=o,jr}var zr={},Ku;function Nb(){if(Ku)return zr;Ku=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),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:c,schemaCode:d,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${d})`):o.fail((0,e._)`${u} !== ${a}`)}};return zr.default=n,zr}var Tr={},Ju;function Ob(){if(Ju)return Tr;Ju=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),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:c,schema:d,schemaCode:u,it:h}=o;if(!c&&d.length===0)throw new Error("enum must have non-empty array");const y=d.length>=h.opts.loopEnum;let _;const b=()=>_??(_=(0,t.useFunc)(s,r.default));let g;if(y||c)g=s.let("valid"),o.block$data(g,m);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const f=s.const("vSchema",u);g=(0,e.or)(...d.map((v,S)=>$(f,S)))}o.pass(g);function m(){s.assign(g,!1),s.forOf("v",u,f=>s.if((0,e._)`${b()}(${a}, ${f})`,()=>s.assign(g,!0).break()))}function $(f,v){const S=d[v];return typeof S=="object"&&S!==null?(0,e._)`${b()}(${a}, ${f}[${v}])`:(0,e._)`${a} === ${S}`}}};return Tr.default=n,Tr}var Gu;function xb(){if(Gu)return _r;Gu=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=vb(),t=$b(),r=_b(),i=wb(),n=kb(),o=Sb(),s=Ib(),a=Eb(),c=Nb(),d=Ob(),u=[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"},c.default,d.default];return _r.default=u,_r}var Pr={},sn={},Wu;function Rp(){if(Wu)return sn;Wu=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.validateAdditionalItems=void 0;const e=ye(),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:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:d,keyword:u,it:h}=o;h.items=!0;const y=a.const("len",(0,e._)`${d}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${y} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const b=a.var("valid",(0,e._)`${y} <= ${s.length}`);a.if((0,e.not)(b),()=>_(b)),o.ok(b)}function _(b){a.forRange("i",s.length,y,g=>{o.subschema({keyword:u,dataProp:g,dataPropType:t.Type.Num},b),h.allErrors||a.if((0,e.not)(b),()=>a.break())})}}return sn.validateAdditionalItems=n,sn.default=i,sn}var Dr={},an={},Hu;function Fp(){if(Hu)return an;Hu=1,Object.defineProperty(an,"__esModule",{value:!0}),an.validateTuple=void 0;const e=ye(),t=_e(),r=gt(),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:c,parentSchema:d,data:u,keyword:h,it:y}=o;g(d),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(c,a.length,y.items));const _=c.name("valid"),b=c.const("len",(0,e._)`${u}.length`);a.forEach((m,$)=>{(0,t.alwaysValidSchema)(y,m)||(c.if((0,e._)`${b} > ${$}`,()=>o.subschema({keyword:h,schemaProp:$,dataProp:$},_)),o.ok(_))});function g(m){const{opts:$,errSchemaPath:f}=y,v=a.length,S=v===m.minItems&&(v===m.maxItems||m[s]===!1);if($.strictTuples&&!S){const E=`"${h}" is ${v}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,E,$.strictTuples)}}}return an.validateTuple=n,an.default=i,an}var Xu;function jb(){if(Xu)return Dr;Xu=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=Fp(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Dr.default=t,Dr}var Ur={},Yu;function Ab(){if(Yu)return Ur;Yu=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=ye(),t=_e(),r=gt(),i=Rp(),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:c,it:d}=s,{prefixItems:u}=c;d.items=!0,!(0,t.alwaysValidSchema)(d,a)&&(u?(0,i.validateAdditionalItems)(s,u):s.ok((0,r.validateArray)(s)))}};return Ur.default=o,Ur}var Cr={},Qu;function zb(){if(Qu)return Cr;Qu=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=ye(),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:c,it:d}=n;let u,h;const{minContains:y,maxContains:_}=a;d.opts.next?(u=y===void 0?1:y,h=_):u=1;const b=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(d,s)){let v=(0,e._)`${b} >= ${u}`;h!==void 0&&(v=(0,e._)`${v} && ${b} <= ${h}`),n.pass(v);return}d.items=!0;const g=o.name("valid");h===void 0&&u===1?$(g,()=>o.if(g,()=>o.break())):u===0?(o.let(g,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(g,!1),m()),n.result(g,()=>n.reset());function m(){const v=o.name("_valid"),S=o.let("count",0);$(v,()=>o.if(v,()=>f(S)))}function $(v,S){o.forRange("i",0,b,E=>{n.subschema({keyword:"contains",dataProp:E,dataPropType:t.Type.Num,compositeRule:!0},v),S()})}function f(v){o.code((0,e._)`${v}++`),h===void 0?o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0).break()):(o.if((0,e._)`${v} > ${h}`,()=>o.assign(g,!1).break()),u===1?o.assign(g,!0):o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0)))}}};return Cr.default=i,Cr}var fo={},ec;function Tb(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=_e(),i=gt();e.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
169
169
  missingProperty: ${h},
170
170
  depsCount: ${d},
171
- deps: ${u}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[d,u]=o(c);s(c,d),a(c,u)}};function o({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const y=Array.isArray(c[h])?d:u;y[h]=c[h]}return[d,u]}function s(c,d=c.schema){const{gen:u,data:h,it:y}=c;if(Object.keys(d).length===0)return;const _=u.let("missing");for(const b in d){const g=d[b];if(g.length===0)continue;const m=(0,i.propertyInData)(u,h,b,y.opts.ownProperties);c.setParams({property:b,depsCount:g.length,deps:g.join(", ")}),y.allErrors?u.if(m,()=>{for(const $ of g)(0,i.checkReportMissingProp)(c,$)}):(u.if((0,t._)`${m} && (${(0,i.checkMissingProp)(c,g,_)})`),(0,i.reportMissingProp)(c,_),u.else())}}e.validatePropertyDeps=s;function a(c,d=c.schema){const{gen:u,data:h,keyword:y,it:_}=c,b=u.name("valid");for(const g in d)(0,r.alwaysValidSchema)(_,d[g])||(u.if((0,i.propertyInData)(u,h,g,_.opts.ownProperties),()=>{const m=c.subschema({keyword:y,schemaProp:g},b);c.mergeValidEvaluated(m,b)},()=>u.var(b,!0)),c.ok(b))}e.validateSchemaDeps=a,e.default=n}(fo)),fo}var Br={},tc;function Tb(){if(tc)return Br;tc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=ye(),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:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const d=o.name("valid");o.forIn("key",a,u=>{n.setParams({propertyName:u}),n.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},d),o.if((0,e.not)(d),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(d)}};return Br.default=i,Br}var Rr={},nc;function Lp(){if(nc)return Rr;nc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=gt(),t=ye(),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:c,parentSchema:d,data:u,errsCount:h,it:y}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:_,opts:b}=y;if(y.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(y,c))return;const g=(0,e.allSchemaProperties)(d.properties),m=(0,e.allSchemaProperties)(d.patternProperties);$(),s.ok((0,t._)`${h} === ${r.default.errors}`);function $(){a.forIn("key",u,I=>{!g.length&&!m.length?S(I):a.if(f(I),()=>S(I))})}function f(I){let O;if(g.length>8){const j=(0,i.schemaRefOrVal)(y,d.properties,"properties");O=(0,e.isOwnProperty)(a,j,I)}else g.length?O=(0,t.or)(...g.map(j=>(0,t._)`${I} === ${j}`)):O=t.nil;return m.length&&(O=(0,t.or)(O,...m.map(j=>(0,t._)`${(0,e.usePattern)(s,j)}.test(${I})`))),(0,t.not)(O)}function v(I){a.code((0,t._)`delete ${u}[${I}]`)}function S(I){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){v(I);return}if(c===!1){s.setParams({additionalProperty:I}),s.error(),_||a.break();return}if(typeof c=="object"&&!(0,i.alwaysValidSchema)(y,c)){const O=a.name("valid");b.removeAdditional==="failing"?(E(I,O,!1),a.if((0,t.not)(O),()=>{s.reset(),v(I)})):(E(I,O),_||a.if((0,t.not)(O),()=>a.break()))}}function E(I,O,j){const L={keyword:"additionalProperties",dataProp:I,dataPropType:i.Type.Str};j===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(L,O)}}};return Rr.default=o,Rr}var Fr={},rc;function Pb(){if(rc)return Fr;rc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=qi(),t=gt(),r=_e(),i=Lp(),n={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:c,data:d,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(u,i.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(a);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),u.props));const y=h.filter(m=>!(0,r.alwaysValidSchema)(u,a[m]));if(y.length===0)return;const _=s.name("valid");for(const m of y)b(m)?g(m):(s.if((0,t.propertyInData)(s,d,m,u.opts.ownProperties)),g(m),u.allErrors||s.else().var(_,!0),s.endIf()),o.it.definedProperties.add(m),o.ok(_);function b(m){return u.opts.useDefaults&&!u.compositeRule&&a[m].default!==void 0}function g(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},_)}}};return Fr.default=n,Fr}var Lr={},ic;function Db(){if(ic)return Lr;ic=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),i=_e(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:c,parentSchema:d,it:u}=o,{opts:h}=u,y=(0,e.allSchemaProperties)(a),_=y.filter(S=>(0,r.alwaysValidSchema)(u,a[S]));if(y.length===0||_.length===y.length&&(!u.opts.unevaluated||u.props===!0))return;const b=h.strictSchema&&!h.allowMatchingProperties&&d.properties,g=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,i.evaluatedPropsToName)(s,u.props));const{props:m}=u;$();function $(){for(const S of y)b&&f(S),u.allErrors?v(S):(s.var(g,!0),v(S),s.if(g))}function f(S){for(const E in b)new RegExp(S).test(E)&&(0,r.checkStrictMode)(u,`property ${E} matches pattern ${S} (use allowMatchingProperties)`)}function v(S){s.forIn("key",c,E=>{s.if((0,t._)`${(0,e.usePattern)(o,S)}.test(${E})`,()=>{const I=_.includes(S);I||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:E,dataPropType:i.Type.Str},g),u.opts.unevaluated&&m!==!0?s.assign((0,t._)`${m}[${E}]`,!0):!I&&!u.allErrors&&s.if((0,t.not)(g),()=>s.break())})})}}};return Lr.default=n,Lr}var Zr={},oc;function Ub(){if(oc)return Zr;oc=1,Object.defineProperty(Zr,"__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 Zr.default=t,Zr}var Mr={},sc;function Cb(){if(sc)return Mr;sc=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gt().validateUnion,error:{message:"must match a schema in anyOf"}};return Mr.default=t,Mr}var qr={},ac;function Bb(){if(ac)return qr;ac=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=ye(),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:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const d=s,u=o.let("valid",!1),h=o.let("passing",null),y=o.name("_valid");n.setParams({passing:h}),o.block(_),n.result(u,()=>n.reset(),()=>n.error(!0));function _(){d.forEach((b,g)=>{let m;(0,t.alwaysValidSchema)(c,b)?o.var(y,!0):m=n.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&o.if((0,e._)`${y} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${g}]`).else(),o.if(y,()=>{o.assign(u,!0),o.assign(h,g),m&&n.mergeEvaluated(m,e.Name)})})}}};return qr.default=i,qr}var Vr={},uc;function Rb(){if(uc)return Vr;uc=1,Object.defineProperty(Vr,"__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,c)=>{if((0,e.alwaysValidSchema)(o,a))return;const d=r.subschema({keyword:"allOf",schemaProp:c},s);r.ok(s),r.mergeEvaluated(d)})}};return Vr.default=t,Vr}var Kr={},cc;function Fb(){if(cc)return Kr;cc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=ye(),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:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const d=n(c,"then"),u=n(c,"else");if(!d&&!u)return;const h=s.let("valid",!0),y=s.name("_valid");if(_(),o.reset(),d&&u){const g=s.let("ifClause");o.setParams({ifClause:g}),s.if(y,b("then",g),b("else",g))}else d?s.if(y,b("then")):s.if((0,e.not)(y),b("else"));o.pass(h,()=>o.error(!0));function _(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);o.mergeEvaluated(g)}function b(g,m){return()=>{const $=o.subschema({keyword:g},y);s.assign(h,y),o.mergeValidEvaluated($,h),m?s.assign(m,(0,e._)`${g}`):o.setParams({ifClause:g})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Kr.default=i,Kr}var Jr={},lc;function Lb(){if(lc)return Jr;lc=1,Object.defineProperty(Jr,"__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 Jr.default=t,Jr}var fc;function Zb(){if(fc)return Pr;fc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=Rp(),t=xb(),r=Fp(),i=jb(),n=zb(),o=Ab(),s=Tb(),a=Lp(),c=Pb(),d=Db(),u=Ub(),h=Cb(),y=Bb(),_=Rb(),b=Fb(),g=Lb();function m($=!1){const f=[u.default,h.default,y.default,_.default,b.default,g.default,s.default,a.default,o.default,c.default,d.default];return $?f.push(t.default,i.default):f.push(e.default,r.default),f.push(n.default),f}return Pr.default=m,Pr}var Gr={},Wr={},dc;function Mb(){if(dc)return Wr;dc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ye(),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:c,schemaCode:d,it:u}=i,{opts:h,errSchemaPath:y,schemaEnv:_,self:b}=u;if(!h.validateFormats)return;a?g():m();function g(){const $=o.scopeValue("formats",{ref:b.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${$}[${d}]`),v=o.let("fType"),S=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(v,(0,e._)`${f}.type || "string"`).assign(S,(0,e._)`${f}.validate`),()=>o.assign(v,(0,e._)`"string"`).assign(S,f)),i.fail$data((0,e.or)(E(),I()));function E(){return h.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function I(){const O=_.$async?(0,e._)`(${f}.async ? await ${S}(${s}) : ${S}(${s}))`:(0,e._)`${S}(${s})`,j=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${s}))`;return(0,e._)`${S} && ${S} !== true && ${v} === ${n} && !${j}`}}function m(){const $=b.formats[c];if(!$){E();return}if($===!0)return;const[f,v,S]=I($);f===n&&i.pass(O());function E(){if(h.strictSchema===!1){b.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${y}"`}}function I(j){const L=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,G=o.scopeValue("formats",{key:c,ref:j,code:L});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${G}.validate`]:["string",j,G]}function O(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${s})`}return typeof v=="function"?(0,e._)`${S}(${s})`:(0,e._)`${S}.test(${s})`}}}};return Wr.default=r,Wr}var hc;function qb(){if(hc)return Gr;hc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const t=[Mb().default];return Gr.default=t,Gr}var Zt={},pc;function Vb(){return pc||(pc=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.contentVocabulary=Zt.metadataVocabulary=void 0,Zt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Zt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Zt}var mc;function Kb(){if(mc)return vr;mc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=gb(),t=Ob(),r=Zb(),i=qb(),n=Vb(),o=[e.default,t.default,(0,r.default)(),i.default,n.metadataVocabulary,n.contentVocabulary];return vr.default=o,vr}var Hr={},Pn={},gc;function Jb(){if(gc)return Pn;gc=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 yc;function Gb(){if(yc)return Hr;yc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=ye(),t=Jb(),r=Oa(),i=Vi(),n=_e(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:d}})=>(0,e._)`{error: ${a}, tag: ${d}, tagValue: ${c}}`},code(a){const{gen:c,data:d,schema:u,parentSchema:h,it:y}=a,{oneOf:_}=h;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=c.let("valid",!1),m=c.const("tag",(0,e._)`${d}${(0,e.getProperty)(b)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>$(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:b})),a.ok(g);function $(){const S=v();c.if(!1);for(const E in S)c.elseIf((0,e._)`${m} === ${E}`),c.assign(g,f(S[E]));c.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:b}),c.endIf()}function f(S){const E=c.name("valid"),I=a.subschema({keyword:"oneOf",schemaProp:S},E);return a.mergeEvaluated(I,e.Name),E}function v(){var S;const E={},I=j(h);let O=!0;for(let Y=0;Y<_.length;Y++){let Q=_[Y];if(Q?.$ref&&!(0,n.schemaHasRulesButRef)(Q,y.self.RULES)){const pe=Q.$ref;if(Q=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,pe),Q instanceof r.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new i.default(y.opts.uriResolver,y.baseId,pe)}const oe=(S=Q?.properties)===null||S===void 0?void 0:S[b];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);O=O&&(I||j(Q)),L(oe,Y)}if(!O)throw new Error(`discriminator: "${b}" must be required`);return E;function j({required:Y}){return Array.isArray(Y)&&Y.includes(b)}function L(Y,Q){if(Y.const)G(Y.const,Q);else if(Y.enum)for(const oe of Y.enum)G(oe,Q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function G(Y,Q){if(typeof Y!="string"||Y in E)throw new Error(`discriminator: "${b}" values must be unique strings`);E[Y]=Q}}}};return Hr.default=s,Hr}const Wb="http://json-schema.org/draft-07/schema#",Hb="http://json-schema.org/draft-07/schema#",Xb="Core schema meta-schema",Yb={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:[]}},Qb=["object","boolean"],e_={$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 t_={$schema:Wb,$id:Hb,title:Xb,definitions:Yb,type:Qb,properties:e_,default:!0},vc;function n_(){return vc||(vc=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=hb(),i=Kb(),n=Gb(),o=t_,s=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,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=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=qi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=Na();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var y=Vi();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})}(hr,hr.exports)),hr.exports}var r_=n_();const ho=10,$c=(e=0)=>t=>`\x1B[${t+e}m`,bc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_c=(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 i_=Object.keys(je.color),o_=Object.keys(je.bgColor);[...i_,...o_];function s_(){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=$c(),je.color.ansi256=bc(),je.color.ansi16m=_c(),je.bgColor.ansi=$c(ho),je.bgColor.ansi256=bc(ho),je.bgColor.ansi16m=_c(ho),Object.defineProperties(je,{rgbToAnsi256:{value:(t,r,i)=>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=s_();class a_ extends Sa{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 r_.Ajv({strict:!1});this.logger.debug({instanceId:t.id},"validating instance");const s=[];for(const[d,u]of Object.entries(r.args))try{const h=K0(t.args?.[d]);if(!u.required&&h===void 0)continue;o.validate(u.schema,h)||(this.logger.debug({instanceId:t.id,argumentName:d},"invalid argument"),s.push(`Invalid argument "${et.blueBright.open}${d}${et.reset.close}": `+o.errorsText()))}catch(h){this.logger.debug({instanceId:t.id,argumentName:d,error:h},"failed to validate argument"),s.push(`Failed to validate argument "${et.blueBright.open}${d}${et.reset.close}": `+(h instanceof Error?h.message:String(h)))}if(ka(r))for(const[d,u]of Object.entries(r.secrets))u.required&&!i?.secretNames?.includes(d)&&s.push(`Missing required secret "${et.blueBright.open}${d}${et.reset.close}"`);for(const[d,u]of Object.entries(n))for(const h of u)this.outputs.get(h.input.instanceId)?.status!=="ok"&&s.push(`Invalid input "${et.blueBright.open}${d}${et.reset.close}":
171
+ deps: ${u}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[d,u]=o(c);s(c,d),a(c,u)}};function o({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const y=Array.isArray(c[h])?d:u;y[h]=c[h]}return[d,u]}function s(c,d=c.schema){const{gen:u,data:h,it:y}=c;if(Object.keys(d).length===0)return;const _=u.let("missing");for(const b in d){const g=d[b];if(g.length===0)continue;const m=(0,i.propertyInData)(u,h,b,y.opts.ownProperties);c.setParams({property:b,depsCount:g.length,deps:g.join(", ")}),y.allErrors?u.if(m,()=>{for(const $ of g)(0,i.checkReportMissingProp)(c,$)}):(u.if((0,t._)`${m} && (${(0,i.checkMissingProp)(c,g,_)})`),(0,i.reportMissingProp)(c,_),u.else())}}e.validatePropertyDeps=s;function a(c,d=c.schema){const{gen:u,data:h,keyword:y,it:_}=c,b=u.name("valid");for(const g in d)(0,r.alwaysValidSchema)(_,d[g])||(u.if((0,i.propertyInData)(u,h,g,_.opts.ownProperties),()=>{const m=c.subschema({keyword:y,schemaProp:g},b);c.mergeValidEvaluated(m,b)},()=>u.var(b,!0)),c.ok(b))}e.validateSchemaDeps=a,e.default=n}(fo)),fo}var Br={},tc;function Pb(){if(tc)return Br;tc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=ye(),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:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const d=o.name("valid");o.forIn("key",a,u=>{n.setParams({propertyName:u}),n.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},d),o.if((0,e.not)(d),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(d)}};return Br.default=i,Br}var Rr={},nc;function Lp(){if(nc)return Rr;nc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=gt(),t=ye(),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:c,parentSchema:d,data:u,errsCount:h,it:y}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:_,opts:b}=y;if(y.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(y,c))return;const g=(0,e.allSchemaProperties)(d.properties),m=(0,e.allSchemaProperties)(d.patternProperties);$(),s.ok((0,t._)`${h} === ${r.default.errors}`);function $(){a.forIn("key",u,I=>{!g.length&&!m.length?S(I):a.if(f(I),()=>S(I))})}function f(I){let O;if(g.length>8){const j=(0,i.schemaRefOrVal)(y,d.properties,"properties");O=(0,e.isOwnProperty)(a,j,I)}else g.length?O=(0,t.or)(...g.map(j=>(0,t._)`${I} === ${j}`)):O=t.nil;return m.length&&(O=(0,t.or)(O,...m.map(j=>(0,t._)`${(0,e.usePattern)(s,j)}.test(${I})`))),(0,t.not)(O)}function v(I){a.code((0,t._)`delete ${u}[${I}]`)}function S(I){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){v(I);return}if(c===!1){s.setParams({additionalProperty:I}),s.error(),_||a.break();return}if(typeof c=="object"&&!(0,i.alwaysValidSchema)(y,c)){const O=a.name("valid");b.removeAdditional==="failing"?(E(I,O,!1),a.if((0,t.not)(O),()=>{s.reset(),v(I)})):(E(I,O),_||a.if((0,t.not)(O),()=>a.break()))}}function E(I,O,j){const L={keyword:"additionalProperties",dataProp:I,dataPropType:i.Type.Str};j===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(L,O)}}};return Rr.default=o,Rr}var Fr={},rc;function Db(){if(rc)return Fr;rc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=qi(),t=gt(),r=_e(),i=Lp(),n={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:c,data:d,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(u,i.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(a);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),u.props));const y=h.filter(m=>!(0,r.alwaysValidSchema)(u,a[m]));if(y.length===0)return;const _=s.name("valid");for(const m of y)b(m)?g(m):(s.if((0,t.propertyInData)(s,d,m,u.opts.ownProperties)),g(m),u.allErrors||s.else().var(_,!0),s.endIf()),o.it.definedProperties.add(m),o.ok(_);function b(m){return u.opts.useDefaults&&!u.compositeRule&&a[m].default!==void 0}function g(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},_)}}};return Fr.default=n,Fr}var Lr={},ic;function Ub(){if(ic)return Lr;ic=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),i=_e(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:c,parentSchema:d,it:u}=o,{opts:h}=u,y=(0,e.allSchemaProperties)(a),_=y.filter(S=>(0,r.alwaysValidSchema)(u,a[S]));if(y.length===0||_.length===y.length&&(!u.opts.unevaluated||u.props===!0))return;const b=h.strictSchema&&!h.allowMatchingProperties&&d.properties,g=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,i.evaluatedPropsToName)(s,u.props));const{props:m}=u;$();function $(){for(const S of y)b&&f(S),u.allErrors?v(S):(s.var(g,!0),v(S),s.if(g))}function f(S){for(const E in b)new RegExp(S).test(E)&&(0,r.checkStrictMode)(u,`property ${E} matches pattern ${S} (use allowMatchingProperties)`)}function v(S){s.forIn("key",c,E=>{s.if((0,t._)`${(0,e.usePattern)(o,S)}.test(${E})`,()=>{const I=_.includes(S);I||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:E,dataPropType:i.Type.Str},g),u.opts.unevaluated&&m!==!0?s.assign((0,t._)`${m}[${E}]`,!0):!I&&!u.allErrors&&s.if((0,t.not)(g),()=>s.break())})})}}};return Lr.default=n,Lr}var Zr={},oc;function Cb(){if(oc)return Zr;oc=1,Object.defineProperty(Zr,"__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 Zr.default=t,Zr}var Mr={},sc;function Bb(){if(sc)return Mr;sc=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gt().validateUnion,error:{message:"must match a schema in anyOf"}};return Mr.default=t,Mr}var qr={},ac;function Rb(){if(ac)return qr;ac=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=ye(),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:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const d=s,u=o.let("valid",!1),h=o.let("passing",null),y=o.name("_valid");n.setParams({passing:h}),o.block(_),n.result(u,()=>n.reset(),()=>n.error(!0));function _(){d.forEach((b,g)=>{let m;(0,t.alwaysValidSchema)(c,b)?o.var(y,!0):m=n.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&o.if((0,e._)`${y} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${g}]`).else(),o.if(y,()=>{o.assign(u,!0),o.assign(h,g),m&&n.mergeEvaluated(m,e.Name)})})}}};return qr.default=i,qr}var Vr={},uc;function Fb(){if(uc)return Vr;uc=1,Object.defineProperty(Vr,"__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,c)=>{if((0,e.alwaysValidSchema)(o,a))return;const d=r.subschema({keyword:"allOf",schemaProp:c},s);r.ok(s),r.mergeEvaluated(d)})}};return Vr.default=t,Vr}var Kr={},cc;function Lb(){if(cc)return Kr;cc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=ye(),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:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const d=n(c,"then"),u=n(c,"else");if(!d&&!u)return;const h=s.let("valid",!0),y=s.name("_valid");if(_(),o.reset(),d&&u){const g=s.let("ifClause");o.setParams({ifClause:g}),s.if(y,b("then",g),b("else",g))}else d?s.if(y,b("then")):s.if((0,e.not)(y),b("else"));o.pass(h,()=>o.error(!0));function _(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);o.mergeEvaluated(g)}function b(g,m){return()=>{const $=o.subschema({keyword:g},y);s.assign(h,y),o.mergeValidEvaluated($,h),m?s.assign(m,(0,e._)`${g}`):o.setParams({ifClause:g})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Kr.default=i,Kr}var Jr={},lc;function Zb(){if(lc)return Jr;lc=1,Object.defineProperty(Jr,"__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 Jr.default=t,Jr}var fc;function Mb(){if(fc)return Pr;fc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=Rp(),t=jb(),r=Fp(),i=Ab(),n=zb(),o=Tb(),s=Pb(),a=Lp(),c=Db(),d=Ub(),u=Cb(),h=Bb(),y=Rb(),_=Fb(),b=Lb(),g=Zb();function m($=!1){const f=[u.default,h.default,y.default,_.default,b.default,g.default,s.default,a.default,o.default,c.default,d.default];return $?f.push(t.default,i.default):f.push(e.default,r.default),f.push(n.default),f}return Pr.default=m,Pr}var Gr={},Wr={},dc;function qb(){if(dc)return Wr;dc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ye(),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:c,schemaCode:d,it:u}=i,{opts:h,errSchemaPath:y,schemaEnv:_,self:b}=u;if(!h.validateFormats)return;a?g():m();function g(){const $=o.scopeValue("formats",{ref:b.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${$}[${d}]`),v=o.let("fType"),S=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(v,(0,e._)`${f}.type || "string"`).assign(S,(0,e._)`${f}.validate`),()=>o.assign(v,(0,e._)`"string"`).assign(S,f)),i.fail$data((0,e.or)(E(),I()));function E(){return h.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function I(){const O=_.$async?(0,e._)`(${f}.async ? await ${S}(${s}) : ${S}(${s}))`:(0,e._)`${S}(${s})`,j=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${s}))`;return(0,e._)`${S} && ${S} !== true && ${v} === ${n} && !${j}`}}function m(){const $=b.formats[c];if(!$){E();return}if($===!0)return;const[f,v,S]=I($);f===n&&i.pass(O());function E(){if(h.strictSchema===!1){b.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${y}"`}}function I(j){const L=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,G=o.scopeValue("formats",{key:c,ref:j,code:L});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${G}.validate`]:["string",j,G]}function O(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${s})`}return typeof v=="function"?(0,e._)`${S}(${s})`:(0,e._)`${S}.test(${s})`}}}};return Wr.default=r,Wr}var hc;function Vb(){if(hc)return Gr;hc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const t=[qb().default];return Gr.default=t,Gr}var Zt={},pc;function Kb(){return pc||(pc=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.contentVocabulary=Zt.metadataVocabulary=void 0,Zt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Zt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Zt}var mc;function Jb(){if(mc)return vr;mc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=yb(),t=xb(),r=Mb(),i=Vb(),n=Kb(),o=[e.default,t.default,(0,r.default)(),i.default,n.metadataVocabulary,n.contentVocabulary];return vr.default=o,vr}var Hr={},Pn={},gc;function Gb(){if(gc)return Pn;gc=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 yc;function Wb(){if(yc)return Hr;yc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=ye(),t=Gb(),r=Oa(),i=Vi(),n=_e(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:d}})=>(0,e._)`{error: ${a}, tag: ${d}, tagValue: ${c}}`},code(a){const{gen:c,data:d,schema:u,parentSchema:h,it:y}=a,{oneOf:_}=h;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=c.let("valid",!1),m=c.const("tag",(0,e._)`${d}${(0,e.getProperty)(b)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>$(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:b})),a.ok(g);function $(){const S=v();c.if(!1);for(const E in S)c.elseIf((0,e._)`${m} === ${E}`),c.assign(g,f(S[E]));c.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:b}),c.endIf()}function f(S){const E=c.name("valid"),I=a.subschema({keyword:"oneOf",schemaProp:S},E);return a.mergeEvaluated(I,e.Name),E}function v(){var S;const E={},I=j(h);let O=!0;for(let Y=0;Y<_.length;Y++){let Q=_[Y];if(Q?.$ref&&!(0,n.schemaHasRulesButRef)(Q,y.self.RULES)){const pe=Q.$ref;if(Q=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,pe),Q instanceof r.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new i.default(y.opts.uriResolver,y.baseId,pe)}const oe=(S=Q?.properties)===null||S===void 0?void 0:S[b];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);O=O&&(I||j(Q)),L(oe,Y)}if(!O)throw new Error(`discriminator: "${b}" must be required`);return E;function j({required:Y}){return Array.isArray(Y)&&Y.includes(b)}function L(Y,Q){if(Y.const)G(Y.const,Q);else if(Y.enum)for(const oe of Y.enum)G(oe,Q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function G(Y,Q){if(typeof Y!="string"||Y in E)throw new Error(`discriminator: "${b}" values must be unique strings`);E[Y]=Q}}}};return Hr.default=s,Hr}const Hb="http://json-schema.org/draft-07/schema#",Xb="http://json-schema.org/draft-07/schema#",Yb="Core schema meta-schema",Qb={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:[]}},e_=["object","boolean"],t_={$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 n_={$schema:Hb,$id:Xb,title:Yb,definitions:Qb,type:e_,properties:t_,default:!0},vc;function r_(){return vc||(vc=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=pb(),i=Jb(),n=Wb(),o=n_,s=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,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=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=qi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=Na();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var y=Vi();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})}(hr,hr.exports)),hr.exports}var i_=r_();const ho=10,$c=(e=0)=>t=>`\x1B[${t+e}m`,bc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_c=(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 o_=Object.keys(je.color),s_=Object.keys(je.bgColor);[...o_,...s_];function a_(){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=$c(),je.color.ansi256=bc(),je.color.ansi16m=_c(),je.bgColor.ansi=$c(ho),je.bgColor.ansi256=bc(ho),je.bgColor.ansi16m=_c(ho),Object.defineProperties(je,{rgbToAnsi256:{value:(t,r,i)=>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=a_();class u_ extends Sa{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 i_.Ajv({strict:!1});this.logger.debug({instanceId:t.id},"validating instance");const s=[];for(const[d,u]of Object.entries(r.args))try{const h=q0(t.args?.[d]);if(!u.required&&h===void 0)continue;o.validate(u.schema,h)||(this.logger.debug({instanceId:t.id,argumentName:d},"invalid argument"),s.push(`Invalid argument "${et.blueBright.open}${d}${et.reset.close}": `+o.errorsText()))}catch(h){this.logger.debug({instanceId:t.id,argumentName:d,error:h},"failed to validate argument"),s.push(`Failed to validate argument "${et.blueBright.open}${d}${et.reset.close}": `+(h instanceof Error?h.message:String(h)))}if(ka(r))for(const[d,u]of Object.entries(r.secrets))u.required&&!i?.secretNames?.includes(d)&&s.push(`Missing required secret "${et.blueBright.open}${d}${et.reset.close}"`);for(const[d,u]of Object.entries(n))for(const h of u)this.outputs.get(h.input.instanceId)?.status!=="ok"&&s.push(`Invalid input "${et.blueBright.open}${d}${et.reset.close}":
172
172
  "${et.blueBright.open}${h.input.instanceId}${et.reset.close}" has validation errors`);for(const[d,u]of Object.entries(r.inputs))u.required&&(!n[d]||!n[d].length)&&s.push(`Missing required input "${et.blueBright.open}${d}${et.reset.close}" of type "${et.greenBright.open}${u.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((d,u)=>{const h=d.split(`
173
173
  `),y=`${u+1}. `;return h.map((_,b)=>`${b===0?y:" ".repeat(a)}${_}`).join(`\r
174
174
  `)}).join(`\r
175
- `)}}}const u_={InputResolver:d$,InputHashResolver:W$,ValidationResolver:a_};var Dn={exports:{}},po,wc;function c_(){if(wc)return po;wc=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}po=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 c=new Array(a);c[0]=o(r);for(var d=1;d<a;d++)c[d]=o(i[d]);return c.join(" ")}if(typeof r!="string")return r;var u=i.length;if(u===0)return r;for(var h="",y=1-s,_=-1,b=r&&r.length||0,g=0;g<b;){if(r.charCodeAt(g)===37&&g+1<b){switch(_=_>-1?_:0,r.charCodeAt(g+1)){case 100:case 102:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Number(i[y]),_=g+2,g++;break;case 105:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Math.floor(Number(i[y])),_=g+2,g++;break;case 79:case 111:case 106:if(y>=u||i[y]===void 0)break;_<g&&(h+=r.slice(_,g));var m=typeof i[y];if(m==="string"){h+="'"+i[y]+"'",_=g+2,g++;break}if(m==="function"){h+=i[y].name||"<anonymous>",_=g+2,g++;break}h+=o(i[y]),_=g+2,g++;break;case 115:if(y>=u)break;_<g&&(h+=r.slice(_,g)),h+=String(i[y]),_=g+2,g++;break;case 37:_<g&&(h+=r.slice(_,g)),h+="%",_=g+2,g++,y--;break}++y}++g}return _===-1?r:(_<b&&(h+=r.slice(_)),h)}return po}var kc;function l_(){if(kc)return Dn.exports;kc=1;const e=c_();Dn.exports=u;const t=pe().console||{},r={mapHttpRequest:O,mapHttpResponse:O,wrapRequestSerializer:j,wrapResponseSerializer:j,wrapErrorSerializer:j,req:O,res:O,err:E,errWithCause:E};function i(R,X){return R==="silent"?1/0:X.levels.values[R]}const n=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),s={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(R,X){const ie={logger:X,parent:R[o]};X[o]=ie}function c(R,X,ie){const re={};X.forEach(ce=>{re[ce]=ie[ce]?ie[ce]:t[ce]||t[s[ce]||"log"]||L}),R[n]=re}function d(R,X){return Array.isArray(R)?R.filter(function(re){return re!=="!stdSerializers.err"}):R===!0?Object.keys(X):!1}function u(R){R=R||{},R.browser=R.browser||{};const X=R.browser.transmit;if(X&&typeof X.send!="function")throw Error("pino: transmit option must have a send function");const ie=R.browser.write||t;R.browser.write&&(R.browser.asObject=!0);const re=R.serializers||{},ce=d(R.browser.serialize,re);let K=R.browser.serialize;Array.isArray(R.browser.serialize)&&R.browser.serialize.indexOf("!stdSerializers.err")>-1&&(K=!1);const T=Object.keys(R.customLevels||{}),F=["error","fatal","warn","info","debug","trace"].concat(T);typeof ie=="function"&&F.forEach(function(se){ie[se]=ie}),(R.enabled===!1||R.browser.disabled)&&(R.level="silent");const P=R.level||"info",w=Object.create(ie);w.log||(w.log=L),c(w,F,ie),a({},w),Object.defineProperty(w,"levelVal",{get:B}),Object.defineProperty(w,"level",{get:ee,set:te});const x={transmit:X,serialize:ce,asObject:R.browser.asObject,asObjectBindingsOnly:R.browser.asObjectBindingsOnly,formatters:R.browser.formatters,levels:F,timestamp:I(R),messageKey:R.messageKey||"msg",onChild:R.onChild||L};w.levels=h(R),w.level=P,w.isLevelEnabled=function(se){return this.levels.values[se]?this.levels.values[se]>=this.levels.values[this.level]:!1},w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=L,w.serializers=re,w._serialize=ce,w._stdErrSerialize=K,w.child=function(...se){return me.call(this,x,...se)},X&&(w._logEvent=S());function B(){return i(this.level,this)}function ee(){return this._level}function te(se){if(se!=="silent"&&!this.levels.values[se])throw Error("unknown level "+se);this._level=se,b(this,x,w,"error"),b(this,x,w,"fatal"),b(this,x,w,"warn"),b(this,x,w,"info"),b(this,x,w,"debug"),b(this,x,w,"trace"),T.forEach(z=>{b(this,x,w,z)})}function me(se,z,U){if(!z)throw new Error("missing bindings for child Pino");U=U||{},ce&&z.serializers&&(U.serializers=z.serializers);const M=U.serializers;if(ce&&M){var J=Object.assign({},re,M),ne=R.browser.serialize===!0?Object.keys(J):ce;delete z.serializers,f([z],ne,J,this._stdErrSerialize)}function ae(Fe){this._childLevel=(Fe._childLevel|0)+1,this.bindings=z,J&&(this.serializers=J,this._serialize=ne),X&&(this._logEvent=S([].concat(Fe._logEvent.bindings,z)))}ae.prototype=this;const we=new ae(this);return a(this,we),we.child=function(...Fe){return me.call(this,se,...Fe)},we.level=U.level||this.level,se.onChild(we),we}return w}function h(R){const X=R.customLevels||{},ie=Object.assign({},u.levels.values,X),re=Object.assign({},u.levels.labels,y(X));return{values:ie,labels:re}}function y(R){const X={};return Object.keys(R).forEach(function(ie){X[R[ie]]=ie}),X}u.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"}},u.stdSerializers=r,u.stdTimeFunctions=Object.assign({},{nullTime:G,epochTime:Y,unixTime:Q,isoTime:oe});function _(R){const X=[];R.bindings&&X.push(R.bindings);let ie=R[o];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&X.push(ie.logger.bindings);return X.reverse()}function b(R,X,ie,re){if(Object.defineProperty(R,re,{value:i(R.level,ie)>i(re,ie)?L:ie[n][re],writable:!0,enumerable:!0,configurable:!0}),R[re]===L){if(!X.transmit)return;const K=X.transmit.level||R.level,T=i(K,ie);if(i(re,ie)<T)return}R[re]=m(R,X,ie,re);const ce=_(R);ce.length!==0&&(R[re]=g(ce,R[re]))}function g(R,X){return function(){return X.apply(this,[...R,...arguments])}}function m(R,X,ie,re){return function(ce){return function(){const T=X.timestamp(),F=new Array(arguments.length),P=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var w=0;w<F.length;w++)F[w]=arguments[w];var x=!1;if(X.serialize&&(f(F,this._serialize,this.serializers,this._stdErrSerialize),x=!0),X.asObject||X.formatters?ce.call(P,...$(this,re,F,T,X)):ce.apply(P,F),X.transmit){const B=X.transmit.level||R._level,ee=i(B,ie),te=i(re,ie);if(te<ee)return;v(this,{ts:T,methodLevel:re,methodValue:te,transmitValue:ie.levels.values[X.transmit.level||R._level],send:X.transmit.send,val:i(R._level,ie)},F,x)}}}(R[n][re])}function $(R,X,ie,re,ce){const{level:K,log:T=B=>B}=ce.formatters||{},F=ie.slice();let P=F[0];const w={};let x=(R._childLevel|0)+1;if(x<1&&(x=1),re&&(w.time=re),K){const B=K(X,R.levels.values[X]);Object.assign(w,B)}else w.level=R.levels.values[X];if(ce.asObjectBindingsOnly){if(P!==null&&typeof P=="object")for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());return[T(w),...F]}else{if(P!==null&&typeof P=="object"){for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());P=F.length?e(F.shift(),F):void 0}else typeof P=="string"&&(P=e(F.shift(),F));return P!==void 0&&(w[ce.messageKey]=P),[T(w)]}}function f(R,X,ie,re){for(const ce in R)if(re&&R[ce]instanceof Error)R[ce]=u.stdSerializers.err(R[ce]);else if(typeof R[ce]=="object"&&!Array.isArray(R[ce])&&X)for(const K in R[ce])X.indexOf(K)>-1&&K in ie&&(R[ce][K]=ie[K](R[ce][K]))}function v(R,X,ie,re=!1){const ce=X.send,K=X.ts,T=X.methodLevel,F=X.methodValue,P=X.val,w=R._logEvent.bindings;re||f(ie,R._serialize||Object.keys(R.serializers),R.serializers,R._stdErrSerialize===void 0?!0:R._stdErrSerialize),R._logEvent.ts=K,R._logEvent.messages=ie.filter(function(x){return w.indexOf(x)===-1}),R._logEvent.level.label=T,R._logEvent.level.value=F,ce(T,R._logEvent,P),R._logEvent=S(w)}function S(R){return{ts:0,messages:[],bindings:R||[],level:{label:"",value:0}}}function E(R){const X={type:R.constructor.name,msg:R.message,stack:R.stack};for(const ie in R)X[ie]===void 0&&(X[ie]=R[ie]);return X}function I(R){return typeof R.timestamp=="function"?R.timestamp:R.timestamp===!1?G:Y}function O(){return{}}function j(R){return R}function L(){}function G(){return!1}function Y(){return Date.now()}function Q(){return Math.round(Date.now()/1e3)}function oe(){return new Date(Date.now()).toISOString()}function pe(){function R(X){return typeof X<"u"&&X}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 R(self)||R(window)||R(this)||{}}}return Dn.exports.default=u,Dn.exports.pino=u,Dn.exports}var f_=l_();const ei=(e,t)=>{e.postMessage(t)},Wn=new Map,d_=async(e,t,r,i,n=!1)=>{if(Wn.has(r)){console.warn(`state with id "${r}" already exists`);return}const o=f_.pino({level:"info"}).child({resolverId:r,resolverType:i}),s=(d,u)=>{ei(e,{type:"outputs",resolverId:r,items:[{nodeId:d,output:u}]})};let a;n&&(a=(d,u)=>{ei(e,{type:"dependent-set",resolverId:r,nodeId:d,dependents:u&&Array.from(u)})});const c=new u_[i](t,o,s,a);Wn.set(r,{nodes:t,resolver:c,logger:o,abortController:new AbortController}),c.addAllNodesToWorkset(),await c.process(),ei(e,{type:"resolver-ready",resolverId:r})},Zp=(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)},h_=(e,t,r)=>{const i=Wn.get(e);if(!i)throw new Error(`Unknown state: ${e}`);i.nodes.set(t,r),Zp(i,t,r)},p_=(e,t)=>{const r=Wn.get(e);if(!r)throw new Error(`Unknown state: ${e}`);r.nodes.delete(t),Zp(r,t,void 0)},m_=e=>{Wn.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));d_(t,n,i.resolverId,i.resolverType,i.syncDependentMap);break}case"update-input":{h_(i.resolverId,i.nodeId,i.node);break}case"delete-input":{p_(i.resolverId,i.nodeId);break}case"dispose-resolver":{m_(i.resolverId);break}}},ei(t,{type:"ready"})};
175
+ `)}}}const c_={InputResolver:h$,InputHashResolver:H$,ValidationResolver:u_};var Dn={exports:{}},po,wc;function l_(){if(wc)return po;wc=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}po=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 c=new Array(a);c[0]=o(r);for(var d=1;d<a;d++)c[d]=o(i[d]);return c.join(" ")}if(typeof r!="string")return r;var u=i.length;if(u===0)return r;for(var h="",y=1-s,_=-1,b=r&&r.length||0,g=0;g<b;){if(r.charCodeAt(g)===37&&g+1<b){switch(_=_>-1?_:0,r.charCodeAt(g+1)){case 100:case 102:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Number(i[y]),_=g+2,g++;break;case 105:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Math.floor(Number(i[y])),_=g+2,g++;break;case 79:case 111:case 106:if(y>=u||i[y]===void 0)break;_<g&&(h+=r.slice(_,g));var m=typeof i[y];if(m==="string"){h+="'"+i[y]+"'",_=g+2,g++;break}if(m==="function"){h+=i[y].name||"<anonymous>",_=g+2,g++;break}h+=o(i[y]),_=g+2,g++;break;case 115:if(y>=u)break;_<g&&(h+=r.slice(_,g)),h+=String(i[y]),_=g+2,g++;break;case 37:_<g&&(h+=r.slice(_,g)),h+="%",_=g+2,g++,y--;break}++y}++g}return _===-1?r:(_<b&&(h+=r.slice(_)),h)}return po}var kc;function f_(){if(kc)return Dn.exports;kc=1;const e=l_();Dn.exports=u;const t=pe().console||{},r={mapHttpRequest:O,mapHttpResponse:O,wrapRequestSerializer:j,wrapResponseSerializer:j,wrapErrorSerializer:j,req:O,res:O,err:E,errWithCause:E};function i(R,X){return R==="silent"?1/0:X.levels.values[R]}const n=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),s={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(R,X){const ie={logger:X,parent:R[o]};X[o]=ie}function c(R,X,ie){const re={};X.forEach(ce=>{re[ce]=ie[ce]?ie[ce]:t[ce]||t[s[ce]||"log"]||L}),R[n]=re}function d(R,X){return Array.isArray(R)?R.filter(function(re){return re!=="!stdSerializers.err"}):R===!0?Object.keys(X):!1}function u(R){R=R||{},R.browser=R.browser||{};const X=R.browser.transmit;if(X&&typeof X.send!="function")throw Error("pino: transmit option must have a send function");const ie=R.browser.write||t;R.browser.write&&(R.browser.asObject=!0);const re=R.serializers||{},ce=d(R.browser.serialize,re);let K=R.browser.serialize;Array.isArray(R.browser.serialize)&&R.browser.serialize.indexOf("!stdSerializers.err")>-1&&(K=!1);const T=Object.keys(R.customLevels||{}),F=["error","fatal","warn","info","debug","trace"].concat(T);typeof ie=="function"&&F.forEach(function(se){ie[se]=ie}),(R.enabled===!1||R.browser.disabled)&&(R.level="silent");const P=R.level||"info",w=Object.create(ie);w.log||(w.log=L),c(w,F,ie),a({},w),Object.defineProperty(w,"levelVal",{get:B}),Object.defineProperty(w,"level",{get:ee,set:te});const x={transmit:X,serialize:ce,asObject:R.browser.asObject,asObjectBindingsOnly:R.browser.asObjectBindingsOnly,formatters:R.browser.formatters,levels:F,timestamp:I(R),messageKey:R.messageKey||"msg",onChild:R.onChild||L};w.levels=h(R),w.level=P,w.isLevelEnabled=function(se){return this.levels.values[se]?this.levels.values[se]>=this.levels.values[this.level]:!1},w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=L,w.serializers=re,w._serialize=ce,w._stdErrSerialize=K,w.child=function(...se){return me.call(this,x,...se)},X&&(w._logEvent=S());function B(){return i(this.level,this)}function ee(){return this._level}function te(se){if(se!=="silent"&&!this.levels.values[se])throw Error("unknown level "+se);this._level=se,b(this,x,w,"error"),b(this,x,w,"fatal"),b(this,x,w,"warn"),b(this,x,w,"info"),b(this,x,w,"debug"),b(this,x,w,"trace"),T.forEach(A=>{b(this,x,w,A)})}function me(se,A,U){if(!A)throw new Error("missing bindings for child Pino");U=U||{},ce&&A.serializers&&(U.serializers=A.serializers);const M=U.serializers;if(ce&&M){var J=Object.assign({},re,M),ne=R.browser.serialize===!0?Object.keys(J):ce;delete A.serializers,f([A],ne,J,this._stdErrSerialize)}function ae(Fe){this._childLevel=(Fe._childLevel|0)+1,this.bindings=A,J&&(this.serializers=J,this._serialize=ne),X&&(this._logEvent=S([].concat(Fe._logEvent.bindings,A)))}ae.prototype=this;const we=new ae(this);return a(this,we),we.child=function(...Fe){return me.call(this,se,...Fe)},we.level=U.level||this.level,se.onChild(we),we}return w}function h(R){const X=R.customLevels||{},ie=Object.assign({},u.levels.values,X),re=Object.assign({},u.levels.labels,y(X));return{values:ie,labels:re}}function y(R){const X={};return Object.keys(R).forEach(function(ie){X[R[ie]]=ie}),X}u.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"}},u.stdSerializers=r,u.stdTimeFunctions=Object.assign({},{nullTime:G,epochTime:Y,unixTime:Q,isoTime:oe});function _(R){const X=[];R.bindings&&X.push(R.bindings);let ie=R[o];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&X.push(ie.logger.bindings);return X.reverse()}function b(R,X,ie,re){if(Object.defineProperty(R,re,{value:i(R.level,ie)>i(re,ie)?L:ie[n][re],writable:!0,enumerable:!0,configurable:!0}),R[re]===L){if(!X.transmit)return;const K=X.transmit.level||R.level,T=i(K,ie);if(i(re,ie)<T)return}R[re]=m(R,X,ie,re);const ce=_(R);ce.length!==0&&(R[re]=g(ce,R[re]))}function g(R,X){return function(){return X.apply(this,[...R,...arguments])}}function m(R,X,ie,re){return function(ce){return function(){const T=X.timestamp(),F=new Array(arguments.length),P=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var w=0;w<F.length;w++)F[w]=arguments[w];var x=!1;if(X.serialize&&(f(F,this._serialize,this.serializers,this._stdErrSerialize),x=!0),X.asObject||X.formatters?ce.call(P,...$(this,re,F,T,X)):ce.apply(P,F),X.transmit){const B=X.transmit.level||R._level,ee=i(B,ie),te=i(re,ie);if(te<ee)return;v(this,{ts:T,methodLevel:re,methodValue:te,transmitValue:ie.levels.values[X.transmit.level||R._level],send:X.transmit.send,val:i(R._level,ie)},F,x)}}}(R[n][re])}function $(R,X,ie,re,ce){const{level:K,log:T=B=>B}=ce.formatters||{},F=ie.slice();let P=F[0];const w={};let x=(R._childLevel|0)+1;if(x<1&&(x=1),re&&(w.time=re),K){const B=K(X,R.levels.values[X]);Object.assign(w,B)}else w.level=R.levels.values[X];if(ce.asObjectBindingsOnly){if(P!==null&&typeof P=="object")for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());return[T(w),...F]}else{if(P!==null&&typeof P=="object"){for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());P=F.length?e(F.shift(),F):void 0}else typeof P=="string"&&(P=e(F.shift(),F));return P!==void 0&&(w[ce.messageKey]=P),[T(w)]}}function f(R,X,ie,re){for(const ce in R)if(re&&R[ce]instanceof Error)R[ce]=u.stdSerializers.err(R[ce]);else if(typeof R[ce]=="object"&&!Array.isArray(R[ce])&&X)for(const K in R[ce])X.indexOf(K)>-1&&K in ie&&(R[ce][K]=ie[K](R[ce][K]))}function v(R,X,ie,re=!1){const ce=X.send,K=X.ts,T=X.methodLevel,F=X.methodValue,P=X.val,w=R._logEvent.bindings;re||f(ie,R._serialize||Object.keys(R.serializers),R.serializers,R._stdErrSerialize===void 0?!0:R._stdErrSerialize),R._logEvent.ts=K,R._logEvent.messages=ie.filter(function(x){return w.indexOf(x)===-1}),R._logEvent.level.label=T,R._logEvent.level.value=F,ce(T,R._logEvent,P),R._logEvent=S(w)}function S(R){return{ts:0,messages:[],bindings:R||[],level:{label:"",value:0}}}function E(R){const X={type:R.constructor.name,msg:R.message,stack:R.stack};for(const ie in R)X[ie]===void 0&&(X[ie]=R[ie]);return X}function I(R){return typeof R.timestamp=="function"?R.timestamp:R.timestamp===!1?G:Y}function O(){return{}}function j(R){return R}function L(){}function G(){return!1}function Y(){return Date.now()}function Q(){return Math.round(Date.now()/1e3)}function oe(){return new Date(Date.now()).toISOString()}function pe(){function R(X){return typeof X<"u"&&X}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 R(self)||R(window)||R(this)||{}}}return Dn.exports.default=u,Dn.exports.pino=u,Dn.exports}var d_=f_();const ei=(e,t)=>{e.postMessage(t)},Wn=new Map,h_=async(e,t,r,i,n=!1)=>{if(Wn.has(r)){console.warn(`state with id "${r}" already exists`);return}const o=d_.pino({level:"info"}).child({resolverId:r,resolverType:i}),s=(d,u)=>{ei(e,{type:"outputs",resolverId:r,items:[{nodeId:d,output:u}]})};let a;n&&(a=(d,u)=>{ei(e,{type:"dependent-set",resolverId:r,nodeId:d,dependents:u&&Array.from(u)})});const c=new c_[i](t,o,s,a);Wn.set(r,{nodes:t,resolver:c,logger:o,abortController:new AbortController}),c.addAllNodesToWorkset(),await c.process(),ei(e,{type:"resolver-ready",resolverId:r})},Zp=(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)},p_=(e,t,r)=>{const i=Wn.get(e);if(!i)throw new Error(`Unknown state: ${e}`);i.nodes.set(t,r),Zp(i,t,r)},m_=(e,t)=>{const r=Wn.get(e);if(!r)throw new Error(`Unknown state: ${e}`);r.nodes.delete(t),Zp(r,t,void 0)},g_=e=>{Wn.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));h_(t,n,i.resolverId,i.resolverType,i.syncDependentMap);break}case"update-input":{p_(i.resolverId,i.nodeId,i.node);break}case"delete-input":{m_(i.resolverId,i.nodeId);break}case"dispose-resolver":{g_(i.resolverId);break}}},ei(t,{type:"ready"})};