@womp/mcp-ui 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17 -8
- package/dist/openai-camera/index.html +9 -91
- package/dist/openai-quote/index.html +223 -0
- package/package.json +4 -3
- package/src/cart/main.ts +1 -1
- package/src/openai-camera/index.html +2 -84
- package/src/openai-camera/main.ts +23 -80
- package/src/openai-quote/index.html +149 -0
- package/src/openai-quote/main.ts +123 -0
- package/src/print/main.ts +3 -3
- package/src/shared/bridge.ts +41 -0
|
@@ -42,12 +42,6 @@
|
|
|
42
42
|
height: auto;
|
|
43
43
|
min-height: 0;
|
|
44
44
|
}
|
|
45
|
-
/* While ordering, the design stays in view but gives the form the room. */
|
|
46
|
-
.card[data-view="order"] .stage,
|
|
47
|
-
.card[data-view="done"] .stage {
|
|
48
|
-
height: 220px;
|
|
49
|
-
flex: none;
|
|
50
|
-
}
|
|
51
45
|
.stage iframe {
|
|
52
46
|
display: block;
|
|
53
47
|
width: 100%;
|
|
@@ -78,8 +72,6 @@
|
|
|
78
72
|
.fallback dt { color: var(--color-text-secondary, rgba(27, 27, 26, 0.62)); }
|
|
79
73
|
.fallback dd { margin: 0; font-variant-numeric: tabular-nums; }
|
|
80
74
|
|
|
81
|
-
.view[hidden] { display: none; }
|
|
82
|
-
|
|
83
75
|
.controls {
|
|
84
76
|
display: grid;
|
|
85
77
|
gap: 8px;
|
|
@@ -246,51 +238,6 @@
|
|
|
246
238
|
}
|
|
247
239
|
button.action:disabled { opacity: 0.5; cursor: default; }
|
|
248
240
|
|
|
249
|
-
form {
|
|
250
|
-
display: grid;
|
|
251
|
-
gap: 8px;
|
|
252
|
-
padding: 12px 14px 0;
|
|
253
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
254
|
-
}
|
|
255
|
-
form .wide { grid-column: 1 / -1; }
|
|
256
|
-
form h2 {
|
|
257
|
-
margin: 0;
|
|
258
|
-
font-size: var(--font-text-sm-size, 14px);
|
|
259
|
-
}
|
|
260
|
-
form .note {
|
|
261
|
-
margin: 0;
|
|
262
|
-
font-size: var(--font-text-xs-size, 12px);
|
|
263
|
-
color: var(--color-text-secondary, rgba(27, 27, 26, 0.62));
|
|
264
|
-
}
|
|
265
|
-
label {
|
|
266
|
-
display: grid;
|
|
267
|
-
gap: 3px;
|
|
268
|
-
min-width: 0;
|
|
269
|
-
font-size: var(--font-text-xs-size, 12px);
|
|
270
|
-
color: var(--color-text-secondary, rgba(27, 27, 26, 0.62));
|
|
271
|
-
}
|
|
272
|
-
input {
|
|
273
|
-
width: 100%;
|
|
274
|
-
box-sizing: border-box;
|
|
275
|
-
font: inherit;
|
|
276
|
-
font-size: var(--font-text-sm-size, 13px);
|
|
277
|
-
color: var(--color-text-primary, #1b1b1a);
|
|
278
|
-
background: var(--color-background-primary, #ffffff);
|
|
279
|
-
border: 1px solid var(--color-border-primary, rgba(0, 0, 0, 0.14));
|
|
280
|
-
border-radius: 8px;
|
|
281
|
-
padding: 7px 9px;
|
|
282
|
-
}
|
|
283
|
-
input[aria-invalid="true"] { border-color: #c2410c; }
|
|
284
|
-
|
|
285
|
-
.done {
|
|
286
|
-
padding: 14px;
|
|
287
|
-
display: grid;
|
|
288
|
-
gap: 6px;
|
|
289
|
-
font-size: var(--font-text-sm-size, 13px);
|
|
290
|
-
}
|
|
291
|
-
.done h2 { margin: 0; font-size: var(--font-text-md-size, 15px); }
|
|
292
|
-
.done p { margin: 0; color: var(--color-text-secondary, rgba(27, 27, 26, 0.62)); }
|
|
293
|
-
|
|
294
241
|
.status {
|
|
295
242
|
padding: 0 14px 10px;
|
|
296
243
|
font-size: var(--font-text-xs-size, 11px);
|
|
@@ -298,10 +245,10 @@
|
|
|
298
245
|
}
|
|
299
246
|
.status:empty { display: none; }
|
|
300
247
|
</style>
|
|
301
|
-
<script type="module" crossorigin>var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),r=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},i=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function a(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function o(e){return e&&Object.assign(u,e),u}var s,c,l,u,d=t((()=>{s=Object.freeze({status:`aborted`}),c=Symbol(`zod_brand`),l=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},u={}})),f=r({BIGINT_FORMAT_RANGES:()=>Ie,Class:()=>Le,NUMBER_FORMAT_RANGES:()=>Fe,aborted:()=>we,allowsEval:()=>je,assert:()=>re,assertEqual:()=>p,assertIs:()=>te,assertNever:()=>ne,assertNotEqual:()=>ee,assignProp:()=>_,cached:()=>oe,captureStackTrace:()=>Ae,cleanEnum:()=>ke,cleanRegex:()=>se,clone:()=>he,createTransparentProxy:()=>ge,defineLazy:()=>g,esc:()=>ue,escapeRegex:()=>me,extend:()=>be,finalizeIssue:()=>C,floatSafeRemainder:()=>ce,getElementAtPath:()=>le,getEnumValues:()=>ie,getLengthableOrigin:()=>De,getParsedType:()=>Me,getSizableOrigin:()=>Ee,isObject:()=>de,isPlainObject:()=>fe,issue:()=>Oe,joinValues:()=>m,jsonStringifyReplacer:()=>ae,merge:()=>xe,normalizeParams:()=>b,nullish:()=>h,numKeys:()=>pe,omit:()=>ye,optionalKeys:()=>_e,partial:()=>Se,pick:()=>ve,prefixIssues:()=>S,primitiveTypes:()=>Pe,promiseAllObject:()=>v,propertyKeyTypes:()=>Ne,randomString:()=>y,required:()=>Ce,stringifyPrimitive:()=>x,unwrapMessage:()=>Te});function p(e){return e}function ee(e){return e}function te(e){}function ne(e){throw Error()}function re(e){}function ie(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function m(e,t=`|`){return e.map(e=>x(e)).join(t)}function ae(e,t){return typeof t==`bigint`?t.toString():t}function oe(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function h(e){return e==null}function se(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ce(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}function g(e,t,n){Object.defineProperty(e,t,{get(){{let r=n();return e[t]=r,r}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function _(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function le(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function v(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function y(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function ue(e){return JSON.stringify(e)}function de(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fe(e){if(de(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return de(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function pe(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function me(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function he(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function b(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw 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 ge(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function x(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function _e(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function ve(e,t){let n={},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=r.shape[e])}return he(e,{...e._zod.def,shape:n,checks:[]})}function ye(e,t){let n={...e._zod.def.shape},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return he(e,{...e._zod.def,shape:n,checks:[]})}function be(e,t){if(!fe(t))throw Error(`Invalid input to extend: expected a plain object`);return he(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return _(this,`shape`,n),n},checks:[]})}function xe(e,t){return he(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return _(this,`shape`,n),n},catchall:t._zod.def.catchall,checks:[]})}function Se(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return he(t,{...t._zod.def,shape:i,checks:[]})}function Ce(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return he(t,{...t._zod.def,shape:i,checks:[]})}function we(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function S(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Te(e){return typeof e==`string`?e:e?.message}function C(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Te(e.inst?._zod.def?.error?.(e))??Te(t?.error?.(e))??Te(n.customError?.(e))??Te(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ee(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function De(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Oe(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ke(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var Ae,je,Me,Ne,Pe,Fe,Ie,Le,w=t((()=>{Ae=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{},je=oe(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Me=e=>{let 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 Error(`Unknown data type: ${t}`)}},Ne=new Set([`string`,`number`,`symbol`]),Pe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),Fe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ie={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},Le=class{constructor(...e){}}}));function Re(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ze(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}function Be(e,t){let n=t||function(e){return e.message},r={errors:[]},i=(e,t=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>i({issues:e},s.path));else if(s.code===`invalid_key`)i({issues:s.issues},s.path);else if(s.code===`invalid_element`)i({issues:s.issues},s.path);else{let e=[...t,...s.path];if(e.length===0){r.errors.push(n(s));continue}let i=r,c=0;for(;c<e.length;){let t=e[c],r=c===e.length-1;typeof t==`string`?(i.properties??(i.properties={}),(a=i.properties)[t]??(a[t]={errors:[]}),i=i.properties[t]):(i.items??(i.items=[]),(o=i.items)[t]??(o[t]={errors:[]}),i=i.items[t]),r&&i.errors.push(n(s)),c++}}};return i(e),r}function Ve(e){let t=[];for(let n of e)typeof n==`number`?t.push(`[${n}]`):typeof n==`symbol`?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push(`.`),t.push(n));return t.join(``)}function He(e){let t=[],n=[...e.issues].sort((e,t)=>e.path.length-t.path.length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Ve(e.path)}`);return t.join(`
|
|
302
|
-
`)}var Ue,We,Ge,Ke=t((()=>{d(),w(),Ue=(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,ae,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},We=a(`$ZodError`,Ue),Ge=a(`$ZodError`,Ue,{Parent:Error})})),qe,Je,Ye,Xe,Ze,Qe,$e,et,tt=t((()=>{d(),Ke(),w(),qe=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new l;if(s.issues.length){let t=new((i?.Err)??e)(s.issues.map(e=>C(e,a,o())));throw Ae(t,i?.callee),t}return s.value},Je=qe(Ge),Ye=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new((i?.Err)??e)(s.issues.map(e=>C(e,a,o())));throw Ae(t,i?.callee),t}return s.value},Xe=Ye(Ge),Ze=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new l;return a.issues.length?{success:!1,error:new(e??We)(a.issues.map(e=>C(e,i,o())))}:{success:!0,data:a.value}},Qe=Ze(Ge),$e=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>C(e,i,o())))}:{success:!0,data:a.value}},et=$e(Ge)})),nt=r({_emoji:()=>Tt,base64:()=>At,base64url:()=>jt,bigint:()=>Rt,boolean:()=>Vt,browserEmail:()=>wt,cidrv4:()=>Ot,cidrv6:()=>kt,cuid:()=>st,cuid2:()=>ct,date:()=>It,datetime:()=>ot,domain:()=>Nt,duration:()=>pt,e164:()=>Pt,email:()=>bt,emoji:()=>rt,extendedDuration:()=>mt,guid:()=>ht,hostname:()=>Mt,html5Email:()=>xt,integer:()=>zt,ipv4:()=>Et,ipv6:()=>Dt,ksuid:()=>dt,lowercase:()=>Wt,nanoid:()=>ft,null:()=>Ht,number:()=>Bt,rfc5322Email:()=>St,string:()=>Lt,time:()=>at,ulid:()=>lt,undefined:()=>Ut,unicodeEmail:()=>Ct,uppercase:()=>Gt,uuid:()=>gt,uuid4:()=>_t,uuid6:()=>vt,uuid7:()=>yt,xid:()=>ut});function rt(){return new RegExp(Tt,`u`)}function it(e){let 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 at(e){return RegExp(`^${it(e)}$`)}function ot(e){let t=it({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-]\\d{2}:\\d{2})`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Ft}T(?:${r})$`)}var st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt=t((()=>{st=/^[cC][^\s-]{8,}$/,ct=/^[0-9a-z]+$/,lt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ut=/^[0-9a-vA-V]{20}$/,dt=/^[A-Za-z0-9]{27}$/,ft=/^[a-zA-Z0-9_-]{21}$/,pt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mt=/^[-+]?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)?)??$/,ht=/^([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})$/,gt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,_t=gt(4),vt=gt(6),yt=gt(7),bt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,xt=/^[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])?)*$/,St=/^(([^<>()\[\]\\.,;:\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,}))$/,Ct=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,wt=/^[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])?)*$/,Tt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Et=/^(?:(?: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])$/,Dt=/^(([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})$/,Ot=/^((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])$/,kt=/^(([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])$/,At=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,jt=/^[A-Za-z0-9_-]*$/,Mt=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Nt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Pt=/^\+(?:[0-9]){6,14}[0-9]$/,Ft=`(?:(?:\\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])))`,It=RegExp(`^${Ft}$`),Lt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Rt=/^\d+n?$/,zt=/^\d+$/,Bt=/^-?\d+(?:\.\d+)?/i,Vt=/true|false/i,Ht=/null/i,Ut=/undefined/i,Wt=/^[^A-Z]*$/,Gt=/^[^a-z]*$/}));function qt(e,t,n){e.issues.length&&t.issues.push(...S(n,e.issues))}var T,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n=t((()=>{d(),Kt(),w(),T=a(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Jt={number:`number`,bigint:`bigint`,object:`date`},Yt=a(`$ZodCheckLessThan`,(e,t)=>{T.init(e,t);let n=Jt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xt=a(`$ZodCheckGreaterThan`,(e,t)=>{T.init(e,t);let n=Jt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zt=a(`$ZodCheckMultipleOf`,(e,t)=>{T.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ce(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Qt=a(`$ZodCheckNumberFormat`,(e,t)=>{T.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Fe[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=zt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inst:e})}}),$t=a(`$ZodCheckBigIntFormat`,(e,t)=>{T.init(e,t);let[n,r]=Ie[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inst:e})}}),en=a(`$ZodCheckMaxSize`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Ee(r),code:`too_big`,maximum:t.maximum,input:r,inst:e,continue:!t.abort})}}),tn=a(`$ZodCheckMinSize`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Ee(r),code:`too_small`,minimum:t.minimum,input:r,inst:e,continue:!t.abort})}}),nn=a(`$ZodCheckSizeEquals`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Ee(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),rn=a(`$ZodCheckMaxLength`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=De(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),an=a(`$ZodCheckMinLength`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=De(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),on=a(`$ZodCheckLengthEquals`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=De(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sn=a(`$ZodCheckStringFormat`,(e,t)=>{var n,r;T.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),cn=a(`$ZodCheckRegex`,(e,t)=>{sn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ln=a(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Wt,sn.init(e,t)}),un=a(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Gt,sn.init(e,t)}),dn=a(`$ZodCheckIncludes`,(e,t)=>{T.init(e,t);let n=me(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fn=a(`$ZodCheckStartsWith`,(e,t)=>{T.init(e,t);let n=RegExp(`^${me(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pn=a(`$ZodCheckEndsWith`,(e,t)=>{T.init(e,t);let n=RegExp(`.*${me(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mn=a(`$ZodCheckProperty`,(e,t)=>{T.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>qt(n,e,t.property));qt(n,e,t.property)}}),hn=a(`$ZodCheckMimeType`,(e,t)=>{T.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e})}}),gn=a(`$ZodCheckOverwrite`,(e,t)=>{T.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),vn,yn=t((()=>{vn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
248
|
+
<script type="module" crossorigin>var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),r=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},i=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function a(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function o(e){return e&&Object.assign(u,e),u}var s,c,l,u,d=t((()=>{s=Object.freeze({status:`aborted`}),c=Symbol(`zod_brand`),l=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},u={}})),f=r({BIGINT_FORMAT_RANGES:()=>Le,Class:()=>Re,NUMBER_FORMAT_RANGES:()=>Ie,aborted:()=>Te,allowsEval:()=>Me,assert:()=>re,assertEqual:()=>p,assertIs:()=>te,assertNever:()=>ne,assertNotEqual:()=>ee,assignProp:()=>g,cached:()=>oe,captureStackTrace:()=>je,cleanEnum:()=>Ae,cleanRegex:()=>ce,clone:()=>v,createTransparentProxy:()=>_e,defineLazy:()=>h,esc:()=>pe,escapeRegex:()=>_,extend:()=>xe,finalizeIssue:()=>S,floatSafeRemainder:()=>le,getElementAtPath:()=>ue,getEnumValues:()=>ie,getLengthableOrigin:()=>Oe,getParsedType:()=>Ne,getSizableOrigin:()=>De,isObject:()=>me,isPlainObject:()=>he,issue:()=>ke,joinValues:()=>m,jsonStringifyReplacer:()=>ae,merge:()=>Se,normalizeParams:()=>y,nullish:()=>se,numKeys:()=>ge,omit:()=>be,optionalKeys:()=>ve,partial:()=>Ce,pick:()=>ye,prefixIssues:()=>x,primitiveTypes:()=>Fe,promiseAllObject:()=>de,propertyKeyTypes:()=>Pe,randomString:()=>fe,required:()=>we,stringifyPrimitive:()=>b,unwrapMessage:()=>Ee});function p(e){return e}function ee(e){return e}function te(e){}function ne(e){throw Error()}function re(e){}function ie(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function m(e,t=`|`){return e.map(e=>b(e)).join(t)}function ae(e,t){return typeof t==`bigint`?t.toString():t}function oe(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function se(e){return e==null}function ce(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function le(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}function h(e,t,n){Object.defineProperty(e,t,{get(){{let r=n();return e[t]=r,r}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function g(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ue(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function de(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function fe(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function pe(e){return JSON.stringify(e)}function me(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function he(e){if(me(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return me(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ge(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function _(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function v(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function y(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw 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 _e(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function b(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ve(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function ye(e,t){let n={},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=r.shape[e])}return v(e,{...e._zod.def,shape:n,checks:[]})}function be(e,t){let n={...e._zod.def.shape},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return v(e,{...e._zod.def,shape:n,checks:[]})}function xe(e,t){if(!he(t))throw Error(`Invalid input to extend: expected a plain object`);return v(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return g(this,`shape`,n),n},checks:[]})}function Se(e,t){return v(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return g(this,`shape`,n),n},catchall:t._zod.def.catchall,checks:[]})}function Ce(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return v(t,{...t._zod.def,shape:i,checks:[]})}function we(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return v(t,{...t._zod.def,shape:i,checks:[]})}function Te(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function x(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ee(e){return typeof e==`string`?e:e?.message}function S(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Ee(e.inst?._zod.def?.error?.(e))??Ee(t?.error?.(e))??Ee(n.customError?.(e))??Ee(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function De(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function Oe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ke(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ae(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var je,Me,Ne,Pe,Fe,Ie,Le,Re,C=t((()=>{je=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{},Me=oe(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Ne=e=>{let 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 Error(`Unknown data type: ${t}`)}},Pe=new Set([`string`,`number`,`symbol`]),Fe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),Ie={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Le={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},Re=class{constructor(...e){}}}));function ze(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Be(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}function Ve(e,t){let n=t||function(e){return e.message},r={errors:[]},i=(e,t=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>i({issues:e},s.path));else if(s.code===`invalid_key`)i({issues:s.issues},s.path);else if(s.code===`invalid_element`)i({issues:s.issues},s.path);else{let e=[...t,...s.path];if(e.length===0){r.errors.push(n(s));continue}let i=r,c=0;for(;c<e.length;){let t=e[c],r=c===e.length-1;typeof t==`string`?(i.properties??(i.properties={}),(a=i.properties)[t]??(a[t]={errors:[]}),i=i.properties[t]):(i.items??(i.items=[]),(o=i.items)[t]??(o[t]={errors:[]}),i=i.items[t]),r&&i.errors.push(n(s)),c++}}};return i(e),r}function He(e){let t=[];for(let n of e)typeof n==`number`?t.push(`[${n}]`):typeof n==`symbol`?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push(`.`),t.push(n));return t.join(``)}function Ue(e){let t=[],n=[...e.issues].sort((e,t)=>e.path.length-t.path.length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${He(e.path)}`);return t.join(`
|
|
249
|
+
`)}var We,Ge,Ke,qe=t((()=>{d(),C(),We=(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,ae,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ge=a(`$ZodError`,We),Ke=a(`$ZodError`,We,{Parent:Error})})),Je,Ye,Xe,Ze,Qe,$e,et,tt,nt=t((()=>{d(),qe(),C(),Je=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new l;if(s.issues.length){let t=new((i?.Err)??e)(s.issues.map(e=>S(e,a,o())));throw je(t,i?.callee),t}return s.value},Ye=Je(Ke),Xe=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new((i?.Err)??e)(s.issues.map(e=>S(e,a,o())));throw je(t,i?.callee),t}return s.value},Ze=Xe(Ke),Qe=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new l;return a.issues.length?{success:!1,error:new(e??Ge)(a.issues.map(e=>S(e,i,o())))}:{success:!0,data:a.value}},$e=Qe(Ke),et=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>S(e,i,o())))}:{success:!0,data:a.value}},tt=et(Ke)})),rt=r({_emoji:()=>Et,base64:()=>jt,base64url:()=>Mt,bigint:()=>zt,boolean:()=>Ht,browserEmail:()=>Tt,cidrv4:()=>kt,cidrv6:()=>At,cuid:()=>ct,cuid2:()=>lt,date:()=>Lt,datetime:()=>st,domain:()=>Pt,duration:()=>mt,e164:()=>Ft,email:()=>xt,emoji:()=>it,extendedDuration:()=>ht,guid:()=>gt,hostname:()=>Nt,html5Email:()=>St,integer:()=>Bt,ipv4:()=>Dt,ipv6:()=>Ot,ksuid:()=>ft,lowercase:()=>Gt,nanoid:()=>pt,null:()=>Ut,number:()=>Vt,rfc5322Email:()=>Ct,string:()=>Rt,time:()=>ot,ulid:()=>ut,undefined:()=>Wt,unicodeEmail:()=>wt,uppercase:()=>Kt,uuid:()=>_t,uuid4:()=>vt,uuid6:()=>yt,uuid7:()=>bt,xid:()=>dt});function it(){return new RegExp(Et,`u`)}function at(e){let 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 ot(e){return RegExp(`^${at(e)}$`)}function st(e){let t=at({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-]\\d{2}:\\d{2})`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${It}T(?:${r})$`)}var ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt=t((()=>{ct=/^[cC][^\s-]{8,}$/,lt=/^[0-9a-z]+$/,ut=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dt=/^[0-9a-vA-V]{20}$/,ft=/^[A-Za-z0-9]{27}$/,pt=/^[a-zA-Z0-9_-]{21}$/,mt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ht=/^[-+]?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)?)??$/,gt=/^([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})$/,_t=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,vt=_t(4),yt=_t(6),bt=_t(7),xt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,St=/^[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])?)*$/,Ct=/^(([^<>()\[\]\\.,;:\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,}))$/,wt=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Tt=/^[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])?)*$/,Et=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Dt=/^(?:(?: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])$/,Ot=/^(([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})$/,kt=/^((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])$/,At=/^(([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])$/,jt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mt=/^[A-Za-z0-9_-]*$/,Nt=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Pt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Ft=/^\+(?:[0-9]){6,14}[0-9]$/,It=`(?:(?:\\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])))`,Lt=RegExp(`^${It}$`),Rt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},zt=/^\d+n?$/,Bt=/^\d+$/,Vt=/^-?\d+(?:\.\d+)?/i,Ht=/true|false/i,Ut=/null/i,Wt=/undefined/i,Gt=/^[^A-Z]*$/,Kt=/^[^a-z]*$/}));function Jt(e,t,n){e.issues.length&&t.issues.push(...x(n,e.issues))}var w,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn=t((()=>{d(),qt(),C(),w=a(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Yt={number:`number`,bigint:`bigint`,object:`date`},Xt=a(`$ZodCheckLessThan`,(e,t)=>{w.init(e,t);let n=Yt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zt=a(`$ZodCheckGreaterThan`,(e,t)=>{w.init(e,t);let n=Yt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qt=a(`$ZodCheckMultipleOf`,(e,t)=>{w.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):le(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$t=a(`$ZodCheckNumberFormat`,(e,t)=>{w.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ie[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Bt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inst:e})}}),en=a(`$ZodCheckBigIntFormat`,(e,t)=>{w.init(e,t);let[n,r]=Le[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inst:e})}}),tn=a(`$ZodCheckMaxSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!se(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:De(r),code:`too_big`,maximum:t.maximum,input:r,inst:e,continue:!t.abort})}}),nn=a(`$ZodCheckMinSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!se(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:De(r),code:`too_small`,minimum:t.minimum,input:r,inst:e,continue:!t.abort})}}),rn=a(`$ZodCheckSizeEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!se(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:De(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),an=a(`$ZodCheckMaxLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!se(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Oe(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),on=a(`$ZodCheckMinLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!se(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Oe(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sn=a(`$ZodCheckLengthEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!se(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Oe(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cn=a(`$ZodCheckStringFormat`,(e,t)=>{var n,r;w.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ln=a(`$ZodCheckRegex`,(e,t)=>{cn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),un=a(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Gt,cn.init(e,t)}),dn=a(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Kt,cn.init(e,t)}),fn=a(`$ZodCheckIncludes`,(e,t)=>{w.init(e,t);let n=_(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),pn=a(`$ZodCheckStartsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`^${_(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),mn=a(`$ZodCheckEndsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`.*${_(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),hn=a(`$ZodCheckProperty`,(e,t)=>{w.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Jt(n,e,t.property));Jt(n,e,t.property)}}),gn=a(`$ZodCheckMimeType`,(e,t)=>{w.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e})}}),_n=a(`$ZodCheckOverwrite`,(e,t)=>{w.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),yn,bn=t((()=>{yn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
303
250
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
304
|
-
`))}}})),bn,xn=t((()=>{bn={major:4,minor:0,patch:0}}));function Sn(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Cn(e){if(!jt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Sn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function wn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Tn(e,t,n){e.issues.length&&t.issues.push(...S(n,e.issues)),t.value[n]=e.value}function En(e,t,n){e.issues.length&&t.issues.push(...S(n,e.issues)),t.value[n]=e.value}function Dn(e,t,n,r){e.issues.length?r[n]===void 0?n in r?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...S(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function On(e,t,n,r){for(let 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:n,errors:e.map(e=>e.issues.map(e=>C(e,r,o())))}),t}function kn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(fe(e)&&fe(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=kn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=kn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function An(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),we(e))return e;let r=kn(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}function jn(e,t,n){e.issues.length&&t.issues.push(...S(n,e.issues)),t.value[n]=e.value}function Mn(e,t,n,r,i,a,s){e.issues.length&&(Ne.has(typeof r)?n.issues.push(...S(r,e.issues)):n.issues.push({origin:`map`,code:`invalid_key`,input:i,inst:a,issues:e.issues.map(e=>C(e,s,o()))})),t.issues.length&&(Ne.has(typeof r)?n.issues.push(...S(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>C(e,s,o()))})),n.value.set(e.value,t.value)}function Nn(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Pn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Fn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function In(e,t,n){return we(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}function Ln(e){return e.value=Object.freeze(e.value),e}function Rn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Oe(e))}}var E,zn,D,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr=t((()=>{_n(),d(),yn(),tt(),Kt(),w(),xn(),E=a(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=bn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=we(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new l;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=we(e,t))});else{if(e.issues.length===t)continue;r||=we(e,t)}}return i?i.then(()=>e):e};e._zod.run=(n,i)=>{let a=e._zod.parse(n,i);if(a instanceof Promise){if(i.async===!1)throw new l;return a.then(e=>t(e,r,i))}return t(a,r,i)}}e[`~standard`]={validate:t=>{try{let n=Qe(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return et(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),zn=a(`$ZodString`,(e,t)=>{E.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Lt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),D=a(`$ZodStringFormat`,(e,t)=>{sn.init(e,t),zn.init(e,t)}),Bn=a(`$ZodGUID`,(e,t)=>{t.pattern??=ht,D.init(e,t)}),Vn=a(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=gt(e)}else t.pattern??=gt();D.init(e,t)}),Hn=a(`$ZodEmail`,(e,t)=>{t.pattern??=bt,D.init(e,t)}),Un=a(`$ZodURL`,(e,t)=>{D.init(e,t),e._zod.check=n=>{try{let r=n.value,i=new URL(r),a=i.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:Mt.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=!r.endsWith(`/`)&&a.endsWith(`/`)?a.slice(0,-1):a;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Wn=a(`$ZodEmoji`,(e,t)=>{t.pattern??=rt(),D.init(e,t)}),Gn=a(`$ZodNanoID`,(e,t)=>{t.pattern??=ft,D.init(e,t)}),Kn=a(`$ZodCUID`,(e,t)=>{t.pattern??=st,D.init(e,t)}),qn=a(`$ZodCUID2`,(e,t)=>{t.pattern??=ct,D.init(e,t)}),Jn=a(`$ZodULID`,(e,t)=>{t.pattern??=lt,D.init(e,t)}),Yn=a(`$ZodXID`,(e,t)=>{t.pattern??=ut,D.init(e,t)}),Xn=a(`$ZodKSUID`,(e,t)=>{t.pattern??=dt,D.init(e,t)}),Zn=a(`$ZodISODateTime`,(e,t)=>{t.pattern??=ot(t),D.init(e,t)}),Qn=a(`$ZodISODate`,(e,t)=>{t.pattern??=It,D.init(e,t)}),$n=a(`$ZodISOTime`,(e,t)=>{t.pattern??=at(t),D.init(e,t)}),er=a(`$ZodISODuration`,(e,t)=>{t.pattern??=pt,D.init(e,t)}),tr=a(`$ZodIPv4`,(e,t)=>{t.pattern??=Et,D.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),nr=a(`$ZodIPv6`,(e,t)=>{t.pattern??=Dt,D.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),rr=a(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ot,D.init(e,t)}),ir=a(`$ZodCIDRv6`,(e,t)=>{t.pattern??=kt,D.init(e,t),e._zod.check=n=>{let[r,i]=n.value.split(`/`);try{if(!i)throw Error();let e=Number(i);if(`${e}`!==i||e<0||e>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),ar=a(`$ZodBase64`,(e,t)=>{t.pattern??=At,D.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{Sn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),or=a(`$ZodBase64URL`,(e,t)=>{t.pattern??=jt,D.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{Cn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),sr=a(`$ZodE164`,(e,t)=>{t.pattern??=Pt,D.init(e,t)}),cr=a(`$ZodJWT`,(e,t)=>{D.init(e,t),e._zod.check=n=>{wn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),lr=a(`$ZodCustomStringFormat`,(e,t)=>{D.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),ur=a(`$ZodNumber`,(e,t)=>{E.init(e,t),e._zod.pattern=e._zod.bag.pattern??Bt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),dr=a(`$ZodNumber`,(e,t)=>{Qt.init(e,t),ur.init(e,t)}),fr=a(`$ZodBoolean`,(e,t)=>{E.init(e,t),e._zod.pattern=Vt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),pr=a(`$ZodBigInt`,(e,t)=>{E.init(e,t),e._zod.pattern=Rt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),mr=a(`$ZodBigInt`,(e,t)=>{$t.init(e,t),pr.init(e,t)}),hr=a(`$ZodSymbol`,(e,t)=>{E.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),gr=a(`$ZodUndefined`,(e,t)=>{E.init(e,t),e._zod.pattern=Ut,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),_r=a(`$ZodNull`,(e,t)=>{E.init(e,t),e._zod.pattern=Ht,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),vr=a(`$ZodAny`,(e,t)=>{E.init(e,t),e._zod.parse=e=>e}),yr=a(`$ZodUnknown`,(e,t)=>{E.init(e,t),e._zod.parse=e=>e}),br=a(`$ZodNever`,(e,t)=>{E.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),xr=a(`$ZodVoid`,(e,t)=>{E.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Sr=a(`$ZodDate`,(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),Cr=a(`$ZodArray`,(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Tn(t,n,e))):Tn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),wr=a(`$ZodObject`,(e,t)=>{E.init(e,t);let n=oe(()=>{let e=Object.keys(t.shape);for(let n of e)if(!(t.shape[n]instanceof E))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=_e(t.shape);return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}});g(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=e=>{let t=new vn([`shape`,`payload`,`ctx`]),r=n.value,i=e=>{let t=ue(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of r.keys)a[e]=`key_${o++}`;t.write(`const newResult = {}`);for(let e of r.keys)if(r.optionalKeys.has(e)){let n=a[e];t.write(`const ${n} = ${i(e)};`);let r=ue(e);t.write(`
|
|
251
|
+
`))}}})),xn,Sn=t((()=>{xn={major:4,minor:0,patch:0}}));function Cn(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function wn(e){if(!Mt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Cn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Tn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function En(e,t,n){e.issues.length&&t.issues.push(...x(n,e.issues)),t.value[n]=e.value}function Dn(e,t,n){e.issues.length&&t.issues.push(...x(n,e.issues)),t.value[n]=e.value}function On(e,t,n,r){e.issues.length?r[n]===void 0?n in r?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...x(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function kn(e,t,n,r){for(let 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:n,errors:e.map(e=>e.issues.map(e=>S(e,r,o())))}),t}function An(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(he(e)&&he(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=An(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=An(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function jn(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Te(e))return e;let r=An(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}function Mn(e,t,n){e.issues.length&&t.issues.push(...x(n,e.issues)),t.value[n]=e.value}function Nn(e,t,n,r,i,a,s){e.issues.length&&(Pe.has(typeof r)?n.issues.push(...x(r,e.issues)):n.issues.push({origin:`map`,code:`invalid_key`,input:i,inst:a,issues:e.issues.map(e=>S(e,s,o()))})),t.issues.length&&(Pe.has(typeof r)?n.issues.push(...x(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>S(e,s,o()))})),n.value.set(e.value,t.value)}function Pn(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Fn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function In(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ln(e,t,n){return Te(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}function Rn(e){return e.value=Object.freeze(e.value),e}function zn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ke(e))}}var T,Bn,E,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr=t((()=>{vn(),d(),bn(),nt(),qt(),C(),Sn(),T=a(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Te(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new l;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Te(e,t))});else{if(e.issues.length===t)continue;r||=Te(e,t)}}return i?i.then(()=>e):e};e._zod.run=(n,i)=>{let a=e._zod.parse(n,i);if(a instanceof Promise){if(i.async===!1)throw new l;return a.then(e=>t(e,r,i))}return t(a,r,i)}}e[`~standard`]={validate:t=>{try{let n=$e(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return tt(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),Bn=a(`$ZodString`,(e,t)=>{T.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Rt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),E=a(`$ZodStringFormat`,(e,t)=>{cn.init(e,t),Bn.init(e,t)}),Vn=a(`$ZodGUID`,(e,t)=>{t.pattern??=gt,E.init(e,t)}),Hn=a(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=_t(e)}else t.pattern??=_t();E.init(e,t)}),Un=a(`$ZodEmail`,(e,t)=>{t.pattern??=xt,E.init(e,t)}),Wn=a(`$ZodURL`,(e,t)=>{E.init(e,t),e._zod.check=n=>{try{let r=n.value,i=new URL(r),a=i.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:Nt.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=!r.endsWith(`/`)&&a.endsWith(`/`)?a.slice(0,-1):a;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Gn=a(`$ZodEmoji`,(e,t)=>{t.pattern??=it(),E.init(e,t)}),Kn=a(`$ZodNanoID`,(e,t)=>{t.pattern??=pt,E.init(e,t)}),qn=a(`$ZodCUID`,(e,t)=>{t.pattern??=ct,E.init(e,t)}),Jn=a(`$ZodCUID2`,(e,t)=>{t.pattern??=lt,E.init(e,t)}),Yn=a(`$ZodULID`,(e,t)=>{t.pattern??=ut,E.init(e,t)}),Xn=a(`$ZodXID`,(e,t)=>{t.pattern??=dt,E.init(e,t)}),Zn=a(`$ZodKSUID`,(e,t)=>{t.pattern??=ft,E.init(e,t)}),Qn=a(`$ZodISODateTime`,(e,t)=>{t.pattern??=st(t),E.init(e,t)}),$n=a(`$ZodISODate`,(e,t)=>{t.pattern??=Lt,E.init(e,t)}),er=a(`$ZodISOTime`,(e,t)=>{t.pattern??=ot(t),E.init(e,t)}),tr=a(`$ZodISODuration`,(e,t)=>{t.pattern??=mt,E.init(e,t)}),nr=a(`$ZodIPv4`,(e,t)=>{t.pattern??=Dt,E.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),rr=a(`$ZodIPv6`,(e,t)=>{t.pattern??=Ot,E.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),ir=a(`$ZodCIDRv4`,(e,t)=>{t.pattern??=kt,E.init(e,t)}),ar=a(`$ZodCIDRv6`,(e,t)=>{t.pattern??=At,E.init(e,t),e._zod.check=n=>{let[r,i]=n.value.split(`/`);try{if(!i)throw Error();let e=Number(i);if(`${e}`!==i||e<0||e>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),or=a(`$ZodBase64`,(e,t)=>{t.pattern??=jt,E.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{Cn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),sr=a(`$ZodBase64URL`,(e,t)=>{t.pattern??=Mt,E.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{wn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),cr=a(`$ZodE164`,(e,t)=>{t.pattern??=Ft,E.init(e,t)}),lr=a(`$ZodJWT`,(e,t)=>{E.init(e,t),e._zod.check=n=>{Tn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ur=a(`$ZodCustomStringFormat`,(e,t)=>{E.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),dr=a(`$ZodNumber`,(e,t)=>{T.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),fr=a(`$ZodNumber`,(e,t)=>{$t.init(e,t),dr.init(e,t)}),pr=a(`$ZodBoolean`,(e,t)=>{T.init(e,t),e._zod.pattern=Ht,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),mr=a(`$ZodBigInt`,(e,t)=>{T.init(e,t),e._zod.pattern=zt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),hr=a(`$ZodBigInt`,(e,t)=>{en.init(e,t),mr.init(e,t)}),gr=a(`$ZodSymbol`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),_r=a(`$ZodUndefined`,(e,t)=>{T.init(e,t),e._zod.pattern=Wt,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),vr=a(`$ZodNull`,(e,t)=>{T.init(e,t),e._zod.pattern=Ut,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),yr=a(`$ZodAny`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),br=a(`$ZodUnknown`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),xr=a(`$ZodNever`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Sr=a(`$ZodVoid`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Cr=a(`$ZodDate`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),wr=a(`$ZodArray`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>En(t,n,e))):En(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),Tr=a(`$ZodObject`,(e,t)=>{T.init(e,t);let n=oe(()=>{let e=Object.keys(t.shape);for(let n of e)if(!(t.shape[n]instanceof T))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ve(t.shape);return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}});h(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=e=>{let t=new yn([`shape`,`payload`,`ctx`]),r=n.value,i=e=>{let t=pe(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of r.keys)a[e]=`key_${o++}`;t.write(`const newResult = {}`);for(let e of r.keys)if(r.optionalKeys.has(e)){let n=a[e];t.write(`const ${n} = ${i(e)};`);let r=pe(e);t.write(`
|
|
305
252
|
if (${n}.issues.length) {
|
|
306
253
|
if (input[${r}] === undefined) {
|
|
307
254
|
if (${r} in input) {
|
|
@@ -323,10 +270,10 @@
|
|
|
323
270
|
`)}else{let n=a[e];t.write(`const ${n} = ${i(e)};`),t.write(`
|
|
324
271
|
if (${n}.issues.length) payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
325
272
|
...iss,
|
|
326
|
-
path: iss.path ? [${
|
|
327
|
-
})));`),t.write(`newResult[${ue(e)}] = ${n}.value`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},i,a=de,o=!u.jitless,s=o&&je.value,c=t.catchall,l;e._zod.parse=(u,d)=>{l??=n.value;let f=u.value;if(!a(f))return u.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),u;let p=[];if(o&&s&&d?.async===!1&&d.jitless!==!0)i||=r(t.shape),u=i(u,d);else{u.value={};let e=l.shape;for(let t of l.keys){let n=e[t],r=n._zod.run({value:f[t],issues:[]},d),i=n._zod.optin===`optional`&&n._zod.optout===`optional`;r instanceof Promise?p.push(r.then(e=>i?Dn(e,u,t,f):En(e,u,t))):i?Dn(r,u,t,f):En(r,u,t)}}if(!c)return p.length?Promise.all(p).then(()=>u):u;let ee=[],te=l.keySet,ne=c._zod,re=ne.def.type;for(let e of Object.keys(f)){if(te.has(e))continue;if(re===`never`){ee.push(e);continue}let t=ne.run({value:f[e],issues:[]},d);t instanceof Promise?p.push(t.then(t=>En(t,u,e))):En(t,u,e)}return ee.length&&u.issues.push({code:`unrecognized_keys`,keys:ee,input:f,inst:e}),p.length?Promise.all(p).then(()=>u):u}}),Tr=a(`$ZodUnion`,(e,t)=>{E.init(e,t),g(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),g(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),g(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),g(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>se(e.source)).join(`|`)})$`)}}),e._zod.parse=(n,r)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),i=!0;else{if(t.issues.length===0)return t;a.push(t)}}return i?Promise.all(a).then(t=>On(t,n,e,r)):On(a,n,e,r)}}),Er=a(`$ZodDiscriminatedUnion`,(e,t)=>{Tr.init(e,t);let n=e._zod.parse;g(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=oe(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!de(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,input:o,path:[t.discriminator],inst:e}),i)}}),Dr=a(`$ZodIntersection`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>An(e,t,n)):An(e,i,a)}}),Or=a(`$ZodTuple`,(e,t)=>{E.init(e,t);let n=t.items,r=n.length-[...n].reverse().findIndex(e=>e._zod.optin!==`optional`);e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=[];let s=[];if(!t.rest){let t=o.length>n.length,a=o.length<r-1;if(t||a)return i.issues.push({input:o,inst:e,origin:`array`,...t?{code:`too_big`,maximum:n.length}:{code:`too_small`,minimum:n.length}}),i}let c=-1;for(let e of n){if(c++,c>=o.length&&c>=r)continue;let t=e._zod.run({value:o[c],issues:[]},a);t instanceof Promise?s.push(t.then(e=>jn(e,i,c))):jn(t,i,c)}if(t.rest){let e=o.slice(n.length);for(let n of e){c++;let e=t.rest._zod.run({value:n,issues:[]},a);e instanceof Promise?s.push(e.then(e=>jn(e,i,c))):jn(e,i,c)}}return s.length?Promise.all(s).then(()=>i):i}}),kr=a(`$ZodRecord`,(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!fe(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[];if(t.keyType._zod.values){let o=t.keyType._zod.values;n.value={};for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...S(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...S(e,o.issues)),n.value[e]=o.value)}let s;for(let e in i)o.has(e)||(s??=[],s.push(e));s&&s.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:s})}else{n.value={};for(let s of Reflect.ownKeys(i)){if(s===`__proto__`)continue;let c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(c.issues.length){n.issues.push({origin:`record`,code:`invalid_key`,issues:c.issues.map(e=>C(e,r,o())),input:s,path:[s],inst:e}),n.value[c.value]=c.value;continue}let l=t.valueType._zod.run({value:i[s],issues:[]},r);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&n.issues.push(...S(s,e.issues)),n.value[c.value]=e.value})):(l.issues.length&&n.issues.push(...S(s,l.issues)),n.value[c.value]=l.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Ar=a(`$ZodMap`,(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{Mn(t,a,n,o,i,e,r)})):Mn(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}}),jr=a(`$ZodSet`,(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>Nn(e,n))):Nn(i,n)}return a.length?Promise.all(a).then(()=>n):n}}),Mr=a(`$ZodEnum`,(e,t)=>{E.init(e,t);let n=ie(t.entries);e._zod.values=new Set(n),e._zod.pattern=RegExp(`^(${n.filter(e=>Ne.has(typeof e)).map(e=>typeof e==`string`?me(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,r)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:`invalid_value`,values:n,input:i,inst:e}),t}}),Nr=a(`$ZodLiteral`,(e,t)=>{E.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?me(e):e?e.toString():String(e)).join(`|`)})$`),e._zod.parse=(n,r)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),Pr=a(`$ZodFile`,(e,t)=>{E.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),Fr=a(`$ZodTransform`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>{let r=t.transform(e.value,e);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(t=>(e.value=t,e));if(r instanceof Promise)throw new l;return e.value=r,e}}),Ir=a(`$ZodOptional`,(e,t)=>{E.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,g(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),g(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${se(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>t.innerType._zod.optin===`optional`?t.innerType._zod.run(e,n):e.value===void 0?e:t.innerType._zod.run(e,n)}),Lr=a(`$ZodNullable`,(e,t)=>{E.init(e,t),g(e._zod,`optin`,()=>t.innerType._zod.optin),g(e._zod,`optout`,()=>t.innerType._zod.optout),g(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${se(e.source)}|null)$`):void 0}),g(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Rr=a(`$ZodDefault`,(e,t)=>{E.init(e,t),e._zod.optin=`optional`,g(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Pn(e,t)):Pn(r,t)}}),zr=a(`$ZodPrefault`,(e,t)=>{E.init(e,t),e._zod.optin=`optional`,g(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Br=a(`$ZodNonOptional`,(e,t)=>{E.init(e,t),g(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Fn(t,e)):Fn(i,e)}}),Vr=a(`$ZodSuccess`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),Hr=a(`$ZodCatch`,(e,t)=>{E.init(e,t),e._zod.optin=`optional`,g(e._zod,`optout`,()=>t.innerType._zod.optout),g(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>C(e,n,o()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>C(e,n,o()))},input:e.value}),e.issues=[]),e)}}),Ur=a(`$ZodNaN`,(e,t)=>{E.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),Wr=a(`$ZodPipe`,(e,t)=>{E.init(e,t),g(e._zod,`values`,()=>t.in._zod.values),g(e._zod,`optin`,()=>t.in._zod.optin),g(e._zod,`optout`,()=>t.out._zod.optout),e._zod.parse=(e,n)=>{let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>In(e,t,n)):In(r,t,n)}}),Gr=a(`$ZodReadonly`,(e,t)=>{E.init(e,t),g(e._zod,`propValues`,()=>t.innerType._zod.propValues),g(e._zod,`values`,()=>t.innerType._zod.values),g(e._zod,`optin`,()=>t.innerType._zod.optin),g(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ln):Ln(r)}}),Kr=a(`$ZodTemplateLiteral`,(e,t)=>{E.init(e,t);let n=[];for(let e of t.parts)if(e instanceof E){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||Pe.has(typeof e))n.push(me(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(t,n)=>typeof t.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(t.value)||t.issues.push({input:t.value,inst:e,code:`invalid_format`,format:`template_literal`,pattern:e._zod.pattern.source}),t):(t.issues.push({input:t.value,inst:e,expected:`template_literal`,code:`invalid_type`}),t)}),qr=a(`$ZodPromise`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Jr=a(`$ZodLazy`,(e,t)=>{E.init(e,t),g(e._zod,`innerType`,()=>t.getter()),g(e._zod,`pattern`,()=>e._zod.innerType._zod.pattern),g(e._zod,`propValues`,()=>e._zod.innerType._zod.propValues),g(e._zod,`optin`,()=>e._zod.innerType._zod.optin),g(e._zod,`optout`,()=>e._zod.innerType._zod.optout),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Yr=a(`$ZodCustom`,(e,t)=>{T.init(e,t),E.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Rn(t,n,r,e));Rn(i,n,r,e)}})}));function Zr(){return{localeError:Qr()}}var Qr,$r=t((()=>{w(),Qr=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`مدخلات غير مقبولة: يفترض إدخال ${e.expected}، ولكن تم إدخال ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${x(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${r[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${m(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function ei(){return{localeError:ti()}}var ti,ni=t((()=>{w(),ti=()=>{let 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(t){return e[t]??null}let n=e=>{let 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},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 e=>{switch(e.code){case`invalid_type`:return`Yanlış dəyər: gözlənilən ${e.expected}, daxil olan ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${x(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function ri(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function ii(){return{localeError:ai()}}var ai,oi=t((()=>{w(),ai=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`лік`;case`object`:if(Array.isArray(e))return`масіў`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Няправільны ўвод: чакаўся ${e.expected}, атрымана ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${x(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=ri(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=ri(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${r[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function si(){return{localeError:ci()}}var ci,li=t((()=>{w(),ci=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Tipus invàlid: s'esperava ${e.expected}, s'ha rebut ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${x(e.values[0])}`:`Opció invàlida: s'esperava una de ${m(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${r[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function ui(){return{localeError:di()}}var di,fi=t((()=>{w(),di=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`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(e))return`pole`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Neplatný vstup: očekáváno ${e.expected}, obdrženo ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${x(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${r[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${m(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function pi(){return{localeError:mi()}}var mi,hi=t((()=>{w(),mi=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`Zahl`;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},r={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 e=>{switch(e.code){case`invalid_type`:return`Ungültige Eingabe: erwartet ${e.expected}, erhalten ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${x(e.values[0])}`:`Ungültige Option: erwartet eine von ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function gi(){return{localeError:vi()}}var _i,vi,yi=t((()=>{w(),_i=e=>{let 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},vi=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`}};function t(t){return e[t]??null}let n={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 e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${e.expected}, received ${_i(e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${x(e.values[0])}`:`Invalid option: expected one of ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function bi(){return{localeError:Si()}}var xi,Si,Ci=t((()=>{w(),xi=e=>{let 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},Si=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={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 e=>{switch(e.code){case`invalid_type`:return`Nevalida enigo: atendiĝis ${e.expected}, riceviĝis ${xi(e.input)}`;case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${x(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function wi(){return{localeError:Ti()}}var Ti,Ei=t((()=>{w(),Ti=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`número`;case`object`:if(Array.isArray(e))return`arreglo`;if(e===null)return`nulo`;if(Object.getPrototypeOf(e)!==Object.prototype)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: se esperaba ${e.expected}, recibido ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${x(e.values[0])}`:`Opción inválida: se esperaba una de ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: se esperaba que ${e.origin??`valor`} tuviera ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: se esperaba que ${e.origin??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeño: se esperaba que ${e.origin} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${e.origin} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${r[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${e.origin}`;default:return`Entrada inválida`}}}}));function Di(){return{localeError:Oi()}}var Oi,ki=t((()=>{w(),Oi=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`عدد`;case`object`:if(Array.isArray(e))return`آرایه`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,jwt:`JWT`,template_literal:`ورودی`};return e=>{switch(e.code){case`invalid_type`:return`ورودی نامعتبر: میبایست ${e.expected} میبود، ${n(e.input)} دریافت شد`;case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: میبایست ${x(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${m(e.values,`|`)} میبود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${r[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${m(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function Ai(){return{localeError:ji()}}var ji,Mi=t((()=>{w(),ji=()=>{let 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(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Virheellinen tyyppi: odotettiin ${e.expected}, oli ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${x(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${r[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${m(e.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 Ni(){return{localeError:Pi()}}var Pi,Fi=t((()=>{w(),Pi=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`nombre`;case`object`:if(Array.isArray(e))return`tableau`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Entrée invalide : ${e.expected} attendu, ${n(e.input)} reçu`;case`invalid_value`:return e.values.length===1?`Entrée invalide : ${x(e.values[0])} attendu`:`Option invalide : une valeur parmi ${m(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Trop grand : ${e.origin??`valeur`} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`élément(s)`}`:`Trop grand : ${e.origin??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Trop petit : ${e.origin} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${r[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${m(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Ii(){return{localeError:Li()}}var Li,Ri=t((()=>{w(),Li=()=>{let 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(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Entrée invalide : attendu ${e.expected}, reçu ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${x(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${r[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${m(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function zi(){return{localeError:Bi()}}var Bi,Vi=t((()=>{w(),Bi=()=>{let e={string:{unit:`אותיות`,verb:`לכלול`},file:{unit:`בייטים`,verb:`לכלול`},array:{unit:`פריטים`,verb:`לכלול`},set:{unit:`פריטים`,verb:`לכלול`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`קלט לא תקין: צריך ${e.expected}, התקבל ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`קלט לא תקין: צריך ${x(e.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`גדול מדי: ${e.origin??`value`} צריך להיות ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`גדול מדי: ${e.origin??`value`} צריך להיות ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()} ${r.unit}`:`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`מחרוזת לא תקינה: חייבת להתחיל ב"${t.prefix}"`:t.format===`ends_with`?`מחרוזת לא תקינה: חייבת להסתיים ב "${t.suffix}"`:t.format===`includes`?`מחרוזת לא תקינה: חייבת לכלול "${t.includes}"`:t.format===`regex`?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${t.pattern}`:`${r[t.format]??e.format} לא תקין`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;case`unrecognized_keys`:return`מפתח${e.keys.length>1?`ות`:``} לא מזוה${e.keys.length>1?`ים`:`ה`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`מפתח לא תקין ב${e.origin}`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${e.origin}`;default:return`קלט לא תקין`}}}}));function Hi(){return{localeError:Ui()}}var Ui,Wi=t((()=>{w(),Ui=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`szám`;case`object`:if(Array.isArray(e))return`tömb`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Érvénytelen bemenet: a várt érték ${e.expected}, a kapott érték ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${x(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function Gi(){return{localeError:Ki()}}var Ki,qi=t((()=>{w(),Ki=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Input tidak valid: diharapkan ${e.expected}, diterima ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${x(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${r[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function Ji(){return{localeError:Yi()}}var Yi,Xi=t((()=>{w(),Yi=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`numero`;case`object`:if(Array.isArray(e))return`vettore`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Input non valido: atteso ${e.expected}, ricevuto ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${x(e.values[0])}`:`Opzione non valida: atteso uno tra ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${r[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function Zi(){return{localeError:Qi()}}var Qi,$i=t((()=>{w(),Qi=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`数値`;case`object`:if(Array.isArray(e))return`配列`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,jwt:`JWT`,template_literal:`入力値`};return e=>{switch(e.code){case`invalid_type`:return`無効な入力: ${e.expected}が期待されましたが、${n(e.input)}が入力されました`;case`invalid_value`:return e.values.length===1?`無効な入力: ${x(e.values[0])}が期待されました`:`無効な選択: ${m(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${r[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${m(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function ea(){return{localeError:ta()}}var ta,na=t((()=>{w(),ta=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`មិនមែនជាលេខ (NaN)`:`លេខ`;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},r={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`};return e=>{switch(e.code){case`invalid_type`:return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e.expected} ប៉ុន្តែទទួលបាន ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${x(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${m(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function ra(){return{localeError:ia()}}var ia,aa=t((()=>{w(),ia=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n=e=>{let 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},r={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,jwt:`JWT`,template_literal:`입력`};return e=>{switch(e.code){case`invalid_type`:return`잘못된 입력: 예상 타입은 ${e.expected}, 받은 타입은 ${n(e.input)}입니다`;case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${x(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${m(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${m(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function oa(){return{localeError:sa()}}var sa,ca=t((()=>{w(),sa=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`број`;case`object`:if(Array.isArray(e))return`низа`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,jwt:`JWT`,template_literal:`внес`};return e=>{switch(e.code){case`invalid_type`:return`Грешен внес: се очекува ${e.expected}, примено ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${x(e.values[0])}`:`Грешана опција: се очекува една ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${r[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function la(){return{localeError:ua()}}var ua,da=t((()=>{w(),ua=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`nombor`;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},r={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 e=>{switch(e.code){case`invalid_type`:return`Input tidak sah: dijangka ${e.expected}, diterima ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${x(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${r[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${m(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function fa(){return{localeError:pa()}}var pa,ma=t((()=>{w(),pa=()=>{let e={string:{unit:`tekens`},file:{unit:`bytes`},array:{unit:`elementen`},set:{unit:`elementen`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`getal`;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},r={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 e=>{switch(e.code){case`invalid_type`:return`Ongeldige invoer: verwacht ${e.expected}, ontving ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${x(e.values[0])}`:`Ongeldige optie: verwacht één van ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Te lang: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} bevat`:`Te lang: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} bevat`:`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function ha(){return{localeError:ga()}}var ga,_a=t((()=>{w(),ga=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`tall`;case`object`:if(Array.isArray(e))return`liste`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Ugyldig input: forventet ${e.expected}, fikk ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${x(e.values[0])}`:`Ugyldig valg: forventet en av ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function va(){return{localeError:ya()}}var ya,ba=t((()=>{w(),ya=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`numara`;case`object`:if(Array.isArray(e))return`saf`;if(e===null)return`gayb`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Fâsit giren: umulan ${e.expected}, alınan ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${x(e.values[0])}`:`Fâsit tercih: mûteberler ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${r[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function xa(){return{localeError:Sa()}}var Sa,Ca=t((()=>{w(),Sa=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`عدد`;case`object`:if(Array.isArray(e))return`ارې`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`ناسم ورودي: باید ${e.expected} وای, مګر ${n(e.input)} ترلاسه شو`;case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${x(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${m(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${r[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function wa(){return{localeError:Ta()}}var Ta,Ea=t((()=>{w(),Ta=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`liczba`;case`object`:if(Array.isArray(e))return`tablica`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Nieprawidłowe dane wejściowe: oczekiwano ${e.expected}, otrzymano ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${x(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${r[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function Da(){return{localeError:Oa()}}var Oa,ka=t((()=>{w(),Oa=()=>{let e={string:{unit:`caracteres`,verb:`ter`},file:{unit:`bytes`,verb:`ter`},array:{unit:`itens`,verb:`ter`},set:{unit:`itens`,verb:`ter`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`número`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`nulo`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Tipo inválido: esperado ${e.expected}, recebido ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperado ${x(e.values[0])}`:`Opção inválida: esperada uma das ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Muito grande: esperado que ${e.origin??`valor`} tivesse ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Muito grande: esperado que ${e.origin??`valor`} fosse ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${r[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Chave${e.keys.length>1?`s`:``} desconhecida${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Chave inválida em ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido em ${e.origin}`;default:return`Campo inválido`}}}}));function Aa(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function ja(){return{localeError:Ma()}}var Ma,Na=t((()=>{w(),Ma=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`число`;case`object`:if(Array.isArray(e))return`массив`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Неверный ввод: ожидалось ${e.expected}, получено ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${x(e.values[0])}`:`Неверный вариант: ожидалось одно из ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Aa(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Aa(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${r[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function Pa(){return{localeError:Fa()}}var Fa,Ia=t((()=>{w(),Fa=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`število`;case`object`:if(Array.isArray(e))return`tabela`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Neveljaven vnos: pričakovano ${e.expected}, prejeto ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${x(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${r[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function La(){return{localeError:Ra()}}var Ra,za=t((()=>{w(),Ra=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`antal`;case`object`:if(Array.isArray(e))return`lista`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Ogiltig inmatning: förväntat ${e.expected}, fick ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${x(e.values[0])}`:`Ogiltigt val: förväntade en av ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function Ba(){return{localeError:Va()}}var Va,Ha=t((()=>{w(),Va=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`எண் அல்லாதது`:`எண்`;case`object`:if(Array.isArray(e))return`அணி`;if(e===null)return`வெறுமை`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e.expected}, பெறப்பட்டது ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${x(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${m(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function Ua(){return{localeError:Wa()}}var Wa,Ga=t((()=>{w(),Wa=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`ไม่ใช่ตัวเลข (NaN)`:`ตัวเลข`;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},r={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`};return e=>{switch(e.code){case`invalid_type`:return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e.expected} แต่ได้รับ ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${x(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${m(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function Ka(){return{localeError:Ja()}}var qa,Ja,Ya=t((()=>{w(),qa=e=>{let 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},Ja=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={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 e=>{switch(e.code){case`invalid_type`:return`Geçersiz değer: beklenen ${e.expected}, alınan ${qa(e.input)}`;case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${x(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function Xa(){return{localeError:Za()}}var Za,Qa=t((()=>{w(),Za=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`число`;case`object`:if(Array.isArray(e))return`масив`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,jwt:`JWT`,template_literal:`вхідні дані`};return e=>{switch(e.code){case`invalid_type`:return`Неправильні вхідні дані: очікується ${e.expected}, отримано ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${x(e.values[0])}`:`Неправильна опція: очікується одне з ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${r[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function $a(){return{localeError:eo()}}var eo,to=t((()=>{w(),eo=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`نمبر`;case`object`:if(Array.isArray(e))return`آرے`;if(e===null)return`نل`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`غلط ان پٹ: ${e.expected} متوقع تھا، ${n(e.input)} موصول ہوا`;case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${x(e.values[0])} متوقع تھا`:`غلط آپشن: ${m(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${r[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${m(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function no(){return{localeError:ro()}}var ro,io=t((()=>{w(),ro=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`số`;case`object`:if(Array.isArray(e))return`mảng`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Đầu vào không hợp lệ: mong đợi ${e.expected}, nhận được ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${x(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${r[t.format]??e.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 ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${m(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.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 ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function ao(){return{localeError:oo()}}var oo,so=t((()=>{w(),oo=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`非数字(NaN)`:`数字`;case`object`:if(Array.isArray(e))return`数组`;if(e===null)return`空值(null)`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,jwt:`JWT`,template_literal:`输入`};return e=>{switch(e.code){case`invalid_type`:return`无效输入:期望 ${e.expected},实际接收 ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`无效输入:期望 ${x(e.values[0])}`:`无效选项:期望以下之一 ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${r[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function co(){return{localeError:lo()}}var lo,uo=t((()=>{w(),lo=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`無效的輸入值:預期為 ${e.expected},但收到 ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${x(e.values[0])}`:`無效的選項:預期為以下其中之一 ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${r[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${m(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}})),fo=r({ar:()=>Zr,az:()=>ei,be:()=>ii,ca:()=>si,cs:()=>ui,de:()=>pi,en:()=>gi,eo:()=>bi,es:()=>wi,fa:()=>Di,fi:()=>Ai,fr:()=>Ni,frCA:()=>Ii,he:()=>zi,hu:()=>Hi,id:()=>Gi,it:()=>Ji,ja:()=>Zi,kh:()=>ea,ko:()=>ra,mk:()=>oa,ms:()=>la,nl:()=>fa,no:()=>ha,ota:()=>va,pl:()=>wa,ps:()=>xa,pt:()=>Da,ru:()=>ja,sl:()=>Pa,sv:()=>La,ta:()=>Ba,th:()=>Ua,tr:()=>Ka,ua:()=>Xa,ur:()=>$a,vi:()=>no,zhCN:()=>ao,zhTW:()=>co}),po=t((()=>{$r(),ni(),oi(),li(),fi(),hi(),yi(),Ci(),Ei(),ki(),Mi(),Fi(),Ri(),Vi(),Wi(),qi(),Xi(),$i(),na(),aa(),ca(),da(),ma(),_a(),ba(),Ca(),Ea(),ka(),Na(),Ia(),za(),Ha(),Ga(),Ya(),Qa(),to(),io(),so(),uo()}));function mo(){return new _o}var ho,go,_o,vo,yo=t((()=>{ho=Symbol(`ZodOutput`),go=Symbol(`ZodInput`),_o=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}},vo=mo()}));function bo(e,t){return new e({type:`string`,...b(t)})}function xo(e,t){return new e({type:`string`,coerce:!0,...b(t)})}function So(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...b(t)})}function Co(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...b(t)})}function wo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...b(t)})}function To(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...b(t)})}function Eo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...b(t)})}function Do(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...b(t)})}function Oo(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...b(t)})}function ko(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...b(t)})}function Ao(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...b(t)})}function jo(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...b(t)})}function Mo(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...b(t)})}function No(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...b(t)})}function Po(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...b(t)})}function Fo(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...b(t)})}function Io(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...b(t)})}function Lo(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...b(t)})}function Ro(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...b(t)})}function zo(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...b(t)})}function Bo(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...b(t)})}function Vo(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...b(t)})}function Ho(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...b(t)})}function Uo(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...b(t)})}function Wo(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...b(t)})}function Go(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...b(t)})}function Ko(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...b(t)})}function qo(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...b(t)})}function Jo(e,t){return new e({type:`number`,checks:[],...b(t)})}function Yo(e,t){return new e({type:`number`,coerce:!0,checks:[],...b(t)})}function Xo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...b(t)})}function Zo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...b(t)})}function Qo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...b(t)})}function $o(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...b(t)})}function es(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...b(t)})}function ts(e,t){return new e({type:`boolean`,...b(t)})}function ns(e,t){return new e({type:`boolean`,coerce:!0,...b(t)})}function rs(e,t){return new e({type:`bigint`,...b(t)})}function is(e,t){return new e({type:`bigint`,coerce:!0,...b(t)})}function as(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...b(t)})}function os(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...b(t)})}function ss(e,t){return new e({type:`symbol`,...b(t)})}function cs(e,t){return new e({type:`undefined`,...b(t)})}function ls(e,t){return new e({type:`null`,...b(t)})}function us(e){return new e({type:`any`})}function ds(e){return new e({type:`unknown`})}function fs(e,t){return new e({type:`never`,...b(t)})}function ps(e,t){return new e({type:`void`,...b(t)})}function ms(e,t){return new e({type:`date`,...b(t)})}function hs(e,t){return new e({type:`date`,coerce:!0,...b(t)})}function gs(e,t){return new e({type:`nan`,...b(t)})}function _s(e,t){return new Yt({check:`less_than`,...b(t),value:e,inclusive:!1})}function O(e,t){return new Yt({check:`less_than`,...b(t),value:e,inclusive:!0})}function vs(e,t){return new Xt({check:`greater_than`,...b(t),value:e,inclusive:!1})}function k(e,t){return new Xt({check:`greater_than`,...b(t),value:e,inclusive:!0})}function ys(e){return vs(0,e)}function bs(e){return _s(0,e)}function xs(e){return O(0,e)}function Ss(e){return k(0,e)}function Cs(e,t){return new Zt({check:`multiple_of`,...b(t),value:e})}function ws(e,t){return new en({check:`max_size`,...b(t),maximum:e})}function Ts(e,t){return new tn({check:`min_size`,...b(t),minimum:e})}function Es(e,t){return new nn({check:`size_equals`,...b(t),size:e})}function Ds(e,t){return new rn({check:`max_length`,...b(t),maximum:e})}function Os(e,t){return new an({check:`min_length`,...b(t),minimum:e})}function ks(e,t){return new on({check:`length_equals`,...b(t),length:e})}function As(e,t){return new cn({check:`string_format`,format:`regex`,...b(t),pattern:e})}function js(e){return new ln({check:`string_format`,format:`lowercase`,...b(e)})}function Ms(e){return new un({check:`string_format`,format:`uppercase`,...b(e)})}function Ns(e,t){return new dn({check:`string_format`,format:`includes`,...b(t),includes:e})}function Ps(e,t){return new fn({check:`string_format`,format:`starts_with`,...b(t),prefix:e})}function Fs(e,t){return new pn({check:`string_format`,format:`ends_with`,...b(t),suffix:e})}function Is(e,t,n){return new mn({check:`property`,property:e,schema:t,...b(n)})}function Ls(e,t){return new hn({check:`mime_type`,mime:e,...b(t)})}function Rs(e){return new gn({check:`overwrite`,tx:e})}function zs(e){return Rs(t=>t.normalize(e))}function Bs(){return Rs(e=>e.trim())}function Vs(){return Rs(e=>e.toLowerCase())}function Hs(){return Rs(e=>e.toUpperCase())}function Us(e,t,n){return new e({type:`array`,element:t,...b(n)})}function Ws(e,t,n){return new e({type:`union`,options:t,...b(n)})}function Gs(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...b(r)})}function Ks(e,t,n){return new e({type:`intersection`,left:t,right:n})}function qs(e,t,n,r){let i=n instanceof E;return new e({type:`tuple`,items:t,rest:i?n:null,...b(i?r:n)})}function Js(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...b(r)})}function Ys(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...b(r)})}function Xs(e,t,n){return new e({type:`set`,valueType:t,...b(n)})}function Zs(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...b(n)})}function Qs(e,t,n){return new e({type:`enum`,entries:t,...b(n)})}function $s(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...b(n)})}function ec(e,t){return new e({type:`file`,...b(t)})}function tc(e,t){return new e({type:`transform`,transform:t})}function nc(e,t){return new e({type:`optional`,innerType:t})}function rc(e,t){return new e({type:`nullable`,innerType:t})}function ic(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():n}})}function ac(e,t,n){return new e({type:`nonoptional`,innerType:t,...b(n)})}function oc(e,t){return new e({type:`success`,innerType:t})}function sc(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:()=>n})}function cc(e,t,n){return new e({type:`pipe`,in:t,out:n})}function lc(e,t){return new e({type:`readonly`,innerType:t})}function uc(e,t,n){return new e({type:`template_literal`,parts:t,...b(n)})}function dc(e,t){return new e({type:`lazy`,getter:t})}function fc(e,t){return new e({type:`promise`,innerType:t})}function pc(e,t,n){let r=b(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function mc(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...b(n)})}function hc(e,t){let n=b(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Pipe??Wr,c=e.Boolean??fr,l=e.String??zn,u=new(e.Transform??Fr)({type:`transform`,transform:(e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:u}),{})},error:n.error});return new s({type:`pipe`,in:new s({type:`pipe`,in:new l({type:`string`,error:n.error}),out:u,error:n.error}),out:new c({type:`boolean`,error:n.error}),error:n.error})}function gc(e,t,n,r={}){let i=b(r),a={...b(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var _c,vc=t((()=>{_n(),Xr(),w(),_c={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function yc(e){return new bc({type:`function`,input:Array.isArray(e?.input)?qs(Or,e?.input):e?.input??Us(Cr,ds(yr)),output:e?.output??ds(yr)})}var bc,xc=t((()=>{vc(),tt(),Xr(),bc=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!=`function`)throw Error(`implement() must be called with a function`);let t=((...n)=>{let r=this._def.input?Je(this._def.input,n,void 0,{callee:t}):n;if(!Array.isArray(r))throw Error(`Invalid arguments schema: not an array or tuple schema.`);let i=e(...r);return this._def.output?Je(this._def.output,i,void 0,{callee:t}):i});return t}implementAsync(e){if(typeof e!=`function`)throw Error(`implement() must be called with a function`);let t=(async(...n)=>{let r=this._def.input?await Xe(this._def.input,n,void 0,{callee:t}):n;if(!Array.isArray(r))throw Error(`Invalid arguments schema: not an array or tuple schema.`);let i=await e(...r);return this._def.output?Xe(this._def.output,i,void 0,{callee:t}):i});return t}input(...e){let t=this.constructor;return Array.isArray(e[0])?new t({type:`function`,input:new Or({type:`tuple`,items:e[0],rest:e[1]}),output:this._def.output}):new t({type:`function`,input:e[0],output:this._def.output})}output(e){let t=this.constructor;return new t({type:`function`,input:this._def.input,output:e})}}}));function Sc(e,t){if(e instanceof _o){let n=new Cc(t),r={};for(let t of e._idmap.entries()){let[e,r]=t;n.process(r)}let i={},a={registry:e,uri:t?.uri,defs:r};for(let r of e._idmap.entries()){let[e,o]=r;i[e]=n.emit(o,{...t,external:a})}return Object.keys(r).length>0&&(i.__shared={[n.target===`draft-2020-12`?`$defs`:`definitions`]:r}),{schemas:i}}let n=new Cc(t);return n.process(e),n.emit(e,t)}function A(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;switch(r.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 A(r.element,n);case`object`:for(let e in r.shape)if(A(r.shape[e],n))return!0;return!1;case`union`:for(let e of r.options)if(A(e,n))return!0;return!1;case`intersection`:return A(r.left,n)||A(r.right,n);case`tuple`:for(let e of r.items)if(A(e,n))return!0;return!!(r.rest&&A(r.rest,n));case`record`:return A(r.keyType,n)||A(r.valueType,n);case`map`:return A(r.keyType,n)||A(r.valueType,n);case`set`:return A(r.valueType,n);case`promise`:case`optional`:case`nonoptional`:case`nullable`:case`readonly`:return A(r.innerType,n);case`lazy`:return A(r.getter(),n);case`default`:return A(r.innerType,n);case`prefault`:return A(r.innerType,n);case`custom`:return!1;case`transform`:return!0;case`pipe`:return A(r.in,n)||A(r.out,n);case`success`:return!1;case`catch`:return!1}throw Error(`Unknown schema type: ${r.type}`)}var Cc,wc=t((()=>{yo(),w(),Cc=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??vo,this.target=e?.target??`draft-2020-12`,this.unrepresentable=e?.unrepresentable??`throw`,this.override=e?.override??(()=>{}),this.io=e?.io??`output`,this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var n;let r=e._zod.def,i={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},a=this.seen.get(e);if(a)return a.count++,t.schemaPath.includes(e)&&(a.cycle=t.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let n={...t,schemaPath:[...t.schemaPath,e],path:t.path},a=e._zod.parent;if(a)o.ref=a,this.process(a,n),this.seen.get(a).isParent=!0;else{let t=o.schema;switch(r.type){case`string`:{let n=t;n.type=`string`;let{minimum:r,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof r==`number`&&(n.minLength=r),typeof a==`number`&&(n.maxLength=a),s&&(n.format=i[s]??s,n.format===``&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?n.pattern=e[0].source:e.length>1&&(o.schema.allOf=[...e.map(e=>({...this.target===`draft-7`?{type:`string`}:{},pattern:e.source}))])}break}case`number`:{let n=t,{minimum:r,maximum:i,format:a,multipleOf:o,exclusiveMaximum:s,exclusiveMinimum:c}=e._zod.bag;n.type=typeof a==`string`&&a.includes(`int`)?`integer`:`number`,typeof c==`number`&&(n.exclusiveMinimum=c),typeof r==`number`&&(n.minimum=r,typeof c==`number`&&(c>=r?delete n.minimum:delete n.exclusiveMinimum)),typeof s==`number`&&(n.exclusiveMaximum=s),typeof i==`number`&&(n.maximum=i,typeof s==`number`&&(s<=i?delete n.maximum:delete n.exclusiveMaximum)),typeof o==`number`&&(n.multipleOf=o);break}case`boolean`:{let e=t;e.type=`boolean`;break}case`bigint`:if(this.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`);break;case`symbol`:if(this.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`);break;case`null`:t.type=`null`;break;case`any`:break;case`unknown`:break;case`undefined`:if(this.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`);break;case`void`:if(this.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`);break;case`never`:t.not={};break;case`date`:if(this.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`);break;case`array`:{let i=t,{minimum:a,maximum:o}=e._zod.bag;typeof a==`number`&&(i.minItems=a),typeof o==`number`&&(i.maxItems=o),i.type=`array`,i.items=this.process(r.element,{...n,path:[...n.path,`items`]});break}case`object`:{let e=t;e.type=`object`,e.properties={};let i=r.shape;for(let t in i)e.properties[t]=this.process(i[t],{...n,path:[...n.path,`properties`,t]});let a=new Set(Object.keys(i)),o=new Set([...a].filter(e=>{let t=r.shape[e]._zod;return this.io===`input`?t.optin===void 0:t.optout===void 0}));o.size>0&&(e.required=Array.from(o)),r.catchall?._zod.def.type===`never`?e.additionalProperties=!1:r.catchall?r.catchall&&(e.additionalProperties=this.process(r.catchall,{...n,path:[...n.path,`additionalProperties`]})):this.io===`output`&&(e.additionalProperties=!1);break}case`union`:{let e=t;e.anyOf=r.options.map((e,t)=>this.process(e,{...n,path:[...n.path,`anyOf`,t]}));break}case`intersection`:{let e=t,i=this.process(r.left,{...n,path:[...n.path,`allOf`,0]}),a=this.process(r.right,{...n,path:[...n.path,`allOf`,1]}),o=e=>`allOf`in e&&Object.keys(e).length===1;e.allOf=[...o(i)?i.allOf:[i],...o(a)?a.allOf:[a]];break}case`tuple`:{let i=t;i.type=`array`;let a=r.items.map((e,t)=>this.process(e,{...n,path:[...n.path,`prefixItems`,t]}));if(this.target===`draft-2020-12`?i.prefixItems=a:i.items=a,r.rest){let e=this.process(r.rest,{...n,path:[...n.path,`items`]});this.target===`draft-2020-12`?i.items=e:i.additionalItems=e}r.rest&&(i.items=this.process(r.rest,{...n,path:[...n.path,`items`]}));let{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s);break}case`record`:{let e=t;e.type=`object`,e.propertyNames=this.process(r.keyType,{...n,path:[...n.path,`propertyNames`]}),e.additionalProperties=this.process(r.valueType,{...n,path:[...n.path,`additionalProperties`]});break}case`map`:if(this.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`);break;case`set`:if(this.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`);break;case`enum`:{let e=t,n=ie(r.entries);n.every(e=>typeof e==`number`)&&(e.type=`number`),n.every(e=>typeof e==`string`)&&(e.type=`string`),e.enum=n;break}case`literal`:{let e=t,n=[];for(let e of r.values)if(e===void 0){if(this.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(this.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);n.push(Number(e))}else n.push(e);if(n.length!==0){if(n.length===1){let t=n[0];e.type=t===null?`null`:typeof t,e.const=t}else n.every(e=>typeof e==`number`)&&(e.type=`number`),n.every(e=>typeof e==`string`)&&(e.type=`string`),n.every(e=>typeof e==`boolean`)&&(e.type=`string`),n.every(e=>e===null)&&(e.type=`null`),e.enum=n}break}case`file`:{let n=t,r={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:i,maximum:a,mime:o}=e._zod.bag;i!==void 0&&(r.minLength=i),a!==void 0&&(r.maxLength=a),o?o.length===1?(r.contentMediaType=o[0],Object.assign(n,r)):n.anyOf=o.map(e=>({...r,contentMediaType:e})):Object.assign(n,r);break}case`transform`:if(this.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`);break;case`nullable`:t.anyOf=[this.process(r.innerType,n),{type:`null`}];break;case`nonoptional`:this.process(r.innerType,n),o.ref=r.innerType;break;case`success`:{let e=t;e.type=`boolean`;break}case`default`:this.process(r.innerType,n),o.ref=r.innerType,t.default=JSON.parse(JSON.stringify(r.defaultValue));break;case`prefault`:this.process(r.innerType,n),o.ref=r.innerType,this.io===`input`&&(t._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break;case`catch`:{this.process(r.innerType,n),o.ref=r.innerType;let e;try{e=r.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}t.default=e;break}case`nan`:if(this.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`);break;case`template_literal`:{let n=t,r=e._zod.pattern;if(!r)throw Error(`Pattern not found in template literal`);n.type=`string`,n.pattern=r.source;break}case`pipe`:{let e=this.io===`input`?r.in._zod.def.type===`transform`?r.out:r.in:r.out;this.process(e,n),o.ref=e;break}case`readonly`:this.process(r.innerType,n),o.ref=r.innerType,t.readOnly=!0;break;case`promise`:this.process(r.innerType,n),o.ref=r.innerType;break;case`optional`:this.process(r.innerType,n),o.ref=r.innerType;break;case`lazy`:{let t=e._zod.innerType;this.process(t,n),o.ref=t;break}case`custom`:if(this.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)}}}let c=this.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),this.io===`input`&&A(e)&&(delete o.schema.examples,delete o.schema.default),this.io===`input`&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(e).schema}emit(e,t){let n={cycles:t?.cycles??`ref`,reused:t?.reused??`inline`,external:t?.external??void 0},r=this.seen.get(e);if(!r)throw Error(`Unprocessed schema. This is a bug in Zod.`);let i=e=>{let t=this.target===`draft-2020-12`?`$defs`:`definitions`;if(n.external){let r=n.external.registry.get(e[0])?.id,i=n.external.uri??(e=>e);if(r)return{ref:i(r)};let a=e[1].defId??e[1].schema.id??`schema${this.counter++}`;return e[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${t}/${a}`}}if(e[1]===r)return{ref:`#`};let i=`#/${t}/`,a=e[1].schema.id??`__schema${this.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(n.cycles===`throw`)for(let e of this.seen.entries()){let t=e[1];if(t.cycle)throw Error(`Cycle detected: #/${t.cycle?.join(`/`)}/<root>
|
|
273
|
+
path: iss.path ? [${pe(e)}, ...iss.path] : [${pe(e)}]
|
|
274
|
+
})));`),t.write(`newResult[${pe(e)}] = ${n}.value`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},i,a=me,o=!u.jitless,s=o&&Me.value,c=t.catchall,l;e._zod.parse=(u,d)=>{l??=n.value;let f=u.value;if(!a(f))return u.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),u;let p=[];if(o&&s&&d?.async===!1&&d.jitless!==!0)i||=r(t.shape),u=i(u,d);else{u.value={};let e=l.shape;for(let t of l.keys){let n=e[t],r=n._zod.run({value:f[t],issues:[]},d),i=n._zod.optin===`optional`&&n._zod.optout===`optional`;r instanceof Promise?p.push(r.then(e=>i?On(e,u,t,f):Dn(e,u,t))):i?On(r,u,t,f):Dn(r,u,t)}}if(!c)return p.length?Promise.all(p).then(()=>u):u;let ee=[],te=l.keySet,ne=c._zod,re=ne.def.type;for(let e of Object.keys(f)){if(te.has(e))continue;if(re===`never`){ee.push(e);continue}let t=ne.run({value:f[e],issues:[]},d);t instanceof Promise?p.push(t.then(t=>Dn(t,u,e))):Dn(t,u,e)}return ee.length&&u.issues.push({code:`unrecognized_keys`,keys:ee,input:f,inst:e}),p.length?Promise.all(p).then(()=>u):u}}),Er=a(`$ZodUnion`,(e,t)=>{T.init(e,t),h(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),h(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),h(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),h(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ce(e.source)).join(`|`)})$`)}}),e._zod.parse=(n,r)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),i=!0;else{if(t.issues.length===0)return t;a.push(t)}}return i?Promise.all(a).then(t=>kn(t,n,e,r)):kn(a,n,e,r)}}),Dr=a(`$ZodDiscriminatedUnion`,(e,t)=>{Er.init(e,t);let n=e._zod.parse;h(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=oe(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!me(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,input:o,path:[t.discriminator],inst:e}),i)}}),Or=a(`$ZodIntersection`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>jn(e,t,n)):jn(e,i,a)}}),kr=a(`$ZodTuple`,(e,t)=>{T.init(e,t);let n=t.items,r=n.length-[...n].reverse().findIndex(e=>e._zod.optin!==`optional`);e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=[];let s=[];if(!t.rest){let t=o.length>n.length,a=o.length<r-1;if(t||a)return i.issues.push({input:o,inst:e,origin:`array`,...t?{code:`too_big`,maximum:n.length}:{code:`too_small`,minimum:n.length}}),i}let c=-1;for(let e of n){if(c++,c>=o.length&&c>=r)continue;let t=e._zod.run({value:o[c],issues:[]},a);t instanceof Promise?s.push(t.then(e=>Mn(e,i,c))):Mn(t,i,c)}if(t.rest){let e=o.slice(n.length);for(let n of e){c++;let e=t.rest._zod.run({value:n,issues:[]},a);e instanceof Promise?s.push(e.then(e=>Mn(e,i,c))):Mn(e,i,c)}}return s.length?Promise.all(s).then(()=>i):i}}),Ar=a(`$ZodRecord`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!he(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[];if(t.keyType._zod.values){let o=t.keyType._zod.values;n.value={};for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...x(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...x(e,o.issues)),n.value[e]=o.value)}let s;for(let e in i)o.has(e)||(s??=[],s.push(e));s&&s.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:s})}else{n.value={};for(let s of Reflect.ownKeys(i)){if(s===`__proto__`)continue;let c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(c.issues.length){n.issues.push({origin:`record`,code:`invalid_key`,issues:c.issues.map(e=>S(e,r,o())),input:s,path:[s],inst:e}),n.value[c.value]=c.value;continue}let l=t.valueType._zod.run({value:i[s],issues:[]},r);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&n.issues.push(...x(s,e.issues)),n.value[c.value]=e.value})):(l.issues.length&&n.issues.push(...x(s,l.issues)),n.value[c.value]=l.value)}}return a.length?Promise.all(a).then(()=>n):n}}),jr=a(`$ZodMap`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{Nn(t,a,n,o,i,e,r)})):Nn(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}}),Mr=a(`$ZodSet`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>Pn(e,n))):Pn(i,n)}return a.length?Promise.all(a).then(()=>n):n}}),Nr=a(`$ZodEnum`,(e,t)=>{T.init(e,t);let n=ie(t.entries);e._zod.values=new Set(n),e._zod.pattern=RegExp(`^(${n.filter(e=>Pe.has(typeof e)).map(e=>typeof e==`string`?_(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,r)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:`invalid_value`,values:n,input:i,inst:e}),t}}),Pr=a(`$ZodLiteral`,(e,t)=>{T.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?_(e):e?e.toString():String(e)).join(`|`)})$`),e._zod.parse=(n,r)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),Fr=a(`$ZodFile`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),Ir=a(`$ZodTransform`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{let r=t.transform(e.value,e);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(t=>(e.value=t,e));if(r instanceof Promise)throw new l;return e.value=r,e}}),Lr=a(`$ZodOptional`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,h(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),h(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ce(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>t.innerType._zod.optin===`optional`?t.innerType._zod.run(e,n):e.value===void 0?e:t.innerType._zod.run(e,n)}),Rr=a(`$ZodNullable`,(e,t)=>{T.init(e,t),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(e._zod,`optout`,()=>t.innerType._zod.optout),h(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ce(e.source)}|null)$`):void 0}),h(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),zr=a(`$ZodDefault`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,h(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Fn(e,t)):Fn(r,t)}}),Br=a(`$ZodPrefault`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,h(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Vr=a(`$ZodNonOptional`,(e,t)=>{T.init(e,t),h(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>In(t,e)):In(i,e)}}),Hr=a(`$ZodSuccess`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),Ur=a(`$ZodCatch`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,h(e._zod,`optout`,()=>t.innerType._zod.optout),h(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>S(e,n,o()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>S(e,n,o()))},input:e.value}),e.issues=[]),e)}}),Wr=a(`$ZodNaN`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),Gr=a(`$ZodPipe`,(e,t)=>{T.init(e,t),h(e._zod,`values`,()=>t.in._zod.values),h(e._zod,`optin`,()=>t.in._zod.optin),h(e._zod,`optout`,()=>t.out._zod.optout),e._zod.parse=(e,n)=>{let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ln(e,t,n)):Ln(r,t,n)}}),Kr=a(`$ZodReadonly`,(e,t)=>{T.init(e,t),h(e._zod,`propValues`,()=>t.innerType._zod.propValues),h(e._zod,`values`,()=>t.innerType._zod.values),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Rn):Rn(r)}}),qr=a(`$ZodTemplateLiteral`,(e,t)=>{T.init(e,t);let n=[];for(let e of t.parts)if(e instanceof T){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||Fe.has(typeof e))n.push(_(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(t,n)=>typeof t.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(t.value)||t.issues.push({input:t.value,inst:e,code:`invalid_format`,format:`template_literal`,pattern:e._zod.pattern.source}),t):(t.issues.push({input:t.value,inst:e,expected:`template_literal`,code:`invalid_type`}),t)}),Jr=a(`$ZodPromise`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Yr=a(`$ZodLazy`,(e,t)=>{T.init(e,t),h(e._zod,`innerType`,()=>t.getter()),h(e._zod,`pattern`,()=>e._zod.innerType._zod.pattern),h(e._zod,`propValues`,()=>e._zod.innerType._zod.propValues),h(e._zod,`optin`,()=>e._zod.innerType._zod.optin),h(e._zod,`optout`,()=>e._zod.innerType._zod.optout),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Xr=a(`$ZodCustom`,(e,t)=>{w.init(e,t),T.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>zn(t,n,r,e));zn(i,n,r,e)}})}));function Qr(){return{localeError:$r()}}var $r,ei=t((()=>{C(),$r=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`مدخلات غير مقبولة: يفترض إدخال ${e.expected}، ولكن تم إدخال ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${b(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${r[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${m(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function ti(){return{localeError:ni()}}var ni,ri=t((()=>{C(),ni=()=>{let 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(t){return e[t]??null}let n=e=>{let 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},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 e=>{switch(e.code){case`invalid_type`:return`Yanlış dəyər: gözlənilən ${e.expected}, daxil olan ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${b(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function ii(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function ai(){return{localeError:oi()}}var oi,si=t((()=>{C(),oi=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`лік`;case`object`:if(Array.isArray(e))return`масіў`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Няправільны ўвод: чакаўся ${e.expected}, атрымана ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${b(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=ii(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=ii(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${r[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function ci(){return{localeError:li()}}var li,ui=t((()=>{C(),li=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Tipus invàlid: s'esperava ${e.expected}, s'ha rebut ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${b(e.values[0])}`:`Opció invàlida: s'esperava una de ${m(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${r[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function di(){return{localeError:fi()}}var fi,pi=t((()=>{C(),fi=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`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(e))return`pole`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Neplatný vstup: očekáváno ${e.expected}, obdrženo ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${b(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${r[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${m(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function mi(){return{localeError:hi()}}var hi,gi=t((()=>{C(),hi=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`Zahl`;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},r={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 e=>{switch(e.code){case`invalid_type`:return`Ungültige Eingabe: erwartet ${e.expected}, erhalten ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${b(e.values[0])}`:`Ungültige Option: erwartet eine von ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function _i(){return{localeError:yi()}}var vi,yi,bi=t((()=>{C(),vi=e=>{let 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},yi=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`}};function t(t){return e[t]??null}let n={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 e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${e.expected}, received ${vi(e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${b(e.values[0])}`:`Invalid option: expected one of ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function xi(){return{localeError:Ci()}}var Si,Ci,wi=t((()=>{C(),Si=e=>{let 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},Ci=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={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 e=>{switch(e.code){case`invalid_type`:return`Nevalida enigo: atendiĝis ${e.expected}, riceviĝis ${Si(e.input)}`;case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${b(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function Ti(){return{localeError:Ei()}}var Ei,Di=t((()=>{C(),Ei=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`número`;case`object`:if(Array.isArray(e))return`arreglo`;if(e===null)return`nulo`;if(Object.getPrototypeOf(e)!==Object.prototype)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: se esperaba ${e.expected}, recibido ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${b(e.values[0])}`:`Opción inválida: se esperaba una de ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: se esperaba que ${e.origin??`valor`} tuviera ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: se esperaba que ${e.origin??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeño: se esperaba que ${e.origin} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${e.origin} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${r[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${e.origin}`;default:return`Entrada inválida`}}}}));function Oi(){return{localeError:ki()}}var ki,Ai=t((()=>{C(),ki=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`عدد`;case`object`:if(Array.isArray(e))return`آرایه`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,jwt:`JWT`,template_literal:`ورودی`};return e=>{switch(e.code){case`invalid_type`:return`ورودی نامعتبر: میبایست ${e.expected} میبود، ${n(e.input)} دریافت شد`;case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: میبایست ${b(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${m(e.values,`|`)} میبود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${r[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${m(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function ji(){return{localeError:Mi()}}var Mi,Ni=t((()=>{C(),Mi=()=>{let 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(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Virheellinen tyyppi: odotettiin ${e.expected}, oli ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${b(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${r[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${m(e.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 Pi(){return{localeError:Fi()}}var Fi,Ii=t((()=>{C(),Fi=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`nombre`;case`object`:if(Array.isArray(e))return`tableau`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Entrée invalide : ${e.expected} attendu, ${n(e.input)} reçu`;case`invalid_value`:return e.values.length===1?`Entrée invalide : ${b(e.values[0])} attendu`:`Option invalide : une valeur parmi ${m(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Trop grand : ${e.origin??`valeur`} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`élément(s)`}`:`Trop grand : ${e.origin??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Trop petit : ${e.origin} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${r[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${m(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Li(){return{localeError:Ri()}}var Ri,zi=t((()=>{C(),Ri=()=>{let 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(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Entrée invalide : attendu ${e.expected}, reçu ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${b(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${r[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${m(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Bi(){return{localeError:Vi()}}var Vi,Hi=t((()=>{C(),Vi=()=>{let e={string:{unit:`אותיות`,verb:`לכלול`},file:{unit:`בייטים`,verb:`לכלול`},array:{unit:`פריטים`,verb:`לכלול`},set:{unit:`פריטים`,verb:`לכלול`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`קלט לא תקין: צריך ${e.expected}, התקבל ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`קלט לא תקין: צריך ${b(e.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`גדול מדי: ${e.origin??`value`} צריך להיות ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`גדול מדי: ${e.origin??`value`} צריך להיות ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()} ${r.unit}`:`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`מחרוזת לא תקינה: חייבת להתחיל ב"${t.prefix}"`:t.format===`ends_with`?`מחרוזת לא תקינה: חייבת להסתיים ב "${t.suffix}"`:t.format===`includes`?`מחרוזת לא תקינה: חייבת לכלול "${t.includes}"`:t.format===`regex`?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${t.pattern}`:`${r[t.format]??e.format} לא תקין`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;case`unrecognized_keys`:return`מפתח${e.keys.length>1?`ות`:``} לא מזוה${e.keys.length>1?`ים`:`ה`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`מפתח לא תקין ב${e.origin}`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${e.origin}`;default:return`קלט לא תקין`}}}}));function Ui(){return{localeError:Wi()}}var Wi,Gi=t((()=>{C(),Wi=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`szám`;case`object`:if(Array.isArray(e))return`tömb`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Érvénytelen bemenet: a várt érték ${e.expected}, a kapott érték ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${b(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function Ki(){return{localeError:qi()}}var qi,Ji=t((()=>{C(),qi=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`Input tidak valid: diharapkan ${e.expected}, diterima ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${b(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${r[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function Yi(){return{localeError:Xi()}}var Xi,Zi=t((()=>{C(),Xi=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`numero`;case`object`:if(Array.isArray(e))return`vettore`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Input non valido: atteso ${e.expected}, ricevuto ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${b(e.values[0])}`:`Opzione non valida: atteso uno tra ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${r[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function Qi(){return{localeError:$i()}}var $i,ea=t((()=>{C(),$i=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`数値`;case`object`:if(Array.isArray(e))return`配列`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,jwt:`JWT`,template_literal:`入力値`};return e=>{switch(e.code){case`invalid_type`:return`無効な入力: ${e.expected}が期待されましたが、${n(e.input)}が入力されました`;case`invalid_value`:return e.values.length===1?`無効な入力: ${b(e.values[0])}が期待されました`:`無効な選択: ${m(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${r[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${m(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function ta(){return{localeError:na()}}var na,ra=t((()=>{C(),na=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`មិនមែនជាលេខ (NaN)`:`លេខ`;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},r={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`};return e=>{switch(e.code){case`invalid_type`:return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e.expected} ប៉ុន្តែទទួលបាន ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${b(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${m(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function ia(){return{localeError:aa()}}var aa,oa=t((()=>{C(),aa=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n=e=>{let 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},r={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,jwt:`JWT`,template_literal:`입력`};return e=>{switch(e.code){case`invalid_type`:return`잘못된 입력: 예상 타입은 ${e.expected}, 받은 타입은 ${n(e.input)}입니다`;case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${b(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${m(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${m(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function sa(){return{localeError:ca()}}var ca,la=t((()=>{C(),ca=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`број`;case`object`:if(Array.isArray(e))return`низа`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,jwt:`JWT`,template_literal:`внес`};return e=>{switch(e.code){case`invalid_type`:return`Грешен внес: се очекува ${e.expected}, примено ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${b(e.values[0])}`:`Грешана опција: се очекува една ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${r[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function ua(){return{localeError:da()}}var da,fa=t((()=>{C(),da=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`nombor`;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},r={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 e=>{switch(e.code){case`invalid_type`:return`Input tidak sah: dijangka ${e.expected}, diterima ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${b(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${r[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${m(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function pa(){return{localeError:ma()}}var ma,ha=t((()=>{C(),ma=()=>{let e={string:{unit:`tekens`},file:{unit:`bytes`},array:{unit:`elementen`},set:{unit:`elementen`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`getal`;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},r={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 e=>{switch(e.code){case`invalid_type`:return`Ongeldige invoer: verwacht ${e.expected}, ontving ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${b(e.values[0])}`:`Ongeldige optie: verwacht één van ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Te lang: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} bevat`:`Te lang: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} bevat`:`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function ga(){return{localeError:_a()}}var _a,va=t((()=>{C(),_a=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`tall`;case`object`:if(Array.isArray(e))return`liste`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Ugyldig input: forventet ${e.expected}, fikk ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${b(e.values[0])}`:`Ugyldig valg: forventet en av ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function ya(){return{localeError:ba()}}var ba,xa=t((()=>{C(),ba=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`numara`;case`object`:if(Array.isArray(e))return`saf`;if(e===null)return`gayb`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Fâsit giren: umulan ${e.expected}, alınan ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${b(e.values[0])}`:`Fâsit tercih: mûteberler ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${r[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function Sa(){return{localeError:Ca()}}var Ca,wa=t((()=>{C(),Ca=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`عدد`;case`object`:if(Array.isArray(e))return`ارې`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`ناسم ورودي: باید ${e.expected} وای, مګر ${n(e.input)} ترلاسه شو`;case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${b(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${m(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${r[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function Ta(){return{localeError:Ea()}}var Ea,Da=t((()=>{C(),Ea=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`liczba`;case`object`:if(Array.isArray(e))return`tablica`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Nieprawidłowe dane wejściowe: oczekiwano ${e.expected}, otrzymano ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${b(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${r[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function Oa(){return{localeError:ka()}}var ka,Aa=t((()=>{C(),ka=()=>{let e={string:{unit:`caracteres`,verb:`ter`},file:{unit:`bytes`,verb:`ter`},array:{unit:`itens`,verb:`ter`},set:{unit:`itens`,verb:`ter`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`número`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`nulo`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Tipo inválido: esperado ${e.expected}, recebido ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperado ${b(e.values[0])}`:`Opção inválida: esperada uma das ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Muito grande: esperado que ${e.origin??`valor`} tivesse ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Muito grande: esperado que ${e.origin??`valor`} fosse ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${r[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Chave${e.keys.length>1?`s`:``} desconhecida${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Chave inválida em ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido em ${e.origin}`;default:return`Campo inválido`}}}}));function ja(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function Ma(){return{localeError:Na()}}var Na,Pa=t((()=>{C(),Na=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`число`;case`object`:if(Array.isArray(e))return`массив`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Неверный ввод: ожидалось ${e.expected}, получено ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${b(e.values[0])}`:`Неверный вариант: ожидалось одно из ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=ja(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=ja(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${r[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function Fa(){return{localeError:Ia()}}var Ia,La=t((()=>{C(),Ia=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`število`;case`object`:if(Array.isArray(e))return`tabela`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Neveljaven vnos: pričakovano ${e.expected}, prejeto ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${b(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${r[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function Ra(){return{localeError:za()}}var za,Ba=t((()=>{C(),za=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`antal`;case`object`:if(Array.isArray(e))return`lista`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Ogiltig inmatning: förväntat ${e.expected}, fick ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${b(e.values[0])}`:`Ogiltigt val: förväntade en av ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function Va(){return{localeError:Ha()}}var Ha,Ua=t((()=>{C(),Ha=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`எண் அல்லாதது`:`எண்`;case`object`:if(Array.isArray(e))return`அணி`;if(e===null)return`வெறுமை`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e.expected}, பெறப்பட்டது ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${b(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${m(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function Wa(){return{localeError:Ga()}}var Ga,Ka=t((()=>{C(),Ga=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`ไม่ใช่ตัวเลข (NaN)`:`ตัวเลข`;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},r={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`};return e=>{switch(e.code){case`invalid_type`:return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e.expected} แต่ได้รับ ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${b(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${m(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function qa(){return{localeError:Ya()}}var Ja,Ya,Xa=t((()=>{C(),Ja=e=>{let 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},Ya=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={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 e=>{switch(e.code){case`invalid_type`:return`Geçersiz değer: beklenen ${e.expected}, alınan ${Ja(e.input)}`;case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${b(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function Za(){return{localeError:Qa()}}var Qa,$a=t((()=>{C(),Qa=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`число`;case`object`:if(Array.isArray(e))return`масив`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,jwt:`JWT`,template_literal:`вхідні дані`};return e=>{switch(e.code){case`invalid_type`:return`Неправильні вхідні дані: очікується ${e.expected}, отримано ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${b(e.values[0])}`:`Неправильна опція: очікується одне з ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${r[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function eo(){return{localeError:to()}}var to,no=t((()=>{C(),to=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`نمبر`;case`object`:if(Array.isArray(e))return`آرے`;if(e===null)return`نل`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`غلط ان پٹ: ${e.expected} متوقع تھا، ${n(e.input)} موصول ہوا`;case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${b(e.values[0])} متوقع تھا`:`غلط آپشن: ${m(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${r[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${m(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function ro(){return{localeError:io()}}var io,ao=t((()=>{C(),io=()=>{let 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(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`số`;case`object`:if(Array.isArray(e))return`mảng`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={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 e=>{switch(e.code){case`invalid_type`:return`Đầu vào không hợp lệ: mong đợi ${e.expected}, nhận được ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${b(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${r[t.format]??e.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 ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${m(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.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 ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function oo(){return{localeError:so()}}var so,co=t((()=>{C(),so=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`非数字(NaN)`:`数字`;case`object`:if(Array.isArray(e))return`数组`;if(e===null)return`空值(null)`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,jwt:`JWT`,template_literal:`输入`};return e=>{switch(e.code){case`invalid_type`:return`无效输入:期望 ${e.expected},实际接收 ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`无效输入:期望 ${b(e.values[0])}`:`无效选项:期望以下之一 ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${r[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function lo(){return{localeError:uo()}}var uo,fo=t((()=>{C(),uo=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n=e=>{let 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},r={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 e=>{switch(e.code){case`invalid_type`:return`無效的輸入值:預期為 ${e.expected},但收到 ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${b(e.values[0])}`:`無效的選項:預期為以下其中之一 ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${r[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${m(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}})),po=r({ar:()=>Qr,az:()=>ti,be:()=>ai,ca:()=>ci,cs:()=>di,de:()=>mi,en:()=>_i,eo:()=>xi,es:()=>Ti,fa:()=>Oi,fi:()=>ji,fr:()=>Pi,frCA:()=>Li,he:()=>Bi,hu:()=>Ui,id:()=>Ki,it:()=>Yi,ja:()=>Qi,kh:()=>ta,ko:()=>ia,mk:()=>sa,ms:()=>ua,nl:()=>pa,no:()=>ga,ota:()=>ya,pl:()=>Ta,ps:()=>Sa,pt:()=>Oa,ru:()=>Ma,sl:()=>Fa,sv:()=>Ra,ta:()=>Va,th:()=>Wa,tr:()=>qa,ua:()=>Za,ur:()=>eo,vi:()=>ro,zhCN:()=>oo,zhTW:()=>lo}),mo=t((()=>{ei(),ri(),si(),ui(),pi(),gi(),bi(),wi(),Di(),Ai(),Ni(),Ii(),zi(),Hi(),Gi(),Ji(),Zi(),ea(),ra(),oa(),la(),fa(),ha(),va(),xa(),wa(),Da(),Aa(),Pa(),La(),Ba(),Ua(),Ka(),Xa(),$a(),no(),ao(),co(),fo()}));function ho(){return new vo}var go,_o,vo,yo,bo=t((()=>{go=Symbol(`ZodOutput`),_o=Symbol(`ZodInput`),vo=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}},yo=ho()}));function xo(e,t){return new e({type:`string`,...y(t)})}function So(e,t){return new e({type:`string`,coerce:!0,...y(t)})}function Co(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...y(t)})}function wo(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...y(t)})}function To(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...y(t)})}function Eo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...y(t)})}function Do(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...y(t)})}function Oo(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...y(t)})}function ko(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...y(t)})}function Ao(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...y(t)})}function jo(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...y(t)})}function Mo(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...y(t)})}function No(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...y(t)})}function Po(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...y(t)})}function Fo(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...y(t)})}function Io(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...y(t)})}function Lo(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...y(t)})}function Ro(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...y(t)})}function zo(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...y(t)})}function Bo(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...y(t)})}function Vo(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...y(t)})}function Ho(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...y(t)})}function Uo(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...y(t)})}function Wo(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...y(t)})}function Go(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...y(t)})}function Ko(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...y(t)})}function qo(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...y(t)})}function Jo(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...y(t)})}function Yo(e,t){return new e({type:`number`,checks:[],...y(t)})}function Xo(e,t){return new e({type:`number`,coerce:!0,checks:[],...y(t)})}function Zo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...y(t)})}function Qo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...y(t)})}function $o(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...y(t)})}function es(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...y(t)})}function ts(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...y(t)})}function ns(e,t){return new e({type:`boolean`,...y(t)})}function rs(e,t){return new e({type:`boolean`,coerce:!0,...y(t)})}function is(e,t){return new e({type:`bigint`,...y(t)})}function as(e,t){return new e({type:`bigint`,coerce:!0,...y(t)})}function os(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...y(t)})}function ss(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...y(t)})}function cs(e,t){return new e({type:`symbol`,...y(t)})}function ls(e,t){return new e({type:`undefined`,...y(t)})}function us(e,t){return new e({type:`null`,...y(t)})}function ds(e){return new e({type:`any`})}function fs(e){return new e({type:`unknown`})}function ps(e,t){return new e({type:`never`,...y(t)})}function ms(e,t){return new e({type:`void`,...y(t)})}function hs(e,t){return new e({type:`date`,...y(t)})}function gs(e,t){return new e({type:`date`,coerce:!0,...y(t)})}function _s(e,t){return new e({type:`nan`,...y(t)})}function vs(e,t){return new Xt({check:`less_than`,...y(t),value:e,inclusive:!1})}function D(e,t){return new Xt({check:`less_than`,...y(t),value:e,inclusive:!0})}function ys(e,t){return new Zt({check:`greater_than`,...y(t),value:e,inclusive:!1})}function O(e,t){return new Zt({check:`greater_than`,...y(t),value:e,inclusive:!0})}function bs(e){return ys(0,e)}function xs(e){return vs(0,e)}function Ss(e){return D(0,e)}function Cs(e){return O(0,e)}function ws(e,t){return new Qt({check:`multiple_of`,...y(t),value:e})}function Ts(e,t){return new tn({check:`max_size`,...y(t),maximum:e})}function Es(e,t){return new nn({check:`min_size`,...y(t),minimum:e})}function Ds(e,t){return new rn({check:`size_equals`,...y(t),size:e})}function Os(e,t){return new an({check:`max_length`,...y(t),maximum:e})}function ks(e,t){return new on({check:`min_length`,...y(t),minimum:e})}function As(e,t){return new sn({check:`length_equals`,...y(t),length:e})}function js(e,t){return new ln({check:`string_format`,format:`regex`,...y(t),pattern:e})}function Ms(e){return new un({check:`string_format`,format:`lowercase`,...y(e)})}function Ns(e){return new dn({check:`string_format`,format:`uppercase`,...y(e)})}function Ps(e,t){return new fn({check:`string_format`,format:`includes`,...y(t),includes:e})}function Fs(e,t){return new pn({check:`string_format`,format:`starts_with`,...y(t),prefix:e})}function Is(e,t){return new mn({check:`string_format`,format:`ends_with`,...y(t),suffix:e})}function Ls(e,t,n){return new hn({check:`property`,property:e,schema:t,...y(n)})}function Rs(e,t){return new gn({check:`mime_type`,mime:e,...y(t)})}function zs(e){return new _n({check:`overwrite`,tx:e})}function Bs(e){return zs(t=>t.normalize(e))}function Vs(){return zs(e=>e.trim())}function Hs(){return zs(e=>e.toLowerCase())}function Us(){return zs(e=>e.toUpperCase())}function Ws(e,t,n){return new e({type:`array`,element:t,...y(n)})}function Gs(e,t,n){return new e({type:`union`,options:t,...y(n)})}function Ks(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...y(r)})}function qs(e,t,n){return new e({type:`intersection`,left:t,right:n})}function Js(e,t,n,r){let i=n instanceof T;return new e({type:`tuple`,items:t,rest:i?n:null,...y(i?r:n)})}function Ys(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...y(r)})}function Xs(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...y(r)})}function Zs(e,t,n){return new e({type:`set`,valueType:t,...y(n)})}function Qs(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...y(n)})}function $s(e,t,n){return new e({type:`enum`,entries:t,...y(n)})}function ec(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...y(n)})}function tc(e,t){return new e({type:`file`,...y(t)})}function nc(e,t){return new e({type:`transform`,transform:t})}function rc(e,t){return new e({type:`optional`,innerType:t})}function ic(e,t){return new e({type:`nullable`,innerType:t})}function ac(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():n}})}function oc(e,t,n){return new e({type:`nonoptional`,innerType:t,...y(n)})}function sc(e,t){return new e({type:`success`,innerType:t})}function cc(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:()=>n})}function lc(e,t,n){return new e({type:`pipe`,in:t,out:n})}function uc(e,t){return new e({type:`readonly`,innerType:t})}function dc(e,t,n){return new e({type:`template_literal`,parts:t,...y(n)})}function fc(e,t){return new e({type:`lazy`,getter:t})}function pc(e,t){return new e({type:`promise`,innerType:t})}function mc(e,t,n){let r=y(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function hc(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...y(n)})}function gc(e,t){let n=y(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Pipe??Gr,c=e.Boolean??pr,l=e.String??Bn,u=new(e.Transform??Ir)({type:`transform`,transform:(e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:u}),{})},error:n.error});return new s({type:`pipe`,in:new s({type:`pipe`,in:new l({type:`string`,error:n.error}),out:u,error:n.error}),out:new c({type:`boolean`,error:n.error}),error:n.error})}function _c(e,t,n,r={}){let i=y(r),a={...y(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var vc,yc=t((()=>{vn(),Zr(),C(),vc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function bc(e){return new xc({type:`function`,input:Array.isArray(e?.input)?Js(kr,e?.input):e?.input??Ws(wr,fs(br)),output:e?.output??fs(br)})}var xc,Sc=t((()=>{yc(),nt(),Zr(),xc=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!=`function`)throw Error(`implement() must be called with a function`);let t=((...n)=>{let r=this._def.input?Ye(this._def.input,n,void 0,{callee:t}):n;if(!Array.isArray(r))throw Error(`Invalid arguments schema: not an array or tuple schema.`);let i=e(...r);return this._def.output?Ye(this._def.output,i,void 0,{callee:t}):i});return t}implementAsync(e){if(typeof e!=`function`)throw Error(`implement() must be called with a function`);let t=(async(...n)=>{let r=this._def.input?await Ze(this._def.input,n,void 0,{callee:t}):n;if(!Array.isArray(r))throw Error(`Invalid arguments schema: not an array or tuple schema.`);let i=await e(...r);return this._def.output?Ze(this._def.output,i,void 0,{callee:t}):i});return t}input(...e){let t=this.constructor;return Array.isArray(e[0])?new t({type:`function`,input:new kr({type:`tuple`,items:e[0],rest:e[1]}),output:this._def.output}):new t({type:`function`,input:e[0],output:this._def.output})}output(e){let t=this.constructor;return new t({type:`function`,input:this._def.input,output:e})}}}));function Cc(e,t){if(e instanceof vo){let n=new wc(t),r={};for(let t of e._idmap.entries()){let[e,r]=t;n.process(r)}let i={},a={registry:e,uri:t?.uri,defs:r};for(let r of e._idmap.entries()){let[e,o]=r;i[e]=n.emit(o,{...t,external:a})}return Object.keys(r).length>0&&(i.__shared={[n.target===`draft-2020-12`?`$defs`:`definitions`]:r}),{schemas:i}}let n=new wc(t);return n.process(e),n.emit(e,t)}function k(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;switch(r.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 k(r.element,n);case`object`:for(let e in r.shape)if(k(r.shape[e],n))return!0;return!1;case`union`:for(let e of r.options)if(k(e,n))return!0;return!1;case`intersection`:return k(r.left,n)||k(r.right,n);case`tuple`:for(let e of r.items)if(k(e,n))return!0;return!!(r.rest&&k(r.rest,n));case`record`:return k(r.keyType,n)||k(r.valueType,n);case`map`:return k(r.keyType,n)||k(r.valueType,n);case`set`:return k(r.valueType,n);case`promise`:case`optional`:case`nonoptional`:case`nullable`:case`readonly`:return k(r.innerType,n);case`lazy`:return k(r.getter(),n);case`default`:return k(r.innerType,n);case`prefault`:return k(r.innerType,n);case`custom`:return!1;case`transform`:return!0;case`pipe`:return k(r.in,n)||k(r.out,n);case`success`:return!1;case`catch`:return!1}throw Error(`Unknown schema type: ${r.type}`)}var wc,Tc=t((()=>{bo(),C(),wc=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??yo,this.target=e?.target??`draft-2020-12`,this.unrepresentable=e?.unrepresentable??`throw`,this.override=e?.override??(()=>{}),this.io=e?.io??`output`,this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var n;let r=e._zod.def,i={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},a=this.seen.get(e);if(a)return a.count++,t.schemaPath.includes(e)&&(a.cycle=t.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let n={...t,schemaPath:[...t.schemaPath,e],path:t.path},a=e._zod.parent;if(a)o.ref=a,this.process(a,n),this.seen.get(a).isParent=!0;else{let t=o.schema;switch(r.type){case`string`:{let n=t;n.type=`string`;let{minimum:r,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof r==`number`&&(n.minLength=r),typeof a==`number`&&(n.maxLength=a),s&&(n.format=i[s]??s,n.format===``&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?n.pattern=e[0].source:e.length>1&&(o.schema.allOf=[...e.map(e=>({...this.target===`draft-7`?{type:`string`}:{},pattern:e.source}))])}break}case`number`:{let n=t,{minimum:r,maximum:i,format:a,multipleOf:o,exclusiveMaximum:s,exclusiveMinimum:c}=e._zod.bag;n.type=typeof a==`string`&&a.includes(`int`)?`integer`:`number`,typeof c==`number`&&(n.exclusiveMinimum=c),typeof r==`number`&&(n.minimum=r,typeof c==`number`&&(c>=r?delete n.minimum:delete n.exclusiveMinimum)),typeof s==`number`&&(n.exclusiveMaximum=s),typeof i==`number`&&(n.maximum=i,typeof s==`number`&&(s<=i?delete n.maximum:delete n.exclusiveMaximum)),typeof o==`number`&&(n.multipleOf=o);break}case`boolean`:{let e=t;e.type=`boolean`;break}case`bigint`:if(this.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`);break;case`symbol`:if(this.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`);break;case`null`:t.type=`null`;break;case`any`:break;case`unknown`:break;case`undefined`:if(this.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`);break;case`void`:if(this.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`);break;case`never`:t.not={};break;case`date`:if(this.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`);break;case`array`:{let i=t,{minimum:a,maximum:o}=e._zod.bag;typeof a==`number`&&(i.minItems=a),typeof o==`number`&&(i.maxItems=o),i.type=`array`,i.items=this.process(r.element,{...n,path:[...n.path,`items`]});break}case`object`:{let e=t;e.type=`object`,e.properties={};let i=r.shape;for(let t in i)e.properties[t]=this.process(i[t],{...n,path:[...n.path,`properties`,t]});let a=new Set(Object.keys(i)),o=new Set([...a].filter(e=>{let t=r.shape[e]._zod;return this.io===`input`?t.optin===void 0:t.optout===void 0}));o.size>0&&(e.required=Array.from(o)),r.catchall?._zod.def.type===`never`?e.additionalProperties=!1:r.catchall?r.catchall&&(e.additionalProperties=this.process(r.catchall,{...n,path:[...n.path,`additionalProperties`]})):this.io===`output`&&(e.additionalProperties=!1);break}case`union`:{let e=t;e.anyOf=r.options.map((e,t)=>this.process(e,{...n,path:[...n.path,`anyOf`,t]}));break}case`intersection`:{let e=t,i=this.process(r.left,{...n,path:[...n.path,`allOf`,0]}),a=this.process(r.right,{...n,path:[...n.path,`allOf`,1]}),o=e=>`allOf`in e&&Object.keys(e).length===1;e.allOf=[...o(i)?i.allOf:[i],...o(a)?a.allOf:[a]];break}case`tuple`:{let i=t;i.type=`array`;let a=r.items.map((e,t)=>this.process(e,{...n,path:[...n.path,`prefixItems`,t]}));if(this.target===`draft-2020-12`?i.prefixItems=a:i.items=a,r.rest){let e=this.process(r.rest,{...n,path:[...n.path,`items`]});this.target===`draft-2020-12`?i.items=e:i.additionalItems=e}r.rest&&(i.items=this.process(r.rest,{...n,path:[...n.path,`items`]}));let{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s);break}case`record`:{let e=t;e.type=`object`,e.propertyNames=this.process(r.keyType,{...n,path:[...n.path,`propertyNames`]}),e.additionalProperties=this.process(r.valueType,{...n,path:[...n.path,`additionalProperties`]});break}case`map`:if(this.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`);break;case`set`:if(this.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`);break;case`enum`:{let e=t,n=ie(r.entries);n.every(e=>typeof e==`number`)&&(e.type=`number`),n.every(e=>typeof e==`string`)&&(e.type=`string`),e.enum=n;break}case`literal`:{let e=t,n=[];for(let e of r.values)if(e===void 0){if(this.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(this.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);n.push(Number(e))}else n.push(e);if(n.length!==0){if(n.length===1){let t=n[0];e.type=t===null?`null`:typeof t,e.const=t}else n.every(e=>typeof e==`number`)&&(e.type=`number`),n.every(e=>typeof e==`string`)&&(e.type=`string`),n.every(e=>typeof e==`boolean`)&&(e.type=`string`),n.every(e=>e===null)&&(e.type=`null`),e.enum=n}break}case`file`:{let n=t,r={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:i,maximum:a,mime:o}=e._zod.bag;i!==void 0&&(r.minLength=i),a!==void 0&&(r.maxLength=a),o?o.length===1?(r.contentMediaType=o[0],Object.assign(n,r)):n.anyOf=o.map(e=>({...r,contentMediaType:e})):Object.assign(n,r);break}case`transform`:if(this.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`);break;case`nullable`:t.anyOf=[this.process(r.innerType,n),{type:`null`}];break;case`nonoptional`:this.process(r.innerType,n),o.ref=r.innerType;break;case`success`:{let e=t;e.type=`boolean`;break}case`default`:this.process(r.innerType,n),o.ref=r.innerType,t.default=JSON.parse(JSON.stringify(r.defaultValue));break;case`prefault`:this.process(r.innerType,n),o.ref=r.innerType,this.io===`input`&&(t._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break;case`catch`:{this.process(r.innerType,n),o.ref=r.innerType;let e;try{e=r.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}t.default=e;break}case`nan`:if(this.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`);break;case`template_literal`:{let n=t,r=e._zod.pattern;if(!r)throw Error(`Pattern not found in template literal`);n.type=`string`,n.pattern=r.source;break}case`pipe`:{let e=this.io===`input`?r.in._zod.def.type===`transform`?r.out:r.in:r.out;this.process(e,n),o.ref=e;break}case`readonly`:this.process(r.innerType,n),o.ref=r.innerType,t.readOnly=!0;break;case`promise`:this.process(r.innerType,n),o.ref=r.innerType;break;case`optional`:this.process(r.innerType,n),o.ref=r.innerType;break;case`lazy`:{let t=e._zod.innerType;this.process(t,n),o.ref=t;break}case`custom`:if(this.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)}}}let c=this.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),this.io===`input`&&k(e)&&(delete o.schema.examples,delete o.schema.default),this.io===`input`&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(e).schema}emit(e,t){let n={cycles:t?.cycles??`ref`,reused:t?.reused??`inline`,external:t?.external??void 0},r=this.seen.get(e);if(!r)throw Error(`Unprocessed schema. This is a bug in Zod.`);let i=e=>{let t=this.target===`draft-2020-12`?`$defs`:`definitions`;if(n.external){let r=n.external.registry.get(e[0])?.id,i=n.external.uri??(e=>e);if(r)return{ref:i(r)};let a=e[1].defId??e[1].schema.id??`schema${this.counter++}`;return e[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${t}/${a}`}}if(e[1]===r)return{ref:`#`};let i=`#/${t}/`,a=e[1].schema.id??`__schema${this.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(n.cycles===`throw`)for(let e of this.seen.entries()){let t=e[1];if(t.cycle)throw Error(`Cycle detected: #/${t.cycle?.join(`/`)}/<root>
|
|
328
275
|
|
|
329
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let t of this.seen.entries()){let r=t[1];if(e===t[0]){a(t);continue}if(n.external){let r=n.external.registry.get(t[0])?.id;if(e!==t[0]&&r){a(t);continue}}if(this.metadataRegistry.get(t[0])?.id){a(t);continue}if(r.cycle){a(t);continue}if(r.count>1&&n.reused===`ref`){a(t);continue}}let o=(e,t)=>{let n=this.seen.get(e),r=n.def??n.schema,i={...r};if(n.ref===null)return;let a=n.ref;if(n.ref=null,a){o(a,t);let e=this.seen.get(a).schema;e.$ref&&t.target===`draft-7`?(r.allOf=r.allOf??[],r.allOf.push(e)):(Object.assign(r,e),Object.assign(r,i))}n.isParent||this.override({zodSchema:e,jsonSchema:r,path:n.path??[]})};for(let e of[...this.seen.entries()].reverse())o(e[0],{target:this.target});let s={};if(this.target===`draft-2020-12`?s.$schema=`https://json-schema.org/draft/2020-12/schema`:this.target===`draft-7`?s.$schema=`http://json-schema.org/draft-07/schema#`:console.warn(`Invalid target: ${this.target}`),n.external?.uri){let t=n.external.registry.get(e)?.id;if(!t)throw Error("Schema is missing an `id` property");s.$id=n.external.uri(t)}Object.assign(s,r.def);let c=n.external?.defs??{};for(let e of this.seen.entries()){let t=e[1];t.def&&t.defId&&(c[t.defId]=t.def)}n.external||Object.keys(c).length>0&&(this.target===`draft-2020-12`?s.$defs=c:s.definitions=c);try{return JSON.parse(JSON.stringify(s))}catch{throw Error(`Error converting schema to JSON.`)}}}})),Tc=r({}),Ec=t((()=>{})),Dc=r({$ZodAny:()=>vr,$ZodArray:()=>Cr,$ZodAsyncError:()=>l,$ZodBase64:()=>ar,$ZodBase64URL:()=>or,$ZodBigInt:()=>pr,$ZodBigIntFormat:()=>mr,$ZodBoolean:()=>fr,$ZodCIDRv4:()=>rr,$ZodCIDRv6:()=>ir,$ZodCUID:()=>Kn,$ZodCUID2:()=>qn,$ZodCatch:()=>Hr,$ZodCheck:()=>T,$ZodCheckBigIntFormat:()=>$t,$ZodCheckEndsWith:()=>pn,$ZodCheckGreaterThan:()=>Xt,$ZodCheckIncludes:()=>dn,$ZodCheckLengthEquals:()=>on,$ZodCheckLessThan:()=>Yt,$ZodCheckLowerCase:()=>ln,$ZodCheckMaxLength:()=>rn,$ZodCheckMaxSize:()=>en,$ZodCheckMimeType:()=>hn,$ZodCheckMinLength:()=>an,$ZodCheckMinSize:()=>tn,$ZodCheckMultipleOf:()=>Zt,$ZodCheckNumberFormat:()=>Qt,$ZodCheckOverwrite:()=>gn,$ZodCheckProperty:()=>mn,$ZodCheckRegex:()=>cn,$ZodCheckSizeEquals:()=>nn,$ZodCheckStartsWith:()=>fn,$ZodCheckStringFormat:()=>sn,$ZodCheckUpperCase:()=>un,$ZodCustom:()=>Yr,$ZodCustomStringFormat:()=>lr,$ZodDate:()=>Sr,$ZodDefault:()=>Rr,$ZodDiscriminatedUnion:()=>Er,$ZodE164:()=>sr,$ZodEmail:()=>Hn,$ZodEmoji:()=>Wn,$ZodEnum:()=>Mr,$ZodError:()=>We,$ZodFile:()=>Pr,$ZodFunction:()=>bc,$ZodGUID:()=>Bn,$ZodIPv4:()=>tr,$ZodIPv6:()=>nr,$ZodISODate:()=>Qn,$ZodISODateTime:()=>Zn,$ZodISODuration:()=>er,$ZodISOTime:()=>$n,$ZodIntersection:()=>Dr,$ZodJWT:()=>cr,$ZodKSUID:()=>Xn,$ZodLazy:()=>Jr,$ZodLiteral:()=>Nr,$ZodMap:()=>Ar,$ZodNaN:()=>Ur,$ZodNanoID:()=>Gn,$ZodNever:()=>br,$ZodNonOptional:()=>Br,$ZodNull:()=>_r,$ZodNullable:()=>Lr,$ZodNumber:()=>ur,$ZodNumberFormat:()=>dr,$ZodObject:()=>wr,$ZodOptional:()=>Ir,$ZodPipe:()=>Wr,$ZodPrefault:()=>zr,$ZodPromise:()=>qr,$ZodReadonly:()=>Gr,$ZodRealError:()=>Ge,$ZodRecord:()=>kr,$ZodRegistry:()=>_o,$ZodSet:()=>jr,$ZodString:()=>zn,$ZodStringFormat:()=>D,$ZodSuccess:()=>Vr,$ZodSymbol:()=>hr,$ZodTemplateLiteral:()=>Kr,$ZodTransform:()=>Fr,$ZodTuple:()=>Or,$ZodType:()=>E,$ZodULID:()=>Jn,$ZodURL:()=>Un,$ZodUUID:()=>Vn,$ZodUndefined:()=>gr,$ZodUnion:()=>Tr,$ZodUnknown:()=>yr,$ZodVoid:()=>xr,$ZodXID:()=>Yn,$brand:()=>c,$constructor:()=>a,$input:()=>go,$output:()=>ho,Doc:()=>vn,JSONSchema:()=>Tc,JSONSchemaGenerator:()=>Cc,NEVER:()=>s,TimePrecision:()=>_c,_any:()=>us,_array:()=>Us,_base64:()=>Bo,_base64url:()=>Vo,_bigint:()=>rs,_boolean:()=>ts,_catch:()=>sc,_cidrv4:()=>Ro,_cidrv6:()=>zo,_coercedBigint:()=>is,_coercedBoolean:()=>ns,_coercedDate:()=>hs,_coercedNumber:()=>Yo,_coercedString:()=>xo,_cuid:()=>jo,_cuid2:()=>Mo,_custom:()=>pc,_date:()=>ms,_default:()=>ic,_discriminatedUnion:()=>Gs,_e164:()=>Ho,_email:()=>So,_emoji:()=>ko,_endsWith:()=>Fs,_enum:()=>Zs,_file:()=>ec,_float32:()=>Zo,_float64:()=>Qo,_gt:()=>vs,_gte:()=>k,_guid:()=>Co,_includes:()=>Ns,_int:()=>Xo,_int32:()=>$o,_int64:()=>as,_intersection:()=>Ks,_ipv4:()=>Io,_ipv6:()=>Lo,_isoDate:()=>Go,_isoDateTime:()=>Wo,_isoDuration:()=>qo,_isoTime:()=>Ko,_jwt:()=>Uo,_ksuid:()=>Fo,_lazy:()=>dc,_length:()=>ks,_literal:()=>$s,_lowercase:()=>js,_lt:()=>_s,_lte:()=>O,_map:()=>Ys,_max:()=>O,_maxLength:()=>Ds,_maxSize:()=>ws,_mime:()=>Ls,_min:()=>k,_minLength:()=>Os,_minSize:()=>Ts,_multipleOf:()=>Cs,_nan:()=>gs,_nanoid:()=>Ao,_nativeEnum:()=>Qs,_negative:()=>bs,_never:()=>fs,_nonnegative:()=>Ss,_nonoptional:()=>ac,_nonpositive:()=>xs,_normalize:()=>zs,_null:()=>ls,_nullable:()=>rc,_number:()=>Jo,_optional:()=>nc,_overwrite:()=>Rs,_parse:()=>qe,_parseAsync:()=>Ye,_pipe:()=>cc,_positive:()=>ys,_promise:()=>fc,_property:()=>Is,_readonly:()=>lc,_record:()=>Js,_refine:()=>mc,_regex:()=>As,_safeParse:()=>Ze,_safeParseAsync:()=>$e,_set:()=>Xs,_size:()=>Es,_startsWith:()=>Ps,_string:()=>bo,_stringFormat:()=>gc,_stringbool:()=>hc,_success:()=>oc,_symbol:()=>ss,_templateLiteral:()=>uc,_toLowerCase:()=>Vs,_toUpperCase:()=>Hs,_transform:()=>tc,_trim:()=>Bs,_tuple:()=>qs,_uint32:()=>es,_uint64:()=>os,_ulid:()=>No,_undefined:()=>cs,_union:()=>Ws,_unknown:()=>ds,_uppercase:()=>Ms,_url:()=>Oo,_uuid:()=>wo,_uuidv4:()=>To,_uuidv6:()=>Eo,_uuidv7:()=>Do,_void:()=>ps,_xid:()=>Po,clone:()=>he,config:()=>o,flattenError:()=>Re,formatError:()=>ze,function:()=>yc,globalConfig:()=>u,globalRegistry:()=>vo,isValidBase64:()=>Sn,isValidBase64URL:()=>Cn,isValidJWT:()=>wn,locales:()=>fo,parse:()=>Je,parseAsync:()=>Xe,prettifyError:()=>He,regexes:()=>nt,registry:()=>mo,safeParse:()=>Qe,safeParseAsync:()=>et,toDotPath:()=>Ve,toJSONSchema:()=>Sc,treeifyError:()=>Be,util:()=>f,version:()=>bn}),Oc=t((()=>{d(),tt(),Ke(),Xr(),_n(),xn(),w(),Kt(),po(),yo(),yn(),xc(),vc(),wc(),Ec()})),kc=t((()=>{Oc()})),Ac=t((()=>{})),jc=t((()=>{Oc()})),Mc=t((()=>{Oc(),kc(),Ac(),jc(),po(),Ac()})),Nc=t((()=>{Mc()})),Pc=t((()=>{Nc()}));function Fc(e){return!!e._zod}function Ic(e,t){return Fc(e)?Qe(e,t):e.safeParse(t)}function Lc(e){if(!e)return;let t;if(t=Fc(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Rc(e){if(Fc(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var zc=t((()=>{Pc()})),Bc=t((()=>{Oc()})),Vc=r({ZodISODate:()=>qc,ZodISODateTime:()=>Kc,ZodISODuration:()=>Yc,ZodISOTime:()=>Jc,date:()=>Uc,datetime:()=>Hc,duration:()=>Gc,time:()=>Wc});function Hc(e){return Wo(Kc,e)}function Uc(e){return Go(qc,e)}function Wc(e){return Ko(Jc,e)}function Gc(e){return qo(Yc,e)}var Kc,qc,Jc,Yc,Xc=t((()=>{Oc(),Ad(),Kc=a(`ZodISODateTime`,(e,t)=>{Zn.init(e,t),W.init(e,t)}),qc=a(`ZodISODate`,(e,t)=>{Qn.init(e,t),W.init(e,t)}),Jc=a(`ZodISOTime`,(e,t)=>{$n.init(e,t),W.init(e,t)}),Yc=a(`ZodISODuration`,(e,t)=>{er.init(e,t),W.init(e,t)})})),Zc,Qc,$c,el=t((()=>{Oc(),Zc=(e,t)=>{We.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ze(e,t)},flatten:{value:t=>Re(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},Qc=a(`ZodError`,Zc),$c=a(`ZodError`,Zc,{Parent:Error})})),tl,nl,rl,il,al=t((()=>{Oc(),el(),tl=qe($c),nl=Ye($c),rl=Ze($c),il=$e($c)}));function j(e){return bo(Su,e)}function ol(e){return So(Cu,e)}function sl(e){return Co(wu,e)}function cl(e){return wo(Tu,e)}function ll(e){return To(Tu,e)}function ul(e){return Eo(Tu,e)}function dl(e){return Do(Tu,e)}function fl(e){return Oo(Eu,e)}function pl(e){return ko(Du,e)}function ml(e){return Ao(Ou,e)}function hl(e){return jo(ku,e)}function gl(e){return Mo(Au,e)}function _l(e){return No(ju,e)}function vl(e){return Po(Mu,e)}function yl(e){return Fo(Nu,e)}function bl(e){return Io(Pu,e)}function xl(e){return Lo(Fu,e)}function Sl(e){return Ro(Iu,e)}function Cl(e){return zo(Lu,e)}function wl(e){return Bo(Ru,e)}function Tl(e){return Vo(zu,e)}function El(e){return Ho(Bu,e)}function Dl(e){return Uo(Vu,e)}function Ol(e,t,n={}){return gc(Hu,e,t,n)}function M(e){return Jo(Uu,e)}function kl(e){return Xo(Wu,e)}function Al(e){return Zo(Wu,e)}function jl(e){return Qo(Wu,e)}function Ml(e){return $o(Wu,e)}function Nl(e){return es(Wu,e)}function N(e){return ts(Gu,e)}function Pl(e){return rs(Ku,e)}function Fl(e){return as(qu,e)}function Il(e){return os(qu,e)}function Ll(e){return ss(Ju,e)}function Rl(e){return cs(Yu,e)}function zl(e){return ls(Xu,e)}function Bl(){return us(Zu)}function P(){return ds(Qu)}function Vl(e){return fs($u,e)}function Hl(e){return ps(ed,e)}function Ul(e){return ms(td,e)}function F(e,t){return Us(nd,e,t)}function Wl(e){let t=e._zod.def.shape;return V(Object.keys(t))}function I(e,t){let n={type:`object`,get shape(){return _(this,`shape`,{...e}),this.shape},...b(t)};return new rd(n)}function Gl(e,t){return new rd({type:`object`,get shape(){return _(this,`shape`,{...e}),this.shape},catchall:Vl(),...b(t)})}function L(e,t){return new rd({type:`object`,get shape(){return _(this,`shape`,{...e}),this.shape},catchall:P(),...b(t)})}function R(e,t){return new id({type:`union`,options:e,...b(t)})}function Kl(e,t,n){return new ad({type:`union`,options:t,discriminator:e,...b(n)})}function ql(e,t){return new od({type:`intersection`,left:e,right:t})}function Jl(e,t,n){let r=t instanceof E;return new sd({type:`tuple`,items:e,rest:r?t:null,...b(r?n:t)})}function z(e,t,n){return new cd({type:`record`,keyType:e,valueType:t,...b(n)})}function Yl(e,t,n){return new cd({type:`record`,keyType:R([e,Vl()]),valueType:t,...b(n)})}function Xl(e,t,n){return new ld({type:`map`,keyType:e,valueType:t,...b(n)})}function Zl(e,t){return new ud({type:`set`,valueType:e,...b(t)})}function B(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new dd({type:`enum`,entries:n,...b(t)})}function Ql(e,t){return new dd({type:`enum`,entries:e,...b(t)})}function V(e,t){return new fd({type:`literal`,values:Array.isArray(e)?e:[e],...b(t)})}function $l(e){return ec(pd,e)}function eu(e){return new md({type:`transform`,transform:e})}function H(e){return new hd({type:`optional`,innerType:e})}function tu(e){return new gd({type:`nullable`,innerType:e})}function nu(e){return H(tu(e))}function ru(e,t){return new _d({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}function iu(e,t){return new vd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}function au(e,t){return new yd({type:`nonoptional`,innerType:e,...b(t)})}function ou(e){return new bd({type:`success`,innerType:e})}function su(e,t){return new xd({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function cu(e){return gs(Sd,e)}function lu(e,t){return new Cd({type:`pipe`,in:e,out:t})}function uu(e){return new wd({type:`readonly`,innerType:e})}function du(e,t){return new Td({type:`template_literal`,parts:e,...b(t)})}function fu(e){return new Ed({type:`lazy`,getter:e})}function pu(e){return new Dd({type:`promise`,innerType:e})}function mu(e){let t=new T({check:`custom`});return t._zod.check=e,t}function hu(e,t){return pc(Od,e??(()=>!0),t)}function gu(e,t={}){return mc(Od,e,t)}function _u(e){let t=mu(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Oe(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Oe(r))}},e(n.value,n)));return t}function vu(e,t={error:`Input not instance of ${e.name}`}){let n=new Od({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...b(t)});return n._zod.bag.Class=e,n}function yu(e){let t=fu(()=>R([j(e),M(),N(),zl(),F(t),z(j(),t)]));return t}function bu(e,t){return lu(eu(e),t)}var U,xu,Su,W,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,Qu,$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd,Ad=t((()=>{Oc(),Bc(),Xc(),al(),U=a(`ZodType`,(e,t)=>(E.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),e.clone=(t,n)=>he(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>tl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>rl(e,t,n),e.parseAsync=async(t,n)=>nl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>il(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(gu(t,n)),e.superRefine=t=>e.check(_u(t)),e.overwrite=t=>e.check(Rs(t)),e.optional=()=>H(e),e.nullable=()=>tu(e),e.nullish=()=>H(tu(e)),e.nonoptional=t=>au(e,t),e.array=()=>F(e),e.or=t=>R([e,t]),e.and=t=>ql(e,t),e.transform=t=>lu(e,eu(t)),e.default=t=>ru(e,t),e.prefault=t=>iu(e,t),e.catch=t=>su(e,t),e.pipe=t=>lu(e,t),e.readonly=()=>uu(e),e.describe=t=>{let n=e.clone();return vo.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return vo.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return vo.get(e);let n=e.clone();return vo.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),xu=a(`_ZodString`,(e,t)=>{zn.init(e,t),U.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(As(...t)),e.includes=(...t)=>e.check(Ns(...t)),e.startsWith=(...t)=>e.check(Ps(...t)),e.endsWith=(...t)=>e.check(Fs(...t)),e.min=(...t)=>e.check(Os(...t)),e.max=(...t)=>e.check(Ds(...t)),e.length=(...t)=>e.check(ks(...t)),e.nonempty=(...t)=>e.check(Os(1,...t)),e.lowercase=t=>e.check(js(t)),e.uppercase=t=>e.check(Ms(t)),e.trim=()=>e.check(Bs()),e.normalize=(...t)=>e.check(zs(...t)),e.toLowerCase=()=>e.check(Vs()),e.toUpperCase=()=>e.check(Hs())}),Su=a(`ZodString`,(e,t)=>{zn.init(e,t),xu.init(e,t),e.email=t=>e.check(So(Cu,t)),e.url=t=>e.check(Oo(Eu,t)),e.jwt=t=>e.check(Uo(Vu,t)),e.emoji=t=>e.check(ko(Du,t)),e.guid=t=>e.check(Co(wu,t)),e.uuid=t=>e.check(wo(Tu,t)),e.uuidv4=t=>e.check(To(Tu,t)),e.uuidv6=t=>e.check(Eo(Tu,t)),e.uuidv7=t=>e.check(Do(Tu,t)),e.nanoid=t=>e.check(Ao(Ou,t)),e.guid=t=>e.check(Co(wu,t)),e.cuid=t=>e.check(jo(ku,t)),e.cuid2=t=>e.check(Mo(Au,t)),e.ulid=t=>e.check(No(ju,t)),e.base64=t=>e.check(Bo(Ru,t)),e.base64url=t=>e.check(Vo(zu,t)),e.xid=t=>e.check(Po(Mu,t)),e.ksuid=t=>e.check(Fo(Nu,t)),e.ipv4=t=>e.check(Io(Pu,t)),e.ipv6=t=>e.check(Lo(Fu,t)),e.cidrv4=t=>e.check(Ro(Iu,t)),e.cidrv6=t=>e.check(zo(Lu,t)),e.e164=t=>e.check(Ho(Bu,t)),e.datetime=t=>e.check(Hc(t)),e.date=t=>e.check(Uc(t)),e.time=t=>e.check(Wc(t)),e.duration=t=>e.check(Gc(t))}),W=a(`ZodStringFormat`,(e,t)=>{D.init(e,t),xu.init(e,t)}),Cu=a(`ZodEmail`,(e,t)=>{Hn.init(e,t),W.init(e,t)}),wu=a(`ZodGUID`,(e,t)=>{Bn.init(e,t),W.init(e,t)}),Tu=a(`ZodUUID`,(e,t)=>{Vn.init(e,t),W.init(e,t)}),Eu=a(`ZodURL`,(e,t)=>{Un.init(e,t),W.init(e,t)}),Du=a(`ZodEmoji`,(e,t)=>{Wn.init(e,t),W.init(e,t)}),Ou=a(`ZodNanoID`,(e,t)=>{Gn.init(e,t),W.init(e,t)}),ku=a(`ZodCUID`,(e,t)=>{Kn.init(e,t),W.init(e,t)}),Au=a(`ZodCUID2`,(e,t)=>{qn.init(e,t),W.init(e,t)}),ju=a(`ZodULID`,(e,t)=>{Jn.init(e,t),W.init(e,t)}),Mu=a(`ZodXID`,(e,t)=>{Yn.init(e,t),W.init(e,t)}),Nu=a(`ZodKSUID`,(e,t)=>{Xn.init(e,t),W.init(e,t)}),Pu=a(`ZodIPv4`,(e,t)=>{tr.init(e,t),W.init(e,t)}),Fu=a(`ZodIPv6`,(e,t)=>{nr.init(e,t),W.init(e,t)}),Iu=a(`ZodCIDRv4`,(e,t)=>{rr.init(e,t),W.init(e,t)}),Lu=a(`ZodCIDRv6`,(e,t)=>{ir.init(e,t),W.init(e,t)}),Ru=a(`ZodBase64`,(e,t)=>{ar.init(e,t),W.init(e,t)}),zu=a(`ZodBase64URL`,(e,t)=>{or.init(e,t),W.init(e,t)}),Bu=a(`ZodE164`,(e,t)=>{sr.init(e,t),W.init(e,t)}),Vu=a(`ZodJWT`,(e,t)=>{cr.init(e,t),W.init(e,t)}),Hu=a(`ZodCustomStringFormat`,(e,t)=>{lr.init(e,t),W.init(e,t)}),Uu=a(`ZodNumber`,(e,t)=>{ur.init(e,t),U.init(e,t),e.gt=(t,n)=>e.check(vs(t,n)),e.gte=(t,n)=>e.check(k(t,n)),e.min=(t,n)=>e.check(k(t,n)),e.lt=(t,n)=>e.check(_s(t,n)),e.lte=(t,n)=>e.check(O(t,n)),e.max=(t,n)=>e.check(O(t,n)),e.int=t=>e.check(kl(t)),e.safe=t=>e.check(kl(t)),e.positive=t=>e.check(vs(0,t)),e.nonnegative=t=>e.check(k(0,t)),e.negative=t=>e.check(_s(0,t)),e.nonpositive=t=>e.check(O(0,t)),e.multipleOf=(t,n)=>e.check(Cs(t,n)),e.step=(t,n)=>e.check(Cs(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),Wu=a(`ZodNumberFormat`,(e,t)=>{dr.init(e,t),Uu.init(e,t)}),Gu=a(`ZodBoolean`,(e,t)=>{fr.init(e,t),U.init(e,t)}),Ku=a(`ZodBigInt`,(e,t)=>{pr.init(e,t),U.init(e,t),e.gte=(t,n)=>e.check(k(t,n)),e.min=(t,n)=>e.check(k(t,n)),e.gt=(t,n)=>e.check(vs(t,n)),e.gte=(t,n)=>e.check(k(t,n)),e.min=(t,n)=>e.check(k(t,n)),e.lt=(t,n)=>e.check(_s(t,n)),e.lte=(t,n)=>e.check(O(t,n)),e.max=(t,n)=>e.check(O(t,n)),e.positive=t=>e.check(vs(BigInt(0),t)),e.negative=t=>e.check(_s(BigInt(0),t)),e.nonpositive=t=>e.check(O(BigInt(0),t)),e.nonnegative=t=>e.check(k(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(Cs(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null}),qu=a(`ZodBigIntFormat`,(e,t)=>{mr.init(e,t),Ku.init(e,t)}),Ju=a(`ZodSymbol`,(e,t)=>{hr.init(e,t),U.init(e,t)}),Yu=a(`ZodUndefined`,(e,t)=>{gr.init(e,t),U.init(e,t)}),Xu=a(`ZodNull`,(e,t)=>{_r.init(e,t),U.init(e,t)}),Zu=a(`ZodAny`,(e,t)=>{vr.init(e,t),U.init(e,t)}),Qu=a(`ZodUnknown`,(e,t)=>{yr.init(e,t),U.init(e,t)}),$u=a(`ZodNever`,(e,t)=>{br.init(e,t),U.init(e,t)}),ed=a(`ZodVoid`,(e,t)=>{xr.init(e,t),U.init(e,t)}),td=a(`ZodDate`,(e,t)=>{Sr.init(e,t),U.init(e,t),e.min=(t,n)=>e.check(k(t,n)),e.max=(t,n)=>e.check(O(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),nd=a(`ZodArray`,(e,t)=>{Cr.init(e,t),U.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Os(t,n)),e.nonempty=t=>e.check(Os(1,t)),e.max=(t,n)=>e.check(Ds(t,n)),e.length=(t,n)=>e.check(ks(t,n)),e.unwrap=()=>e.element}),rd=a(`ZodObject`,(e,t)=>{wr.init(e,t),U.init(e,t),g(e,`shape`,()=>t.shape),e.keyof=()=>B(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:P()}),e.loose=()=>e.clone({...e._zod.def,catchall:P()}),e.strict=()=>e.clone({...e._zod.def,catchall:Vl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>be(e,t),e.merge=t=>xe(e,t),e.pick=t=>ve(e,t),e.omit=t=>ye(e,t),e.partial=(...t)=>Se(hd,e,t[0]),e.required=(...t)=>Ce(yd,e,t[0])}),id=a(`ZodUnion`,(e,t)=>{Tr.init(e,t),U.init(e,t),e.options=t.options}),ad=a(`ZodDiscriminatedUnion`,(e,t)=>{id.init(e,t),Er.init(e,t)}),od=a(`ZodIntersection`,(e,t)=>{Dr.init(e,t),U.init(e,t)}),sd=a(`ZodTuple`,(e,t)=>{Or.init(e,t),U.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})}),cd=a(`ZodRecord`,(e,t)=>{kr.init(e,t),U.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),ld=a(`ZodMap`,(e,t)=>{Ar.init(e,t),U.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),ud=a(`ZodSet`,(e,t)=>{jr.init(e,t),U.init(e,t),e.min=(...t)=>e.check(Ts(...t)),e.nonempty=t=>e.check(Ts(1,t)),e.max=(...t)=>e.check(ws(...t)),e.size=(...t)=>e.check(Es(...t))}),dd=a(`ZodEnum`,(e,t)=>{Mr.init(e,t),U.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new dd({...t,checks:[],...b(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new dd({...t,checks:[],...b(r),entries:i})}}),fd=a(`ZodLiteral`,(e,t)=>{Nr.init(e,t),U.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),pd=a(`ZodFile`,(e,t)=>{Pr.init(e,t),U.init(e,t),e.min=(t,n)=>e.check(Ts(t,n)),e.max=(t,n)=>e.check(ws(t,n)),e.mime=(t,n)=>e.check(Ls(Array.isArray(t)?t:[t],n))}),md=a(`ZodTransform`,(e,t)=>{Fr.init(e,t),U.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Oe(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,t.continue??=!0,n.issues.push(Oe(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),hd=a(`ZodOptional`,(e,t)=>{Ir.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),gd=a(`ZodNullable`,(e,t)=>{Lr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),_d=a(`ZodDefault`,(e,t)=>{Rr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),vd=a(`ZodPrefault`,(e,t)=>{zr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),yd=a(`ZodNonOptional`,(e,t)=>{Br.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),bd=a(`ZodSuccess`,(e,t)=>{Vr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),xd=a(`ZodCatch`,(e,t)=>{Hr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Sd=a(`ZodNaN`,(e,t)=>{Ur.init(e,t),U.init(e,t)}),Cd=a(`ZodPipe`,(e,t)=>{Wr.init(e,t),U.init(e,t),e.in=t.in,e.out=t.out}),wd=a(`ZodReadonly`,(e,t)=>{Gr.init(e,t),U.init(e,t)}),Td=a(`ZodTemplateLiteral`,(e,t)=>{Kr.init(e,t),U.init(e,t)}),Ed=a(`ZodLazy`,(e,t)=>{Jr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.getter()}),Dd=a(`ZodPromise`,(e,t)=>{qr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Od=a(`ZodCustom`,(e,t)=>{Yr.init(e,t),U.init(e,t)}),kd=(...e)=>hc({Pipe:Cd,Boolean:Gu,String:Su,Transform:md},...e)}));function jd(e){o({customError:e})}function Md(){return o().customError}var Nd,Pd=t((()=>{Oc(),Nd={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`}})),Fd=r({bigint:()=>zd,boolean:()=>Rd,date:()=>Bd,number:()=>Ld,string:()=>Id});function Id(e){return xo(Su,e)}function Ld(e){return Yo(Uu,e)}function Rd(e){return ns(Gu,e)}function zd(e){return is(Ku,e)}function Bd(e){return hs(td,e)}var Vd=t((()=>{Oc(),Ad()})),Hd=r({$brand:()=>c,$input:()=>go,$output:()=>ho,NEVER:()=>s,TimePrecision:()=>_c,ZodAny:()=>Zu,ZodArray:()=>nd,ZodBase64:()=>Ru,ZodBase64URL:()=>zu,ZodBigInt:()=>Ku,ZodBigIntFormat:()=>qu,ZodBoolean:()=>Gu,ZodCIDRv4:()=>Iu,ZodCIDRv6:()=>Lu,ZodCUID:()=>ku,ZodCUID2:()=>Au,ZodCatch:()=>xd,ZodCustom:()=>Od,ZodCustomStringFormat:()=>Hu,ZodDate:()=>td,ZodDefault:()=>_d,ZodDiscriminatedUnion:()=>ad,ZodE164:()=>Bu,ZodEmail:()=>Cu,ZodEmoji:()=>Du,ZodEnum:()=>dd,ZodError:()=>Qc,ZodFile:()=>pd,ZodGUID:()=>wu,ZodIPv4:()=>Pu,ZodIPv6:()=>Fu,ZodISODate:()=>qc,ZodISODateTime:()=>Kc,ZodISODuration:()=>Yc,ZodISOTime:()=>Jc,ZodIntersection:()=>od,ZodIssueCode:()=>Nd,ZodJWT:()=>Vu,ZodKSUID:()=>Nu,ZodLazy:()=>Ed,ZodLiteral:()=>fd,ZodMap:()=>ld,ZodNaN:()=>Sd,ZodNanoID:()=>Ou,ZodNever:()=>$u,ZodNonOptional:()=>yd,ZodNull:()=>Xu,ZodNullable:()=>gd,ZodNumber:()=>Uu,ZodNumberFormat:()=>Wu,ZodObject:()=>rd,ZodOptional:()=>hd,ZodPipe:()=>Cd,ZodPrefault:()=>vd,ZodPromise:()=>Dd,ZodReadonly:()=>wd,ZodRealError:()=>$c,ZodRecord:()=>cd,ZodSet:()=>ud,ZodString:()=>Su,ZodStringFormat:()=>W,ZodSuccess:()=>bd,ZodSymbol:()=>Ju,ZodTemplateLiteral:()=>Td,ZodTransform:()=>md,ZodTuple:()=>sd,ZodType:()=>U,ZodULID:()=>ju,ZodURL:()=>Eu,ZodUUID:()=>Tu,ZodUndefined:()=>Yu,ZodUnion:()=>id,ZodUnknown:()=>Qu,ZodVoid:()=>ed,ZodXID:()=>Mu,_ZodString:()=>xu,_default:()=>ru,any:()=>Bl,array:()=>F,base64:()=>wl,base64url:()=>Tl,bigint:()=>Pl,boolean:()=>N,catch:()=>su,check:()=>mu,cidrv4:()=>Sl,cidrv6:()=>Cl,clone:()=>he,coerce:()=>Fd,config:()=>o,core:()=>Dc,cuid:()=>hl,cuid2:()=>gl,custom:()=>hu,date:()=>Ul,discriminatedUnion:()=>Kl,e164:()=>El,email:()=>ol,emoji:()=>pl,endsWith:()=>Fs,enum:()=>B,file:()=>$l,flattenError:()=>Re,float32:()=>Al,float64:()=>jl,formatError:()=>ze,function:()=>yc,getErrorMap:()=>Md,globalRegistry:()=>vo,gt:()=>vs,gte:()=>k,guid:()=>sl,includes:()=>Ns,instanceof:()=>vu,int:()=>kl,int32:()=>Ml,int64:()=>Fl,intersection:()=>ql,ipv4:()=>bl,ipv6:()=>xl,iso:()=>Vc,json:()=>yu,jwt:()=>Dl,keyof:()=>Wl,ksuid:()=>yl,lazy:()=>fu,length:()=>ks,literal:()=>V,locales:()=>fo,looseObject:()=>L,lowercase:()=>js,lt:()=>_s,lte:()=>O,map:()=>Xl,maxLength:()=>Ds,maxSize:()=>ws,mime:()=>Ls,minLength:()=>Os,minSize:()=>Ts,multipleOf:()=>Cs,nan:()=>cu,nanoid:()=>ml,nativeEnum:()=>Ql,negative:()=>bs,never:()=>Vl,nonnegative:()=>Ss,nonoptional:()=>au,nonpositive:()=>xs,normalize:()=>zs,null:()=>zl,nullable:()=>tu,nullish:()=>nu,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>Rs,parse:()=>tl,parseAsync:()=>nl,partialRecord:()=>Yl,pipe:()=>lu,positive:()=>ys,prefault:()=>iu,preprocess:()=>bu,prettifyError:()=>He,promise:()=>pu,property:()=>Is,readonly:()=>uu,record:()=>z,refine:()=>gu,regex:()=>As,regexes:()=>nt,registry:()=>mo,safeParse:()=>rl,safeParseAsync:()=>il,set:()=>Zl,setErrorMap:()=>jd,size:()=>Es,startsWith:()=>Ps,strictObject:()=>Gl,string:()=>j,stringFormat:()=>Ol,stringbool:()=>kd,success:()=>ou,superRefine:()=>_u,symbol:()=>Ll,templateLiteral:()=>du,toJSONSchema:()=>Sc,toLowerCase:()=>Vs,toUpperCase:()=>Hs,transform:()=>eu,treeifyError:()=>Be,trim:()=>Bs,tuple:()=>Jl,uint32:()=>Nl,uint64:()=>Il,ulid:()=>_l,undefined:()=>Rl,union:()=>R,unknown:()=>P,uppercase:()=>Ms,url:()=>fl,uuid:()=>cl,uuidv4:()=>ll,uuidv6:()=>ul,uuidv7:()=>dl,void:()=>Hl,xid:()=>vl}),Ud=t((()=>{Oc(),Ad(),Bc(),el(),al(),Pd(),yi(),po(),Xc(),Vd(),o(gi())})),Wd,Gd=t((()=>{Ud(),Ud(),Wd=Hd})),Kd=r({$brand:()=>c,$input:()=>go,$output:()=>ho,NEVER:()=>s,TimePrecision:()=>_c,ZodAny:()=>Zu,ZodArray:()=>nd,ZodBase64:()=>Ru,ZodBase64URL:()=>zu,ZodBigInt:()=>Ku,ZodBigIntFormat:()=>qu,ZodBoolean:()=>Gu,ZodCIDRv4:()=>Iu,ZodCIDRv6:()=>Lu,ZodCUID:()=>ku,ZodCUID2:()=>Au,ZodCatch:()=>xd,ZodCustom:()=>Od,ZodCustomStringFormat:()=>Hu,ZodDate:()=>td,ZodDefault:()=>_d,ZodDiscriminatedUnion:()=>ad,ZodE164:()=>Bu,ZodEmail:()=>Cu,ZodEmoji:()=>Du,ZodEnum:()=>dd,ZodError:()=>Qc,ZodFile:()=>pd,ZodGUID:()=>wu,ZodIPv4:()=>Pu,ZodIPv6:()=>Fu,ZodISODate:()=>qc,ZodISODateTime:()=>Kc,ZodISODuration:()=>Yc,ZodISOTime:()=>Jc,ZodIntersection:()=>od,ZodIssueCode:()=>Nd,ZodJWT:()=>Vu,ZodKSUID:()=>Nu,ZodLazy:()=>Ed,ZodLiteral:()=>fd,ZodMap:()=>ld,ZodNaN:()=>Sd,ZodNanoID:()=>Ou,ZodNever:()=>$u,ZodNonOptional:()=>yd,ZodNull:()=>Xu,ZodNullable:()=>gd,ZodNumber:()=>Uu,ZodNumberFormat:()=>Wu,ZodObject:()=>rd,ZodOptional:()=>hd,ZodPipe:()=>Cd,ZodPrefault:()=>vd,ZodPromise:()=>Dd,ZodReadonly:()=>wd,ZodRealError:()=>$c,ZodRecord:()=>cd,ZodSet:()=>ud,ZodString:()=>Su,ZodStringFormat:()=>W,ZodSuccess:()=>bd,ZodSymbol:()=>Ju,ZodTemplateLiteral:()=>Td,ZodTransform:()=>md,ZodTuple:()=>sd,ZodType:()=>U,ZodULID:()=>ju,ZodURL:()=>Eu,ZodUUID:()=>Tu,ZodUndefined:()=>Yu,ZodUnion:()=>id,ZodUnknown:()=>Qu,ZodVoid:()=>ed,ZodXID:()=>Mu,_ZodString:()=>xu,_default:()=>ru,any:()=>Bl,array:()=>F,base64:()=>wl,base64url:()=>Tl,bigint:()=>Pl,boolean:()=>N,catch:()=>su,check:()=>mu,cidrv4:()=>Sl,cidrv6:()=>Cl,clone:()=>he,coerce:()=>Fd,config:()=>o,core:()=>Dc,cuid:()=>hl,cuid2:()=>gl,custom:()=>hu,date:()=>Ul,default:()=>qd,discriminatedUnion:()=>Kl,e164:()=>El,email:()=>ol,emoji:()=>pl,endsWith:()=>Fs,enum:()=>B,file:()=>$l,flattenError:()=>Re,float32:()=>Al,float64:()=>jl,formatError:()=>ze,function:()=>yc,getErrorMap:()=>Md,globalRegistry:()=>vo,gt:()=>vs,gte:()=>k,guid:()=>sl,includes:()=>Ns,instanceof:()=>vu,int:()=>kl,int32:()=>Ml,int64:()=>Fl,intersection:()=>ql,ipv4:()=>bl,ipv6:()=>xl,iso:()=>Vc,json:()=>yu,jwt:()=>Dl,keyof:()=>Wl,ksuid:()=>yl,lazy:()=>fu,length:()=>ks,literal:()=>V,locales:()=>fo,looseObject:()=>L,lowercase:()=>js,lt:()=>_s,lte:()=>O,map:()=>Xl,maxLength:()=>Ds,maxSize:()=>ws,mime:()=>Ls,minLength:()=>Os,minSize:()=>Ts,multipleOf:()=>Cs,nan:()=>cu,nanoid:()=>ml,nativeEnum:()=>Ql,negative:()=>bs,never:()=>Vl,nonnegative:()=>Ss,nonoptional:()=>au,nonpositive:()=>xs,normalize:()=>zs,null:()=>zl,nullable:()=>tu,nullish:()=>nu,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>Rs,parse:()=>tl,parseAsync:()=>nl,partialRecord:()=>Yl,pipe:()=>lu,positive:()=>ys,prefault:()=>iu,preprocess:()=>bu,prettifyError:()=>He,promise:()=>pu,property:()=>Is,readonly:()=>uu,record:()=>z,refine:()=>gu,regex:()=>As,regexes:()=>nt,registry:()=>mo,safeParse:()=>rl,safeParseAsync:()=>il,set:()=>Zl,setErrorMap:()=>jd,size:()=>Es,startsWith:()=>Ps,strictObject:()=>Gl,string:()=>j,stringFormat:()=>Ol,stringbool:()=>kd,success:()=>ou,superRefine:()=>_u,symbol:()=>Ll,templateLiteral:()=>du,toJSONSchema:()=>Sc,toLowerCase:()=>Vs,toUpperCase:()=>Hs,transform:()=>eu,treeifyError:()=>Be,trim:()=>Bs,tuple:()=>Jl,uint32:()=>Nl,uint64:()=>Il,ulid:()=>_l,undefined:()=>Rl,union:()=>R,unknown:()=>P,uppercase:()=>Ms,url:()=>fl,uuid:()=>cl,uuidv4:()=>ll,uuidv6:()=>ul,uuidv7:()=>dl,void:()=>Hl,xid:()=>vl,z:()=>Hd}),qd,Jd=t((()=>{Gd(),Gd(),qd=Wd})),Yd,G,Xd,Zd,Qd,$d,ef,K,tf,nf,q,J,Y,X,rf,af,of,sf,cf,lf,uf,Z,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Q,Pm,Fm=t((()=>{Jd(),Yd=`io.modelcontextprotocol/related-task`,G=hu(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Xd=R([j(),M().int()]),Zd=j(),L({ttl:M().optional(),pollInterval:M().optional()}),Qd=I({ttl:M().optional()}),$d=I({taskId:j()}),ef=L({progressToken:Xd.optional(),[Yd]:$d.optional()}),K=I({_meta:ef.optional()}),tf=K.extend({task:Qd.optional()}),nf=e=>tf.safeParse(e).success,q=I({method:j(),params:K.loose().optional()}),J=I({_meta:ef.optional()}),Y=I({method:j(),params:J.loose().optional()}),X=L({_meta:ef.optional()}),rf=R([j(),M().int()]),af=I({jsonrpc:V(`2.0`),id:rf,...q.shape}).strict(),of=e=>af.safeParse(e).success,sf=I({jsonrpc:V(`2.0`),...Y.shape}).strict(),cf=e=>sf.safeParse(e).success,lf=I({jsonrpc:V(`2.0`),id:rf,result:X}).strict(),uf=e=>lf.safeParse(e).success,(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Z||={}),df=I({jsonrpc:V(`2.0`),id:rf.optional(),error:I({code:M().int(),message:j(),data:P().optional()})}).strict(),ff=e=>df.safeParse(e).success,pf=R([af,sf,lf,df]),R([lf,df]),mf=X.strict(),hf=J.extend({requestId:rf.optional(),reason:j().optional()}),gf=Y.extend({method:V(`notifications/cancelled`),params:hf}),_f=I({src:j(),mimeType:j().optional(),sizes:F(j()).optional(),theme:B([`light`,`dark`]).optional()}),vf=I({icons:F(_f).optional()}),yf=I({name:j(),title:j().optional()}),bf=yf.extend({...yf.shape,...vf.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),xf=ql(I({applyDefaults:N().optional()}),z(j(),P())),Sf=bu(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ql(I({form:xf.optional(),url:G.optional()}),z(j(),P()).optional())),Cf=L({list:G.optional(),cancel:G.optional(),requests:L({sampling:L({createMessage:G.optional()}).optional(),elicitation:L({create:G.optional()}).optional()}).optional()}),wf=L({list:G.optional(),cancel:G.optional(),requests:L({tools:L({call:G.optional()}).optional()}).optional()}),Tf=I({experimental:z(j(),G).optional(),sampling:I({context:G.optional(),tools:G.optional()}).optional(),elicitation:Sf.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:Cf.optional(),extensions:z(j(),G).optional()}),Ef=K.extend({protocolVersion:j(),capabilities:Tf,clientInfo:bf}),Df=q.extend({method:V(`initialize`),params:Ef}),Of=I({experimental:z(j(),G).optional(),logging:G.optional(),completions:G.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:wf.optional(),extensions:z(j(),G).optional()}),kf=X.extend({protocolVersion:j(),capabilities:Of,serverInfo:bf,instructions:j().optional()}),Af=Y.extend({method:V(`notifications/initialized`),params:J.optional()}),jf=q.extend({method:V(`ping`),params:K.optional()}),Mf=I({progress:M(),total:H(M()),message:H(j())}),Nf=I({...J.shape,...Mf.shape,progressToken:Xd}),Pf=Y.extend({method:V(`notifications/progress`),params:Nf}),Ff=K.extend({cursor:Zd.optional()}),If=q.extend({params:Ff.optional()}),Lf=X.extend({nextCursor:Zd.optional()}),Rf=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),zf=I({taskId:j(),status:Rf,ttl:R([M(),zl()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:H(M()),statusMessage:H(j())}),Bf=X.extend({task:zf}),Vf=J.merge(zf),Hf=Y.extend({method:V(`notifications/tasks/status`),params:Vf}),Uf=q.extend({method:V(`tasks/get`),params:K.extend({taskId:j()})}),Wf=X.merge(zf),Gf=q.extend({method:V(`tasks/result`),params:K.extend({taskId:j()})}),X.loose(),Kf=If.extend({method:V(`tasks/list`)}),qf=Lf.extend({tasks:F(zf)}),Jf=q.extend({method:V(`tasks/cancel`),params:K.extend({taskId:j()})}),Yf=X.merge(zf),Xf=I({uri:j(),mimeType:H(j()),_meta:z(j(),P()).optional()}),Zf=Xf.extend({text:j()}),Qf=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),$f=Xf.extend({blob:Qf}),ep=B([`user`,`assistant`]),tp=I({audience:F(ep).optional(),priority:M().min(0).max(1).optional(),lastModified:Hc({offset:!0}).optional()}),np=I({...yf.shape,...vf.shape,uri:j(),description:H(j()),mimeType:H(j()),size:H(M()),annotations:tp.optional(),_meta:H(L({}))}),rp=I({...yf.shape,...vf.shape,uriTemplate:j(),description:H(j()),mimeType:H(j()),annotations:tp.optional(),_meta:H(L({}))}),ip=If.extend({method:V(`resources/list`)}),ap=Lf.extend({resources:F(np)}),op=If.extend({method:V(`resources/templates/list`)}),sp=Lf.extend({resourceTemplates:F(rp)}),cp=K.extend({uri:j()}),lp=cp,up=q.extend({method:V(`resources/read`),params:lp}),dp=X.extend({contents:F(R([Zf,$f]))}),fp=Y.extend({method:V(`notifications/resources/list_changed`),params:J.optional()}),pp=cp,mp=q.extend({method:V(`resources/subscribe`),params:pp}),hp=cp,gp=q.extend({method:V(`resources/unsubscribe`),params:hp}),_p=J.extend({uri:j()}),vp=Y.extend({method:V(`notifications/resources/updated`),params:_p}),yp=I({name:j(),description:H(j()),required:H(N())}),bp=I({...yf.shape,...vf.shape,description:H(j()),arguments:H(F(yp)),_meta:H(L({}))}),xp=If.extend({method:V(`prompts/list`)}),Sp=Lf.extend({prompts:F(bp)}),Cp=K.extend({name:j(),arguments:z(j(),j()).optional()}),wp=q.extend({method:V(`prompts/get`),params:Cp}),Tp=I({type:V(`text`),text:j(),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Ep=I({type:V(`image`),data:Qf,mimeType:j(),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Dp=I({type:V(`audio`),data:Qf,mimeType:j(),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Op=I({type:V(`tool_use`),name:j(),id:j(),input:z(j(),P()),_meta:z(j(),P()).optional()}),kp=I({type:V(`resource`),resource:R([Zf,$f]),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Ap=np.extend({type:V(`resource_link`)}),jp=R([Tp,Ep,Dp,Ap,kp]),Mp=I({role:ep,content:jp}),Np=X.extend({description:j().optional(),messages:F(Mp)}),Pp=Y.extend({method:V(`notifications/prompts/list_changed`),params:J.optional()}),Fp=I({title:j().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),Ip=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),Lp=I({...yf.shape,...vf.shape,description:j().optional(),inputSchema:I({type:V(`object`),properties:z(j(),G).optional(),required:F(j()).optional()}).catchall(P()),outputSchema:I({type:V(`object`),properties:z(j(),G).optional(),required:F(j()).optional()}).catchall(P()).optional(),annotations:Fp.optional(),execution:Ip.optional(),_meta:z(j(),P()).optional()}),Rp=If.extend({method:V(`tools/list`)}),zp=Lf.extend({tools:F(Lp)}),Bp=X.extend({content:F(jp).default([]),structuredContent:z(j(),P()).optional(),isError:N().optional()}),Bp.or(X.extend({toolResult:P()})),Vp=tf.extend({name:j(),arguments:z(j(),P()).optional()}),Hp=q.extend({method:V(`tools/call`),params:Vp}),Up=Y.extend({method:V(`notifications/tools/list_changed`),params:J.optional()}),I({autoRefresh:N().default(!0),debounceMs:M().int().nonnegative().default(300)}),Wp=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Gp=K.extend({level:Wp}),Kp=q.extend({method:V(`logging/setLevel`),params:Gp}),qp=J.extend({level:Wp,logger:j().optional(),data:P()}),Jp=Y.extend({method:V(`notifications/message`),params:qp}),Yp=I({name:j().optional()}),Xp=I({hints:F(Yp).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),Zp=I({mode:B([`auto`,`required`,`none`]).optional()}),Qp=I({type:V(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:F(jp).default([]),structuredContent:I({}).loose().optional(),isError:N().optional(),_meta:z(j(),P()).optional()}),$p=Kl(`type`,[Tp,Ep,Dp]),em=Kl(`type`,[Tp,Ep,Dp,Op,Qp]),tm=I({role:ep,content:R([em,F(em)]),_meta:z(j(),P()).optional()}),nm=tf.extend({messages:F(tm),modelPreferences:Xp.optional(),systemPrompt:j().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(j()).optional(),metadata:G.optional(),tools:F(Lp).optional(),toolChoice:Zp.optional()}),rm=q.extend({method:V(`sampling/createMessage`),params:nm}),im=X.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:ep,content:$p}),am=X.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:ep,content:R([em,F(em)])}),om=I({type:V(`boolean`),title:j().optional(),description:j().optional(),default:N().optional()}),sm=I({type:V(`string`),title:j().optional(),description:j().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),cm=I({type:B([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),lm=I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),default:j().optional()}),um=I({type:V(`string`),title:j().optional(),description:j().optional(),oneOf:F(I({const:j(),title:j()})),default:j().optional()}),dm=I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),enumNames:F(j()).optional(),default:j().optional()}),fm=R([lm,um]),pm=I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(j())}),default:F(j()).optional()}),mm=I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:j(),title:j()}))}),default:F(j()).optional()}),hm=R([pm,mm]),gm=R([dm,fm,hm]),_m=R([gm,om,sm,cm]),vm=tf.extend({mode:V(`form`).optional(),message:j(),requestedSchema:I({type:V(`object`),properties:z(j(),_m),required:F(j()).optional()})}),ym=tf.extend({mode:V(`url`),message:j(),elicitationId:j(),url:j().url()}),bm=R([vm,ym]),xm=q.extend({method:V(`elicitation/create`),params:bm}),Sm=J.extend({elicitationId:j()}),Cm=Y.extend({method:V(`notifications/elicitation/complete`),params:Sm}),wm=X.extend({action:B([`accept`,`decline`,`cancel`]),content:bu(e=>e===null?void 0:e,z(j(),R([j(),M(),N(),F(j())])).optional())}),Tm=I({type:V(`ref/resource`),uri:j()}),Em=I({type:V(`ref/prompt`),name:j()}),Dm=K.extend({ref:R([Em,Tm]),argument:I({name:j(),value:j()}),context:I({arguments:z(j(),j()).optional()}).optional()}),Om=q.extend({method:V(`completion/complete`),params:Dm}),km=X.extend({completion:L({values:F(j()).max(100),total:H(M().int()),hasMore:H(N())})}),Am=I({uri:j().startsWith(`file://`),name:j().optional(),_meta:z(j(),P()).optional()}),jm=q.extend({method:V(`roots/list`),params:K.optional()}),Mm=X.extend({roots:F(Am)}),Nm=Y.extend({method:V(`notifications/roots/list_changed`),params:J.optional()}),R([jf,Df,Om,Kp,wp,xp,ip,op,up,mp,gp,Hp,Rp,Uf,Gf,Kf,Jf]),R([gf,Pf,Af,Nm,Hf]),R([mf,im,am,wm,Mm,Wf,qf,Bf]),R([jf,rm,xm,jm,Uf,Gf,Kf,Jf]),R([gf,Pf,Jp,vp,fp,Up,Pp,Hf,Cm]),R([mf,kf,km,Np,Sp,ap,sp,dp,Bp,zp,Wf,qf,Bf]),Q=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Z.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Pm(e.elicitations,n)}return new e(t,n,r)}},Pm=class extends Q{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Z.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}}));function Im(e){return e===`completed`||e===`failed`||e===`cancelled`}var Lm=t((()=>{})),Rm=t((()=>{})),zm=t((()=>{})),Bm=t((()=>{})),Vm=t((()=>{})),Hm=t((()=>{})),Um=t((()=>{})),Wm=t((()=>{})),Gm=t((()=>{})),Km=t((()=>{})),qm=t((()=>{})),Jm=t((()=>{})),Ym=t((()=>{})),Xm=t((()=>{})),Zm=t((()=>{})),Qm=t((()=>{})),$m=t((()=>{})),eh=t((()=>{})),th=t((()=>{})),nh=t((()=>{})),rh=t((()=>{})),ih=t((()=>{})),ah=t((()=>{})),oh=t((()=>{})),sh=t((()=>{})),ch=t((()=>{})),lh=t((()=>{})),uh=t((()=>{})),dh=t((()=>{})),fh=t((()=>{})),ph=t((()=>{})),mh=t((()=>{})),hh=t((()=>{})),gh=t((()=>{})),_h=t((()=>{})),vh=t((()=>{})),yh=t((()=>{})),bh=t((()=>{})),xh=t((()=>{})),Sh=t((()=>{Rm(),zm(),Bm(),Vm(),yh(),bh(),Hm(),Um(),Wm(),Gm(),Km(),qm(),Jm(),Ym(),Xm(),Zm(),Qm(),$m(),nh(),rh(),ih(),ah(),sh(),ch(),lh(),uh(),dh(),fh(),_h(),th(),ph(),eh(),mh(),hh(),oh(),gh(),vh(),xh()}));function Ch(e){let t=Lc(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Rc(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function wh(e,t){let n=Ic(e,t);if(!n.success)throw n.error;return n.data}var Th=t((()=>{zc(),Sh()}));function Eh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Dh(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Eh(a)&&Eh(i)?{...a,...i}:i}return n}var Oh,kh=t((()=>{zc(),Fm(),Lm(),Th(),Oh=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(gf,e=>{this._oncancel(e)}),this.setNotificationHandler(Pf,e=>{this._onprogress(e)}),this.setRequestHandler(jf,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Uf,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Q(Z.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(Gf,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new Q(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new Q(Z.InvalidParams,`Task not found: ${r}`);if(!Im(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(Im(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[Yd]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Kf,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new Q(Z.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Jf,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Q(Z.InvalidParams,`Task not found: ${e.params.taskId}`);if(Im(n.status))throw new Q(Z.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new Q(Z.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof Q?e:new Q(Z.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),Q.fromError(Z.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),uf(e)||ff(e)?this._onresponse(e):of(e)?this._onrequest(e,t):cf(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=Q.fromError(Z.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[Yd]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Z.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=nf(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new Q(Z.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Z.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),uf(e)?n(e):n(new Q(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(uf(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),uf(e)?r(e):r(Q.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof Q?e:new Q(Z.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Bf,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new Q(Z.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},Im(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new Q(Z.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new Q(Z.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof Q?e:new Q(Z.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Yd]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof Q?e:new Q(Z.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Ic(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let ee=n?.timeout??6e4;this._setupTimeout(d,ee,n?.maxTotalTimeout,()=>p(Q.fromError(Z.RequestTimeout,`Request timed out`,{timeout:ee})),n?.resetTimeoutOnProgress??!1);let te=s?.taskId;te?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(te,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Wf,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},qf,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Yf,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[Yd]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[Yd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[Yd]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=Ch(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=wh(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=Ch(e);this._notificationHandlers.set(n,n=>{let r=wh(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&of(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new Q(Z.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new Q(Z.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new Q(Z.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new Q(Z.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Hf.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),Im(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new Q(Z.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(Im(a.status))throw new Q(Z.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Hf.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),Im(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}}})),Ah,jh,Mh,Nh,Ph=t((()=>{Ah=`modulepreload`,jh=function(e,t){return new URL(e,t).href},Mh={},Nh=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=jh(t,n),t=s(t),t in Mh)return;Mh[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ah,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}}));async function Fh(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](fg);if(n.vendor===`zod`){let{z:n}=await Nh(async()=>{let{z:e}=await Promise.resolve().then(()=>(Jd(),Kd));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Ih(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Lh(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function Rh(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}var zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg=t((()=>{kh(),Fm(),Jd(),Ph(),(e=>typeof i<`u`?i:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof i<`u`?i:e)[t]}):e)(function(e){if(typeof i<`u`)return i.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),zh=class extends Oh{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Bh=`2026-01-26`,Vh=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=pf.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Hh=R([V(`light`),V(`dark`)]).describe(`Color theme preference for the host environment.`),Uh=R([V(`inline`),V(`fullscreen`),V(`pip`)]).describe(`Display mode for UI presentation.`),Wh=R([V(`--color-background-primary`),V(`--color-background-secondary`),V(`--color-background-tertiary`),V(`--color-background-inverse`),V(`--color-background-ghost`),V(`--color-background-info`),V(`--color-background-danger`),V(`--color-background-success`),V(`--color-background-warning`),V(`--color-background-disabled`),V(`--color-text-primary`),V(`--color-text-secondary`),V(`--color-text-tertiary`),V(`--color-text-inverse`),V(`--color-text-ghost`),V(`--color-text-info`),V(`--color-text-danger`),V(`--color-text-success`),V(`--color-text-warning`),V(`--color-text-disabled`),V(`--color-border-primary`),V(`--color-border-secondary`),V(`--color-border-tertiary`),V(`--color-border-inverse`),V(`--color-border-ghost`),V(`--color-border-info`),V(`--color-border-danger`),V(`--color-border-success`),V(`--color-border-warning`),V(`--color-border-disabled`),V(`--color-ring-primary`),V(`--color-ring-secondary`),V(`--color-ring-inverse`),V(`--color-ring-info`),V(`--color-ring-danger`),V(`--color-ring-success`),V(`--color-ring-warning`),V(`--font-sans`),V(`--font-mono`),V(`--font-weight-normal`),V(`--font-weight-medium`),V(`--font-weight-semibold`),V(`--font-weight-bold`),V(`--font-text-xs-size`),V(`--font-text-sm-size`),V(`--font-text-md-size`),V(`--font-text-lg-size`),V(`--font-heading-xs-size`),V(`--font-heading-sm-size`),V(`--font-heading-md-size`),V(`--font-heading-lg-size`),V(`--font-heading-xl-size`),V(`--font-heading-2xl-size`),V(`--font-heading-3xl-size`),V(`--font-text-xs-line-height`),V(`--font-text-sm-line-height`),V(`--font-text-md-line-height`),V(`--font-text-lg-line-height`),V(`--font-heading-xs-line-height`),V(`--font-heading-sm-line-height`),V(`--font-heading-md-line-height`),V(`--font-heading-lg-line-height`),V(`--font-heading-xl-line-height`),V(`--font-heading-2xl-line-height`),V(`--font-heading-3xl-line-height`),V(`--border-radius-xs`),V(`--border-radius-sm`),V(`--border-radius-md`),V(`--border-radius-lg`),V(`--border-radius-xl`),V(`--border-radius-full`),V(`--border-width-regular`),V(`--shadow-hairline`),V(`--shadow-sm`),V(`--shadow-md`),V(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`),Gh=z(Wh.describe(`Style variables for theming MCP apps.
|
|
276
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let t of this.seen.entries()){let r=t[1];if(e===t[0]){a(t);continue}if(n.external){let r=n.external.registry.get(t[0])?.id;if(e!==t[0]&&r){a(t);continue}}if(this.metadataRegistry.get(t[0])?.id){a(t);continue}if(r.cycle){a(t);continue}if(r.count>1&&n.reused===`ref`){a(t);continue}}let o=(e,t)=>{let n=this.seen.get(e),r=n.def??n.schema,i={...r};if(n.ref===null)return;let a=n.ref;if(n.ref=null,a){o(a,t);let e=this.seen.get(a).schema;e.$ref&&t.target===`draft-7`?(r.allOf=r.allOf??[],r.allOf.push(e)):(Object.assign(r,e),Object.assign(r,i))}n.isParent||this.override({zodSchema:e,jsonSchema:r,path:n.path??[]})};for(let e of[...this.seen.entries()].reverse())o(e[0],{target:this.target});let s={};if(this.target===`draft-2020-12`?s.$schema=`https://json-schema.org/draft/2020-12/schema`:this.target===`draft-7`?s.$schema=`http://json-schema.org/draft-07/schema#`:console.warn(`Invalid target: ${this.target}`),n.external?.uri){let t=n.external.registry.get(e)?.id;if(!t)throw Error("Schema is missing an `id` property");s.$id=n.external.uri(t)}Object.assign(s,r.def);let c=n.external?.defs??{};for(let e of this.seen.entries()){let t=e[1];t.def&&t.defId&&(c[t.defId]=t.def)}n.external||Object.keys(c).length>0&&(this.target===`draft-2020-12`?s.$defs=c:s.definitions=c);try{return JSON.parse(JSON.stringify(s))}catch{throw Error(`Error converting schema to JSON.`)}}}})),Ec=r({}),Dc=t((()=>{})),Oc=r({$ZodAny:()=>yr,$ZodArray:()=>wr,$ZodAsyncError:()=>l,$ZodBase64:()=>or,$ZodBase64URL:()=>sr,$ZodBigInt:()=>mr,$ZodBigIntFormat:()=>hr,$ZodBoolean:()=>pr,$ZodCIDRv4:()=>ir,$ZodCIDRv6:()=>ar,$ZodCUID:()=>qn,$ZodCUID2:()=>Jn,$ZodCatch:()=>Ur,$ZodCheck:()=>w,$ZodCheckBigIntFormat:()=>en,$ZodCheckEndsWith:()=>mn,$ZodCheckGreaterThan:()=>Zt,$ZodCheckIncludes:()=>fn,$ZodCheckLengthEquals:()=>sn,$ZodCheckLessThan:()=>Xt,$ZodCheckLowerCase:()=>un,$ZodCheckMaxLength:()=>an,$ZodCheckMaxSize:()=>tn,$ZodCheckMimeType:()=>gn,$ZodCheckMinLength:()=>on,$ZodCheckMinSize:()=>nn,$ZodCheckMultipleOf:()=>Qt,$ZodCheckNumberFormat:()=>$t,$ZodCheckOverwrite:()=>_n,$ZodCheckProperty:()=>hn,$ZodCheckRegex:()=>ln,$ZodCheckSizeEquals:()=>rn,$ZodCheckStartsWith:()=>pn,$ZodCheckStringFormat:()=>cn,$ZodCheckUpperCase:()=>dn,$ZodCustom:()=>Xr,$ZodCustomStringFormat:()=>ur,$ZodDate:()=>Cr,$ZodDefault:()=>zr,$ZodDiscriminatedUnion:()=>Dr,$ZodE164:()=>cr,$ZodEmail:()=>Un,$ZodEmoji:()=>Gn,$ZodEnum:()=>Nr,$ZodError:()=>Ge,$ZodFile:()=>Fr,$ZodFunction:()=>xc,$ZodGUID:()=>Vn,$ZodIPv4:()=>nr,$ZodIPv6:()=>rr,$ZodISODate:()=>$n,$ZodISODateTime:()=>Qn,$ZodISODuration:()=>tr,$ZodISOTime:()=>er,$ZodIntersection:()=>Or,$ZodJWT:()=>lr,$ZodKSUID:()=>Zn,$ZodLazy:()=>Yr,$ZodLiteral:()=>Pr,$ZodMap:()=>jr,$ZodNaN:()=>Wr,$ZodNanoID:()=>Kn,$ZodNever:()=>xr,$ZodNonOptional:()=>Vr,$ZodNull:()=>vr,$ZodNullable:()=>Rr,$ZodNumber:()=>dr,$ZodNumberFormat:()=>fr,$ZodObject:()=>Tr,$ZodOptional:()=>Lr,$ZodPipe:()=>Gr,$ZodPrefault:()=>Br,$ZodPromise:()=>Jr,$ZodReadonly:()=>Kr,$ZodRealError:()=>Ke,$ZodRecord:()=>Ar,$ZodRegistry:()=>vo,$ZodSet:()=>Mr,$ZodString:()=>Bn,$ZodStringFormat:()=>E,$ZodSuccess:()=>Hr,$ZodSymbol:()=>gr,$ZodTemplateLiteral:()=>qr,$ZodTransform:()=>Ir,$ZodTuple:()=>kr,$ZodType:()=>T,$ZodULID:()=>Yn,$ZodURL:()=>Wn,$ZodUUID:()=>Hn,$ZodUndefined:()=>_r,$ZodUnion:()=>Er,$ZodUnknown:()=>br,$ZodVoid:()=>Sr,$ZodXID:()=>Xn,$brand:()=>c,$constructor:()=>a,$input:()=>_o,$output:()=>go,Doc:()=>yn,JSONSchema:()=>Ec,JSONSchemaGenerator:()=>wc,NEVER:()=>s,TimePrecision:()=>vc,_any:()=>ds,_array:()=>Ws,_base64:()=>Vo,_base64url:()=>Ho,_bigint:()=>is,_boolean:()=>ns,_catch:()=>cc,_cidrv4:()=>zo,_cidrv6:()=>Bo,_coercedBigint:()=>as,_coercedBoolean:()=>rs,_coercedDate:()=>gs,_coercedNumber:()=>Xo,_coercedString:()=>So,_cuid:()=>Mo,_cuid2:()=>No,_custom:()=>mc,_date:()=>hs,_default:()=>ac,_discriminatedUnion:()=>Ks,_e164:()=>Uo,_email:()=>Co,_emoji:()=>Ao,_endsWith:()=>Is,_enum:()=>Qs,_file:()=>tc,_float32:()=>Qo,_float64:()=>$o,_gt:()=>ys,_gte:()=>O,_guid:()=>wo,_includes:()=>Ps,_int:()=>Zo,_int32:()=>es,_int64:()=>os,_intersection:()=>qs,_ipv4:()=>Lo,_ipv6:()=>Ro,_isoDate:()=>Ko,_isoDateTime:()=>Go,_isoDuration:()=>Jo,_isoTime:()=>qo,_jwt:()=>Wo,_ksuid:()=>Io,_lazy:()=>fc,_length:()=>As,_literal:()=>ec,_lowercase:()=>Ms,_lt:()=>vs,_lte:()=>D,_map:()=>Xs,_max:()=>D,_maxLength:()=>Os,_maxSize:()=>Ts,_mime:()=>Rs,_min:()=>O,_minLength:()=>ks,_minSize:()=>Es,_multipleOf:()=>ws,_nan:()=>_s,_nanoid:()=>jo,_nativeEnum:()=>$s,_negative:()=>xs,_never:()=>ps,_nonnegative:()=>Cs,_nonoptional:()=>oc,_nonpositive:()=>Ss,_normalize:()=>Bs,_null:()=>us,_nullable:()=>ic,_number:()=>Yo,_optional:()=>rc,_overwrite:()=>zs,_parse:()=>Je,_parseAsync:()=>Xe,_pipe:()=>lc,_positive:()=>bs,_promise:()=>pc,_property:()=>Ls,_readonly:()=>uc,_record:()=>Ys,_refine:()=>hc,_regex:()=>js,_safeParse:()=>Qe,_safeParseAsync:()=>et,_set:()=>Zs,_size:()=>Ds,_startsWith:()=>Fs,_string:()=>xo,_stringFormat:()=>_c,_stringbool:()=>gc,_success:()=>sc,_symbol:()=>cs,_templateLiteral:()=>dc,_toLowerCase:()=>Hs,_toUpperCase:()=>Us,_transform:()=>nc,_trim:()=>Vs,_tuple:()=>Js,_uint32:()=>ts,_uint64:()=>ss,_ulid:()=>Po,_undefined:()=>ls,_union:()=>Gs,_unknown:()=>fs,_uppercase:()=>Ns,_url:()=>ko,_uuid:()=>To,_uuidv4:()=>Eo,_uuidv6:()=>Do,_uuidv7:()=>Oo,_void:()=>ms,_xid:()=>Fo,clone:()=>v,config:()=>o,flattenError:()=>ze,formatError:()=>Be,function:()=>bc,globalConfig:()=>u,globalRegistry:()=>yo,isValidBase64:()=>Cn,isValidBase64URL:()=>wn,isValidJWT:()=>Tn,locales:()=>po,parse:()=>Ye,parseAsync:()=>Ze,prettifyError:()=>Ue,regexes:()=>rt,registry:()=>ho,safeParse:()=>$e,safeParseAsync:()=>tt,toDotPath:()=>He,toJSONSchema:()=>Cc,treeifyError:()=>Ve,util:()=>f,version:()=>xn}),A=t((()=>{d(),nt(),qe(),Zr(),vn(),Sn(),C(),qt(),mo(),bo(),bn(),Sc(),yc(),Tc(),Dc()})),kc=t((()=>{A()})),Ac=t((()=>{})),jc=t((()=>{A()})),Mc=t((()=>{A(),kc(),Ac(),jc(),mo(),Ac()})),Nc=t((()=>{Mc()})),Pc=t((()=>{Nc()}));function Fc(e){return!!e._zod}function Ic(e,t){return Fc(e)?$e(e,t):e.safeParse(t)}function Lc(e){if(!e)return;let t;if(t=Fc(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Rc(e){if(Fc(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var zc=t((()=>{Pc()})),Bc=t((()=>{A()})),Vc=r({ZodISODate:()=>qc,ZodISODateTime:()=>Kc,ZodISODuration:()=>Yc,ZodISOTime:()=>Jc,date:()=>Uc,datetime:()=>Hc,duration:()=>Gc,time:()=>Wc});function Hc(e){return Go(Kc,e)}function Uc(e){return Ko(qc,e)}function Wc(e){return qo(Jc,e)}function Gc(e){return Jo(Yc,e)}var Kc,qc,Jc,Yc,Xc=t((()=>{A(),Ad(),Kc=a(`ZodISODateTime`,(e,t)=>{Qn.init(e,t),W.init(e,t)}),qc=a(`ZodISODate`,(e,t)=>{$n.init(e,t),W.init(e,t)}),Jc=a(`ZodISOTime`,(e,t)=>{er.init(e,t),W.init(e,t)}),Yc=a(`ZodISODuration`,(e,t)=>{tr.init(e,t),W.init(e,t)})})),Zc,Qc,$c,el=t((()=>{A(),Zc=(e,t)=>{Ge.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Be(e,t)},flatten:{value:t=>ze(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},Qc=a(`ZodError`,Zc),$c=a(`ZodError`,Zc,{Parent:Error})})),tl,nl,rl,il,al=t((()=>{A(),el(),tl=Je($c),nl=Xe($c),rl=Qe($c),il=et($c)}));function j(e){return xo(Su,e)}function ol(e){return Co(Cu,e)}function sl(e){return wo(wu,e)}function cl(e){return To(Tu,e)}function ll(e){return Eo(Tu,e)}function ul(e){return Do(Tu,e)}function dl(e){return Oo(Tu,e)}function fl(e){return ko(Eu,e)}function pl(e){return Ao(Du,e)}function ml(e){return jo(Ou,e)}function hl(e){return Mo(ku,e)}function gl(e){return No(Au,e)}function _l(e){return Po(ju,e)}function vl(e){return Fo(Mu,e)}function yl(e){return Io(Nu,e)}function bl(e){return Lo(Pu,e)}function xl(e){return Ro(Fu,e)}function Sl(e){return zo(Iu,e)}function Cl(e){return Bo(Lu,e)}function wl(e){return Vo(Ru,e)}function Tl(e){return Ho(zu,e)}function El(e){return Uo(Bu,e)}function Dl(e){return Wo(Vu,e)}function Ol(e,t,n={}){return _c(Hu,e,t,n)}function M(e){return Yo(Uu,e)}function kl(e){return Zo(Wu,e)}function Al(e){return Qo(Wu,e)}function jl(e){return $o(Wu,e)}function Ml(e){return es(Wu,e)}function Nl(e){return ts(Wu,e)}function N(e){return ns(Gu,e)}function Pl(e){return is(Ku,e)}function Fl(e){return os(qu,e)}function Il(e){return ss(qu,e)}function Ll(e){return cs(Ju,e)}function Rl(e){return ls(Yu,e)}function zl(e){return us(Xu,e)}function Bl(){return ds(Zu)}function P(){return fs(Qu)}function Vl(e){return ps($u,e)}function Hl(e){return ms(ed,e)}function Ul(e){return hs(td,e)}function F(e,t){return Ws(nd,e,t)}function Wl(e){let t=e._zod.def.shape;return V(Object.keys(t))}function I(e,t){let n={type:`object`,get shape(){return g(this,`shape`,{...e}),this.shape},...y(t)};return new rd(n)}function Gl(e,t){return new rd({type:`object`,get shape(){return g(this,`shape`,{...e}),this.shape},catchall:Vl(),...y(t)})}function L(e,t){return new rd({type:`object`,get shape(){return g(this,`shape`,{...e}),this.shape},catchall:P(),...y(t)})}function R(e,t){return new id({type:`union`,options:e,...y(t)})}function Kl(e,t,n){return new ad({type:`union`,options:t,discriminator:e,...y(n)})}function ql(e,t){return new od({type:`intersection`,left:e,right:t})}function Jl(e,t,n){let r=t instanceof T;return new sd({type:`tuple`,items:e,rest:r?t:null,...y(r?n:t)})}function z(e,t,n){return new cd({type:`record`,keyType:e,valueType:t,...y(n)})}function Yl(e,t,n){return new cd({type:`record`,keyType:R([e,Vl()]),valueType:t,...y(n)})}function Xl(e,t,n){return new ld({type:`map`,keyType:e,valueType:t,...y(n)})}function Zl(e,t){return new ud({type:`set`,valueType:e,...y(t)})}function B(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new dd({type:`enum`,entries:n,...y(t)})}function Ql(e,t){return new dd({type:`enum`,entries:e,...y(t)})}function V(e,t){return new fd({type:`literal`,values:Array.isArray(e)?e:[e],...y(t)})}function $l(e){return tc(pd,e)}function eu(e){return new md({type:`transform`,transform:e})}function H(e){return new hd({type:`optional`,innerType:e})}function tu(e){return new gd({type:`nullable`,innerType:e})}function nu(e){return H(tu(e))}function ru(e,t){return new _d({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}function iu(e,t){return new vd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}function au(e,t){return new yd({type:`nonoptional`,innerType:e,...y(t)})}function ou(e){return new bd({type:`success`,innerType:e})}function su(e,t){return new xd({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function cu(e){return _s(Sd,e)}function lu(e,t){return new Cd({type:`pipe`,in:e,out:t})}function uu(e){return new wd({type:`readonly`,innerType:e})}function du(e,t){return new Td({type:`template_literal`,parts:e,...y(t)})}function fu(e){return new Ed({type:`lazy`,getter:e})}function pu(e){return new Dd({type:`promise`,innerType:e})}function mu(e){let t=new w({check:`custom`});return t._zod.check=e,t}function hu(e,t){return mc(Od,e??(()=>!0),t)}function gu(e,t={}){return hc(Od,e,t)}function _u(e){let t=mu(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(ke(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(ke(r))}},e(n.value,n)));return t}function vu(e,t={error:`Input not instance of ${e.name}`}){let n=new Od({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...y(t)});return n._zod.bag.Class=e,n}function yu(e){let t=fu(()=>R([j(e),M(),N(),zl(),F(t),z(j(),t)]));return t}function bu(e,t){return lu(eu(e),t)}var U,xu,Su,W,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,Qu,$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd,Ad=t((()=>{A(),Bc(),Xc(),al(),U=a(`ZodType`,(e,t)=>(T.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),e.clone=(t,n)=>v(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>tl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>rl(e,t,n),e.parseAsync=async(t,n)=>nl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>il(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(gu(t,n)),e.superRefine=t=>e.check(_u(t)),e.overwrite=t=>e.check(zs(t)),e.optional=()=>H(e),e.nullable=()=>tu(e),e.nullish=()=>H(tu(e)),e.nonoptional=t=>au(e,t),e.array=()=>F(e),e.or=t=>R([e,t]),e.and=t=>ql(e,t),e.transform=t=>lu(e,eu(t)),e.default=t=>ru(e,t),e.prefault=t=>iu(e,t),e.catch=t=>su(e,t),e.pipe=t=>lu(e,t),e.readonly=()=>uu(e),e.describe=t=>{let n=e.clone();return yo.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return yo.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return yo.get(e);let n=e.clone();return yo.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),xu=a(`_ZodString`,(e,t)=>{Bn.init(e,t),U.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(js(...t)),e.includes=(...t)=>e.check(Ps(...t)),e.startsWith=(...t)=>e.check(Fs(...t)),e.endsWith=(...t)=>e.check(Is(...t)),e.min=(...t)=>e.check(ks(...t)),e.max=(...t)=>e.check(Os(...t)),e.length=(...t)=>e.check(As(...t)),e.nonempty=(...t)=>e.check(ks(1,...t)),e.lowercase=t=>e.check(Ms(t)),e.uppercase=t=>e.check(Ns(t)),e.trim=()=>e.check(Vs()),e.normalize=(...t)=>e.check(Bs(...t)),e.toLowerCase=()=>e.check(Hs()),e.toUpperCase=()=>e.check(Us())}),Su=a(`ZodString`,(e,t)=>{Bn.init(e,t),xu.init(e,t),e.email=t=>e.check(Co(Cu,t)),e.url=t=>e.check(ko(Eu,t)),e.jwt=t=>e.check(Wo(Vu,t)),e.emoji=t=>e.check(Ao(Du,t)),e.guid=t=>e.check(wo(wu,t)),e.uuid=t=>e.check(To(Tu,t)),e.uuidv4=t=>e.check(Eo(Tu,t)),e.uuidv6=t=>e.check(Do(Tu,t)),e.uuidv7=t=>e.check(Oo(Tu,t)),e.nanoid=t=>e.check(jo(Ou,t)),e.guid=t=>e.check(wo(wu,t)),e.cuid=t=>e.check(Mo(ku,t)),e.cuid2=t=>e.check(No(Au,t)),e.ulid=t=>e.check(Po(ju,t)),e.base64=t=>e.check(Vo(Ru,t)),e.base64url=t=>e.check(Ho(zu,t)),e.xid=t=>e.check(Fo(Mu,t)),e.ksuid=t=>e.check(Io(Nu,t)),e.ipv4=t=>e.check(Lo(Pu,t)),e.ipv6=t=>e.check(Ro(Fu,t)),e.cidrv4=t=>e.check(zo(Iu,t)),e.cidrv6=t=>e.check(Bo(Lu,t)),e.e164=t=>e.check(Uo(Bu,t)),e.datetime=t=>e.check(Hc(t)),e.date=t=>e.check(Uc(t)),e.time=t=>e.check(Wc(t)),e.duration=t=>e.check(Gc(t))}),W=a(`ZodStringFormat`,(e,t)=>{E.init(e,t),xu.init(e,t)}),Cu=a(`ZodEmail`,(e,t)=>{Un.init(e,t),W.init(e,t)}),wu=a(`ZodGUID`,(e,t)=>{Vn.init(e,t),W.init(e,t)}),Tu=a(`ZodUUID`,(e,t)=>{Hn.init(e,t),W.init(e,t)}),Eu=a(`ZodURL`,(e,t)=>{Wn.init(e,t),W.init(e,t)}),Du=a(`ZodEmoji`,(e,t)=>{Gn.init(e,t),W.init(e,t)}),Ou=a(`ZodNanoID`,(e,t)=>{Kn.init(e,t),W.init(e,t)}),ku=a(`ZodCUID`,(e,t)=>{qn.init(e,t),W.init(e,t)}),Au=a(`ZodCUID2`,(e,t)=>{Jn.init(e,t),W.init(e,t)}),ju=a(`ZodULID`,(e,t)=>{Yn.init(e,t),W.init(e,t)}),Mu=a(`ZodXID`,(e,t)=>{Xn.init(e,t),W.init(e,t)}),Nu=a(`ZodKSUID`,(e,t)=>{Zn.init(e,t),W.init(e,t)}),Pu=a(`ZodIPv4`,(e,t)=>{nr.init(e,t),W.init(e,t)}),Fu=a(`ZodIPv6`,(e,t)=>{rr.init(e,t),W.init(e,t)}),Iu=a(`ZodCIDRv4`,(e,t)=>{ir.init(e,t),W.init(e,t)}),Lu=a(`ZodCIDRv6`,(e,t)=>{ar.init(e,t),W.init(e,t)}),Ru=a(`ZodBase64`,(e,t)=>{or.init(e,t),W.init(e,t)}),zu=a(`ZodBase64URL`,(e,t)=>{sr.init(e,t),W.init(e,t)}),Bu=a(`ZodE164`,(e,t)=>{cr.init(e,t),W.init(e,t)}),Vu=a(`ZodJWT`,(e,t)=>{lr.init(e,t),W.init(e,t)}),Hu=a(`ZodCustomStringFormat`,(e,t)=>{ur.init(e,t),W.init(e,t)}),Uu=a(`ZodNumber`,(e,t)=>{dr.init(e,t),U.init(e,t),e.gt=(t,n)=>e.check(ys(t,n)),e.gte=(t,n)=>e.check(O(t,n)),e.min=(t,n)=>e.check(O(t,n)),e.lt=(t,n)=>e.check(vs(t,n)),e.lte=(t,n)=>e.check(D(t,n)),e.max=(t,n)=>e.check(D(t,n)),e.int=t=>e.check(kl(t)),e.safe=t=>e.check(kl(t)),e.positive=t=>e.check(ys(0,t)),e.nonnegative=t=>e.check(O(0,t)),e.negative=t=>e.check(vs(0,t)),e.nonpositive=t=>e.check(D(0,t)),e.multipleOf=(t,n)=>e.check(ws(t,n)),e.step=(t,n)=>e.check(ws(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),Wu=a(`ZodNumberFormat`,(e,t)=>{fr.init(e,t),Uu.init(e,t)}),Gu=a(`ZodBoolean`,(e,t)=>{pr.init(e,t),U.init(e,t)}),Ku=a(`ZodBigInt`,(e,t)=>{mr.init(e,t),U.init(e,t),e.gte=(t,n)=>e.check(O(t,n)),e.min=(t,n)=>e.check(O(t,n)),e.gt=(t,n)=>e.check(ys(t,n)),e.gte=(t,n)=>e.check(O(t,n)),e.min=(t,n)=>e.check(O(t,n)),e.lt=(t,n)=>e.check(vs(t,n)),e.lte=(t,n)=>e.check(D(t,n)),e.max=(t,n)=>e.check(D(t,n)),e.positive=t=>e.check(ys(BigInt(0),t)),e.negative=t=>e.check(vs(BigInt(0),t)),e.nonpositive=t=>e.check(D(BigInt(0),t)),e.nonnegative=t=>e.check(O(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(ws(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null}),qu=a(`ZodBigIntFormat`,(e,t)=>{hr.init(e,t),Ku.init(e,t)}),Ju=a(`ZodSymbol`,(e,t)=>{gr.init(e,t),U.init(e,t)}),Yu=a(`ZodUndefined`,(e,t)=>{_r.init(e,t),U.init(e,t)}),Xu=a(`ZodNull`,(e,t)=>{vr.init(e,t),U.init(e,t)}),Zu=a(`ZodAny`,(e,t)=>{yr.init(e,t),U.init(e,t)}),Qu=a(`ZodUnknown`,(e,t)=>{br.init(e,t),U.init(e,t)}),$u=a(`ZodNever`,(e,t)=>{xr.init(e,t),U.init(e,t)}),ed=a(`ZodVoid`,(e,t)=>{Sr.init(e,t),U.init(e,t)}),td=a(`ZodDate`,(e,t)=>{Cr.init(e,t),U.init(e,t),e.min=(t,n)=>e.check(O(t,n)),e.max=(t,n)=>e.check(D(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),nd=a(`ZodArray`,(e,t)=>{wr.init(e,t),U.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(ks(t,n)),e.nonempty=t=>e.check(ks(1,t)),e.max=(t,n)=>e.check(Os(t,n)),e.length=(t,n)=>e.check(As(t,n)),e.unwrap=()=>e.element}),rd=a(`ZodObject`,(e,t)=>{Tr.init(e,t),U.init(e,t),h(e,`shape`,()=>t.shape),e.keyof=()=>B(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:P()}),e.loose=()=>e.clone({...e._zod.def,catchall:P()}),e.strict=()=>e.clone({...e._zod.def,catchall:Vl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>xe(e,t),e.merge=t=>Se(e,t),e.pick=t=>ye(e,t),e.omit=t=>be(e,t),e.partial=(...t)=>Ce(hd,e,t[0]),e.required=(...t)=>we(yd,e,t[0])}),id=a(`ZodUnion`,(e,t)=>{Er.init(e,t),U.init(e,t),e.options=t.options}),ad=a(`ZodDiscriminatedUnion`,(e,t)=>{id.init(e,t),Dr.init(e,t)}),od=a(`ZodIntersection`,(e,t)=>{Or.init(e,t),U.init(e,t)}),sd=a(`ZodTuple`,(e,t)=>{kr.init(e,t),U.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})}),cd=a(`ZodRecord`,(e,t)=>{Ar.init(e,t),U.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),ld=a(`ZodMap`,(e,t)=>{jr.init(e,t),U.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),ud=a(`ZodSet`,(e,t)=>{Mr.init(e,t),U.init(e,t),e.min=(...t)=>e.check(Es(...t)),e.nonempty=t=>e.check(Es(1,t)),e.max=(...t)=>e.check(Ts(...t)),e.size=(...t)=>e.check(Ds(...t))}),dd=a(`ZodEnum`,(e,t)=>{Nr.init(e,t),U.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new dd({...t,checks:[],...y(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new dd({...t,checks:[],...y(r),entries:i})}}),fd=a(`ZodLiteral`,(e,t)=>{Pr.init(e,t),U.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),pd=a(`ZodFile`,(e,t)=>{Fr.init(e,t),U.init(e,t),e.min=(t,n)=>e.check(Es(t,n)),e.max=(t,n)=>e.check(Ts(t,n)),e.mime=(t,n)=>e.check(Rs(Array.isArray(t)?t:[t],n))}),md=a(`ZodTransform`,(e,t)=>{Ir.init(e,t),U.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ke(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,t.continue??=!0,n.issues.push(ke(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),hd=a(`ZodOptional`,(e,t)=>{Lr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),gd=a(`ZodNullable`,(e,t)=>{Rr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),_d=a(`ZodDefault`,(e,t)=>{zr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),vd=a(`ZodPrefault`,(e,t)=>{Br.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),yd=a(`ZodNonOptional`,(e,t)=>{Vr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),bd=a(`ZodSuccess`,(e,t)=>{Hr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),xd=a(`ZodCatch`,(e,t)=>{Ur.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Sd=a(`ZodNaN`,(e,t)=>{Wr.init(e,t),U.init(e,t)}),Cd=a(`ZodPipe`,(e,t)=>{Gr.init(e,t),U.init(e,t),e.in=t.in,e.out=t.out}),wd=a(`ZodReadonly`,(e,t)=>{Kr.init(e,t),U.init(e,t)}),Td=a(`ZodTemplateLiteral`,(e,t)=>{qr.init(e,t),U.init(e,t)}),Ed=a(`ZodLazy`,(e,t)=>{Yr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.getter()}),Dd=a(`ZodPromise`,(e,t)=>{Jr.init(e,t),U.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Od=a(`ZodCustom`,(e,t)=>{Xr.init(e,t),U.init(e,t)}),kd=(...e)=>gc({Pipe:Cd,Boolean:Gu,String:Su,Transform:md},...e)}));function jd(e){o({customError:e})}function Md(){return o().customError}var Nd,Pd=t((()=>{A(),Nd={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`}})),Fd=r({bigint:()=>zd,boolean:()=>Rd,date:()=>Bd,number:()=>Ld,string:()=>Id});function Id(e){return So(Su,e)}function Ld(e){return Xo(Uu,e)}function Rd(e){return rs(Gu,e)}function zd(e){return as(Ku,e)}function Bd(e){return gs(td,e)}var Vd=t((()=>{A(),Ad()})),Hd=r({$brand:()=>c,$input:()=>_o,$output:()=>go,NEVER:()=>s,TimePrecision:()=>vc,ZodAny:()=>Zu,ZodArray:()=>nd,ZodBase64:()=>Ru,ZodBase64URL:()=>zu,ZodBigInt:()=>Ku,ZodBigIntFormat:()=>qu,ZodBoolean:()=>Gu,ZodCIDRv4:()=>Iu,ZodCIDRv6:()=>Lu,ZodCUID:()=>ku,ZodCUID2:()=>Au,ZodCatch:()=>xd,ZodCustom:()=>Od,ZodCustomStringFormat:()=>Hu,ZodDate:()=>td,ZodDefault:()=>_d,ZodDiscriminatedUnion:()=>ad,ZodE164:()=>Bu,ZodEmail:()=>Cu,ZodEmoji:()=>Du,ZodEnum:()=>dd,ZodError:()=>Qc,ZodFile:()=>pd,ZodGUID:()=>wu,ZodIPv4:()=>Pu,ZodIPv6:()=>Fu,ZodISODate:()=>qc,ZodISODateTime:()=>Kc,ZodISODuration:()=>Yc,ZodISOTime:()=>Jc,ZodIntersection:()=>od,ZodIssueCode:()=>Nd,ZodJWT:()=>Vu,ZodKSUID:()=>Nu,ZodLazy:()=>Ed,ZodLiteral:()=>fd,ZodMap:()=>ld,ZodNaN:()=>Sd,ZodNanoID:()=>Ou,ZodNever:()=>$u,ZodNonOptional:()=>yd,ZodNull:()=>Xu,ZodNullable:()=>gd,ZodNumber:()=>Uu,ZodNumberFormat:()=>Wu,ZodObject:()=>rd,ZodOptional:()=>hd,ZodPipe:()=>Cd,ZodPrefault:()=>vd,ZodPromise:()=>Dd,ZodReadonly:()=>wd,ZodRealError:()=>$c,ZodRecord:()=>cd,ZodSet:()=>ud,ZodString:()=>Su,ZodStringFormat:()=>W,ZodSuccess:()=>bd,ZodSymbol:()=>Ju,ZodTemplateLiteral:()=>Td,ZodTransform:()=>md,ZodTuple:()=>sd,ZodType:()=>U,ZodULID:()=>ju,ZodURL:()=>Eu,ZodUUID:()=>Tu,ZodUndefined:()=>Yu,ZodUnion:()=>id,ZodUnknown:()=>Qu,ZodVoid:()=>ed,ZodXID:()=>Mu,_ZodString:()=>xu,_default:()=>ru,any:()=>Bl,array:()=>F,base64:()=>wl,base64url:()=>Tl,bigint:()=>Pl,boolean:()=>N,catch:()=>su,check:()=>mu,cidrv4:()=>Sl,cidrv6:()=>Cl,clone:()=>v,coerce:()=>Fd,config:()=>o,core:()=>Oc,cuid:()=>hl,cuid2:()=>gl,custom:()=>hu,date:()=>Ul,discriminatedUnion:()=>Kl,e164:()=>El,email:()=>ol,emoji:()=>pl,endsWith:()=>Is,enum:()=>B,file:()=>$l,flattenError:()=>ze,float32:()=>Al,float64:()=>jl,formatError:()=>Be,function:()=>bc,getErrorMap:()=>Md,globalRegistry:()=>yo,gt:()=>ys,gte:()=>O,guid:()=>sl,includes:()=>Ps,instanceof:()=>vu,int:()=>kl,int32:()=>Ml,int64:()=>Fl,intersection:()=>ql,ipv4:()=>bl,ipv6:()=>xl,iso:()=>Vc,json:()=>yu,jwt:()=>Dl,keyof:()=>Wl,ksuid:()=>yl,lazy:()=>fu,length:()=>As,literal:()=>V,locales:()=>po,looseObject:()=>L,lowercase:()=>Ms,lt:()=>vs,lte:()=>D,map:()=>Xl,maxLength:()=>Os,maxSize:()=>Ts,mime:()=>Rs,minLength:()=>ks,minSize:()=>Es,multipleOf:()=>ws,nan:()=>cu,nanoid:()=>ml,nativeEnum:()=>Ql,negative:()=>xs,never:()=>Vl,nonnegative:()=>Cs,nonoptional:()=>au,nonpositive:()=>Ss,normalize:()=>Bs,null:()=>zl,nullable:()=>tu,nullish:()=>nu,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>zs,parse:()=>tl,parseAsync:()=>nl,partialRecord:()=>Yl,pipe:()=>lu,positive:()=>bs,prefault:()=>iu,preprocess:()=>bu,prettifyError:()=>Ue,promise:()=>pu,property:()=>Ls,readonly:()=>uu,record:()=>z,refine:()=>gu,regex:()=>js,regexes:()=>rt,registry:()=>ho,safeParse:()=>rl,safeParseAsync:()=>il,set:()=>Zl,setErrorMap:()=>jd,size:()=>Ds,startsWith:()=>Fs,strictObject:()=>Gl,string:()=>j,stringFormat:()=>Ol,stringbool:()=>kd,success:()=>ou,superRefine:()=>_u,symbol:()=>Ll,templateLiteral:()=>du,toJSONSchema:()=>Cc,toLowerCase:()=>Hs,toUpperCase:()=>Us,transform:()=>eu,treeifyError:()=>Ve,trim:()=>Vs,tuple:()=>Jl,uint32:()=>Nl,uint64:()=>Il,ulid:()=>_l,undefined:()=>Rl,union:()=>R,unknown:()=>P,uppercase:()=>Ns,url:()=>fl,uuid:()=>cl,uuidv4:()=>ll,uuidv6:()=>ul,uuidv7:()=>dl,void:()=>Hl,xid:()=>vl}),Ud=t((()=>{A(),Ad(),Bc(),el(),al(),Pd(),bi(),mo(),Xc(),Vd(),o(_i())})),Wd,Gd=t((()=>{Ud(),Ud(),Wd=Hd})),Kd=r({$brand:()=>c,$input:()=>_o,$output:()=>go,NEVER:()=>s,TimePrecision:()=>vc,ZodAny:()=>Zu,ZodArray:()=>nd,ZodBase64:()=>Ru,ZodBase64URL:()=>zu,ZodBigInt:()=>Ku,ZodBigIntFormat:()=>qu,ZodBoolean:()=>Gu,ZodCIDRv4:()=>Iu,ZodCIDRv6:()=>Lu,ZodCUID:()=>ku,ZodCUID2:()=>Au,ZodCatch:()=>xd,ZodCustom:()=>Od,ZodCustomStringFormat:()=>Hu,ZodDate:()=>td,ZodDefault:()=>_d,ZodDiscriminatedUnion:()=>ad,ZodE164:()=>Bu,ZodEmail:()=>Cu,ZodEmoji:()=>Du,ZodEnum:()=>dd,ZodError:()=>Qc,ZodFile:()=>pd,ZodGUID:()=>wu,ZodIPv4:()=>Pu,ZodIPv6:()=>Fu,ZodISODate:()=>qc,ZodISODateTime:()=>Kc,ZodISODuration:()=>Yc,ZodISOTime:()=>Jc,ZodIntersection:()=>od,ZodIssueCode:()=>Nd,ZodJWT:()=>Vu,ZodKSUID:()=>Nu,ZodLazy:()=>Ed,ZodLiteral:()=>fd,ZodMap:()=>ld,ZodNaN:()=>Sd,ZodNanoID:()=>Ou,ZodNever:()=>$u,ZodNonOptional:()=>yd,ZodNull:()=>Xu,ZodNullable:()=>gd,ZodNumber:()=>Uu,ZodNumberFormat:()=>Wu,ZodObject:()=>rd,ZodOptional:()=>hd,ZodPipe:()=>Cd,ZodPrefault:()=>vd,ZodPromise:()=>Dd,ZodReadonly:()=>wd,ZodRealError:()=>$c,ZodRecord:()=>cd,ZodSet:()=>ud,ZodString:()=>Su,ZodStringFormat:()=>W,ZodSuccess:()=>bd,ZodSymbol:()=>Ju,ZodTemplateLiteral:()=>Td,ZodTransform:()=>md,ZodTuple:()=>sd,ZodType:()=>U,ZodULID:()=>ju,ZodURL:()=>Eu,ZodUUID:()=>Tu,ZodUndefined:()=>Yu,ZodUnion:()=>id,ZodUnknown:()=>Qu,ZodVoid:()=>ed,ZodXID:()=>Mu,_ZodString:()=>xu,_default:()=>ru,any:()=>Bl,array:()=>F,base64:()=>wl,base64url:()=>Tl,bigint:()=>Pl,boolean:()=>N,catch:()=>su,check:()=>mu,cidrv4:()=>Sl,cidrv6:()=>Cl,clone:()=>v,coerce:()=>Fd,config:()=>o,core:()=>Oc,cuid:()=>hl,cuid2:()=>gl,custom:()=>hu,date:()=>Ul,default:()=>qd,discriminatedUnion:()=>Kl,e164:()=>El,email:()=>ol,emoji:()=>pl,endsWith:()=>Is,enum:()=>B,file:()=>$l,flattenError:()=>ze,float32:()=>Al,float64:()=>jl,formatError:()=>Be,function:()=>bc,getErrorMap:()=>Md,globalRegistry:()=>yo,gt:()=>ys,gte:()=>O,guid:()=>sl,includes:()=>Ps,instanceof:()=>vu,int:()=>kl,int32:()=>Ml,int64:()=>Fl,intersection:()=>ql,ipv4:()=>bl,ipv6:()=>xl,iso:()=>Vc,json:()=>yu,jwt:()=>Dl,keyof:()=>Wl,ksuid:()=>yl,lazy:()=>fu,length:()=>As,literal:()=>V,locales:()=>po,looseObject:()=>L,lowercase:()=>Ms,lt:()=>vs,lte:()=>D,map:()=>Xl,maxLength:()=>Os,maxSize:()=>Ts,mime:()=>Rs,minLength:()=>ks,minSize:()=>Es,multipleOf:()=>ws,nan:()=>cu,nanoid:()=>ml,nativeEnum:()=>Ql,negative:()=>xs,never:()=>Vl,nonnegative:()=>Cs,nonoptional:()=>au,nonpositive:()=>Ss,normalize:()=>Bs,null:()=>zl,nullable:()=>tu,nullish:()=>nu,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>zs,parse:()=>tl,parseAsync:()=>nl,partialRecord:()=>Yl,pipe:()=>lu,positive:()=>bs,prefault:()=>iu,preprocess:()=>bu,prettifyError:()=>Ue,promise:()=>pu,property:()=>Ls,readonly:()=>uu,record:()=>z,refine:()=>gu,regex:()=>js,regexes:()=>rt,registry:()=>ho,safeParse:()=>rl,safeParseAsync:()=>il,set:()=>Zl,setErrorMap:()=>jd,size:()=>Ds,startsWith:()=>Fs,strictObject:()=>Gl,string:()=>j,stringFormat:()=>Ol,stringbool:()=>kd,success:()=>ou,superRefine:()=>_u,symbol:()=>Ll,templateLiteral:()=>du,toJSONSchema:()=>Cc,toLowerCase:()=>Hs,toUpperCase:()=>Us,transform:()=>eu,treeifyError:()=>Ve,trim:()=>Vs,tuple:()=>Jl,uint32:()=>Nl,uint64:()=>Il,ulid:()=>_l,undefined:()=>Rl,union:()=>R,unknown:()=>P,uppercase:()=>Ns,url:()=>fl,uuid:()=>cl,uuidv4:()=>ll,uuidv6:()=>ul,uuidv7:()=>dl,void:()=>Hl,xid:()=>vl,z:()=>Hd}),qd,Jd=t((()=>{Gd(),Gd(),qd=Wd})),Yd,G,Xd,Zd,Qd,$d,ef,K,tf,nf,q,J,Y,X,rf,af,of,sf,cf,lf,uf,Z,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Q,Pm,Fm=t((()=>{Jd(),Yd=`io.modelcontextprotocol/related-task`,G=hu(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Xd=R([j(),M().int()]),Zd=j(),L({ttl:M().optional(),pollInterval:M().optional()}),Qd=I({ttl:M().optional()}),$d=I({taskId:j()}),ef=L({progressToken:Xd.optional(),[Yd]:$d.optional()}),K=I({_meta:ef.optional()}),tf=K.extend({task:Qd.optional()}),nf=e=>tf.safeParse(e).success,q=I({method:j(),params:K.loose().optional()}),J=I({_meta:ef.optional()}),Y=I({method:j(),params:J.loose().optional()}),X=L({_meta:ef.optional()}),rf=R([j(),M().int()]),af=I({jsonrpc:V(`2.0`),id:rf,...q.shape}).strict(),of=e=>af.safeParse(e).success,sf=I({jsonrpc:V(`2.0`),...Y.shape}).strict(),cf=e=>sf.safeParse(e).success,lf=I({jsonrpc:V(`2.0`),id:rf,result:X}).strict(),uf=e=>lf.safeParse(e).success,(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Z||={}),df=I({jsonrpc:V(`2.0`),id:rf.optional(),error:I({code:M().int(),message:j(),data:P().optional()})}).strict(),ff=e=>df.safeParse(e).success,pf=R([af,sf,lf,df]),R([lf,df]),mf=X.strict(),hf=J.extend({requestId:rf.optional(),reason:j().optional()}),gf=Y.extend({method:V(`notifications/cancelled`),params:hf}),_f=I({src:j(),mimeType:j().optional(),sizes:F(j()).optional(),theme:B([`light`,`dark`]).optional()}),vf=I({icons:F(_f).optional()}),yf=I({name:j(),title:j().optional()}),bf=yf.extend({...yf.shape,...vf.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),xf=ql(I({applyDefaults:N().optional()}),z(j(),P())),Sf=bu(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ql(I({form:xf.optional(),url:G.optional()}),z(j(),P()).optional())),Cf=L({list:G.optional(),cancel:G.optional(),requests:L({sampling:L({createMessage:G.optional()}).optional(),elicitation:L({create:G.optional()}).optional()}).optional()}),wf=L({list:G.optional(),cancel:G.optional(),requests:L({tools:L({call:G.optional()}).optional()}).optional()}),Tf=I({experimental:z(j(),G).optional(),sampling:I({context:G.optional(),tools:G.optional()}).optional(),elicitation:Sf.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:Cf.optional(),extensions:z(j(),G).optional()}),Ef=K.extend({protocolVersion:j(),capabilities:Tf,clientInfo:bf}),Df=q.extend({method:V(`initialize`),params:Ef}),Of=I({experimental:z(j(),G).optional(),logging:G.optional(),completions:G.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:wf.optional(),extensions:z(j(),G).optional()}),kf=X.extend({protocolVersion:j(),capabilities:Of,serverInfo:bf,instructions:j().optional()}),Af=Y.extend({method:V(`notifications/initialized`),params:J.optional()}),jf=q.extend({method:V(`ping`),params:K.optional()}),Mf=I({progress:M(),total:H(M()),message:H(j())}),Nf=I({...J.shape,...Mf.shape,progressToken:Xd}),Pf=Y.extend({method:V(`notifications/progress`),params:Nf}),Ff=K.extend({cursor:Zd.optional()}),If=q.extend({params:Ff.optional()}),Lf=X.extend({nextCursor:Zd.optional()}),Rf=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),zf=I({taskId:j(),status:Rf,ttl:R([M(),zl()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:H(M()),statusMessage:H(j())}),Bf=X.extend({task:zf}),Vf=J.merge(zf),Hf=Y.extend({method:V(`notifications/tasks/status`),params:Vf}),Uf=q.extend({method:V(`tasks/get`),params:K.extend({taskId:j()})}),Wf=X.merge(zf),Gf=q.extend({method:V(`tasks/result`),params:K.extend({taskId:j()})}),X.loose(),Kf=If.extend({method:V(`tasks/list`)}),qf=Lf.extend({tasks:F(zf)}),Jf=q.extend({method:V(`tasks/cancel`),params:K.extend({taskId:j()})}),Yf=X.merge(zf),Xf=I({uri:j(),mimeType:H(j()),_meta:z(j(),P()).optional()}),Zf=Xf.extend({text:j()}),Qf=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),$f=Xf.extend({blob:Qf}),ep=B([`user`,`assistant`]),tp=I({audience:F(ep).optional(),priority:M().min(0).max(1).optional(),lastModified:Hc({offset:!0}).optional()}),np=I({...yf.shape,...vf.shape,uri:j(),description:H(j()),mimeType:H(j()),size:H(M()),annotations:tp.optional(),_meta:H(L({}))}),rp=I({...yf.shape,...vf.shape,uriTemplate:j(),description:H(j()),mimeType:H(j()),annotations:tp.optional(),_meta:H(L({}))}),ip=If.extend({method:V(`resources/list`)}),ap=Lf.extend({resources:F(np)}),op=If.extend({method:V(`resources/templates/list`)}),sp=Lf.extend({resourceTemplates:F(rp)}),cp=K.extend({uri:j()}),lp=cp,up=q.extend({method:V(`resources/read`),params:lp}),dp=X.extend({contents:F(R([Zf,$f]))}),fp=Y.extend({method:V(`notifications/resources/list_changed`),params:J.optional()}),pp=cp,mp=q.extend({method:V(`resources/subscribe`),params:pp}),hp=cp,gp=q.extend({method:V(`resources/unsubscribe`),params:hp}),_p=J.extend({uri:j()}),vp=Y.extend({method:V(`notifications/resources/updated`),params:_p}),yp=I({name:j(),description:H(j()),required:H(N())}),bp=I({...yf.shape,...vf.shape,description:H(j()),arguments:H(F(yp)),_meta:H(L({}))}),xp=If.extend({method:V(`prompts/list`)}),Sp=Lf.extend({prompts:F(bp)}),Cp=K.extend({name:j(),arguments:z(j(),j()).optional()}),wp=q.extend({method:V(`prompts/get`),params:Cp}),Tp=I({type:V(`text`),text:j(),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Ep=I({type:V(`image`),data:Qf,mimeType:j(),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Dp=I({type:V(`audio`),data:Qf,mimeType:j(),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Op=I({type:V(`tool_use`),name:j(),id:j(),input:z(j(),P()),_meta:z(j(),P()).optional()}),kp=I({type:V(`resource`),resource:R([Zf,$f]),annotations:tp.optional(),_meta:z(j(),P()).optional()}),Ap=np.extend({type:V(`resource_link`)}),jp=R([Tp,Ep,Dp,Ap,kp]),Mp=I({role:ep,content:jp}),Np=X.extend({description:j().optional(),messages:F(Mp)}),Pp=Y.extend({method:V(`notifications/prompts/list_changed`),params:J.optional()}),Fp=I({title:j().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),Ip=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),Lp=I({...yf.shape,...vf.shape,description:j().optional(),inputSchema:I({type:V(`object`),properties:z(j(),G).optional(),required:F(j()).optional()}).catchall(P()),outputSchema:I({type:V(`object`),properties:z(j(),G).optional(),required:F(j()).optional()}).catchall(P()).optional(),annotations:Fp.optional(),execution:Ip.optional(),_meta:z(j(),P()).optional()}),Rp=If.extend({method:V(`tools/list`)}),zp=Lf.extend({tools:F(Lp)}),Bp=X.extend({content:F(jp).default([]),structuredContent:z(j(),P()).optional(),isError:N().optional()}),Bp.or(X.extend({toolResult:P()})),Vp=tf.extend({name:j(),arguments:z(j(),P()).optional()}),Hp=q.extend({method:V(`tools/call`),params:Vp}),Up=Y.extend({method:V(`notifications/tools/list_changed`),params:J.optional()}),I({autoRefresh:N().default(!0),debounceMs:M().int().nonnegative().default(300)}),Wp=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Gp=K.extend({level:Wp}),Kp=q.extend({method:V(`logging/setLevel`),params:Gp}),qp=J.extend({level:Wp,logger:j().optional(),data:P()}),Jp=Y.extend({method:V(`notifications/message`),params:qp}),Yp=I({name:j().optional()}),Xp=I({hints:F(Yp).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),Zp=I({mode:B([`auto`,`required`,`none`]).optional()}),Qp=I({type:V(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:F(jp).default([]),structuredContent:I({}).loose().optional(),isError:N().optional(),_meta:z(j(),P()).optional()}),$p=Kl(`type`,[Tp,Ep,Dp]),em=Kl(`type`,[Tp,Ep,Dp,Op,Qp]),tm=I({role:ep,content:R([em,F(em)]),_meta:z(j(),P()).optional()}),nm=tf.extend({messages:F(tm),modelPreferences:Xp.optional(),systemPrompt:j().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(j()).optional(),metadata:G.optional(),tools:F(Lp).optional(),toolChoice:Zp.optional()}),rm=q.extend({method:V(`sampling/createMessage`),params:nm}),im=X.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:ep,content:$p}),am=X.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:ep,content:R([em,F(em)])}),om=I({type:V(`boolean`),title:j().optional(),description:j().optional(),default:N().optional()}),sm=I({type:V(`string`),title:j().optional(),description:j().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),cm=I({type:B([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),lm=I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),default:j().optional()}),um=I({type:V(`string`),title:j().optional(),description:j().optional(),oneOf:F(I({const:j(),title:j()})),default:j().optional()}),dm=I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),enumNames:F(j()).optional(),default:j().optional()}),fm=R([lm,um]),pm=I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(j())}),default:F(j()).optional()}),mm=I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:j(),title:j()}))}),default:F(j()).optional()}),hm=R([pm,mm]),gm=R([dm,fm,hm]),_m=R([gm,om,sm,cm]),vm=tf.extend({mode:V(`form`).optional(),message:j(),requestedSchema:I({type:V(`object`),properties:z(j(),_m),required:F(j()).optional()})}),ym=tf.extend({mode:V(`url`),message:j(),elicitationId:j(),url:j().url()}),bm=R([vm,ym]),xm=q.extend({method:V(`elicitation/create`),params:bm}),Sm=J.extend({elicitationId:j()}),Cm=Y.extend({method:V(`notifications/elicitation/complete`),params:Sm}),wm=X.extend({action:B([`accept`,`decline`,`cancel`]),content:bu(e=>e===null?void 0:e,z(j(),R([j(),M(),N(),F(j())])).optional())}),Tm=I({type:V(`ref/resource`),uri:j()}),Em=I({type:V(`ref/prompt`),name:j()}),Dm=K.extend({ref:R([Em,Tm]),argument:I({name:j(),value:j()}),context:I({arguments:z(j(),j()).optional()}).optional()}),Om=q.extend({method:V(`completion/complete`),params:Dm}),km=X.extend({completion:L({values:F(j()).max(100),total:H(M().int()),hasMore:H(N())})}),Am=I({uri:j().startsWith(`file://`),name:j().optional(),_meta:z(j(),P()).optional()}),jm=q.extend({method:V(`roots/list`),params:K.optional()}),Mm=X.extend({roots:F(Am)}),Nm=Y.extend({method:V(`notifications/roots/list_changed`),params:J.optional()}),R([jf,Df,Om,Kp,wp,xp,ip,op,up,mp,gp,Hp,Rp,Uf,Gf,Kf,Jf]),R([gf,Pf,Af,Nm,Hf]),R([mf,im,am,wm,Mm,Wf,qf,Bf]),R([jf,rm,xm,jm,Uf,Gf,Kf,Jf]),R([gf,Pf,Jp,vp,fp,Up,Pp,Hf,Cm]),R([mf,kf,km,Np,Sp,ap,sp,dp,Bp,zp,Wf,qf,Bf]),Q=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Z.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Pm(e.elicitations,n)}return new e(t,n,r)}},Pm=class extends Q{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Z.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}}));function Im(e){return e===`completed`||e===`failed`||e===`cancelled`}var Lm=t((()=>{})),Rm=t((()=>{})),zm=t((()=>{})),Bm=t((()=>{})),Vm=t((()=>{})),Hm=t((()=>{})),Um=t((()=>{})),Wm=t((()=>{})),Gm=t((()=>{})),Km=t((()=>{})),qm=t((()=>{})),Jm=t((()=>{})),Ym=t((()=>{})),Xm=t((()=>{})),Zm=t((()=>{})),Qm=t((()=>{})),$m=t((()=>{})),eh=t((()=>{})),th=t((()=>{})),nh=t((()=>{})),rh=t((()=>{})),ih=t((()=>{})),ah=t((()=>{})),oh=t((()=>{})),sh=t((()=>{})),ch=t((()=>{})),lh=t((()=>{})),uh=t((()=>{})),dh=t((()=>{})),fh=t((()=>{})),ph=t((()=>{})),mh=t((()=>{})),hh=t((()=>{})),gh=t((()=>{})),_h=t((()=>{})),vh=t((()=>{})),yh=t((()=>{})),bh=t((()=>{})),xh=t((()=>{})),Sh=t((()=>{Rm(),zm(),Bm(),Vm(),yh(),bh(),Hm(),Um(),Wm(),Gm(),Km(),qm(),Jm(),Ym(),Xm(),Zm(),Qm(),$m(),nh(),rh(),ih(),ah(),sh(),ch(),lh(),uh(),dh(),fh(),_h(),th(),ph(),eh(),mh(),hh(),oh(),gh(),vh(),xh()}));function Ch(e){let t=Lc(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Rc(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function wh(e,t){let n=Ic(e,t);if(!n.success)throw n.error;return n.data}var Th=t((()=>{zc(),Sh()}));function Eh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Dh(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Eh(a)&&Eh(i)?{...a,...i}:i}return n}var Oh,kh=t((()=>{zc(),Fm(),Lm(),Th(),Oh=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(gf,e=>{this._oncancel(e)}),this.setNotificationHandler(Pf,e=>{this._onprogress(e)}),this.setRequestHandler(jf,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Uf,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Q(Z.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(Gf,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new Q(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new Q(Z.InvalidParams,`Task not found: ${r}`);if(!Im(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(Im(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[Yd]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Kf,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new Q(Z.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Jf,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Q(Z.InvalidParams,`Task not found: ${e.params.taskId}`);if(Im(n.status))throw new Q(Z.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new Q(Z.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof Q?e:new Q(Z.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),Q.fromError(Z.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),uf(e)||ff(e)?this._onresponse(e):of(e)?this._onrequest(e,t):cf(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=Q.fromError(Z.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[Yd]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Z.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=nf(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new Q(Z.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Z.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),uf(e)?n(e):n(new Q(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(uf(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),uf(e)?r(e):r(Q.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof Q?e:new Q(Z.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Bf,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new Q(Z.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},Im(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new Q(Z.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new Q(Z.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof Q?e:new Q(Z.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Yd]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof Q?e:new Q(Z.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Ic(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let ee=n?.timeout??6e4;this._setupTimeout(d,ee,n?.maxTotalTimeout,()=>p(Q.fromError(Z.RequestTimeout,`Request timed out`,{timeout:ee})),n?.resetTimeoutOnProgress??!1);let te=s?.taskId;te?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(te,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Wf,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},qf,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Yf,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[Yd]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[Yd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[Yd]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=Ch(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=wh(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=Ch(e);this._notificationHandlers.set(n,n=>{let r=wh(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&of(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new Q(Z.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new Q(Z.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new Q(Z.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new Q(Z.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Hf.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),Im(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new Q(Z.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(Im(a.status))throw new Q(Z.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Hf.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),Im(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}}})),Ah,jh,Mh,Nh,Ph=t((()=>{Ah=`modulepreload`,jh=function(e,t){return new URL(e,t).href},Mh={},Nh=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=jh(t,n),t=s(t),t in Mh)return;Mh[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ah,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}}));async function Fh(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](fg);if(n.vendor===`zod`){let{z:n}=await Nh(async()=>{let{z:e}=await Promise.resolve().then(()=>(Jd(),Kd));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Ih(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Lh(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function Rh(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}var zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg=t((()=>{kh(),Fm(),Jd(),Ph(),(e=>typeof i<`u`?i:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof i<`u`?i:e)[t]}):e)(function(e){if(typeof i<`u`)return i.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),zh=class extends Oh{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Bh=`2026-01-26`,Vh=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=pf.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Hh=R([V(`light`),V(`dark`)]).describe(`Color theme preference for the host environment.`),Uh=R([V(`inline`),V(`fullscreen`),V(`pip`)]).describe(`Display mode for UI presentation.`),Wh=R([V(`--color-background-primary`),V(`--color-background-secondary`),V(`--color-background-tertiary`),V(`--color-background-inverse`),V(`--color-background-ghost`),V(`--color-background-info`),V(`--color-background-danger`),V(`--color-background-success`),V(`--color-background-warning`),V(`--color-background-disabled`),V(`--color-text-primary`),V(`--color-text-secondary`),V(`--color-text-tertiary`),V(`--color-text-inverse`),V(`--color-text-ghost`),V(`--color-text-info`),V(`--color-text-danger`),V(`--color-text-success`),V(`--color-text-warning`),V(`--color-text-disabled`),V(`--color-border-primary`),V(`--color-border-secondary`),V(`--color-border-tertiary`),V(`--color-border-inverse`),V(`--color-border-ghost`),V(`--color-border-info`),V(`--color-border-danger`),V(`--color-border-success`),V(`--color-border-warning`),V(`--color-border-disabled`),V(`--color-ring-primary`),V(`--color-ring-secondary`),V(`--color-ring-inverse`),V(`--color-ring-info`),V(`--color-ring-danger`),V(`--color-ring-success`),V(`--color-ring-warning`),V(`--font-sans`),V(`--font-mono`),V(`--font-weight-normal`),V(`--font-weight-medium`),V(`--font-weight-semibold`),V(`--font-weight-bold`),V(`--font-text-xs-size`),V(`--font-text-sm-size`),V(`--font-text-md-size`),V(`--font-text-lg-size`),V(`--font-heading-xs-size`),V(`--font-heading-sm-size`),V(`--font-heading-md-size`),V(`--font-heading-lg-size`),V(`--font-heading-xl-size`),V(`--font-heading-2xl-size`),V(`--font-heading-3xl-size`),V(`--font-text-xs-line-height`),V(`--font-text-sm-line-height`),V(`--font-text-md-line-height`),V(`--font-text-lg-line-height`),V(`--font-heading-xs-line-height`),V(`--font-heading-sm-line-height`),V(`--font-heading-md-line-height`),V(`--font-heading-lg-line-height`),V(`--font-heading-xl-line-height`),V(`--font-heading-2xl-line-height`),V(`--font-heading-3xl-line-height`),V(`--border-radius-xs`),V(`--border-radius-sm`),V(`--border-radius-md`),V(`--border-radius-lg`),V(`--border-radius-xl`),V(`--border-radius-full`),V(`--border-width-regular`),V(`--shadow-hairline`),V(`--shadow-sm`),V(`--shadow-md`),V(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`),Gh=z(Wh.describe(`Style variables for theming MCP apps.
|
|
330
277
|
|
|
331
278
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
332
279
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -372,16 +319,16 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
372
319
|
- omitted: host decides border`)}),I({method:V(`ui/request-display-mode`),params:I({mode:Uh.describe(`The display mode being requested.`)})}),og=I({mode:Uh.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),sg=R([V(`model`),V(`app`)]).describe(`Tool visibility scope - who can access the tool.`),I({resourceUri:j().optional(),visibility:F(sg).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
373
320
|
- "model": Tool visible to and callable by the agent
|
|
374
321
|
- "app": Tool callable by the app from this server only`),csp:Vl().optional(),permissions:Vl().optional()}),I({mimeTypes:F(j()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),I({method:V(`ui/download-file`),params:I({contents:F(R([kp,Ap])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),I({method:V(`ui/message`),params:I({role:V(`user`).describe(`Message role, currently only "user" is supported.`),content:F(jp).describe(`Message content blocks (text, image, etc.).`)})}),I({method:V(`ui/notifications/sandbox-resource-ready`),params:I({html:j().describe(`HTML content to load into the inner iframe.`),sandbox:j().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:Yh.optional().describe(`CSP configuration from resource metadata.`),permissions:Xh.optional().describe(`Sandbox permissions from resource metadata.`)})}),cg=I({method:V(`ui/notifications/tool-result`),params:Bp.describe(`Standard MCP tool execution result.`)}),lg=I({toolInfo:I({id:rf.optional().describe(`JSON-RPC id of the tools/call request.`),tool:Lp.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Hh.optional().describe(`Current color theme preference.`),styles:tg.optional().describe(`Style configuration for theming the app.`),displayMode:Uh.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:F(Uh).optional().describe(`Display modes the host supports.`),containerDimensions:R([I({height:M().describe(`Fixed container height in pixels.`)}),I({maxHeight:R([M(),Rl()]).optional().describe(`Maximum container height in pixels.`)})]).and(R([I({width:M().describe(`Fixed container width in pixels.`)}),I({maxWidth:R([M(),Rl()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
375
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:j().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:j().optional().describe(`User's timezone in IANA format.`),userAgent:j().optional().describe(`Host application identifier.`),platform:R([V(`web`),V(`desktop`),V(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:I({touch:N().optional().describe(`Whether the device supports touch input.`),hover:N().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:I({top:M().describe(`Top safe area inset in pixels.`),right:M().describe(`Right safe area inset in pixels.`),bottom:M().describe(`Bottom safe area inset in pixels.`),left:M().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),ug=I({method:V(`ui/notifications/host-context-changed`),params:lg.describe(`Partial context update containing only changed fields.`)}),I({method:V(`ui/update-model-context`),params:I({content:F(jp).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:z(j(),P().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),I({method:V(`ui/initialize`),params:I({appInfo:bf.describe(`App identification (name and version).`),appCapabilities:ag.describe(`Features and capabilities this app provides.`),protocolVersion:j().describe(`Protocol version this app supports.`)})}),dg=I({protocolVersion:j().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:bf.describe(`Host application identification and version.`),hostCapabilities:ig.describe(`Features and capabilities provided by the host.`),hostContext:lg.describe(`Rich context about the host environment.`)}).passthrough(),fg={target:`draft-2020-12`},pg=class e extends zh{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Zh,toolinputpartial:Qh,toolresult:cg,toolcancelled:$h,hostcontextchanged:ug};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||o({jitless:!0}),this.setRequestHandler(jf,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Dh(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Ih(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Ih(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Fh(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await Fh(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(ng,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Hp,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(Rp,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},Bp,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},dp,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},ap,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?am:im;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Jh,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},mf,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Kh,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},qh,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},og,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new Vh(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Bh}},dg,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}}));function hg(e,t){let n,r=0,i,a=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},o=new pg({name:e,version:`0.0.1`},{}),s=async e=>{let t=await o.request({method:`tools/call`,params:{name:`get_generation`,arguments:{operationId:e}}},Bp);if(!t.isError)return t.structuredContent},c=(e,o)=>{n=window.setTimeout(async()=>{if(Date.now()-r>xg){t.onTimeout?.();return}try{let n=await s(e);if(n?.status===`complete`){a(),i=n,t.onResult(n);return}}catch{}c(e,Math.min(o*1.5,bg))},o)},l=e=>{e&&(a(),i=e,t.onResult(e),e.status===`running`&&e.operationId!==void 0&&(r=Date.now(),c(e.operationId,yg)))};return o.ontoolinput=e=>{t.onInput?.(e?.arguments||{}),t.onResult({status:`running`})},o.ontoolresult=e=>l(e?.structuredContent),o.onhostcontextchanged=e=>{if(e?.theme&&Lh(e.theme),e?.styles?.variables&&Rh(e.styles.variables),e?.displayMode&&(document.documentElement.dataset.displayMode=e.displayMode),e?.safeAreaInsets){let{top:t=0,right:n=0,bottom:r=0,left:i=0}=e.safeAreaInsets;document.body.style.padding=`${t}px ${n}px ${r}px ${i}px`}},o.onteardown=async()=>(a(),{}),o.connect(new Vh(window.parent,window.parent)).catch(()=>{}),{app:o,current:()=>i}}async function gg(e,t,n){return e.request({method:`tools/call`,params:{name:t,arguments:n}},Bp)}async function _g(e,t){if(e.getHostCapabilities()?.updateModelContext)try{await e.updateModelContext({content:[{type:`text`,text:t}]})}catch{}}function vg(e){let t=document.documentElement.dataset.displayMode===`fullscreen`;return e.requestDisplayMode({mode:t?`inline`:`fullscreen`}).then(e=>{e?.mode&&(document.documentElement.dataset.displayMode=e.mode)})}var $,yg,bg,xg,Sg=t((()=>{mg(),Fm(),$=e=>document.getElementById(e),yg=2e3,bg=1e4,xg=36e4}));n((()=>{Sg();var e=[`shell`,`button`],t=3,n=`<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m13 6 6 6-6 6"/></svg>`,r={shell:90,button:0},i=window.EyeDropper,a=[`name`,`email`,`address`,`city`,`postcode`,`country`],o=`card-${Math.random().toString(36).slice(2,10)}`,s=$(`card`),c=$(`viewer`),l=$(`fallback`),u=$(`order-form`),d,f=0,p=!1,ee,te=!1,ne=`*`,re,ie,m=[],ae,oe,h,se,ce,g,_=Date.now(),le,v={shell:0,button:0};function y(e,t){clearTimeout(le),$(`status`).textContent=e,t&&(le=window.setTimeout(()=>$(`status`).textContent=``,t))}function ue(e){s.dataset.view=e,$(`view-design`).hidden=e!==`design`,$(`view-order`).hidden=e!==`order`,$(`view-done`).hidden=e!==`done`}var{app:de}=hg(`Camera`,{onInput:()=>y(`Setting up your camera…`),onResult:e=>{let t=e;typeof t.designId==`string`&&fe(t)}});function fe(e){let t=e.designId!==d?.designId;d=e,Te(),t?(me(),Ce(2500)):e.rev>f&&me(),e.mode===`checkout`&&Me()}async function pe(){let e=navigator.gpu;if(!e)return!1;try{return!!await e.requestAdapter()}catch{return!1}}async function me(e){if(d){if(oe===void 0&&(y(`Checking 3D support…`),oe=await pe(),Fe(oe?`webgpu-available`:`webgpu-missing`)),f=d.rev,!oe){ge(),y(``);return}p&&te&&ee===d.designId?he(d.sceneUrl,e):b(e)}}function he(e,t){re=e,y(t??`Updating the 3D view…`),c.contentWindow?.postMessage({type:`kakapo:setScene`,url:e},ne),clearTimeout(ie),ie=window.setTimeout(()=>{re===e&&b(t)},15e3)}function b(e){d&&(p=!1,te=!1,ae=void 0,ee=d.designId,re=void 0,clearTimeout(ie),l.hidden=!0,c.hidden=!1,c.src=d.viewerUrl,y(e??`Loading the 3D viewer…`),clearTimeout(ce),ce=window.setTimeout(()=>{p||(y(`The 3D viewer hasn't loaded — this app may not allow it here.`),Fe(`viewer-timeout`))},25e3))}function ge(){if(!d)return;c.hidden=!0,l.hidden=!1,l.textContent=``;let e=document.createElement(`p`);e.textContent=`The 3D preview needs WebGPU, which this browser or device doesn't offer. You can still change the design here or in chat, and order it.`;let t=document.createElement(`dl`),n=[[`Shell colour`,xe(d.colors.shell,d.gradientAngles.shell)],[`Button colour`,xe(d.colors.button,d.gradientAngles.button)],...d.options.map(e=>[e.label,e.display])];for(let[e,r]of n){let n=document.createElement(`dt`);n.textContent=e;let i=document.createElement(`dd`);i.textContent=r,t.append(n,i)}l.append(e,t)}function x(e){let t={};if(!Array.isArray(e))return t;for(let n of e){let e=n?.params??{};for(let[n,r]of Object.entries(e))typeof r==`number`&&Number.isFinite(r)&&(t[n]=r)}return t}var _e=(e,t)=>e.source===c.contentWindow&&(e.origin===t.viewerOrigin||e.origin===`null`);window.addEventListener(`message`,e=>{if(!d||!_e(e,d))return;let t=e.data;if(t?.type===`kakapo:ready`)p=!0,ne=e.origin===`null`?`*`:e.origin,te=Array.isArray(t.messages)&&t.messages.includes(`kakapo:setScene`),clearTimeout(ce),ae=x(t.scripts),y(``),Fe(`viewer-ready`);else if(t?.type===`kakapo:sceneSet`){if(t.url!==re)return;if(re=void 0,clearTimeout(ie),t.error){b();return}ae=x(t.scripts),y(``)}else if(t?.type===`kakapo:params`){ye(x(t.scripts));for(let e of m.splice(0))e()}else t?.type===`kakapo:print`&&(ye(x(t.scripts)),Me())}),window.setInterval(()=>{!d||!p||document.visibilityState!==`visible`||c.contentWindow?.postMessage({type:`kakapo:getParams`},ne)},1500);function ve(){return p?new Promise(e=>{m.push(e),c.contentWindow?.postMessage({type:`kakapo:getParams`},ne),window.setTimeout(e,500)}):Promise.resolve()}function ye(e){if(!ae){ae=e;return}let t=ae;Object.keys(e).some(n=>e[n]!==t[n])&&(ae=e,_=Date.now(),y(`Saving…`),clearTimeout(h),h=window.setTimeout(()=>void be(),700))}async function be(e){for(clearTimeout(h),h=void 0;se;)await se;if(!d)return;let t=d.rev;se=(async()=>{try{let n=await gg(de,`sync_camera_design`,{designId:d.designId,baseRev:t,writer:o,params:ae??{},...e}),r=n.structuredContent;if(n.isError||!r){y(`Couldn't save that change.`);return}if(d=r,Te(),r.rev===t){y(``);return}let i=r.rev>t+1;i||e?me(i?`Merged with a change from the chat…`:`Applying colour…`):f=r.rev,!i&&!e&&y(`Saved`,1500),_g(de,Se(r))}catch{y(`Couldn't save that change.`)}})();try{await se}finally{se=void 0}}function xe(e,t=0){return e.length<2?e[0]:`${e.join(` → `)} gradient${t?` turned ${t}°`:``}`}var Se=e=>`The user adjusted their camera in the card. Design ${e.designId}, revision ${e.rev}: shell ${xe(e.colors.shell,e.gradientAngles.shell)}, button ${xe(e.colors.button,e.gradientAngles.button)}; `+e.options.map(e=>`${e.label} ${e.display}`).join(`, `)+`.`;function Ce(e){clearTimeout(g),g=window.setTimeout(we,e)}async function we(){let e=Date.now()-_;try{if(d&&document.visibilityState===`visible`&&!se){let e=await gg(de,`get_camera_design`,{designId:d.designId}),t=e.structuredContent;!e.isError&&t&&t.rev>d.rev&&(_=Date.now(),h===void 0?(d=t,Te(),t.rev>f&&me(`Updated from the chat…`)):await be())}}catch{}Ce(e<12e4?2500:e<6e5?8e3:2e4)}function S(e){return d?.palette.find(t=>t.name===e)?.hex??e}function Te(){if(d){for(let t of e){let e=d.colors[t],n=e.length>1;v[t]=Math.min(v[t],e.length-1);let r=e[v[t]];$(`solid-${t}`).setAttribute(`aria-pressed`,String(!n)),$(`gradient-${t}`).setAttribute(`aria-pressed`,String(n)),C(t,e);let a=$(`sw-${t}`);a.textContent=``;let o=[...d.palette];for(let t of[...new Set(e)].reverse())t.startsWith(`#`)&&!o.some(e=>e.name===t)&&o.unshift({name:t,hex:t});for(let e of o){let n=document.createElement(`button`);n.type=`button`,n.className=e.name===`clear`?`swatch clear`:`swatch`,n.style.background=e.hex,n.title=e.name,n.setAttribute(`aria-label`,`${t} colour: ${e.name}`),n.setAttribute(`aria-pressed`,String(r===e.name)),n.addEventListener(`click`,()=>void ke(t,e.name)),a.append(n)}$(`pick-${t}`).value=S(r),$(`dropper-${t}`).hidden=!i}$(`price`).textContent=`Full-colour print · ${d.price.label}`,$(`order-summary`).textContent=`Your camera, printed in full colour: ${d.price.label}. Shell ${xe(d.colors.shell,d.gradientAngles.shell)}, button ${xe(d.colors.button,d.gradientAngles.button)}.`,l.hidden||ge()}}function C(e,i){let a=$(`stops-${e}`);if(a.hidden=i.length<2,a.textContent=``,i.length<2)return;let o=document.createElement(`div`);o.className=`track`,o.style.background=`linear-gradient(90deg, ${i.map(S).join(`, `)})`,i.forEach((t,n)=>{let r=document.createElement(`button`);r.type=`button`,r.className=`stop`,r.style.left=`calc(11px + (100% - 22px) * ${n/(i.length-1)})`,r.style.background=S(t),r.title=t,r.setAttribute(`aria-label`,`${e} gradient colour ${n+1} of ${i.length}: ${t}`),r.setAttribute(`aria-pressed`,String(n===v[e])),r.addEventListener(`click`,()=>{v[e]=n,Te()}),o.append(r)});let s=Ee(`+`,`${e}: add a gradient colour`,i.length>=t,()=>{v[e]=i.length,Ae(e,[...i,De(i[i.length-1])])}),c=Ee(`−`,`${e}: remove the selected gradient colour`,i.length<=2,()=>{Ae(e,i.filter((t,n)=>n!==v[e]))}),l=d?.gradientAngles[e]??0,u=Ee(``,`${e}: turn the gradient 45° (now ${l}°)`,!1,()=>void je(e,(l+45)%360));u.innerHTML=n,u.style.transform=`rotate(${r[e]-l}deg)`,a.append(u,o,s,c)}function Ee(e,t,n,r){let i=document.createElement(`button`);return i.type=`button`,i.className=`icon-button`,i.textContent=e,i.title=t,i.setAttribute(`aria-label`,t),i.disabled=n,i.addEventListener(`click`,r),i}function De(e){return e===`violet`?`sky`:`violet`}function Oe(e){let t=/^rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(e);return t?`#${t.slice(1,4).map(e=>Number(e).toString(16).padStart(2,`0`)).join(``)}`:e.toLowerCase()}async function ke(e,t){if(!d)return;let n=[...d.colors[e]];n[v[e]]=t,await Ae(e,n)}async function Ae(e,t){if(!d)return;let n=d.colors[e];t.length===n.length&&t.every((e,t)=>e===n[t])||(_=Date.now(),d={...d,colors:{...d.colors,[e]:t}},Te(),y(`Saving…`),await ve(),await be({colors:{[e]:t}}))}async function je(e,t){!d||d.gradientAngles[e]===t||(_=Date.now(),d={...d,gradientAngles:{...d.gradientAngles,[e]:t}},Te(),y(`Saving…`),await ve(),await be({gradientAngles:{[e]:t}}))}for(let t of e)$(`solid-${t}`).addEventListener(`click`,()=>{if(!d||d.colors[t].length<2)return;let e=d.colors[t][v[t]];v[t]=0,Ae(t,[e])}),$(`gradient-${t}`).addEventListener(`click`,()=>{if(!d||d.colors[t].length>1)return;let[e]=d.colors[t];v[t]=1,Ae(t,[e,De(e)])}),$(`pick-${t}`).addEventListener(`change`,e=>{ke(t,e.target.value.toLowerCase())}),$(`dropper-${t}`).addEventListener(`click`,async()=>{if(i)try{let{sRGBHex:e}=await new i().open();await ke(t,Oe(e))}catch{}});function Me(){d&&(_=Date.now(),ue(`order`),y(``),u.elements.namedItem(`name`)?.focus())}function Ne(){let e={},t=!0;for(let n of a){let r=u.elements.namedItem(n),i=r.value.trim(),a=n===`email`?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i):i.length>0;r.setAttribute(`aria-invalid`,String(!a)),a||(t=!1),e[n]=i}return t?e:void 0}async function Pe(){if(!d)return;let e=Ne();if(!e){y(`Fill in the highlighted fields.`);return}let t=$(`order-place`);t.disabled=!0,y(`Placing your order…`);try{await ve(),(h!==void 0||se)&&await be();let t=await gg(de,`place_order`,{designId:d.designId,rev:d.rev,writer:o,contact:e}),n=t.structuredContent;if(t.isError||!n){y(`The order didn't go through. Check the details and try again.`);return}$(`done-text`).textContent=`Test order ${n.orderId} is recorded (${n.price.label}). Nothing was charged.`,ue(`done`),y(``),_g(de,`The user placed test order ${n.orderId} for camera design ${d.designId}, revision ${n.rev}.`)}catch{y(`The order didn't go through. Try again in a moment.`)}finally{t.disabled=!1}}$(`customize`).addEventListener(`click`,()=>{_=Date.now(),vg(de)}),$(`order`).addEventListener(`click`,Me),$(`order-back`).addEventListener(`click`,()=>ue(`design`)),$(`order-place`).addEventListener(`click`,()=>void Pe()),$(`done-back`).addEventListener(`click`,()=>ue(`design`)),u.addEventListener(`submit`,e=>{e.preventDefault(),Pe()}),new MutationObserver(()=>{$(`customize`).textContent=document.documentElement.dataset.displayMode===`fullscreen`?`Done`:`Customize`}).observe(document.documentElement,{attributes:!0,attributeFilter:[`data-display-mode`]});function Fe(e,t){gg(de,`report_viewer_status`,{...d?{designId:d.designId}:{},writer:o,event:e,...oe===void 0?{}:{webgpu:oe},...t?{detail:t}:{},userAgent:navigator.userAgent.slice(0,300),displayMode:document.documentElement.dataset.displayMode??`inline`}).catch(()=>{})}}))();</script>
|
|
322
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:j().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:j().optional().describe(`User's timezone in IANA format.`),userAgent:j().optional().describe(`Host application identifier.`),platform:R([V(`web`),V(`desktop`),V(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:I({touch:N().optional().describe(`Whether the device supports touch input.`),hover:N().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:I({top:M().describe(`Top safe area inset in pixels.`),right:M().describe(`Right safe area inset in pixels.`),bottom:M().describe(`Bottom safe area inset in pixels.`),left:M().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),ug=I({method:V(`ui/notifications/host-context-changed`),params:lg.describe(`Partial context update containing only changed fields.`)}),I({method:V(`ui/update-model-context`),params:I({content:F(jp).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:z(j(),P().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),I({method:V(`ui/initialize`),params:I({appInfo:bf.describe(`App identification (name and version).`),appCapabilities:ag.describe(`Features and capabilities this app provides.`),protocolVersion:j().describe(`Protocol version this app supports.`)})}),dg=I({protocolVersion:j().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:bf.describe(`Host application identification and version.`),hostCapabilities:ig.describe(`Features and capabilities provided by the host.`),hostContext:lg.describe(`Rich context about the host environment.`)}).passthrough(),fg={target:`draft-2020-12`},pg=class e extends zh{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Zh,toolinputpartial:Qh,toolresult:cg,toolcancelled:$h,hostcontextchanged:ug};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||o({jitless:!0}),this.setRequestHandler(jf,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Dh(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Ih(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Ih(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Fh(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await Fh(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(ng,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Hp,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(Rp,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},Bp,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},dp,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},ap,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?am:im;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Jh,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},mf,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Kh,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},qh,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},og,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new Vh(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Bh}},dg,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}}));function hg(e,t){let n,r=0,i,a=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},o=new pg({name:e,version:`0.0.1`},{}),s=async e=>{let t=await o.request({method:`tools/call`,params:{name:`get_generation`,arguments:{operationId:e}}},Bp);if(!t.isError)return t.structuredContent},c=(e,o)=>{n=window.setTimeout(async()=>{if(Date.now()-r>Sg){t.onTimeout?.();return}try{let n=await s(e);if(n?.status===`complete`){a(),i=n,t.onResult(n);return}}catch{}c(e,Math.min(o*1.5,xg))},o)},l=e=>{e&&(a(),i=e,t.onResult(e),e.status===`running`&&e.operationId!==void 0&&(r=Date.now(),c(e.operationId,bg)))};return o.ontoolinput=e=>{t.onInput?.(e?.arguments||{}),t.onResult({status:`running`})},o.ontoolresult=e=>l(e?.structuredContent),o.onhostcontextchanged=e=>{if(e?.theme&&Lh(e.theme),e?.styles?.variables&&Rh(e.styles.variables),e?.displayMode&&(document.documentElement.dataset.displayMode=e.displayMode),e?.safeAreaInsets){let{top:t=0,right:n=0,bottom:r=0,left:i=0}=e.safeAreaInsets;document.body.style.padding=`${t}px ${n}px ${r}px ${i}px`}},o.onteardown=async()=>(a(),{}),o.connect(new Vh(window.parent,window.parent)).catch(()=>{}),{app:o,current:()=>i}}async function gg(e,t,n){return e.request({method:`tools/call`,params:{name:t,arguments:n}},Bp)}async function _g(e,t){if(e.getHostCapabilities()?.updateModelContext)try{await e.updateModelContext({content:[{type:`text`,text:t}]})}catch{}}function vg(e){let t=document.documentElement.dataset.displayMode===`fullscreen`;return e.requestDisplayMode({mode:t?`inline`:`fullscreen`}).then(e=>{e?.mode&&(document.documentElement.dataset.displayMode=e.mode)})}async function yg(e,t){if(e.getHostCapabilities()?.message)return!(await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})).isError;let n=Cg();return n?.sendFollowUpMessage?(await n.sendFollowUpMessage({prompt:t}),!0):!1}var $,bg,xg,Sg,Cg,wg=t((()=>{mg(),Fm(),$=e=>document.getElementById(e),bg=2e3,xg=1e4,Sg=36e4,Cg=()=>window.openai}));n((()=>{wg();var e=[`shell`,`button`],t=3,n=`<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m13 6 6 6-6 6"/></svg>`,r={shell:90,button:0},i=window.EyeDropper,a=`card-${Math.random().toString(36).slice(2,10)}`,o=$(`viewer`),s=$(`fallback`),c,l=0,u=!1,d,f=!1,p=`*`,ee,te,ne=[],re,ie,m,ae,oe,se,ce=Date.now(),le,h={shell:0,button:0};function g(e,t){clearTimeout(le),$(`status`).textContent=e,t&&(le=window.setTimeout(()=>$(`status`).textContent=``,t))}var{app:ue}=hg(`Camera`,{onInput:()=>g(`Setting up your camera…`),onResult:e=>{let t=e;typeof t.designId==`string`&&de(t)}});function de(e){let t=e.designId!==c?.designId;c=e,Ce(),t?(pe(),be(2500)):e.rev>l&&pe()}async function fe(){let e=navigator.gpu;if(!e)return!1;try{return!!await e.requestAdapter()}catch{return!1}}async function pe(e){if(c){if(ie===void 0&&(g(`Checking 3D support…`),ie=await fe(),je(ie?`webgpu-available`:`webgpu-missing`)),l=c.rev,!ie){ge(),g(``);return}u&&f&&d===c.designId?me(c.sceneUrl,e):he(e)}}function me(e,t){ee=e,g(t??`Updating the 3D view…`),o.contentWindow?.postMessage({type:`kakapo:setScene`,url:e},p),clearTimeout(te),te=window.setTimeout(()=>{ee===e&&he(t)},15e3)}function he(e){c&&(u=!1,f=!1,re=void 0,d=c.designId,ee=void 0,clearTimeout(te),s.hidden=!0,o.hidden=!1,o.src=c.viewerUrl,g(e??`Loading the 3D viewer…`),clearTimeout(oe),oe=window.setTimeout(()=>{u||(g(`The 3D viewer hasn't loaded — this app may not allow it here.`),je(`viewer-timeout`))},25e3))}function ge(){if(!c)return;o.hidden=!0,s.hidden=!1,s.textContent=``;let e=document.createElement(`p`);e.textContent=`The 3D preview needs WebGPU, which this browser or device doesn't offer. You can still change the design here or in chat, and order it.`;let t=document.createElement(`dl`),n=[[`Shell colour`,ve(c.colors.shell,c.gradientAngles.shell)],[`Button colour`,ve(c.colors.button,c.gradientAngles.button)],...c.options.map(e=>[e.label,e.display])];for(let[e,r]of n){let n=document.createElement(`dt`);n.textContent=e;let i=document.createElement(`dd`);i.textContent=r,t.append(n,i)}s.append(e,t)}function _(e){let t={};if(!Array.isArray(e))return t;for(let n of e){let e=n?.params??{};for(let[n,r]of Object.entries(e))typeof r==`number`&&Number.isFinite(r)&&(t[n]=r)}return t}var v=(e,t)=>e.source===o.contentWindow&&(e.origin===t.viewerOrigin||e.origin===`null`);window.addEventListener(`message`,e=>{if(!c||!v(e,c))return;let t=e.data;if(t?.type===`kakapo:ready`)u=!0,p=e.origin===`null`?`*`:e.origin,f=Array.isArray(t.messages)&&t.messages.includes(`kakapo:setScene`),clearTimeout(oe),re=_(t.scripts),g(``),je(`viewer-ready`);else if(t?.type===`kakapo:sceneSet`){if(t.url!==ee)return;if(ee=void 0,clearTimeout(te),t.error){he();return}re=_(t.scripts),g(``)}else if(t?.type===`kakapo:params`){_e(_(t.scripts));for(let e of ne.splice(0))e()}else t?.type===`kakapo:print`&&(_e(_(t.scripts)),Ae())}),window.setInterval(()=>{!c||!u||document.visibilityState!==`visible`||o.contentWindow?.postMessage({type:`kakapo:getParams`},p)},1500);function y(){return u?new Promise(e=>{ne.push(e),o.contentWindow?.postMessage({type:`kakapo:getParams`},p),window.setTimeout(e,500)}):Promise.resolve()}function _e(e){if(!re){re=e;return}let t=re;Object.keys(e).some(n=>e[n]!==t[n])&&(re=e,ce=Date.now(),g(`Saving…`),clearTimeout(m),m=window.setTimeout(()=>void b(),700))}async function b(e){for(clearTimeout(m),m=void 0;ae;)await ae;if(!c)return;let t=c.rev;ae=(async()=>{try{let n=await gg(ue,`sync_camera_design`,{designId:c.designId,baseRev:t,writer:a,params:re??{},...e}),r=n.structuredContent;if(n.isError||!r){g(`Couldn't save that change.`);return}if(c=r,Ce(),r.rev===t){g(``);return}let i=r.rev>t+1;i||e?pe(i?`Merged with a change from the chat…`:`Applying colour…`):l=r.rev,!i&&!e&&g(`Saved`,1500),_g(ue,ye(r))}catch{g(`Couldn't save that change.`)}})();try{await ae}finally{ae=void 0}}function ve(e,t=0){return e.length<2?e[0]:`${e.join(` → `)} gradient${t?` turned ${t}°`:``}`}var ye=e=>`The user adjusted their camera in the card. Design ${e.designId}, revision ${e.rev}: shell ${ve(e.colors.shell,e.gradientAngles.shell)}, button ${ve(e.colors.button,e.gradientAngles.button)}; `+e.options.map(e=>`${e.label} ${e.display}`).join(`, `)+`.`;function be(e){clearTimeout(se),se=window.setTimeout(xe,e)}async function xe(){let e=Date.now()-ce;try{if(c&&document.visibilityState===`visible`&&!ae){let e=await gg(ue,`get_camera_design`,{designId:c.designId}),t=e.structuredContent;!e.isError&&t&&t.rev>c.rev&&(ce=Date.now(),m===void 0?(c=t,Ce(),t.rev>l&&pe(`Updated from the chat…`)):await b())}}catch{}be(e<12e4?2500:e<6e5?8e3:2e4)}function Se(e){return c?.palette.find(t=>t.name===e)?.hex??e}function Ce(){if(c){for(let t of e){let e=c.colors[t],n=e.length>1;h[t]=Math.min(h[t],e.length-1);let r=e[h[t]];$(`solid-${t}`).setAttribute(`aria-pressed`,String(!n)),$(`gradient-${t}`).setAttribute(`aria-pressed`,String(n)),we(t,e);let a=$(`sw-${t}`);a.textContent=``;let o=[...c.palette];for(let t of[...new Set(e)].reverse())t.startsWith(`#`)&&!o.some(e=>e.name===t)&&o.unshift({name:t,hex:t});for(let e of o){let n=document.createElement(`button`);n.type=`button`,n.className=e.name===`clear`?`swatch clear`:`swatch`,n.style.background=e.hex,n.title=e.name,n.setAttribute(`aria-label`,`${t} colour: ${e.name}`),n.setAttribute(`aria-pressed`,String(r===e.name)),n.addEventListener(`click`,()=>void S(t,e.name)),a.append(n)}$(`pick-${t}`).value=Se(r),$(`dropper-${t}`).hidden=!i}$(`price`).textContent=`Full-colour print · ${c.price.label}`,s.hidden||ge()}}function we(e,i){let a=$(`stops-${e}`);if(a.hidden=i.length<2,a.textContent=``,i.length<2)return;let o=document.createElement(`div`);o.className=`track`,o.style.background=`linear-gradient(90deg, ${i.map(Se).join(`, `)})`,i.forEach((t,n)=>{let r=document.createElement(`button`);r.type=`button`,r.className=`stop`,r.style.left=`calc(11px + (100% - 22px) * ${n/(i.length-1)})`,r.style.background=Se(t),r.title=t,r.setAttribute(`aria-label`,`${e} gradient colour ${n+1} of ${i.length}: ${t}`),r.setAttribute(`aria-pressed`,String(n===h[e])),r.addEventListener(`click`,()=>{h[e]=n,Ce()}),o.append(r)});let s=Te(`+`,`${e}: add a gradient colour`,i.length>=t,()=>{h[e]=i.length,De(e,[...i,x(i[i.length-1])])}),l=Te(`−`,`${e}: remove the selected gradient colour`,i.length<=2,()=>{De(e,i.filter((t,n)=>n!==h[e]))}),u=c?.gradientAngles[e]??0,d=Te(``,`${e}: turn the gradient 45° (now ${u}°)`,!1,()=>void Oe(e,(u+45)%360));d.innerHTML=n,d.style.transform=`rotate(${r[e]-u}deg)`,a.append(d,o,s,l)}function Te(e,t,n,r){let i=document.createElement(`button`);return i.type=`button`,i.className=`icon-button`,i.textContent=e,i.title=t,i.setAttribute(`aria-label`,t),i.disabled=n,i.addEventListener(`click`,r),i}function x(e){return e===`violet`?`sky`:`violet`}function Ee(e){let t=/^rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(e);return t?`#${t.slice(1,4).map(e=>Number(e).toString(16).padStart(2,`0`)).join(``)}`:e.toLowerCase()}async function S(e,t){if(!c)return;let n=[...c.colors[e]];n[h[e]]=t,await De(e,n)}async function De(e,t){if(!c)return;let n=c.colors[e];t.length===n.length&&t.every((e,t)=>e===n[t])||(ce=Date.now(),c={...c,colors:{...c.colors,[e]:t}},Ce(),g(`Saving…`),await y(),await b({colors:{[e]:t}}))}async function Oe(e,t){!c||c.gradientAngles[e]===t||(ce=Date.now(),c={...c,gradientAngles:{...c.gradientAngles,[e]:t}},Ce(),g(`Saving…`),await y(),await b({gradientAngles:{[e]:t}}))}for(let t of e)$(`solid-${t}`).addEventListener(`click`,()=>{if(!c||c.colors[t].length<2)return;let e=c.colors[t][h[t]];h[t]=0,De(t,[e])}),$(`gradient-${t}`).addEventListener(`click`,()=>{if(!c||c.colors[t].length>1)return;let[e]=c.colors[t];h[t]=1,De(t,[e,x(e)])}),$(`pick-${t}`).addEventListener(`change`,e=>{S(t,e.target.value.toLowerCase())}),$(`dropper-${t}`).addEventListener(`click`,async()=>{if(i)try{let{sRGBHex:e}=await new i().open();await S(t,Ee(e))}catch{}});var ke=!1;async function Ae(){if(!c||ke)return;ke=!0,ce=Date.now();let e=$(`order`);e.disabled=!0,g(`Getting your quote…`);try{await y(),(m!==void 0||ae)&&await b(),document.documentElement.dataset.displayMode===`fullscreen`&&await vg(ue),g(await yg(ue,`Order it`)?``:`Ask in the chat to order it.`)}catch{g(`Couldn't ask for a quote. Ask in the chat to order it.`)}finally{ke=!1,e.disabled=!1}}$(`customize`).addEventListener(`click`,()=>{ce=Date.now(),vg(ue)}),$(`order`).addEventListener(`click`,()=>void Ae()),new MutationObserver(()=>{$(`customize`).textContent=document.documentElement.dataset.displayMode===`fullscreen`?`Done`:`Customize`}).observe(document.documentElement,{attributes:!0,attributeFilter:[`data-display-mode`]});function je(e,t){gg(ue,`report_viewer_status`,{...c?{designId:c.designId}:{},writer:a,event:e,...ie===void 0?{}:{webgpu:ie},...t?{detail:t}:{},userAgent:navigator.userAgent.slice(0,300),displayMode:document.documentElement.dataset.displayMode??`inline`}).catch(()=>{})}}))();</script>
|
|
376
323
|
</head>
|
|
377
324
|
<body>
|
|
378
|
-
<div class="card" id="card"
|
|
325
|
+
<div class="card" id="card">
|
|
379
326
|
<div class="stage">
|
|
380
327
|
<iframe id="viewer" title="3D preview of your camera" allow="fullscreen" hidden></iframe>
|
|
381
328
|
<div class="fallback" id="fallback" hidden></div>
|
|
382
329
|
</div>
|
|
383
330
|
|
|
384
|
-
<div
|
|
331
|
+
<div id="view-design">
|
|
385
332
|
<div class="controls">
|
|
386
333
|
<div class="row">
|
|
387
334
|
<span>Shell</span>
|
|
@@ -423,35 +370,6 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
423
370
|
</div>
|
|
424
371
|
</div>
|
|
425
372
|
|
|
426
|
-
<div class="view" id="view-order" hidden>
|
|
427
|
-
<form id="order-form" novalidate>
|
|
428
|
-
<h2 class="wide">Where should we send it?</h2>
|
|
429
|
-
<p class="note wide" id="order-summary"></p>
|
|
430
|
-
<label class="wide">Full name<input name="name" autocomplete="name" maxlength="200" /></label>
|
|
431
|
-
<label class="wide">Email<input name="email" type="email" autocomplete="email" maxlength="200" /></label>
|
|
432
|
-
<label class="wide">Address<input name="address" autocomplete="street-address" maxlength="200" /></label>
|
|
433
|
-
<label>City<input name="city" autocomplete="address-level2" maxlength="200" /></label>
|
|
434
|
-
<label>Postcode / ZIP<input name="postcode" autocomplete="postal-code" maxlength="40" /></label>
|
|
435
|
-
<label class="wide">Country<input name="country" autocomplete="country-name" maxlength="100" /></label>
|
|
436
|
-
</form>
|
|
437
|
-
<div class="foot">
|
|
438
|
-
<div class="price">Test mode — nothing is charged.</div>
|
|
439
|
-
<button class="action" id="order-back" type="button">Back</button>
|
|
440
|
-
<button class="action primary" id="order-place" type="button">Place test order</button>
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
|
|
444
|
-
<div class="view" id="view-done" hidden>
|
|
445
|
-
<div class="done">
|
|
446
|
-
<h2>Order received</h2>
|
|
447
|
-
<p id="done-text"></p>
|
|
448
|
-
</div>
|
|
449
|
-
<div class="foot">
|
|
450
|
-
<div class="price"></div>
|
|
451
|
-
<button class="action" id="done-back" type="button">Back to design</button>
|
|
452
|
-
</div>
|
|
453
|
-
</div>
|
|
454
|
-
|
|
455
373
|
<div class="status" id="status">Connecting…</div>
|
|
456
374
|
</div>
|
|
457
375
|
</body>
|